mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
Merge branch 'next' of ../next
This commit is contained in:
commit
ee1702d75a
618 changed files with 23670 additions and 5361 deletions
1
MAKEALL
1
MAKEALL
|
@ -47,6 +47,7 @@ LIST_5xxx=" \
|
|||
BC3450 \
|
||||
cm5200 \
|
||||
cpci5200 \
|
||||
digsy_mtc \
|
||||
EVAL5200 \
|
||||
fo300 \
|
||||
icecube_5100 \
|
||||
|
|
20
Makefile
20
Makefile
|
@ -210,6 +210,7 @@ OBJS := $(addprefix $(obj),$(OBJS))
|
|||
|
||||
LIBS = lib_generic/libgeneric.a
|
||||
LIBS += lib_generic/lzma/liblzma.a
|
||||
LIBS += lib_generic/lzo/liblzo.a
|
||||
LIBS += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \
|
||||
"board/$(VENDOR)/common/lib$(VENDOR).a"; fi)
|
||||
LIBS += cpu/$(CPU)/lib$(CPU).a
|
||||
|
@ -221,7 +222,8 @@ LIBS += cpu/ixp/npe/libnpe.a
|
|||
endif
|
||||
LIBS += lib_$(ARCH)/lib$(ARCH).a
|
||||
LIBS += fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a \
|
||||
fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a fs/yaffs2/libyaffs2.a
|
||||
fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a fs/yaffs2/libyaffs2.a \
|
||||
fs/ubifs/libubifs.a
|
||||
LIBS += net/libnet.a
|
||||
LIBS += disk/libdisk.a
|
||||
LIBS += drivers/bios_emulator/libatibiosemu.a
|
||||
|
@ -527,6 +529,22 @@ cm5200_config: unconfig
|
|||
cpci5200_config: unconfig
|
||||
@$(MKCONFIG) -a cpci5200 ppc mpc5xxx cpci5200 esd
|
||||
|
||||
digsy_mtc_config \
|
||||
digsy_mtc_LOWBOOT_config \
|
||||
digsy_mtc_RAMBOOT_config: unconfig
|
||||
@mkdir -p $(obj)include
|
||||
@mkdir -p $(obj)board/digsy_mtc
|
||||
@ >$(obj)include/config.h
|
||||
@[ -z "$(findstring LOWBOOT_,$@)" ] || \
|
||||
{ echo "TEXT_BASE = 0xFF000000" >$(obj)board/digsy_mtc/config.tmp ; \
|
||||
echo "... with LOWBOOT configuration" ; \
|
||||
}
|
||||
@[ -z "$(findstring RAMBOOT_,$@)" ] || \
|
||||
{ echo "TEXT_BASE = 0x00100000" >$(obj)board/digsy_mtc/config.tmp ; \
|
||||
echo "... with RAMBOOT configuration" ; \
|
||||
}
|
||||
@$(MKCONFIG) -a digsy_mtc ppc mpc5xxx digsy_mtc
|
||||
|
||||
hmi1001_config: unconfig
|
||||
@$(MKCONFIG) hmi1001 ppc mpc5xxx hmi1001
|
||||
|
||||
|
|
1
README
1
README
|
@ -636,6 +636,7 @@ The following options need to be configured:
|
|||
CONFIG_CMD_MISC Misc functions like sleep etc
|
||||
CONFIG_CMD_MMC * MMC memory mapped support
|
||||
CONFIG_CMD_MII * MII utility commands
|
||||
CONFIG_CMD_MTDPARTS * MTD partition support
|
||||
CONFIG_CMD_NAND * NAND support
|
||||
CONFIG_CMD_NET bootp, tftpboot, rarpboot
|
||||
CONFIG_CMD_PCA953X * PCA953x I2C gpio commands
|
||||
|
|
|
@ -38,7 +38,7 @@ SECTIONS
|
|||
.rodata ALIGN(0x4):
|
||||
{
|
||||
__rodata_start = .;
|
||||
*(.rodata)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
__rodata_end = .;
|
||||
}
|
||||
|
||||
|
|
|
@ -73,8 +73,7 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -87,10 +87,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -600,7 +600,7 @@ static int eth_3com_init (struct eth_device *dev, bd_t * bis)
|
|||
ias_cmd = (struct descriptor *) &tx_ring[tx_cur];
|
||||
ias_cmd->status = cpu_to_le32 (1 << 31); /* set DnIndicate bit. */
|
||||
ias_cmd->next = 0;
|
||||
ias_cmd->addr = cpu_to_le32 ((u32) & bis->bi_enetaddr[0]);
|
||||
ias_cmd->addr = cpu_to_le32 ((u32) dev->enetaddr);
|
||||
ias_cmd->length = cpu_to_le32 (6 | LAST_FRAG);
|
||||
|
||||
/* Tell the adapter where the TX ring is located */
|
||||
|
@ -787,6 +787,10 @@ static void read_hw_addr (struct eth_device *dev, bd_t * bis)
|
|||
unsigned int checksum = 0;
|
||||
int i, j, timer;
|
||||
|
||||
/* First, try the env ... if that works, we're all done! */
|
||||
if (eth_getenv_enetaddr("ethaddr", hw_addr))
|
||||
goto Done;
|
||||
|
||||
/* Read the station address from the EEPROM. */
|
||||
|
||||
EL3WINDOW (dev, 0);
|
||||
|
@ -827,40 +831,10 @@ static void read_hw_addr (struct eth_device *dev, bd_t * bis)
|
|||
hw_addr[j + 1] = (u8) ((ETH_INW (dev, j) >> 8) & 0xff);
|
||||
}
|
||||
|
||||
for (i = 0; i < ETH_ALEN; i++) {
|
||||
if (hw_addr[i] != bis->bi_enetaddr[i]) {
|
||||
/* printf("Warning: HW address don't match:\n"); */
|
||||
/* printf("Address in 3Com Window 2 is " */
|
||||
/* "%02X:%02X:%02X:%02X:%02X:%02X\n", */
|
||||
/* hw_addr[0], hw_addr[1], hw_addr[2], */
|
||||
/* hw_addr[3], hw_addr[4], hw_addr[5]); */
|
||||
/* printf("Address used by U-Boot is " */
|
||||
/* "%02X:%02X:%02X:%02X:%02X:%02X\n", */
|
||||
/* bis->bi_enetaddr[0], bis->bi_enetaddr[1], */
|
||||
/* bis->bi_enetaddr[2], bis->bi_enetaddr[3], */
|
||||
/* bis->bi_enetaddr[4], bis->bi_enetaddr[5]); */
|
||||
/* goto Done; */
|
||||
char buffer[256];
|
||||
|
||||
if (bis->bi_enetaddr[0] == 0
|
||||
&& bis->bi_enetaddr[1] == 0
|
||||
&& bis->bi_enetaddr[2] == 0
|
||||
&& bis->bi_enetaddr[3] == 0
|
||||
&& bis->bi_enetaddr[4] == 0
|
||||
&& bis->bi_enetaddr[5] == 0) {
|
||||
|
||||
sprintf (buffer,
|
||||
"%02X:%02X:%02X:%02X:%02X:%02X",
|
||||
hw_addr[0], hw_addr[1], hw_addr[2],
|
||||
hw_addr[3], hw_addr[4], hw_addr[5]);
|
||||
setenv ("ethaddr", buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < ETH_ALEN; i++)
|
||||
dev->enetaddr[i] = hw_addr[i];
|
||||
/* Save the result in the environment */
|
||||
eth_setenv_enetaddr("ethaddr", hw_addr);
|
||||
|
||||
Done:
|
||||
memcpy(dev->enetaddr, hw_addr, 6);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -72,10 +72,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -70,10 +70,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -70,10 +70,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -105,7 +105,7 @@ int checkboard (void)
|
|||
* board_get_enetaddr -- Read the MAC Address in the I2C EEPROM
|
||||
*-----------------------------------------------------------------------------
|
||||
*/
|
||||
void board_get_enetaddr (uchar * enet)
|
||||
static void board_get_enetaddr(uchar *enet)
|
||||
{
|
||||
int i;
|
||||
char buff[256], *cp;
|
||||
|
@ -142,9 +142,19 @@ void board_get_enetaddr (uchar * enet)
|
|||
enet[3] |= 0x80;
|
||||
#endif
|
||||
|
||||
printf ("MAC address = %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
enet[0], enet[1], enet[2], enet[3], enet[4], enet[5]);
|
||||
printf("MAC address = %pM\n", enet);
|
||||
}
|
||||
|
||||
int misc_init_r(void)
|
||||
{
|
||||
uchar enetaddr[6];
|
||||
|
||||
if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
|
||||
board_get_enetaddr(enetaddr);
|
||||
eth_putenv_enetaddr("ethaddr", enetaddr);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void rpxclassic_init (void)
|
||||
|
|
|
@ -74,10 +74,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -74,10 +74,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -74,10 +74,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -76,10 +76,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -43,7 +43,7 @@ SECTIONS
|
|||
|
||||
. = ALIGN (4);
|
||||
.rodata : {
|
||||
*(.rodata)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
. = ALIGN (4);
|
||||
.data : {
|
||||
|
|
|
@ -45,7 +45,7 @@ SECTIONS
|
|||
|
||||
. = ALIGN (4);
|
||||
.rodata : {
|
||||
*(.rodata)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
|
||||
. = ALIGN (4);
|
||||
|
|
|
@ -45,7 +45,7 @@ SECTIONS
|
|||
|
||||
. = ALIGN (4);
|
||||
.rodata : {
|
||||
*(.rodata)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
|
||||
. = ALIGN (4);
|
||||
|
|
|
@ -36,7 +36,7 @@ SECTIONS
|
|||
|
||||
. = ALIGN (4);
|
||||
.rodata : {
|
||||
*(.rodata)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
|
||||
. = ALIGN (4);
|
||||
|
|
|
@ -57,10 +57,8 @@ SECTIONS
|
|||
*(.fixup)
|
||||
*(.got1)
|
||||
. = ALIGN(16);
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -54,10 +54,8 @@ SECTIONS
|
|||
*(.fixup)
|
||||
*(.got1)
|
||||
. = ALIGN(16);
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -38,7 +38,7 @@ SECTIONS
|
|||
. = ALIGN(4);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
__rodata_end = .;
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ SECTIONS
|
|||
. = ALIGN(4);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
__rodata_end = .;
|
||||
|
||||
|
|
|
@ -34,8 +34,7 @@ SECTIONS
|
|||
*(.text)
|
||||
*(.text.*)
|
||||
*(.gnu.linkonce.t*)
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
*(.gnu.linkonce.r*)
|
||||
}
|
||||
. = ALIGN (4);
|
||||
|
|
|
@ -34,8 +34,7 @@ SECTIONS
|
|||
*(.text)
|
||||
*(.text.*)
|
||||
*(.gnu.linkonce.t*)
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
*(.gnu.linkonce.r*)
|
||||
}
|
||||
. = ALIGN (4);
|
||||
|
|
|
@ -34,8 +34,7 @@ SECTIONS
|
|||
*(.text)
|
||||
*(.text.*)
|
||||
*(.gnu.linkonce.t*)
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
*(.gnu.linkonce.r*)
|
||||
}
|
||||
. = ALIGN (4);
|
||||
|
|
|
@ -69,9 +69,7 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -70,10 +70,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -69,9 +69,7 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -77,10 +77,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -70,10 +70,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -69,9 +69,7 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -76,9 +76,7 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -76,10 +76,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -73,10 +73,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -69,9 +69,7 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -71,9 +71,7 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -76,10 +76,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -71,9 +71,7 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -76,10 +76,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -80,10 +80,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -69,9 +69,7 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -75,9 +75,7 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -70,10 +70,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -76,10 +76,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -70,10 +70,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -76,10 +76,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -76,10 +76,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -79,10 +79,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -43,7 +43,7 @@ SECTIONS
|
|||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
|
|
|
@ -36,7 +36,7 @@ SECTIONS
|
|||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
|
|
|
@ -33,7 +33,7 @@ SECTIONS
|
|||
cpu/arm926ejs/start.o (.text)
|
||||
*(.text)
|
||||
}
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
. = ALIGN(4);
|
||||
|
|
|
@ -37,7 +37,7 @@ SECTIONS
|
|||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
|
|
|
@ -37,7 +37,7 @@ SECTIONS
|
|||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
|
|
|
@ -36,8 +36,7 @@ SECTIONS
|
|||
_etext = .;
|
||||
|
||||
.rodata : {
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
|
||||
. = ALIGN(8);
|
||||
|
|
|
@ -36,8 +36,7 @@ SECTIONS
|
|||
_etext = .;
|
||||
|
||||
.rodata : {
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
|
||||
. = ALIGN(8);
|
||||
|
|
|
@ -78,10 +78,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -73,10 +73,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -36,7 +36,7 @@ SECTIONS
|
|||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
|
|
|
@ -36,7 +36,7 @@ SECTIONS
|
|||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
|
|
|
@ -36,7 +36,7 @@ SECTIONS
|
|||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
|
|
|
@ -55,10 +55,8 @@ SECTIONS
|
|||
*(.fixup)
|
||||
*(.got1)
|
||||
. = ALIGN(16);
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -66,14 +66,13 @@ int i2c_read (unsigned char chip, unsigned int addr, int alen,
|
|||
* Internal structure: see struct definition
|
||||
*/
|
||||
|
||||
void load_sernum_ethaddr (void)
|
||||
void misc_init_r(void)
|
||||
{
|
||||
struct manufacturer_data data;
|
||||
char ethaddr[18];
|
||||
char serial [9];
|
||||
unsigned short chksum;
|
||||
unsigned char *p;
|
||||
unsigned short i, is, id;
|
||||
unsigned short i;
|
||||
|
||||
#if !defined(CONFIG_HARD_I2C) && !defined(CONFIG_SOFT_I2C)
|
||||
#error you must define some I2C support (CONFIG_HARD_I2C or CONFIG_SOFT_I2C)
|
||||
|
@ -97,17 +96,6 @@ void load_sernum_ethaddr (void)
|
|||
return;
|
||||
}
|
||||
|
||||
/* copy MAC address */
|
||||
is = 0;
|
||||
id = 0;
|
||||
for (i = 0; i < 6; i++) {
|
||||
sprintf (ðaddr[id], "%02x", data.macadr[is++]);
|
||||
id += 2;
|
||||
if (is < 6)
|
||||
ethaddr[id++] = ':';
|
||||
}
|
||||
ethaddr[id] = '\0'; /* just to be sure */
|
||||
|
||||
/* copy serial number */
|
||||
sprintf (serial, "%d", data.serial_number);
|
||||
|
||||
|
@ -117,6 +105,6 @@ void load_sernum_ethaddr (void)
|
|||
}
|
||||
|
||||
if (getenv("ethaddr") == NULL) {
|
||||
setenv ("ethaddr", ethaddr);
|
||||
eth_setenv_enetaddr("ethaddr", data.macadr);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ SECTIONS
|
|||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
|
|
|
@ -72,8 +72,7 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -61,10 +61,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -36,7 +36,7 @@ SECTIONS
|
|||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
|
|
|
@ -85,10 +85,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -36,7 +36,7 @@ SECTIONS
|
|||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
|
|
|
@ -86,10 +86,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -86,10 +86,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -37,7 +37,7 @@ SECTIONS
|
|||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
|
|
|
@ -36,7 +36,7 @@ SECTIONS
|
|||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
|
|
|
@ -80,10 +80,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -34,7 +34,7 @@ SECTIONS
|
|||
*(.text)
|
||||
}
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
. = ALIGN(4);
|
||||
|
|
|
@ -34,7 +34,7 @@ SECTIONS
|
|||
*(.text)
|
||||
}
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
. = ALIGN(4);
|
||||
|
|
|
@ -34,7 +34,7 @@ SECTIONS
|
|||
*(.text)
|
||||
}
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
. = ALIGN(4);
|
||||
|
|
|
@ -34,7 +34,7 @@ SECTIONS
|
|||
*(.text)
|
||||
}
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
. = ALIGN(4);
|
||||
|
|
|
@ -38,7 +38,7 @@ SECTIONS
|
|||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
|
|
|
@ -36,7 +36,7 @@ SECTIONS
|
|||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
|
|
32
board/digsy_mtc/Makefile
Normal file
32
board/digsy_mtc/Makefile
Normal file
|
@ -0,0 +1,32 @@
|
|||
|
||||
#
|
||||
# Author: Grzegorz Bernacki, Semihalf, gjb@semihalf.com
|
||||
#
|
||||
|
||||
include $(TOPDIR)/config.mk
|
||||
|
||||
LIB = $(obj)lib$(BOARD).a
|
||||
|
||||
COBJS := $(BOARD).o
|
||||
|
||||
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
|
||||
OBJS := $(addprefix $(obj),$(COBJS))
|
||||
SOBJS := $(addprefix $(obj),$(SOBJS))
|
||||
|
||||
$(LIB): $(obj).depend $(OBJS)
|
||||
$(AR) $(ARFLAGS) $@ $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -f $(SOBJS) $(OBJS)
|
||||
|
||||
distclean: clean
|
||||
rm -f $(LIB) core *.bak .depend
|
||||
|
||||
#########################################################################
|
||||
|
||||
# defines $(obj).depend target
|
||||
include $(SRCTREE)/rules.mk
|
||||
|
||||
sinclude $(obj).depend
|
||||
|
||||
#########################################################################
|
24
board/digsy_mtc/config.mk
Normal file
24
board/digsy_mtc/config.mk
Normal file
|
@ -0,0 +1,24 @@
|
|||
#
|
||||
# Author: Grzegorz Bernacki, Semihalf, gjb@semihalf.com
|
||||
#
|
||||
|
||||
#
|
||||
# digsyMTC board:
|
||||
#
|
||||
# Valid values for TEXT_BASE are:
|
||||
#
|
||||
# 0xFFF00000 boot high (standard configuration)
|
||||
# 0xFE000000 boot low
|
||||
# 0x00100000 boot from RAM (for testing only)
|
||||
#
|
||||
|
||||
sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
|
||||
|
||||
ifndef TEXT_BASE
|
||||
## Standard: boot high
|
||||
TEXT_BASE = 0xFFF00000
|
||||
## For testing: boot from RAM
|
||||
# TEXT_BASE = 0x00100000
|
||||
endif
|
||||
|
||||
PLATFORM_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) -I$(TOPDIR)/board
|
307
board/digsy_mtc/digsy_mtc.c
Normal file
307
board/digsy_mtc/digsy_mtc.c
Normal file
|
@ -0,0 +1,307 @@
|
|||
/*
|
||||
* (C) Copyright 2003
|
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
*
|
||||
* (C) Copyright 2004
|
||||
* Mark Jonas, Freescale Semiconductor, mark.jonas@motorola.com.
|
||||
*
|
||||
* (C) Copyright 2005-2009
|
||||
* Modified for InterControl digsyMTC MPC5200 board by
|
||||
* Frank Bodammer, GCD Hard- & Software GmbH,
|
||||
* frank.bodammer@gcd-solutions.de
|
||||
*
|
||||
* (C) Copyright 2009
|
||||
* Grzegorz Bernacki, Semihalf, gjb@semihalf.com
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <mpc5xxx.h>
|
||||
#include <net.h>
|
||||
#include <pci.h>
|
||||
#include <asm/processor.h>
|
||||
#include <asm/io.h>
|
||||
#include "eeprom.h"
|
||||
#include "is42s16800a-7t.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
extern int usb_cpu_init(void);
|
||||
|
||||
#ifndef CONFIG_SYS_RAMBOOT
|
||||
static void sdram_start(int hi_addr)
|
||||
{
|
||||
long hi_addr_bit = hi_addr ? 0x01000000 : 0;
|
||||
long control = SDRAM_CONTROL | hi_addr_bit;
|
||||
|
||||
/* unlock mode register */
|
||||
out_be32((void *)MPC5XXX_SDRAM_CTRL, control | 0x80000000);
|
||||
|
||||
/* precharge all banks */
|
||||
out_be32((void *)MPC5XXX_SDRAM_CTRL, control | 0x80000002);
|
||||
|
||||
/* auto refresh */
|
||||
out_be32((void *)MPC5XXX_SDRAM_CTRL, control | 0x80000004);
|
||||
|
||||
/* set mode register */
|
||||
out_be32((void *)MPC5XXX_SDRAM_MODE, SDRAM_MODE);
|
||||
|
||||
/* normal operation */
|
||||
out_be32((void *)MPC5XXX_SDRAM_CTRL, control);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ATTENTION: Although partially referenced initdram does NOT make real use
|
||||
* use of CONFIG_SYS_SDRAM_BASE. The code does not work if
|
||||
* CONFIG_SYS_SDRAM_BASE is something else than 0x00000000.
|
||||
*/
|
||||
|
||||
phys_size_t initdram(int board_type)
|
||||
{
|
||||
ulong dramsize = 0;
|
||||
ulong dramsize2 = 0;
|
||||
uint svr, pvr;
|
||||
#ifndef CONFIG_SYS_RAMBOOT
|
||||
ulong test1, test2;
|
||||
|
||||
/* setup SDRAM chip selects */
|
||||
out_be32((void *)MPC5XXX_SDRAM_CS0CFG, 0x0000001C); /* 512MB at 0x0 */
|
||||
out_be32((void *)MPC5XXX_SDRAM_CS1CFG, 0x80000000); /* disabled */
|
||||
|
||||
/* setup config registers */
|
||||
out_be32((void *)MPC5XXX_SDRAM_CONFIG1, SDRAM_CONFIG1);
|
||||
out_be32((void *)MPC5XXX_SDRAM_CONFIG2, SDRAM_CONFIG2);
|
||||
|
||||
/* find RAM size using SDRAM CS0 only */
|
||||
sdram_start(0);
|
||||
test1 = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, 0x08000000);
|
||||
sdram_start(1);
|
||||
test2 = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, 0x08000000);
|
||||
if (test1 > test2) {
|
||||
sdram_start(0);
|
||||
dramsize = test1;
|
||||
} else {
|
||||
dramsize = test2;
|
||||
}
|
||||
|
||||
/* memory smaller than 1MB is impossible */
|
||||
if (dramsize < (1 << 20))
|
||||
dramsize = 0;
|
||||
|
||||
/* set SDRAM CS0 size according to the amount of RAM found */
|
||||
if (dramsize > 0) {
|
||||
out_be32((void *)MPC5XXX_SDRAM_CS0CFG,
|
||||
(0x13 + __builtin_ffs(dramsize >> 20) - 1));
|
||||
} else {
|
||||
out_be32((void *)MPC5XXX_SDRAM_CS0CFG, 0); /* disabled */
|
||||
}
|
||||
|
||||
/* let SDRAM CS1 start right after CS0 */
|
||||
out_be32((void *)MPC5XXX_SDRAM_CS1CFG, dramsize + 0x0000001C);
|
||||
|
||||
/* find RAM size using SDRAM CS1 only */
|
||||
test1 = get_ram_size((long *)(CONFIG_SYS_SDRAM_BASE + dramsize),
|
||||
0x08000000);
|
||||
dramsize2 = test1;
|
||||
|
||||
/* memory smaller than 1MB is impossible */
|
||||
if (dramsize2 < (1 << 20))
|
||||
dramsize2 = 0;
|
||||
|
||||
/* set SDRAM CS1 size according to the amount of RAM found */
|
||||
if (dramsize2 > 0) {
|
||||
out_be32((void *)MPC5XXX_SDRAM_CS1CFG, (dramsize |
|
||||
(0x13 + __builtin_ffs(dramsize2 >> 20) - 1)));
|
||||
} else {
|
||||
out_be32((void *)MPC5XXX_SDRAM_CS1CFG, dramsize); /* disabled */
|
||||
}
|
||||
|
||||
#else /* CONFIG_SYS_RAMBOOT */
|
||||
|
||||
/* retrieve size of memory connected to SDRAM CS0 */
|
||||
dramsize = in_be32((void *)MPC5XXX_SDRAM_CS0CFG) & 0xFF;
|
||||
if (dramsize >= 0x13)
|
||||
dramsize = (1 << (dramsize - 0x13)) << 20;
|
||||
else
|
||||
dramsize = 0;
|
||||
|
||||
/* retrieve size of memory connected to SDRAM CS1 */
|
||||
dramsize2 = in_be32((void *)MPC5XXX_SDRAM_CS1CFG) & 0xFF;
|
||||
if (dramsize2 >= 0x13)
|
||||
dramsize2 = (1 << (dramsize2 - 0x13)) << 20;
|
||||
else
|
||||
dramsize2 = 0;
|
||||
|
||||
#endif /* CONFIG_SYS_RAMBOOT */
|
||||
|
||||
/*
|
||||
* On MPC5200B we need to set the special configuration delay in the
|
||||
* DDR controller. Please refer to Freescale's AN3221 "MPC5200B SDRAM
|
||||
* Initialization and Configuration", 3.3.1 SDelay--MBAR + 0x0190:
|
||||
*
|
||||
* "The SDelay should be written to a value of 0x00000004. It is
|
||||
* required to account for changes caused by normal wafer processing
|
||||
* parameters."
|
||||
*/
|
||||
svr = get_svr();
|
||||
pvr = get_pvr();
|
||||
if ((SVR_MJREV(svr) >= 2) &&
|
||||
(PVR_MAJ(pvr) == 1) && (PVR_MIN(pvr) == 4))
|
||||
out_be32((void *)MPC5XXX_SDRAM_SDELAY, 0x04);
|
||||
|
||||
return dramsize + dramsize2;
|
||||
}
|
||||
|
||||
int checkboard(void)
|
||||
{
|
||||
char *s = getenv("serial#");
|
||||
|
||||
puts ("Board: InterControl digsyMTC");
|
||||
if (s != NULL) {
|
||||
puts(", ");
|
||||
puts(s);
|
||||
}
|
||||
putc('\n');
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_early_init_r(void)
|
||||
{
|
||||
/*
|
||||
* Now, when we are in RAM, enable flash write access for detection
|
||||
* process. Note that CS_BOOT cannot be cleared when executing in
|
||||
* flash.
|
||||
*/
|
||||
/* disable CS_BOOT */
|
||||
clrbits_be32((void *)MPC5XXX_ADDECR, (1 << 25));
|
||||
/* enable CS1 */
|
||||
setbits_be32((void *)MPC5XXX_ADDECR, (1 << 17));
|
||||
/* enable CS0 */
|
||||
setbits_be32((void *)MPC5XXX_ADDECR, (1 << 16));
|
||||
|
||||
#if defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT)
|
||||
/* Low level USB init, required for proper kernel operation */
|
||||
usb_cpu_init();
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
|
||||
void board_get_enetaddr (uchar * enet)
|
||||
{
|
||||
ushort read = 0;
|
||||
ushort addr_of_eth_addr = 0;
|
||||
ushort len_sys = 0;
|
||||
ushort len_sys_cfg = 0;
|
||||
|
||||
/* check identification word */
|
||||
eeprom_read(EEPROM_ADDR, EEPROM_ADDR_IDENT, (uchar *)&read, 2);
|
||||
if (read != EEPROM_IDENT)
|
||||
return;
|
||||
|
||||
/* calculate offset of config area */
|
||||
eeprom_read(EEPROM_ADDR, EEPROM_ADDR_LEN_SYS, (uchar *)&len_sys, 2);
|
||||
eeprom_read(EEPROM_ADDR, EEPROM_ADDR_LEN_SYSCFG,
|
||||
(uchar *)&len_sys_cfg, 2);
|
||||
addr_of_eth_addr = (len_sys + len_sys_cfg + EEPROM_ADDR_ETHADDR) << 1;
|
||||
if (addr_of_eth_addr >= EEPROM_LEN)
|
||||
return;
|
||||
|
||||
eeprom_read(EEPROM_ADDR, addr_of_eth_addr, enet, 6);
|
||||
}
|
||||
|
||||
int misc_init_r(void)
|
||||
{
|
||||
uchar enetaddr[6];
|
||||
|
||||
if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
|
||||
board_get_enetaddr(enetaddr);
|
||||
eth_setenv_enetaddr("ethaddr", enetaddr);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
static struct pci_controller hose;
|
||||
|
||||
extern void pci_mpc5xxx_init(struct pci_controller *);
|
||||
|
||||
void pci_init_board(void)
|
||||
{
|
||||
pci_mpc5xxx_init(&hose);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CMD_IDE
|
||||
|
||||
#ifdef CONFIG_IDE_RESET
|
||||
|
||||
void init_ide_reset(void)
|
||||
{
|
||||
debug ("init_ide_reset\n");
|
||||
|
||||
/* set gpio output value to 1 */
|
||||
setbits_be32((void *)MPC5XXX_WU_GPIO_DATA_O, (1 << 25));
|
||||
/* open drain output */
|
||||
setbits_be32((void *)MPC5XXX_WU_GPIO_ODE, (1 << 25));
|
||||
/* direction output */
|
||||
setbits_be32((void *)MPC5XXX_WU_GPIO_DIR, (1 << 25));
|
||||
/* enable gpio */
|
||||
setbits_be32((void *)MPC5XXX_WU_GPIO_ENABLE, (1 << 25));
|
||||
|
||||
}
|
||||
|
||||
void ide_set_reset(int idereset)
|
||||
{
|
||||
debug ("ide_reset(%d)\n", idereset);
|
||||
|
||||
/* set gpio output value to 0 */
|
||||
clrbits_be32((void *)MPC5XXX_WU_GPIO_DATA_O, (1 << 25));
|
||||
/* open drain output */
|
||||
setbits_be32((void *)MPC5XXX_WU_GPIO_ODE, (1 << 25));
|
||||
/* direction output */
|
||||
setbits_be32((void *)MPC5XXX_WU_GPIO_DIR, (1 << 25));
|
||||
/* enable gpio */
|
||||
setbits_be32((void *)MPC5XXX_WU_GPIO_ENABLE, (1 << 25));
|
||||
|
||||
udelay(10000);
|
||||
|
||||
/* set gpio output value to 1 */
|
||||
setbits_be32((void *)MPC5XXX_WU_GPIO_DATA_O, (1 << 25));
|
||||
/* open drain output */
|
||||
setbits_be32((void *)MPC5XXX_WU_GPIO_ODE, (1 << 25));
|
||||
/* direction output */
|
||||
setbits_be32((void *)MPC5XXX_WU_GPIO_DIR, (1 << 25));
|
||||
/* enable gpio */
|
||||
setbits_be32((void *)MPC5XXX_WU_GPIO_ENABLE, (1 << 25));
|
||||
}
|
||||
#endif /* CONFIG_IDE_RESET */
|
||||
|
||||
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
|
||||
void ft_board_setup(void *blob, bd_t *bd)
|
||||
{
|
||||
ft_cpu_setup(blob, bd);
|
||||
}
|
||||
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
|
||||
|
||||
#endif /* CONFIG_CMD_IDE */
|
||||
|
32
board/digsy_mtc/eeprom.h
Normal file
32
board/digsy_mtc/eeprom.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* (C) Copyright 2009 Semihalf.
|
||||
* Written by: Grzegorz Bernacki <gjb@semihalf.com>
|
||||
*
|
||||
* 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 anty 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
|
||||
*
|
||||
*/
|
||||
#ifndef CMD_EEPROM_H
|
||||
#define CMD_EEPROM_H
|
||||
|
||||
#define EEPROM_ADDR CONFIG_SYS_I2C_EEPROM_ADDR
|
||||
#define EEPROM_LEN 1024 /* eeprom length */
|
||||
#define EEPROM_IDENT 2408 /* identification word */
|
||||
#define EEPROM_ADDR_IDENT 0 /* identification word offset */
|
||||
#define EEPROM_ADDR_LEN_SYS 2 /* system area lenght offset */
|
||||
#define EEPROM_ADDR_LEN_SYSCFG 4 /* system config area length offset */
|
||||
#define EEPROM_ADDR_ETHADDR 23 /* ethernet addres offset */
|
||||
|
||||
#endif
|
28
board/digsy_mtc/is42s16800a-7t.h
Normal file
28
board/digsy_mtc/is42s16800a-7t.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* (C) Copyright 2004-2009
|
||||
* Mark Jonas, Freescale Semiconductor, mark.jonas@motorola.com.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#define SDRAM_MODE 0x00CD0000
|
||||
#define SDRAM_CONTROL 0x505F0000
|
||||
#define SDRAM_CONFIG1 0xD2322900
|
||||
#define SDRAM_CONFIG2 0x8AD70000
|
||||
|
|
@ -36,7 +36,7 @@ SECTIONS
|
|||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
|
|
|
@ -31,7 +31,7 @@ SECTIONS
|
|||
.text : { *(.text); }
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) *(.rodata.str1.1) *(.rodata.str1.32) }
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
|
||||
_i386boot_text_size = SIZEOF(.text) + SIZEOF(.rodata);
|
||||
|
||||
|
|
|
@ -34,8 +34,7 @@ SECTIONS
|
|||
_etext = .;
|
||||
|
||||
.rodata : {
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
|
||||
. = ALIGN(8);
|
||||
|
|
|
@ -70,10 +70,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -70,10 +70,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -63,10 +63,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -62,10 +62,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -36,7 +36,7 @@ SECTIONS
|
|||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
|
||||
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data) }
|
||||
|
|
|
@ -57,9 +57,7 @@ SECTIONS
|
|||
*(.fixup)
|
||||
*(.got1)
|
||||
. = ALIGN(16);
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -85,10 +85,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -57,11 +57,7 @@ SECTIONS
|
|||
.plt : { *(.plt) }
|
||||
.text :
|
||||
{
|
||||
/* WARNING - the following is hand-optimized to fit within */
|
||||
/* the sector layout of our flash chips! XXX FIXME XXX */
|
||||
|
||||
cpu/ppc4xx/start.o (.text)
|
||||
cpu/ppc4xx/traps.o (.text)
|
||||
|
||||
*(.text)
|
||||
*(.fixup)
|
||||
|
@ -71,10 +67,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -93,7 +93,7 @@ int N_AU_IMAGES = (sizeof(au_image) / sizeof(au_image[0]));
|
|||
int board_revision(void)
|
||||
{
|
||||
unsigned long cntrl0Reg;
|
||||
volatile unsigned long value;
|
||||
unsigned long value;
|
||||
|
||||
/*
|
||||
* Get version of APC405 board from GPIO's
|
||||
|
|
|
@ -57,22 +57,7 @@ SECTIONS
|
|||
.plt : { *(.plt) }
|
||||
.text :
|
||||
{
|
||||
/* WARNING - the following is hand-optimized to fit within */
|
||||
/* the sector layout of our flash chips! XXX FIXME XXX */
|
||||
|
||||
cpu/ppc4xx/start.o (.text)
|
||||
cpu/ppc4xx/traps.o (.text)
|
||||
cpu/ppc4xx/interrupts.o (.text)
|
||||
cpu/ppc4xx/4xx_uart.o (.text)
|
||||
cpu/ppc4xx/cpu_init.o (.text)
|
||||
cpu/ppc4xx/speed.o (.text)
|
||||
common/dlmalloc.o (.text)
|
||||
lib_generic/crc32.o (.text)
|
||||
lib_ppc/extable.o (.text)
|
||||
lib_generic/zlib.o (.text)
|
||||
|
||||
/* . = env_offset;*/
|
||||
/* common/env_embedded.o(.text)*/
|
||||
|
||||
*(.text)
|
||||
*(.fixup)
|
||||
|
@ -82,10 +67,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <common.h>
|
||||
#include "ar405.h"
|
||||
#include <asm/processor.h>
|
||||
#include <asm/io.h>
|
||||
#include <command.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
@ -137,18 +138,14 @@ int board_early_init_f (void)
|
|||
mtdcr (uicvcr, 0x00000001); /* set vect base=0,INT0 highest priority */
|
||||
mtdcr (uicsr, 0xFFFFFFFF); /* clear all ints */
|
||||
|
||||
*(ushort *) 0xf03000ec = 0x0fff; /* enable all interrupts in fpga */
|
||||
out_be16((void *)0xf03000ec, 0x0fff); /* enable interrupts in fpga */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Check Board Identity:
|
||||
*/
|
||||
|
||||
int checkboard (void)
|
||||
{
|
||||
int index;
|
||||
|
@ -192,14 +189,15 @@ int checkboard (void)
|
|||
|
||||
|
||||
#if 1 /* test-only: some internal test routines... */
|
||||
#define DIGEN ((void *)0xf03000b4) /* u8 */
|
||||
#define DIGOUT ((void *)0xf03000b0) /* u16 */
|
||||
#define DIGIN ((void *)0xf03000a0) /* u16 */
|
||||
|
||||
/*
|
||||
* Some test routines
|
||||
*/
|
||||
int do_digtest(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||
{
|
||||
volatile uchar *digen = (volatile uchar *)0xf03000b4;
|
||||
volatile ushort *digout = (volatile ushort *)0xf03000b0;
|
||||
volatile ushort *digin = (volatile ushort *)0xf03000a0;
|
||||
int i;
|
||||
int k;
|
||||
int start;
|
||||
|
@ -216,7 +214,7 @@ int do_digtest(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
|||
/*
|
||||
* Enable digital outputs
|
||||
*/
|
||||
*digen = 0x08;
|
||||
out_8(DIGEN, 0x08);
|
||||
|
||||
printf("\nStarting digital In-/Out Test from I/O %d to %d (Cntrl-C to abort)...\n",
|
||||
start, end);
|
||||
|
@ -226,12 +224,13 @@ int do_digtest(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
|||
*/
|
||||
for (;;) {
|
||||
for (i=start; i<=end; i++) {
|
||||
*digout = 0x0001 << i;
|
||||
out_be16(DIGOUT, 0x0001 << i);
|
||||
for (k=0; k<200; k++)
|
||||
udelay(1000);
|
||||
|
||||
if (*digin != (0x0001 << i)) {
|
||||
printf("ERROR: OUT=0x%04X, IN=0x%04X\n", 0x0001 << i, *digin);
|
||||
if (in_be16(DIGIN) != (0x0001 << i)) {
|
||||
printf("ERROR: OUT=0x%04X, IN=0x%04X\n",
|
||||
0x0001 << i, in_be16(DIGIN));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -255,13 +254,13 @@ U_BOOT_CMD(
|
|||
#define ERROR_DELTA 256
|
||||
|
||||
struct io {
|
||||
volatile short val;
|
||||
short val;
|
||||
short dummy;
|
||||
};
|
||||
|
||||
int do_anatest(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||
{
|
||||
volatile short val;
|
||||
short val;
|
||||
int i;
|
||||
int volt;
|
||||
struct io *out;
|
||||
|
@ -274,9 +273,9 @@ int do_anatest(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
|||
|
||||
volt = 0;
|
||||
printf("Setting Channel %d to %dV...\n", i, volt);
|
||||
out[i].val = (volt * 0x7fff) / 10;
|
||||
out_be16((void *)&(out[i].val), (volt * 0x7fff) / 10);
|
||||
udelay(10000);
|
||||
val = in[i*2].val;
|
||||
val = in_be16((void *)&(in[i*2].val));
|
||||
printf("-> InChannel %d: 0x%04x=%dV\n", i*2, val, (val * 4000) / 0x7fff);
|
||||
if ((val < ((volt * 0x7fff) / 40) - ERROR_DELTA) ||
|
||||
(val > ((volt * 0x7fff) / 40) + ERROR_DELTA)) {
|
||||
|
@ -284,7 +283,7 @@ int do_anatest(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
|||
((volt * 0x7fff) / 40) + ERROR_DELTA);
|
||||
return -1;
|
||||
}
|
||||
val = in[i*2+1].val;
|
||||
val = in_be16((void *)&(in[i*2+1].val));
|
||||
printf("-> InChannel %d: 0x%04x=%dV\n", i*2+1, val, (val * 4000) / 0x7fff);
|
||||
if ((val < ((volt * 0x7fff) / 40) - ERROR_DELTA) ||
|
||||
(val > ((volt * 0x7fff) / 40) + ERROR_DELTA)) {
|
||||
|
@ -295,9 +294,9 @@ int do_anatest(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
|||
|
||||
volt = 5;
|
||||
printf("Setting Channel %d to %dV...\n", i, volt);
|
||||
out[i].val = (volt * 0x7fff) / 10;
|
||||
out_be16((void *)&(out[i].val), (volt * 0x7fff) / 10);
|
||||
udelay(10000);
|
||||
val = in[i*2].val;
|
||||
val = in_be16((void *)&(in[i*2].val));
|
||||
printf("-> InChannel %d: 0x%04x=%dV\n", i*2, val, (val * 4000) / 0x7fff);
|
||||
if ((val < ((volt * 0x7fff) / 40) - ERROR_DELTA) ||
|
||||
(val > ((volt * 0x7fff) / 40) + ERROR_DELTA)) {
|
||||
|
@ -305,7 +304,7 @@ int do_anatest(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
|||
((volt * 0x7fff) / 40) + ERROR_DELTA);
|
||||
return -1;
|
||||
}
|
||||
val = in[i*2+1].val;
|
||||
val = in_be16((void *)&(in[i*2+1].val));
|
||||
printf("-> InChannel %d: 0x%04x=%dV\n", i*2+1, val, (val * 4000) / 0x7fff);
|
||||
if ((val < ((volt * 0x7fff) / 40) - ERROR_DELTA) ||
|
||||
(val > ((volt * 0x7fff) / 40) + ERROR_DELTA)) {
|
||||
|
@ -316,9 +315,9 @@ int do_anatest(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
|||
|
||||
volt = 10;
|
||||
printf("Setting Channel %d to %dV...\n", i, volt);
|
||||
out[i].val = (volt * 0x7fff) / 10;
|
||||
out_be16((void *)&(out[i].val), (volt * 0x7fff) / 10);
|
||||
udelay(10000);
|
||||
val = in[i*2].val;
|
||||
val = in_be16((void *)&(in[i*2].val));
|
||||
printf("-> InChannel %d: 0x%04x=%dV\n", i*2, val, (val * 4000) / 0x7fff);
|
||||
if ((val < ((volt * 0x7fff) / 40) - ERROR_DELTA) ||
|
||||
(val > ((volt * 0x7fff) / 40) + ERROR_DELTA)) {
|
||||
|
@ -326,7 +325,7 @@ int do_anatest(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
|||
((volt * 0x7fff) / 40) + ERROR_DELTA);
|
||||
return -1;
|
||||
}
|
||||
val = in[i*2+1].val;
|
||||
val = in_be16((void *)&(in[i*2+1].val));
|
||||
printf("-> InChannel %d: 0x%04x=%dV\n", i*2+1, val, (val * 4000) / 0x7fff);
|
||||
if ((val < ((volt * 0x7fff) / 40) - ERROR_DELTA) ||
|
||||
(val > ((volt * 0x7fff) / 40) + ERROR_DELTA)) {
|
||||
|
@ -350,28 +349,27 @@ int counter = 0;
|
|||
|
||||
void cyclicInt(void *ptr)
|
||||
{
|
||||
*(ushort *)0xf03000e8 = 0x0800; /* ack int */
|
||||
out_be16((void *)0xf03000e8, 0x0800); /* ack int */
|
||||
counter++;
|
||||
}
|
||||
|
||||
|
||||
int do_inctest(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||
{
|
||||
volatile uchar *digout = (volatile uchar *)0xf03000b4;
|
||||
volatile ulong *incin;
|
||||
ulong *incin;
|
||||
int i;
|
||||
|
||||
incin = (volatile ulong *)0xf0300040;
|
||||
incin = (ulong *)0xf0300040;
|
||||
|
||||
/*
|
||||
* Clear inc counter
|
||||
*/
|
||||
incin[0] = 0;
|
||||
incin[1] = 0;
|
||||
incin[2] = 0;
|
||||
incin[3] = 0;
|
||||
out_be32((void *)&incin[0], 0);
|
||||
out_be32((void *)&incin[1], 0);
|
||||
out_be32((void *)&incin[2], 0);
|
||||
out_be32((void *)&incin[3], 0);
|
||||
|
||||
incin = (volatile ulong *)0xf0300050;
|
||||
incin = (ulong *)0xf0300050;
|
||||
|
||||
/*
|
||||
* Inc a little
|
||||
|
@ -379,28 +377,29 @@ int do_inctest(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
|||
for (i=0; i<10000; i++) {
|
||||
switch (i & 0x03) {
|
||||
case 0:
|
||||
*digout = 0x02;
|
||||
out_8(DIGEN, 0x02);
|
||||
break;
|
||||
case 1:
|
||||
*digout = 0x03;
|
||||
out_8(DIGEN, 0x03);
|
||||
break;
|
||||
case 2:
|
||||
*digout = 0x01;
|
||||
out_8(DIGEN, 0x01);
|
||||
break;
|
||||
case 3:
|
||||
*digout = 0x00;
|
||||
out_8(DIGEN, 0x00);
|
||||
break;
|
||||
}
|
||||
udelay(10);
|
||||
}
|
||||
|
||||
printf("Inc 0 = %ld\n", incin[0]);
|
||||
printf("Inc 1 = %ld\n", incin[1]);
|
||||
printf("Inc 2 = %ld\n", incin[2]);
|
||||
printf("Inc 3 = %ld\n", incin[3]);
|
||||
printf("Inc 0 = %d\n", in_be32((void *)&incin[0]));
|
||||
printf("Inc 1 = %d\n", in_be32((void *)&incin[1]));
|
||||
printf("Inc 2 = %d\n", in_be32((void *)&incin[2]));
|
||||
printf("Inc 3 = %d\n", in_be32((void *)&incin[3]));
|
||||
|
||||
*(ushort *)0xf03000e0 = 0x0c80-1; /* set counter */
|
||||
*(ushort *)0xf03000ec |= 0x0800; /* enable int */
|
||||
out_be16((void *)0xf03000e0, 0x0c80-1); /* set counter */
|
||||
out_be16((void *)0xf03000ec,
|
||||
in_be16((void *)0xf03000ec) | 0x0800); /* enable int */
|
||||
irq_install_handler (30, (interrupt_handler_t *) cyclicInt, NULL);
|
||||
printf("counter=%d\n", counter);
|
||||
|
||||
|
|
|
@ -57,35 +57,7 @@ SECTIONS
|
|||
.plt : { *(.plt) }
|
||||
.text :
|
||||
{
|
||||
/* WARNING - the following is hand-optimized to fit within */
|
||||
/* the sector layout of our flash chips! XXX FIXME XXX */
|
||||
|
||||
cpu/ppc4xx/start.o (.text)
|
||||
cpu/ppc4xx/traps.o (.text)
|
||||
cpu/ppc4xx/interrupts.o (.text)
|
||||
cpu/ppc4xx/4xx_uart.o (.text)
|
||||
cpu/ppc4xx/cpu_init.o (.text)
|
||||
cpu/ppc4xx/speed.o (.text)
|
||||
drivers/net/4xx_enet.o (.text)
|
||||
common/dlmalloc.o (.text)
|
||||
lib_generic/crc32.o (.text)
|
||||
lib_ppc/extable.o (.text)
|
||||
lib_ppc/board.o (.text)
|
||||
lib_generic/zlib.o (.text)
|
||||
|
||||
common/cmd_boot.o (.text)
|
||||
common/cmd_bootm.o (.text)
|
||||
common/cmd_flash.o (.text)
|
||||
common/cmd_mem.o (.text)
|
||||
common/cmd_nvedit.o (.text)
|
||||
common/console.o (.text)
|
||||
common/main.o (.text)
|
||||
|
||||
/*
|
||||
. = DEFINED(env_offset) ? env_offset : .;
|
||||
common/env_embedded.o (.ppcenv)
|
||||
*/
|
||||
common/env_embedded.o (.text)
|
||||
|
||||
*(.text)
|
||||
*(.fixup)
|
||||
|
@ -95,10 +67,8 @@ SECTIONS
|
|||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue