[U-Boot] [PATCH V2 05/12] board:samsung:common: remove unused max77686 init function

Piotr Wilczek p.wilczek at samsung.com
Fri Feb 14 10:48:36 CET 2014


Hi Rajeshwari,

> -----Original Message-----
> From: Rajeshwari Birje [mailto:rajeshwari.birje at gmail.com]
> Sent: Friday, February 14, 2014 6:32 AM
> To: Piotr Wilczek
> Cc: u-boot at lists.denx.de; Jaehoon Chung; Kyungmin Park; Rajeshwari S
> Shinde
> Subject: Re: [U-Boot] [PATCH V2 05/12] board:samsung:common: remove
> unused max77686 init function
> 
> Hi Piotr,
> 
> On Thu, Feb 13, 2014 at 7:40 PM, Piotr Wilczek <p.wilczek at samsung.com>
> wrote:
> > This patch removes currently unused max77686_init function.
> > Despite being not used, it's implementation is board specific.
> >
> MAX77686 is required for 5250, but missed it somehow when adding 5420
> support and making a common config file for both. It is my mistake will
> correct the same You can refer:
> "[U-Boot] [PATCH V5 0/6] SMDK5420: Add S2MPS11 pmic support to
> SMDK5420" by Leela Krishna Amudala It adds a generic way for PMIC
> support.
> http://lists.denx.de/pipermail/u-boot/2014-January/171113.html
> 
MAX77686 is also used at Trats2 so max77686_init must be either generic
based on DT or moved to the board file.

Best regards,
Piotr

> Regards,
> Rajeshwari
> 
> > Signed-off-by: Piotr Wilczek <p.wilczek at samsung.com>
> > Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
> > Cc: Rajeshwari S Shinde <rajeshwari.s at samsung.com>
> > Cc: Minkyu Kang <mk7.kang at samsung.com>
> > ---
> > Changes for v2:
> >  - new patch
> >
> >  board/samsung/common/board.c |  120
> > ------------------------------------------
> >  1 file changed, 120 deletions(-)
> >
> > diff --git a/board/samsung/common/board.c
> > b/board/samsung/common/board.c index cd873bc..3ac8005 100644
> > --- a/board/samsung/common/board.c
> > +++ b/board/samsung/common/board.c
> > @@ -22,7 +22,6 @@
> >  #include <asm/arch/power.h>
> >  #include <power/pmic.h>
> >  #include <asm/arch/sromc.h>
> > -#include <power/max77686_pmic.h>
> >
> >  DECLARE_GLOBAL_DATA_PTR;
> >
> > @@ -160,133 +159,14 @@ static int board_init_cros_ec_devices(const
> > void *blob)  }  #endif
> >
> > -#if defined(CONFIG_POWER)
> > -#ifdef CONFIG_POWER_MAX77686
> > -static int pmic_reg_update(struct pmic *p, int reg, uint regval) -{
> > -       u32 val;
> > -       int ret = 0;
> > -
> > -       ret = pmic_reg_read(p, reg, &val);
> > -       if (ret) {
> > -               debug("%s: PMIC %d register read failed\n", __func__,
> reg);
> > -               return -1;
> > -       }
> > -       val |= regval;
> > -       ret = pmic_reg_write(p, reg, val);
> > -       if (ret) {
> > -               debug("%s: PMIC %d register write failed\n",
> __func__, reg);
> > -               return -1;
> > -       }
> > -       return 0;
> > -}
> > -
> > -static int max77686_init(void)
> > -{
> > -       struct pmic *p;
> > -
> > -       if (pmic_init(I2C_PMIC))
> > -               return -1;
> > -
> > -       p = pmic_get("MAX77686_PMIC");
> > -       if (!p)
> > -               return -ENODEV;
> > -
> > -       if (pmic_probe(p))
> > -               return -1;
> > -
> > -       if (pmic_reg_update(p, MAX77686_REG_PMIC_32KHZ,
> MAX77686_32KHCP_EN))
> > -               return -1;
> > -
> > -       if (pmic_reg_update(p, MAX77686_REG_PMIC_BBAT,
> > -                           MAX77686_BBCHOSTEN |
> MAX77686_BBCVS_3_5V))
> > -               return -1;
> > -
> > -       /* VDD_MIF */
> > -       if (pmic_reg_write(p, MAX77686_REG_PMIC_BUCK1OUT,
> > -                          MAX77686_BUCK1OUT_1V)) {
> > -               debug("%s: PMIC %d register write failed\n",
> __func__,
> > -                     MAX77686_REG_PMIC_BUCK1OUT);
> > -               return -1;
> > -       }
> > -
> > -       if (pmic_reg_update(p, MAX77686_REG_PMIC_BUCK1CRTL,
> > -                           MAX77686_BUCK1CTRL_EN))
> > -               return -1;
> > -
> > -       /* VDD_ARM */
> > -       if (pmic_reg_write(p, MAX77686_REG_PMIC_BUCK2DVS1,
> > -                          MAX77686_BUCK2DVS1_1_3V)) {
> > -               debug("%s: PMIC %d register write failed\n",
> __func__,
> > -                     MAX77686_REG_PMIC_BUCK2DVS1);
> > -               return -1;
> > -       }
> > -
> > -       if (pmic_reg_update(p, MAX77686_REG_PMIC_BUCK2CTRL1,
> > -                           MAX77686_BUCK2CTRL_ON))
> > -               return -1;
> > -
> > -       /* VDD_INT */
> > -       if (pmic_reg_write(p, MAX77686_REG_PMIC_BUCK3DVS1,
> > -                          MAX77686_BUCK3DVS1_1_0125V)) {
> > -               debug("%s: PMIC %d register write failed\n",
> __func__,
> > -                     MAX77686_REG_PMIC_BUCK3DVS1);
> > -               return -1;
> > -       }
> > -
> > -       if (pmic_reg_update(p, MAX77686_REG_PMIC_BUCK3CTRL,
> > -                           MAX77686_BUCK3CTRL_ON))
> > -               return -1;
> > -
> > -       /* VDD_G3D */
> > -       if (pmic_reg_write(p, MAX77686_REG_PMIC_BUCK4DVS1,
> > -                          MAX77686_BUCK4DVS1_1_2V)) {
> > -               debug("%s: PMIC %d register write failed\n",
> __func__,
> > -                     MAX77686_REG_PMIC_BUCK4DVS1);
> > -               return -1;
> > -       }
> > -
> > -       if (pmic_reg_update(p, MAX77686_REG_PMIC_BUCK4CTRL1,
> > -                           MAX77686_BUCK3CTRL_ON))
> > -               return -1;
> > -
> > -       /* VDD_LDO2 */
> > -       if (pmic_reg_update(p, MAX77686_REG_PMIC_LDO2CTRL1,
> > -                           MAX77686_LD02CTRL1_1_5V | EN_LDO))
> > -               return -1;
> > -
> > -       /* VDD_LDO3 */
> > -       if (pmic_reg_update(p, MAX77686_REG_PMIC_LDO3CTRL1,
> > -                           MAX77686_LD03CTRL1_1_8V | EN_LDO))
> > -               return -1;
> > -
> > -       /* VDD_LDO5 */
> > -       if (pmic_reg_update(p, MAX77686_REG_PMIC_LDO5CTRL1,
> > -                           MAX77686_LD05CTRL1_1_8V | EN_LDO))
> > -               return -1;
> > -
> > -       /* VDD_LDO10 */
> > -       if (pmic_reg_update(p, MAX77686_REG_PMIC_LDO10CTRL1,
> > -                           MAX77686_LD10CTRL1_1_8V | EN_LDO))
> > -               return -1;
> > -
> > -       return 0;
> > -}
> > -#endif
> > -
> >  int power_init_board(void)
> >  {
> >         int ret = 0;
> >
> >         set_ps_hold_ctrl();
> >
> > -#ifdef CONFIG_POWER_MAX77686
> > -       ret = max77686_init();
> > -#endif
> > -
> >         return ret;
> >  }
> > -#endif
> >
> >  #ifdef CONFIG_OF_CONTROL
> >  static int decode_sromc(const void *blob, struct fdt_sromc *config)
> > --
> > 1.7.9.5
> >
> > _______________________________________________
> > U-Boot mailing list
> > U-Boot at lists.denx.de
> > http://lists.denx.de/mailman/listinfo/u-boot
> 
> 
> 
> --
> Regards,
> Rajeshwari Shinde




More information about the U-Boot mailing list