Patchwork [U-Boot] arm/km: remove unused code

login
register
mail settings
Submitter Holger Brunck
Date Aug. 9, 2012, 11:37 a.m.
Message ID <1344512267-10358-1-git-send-email-holger.brunck@keymile.com>
Download mbox | patch
Permalink /patch/176062/
State Accepted
Delegated to: Prafulla Wadaskar
Headers show

Comments

Holger Brunck - Aug. 9, 2012, 11:37 a.m.
For some reasons we had an own implementaion of dram_init and
dram_init_banksize. This is not needed anymore, use the standard
kirkwood functions instead.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
---
 board/keymile/km_arm/km_arm.c       |   20 --------------------
 include/configs/km/keymile-common.h |    1 -
 2 files changed, 0 insertions(+), 21 deletions(-)
Prafulla Wadaskar - Aug. 13, 2012, 4:49 a.m.
> -----Original Message-----
> From: Holger Brunck [mailto:holger.brunck@keymile.com]
> Sent: 09 August 2012 17:08
> To: u-boot@lists.denx.de
> Cc: Holger Brunck; Prafulla Wadaskar; Valentin Longchamp; Gerlando
> Falauto
> Subject: [PATCH] arm/km: remove unused code
> 
> For some reasons we had an own implementaion of dram_init and
> dram_init_banksize. This is not needed anymore, use the standard
> kirkwood functions instead.
> 
> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
> cc: Prafulla Wadaskar <prafulla@marvell.com>
> cc: Valentin Longchamp <valentin.longchamp@keymile.com>
> cc: Gerlando Falauto <gerlando.falauto@keymile.com>
> ---
>  board/keymile/km_arm/km_arm.c       |   20 --------------------
>  include/configs/km/keymile-common.h |    1 -
>  2 files changed, 0 insertions(+), 21 deletions(-)
> 
> diff --git a/board/keymile/km_arm/km_arm.c
> b/board/keymile/km_arm/km_arm.c
> index ac14a2f..2068b00 100644
> --- a/board/keymile/km_arm/km_arm.c
> +++ b/board/keymile/km_arm/km_arm.c
> @@ -332,26 +332,6 @@ void board_spi_release_bus(struct spi_slave
> *slave)
>  	kw_gpio_set_value(KM_FLASH_GPIO_PIN, 1);
>  }
> 
> -int dram_init(void)
> -{
> -	/* dram_init must store complete ramsize in gd->ram_size */
> -	/* Fix this */
> -	gd->ram_size = get_ram_size((void *)kw_sdram_bar(0),
> -				kw_sdram_bs(0));
> -	return 0;
> -}
> -
> -void dram_init_banksize(void)
> -{
> -	int i;
> -
> -	for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
> -		gd->bd->bi_dram[i].start = kw_sdram_bar(i);
> -		gd->bd->bi_dram[i].size = get_ram_size((long
> *)kw_sdram_bar(i),
> -						       kw_sdram_bs(i));
> -	}
> -}
> -
>  #if (defined(CONFIG_KM_PIGGY4_88E6061))
> 
>  #define	PHY_LED_SEL_REG		0x18
> diff --git a/include/configs/km/keymile-common.h
> b/include/configs/km/keymile-common.h
> index 7ed9958..9983104 100644
> --- a/include/configs/km/keymile-common.h
> +++ b/include/configs/km/keymile-common.h
> @@ -81,7 +81,6 @@
> 
>  #define CONFIG_LOADS_ECHO
>  #define CONFIG_SYS_LOADS_BAUD_CHANGE
> -#define CONFIG_SYS_BOARD_DRAM_INIT	/* Used board specific dram_init
> */
> 
>  #define CONFIG_I2C_MULTI_BUS
>  #define CONFIG_SYS_MAX_I2C_BUS		1
> --

Acked-By: Prafulla Wadaskar <prafulla@marvell.com>

Will pull this patch soon.

Regards...
Prafulla . . .
Prafulla Wadaskar - Sept. 3, 2012, 8:52 a.m.
> -----Original Message-----
> From: Prafulla Wadaskar
> Sent: 13 August 2012 10:20
> To: 'Holger Brunck'; u-boot@lists.denx.de
> Cc: Valentin Longchamp; Gerlando Falauto
> Subject: RE: [PATCH] arm/km: remove unused code
> 
> 
> 
> > -----Original Message-----
> > From: Holger Brunck [mailto:holger.brunck@keymile.com]
> > Sent: 09 August 2012 17:08
> > To: u-boot@lists.denx.de
> > Cc: Holger Brunck; Prafulla Wadaskar; Valentin Longchamp; Gerlando
> > Falauto
> > Subject: [PATCH] arm/km: remove unused code
> >
> > For some reasons we had an own implementaion of dram_init and
> > dram_init_banksize. This is not needed anymore, use the standard
> > kirkwood functions instead.
> >
> > Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
> > cc: Prafulla Wadaskar <prafulla@marvell.com>
> > cc: Valentin Longchamp <valentin.longchamp@keymile.com>
> > cc: Gerlando Falauto <gerlando.falauto@keymile.com>
> > ---
> >  board/keymile/km_arm/km_arm.c       |   20 --------------------
> >  include/configs/km/keymile-common.h |    1 -
> >  2 files changed, 0 insertions(+), 21 deletions(-)
> >
> > diff --git a/board/keymile/km_arm/km_arm.c
> > b/board/keymile/km_arm/km_arm.c
> > index ac14a2f..2068b00 100644
> > --- a/board/keymile/km_arm/km_arm.c
> > +++ b/board/keymile/km_arm/km_arm.c
> > @@ -332,26 +332,6 @@ void board_spi_release_bus(struct spi_slave
> > *slave)
> >  	kw_gpio_set_value(KM_FLASH_GPIO_PIN, 1);
> >  }
> >
> > -int dram_init(void)
> > -{
> > -	/* dram_init must store complete ramsize in gd->ram_size */
> > -	/* Fix this */
> > -	gd->ram_size = get_ram_size((void *)kw_sdram_bar(0),
> > -				kw_sdram_bs(0));
> > -	return 0;
> > -}
> > -
> > -void dram_init_banksize(void)
> > -{
> > -	int i;
> > -
> > -	for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
> > -		gd->bd->bi_dram[i].start = kw_sdram_bar(i);
> > -		gd->bd->bi_dram[i].size = get_ram_size((long
> > *)kw_sdram_bar(i),
> > -						       kw_sdram_bs(i));
> > -	}
> > -}
> > -
> >  #if (defined(CONFIG_KM_PIGGY4_88E6061))
> >
> >  #define	PHY_LED_SEL_REG		0x18
> > diff --git a/include/configs/km/keymile-common.h
> > b/include/configs/km/keymile-common.h
> > index 7ed9958..9983104 100644
> > --- a/include/configs/km/keymile-common.h
> > +++ b/include/configs/km/keymile-common.h
> > @@ -81,7 +81,6 @@
> >
> >  #define CONFIG_LOADS_ECHO
> >  #define CONFIG_SYS_LOADS_BAUD_CHANGE
> > -#define CONFIG_SYS_BOARD_DRAM_INIT	/* Used board specific dram_init
> > */
> >
> >  #define CONFIG_I2C_MULTI_BUS
> >  #define CONFIG_SYS_MAX_I2C_BUS		1
> > --
> 
> Acked-By: Prafulla Wadaskar <prafulla@marvell.com>
> 
> Will pull this patch soon.

Applied to u-boot-marvell.git master branch

Regards...
Prafulla . . .

Patch

diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c
index ac14a2f..2068b00 100644
--- a/board/keymile/km_arm/km_arm.c
+++ b/board/keymile/km_arm/km_arm.c
@@ -332,26 +332,6 @@  void board_spi_release_bus(struct spi_slave *slave)
 	kw_gpio_set_value(KM_FLASH_GPIO_PIN, 1);
 }
 
-int dram_init(void)
-{
-	/* dram_init must store complete ramsize in gd->ram_size */
-	/* Fix this */
-	gd->ram_size = get_ram_size((void *)kw_sdram_bar(0),
-				kw_sdram_bs(0));
-	return 0;
-}
-
-void dram_init_banksize(void)
-{
-	int i;
-
-	for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
-		gd->bd->bi_dram[i].start = kw_sdram_bar(i);
-		gd->bd->bi_dram[i].size = get_ram_size((long *)kw_sdram_bar(i),
-						       kw_sdram_bs(i));
-	}
-}
-
 #if (defined(CONFIG_KM_PIGGY4_88E6061))
 
 #define	PHY_LED_SEL_REG		0x18
diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h
index 7ed9958..9983104 100644
--- a/include/configs/km/keymile-common.h
+++ b/include/configs/km/keymile-common.h
@@ -81,7 +81,6 @@ 
 
 #define CONFIG_LOADS_ECHO
 #define CONFIG_SYS_LOADS_BAUD_CHANGE
-#define CONFIG_SYS_BOARD_DRAM_INIT	/* Used board specific dram_init */
 
 #define CONFIG_I2C_MULTI_BUS
 #define CONFIG_SYS_MAX_I2C_BUS		1