summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vz@mleia.com>2016-11-28 00:15:31 +0200
committerTom Rini <trini@konsulko.com>2016-12-02 21:32:51 -0500
commitcdbb0cf8ecf30d5dbbfa500e8939a32ef45896c5 (patch)
tree6d01620f6567eaa8b5b5177a3882501752d17552 /board
parent18a40e8470246da3ee4cdef721524140f54cc6c9 (diff)
downloadu-boot-imx-cdbb0cf8ecf30d5dbbfa500e8939a32ef45896c5.zip
u-boot-imx-cdbb0cf8ecf30d5dbbfa500e8939a32ef45896c5.tar.gz
u-boot-imx-cdbb0cf8ecf30d5dbbfa500e8939a32ef45896c5.tar.bz2
sh: add common dram_init() function for all boards
Generic board support assumes a different method of specifying DRAM size on board, also it can be shared among all boards, notably only sh7763rdp board has a custom legacy dram_init(), however the difference is only in printing some additional information, this feature can be removed. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/alphaproject/ap_sh4a_4a/ap_sh4a_4a.c11
-rw-r--r--board/espt/espt.c10
-rw-r--r--board/mpr2/mpr2.c10
-rw-r--r--board/ms7720se/ms7720se.c10
-rw-r--r--board/ms7722se/ms7722se.c10
-rw-r--r--board/ms7750se/ms7750se.c10
-rw-r--r--board/renesas/MigoR/migo_r.c10
-rw-r--r--board/renesas/ap325rxa/ap325rxa.c10
-rw-r--r--board/renesas/ecovec/ecovec.c10
-rw-r--r--board/renesas/r0p7734/r0p7734.c11
-rw-r--r--board/renesas/r2dplus/r2dplus.c10
-rw-r--r--board/renesas/r7780mp/r7780mp.c10
-rw-r--r--board/renesas/rsk7203/rsk7203.c10
-rw-r--r--board/renesas/rsk7264/rsk7264.c10
-rw-r--r--board/renesas/rsk7269/rsk7269.c10
-rw-r--r--board/renesas/sh7752evb/sh7752evb.c11
-rw-r--r--board/renesas/sh7753evb/sh7753evb.c11
-rw-r--r--board/renesas/sh7757lcr/sh7757lcr.c25
-rw-r--r--board/renesas/sh7763rdp/sh7763rdp.c10
-rw-r--r--board/renesas/sh7785lcr/sh7785lcr.c10
-rw-r--r--board/shmin/shmin.c10
21 files changed, 0 insertions, 229 deletions
diff --git a/board/alphaproject/ap_sh4a_4a/ap_sh4a_4a.c b/board/alphaproject/ap_sh4a_4a/ap_sh4a_4a.c
index e65befc..31418a1 100644
--- a/board/alphaproject/ap_sh4a_4a/ap_sh4a_4a.c
+++ b/board/alphaproject/ap_sh4a_4a/ap_sh4a_4a.c
@@ -11,8 +11,6 @@
#include <netdev.h>
#include <i2c.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define MODEMR (0xFFCC0020)
#define MODEMR_MASK (0x6)
#define MODEMR_533MHZ (0x2)
@@ -172,12 +170,3 @@ int board_late_init(void)
return 0;
}
-
-int dram_init(void)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
- printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
-
- return 0;
-}
diff --git a/board/espt/espt.c b/board/espt/espt.c
index ee6e538..9ab71fe 100644
--- a/board/espt/espt.c
+++ b/board/espt/espt.c
@@ -11,8 +11,6 @@
#include <asm/io.h>
#include <asm/processor.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int checkboard(void)
{
puts("BOARD: ESPT-GIGA\n");
@@ -24,14 +22,6 @@ int board_init(void)
return 0;
}
-int dram_init(void)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
- printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
- return 0;
-}
-
void led_set_state(unsigned short value)
{
}
diff --git a/board/mpr2/mpr2.c b/board/mpr2/mpr2.c
index 7449e03..3788a39 100644
--- a/board/mpr2/mpr2.c
+++ b/board/mpr2/mpr2.c
@@ -11,8 +11,6 @@
#include <asm/io.h>
#include <asm/processor.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int checkboard(void)
{
puts("BOARD: MPR2\n");
@@ -138,11 +136,3 @@ int board_init(void)
return 0;
}
-
-int dram_init(void)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
- printf("SDRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
- return 0;
-}
diff --git a/board/ms7720se/ms7720se.c b/board/ms7720se/ms7720se.c
index 534a422..48edcc6 100644
--- a/board/ms7720se/ms7720se.c
+++ b/board/ms7720se/ms7720se.c
@@ -17,8 +17,6 @@
#include <asm/io.h>
#include <asm/processor.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define LED_BASE 0xB0800000
int checkboard(void)
@@ -32,14 +30,6 @@ int board_init(void)
return 0;
}
-int dram_init(void)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
- printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
- return 0;
-}
-
void led_set_state(unsigned short value)
{
outw(value & 0xFF, LED_BASE);
diff --git a/board/ms7722se/ms7722se.c b/board/ms7722se/ms7722se.c
index ee1e99c..869b415 100644
--- a/board/ms7722se/ms7722se.c
+++ b/board/ms7722se/ms7722se.c
@@ -15,8 +15,6 @@
#include <asm/io.h>
#include <asm/processor.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define LED_BASE 0xB0800000
int checkboard(void)
@@ -33,14 +31,6 @@ int board_init(void)
return 0;
}
-int dram_init(void)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
- printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
- return 0;
-}
-
void led_set_state(unsigned short value)
{
writew(value & 0xFF, LED_BASE);
diff --git a/board/ms7750se/ms7750se.c b/board/ms7750se/ms7750se.c
index a7f9346..d252faa 100644
--- a/board/ms7750se/ms7750se.c
+++ b/board/ms7750se/ms7750se.c
@@ -8,8 +8,6 @@
#include <common.h>
#include <asm/processor.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int checkboard(void)
{
puts("BOARD: SH7750/SH7750S/SH7750R Solution Engine\n");
@@ -21,14 +19,6 @@ int board_init(void)
return 0;
}
-int dram_init (void)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
- printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
- return 0;
-}
-
int board_late_init(void)
{
return 0;
diff --git a/board/renesas/MigoR/migo_r.c b/board/renesas/MigoR/migo_r.c
index fa2bf78..6409a73 100644
--- a/board/renesas/MigoR/migo_r.c
+++ b/board/renesas/MigoR/migo_r.c
@@ -15,8 +15,6 @@
#include <asm/io.h>
#include <asm/processor.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int checkboard(void)
{
puts("BOARD: Renesas MigoR\n");
@@ -28,14 +26,6 @@ int board_init(void)
return 0;
}
-int dram_init (void)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
- printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
- return 0;
-}
-
void led_set_state (unsigned short value)
{
}
diff --git a/board/renesas/ap325rxa/ap325rxa.c b/board/renesas/ap325rxa/ap325rxa.c
index 518ad7b..218d479 100644
--- a/board/renesas/ap325rxa/ap325rxa.c
+++ b/board/renesas/ap325rxa/ap325rxa.c
@@ -10,8 +10,6 @@
#include <asm/io.h>
#include <asm/processor.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* PRI control register */
#define PRPRICR5 0xFF800048 /* LMB */
#define PRPRICR5_D 0x2a
@@ -130,14 +128,6 @@ int board_init(void)
return 0;
}
-int dram_init(void)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
- printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
- return 0;
-}
-
void led_set_state(unsigned short value)
{
}
diff --git a/board/renesas/ecovec/ecovec.c b/board/renesas/ecovec/ecovec.c
index d862d99..28b557a 100644
--- a/board/renesas/ecovec/ecovec.c
+++ b/board/renesas/ecovec/ecovec.c
@@ -22,16 +22,6 @@ int checkboard(void)
return 0;
}
-int dram_init(void)
-{
- DECLARE_GLOBAL_DATA_PTR;
-
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
- printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
- return 0;
-}
-
static void debug_led(u8 led)
{
/* PDGR[0-4] is debug LED */
diff --git a/board/renesas/r0p7734/r0p7734.c b/board/renesas/r0p7734/r0p7734.c
index 2e31ba6..360e0a1 100644
--- a/board/renesas/r0p7734/r0p7734.c
+++ b/board/renesas/r0p7734/r0p7734.c
@@ -11,8 +11,6 @@
#include <netdev.h>
#include <i2c.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define MODEMR (0xFFCC0020)
#define MODEMR_MASK (0x6)
#define MODEMR_533MHZ (0x2)
@@ -61,15 +59,6 @@ int board_late_init(void)
return 0;
}
-int dram_init(void)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
- printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
-
- return 0;
-}
-
#ifdef CONFIG_SMC911X
int board_eth_init(bd_t *bis)
{
diff --git a/board/renesas/r2dplus/r2dplus.c b/board/renesas/r2dplus/r2dplus.c
index 249c35f..d6fb4da 100644
--- a/board/renesas/r2dplus/r2dplus.c
+++ b/board/renesas/r2dplus/r2dplus.c
@@ -12,8 +12,6 @@
#include <asm/io.h>
#include <asm/pci.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int checkboard(void)
{
puts("BOARD: Renesas Solutions R2D Plus\n");
@@ -25,14 +23,6 @@ int board_init(void)
return 0;
}
-int dram_init(void)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
- printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
- return 0;
-}
-
int board_late_init(void)
{
return 0;
diff --git a/board/renesas/r7780mp/r7780mp.c b/board/renesas/r7780mp/r7780mp.c
index 783352d..de259f5 100644
--- a/board/renesas/r7780mp/r7780mp.c
+++ b/board/renesas/r7780mp/r7780mp.c
@@ -13,8 +13,6 @@
#include <netdev.h>
#include "r7780mp.h"
-DECLARE_GLOBAL_DATA_PTR;
-
int checkboard(void)
{
#if defined(CONFIG_R7780MP)
@@ -33,14 +31,6 @@ int board_init(void)
return 0;
}
-int dram_init(void)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
- printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
- return 0;
-}
-
void led_set_state(unsigned short value)
{
diff --git a/board/renesas/rsk7203/rsk7203.c b/board/renesas/rsk7203/rsk7203.c
index 8800371..72c562d 100644
--- a/board/renesas/rsk7203/rsk7203.c
+++ b/board/renesas/rsk7203/rsk7203.c
@@ -13,8 +13,6 @@
#include <asm/io.h>
#include <asm/processor.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int checkboard(void)
{
puts("BOARD: Renesas Technology RSK7203\n");
@@ -26,14 +24,6 @@ int board_init(void)
return 0;
}
-int dram_init(void)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
- printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
- return 0;
-}
-
void led_set_state(unsigned short value)
{
}
diff --git a/board/renesas/rsk7264/rsk7264.c b/board/renesas/rsk7264/rsk7264.c
index d938b3a..4ebb27b 100644
--- a/board/renesas/rsk7264/rsk7264.c
+++ b/board/renesas/rsk7264/rsk7264.c
@@ -14,8 +14,6 @@
#include <asm/io.h>
#include <asm/processor.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int checkboard(void)
{
puts("BOARD: Renesas Technology RSK7264\n");
@@ -27,14 +25,6 @@ int board_init(void)
return 0;
}
-int dram_init(void)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
- printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
- return 0;
-}
-
void led_set_state(unsigned short value)
{
}
diff --git a/board/renesas/rsk7269/rsk7269.c b/board/renesas/rsk7269/rsk7269.c
index ae32b6a..0066f9f 100644
--- a/board/renesas/rsk7269/rsk7269.c
+++ b/board/renesas/rsk7269/rsk7269.c
@@ -15,8 +15,6 @@
#include <asm/io.h>
#include <asm/processor.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int checkboard(void)
{
puts("BOARD: Renesas RSK7269\n");
@@ -28,14 +26,6 @@ int board_init(void)
return 0;
}
-int dram_init(void)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
- printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
- return 0;
-}
-
void led_set_state(unsigned short value)
{
}
diff --git a/board/renesas/sh7752evb/sh7752evb.c b/board/renesas/sh7752evb/sh7752evb.c
index 3aad532..525d979 100644
--- a/board/renesas/sh7752evb/sh7752evb.c
+++ b/board/renesas/sh7752evb/sh7752evb.c
@@ -159,17 +159,6 @@ int board_init(void)
return 0;
}
-int dram_init(void)
-{
- DECLARE_GLOBAL_DATA_PTR;
-
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
- printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
-
- return 0;
-}
-
int board_mmc_init(bd_t *bis)
{
struct gpio_regs *gpio = GPIO_BASE;
diff --git a/board/renesas/sh7753evb/sh7753evb.c b/board/renesas/sh7753evb/sh7753evb.c
index 52a1906..3d1eeda 100644
--- a/board/renesas/sh7753evb/sh7753evb.c
+++ b/board/renesas/sh7753evb/sh7753evb.c
@@ -175,17 +175,6 @@ int board_init(void)
return 0;
}
-int dram_init(void)
-{
- DECLARE_GLOBAL_DATA_PTR;
-
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
- printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
-
- return 0;
-}
-
int board_mmc_init(bd_t *bis)
{
struct gpio_regs *gpio = GPIO_BASE;
diff --git a/board/renesas/sh7757lcr/sh7757lcr.c b/board/renesas/sh7757lcr/sh7757lcr.c
index ddcf275..0a04a9d 100644
--- a/board/renesas/sh7757lcr/sh7757lcr.c
+++ b/board/renesas/sh7757lcr/sh7757lcr.c
@@ -224,31 +224,6 @@ int board_init(void)
return 0;
}
-int dram_init(void)
-{
- DECLARE_GLOBAL_DATA_PTR;
-
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
- printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
- printf(" Physical address\n");
- printf(" 0x%08x - 0x%08x : Accessible Space as ECC Area\n",
- SH7757LCR_SDRAM_PHYS_TOP,
- SH7757LCR_SDRAM_PHYS_TOP + SH7757LCR_SDRAM_SIZE - 1);
- printf(" 0x%08x - 0x%08x : No Access Area\n",
- SH7757LCR_SDRAM_PHYS_TOP + SH7757LCR_SDRAM_SIZE,
- SH7757LCR_SDRAM_PHYS_TOP + SH7757LCR_SDRAM_SIZE * 2 - 1);
- printf(" 0x%08x - 0x%08x : Non-ECC Area for DVC/AVC\n",
- SH7757LCR_SDRAM_PHYS_TOP + SH7757LCR_SDRAM_ECC_SETTING * 2,
- SH7757LCR_SDRAM_PHYS_TOP + SH7757LCR_SDRAM_ECC_SETTING * 2 +
- SH7757LCR_SDRAM_DVC_SIZE - 1);
- printf(" 0x%08x - 0x%08x : Non-ECC Area for G200eR2\n",
- SH7757LCR_SDRAM_PHYS_TOP + SH7757LCR_GRA_OFFSET,
- SH7757LCR_SDRAM_PHYS_TOP + SH7757LCR_GRA_OFFSET + 0x00ffffff);
-
- return 0;
-}
-
int board_mmc_init(bd_t *bis)
{
return mmcif_mmc_init();
diff --git a/board/renesas/sh7763rdp/sh7763rdp.c b/board/renesas/sh7763rdp/sh7763rdp.c
index 9658a5e..d83e2f8 100644
--- a/board/renesas/sh7763rdp/sh7763rdp.c
+++ b/board/renesas/sh7763rdp/sh7763rdp.c
@@ -12,8 +12,6 @@
#include <asm/io.h>
#include <asm/processor.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define CPU_CMDREG 0xB1000006
#define PDCR 0xffef0006
#define PECR 0xffef0008
@@ -51,14 +49,6 @@ int board_init(void)
return 0;
}
-int dram_init(void)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
- printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
- return 0;
-}
-
void led_set_state(unsigned short value)
{
}
diff --git a/board/renesas/sh7785lcr/sh7785lcr.c b/board/renesas/sh7785lcr/sh7785lcr.c
index 622e602..a1a0301 100644
--- a/board/renesas/sh7785lcr/sh7785lcr.c
+++ b/board/renesas/sh7785lcr/sh7785lcr.c
@@ -10,8 +10,6 @@
#include <asm/pci.h>
#include <netdev.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int checkboard(void)
{
puts("BOARD: Renesas Technology Corp. R0P7785LC0011RL\n");
@@ -23,14 +21,6 @@ int board_init(void)
return 0;
}
-int dram_init(void)
-{
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
- printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
- return 0;
-}
-
static struct pci_controller hose;
void pci_init_board(void)
{
diff --git a/board/shmin/shmin.c b/board/shmin/shmin.c
index 74d1e39..42bd126 100644
--- a/board/shmin/shmin.c
+++ b/board/shmin/shmin.c
@@ -33,16 +33,6 @@ int board_init(void)
return 0;
}
-int dram_init(void)
-{
- DECLARE_GLOBAL_DATA_PTR;
-
- gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
- printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
- return 0;
-}
-
int board_eth_init(bd_t *bis)
{
return ne2k_register();