Patchwork [U-Boot,2/2] SMDK5250: Enable pmic MAX77686

login
register
mail settings
Submitter Rajeshwari Birje
Date Dec. 10, 2012, 11:55 a.m.
Message ID <1355140548-4533-3-git-send-email-rajeshwari.s@samsung.com>
Download mbox | patch
Permalink /patch/204857/
State Accepted
Delegated to: Minkyu Kang
Headers show

Comments

Rajeshwari Birje - Dec. 10, 2012, 11:55 a.m.
Enabled pmic MAX77686 for SMDK5250.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
---
 board/samsung/smdk5250/smdk5250.c |   15 +++++++++++----
 include/configs/smdk5250.h        |    8 ++++----
 2 files changed, 15 insertions(+), 8 deletions(-)
Simon Glass - Dec. 12, 2012, 2:28 p.m.
Hi Rajeshwari,

On Mon, Dec 10, 2012 at 3:55 AM, Rajeshwari Shinde
<rajeshwari.s@samsung.com> wrote:
> Enabled pmic MAX77686 for SMDK5250.
>
> Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>

With nit below fixed:

Acked-by: Simon Glass <sjg@chromium.org>

> ---
>  board/samsung/smdk5250/smdk5250.c |   15 +++++++++++----
>  include/configs/smdk5250.h        |    8 ++++----
>  2 files changed, 15 insertions(+), 8 deletions(-)
>
> diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c
> index 4c50342..9c926d6 100644
> --- a/board/samsung/smdk5250/smdk5250.c
> +++ b/board/samsung/smdk5250/smdk5250.c
> @@ -30,7 +30,7 @@
>  #include <asm/arch/mmc.h>
>  #include <asm/arch/pinmux.h>
>  #include <asm/arch/sromc.h>
> -#include <pmic.h>
> +#include <power/pmic.h>
>
>  DECLARE_GLOBAL_DATA_PTR;
>
> @@ -65,9 +65,6 @@ static int smc9115_pre_init(void)
>  int board_init(void)
>  {
>         gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL);
> -#if defined(CONFIG_PMIC)
> -       pmic_init();
> -#endif
>  #ifdef CONFIG_EXYNOS_SPI
>         spi_init();
>  #endif
> @@ -87,6 +84,16 @@ int dram_init(void)
>         return 0;
>  }
>
> +#if defined(CONFIG_POWER)
> +int power_init_board(void)
> +{
> +       if (pmic_init(I2C_PMIC))
> +               return -1;
> +       else
> +               return 0;
> +}
> +#endif
> +
>  void dram_init_banksize(void)
>  {
>         gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
> diff --git a/include/configs/smdk5250.h b/include/configs/smdk5250.h
> index e412da8..df00305 100644
> --- a/include/configs/smdk5250.h
> +++ b/include/configs/smdk5250.h
> @@ -65,7 +65,7 @@
>  #define INFORM1_OFFSET                 0x804
>
>  /* Size of malloc() pool */
> -#define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (1 << 20))
> +#define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + (4 << 20))

Unrelated?

>
>  /* select serial console configuration */
>  #define CONFIG_SERIAL3                 /* use SERIAL 3 */
> @@ -209,9 +209,9 @@
>  #define CONFIG_SYS_I2C_SLAVE    0x0
>
>  /* PMIC */
> -#define CONFIG_PMIC
> -#define CONFIG_PMIC_I2C
> -#define CONFIG_PMIC_MAX77686
> +#define CONFIG_POWER
> +#define CONFIG_POWER_I2C
> +#define CONFIG_POWER_MAX77686
>
>  /* SPI */
>  #define CONFIG_ENV_IS_IN_SPI_FLASH
> --
> 1.7.4.4
>

Regards,
Simon

Patch

diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c
index 4c50342..9c926d6 100644
--- a/board/samsung/smdk5250/smdk5250.c
+++ b/board/samsung/smdk5250/smdk5250.c
@@ -30,7 +30,7 @@ 
 #include <asm/arch/mmc.h>
 #include <asm/arch/pinmux.h>
 #include <asm/arch/sromc.h>
-#include <pmic.h>
+#include <power/pmic.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -65,9 +65,6 @@  static int smc9115_pre_init(void)
 int board_init(void)
 {
 	gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL);
-#if defined(CONFIG_PMIC)
-	pmic_init();
-#endif
 #ifdef CONFIG_EXYNOS_SPI
 	spi_init();
 #endif
@@ -87,6 +84,16 @@  int dram_init(void)
 	return 0;
 }
 
+#if defined(CONFIG_POWER)
+int power_init_board(void)
+{
+	if (pmic_init(I2C_PMIC))
+		return -1;
+	else
+		return 0;
+}
+#endif
+
 void dram_init_banksize(void)
 {
 	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
diff --git a/include/configs/smdk5250.h b/include/configs/smdk5250.h
index e412da8..df00305 100644
--- a/include/configs/smdk5250.h
+++ b/include/configs/smdk5250.h
@@ -65,7 +65,7 @@ 
 #define INFORM1_OFFSET			0x804
 
 /* Size of malloc() pool */
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (1 << 20))
+#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (4 << 20))
 
 /* select serial console configuration */
 #define CONFIG_SERIAL3			/* use SERIAL 3 */
@@ -209,9 +209,9 @@ 
 #define CONFIG_SYS_I2C_SLAVE    0x0
 
 /* PMIC */
-#define CONFIG_PMIC
-#define CONFIG_PMIC_I2C
-#define CONFIG_PMIC_MAX77686
+#define CONFIG_POWER
+#define CONFIG_POWER_I2C
+#define CONFIG_POWER_MAX77686
 
 /* SPI */
 #define CONFIG_ENV_IS_IN_SPI_FLASH