All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Zapolskiy <vz@mleia.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RESEND][PATCH 19/24] sh: add common dram_init() function for all boards
Date: Mon, 28 Nov 2016 00:15:31 +0200	[thread overview]
Message-ID: <20161127221536.9577-20-vz@mleia.com> (raw)
In-Reply-To: <20161127221536.9577-1-vz@mleia.com>

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>
---
 arch/sh/lib/Makefile                       |  2 +-
 arch/sh/lib/board.c                        | 17 +++++++++++++++++
 board/alphaproject/ap_sh4a_4a/ap_sh4a_4a.c | 11 -----------
 board/espt/espt.c                          | 10 ----------
 board/mpr2/mpr2.c                          | 10 ----------
 board/ms7720se/ms7720se.c                  | 10 ----------
 board/ms7722se/ms7722se.c                  | 10 ----------
 board/ms7750se/ms7750se.c                  | 10 ----------
 board/renesas/MigoR/migo_r.c               | 10 ----------
 board/renesas/ap325rxa/ap325rxa.c          | 10 ----------
 board/renesas/ecovec/ecovec.c              | 10 ----------
 board/renesas/r0p7734/r0p7734.c            | 11 -----------
 board/renesas/r2dplus/r2dplus.c            | 10 ----------
 board/renesas/r7780mp/r7780mp.c            | 10 ----------
 board/renesas/rsk7203/rsk7203.c            | 10 ----------
 board/renesas/rsk7264/rsk7264.c            | 10 ----------
 board/renesas/rsk7269/rsk7269.c            | 10 ----------
 board/renesas/sh7752evb/sh7752evb.c        | 11 -----------
 board/renesas/sh7753evb/sh7753evb.c        | 11 -----------
 board/renesas/sh7757lcr/sh7757lcr.c        | 25 -------------------------
 board/renesas/sh7763rdp/sh7763rdp.c        | 10 ----------
 board/renesas/sh7785lcr/sh7785lcr.c        | 10 ----------
 board/shmin/shmin.c                        | 10 ----------
 23 files changed, 18 insertions(+), 230 deletions(-)
 create mode 100644 arch/sh/lib/board.c

diff --git a/arch/sh/lib/Makefile b/arch/sh/lib/Makefile
index c5cf89f..7be20b1 100644
--- a/arch/sh/lib/Makefile
+++ b/arch/sh/lib/Makefile
@@ -5,7 +5,7 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-
+obj-y	+= board.o
 obj-$(CONFIG_CMD_BOOTM) += bootm.o
 ifeq ($(CONFIG_CPU_SH2),y)
 obj-y	+= time_sh2.o
diff --git a/arch/sh/lib/board.c b/arch/sh/lib/board.c
new file mode 100644
index 0000000..7cb594e
--- /dev/null
+++ b/arch/sh/lib/board.c
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2016 Vladimir Zapolskiy <vz@mleia.com>
+ *
+ * SPDX-License-Identifier:     GPL-2.0+
+ */
+
+#include <common.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int dram_init(void)
+{
+	gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
+				    CONFIG_SYS_SDRAM_SIZE);
+
+	return 0;
+}
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();
-- 
2.10.2

  parent reply	other threads:[~2016-11-27 22:15 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-27 22:15 [U-Boot] [RESEND][PATCH 00/24] sh: add generic board support and fixes Vladimir Zapolskiy
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 01/24] sh4: cache: correct dcache flush to invalidate with write-back Vladimir Zapolskiy
2016-12-03 23:48   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 02/24] sh4: cache: correct flush_cache() to writeback and invalidate Vladimir Zapolskiy
2016-11-30  0:33   ` Simon Glass
2016-12-03 23:48   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 03/24] sh3: remove unused cache.c file from being built Vladimir Zapolskiy
2016-11-30  0:33   ` Simon Glass
2016-12-03 23:49   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 04/24] sh: cache use jump_to_P2() and back_to_P1() from asm/system.h Vladimir Zapolskiy
2016-11-30  0:33   ` Simon Glass
2016-12-03 23:52   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 05/24] sh: cache: don't modify CCR from P1 area Vladimir Zapolskiy
2016-12-03 23:52   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 06/24] sh4: cache: move exported cache manipulation functions into cache.c Vladimir Zapolskiy
2016-11-30  0:33   ` Simon Glass
2016-12-03 23:53   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 07/24] pci: sh7751: fix up PCI I/O space address Vladimir Zapolskiy
2016-12-03 23:53   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 08/24] pci: sh7751: map PCI memory space into SDRAM Vladimir Zapolskiy
2016-12-03 23:56   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 09/24] sh4: remove __io config options from r2dplus and r7780mp boards Vladimir Zapolskiy
2016-11-30  0:33   ` Simon Glass
2016-12-04  0:35   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 10/24] r2dplus: use P1 area space for text base and PCI system memory Vladimir Zapolskiy
2016-11-30  0:33   ` Simon Glass
2016-12-04  0:36   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 11/24] r2dplus: select rtl8139 driver in defconfig Vladimir Zapolskiy
2016-11-30  0:33   ` Simon Glass
2016-12-04  0:36   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 12/24] common: sh: add necessary define bits to board_f Vladimir Zapolskiy
2016-12-04  0:37   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 13/24] sh4: use single u-boot linker script for all boards Vladimir Zapolskiy
2016-11-30  0:33   ` Simon Glass
2016-12-04  0:37   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 14/24] sh: place board lowlevel_init code in the beginning of .text Vladimir Zapolskiy
2016-11-30  0:33   ` Simon Glass
2016-12-04  0:38   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 15/24] sh: define entry point and reloc_dst inside a linker script Vladimir Zapolskiy
2016-11-30  0:33   ` Simon Glass
2016-12-04  0:39   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 16/24] sh: add MEMORY command to a shared " Vladimir Zapolskiy
2016-11-30  0:33   ` Simon Glass
2016-12-04  0:39   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 17/24] sh: remove undefined DEBUG preprocessor token from board config files Vladimir Zapolskiy
2016-11-30  0:33   ` Simon Glass
2016-12-04  0:40   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 18/24] sh: define CONFIG_DISPLAY_BOARDINFO to print board information Vladimir Zapolskiy
2016-11-30  0:33   ` Simon Glass
2016-12-04  0:41   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` Vladimir Zapolskiy [this message]
2016-11-30  0:34   ` [U-Boot] [RESEND][PATCH 19/24] sh: add common dram_init() function for all boards Simon Glass
2016-12-04  0:41   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 20/24] sh: add shared relocate_code() function and call board_init_r() Vladimir Zapolskiy
2016-11-30  0:34   ` Simon Glass
2016-12-04  0:42   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 21/24] sh4: fix start.S by calling board_init_f() after first code relocation Vladimir Zapolskiy
2016-11-30  0:34   ` Simon Glass
2016-12-04  0:42   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 22/24] sh: share the correct version of start.S among all cpus Vladimir Zapolskiy
2016-11-30  0:34   ` Simon Glass
2016-12-04  0:43   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 23/24] sh: generate position independent code for all platforms Vladimir Zapolskiy
2016-12-04  0:43   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
2016-11-27 22:15 ` [U-Boot] [RESEND][PATCH 24/24] r2dplus: fixup CONFIG_SYS_TEXT_BASE to account arch/sh changes Vladimir Zapolskiy
2016-12-04  0:44   ` [U-Boot] [U-Boot, RESEND, " Tom Rini
     [not found] ` <20161128154357.GD2546@bill-the-cat>
2016-11-29  0:58   ` [U-Boot] [RESEND][PATCH 00/24] sh: add generic board support and fixes Vladimir Zapolskiy
2016-11-29  1:22     ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161127221536.9577-20-vz@mleia.com \
    --to=vz@mleia.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.