projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
at91sam9261ek.c: fix minor coding style issue.
[oweals/u-boot.git]
/
board
/
pm520
/
pm520.c
diff --git
a/board/pm520/pm520.c
b/board/pm520/pm520.c
index 14c3f1d442f0c1d0e06df7ae08053d84dc4016bb..9da1041733f07cbfed9f1c126b4be39c5dc601dd 100644
(file)
--- a/
board/pm520/pm520.c
+++ b/
board/pm520/pm520.c
@@
-27,6
+27,7
@@
#include <common.h>
#include <mpc5xxx.h>
#include <pci.h>
#include <common.h>
#include <mpc5xxx.h>
#include <pci.h>
+#include <netdev.h>
#if defined(CONFIG_MPC5200_DDR)
#include "mt46v16m16-75.h"
#if defined(CONFIG_MPC5200_DDR)
#include "mt46v16m16-75.h"
@@
-36,7
+37,7
@@
DECLARE_GLOBAL_DATA_PTR;
DECLARE_GLOBAL_DATA_PTR;
-#ifndef C
FG
_RAMBOOT
+#ifndef C
ONFIG_SYS
_RAMBOOT
static void sdram_start (int hi_addr)
{
long hi_addr_bit = hi_addr ? 0x01000000 : 0;
static void sdram_start (int hi_addr)
{
long hi_addr_bit = hi_addr ? 0x01000000 : 0;
@@
-79,16
+80,16
@@
static void sdram_start (int hi_addr)
/*
* ATTENTION: Although partially referenced initdram does NOT make real use
/*
* ATTENTION: Although partially referenced initdram does NOT make real use
- * use of C
FG_SDRAM_BASE. The code does not work if CFG
_SDRAM_BASE
+ * use of C
ONFIG_SYS_SDRAM_BASE. The code does not work if CONFIG_SYS
_SDRAM_BASE
* is something else than 0x00000000.
*/
#if defined(CONFIG_MPC5200)
* is something else than 0x00000000.
*/
#if defined(CONFIG_MPC5200)
-
long in
t initdram (int board_type)
+
phys_size_
t initdram (int board_type)
{
ulong dramsize = 0;
ulong dramsize2 = 0;
{
ulong dramsize = 0;
ulong dramsize2 = 0;
-#ifndef C
FG
_RAMBOOT
+#ifndef C
ONFIG_SYS
_RAMBOOT
ulong test1, test2;
/* setup SDRAM chip selects */
ulong test1, test2;
/* setup SDRAM chip selects */
@@
-109,9
+110,9
@@
long int initdram (int board_type)
/* find RAM size using SDRAM CS0 only */
sdram_start(0);
/* find RAM size using SDRAM CS0 only */
sdram_start(0);
- test1 = get_ram_size((long *)C
FG
_SDRAM_BASE, 0x80000000);
+ test1 = get_ram_size((long *)C
ONFIG_SYS
_SDRAM_BASE, 0x80000000);
sdram_start(1);
sdram_start(1);
- test2 = get_ram_size((long *)C
FG
_SDRAM_BASE, 0x80000000);
+ test2 = get_ram_size((long *)C
ONFIG_SYS
_SDRAM_BASE, 0x80000000);
if (test1 > test2) {
sdram_start(0);
dramsize = test1;
if (test1 > test2) {
sdram_start(0);
dramsize = test1;
@@
-137,10
+138,10
@@
long int initdram (int board_type)
/* find RAM size using SDRAM CS1 only */
if (!dramsize)
sdram_start(0);
/* find RAM size using SDRAM CS1 only */
if (!dramsize)
sdram_start(0);
- test2 = test1 = get_ram_size((long *)(C
FG
_SDRAM_BASE + dramsize), 0x80000000);
+ test2 = test1 = get_ram_size((long *)(C
ONFIG_SYS
_SDRAM_BASE + dramsize), 0x80000000);
if (!dramsize) {
sdram_start(1);
if (!dramsize) {
sdram_start(1);
- test2 = get_ram_size((long *)(C
FG
_SDRAM_BASE + dramsize), 0x80000000);
+ test2 = get_ram_size((long *)(C
ONFIG_SYS
_SDRAM_BASE + dramsize), 0x80000000);
}
if (test1 > test2) {
sdram_start(0);
}
if (test1 > test2) {
sdram_start(0);
@@
-162,7
+163,7
@@
long int initdram (int board_type)
*(vu_long *)MPC5XXX_SDRAM_CS1CFG = dramsize; /* disabled */
}
*(vu_long *)MPC5XXX_SDRAM_CS1CFG = dramsize; /* disabled */
}
-#else /* C
FG
_RAMBOOT */
+#else /* C
ONFIG_SYS
_RAMBOOT */
/* retrieve size of memory connected to SDRAM CS0 */
dramsize = *(vu_long *)MPC5XXX_SDRAM_CS0CFG & 0xFF;
/* retrieve size of memory connected to SDRAM CS0 */
dramsize = *(vu_long *)MPC5XXX_SDRAM_CS0CFG & 0xFF;
@@
-180,17
+181,17
@@
long int initdram (int board_type)
dramsize2 = 0;
}
dramsize2 = 0;
}
-#endif /* C
FG
_RAMBOOT */
+#endif /* C
ONFIG_SYS
_RAMBOOT */
return dramsize + dramsize2;
}
#elif defined(CONFIG_MGT5100)
return dramsize + dramsize2;
}
#elif defined(CONFIG_MGT5100)
-
long in
t initdram (int board_type)
+
phys_size_
t initdram (int board_type)
{
ulong dramsize = 0;
{
ulong dramsize = 0;
-#ifndef C
FG
_RAMBOOT
+#ifndef C
ONFIG_SYS
_RAMBOOT
ulong test1, test2;
/* setup and enable SDRAM chip selects */
ulong test1, test2;
/* setup and enable SDRAM chip selects */
@@
-209,9
+210,9
@@
long int initdram (int board_type)
/* find RAM size */
sdram_start(0);
/* find RAM size */
sdram_start(0);
- test1 = get_ram_size((ulong *)C
FG
_SDRAM_BASE, 0x80000000);
+ test1 = get_ram_size((ulong *)C
ONFIG_SYS
_SDRAM_BASE, 0x80000000);
sdram_start(1);
sdram_start(1);
- test2 = get_ram_size((ulong *)C
FG
_SDRAM_BASE, 0x80000000);
+ test2 = get_ram_size((ulong *)C
ONFIG_SYS
_SDRAM_BASE, 0x80000000);
if (test1 > test2) {
sdram_start(0);
dramsize = test1;
if (test1 > test2) {
sdram_start(0);
dramsize = test1;
@@
-222,12
+223,12
@@
long int initdram (int board_type)
/* set SDRAM end address according to size */
*(vu_long *)MPC5XXX_SDRAM_STOP = ((dramsize - 1) >> 15);
/* set SDRAM end address according to size */
*(vu_long *)MPC5XXX_SDRAM_STOP = ((dramsize - 1) >> 15);
-#else /* C
FG
_RAMBOOT */
+#else /* C
ONFIG_SYS
_RAMBOOT */
/* Retrieve amount of SDRAM available */
dramsize = ((*(vu_long *)MPC5XXX_SDRAM_STOP + 1) << 15);
/* Retrieve amount of SDRAM available */
dramsize = ((*(vu_long *)MPC5XXX_SDRAM_STOP + 1) << 15);
-#endif /* C
FG
_RAMBOOT */
+#endif /* C
ONFIG_SYS
_RAMBOOT */
return dramsize;
}
return dramsize;
}
@@
-315,9
+316,14
@@
void ide_set_reset (int idereset)
#endif
#if defined(CONFIG_CMD_DOC)
#endif
#if defined(CONFIG_CMD_DOC)
-extern void doc_probe (ulong physadr);
void doc_init (void)
{
void doc_init (void)
{
- doc_probe (C
FG
_DOC_BASE);
+ doc_probe (C
ONFIG_SYS
_DOC_BASE);
}
#endif
}
#endif
+
+int board_eth_init(bd_t *bis)
+{
+ cpu_eth_init(bis); /* Built in FEC comes first */
+ return pci_eth_init(bis);
+}