summaryrefslogtreecommitdiff
path: root/board/esd/dasa_sim
diff options
context:
space:
mode:
Diffstat (limited to 'board/esd/dasa_sim')
-rw-r--r--board/esd/dasa_sim/cmd_dasa_sim.c9
-rw-r--r--board/esd/dasa_sim/config.mk11
-rw-r--r--board/esd/dasa_sim/dasa_sim.c12
-rw-r--r--board/esd/dasa_sim/eeprom.c18
-rw-r--r--board/esd/dasa_sim/u-boot.lds30
5 files changed, 24 insertions, 56 deletions
diff --git a/board/esd/dasa_sim/cmd_dasa_sim.c b/board/esd/dasa_sim/cmd_dasa_sim.c
index f405be9..0310c47 100644
--- a/board/esd/dasa_sim/cmd_dasa_sim.c
+++ b/board/esd/dasa_sim/cmd_dasa_sim.c
@@ -25,6 +25,7 @@
#include <common.h>
#include <command.h>
#include <pci.h>
+#include <asm/io.h>
#define OK 0
#define ERROR (-1)
@@ -136,8 +137,8 @@ static void updatePci9054 (void)
/*
* Set EEPROM write-protect register to 0
*/
- out32 (pci9054_iobase + 0x0c,
- in32 (pci9054_iobase + 0x0c) & 0xffff00ff);
+ out_be32 ((void *)(pci9054_iobase + 0x0c),
+ in_be32 ((void *)(pci9054_iobase + 0x0c)) & 0xffff00ff);
/* Long Serial EEPROM Load Registers... */
val = PciEepromWriteLongVPD (0x00, 0x905410b5);
@@ -190,8 +191,8 @@ static void clearPci9054 (void)
/*
* Set EEPROM write-protect register to 0
*/
- out32 (pci9054_iobase + 0x0c,
- in32 (pci9054_iobase + 0x0c) & 0xffff00ff);
+ out_be32 ((void *)(pci9054_iobase + 0x0c),
+ in_be32 ((void *)(pci9054_iobase + 0x0c)) & 0xffff00ff);
/* Long Serial EEPROM Load Registers... */
val = PciEepromWriteLongVPD (0x00, 0xffffffff);
diff --git a/board/esd/dasa_sim/config.mk b/board/esd/dasa_sim/config.mk
index 747f29f..5d612d2 100644
--- a/board/esd/dasa_sim/config.mk
+++ b/board/esd/dasa_sim/config.mk
@@ -20,14 +20,5 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
+TEXT_BASE = 0xFFFC0000
-#
-# esd ADCIOP boards
-#
-
-# FLASH:
-#TEXT_BASE = 0xFFFE0000
-TEXT_BASE = 0xFFFD0000
-
-# SDRAM:
-#TEXT_BASE = 0x00FE0000
diff --git a/board/esd/dasa_sim/dasa_sim.c b/board/esd/dasa_sim/dasa_sim.c
index 47d6bb3..127374b 100644
--- a/board/esd/dasa_sim/dasa_sim.c
+++ b/board/esd/dasa_sim/dasa_sim.c
@@ -74,7 +74,8 @@ static int fpgaBoot (void)
#ifdef FPGA_DEBUG
printf ("%s\n",
- ((in32 (0x50000084) & 0x00010000) == 0) ? "NOT DONE" : "DONE");
+ ((in_be32 ((void *)0x50000084) & 0x00010000) == 0) ?
+ "NOT DONE" : "DONE");
#endif
/* init fpga by asserting and deasserting PROGRAM* (USER2)... */
@@ -86,7 +87,8 @@ static int fpgaBoot (void)
#ifdef FPGA_DEBUG
printf ("%s\n",
- ((in32 (0x50000084) & 0x00010000) == 0) ? "NOT DONE" : "DONE");
+ ((in_be32 ((void *)0x50000084) & 0x00010000) == 0) ?
+ "NOT DONE" : "DONE");
#endif
/* cs1: disable burst, disable ready */
@@ -109,7 +111,8 @@ static int fpgaBoot (void)
#ifdef FPGA_DEBUG
printf ("%s\n",
- ((in32 (0x50000084) & 0x00010000) == 0) ? "NOT DONE" : "DONE");
+ ((in_be32 ((void *)0x50000084) & 0x00010000) == 0) ?
+ "NOT DONE" : "DONE");
#endif
/* set cs1 to 32 bit data-width, disable burst, enable ready */
@@ -125,7 +128,8 @@ static int fpgaBoot (void)
#ifdef FPGA_DEBUG
printf ("%s\n",
- ((in32 (0x50000084) & 0x00010000) == 0) ? "NOT DONE" : "DONE");
+ ((in_be32 ((void *)0x50000084) & 0x00010000) == 0) ?
+ "NOT DONE" : "DONE");
#endif
/* wait for 30 ms... */
diff --git a/board/esd/dasa_sim/eeprom.c b/board/esd/dasa_sim/eeprom.c
index 1b4c7b3..aa6f52c 100644
--- a/board/esd/dasa_sim/eeprom.c
+++ b/board/esd/dasa_sim/eeprom.c
@@ -24,7 +24,7 @@
#include <common.h>
#include <command.h>
-
+#include <asm/io.h>
#define EEPROM_CAP 0x50000358
#define EEPROM_DATA 0x5000035c
@@ -33,23 +33,23 @@
unsigned int eepromReadLong(int offs)
{
unsigned int value;
- volatile unsigned short ret;
+ unsigned short ret;
int count;
- *(unsigned short *)EEPROM_CAP = offs;
+ out_be16((void *)EEPROM_CAP, offs);
count = 0;
for (;;)
{
count++;
- ret = *(unsigned short *)EEPROM_CAP;
+ ret = in_be16((void *)EEPROM_CAP);
if ((ret & 0x8000) != 0)
break;
}
- value = *(unsigned long *)EEPROM_DATA;
+ value = in_be32((void *)EEPROM_DATA);
return value;
}
@@ -69,18 +69,18 @@ unsigned char eepromReadByte(int offs)
void eepromWriteLong(int offs, unsigned int value)
{
- volatile unsigned short ret;
+ unsigned short ret;
int count;
count = 0;
- *(unsigned long *)EEPROM_DATA = value;
- *(unsigned short *)EEPROM_CAP = 0x8000 + offs;
+ out_be32((void *)EEPROM_DATA, value);
+ out_be16((void *)EEPROM_CAP, 0x8000 + offs);
for (;;)
{
count++;
- ret = *(unsigned short *)EEPROM_CAP;
+ ret = in_be16((void *)EEPROM_CAP);
if ((ret & 0x8000) == 0)
break;
diff --git a/board/esd/dasa_sim/u-boot.lds b/board/esd/dasa_sim/u-boot.lds
index 6acf7b8..77674b5 100644
--- a/board/esd/dasa_sim/u-boot.lds
+++ b/board/esd/dasa_sim/u-boot.lds
@@ -57,33 +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/iop480_uart.o (.text)
- cpu/ppc4xx/cpu_init.o (.text)
- cpu/ppc4xx/speed.o (.text)
- common/dlmalloc.o (.text)
- lib_ppc/extable.o (.text)
- lib_ppc/board.o (.text)
- lib_generic/zlib.o (.text)
- lib_generic/crc32.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)
-
- board/esd/dasa_sim/flash.o (.text)
- common/cmd_nvedit.o (.text)
- board/esd/dasa_sim/cmd_dasa_sim.o (.text)
- net/bootp.o (.text)
. = env_offset;
common/env_embedded.o(.text)
@@ -96,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) }