Re: [U-Boot] [PATCH] arm: exynos: Squash bogus warnings in pinmux

2014-03-11 Thread Rajeshwari Birje
Hi

Acked-by: Rajeshwari S Shinde rajeshwar...@samsung.com

Regards,
Rajeshwari

On Tue, Mar 11, 2014 at 12:56 AM, Simon Glass s...@chromium.org wrote:
 Hi Marek,

 On 10 March 2014 13:04, Marek Vasut ma...@denx.de wrote:
 Squash these warnings in pinmux.c found with GCC 4.8:

 /arch/arm/cpu/armv7/exynos/pinmux.c: In function 'exynos_pinmux_config':
 /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'count' may be used 
 uninitialized in this function [-Wmaybe-uninitialized]
   for (i = start; i  start + count; i++) {
 ^
 /arch/arm/cpu/armv7/exynos/pinmux.c:663:16: note: 'count' was declared here
   int i, start, count;
 ^
 /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'start' may be used 
 uninitialized in this function [-Wmaybe-uninitialized]
   for (i = start; i  start + count; i++) {
 ^
 /arch/arm/cpu/armv7/exynos/pinmux.c:663:9: note: 'start' was declared here
   int i, start, count;
  ^
 /arch/arm/cpu/armv7/exynos/pinmux.c:689:19: warning: 'bank' may be used 
 uninitialized in this function [-Wmaybe-uninitialized]
s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2));
^
 /arch/arm/cpu/armv7/exynos/pinmux.c:662:24: note: 'bank' was declared here
   struct s5p_gpio_bank *bank;
 ^
 /arch/arm/cpu/armv7/exynos/pinmux.c: In function 'exynos_pinmux_config':
 /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'count' may be used 
 uninitialized in this function [-Wmaybe-uninitialized]
   for (i = start; i  start + count; i++) {
 ^
 /arch/arm/cpu/armv7/exynos/pinmux.c:663:16: note: 'count' was declared here
   int i, start, count;
 ^
 /arch/arm/cpu/armv7/exynos/pinmux.c:687:28: warning: 'start' may be used 
 uninitialized in this function [-Wmaybe-uninitialized]
   for (i = start; i  start + count; i++) {
 ^
 /arch/arm/cpu/armv7/exynos/pinmux.c:663:9: note: 'start' was declared here
   int i, start, count;
  ^
 /arch/arm/cpu/armv7/exynos/pinmux.c:689:19: warning: 'bank' may be used 
 uninitialized in this function [-Wmaybe-uninitialized]
s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2));
^
 /arch/arm/cpu/armv7/exynos/pinmux.c:662:24: note: 'bank' was declared here
   struct s5p_gpio_bank *bank;
 ^

 Note that the warning is bogus, the function can never be called with invalid
 'peripheral' argument. GCC just cannot analyze this.

 Signed-off-by: Marek Vasut ma...@denx.de
 Cc: Naveen Krishna Chatradhi ch.nav...@samsung.com
 Cc: Akshay Saraswat aksha...@samsung.com
 Cc: Rajeshwari S Shinde rajeshwar...@samsung.com
 Cc: Simon Glass s...@chromium.org
 Cc: Minkyu Kang mk7.k...@samsung.com
 Cc: Tom Rini tr...@ti.com

 Acked-by: Simon Glass s...@chromium.org

 Thanks Marek, great to get that annoyance fixed.

 Regards,
 Simon
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v5 3/3] arm: remove unneeded symbol offsets and _TEXT_BASE

2014-02-14 Thread Rajeshwari Birje
Hi Albert,

On Fri, Feb 14, 2014 at 1:38 PM, Albert ARIBAUD
albert.u.b...@aribaud.net wrote:
 Hi Rajeshwari,

 On Fri, 14 Feb 2014 12:58:58 +0530, Rajeshwari Birje
 rajeshwari.bi...@gmail.com wrote:

 Hi All,

 For exynos5250 board we use CONFIG_SKIP_LOWLEVEL_INIT, hence change in
 board/samsung/smdk5250/lowlevel_init.S should not effect. Infact I
 feel that file can be removed.

 If so then please post a separate patch for this removal, which is
 logically unrelated to removing  symbol offsets.
Yes will do that.

-- 
Regards,
Rajeshwari Shinde

 Regards,
 Rajeshwari

 Amicalement,
 --
 Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2014-02-14 Thread Rajeshwari Birje
Hi Piotr,

On Fri, Feb 14, 2014 at 3:18 PM, Piotr Wilczek p.wilc...@samsung.com wrote:
 Hi Rajeshwari,

 -Original Message-
 From: Rajeshwari Birje [mailto:rajeshwari.bi...@gmail.com]
 Sent: Friday, February 14, 2014 6:32 AM
 To: Piotr Wilczek
 Cc: u-boot@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.wilc...@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.

Generic in the sense you want all registers to be set and there values
have to come from DT file?
Which ever you feel OK is fine with me.

Regards,
Rajeshwari

 Best regards,
 Piotr

 Regards,
 Rajeshwari

  Signed-off-by: Piotr Wilczek p.wilc...@samsung.com
  Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
  Cc: Rajeshwari S Shinde rajeshwar...@samsung.com
  Cc: Minkyu Kang mk7.k...@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

Re: [U-Boot] [PATCH] Exynos5250: Remove lowlevelinit

2014-02-14 Thread Rajeshwari Birje
Hi Albert,

On Fri, Feb 14, 2014 at 3:11 PM, Albert ARIBAUD
albert.u.b...@aribaud.net wrote:
 Hi Rajeshwari,

 On Fri, 14 Feb 2014 13:52:48 +0530, Rajeshwari Shinde
 rajeshwar...@samsung.com wrote:

 From: Rajeshwari S Shinde rajeshwar...@samsung.com

 Since we use CONFIG_SKIP_LOWLEVEL_INIT for Exynos baords, we dont need to a
 lowlevel_init.S file.

 Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
 ---

 Builds fine on my side, and as it just removes dead code, I've assigned
 this patch to myself and will include it in my next PR. Thanks!

Sure Thanx

-- 
Regards,
Rajeshwari Shinde

 Amicalement,
 --
 Albert.
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2014-02-13 Thread Rajeshwari Birje
Hi Piotr,

On Thu, Feb 13, 2014 at 7:40 PM, Piotr Wilczek p.wilc...@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

Regards,
Rajeshwari

 Signed-off-by: Piotr Wilczek p.wilc...@samsung.com
 Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
 Cc: Rajeshwari S Shinde rajeshwar...@samsung.com
 Cc: Minkyu Kang mk7.k...@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 | 

Re: [U-Boot] [PATCH V2 06/12] board:samsung: move checkboard to common file

2014-02-13 Thread Rajeshwari Birje
Hi Piotr,

This looks fine.

Acked-by: Rajeshwari Shinde rajeshwar...@samsung.com

On Thu, Feb 13, 2014 at 7:40 PM, Piotr Wilczek p.wilc...@samsung.com wrote:
 The checkboard function's implementation is common for all
 DT supporting boards and should be placed in the board common file.

 Signed-off-by: Piotr Wilczek p.wilc...@samsung.com
 Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
 Cc: Chander Kashyap k.chan...@samsung.com
 Cc: Rajeshwari S Shinde rajeshwar...@samsung.com
 Cc: Amar amarendra...@samsung.com
 ---
 Changes for v2:
  - new patch

  board/samsung/common/board.c|   12 
  board/samsung/smdk5250/exynos5-dt.c |   15 ---
  board/samsung/smdk5420/smdk5420.c   |   15 ---
  3 files changed, 12 insertions(+), 30 deletions(-)

 diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
 index 3ac8005..99e2fd3 100644
 --- a/board/samsung/common/board.c
 +++ b/board/samsung/common/board.c
 @@ -257,7 +257,19 @@ int board_mmc_init(bd_t *bis)
 return ret;
  }
  #endif
 +
 +#ifdef CONFIG_DISPLAY_BOARDINFO
 +int checkboard(void)
 +{
 +   const char *board_name;
 +
 +   board_name = fdt_getprop(gd-fdt_blob, 0, model, NULL);
 +   printf(Board: %s\n, board_name ? board_name : unknown);
 +
 +   return 0;
 +}
  #endif
 +#endif /* CONFIG_OF_CONTROL */

  #ifdef CONFIG_BOARD_LATE_INIT
  int board_late_init(void)
 diff --git a/board/samsung/smdk5250/exynos5-dt.c 
 b/board/samsung/smdk5250/exynos5-dt.c
 index 5fb8664..b22fba5 100644
 --- a/board/samsung/smdk5250/exynos5-dt.c
 +++ b/board/samsung/smdk5250/exynos5-dt.c
 @@ -45,21 +45,6 @@ int exynos_init(void)
 return 0;
  }

 -#ifdef CONFIG_DISPLAY_BOARDINFO
 -int checkboard(void)
 -{
 -   const char *board_name;
 -
 -   board_name = fdt_getprop(gd-fdt_blob, 0, model, NULL);
 -   if (board_name == NULL)
 -   printf(\nUnknown Board\n);
 -   else
 -   printf(\nBoard: %s\n, board_name);
 -
 -   return 0;
 -}
 -#endif
 -
  #ifdef CONFIG_LCD
  void exynos_cfg_lcd_gpio(void)
  {
 diff --git a/board/samsung/smdk5420/smdk5420.c 
 b/board/samsung/smdk5420/smdk5420.c
 index 3ad2ad0..e4606ec 100644
 --- a/board/samsung/smdk5420/smdk5420.c
 +++ b/board/samsung/smdk5420/smdk5420.c
 @@ -142,18 +142,3 @@ int board_get_revision(void)
  {
 return 0;
  }
 -
 -#ifdef CONFIG_DISPLAY_BOARDINFO
 -int checkboard(void)
 -{
 -   const char *board_name;
 -
 -   board_name = fdt_getprop(gd-fdt_blob, 0, model, NULL);
 -   if (board_name == NULL)
 -   printf(\nUnknown Board\n);
 -   else
 -   printf(\nBoard: %s\n, board_name);
 -
 -   return 0;
 -}
 -#endif
 --
 1.7.9.5

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v5 3/3] arm: remove unneeded symbol offsets and _TEXT_BASE

2014-02-13 Thread Rajeshwari Birje
Hi All,

For exynos5250 board we use CONFIG_SKIP_LOWLEVEL_INIT, hence change in
board/samsung/smdk5250/lowlevel_init.S should not effect. Infact I
feel that file can be removed.


Regards,
Rajeshwari
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH RESEND] MMC: DWMMC: Correct the CLKDIV register value

2014-02-06 Thread Rajeshwari Birje
Hi Pantelis Antoniou,

Please do let me know if any coments on the same.

Regards,
Rajeshwari

On Thu, Feb 6, 2014 at 7:24 AM, Jaehoon Chung jh80.ch...@samsung.com wrote:
 Hi.

 Right, It's reasonable. Looks good to me.

 Acked-by: Jaehoon Chung jh80.ch...@samsung.com

 Best Regards,
 Jaehoon Chung

 On 02/05/2014 02:58 PM, Rajeshwari Birje wrote:
 Hi All,

 CCing Jaehoon Chung.

 Regards,
 Rajeshwari

 On Wed, Feb 5, 2014 at 10:48 AM, Rajeshwari Shinde
 rajeshwar...@samsung.com wrote:
 From: Rajeshwari S Shinde rajeshwar...@samsung.com

 This patch corrects the divider value written to CLKDIV register.
 Since SDCLKIN is divided inside controller by the DIVRATIO value set
 in the CLKSEL register, we need to use the same output clock value to
 calculate the CLKDIV value.
 as per user manual: cclk_in = SDCLKIN / (DIVRATIO + 1)

 Input parameter to mmc_clk is changed to dwmci_host, since
 we need the same to read DWMCI_CLKSEL register.

 This improves the read timing values for channel 0 on SMDK5250
 from 0.288sec to 0.144sec

 Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
 ---
  arch/arm/include/asm/arch-exynos/dwmmc.h |  4 
  drivers/mmc/dw_mmc.c |  2 +-
  drivers/mmc/exynos_dw_mmc.c  | 17 +++--
  include/dwmmc.h  |  2 +-
  4 files changed, 21 insertions(+), 4 deletions(-)

 diff --git a/arch/arm/include/asm/arch-exynos/dwmmc.h 
 b/arch/arm/include/asm/arch-exynos/dwmmc.h
 index 09d739d..a7ca12c 100644
 --- a/arch/arm/include/asm/arch-exynos/dwmmc.h
 +++ b/arch/arm/include/asm/arch-exynos/dwmmc.h
 @@ -23,6 +23,10 @@
  #define MPSCTRL_ENCRYPTION (0x11)
  #define MPSCTRL_VALID  (0x10)

 +/* CLKSEL Register */
 +#define DWMCI_DIVRATIO_BIT 24
 +#define DWMCI_DIVRATIO_MASK0x7
 +
  #ifdef CONFIG_OF_CONTROL
  int exynos_dwmmc_init(const void *blob);
  #endif
 diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
 index 4cec5aa..d45c15c 100644
 --- a/drivers/mmc/dw_mmc.c
 +++ b/drivers/mmc/dw_mmc.c
 @@ -237,7 +237,7 @@ static int dwmci_setup_bus(struct dwmci_host *host, u32 
 freq)
  * host-bus_hz should be set from user.
  */
 if (host-get_mmc_clk)
 -   sclk = host-get_mmc_clk(host-dev_index);
 +   sclk = host-get_mmc_clk(host);
 else if (host-bus_hz)
 sclk = host-bus_hz;
 else {
 diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
 index b3e5c5e..de8cdcc 100644
 --- a/drivers/mmc/exynos_dw_mmc.c
 +++ b/drivers/mmc/exynos_dw_mmc.c
 @@ -29,9 +29,22 @@ static void exynos_dwmci_clksel(struct dwmci_host *host)
 dwmci_writel(host, DWMCI_CLKSEL, host-clksel_val);
  }

 -unsigned int exynos_dwmci_get_clk(int dev_index)
 +unsigned int exynos_dwmci_get_clk(struct dwmci_host *host)
  {
 -   return get_mmc_clk(dev_index);
 +   unsigned long sclk;
 +   int8_t clk_div;
 +
 +   /*
 +* Since SDCLKIN is divided inside controller by the DIVRATIO
 +* value set in the CLKSEL register, we need to use the same output
 +* clock value to calculate the CLKDIV value.
 +* as per user manual:cclk_in = SDCLKIN / (DIVRATIO + 1)
 +*/
 +   clk_div = ((dwmci_readl(host, DWMCI_CLKSEL)  DWMCI_DIVRATIO_BIT)
 +DWMCI_DIVRATIO_MASK) + 1;
 +   sclk = get_mmc_clk(host-dev_index);
 +
 +   return sclk / clk_div;
  }

  static void exynos_dwmci_board_init(struct dwmci_host *host)
 diff --git a/include/dwmmc.h b/include/dwmmc.h
 index a02dd67..b641558 100644
 --- a/include/dwmmc.h
 +++ b/include/dwmmc.h
 @@ -142,7 +142,7 @@ struct dwmci_host {

 void (*clksel)(struct dwmci_host *host);
 void (*board_init)(struct dwmci_host *host);
 -   unsigned int (*get_mmc_clk)(int dev_index);
 +   unsigned int (*get_mmc_clk)(struct dwmci_host *host);
  };

  struct dwmci_idmac {
 --
 1.7.12.4

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot







-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/3] exynos: pinmux: remove unnecessary routine

2014-02-04 Thread Rajeshwari Birje
Hi Minkyu Kang,

On Mon, Feb 3, 2014 at 12:53 PM, Minkyu Kang mk7.k...@samsung.com wrote:
 On 29/01/14 18:01, Rajeshwari Birje wrote:
 Hi Minkyu Knag,

 On Wed, Jan 29, 2014 at 1:34 PM, Minkyu Kang mk7.k...@samsung.com wrote:
 Because of the list of peripherals is not sequential,
 such a routine does not check for valid correctly.
 Error check will be done when call the exynos_pinmux_config function.

 Signed-off-by: Minkyu Kang mk7.k...@samsung.com
 ---
  arch/arm/cpu/armv7/exynos/pinmux.c |7 +--
  1 file changed, 1 insertion(+), 6 deletions(-)

 diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c 
 b/arch/arm/cpu/armv7/exynos/pinmux.c
 index 904177a..645c497 100644
 --- a/arch/arm/cpu/armv7/exynos/pinmux.c
 +++ b/arch/arm/cpu/armv7/exynos/pinmux.c
 @@ -751,12 +751,7 @@ static int exynos5_pinmux_decode_periph_id(const void 
 *blob, int node)
 if (err)
 return PERIPH_ID_NONE;

 -   /* check for invalid peripheral id */
 -   if ((PERIPH_ID_SDMMC4  cell[1]) || (cell[1]  PERIPH_ID_UART0))
 -   return cell[1];

 Cant we check if less than PERIPH_ID_COUNT, this way we can atleast
 cut down some wrong values.
 Or value has to range between PERIPH_ID_UART0 and PERIPH_ID_COUNT


 possible. but I think it's unnecessary.
 It can not check error correctly.
 for example, if cell[1] is 55 then it's valid but does not supported.

Ok the point seems valid.

Acked-by: Rajeshwari Shinderajeshwar...@samsung.com

 Thanks,
 Minkyu Kang.

-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH RESEND] MMC: DWMMC: Correct the CLKDIV register value

2014-02-04 Thread Rajeshwari Birje
Hi All,

CCing Jaehoon Chung.

Regards,
Rajeshwari

On Wed, Feb 5, 2014 at 10:48 AM, Rajeshwari Shinde
rajeshwar...@samsung.com wrote:
 From: Rajeshwari S Shinde rajeshwar...@samsung.com

 This patch corrects the divider value written to CLKDIV register.
 Since SDCLKIN is divided inside controller by the DIVRATIO value set
 in the CLKSEL register, we need to use the same output clock value to
 calculate the CLKDIV value.
 as per user manual: cclk_in = SDCLKIN / (DIVRATIO + 1)

 Input parameter to mmc_clk is changed to dwmci_host, since
 we need the same to read DWMCI_CLKSEL register.

 This improves the read timing values for channel 0 on SMDK5250
 from 0.288sec to 0.144sec

 Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
 ---
  arch/arm/include/asm/arch-exynos/dwmmc.h |  4 
  drivers/mmc/dw_mmc.c |  2 +-
  drivers/mmc/exynos_dw_mmc.c  | 17 +++--
  include/dwmmc.h  |  2 +-
  4 files changed, 21 insertions(+), 4 deletions(-)

 diff --git a/arch/arm/include/asm/arch-exynos/dwmmc.h 
 b/arch/arm/include/asm/arch-exynos/dwmmc.h
 index 09d739d..a7ca12c 100644
 --- a/arch/arm/include/asm/arch-exynos/dwmmc.h
 +++ b/arch/arm/include/asm/arch-exynos/dwmmc.h
 @@ -23,6 +23,10 @@
  #define MPSCTRL_ENCRYPTION (0x11)
  #define MPSCTRL_VALID  (0x10)

 +/* CLKSEL Register */
 +#define DWMCI_DIVRATIO_BIT 24
 +#define DWMCI_DIVRATIO_MASK0x7
 +
  #ifdef CONFIG_OF_CONTROL
  int exynos_dwmmc_init(const void *blob);
  #endif
 diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
 index 4cec5aa..d45c15c 100644
 --- a/drivers/mmc/dw_mmc.c
 +++ b/drivers/mmc/dw_mmc.c
 @@ -237,7 +237,7 @@ static int dwmci_setup_bus(struct dwmci_host *host, u32 
 freq)
  * host-bus_hz should be set from user.
  */
 if (host-get_mmc_clk)
 -   sclk = host-get_mmc_clk(host-dev_index);
 +   sclk = host-get_mmc_clk(host);
 else if (host-bus_hz)
 sclk = host-bus_hz;
 else {
 diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
 index b3e5c5e..de8cdcc 100644
 --- a/drivers/mmc/exynos_dw_mmc.c
 +++ b/drivers/mmc/exynos_dw_mmc.c
 @@ -29,9 +29,22 @@ static void exynos_dwmci_clksel(struct dwmci_host *host)
 dwmci_writel(host, DWMCI_CLKSEL, host-clksel_val);
  }

 -unsigned int exynos_dwmci_get_clk(int dev_index)
 +unsigned int exynos_dwmci_get_clk(struct dwmci_host *host)
  {
 -   return get_mmc_clk(dev_index);
 +   unsigned long sclk;
 +   int8_t clk_div;
 +
 +   /*
 +* Since SDCLKIN is divided inside controller by the DIVRATIO
 +* value set in the CLKSEL register, we need to use the same output
 +* clock value to calculate the CLKDIV value.
 +* as per user manual:cclk_in = SDCLKIN / (DIVRATIO + 1)
 +*/
 +   clk_div = ((dwmci_readl(host, DWMCI_CLKSEL)  DWMCI_DIVRATIO_BIT)
 +DWMCI_DIVRATIO_MASK) + 1;
 +   sclk = get_mmc_clk(host-dev_index);
 +
 +   return sclk / clk_div;
  }

  static void exynos_dwmci_board_init(struct dwmci_host *host)
 diff --git a/include/dwmmc.h b/include/dwmmc.h
 index a02dd67..b641558 100644
 --- a/include/dwmmc.h
 +++ b/include/dwmmc.h
 @@ -142,7 +142,7 @@ struct dwmci_host {

 void (*clksel)(struct dwmci_host *host);
 void (*board_init)(struct dwmci_host *host);
 -   unsigned int (*get_mmc_clk)(int dev_index);
 +   unsigned int (*get_mmc_clk)(struct dwmci_host *host);
  };

  struct dwmci_idmac {
 --
 1.7.12.4

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] exynos: pinmux: sort the list of peripherals

2014-01-29 Thread Rajeshwari Birje
Hi All,

This looks fine.

Acked-by: Rajehswari Shinde rajeshwar...@samsung.com

On Wed, Jan 29, 2014 at 1:33 PM, Minkyu Kang mk7.k...@samsung.com wrote:

 Signed-off-by: Minkyu Kang mk7.k...@samsung.com
 ---
  arch/arm/include/asm/arch-exynos/periph.h |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/arch/arm/include/asm/arch-exynos/periph.h
 b/arch/arm/include/asm/arch-exynos/periph.h
 index 30c7f18..6d77d80 100644
 --- a/arch/arm/include/asm/arch-exynos/periph.h
 +++ b/arch/arm/include/asm/arch-exynos/periph.h
 @@ -36,7 +36,6 @@ enum periph_id {
 PERIPH_ID_SDMMC3,
 PERIPH_ID_I2C8 = 87,
 PERIPH_ID_I2C9,
 -   PERIPH_ID_I2C10 = 203,
 PERIPH_ID_I2S0 = 98,
 PERIPH_ID_I2S1 = 99,

 @@ -54,6 +53,7 @@ enum periph_id {
 PERIPH_ID_PWM2,
 PERIPH_ID_PWM3,
 PERIPH_ID_PWM4,
 +   PERIPH_ID_I2C10 = 203,

 PERIPH_ID_COUNT,
 PERIPH_ID_NONE = -1,
 --
 1.7.9.5
 --
 Thanks,
 Minkyu Kang.
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot




--
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/3] exynos: pinmux: remove unnecessary routine

2014-01-29 Thread Rajeshwari Birje
Hi Minkyu Knag,

On Wed, Jan 29, 2014 at 1:34 PM, Minkyu Kang mk7.k...@samsung.com wrote:
 Because of the list of peripherals is not sequential,
 such a routine does not check for valid correctly.
 Error check will be done when call the exynos_pinmux_config function.

 Signed-off-by: Minkyu Kang mk7.k...@samsung.com
 ---
  arch/arm/cpu/armv7/exynos/pinmux.c |7 +--
  1 file changed, 1 insertion(+), 6 deletions(-)

 diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c 
 b/arch/arm/cpu/armv7/exynos/pinmux.c
 index 904177a..645c497 100644
 --- a/arch/arm/cpu/armv7/exynos/pinmux.c
 +++ b/arch/arm/cpu/armv7/exynos/pinmux.c
 @@ -751,12 +751,7 @@ static int exynos5_pinmux_decode_periph_id(const void 
 *blob, int node)
 if (err)
 return PERIPH_ID_NONE;

 -   /* check for invalid peripheral id */
 -   if ((PERIPH_ID_SDMMC4  cell[1]) || (cell[1]  PERIPH_ID_UART0))
 -   return cell[1];

Cant we check if less than PERIPH_ID_COUNT, this way we can atleast
cut down some wrong values.
Or value has to range between PERIPH_ID_UART0 and PERIPH_ID_COUNT
-- 
Regards,
Rajeshwari Shinde
 -
 -   debug( invalid peripheral id\n);
 -   return PERIPH_ID_NONE;
 +   return cell[1];
  }

  int pinmux_decode_periph_id(const void *blob, int node)
 --
 1.7.9.5
 --
 Thanks,
 Minkyu Kang.
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] exynos: pinmux: sort the list of peripherals

2014-01-29 Thread Rajeshwari Birje
Acked-by: Rajeshwari Shinde rajeshwar...@samsung.com

On Wed, Jan 29, 2014 at 2:27 PM, Rajeshwari Birje
rajeshwari.bi...@gmail.com wrote:
 Hi All,

 This looks fine.

 Acked-by: Rajehswari Shinde rajeshwar...@samsung.com

 On Wed, Jan 29, 2014 at 1:33 PM, Minkyu Kang mk7.k...@samsung.com wrote:

 Signed-off-by: Minkyu Kang mk7.k...@samsung.com
 ---
  arch/arm/include/asm/arch-exynos/periph.h |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/arch/arm/include/asm/arch-exynos/periph.h
 b/arch/arm/include/asm/arch-exynos/periph.h
 index 30c7f18..6d77d80 100644
 --- a/arch/arm/include/asm/arch-exynos/periph.h
 +++ b/arch/arm/include/asm/arch-exynos/periph.h
 @@ -36,7 +36,6 @@ enum periph_id {
 PERIPH_ID_SDMMC3,
 PERIPH_ID_I2C8 = 87,
 PERIPH_ID_I2C9,
 -   PERIPH_ID_I2C10 = 203,
 PERIPH_ID_I2S0 = 98,
 PERIPH_ID_I2S1 = 99,

 @@ -54,6 +53,7 @@ enum periph_id {
 PERIPH_ID_PWM2,
 PERIPH_ID_PWM3,
 PERIPH_ID_PWM4,
 +   PERIPH_ID_I2C10 = 203,

 PERIPH_ID_COUNT,
 PERIPH_ID_NONE = -1,
 --
 1.7.9.5
 --
 Thanks,
 Minkyu Kang.
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot




 --
 Regards,
 Rajeshwari Shinde



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2 5/7] smdk5420: Implement callbacks needed by exynos_fb driver

2014-01-01 Thread Rajeshwari Birje
Hi Simon,

Had posted a patch for same long back and some how it did not get reviewed
later, this needs to reworked again.
Following is the link for same.
https://patches.linaro.org/15850/

Regards,
Rajeshwari


On Fri, Dec 20, 2013 at 10:06 PM, Simon Glass s...@chromium.org wrote:

 Hi Ajay,

 On 20 December 2013 02:43, Ajay kumar ajayn...@gmail.com wrote:
  Hi Simon,
 
 
  On Fri, Dec 20, 2013 at 2:10 AM, Simon Glass s...@chromium.org wrote:
 
  Hi Ajay,
 
  On 12 November 2013 05:27, Ajay Kumar ajaykumar...@samsung.com wrote:
   Add callbacks to set up DP-HPD, backlight and LCD power
   on SMDK5420.
  
   Signed-off-by: Ajay Kumar ajaykumar...@samsung.com
   ---
board/samsung/smdk5420/smdk5420.c | 102
   +++---
1 file changed, 17 insertions(+), 85 deletions(-)
  
   diff --git a/board/samsung/smdk5420/smdk5420.c
   b/board/samsung/smdk5420/smdk5420.c
   index d85b953..75b22cc 100644
   --- a/board/samsung/smdk5420/smdk5420.c
   +++ b/board/samsung/smdk5420/smdk5420.c
   @@ -43,98 +43,30 @@ int exynos_init(void)
}
  
#ifdef CONFIG_LCD
   -void cfg_lcd_gpio(void)
   +void exynos_cfg_lcd_gpio(void)
{
   -   struct exynos5_gpio_part1 *gpio1 =
   -   (struct exynos5_gpio_part1
   *)samsung_get_base_gpio_part1();
   -
   -   /* For Backlight */
   -   s5p_gpio_cfg_pin(gpio1-b2, 0, GPIO_OUTPUT);
   -   s5p_gpio_set_value(gpio1-b2, 0, 1);
   -
   -   /* LCD power on */
   -   s5p_gpio_cfg_pin(gpio1-x1, 5, GPIO_OUTPUT);
   -   s5p_gpio_set_value(gpio1-x1, 5, 1);
   +   struct exynos5420_gpio_part2 *gpio2 =
   +   (struct exynos5420_gpio_part2
   *)samsung_get_base_gpio_part2();
  
   /* Set Hotplug detect for DP */
   -   s5p_gpio_cfg_pin(gpio1-x0, 7, GPIO_FUNC(0x3));
   +   s5p_gpio_cfg_pin(gpio2-x0, 7, GPIO_FUNC(0x3));
}
  
   -vidinfo_t panel_info = {
   -   .vl_freq= 60,
   -   .vl_col = 2560,
   -   .vl_row = 1600,
   -   .vl_width   = 2560,
   -   .vl_height  = 1600,
   -   .vl_clkp= CONFIG_SYS_LOW,
   -   .vl_hsp = CONFIG_SYS_LOW,
   -   .vl_vsp = CONFIG_SYS_LOW,
   -   .vl_dp  = CONFIG_SYS_LOW,
   -   .vl_bpix= 4,/* LCD_BPP = 2^4, for output conosle
 on
   LCD */
   -
   -   /* wDP panel timing infomation */
   -   .vl_hspw= 32,
   -   .vl_hbpd= 80,
   -   .vl_hfpd= 48,
   -
   -   .vl_vspw= 6,
   -   .vl_vbpd= 37,
   -   .vl_vfpd= 3,
   -   .vl_cmd_allow_len = 0xf,
   -
   -   .win_id = 3,
   -   .cfg_gpio   = cfg_lcd_gpio,
   -   .backlight_on   = NULL,
   -   .lcd_power_on   = NULL,
   -   .reset_lcd  = NULL,
   -   .dual_lcd_enabled = 0,
   -
   -   .init_delay = 0,
   -   .power_on_delay = 0,
   -   .reset_delay= 0,
   -   .interface_mode = FIMD_RGB_INTERFACE,
   -   .dp_enabled = 1,
   -};
   -
   -static struct edp_device_info edp_info = {
   -   .disp_info = {
   -   .h_res = 2560,
   -   .h_sync_width = 32,
   -   .h_back_porch = 80,
   -   .h_front_porch = 48,
   -   .v_res = 1600,
   -   .v_sync_width  = 6,
   -   .v_back_porch = 37,
   -   .v_front_porch = 3,
   -   .v_sync_rate = 60,
   -   },
   -   .lt_info = {
   -   .lt_status = DP_LT_NONE,
   -   },
   -   .video_info = {
   -   .master_mode = 0,
   -   .bist_mode = DP_DISABLE,
   -   .bist_pattern = NO_PATTERN,
   -   .h_sync_polarity = 0,
   -   .v_sync_polarity = 0,
   -   .interlaced = 0,
   -   .color_space = COLOR_RGB,
   -   .dynamic_range = VESA,
   -   .ycbcr_coeff = COLOR_YCBCR601,
   -   .color_depth = COLOR_8,
   -   },
   -};
   -
   -static struct exynos_dp_platform_data dp_platform_data = {
   -   .phy_enable = set_dp_phy_ctrl,
   -   .edp_dev_info   = edp_info,
   -};
   -
   -void init_panel_info(vidinfo_t *vid)
   +void exynos_backlight_on(unsigned int onoff)
{
   -   vid-rgb_mode   = MODE_RGB_P,
   +   struct exynos5420_gpio_part1 *gpio1 =
   +   (struct exynos5420_gpio_part1
   *)samsung_get_base_gpio_part1();
   +
   +   struct exynos5420_gpio_part2 *gpio2 =
   +   (struct exynos5420_gpio_part2
   *)samsung_get_base_gpio_part2();
   +
   +   /* For PWM */
   +   s5p_gpio_cfg_pin(gpio1-b2, 0, GPIO_OUTPUT);
   +   s5p_gpio_set_value(gpio1-b2, 0, 1);
 
  Can we use generic GPIO calls instead? gpio_set_value(), etc
 
  I think GPIO numbering for exynos is yet to go in.
  Should wait till that goes in.

 What is the hold-up on this? It was posted a very long time ago.

 Regards,
 Simon
 

Re: [U-Boot] [PATCH] arm: put .hash, .got.plt and .machine_param back in binaries

2013-12-25 Thread Rajeshwari Birje
Hi Albert,

Any idea when are you getting this patch in as it is effecting the SMDK5250
booting.

Regards,
Rajeshwari


On Fri, Dec 13, 2013 at 3:28 PM, Albert ARIBAUD
albert.u.b...@aribaud.netwrote:

 Hi Masahiro,

 On Fri, 13 Dec 2013 17:15:51 +0900, Masahiro Yamada
 yamad...@jp.panasonic.com wrote:

  Hello Albert.
 
 
$(obj)$(SPL_BIN).bin:  $(obj)$(SPL_BIN)
   -   $(OBJCOPY) $(OBJCFLAGS) -O binary $ $@
   +   $(OBJCOPY) $(OBJCFLAGS) $(SPL_OBJCFLAGS) -O srec $
 $(obj)$(SPL_BIN).srec
   +   $(OBJCOPY) $(OBJCFLAGS) $(SPL_OBJCFLAGS) -O binary $ $@
 
  The new file .srec is not mentioned in the commit log.
  Is it your intentional change?
 
  If so, please describe them separetely.

 Thanks for spotting this.

 Actually it is not intentional; I had added it in my tests so that I
 could compare binaries from different builds more easily. Unless people
 think it should stay, I will remove it through a v2 patch.

  Best Regards
  Masahiro Yamada

 Amicalement,
 --
 Albert.
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot




-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 00/11 V11] EXYNOS5420: Add SMDK5420 board support

2013-12-17 Thread Rajeshwari Birje
Hi Minkyu,

Can we please, get these patches reviewed and merged.

Regards,
Rajeshwari.

On Mon, Dec 16, 2013 at 2:12 PM, Rajeshwari S Shinde
rajeshwar...@samsung.com wrote:
 This patch adds basic board support for SMDK5420 board.
 These patches are tested for booting fine on EVT1 SMDK5420.

 Changes in V2:
 - Corrected a compilation issue for SMDK5420.

 Changes in V3:
 - Add patch to support variable size SPL support
 - Add patch to disable SMU for eMMC.

 Changes in V4:
 - Added check for MAX77686 pmic compilation.
 - Added correct calculation of gpio based addresses.
 - Rebased on the latest u-boot code.
 - Removed patches for UART and TZPC changes as
 they were not needed.
 - Added flag to disable SMU for eMMC.

 Changes in V5:
 - Moved functions board_mmc_init and board_eth_init
 to common/board.c in case of device tree support.

 Changes in V6:
 - Rebased on the latest mainline branch.
 - Moved the definitions for SMU to arch/arm dwmmc.h

 Changes in V7:
 - Removed below patch as it is already merged
 DWMMC: SMDK5420: Disable SMU for eMMC
 - Corrected the multi line comments and removal of
 blank spaces and lines.
 - Corrected the license.

 Changes in V8:
 - corrected the if loops with if conditions of
 pro_id and cpu_id.

 Changes in V9:
 - Added macros to get the base address
 - Rebased on latest code.

 Changes in V10:
 - Added new structures for Power and DMC registers for
 5420.
 - Changed the input parameters for common dmc functions.
 - Removed unnecesarry blank lines and added where ever required.

 Changes in V11:
 -Rebased on latest u-boot-samsung branch.

 Rajeshwari S Shinde (11):
   EXYNOS5: Create a common board file
   Exynos5420: Add base addresses for 5420
   EXYNOS5420: Add power register structure.
   EXYNOS5420: Add dmc and phy_control register structure
   Exynos5420: Add clock initialization for 5420
   Exynos5420: Add DDR3 initialization for 5420
   Exynos5420: Add support for 5420 in pinmux and gpio
   Exynos5420: Add base patch for SMDK5420
   DTS: Add dts support for SMDK5420
   Config: Add initial config for SMDK5420
   SPL: EXYNOS: Prepare for variable size SPL support

  arch/arm/cpu/armv7/exynos/clock.c  | 279 -
  arch/arm/cpu/armv7/exynos/clock_init.h |  17 +
  arch/arm/cpu/armv7/exynos/clock_init_exynos5.c | 352 ++-
  arch/arm/cpu/armv7/exynos/dmc_common.c |  60 +-
  arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c  | 439 -
  arch/arm/cpu/armv7/exynos/exynos5_setup.h  | 764 --
  arch/arm/cpu/armv7/exynos/pinmux.c | 260 +++-
  arch/arm/dts/exynos5.dtsi  | 198 ++
  arch/arm/dts/exynos5250.dtsi   | 194 +-
  arch/arm/dts/exynos5420.dtsi   |  70 +++
  arch/arm/include/asm/arch-exynos/board.h   |  17 +
  arch/arm/include/asm/arch-exynos/clk.h |   1 +
  arch/arm/include/asm/arch-exynos/clock.h   | 494 +++
  arch/arm/include/asm/arch-exynos/cpu.h |  52 +-
  arch/arm/include/asm/arch-exynos/dmc.h | 177 ++
  arch/arm/include/asm/arch-exynos/gpio.h| 143 -
  arch/arm/include/asm/arch-exynos/periph.h  |   3 +
  arch/arm/include/asm/arch-exynos/power.h   | 837 
 +
  board/samsung/common/Makefile  |   4 +
  board/samsung/common/board.c   | 410 
  board/samsung/dts/exynos5420-smdk5420.dts  | 169 +
  board/samsung/smdk5250/exynos5-dt.c| 352 +--
  board/samsung/smdk5250/smdk5250.c  | 182 +-
  board/samsung/smdk5420/Makefile|  11 +
  board/samsung/smdk5420/smdk5420.c  | 159 +
  board/samsung/smdk5420/smdk5420_spl.c  |  52 ++
  boards.cfg |   1 +
  include/configs/arndale.h  |   1 +
  include/configs/exynos5-dt.h   | 289 +
  include/configs/exynos5250-dt.h| 283 +
  include/configs/smdk5420.h |  56 ++
  spl/Makefile   |   7 +-
  tools/Makefile |   3 +-
  tools/mkexynosspl.c| 167 +++--
  34 files changed, 5188 insertions(+), 1315 deletions(-)
  create mode 100644 arch/arm/dts/exynos5.dtsi
  create mode 100644 arch/arm/dts/exynos5420.dtsi
  create mode 100644 arch/arm/include/asm/arch-exynos/board.h
  create mode 100644 board/samsung/common/board.c
  create mode 100644 board/samsung/dts/exynos5420-smdk5420.dts
  create mode 100644 board/samsung/smdk5420/Makefile
  create mode 100644 board/samsung/smdk5420/smdk5420.c
  create mode 100644 board/samsung/smdk5420/smdk5420_spl.c
  create mode 100644 

Re: [U-Boot] [PATCH v3 1/4] mkexynosspl: fix uninitialized buffer

2013-12-15 Thread Rajeshwari Birje
Hi Albert,

Please refer the following patch:

SPL: EXYNOS: Prepare for variable size SPL support

http://patchwork.ozlabs.org/patch/298965/

I don't think after this patch is applied, the above patch would be required.

Regards,
Rajeshwari.


On Mon, Dec 16, 2013 at 6:18 AM, Minkyu Kang mk7.k...@samsung.com wrote:
 Dear Albert ARIBAUD,

 On 14/12/13 19:14, Albert ARIBAUD wrote:
 Hi Minkyu,

 On Sat, 14 Dec 2013 14:07:57 +0900, Minkyu Kang mk7.k...@samsung.com
 wrote:

 Dear Albert,

 On 13/12/13 18:00, Albert ARIBAUD wrote:
 (adding Minkyu as the Samsung custodian)

 On Mon,  9 Dec 2013 18:09:18 +0100, Albert ARIBAUD
 albert.u.b...@aribaud.net wrote:

 mkexynos reads its input file which might be smaller than

 ( typo: s/mkexynos/mkexynosspl/ -- wil fix when applying if thee is
 no other change to be made )

 its read buffer, but always writes the whole buffer out.
 This does not affect the functionalyty of the output file,

 ... and s/functionalyty/functionality/, too.

 but it makes its content unpredictable as the end of the
 buffer is never initialized. Fix this by zeroing the buffer
 before reading the input file.

 Minkyu: should the buffer be pre-filled with zeroes or should I use
 ones instead? Or maybe the output could be truncated to the size of the
 input?

 Basically, the output file is fixed to 14K as same as buffer size.
 And the input file should be smaller than 14K.
 It's the rule of exynos spl.
 The role of mkexynosspl is just adding 4 byte checksum value to end of file.
 If the input file is bigger than 14K, output will be truncated.


 Amicalement,
 Albert.

 Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net

 btw, this change looks reasonable to me.

 Acked-by: Minkyu Kang mk7.k...@samsung.com

 Thanks! If that's ok with you, I'll apply 1/4 to ARM, considering it a
 kind of bugfix, and remove it from V4 of the patch series if there is
 any.

 Or if you prefer to apply 1/4 to u-boot-samsung, that's fine with me.

 please apply this patch to u-boot-arm.


 Thanks,
 Minkyu Kang.

 Amicalement,


 Thanks,
 Minkyu Kang.
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] arm: put .hash, .got.plt and .machine_param back in binaries

2013-12-13 Thread Rajeshwari Birje
Hi Albert,

Tested on SMDK5250 and working fine.

Tested by: Rajeshwari S Shinde rajeshwar...@samsung.com

Regards,
Rajeshwari.

On Fri, Dec 13, 2013 at 1:14 PM, Albert ARIBAUD
albert.u.b...@aribaud.net wrote:
 Some targets will build fine but not boot if sections .hash and
 .got.plt are not present in the binary. Add them back.

 Also, Exynos machines require .machine_param section in SPL.
 Add it.

 Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net
 ---
 This patch was prepared with the help of Rajeshwari Birge.
 Please test, especially if you own an Exynos-based board.

  arch/arm/config.mk  | 2 +-
  arch/arm/cpu/armv7/exynos/config.mk | 7 +++
  arch/arm/cpu/u-boot.lds | 3 +--
  spl/Makefile| 3 ++-
  4 files changed, 11 insertions(+), 4 deletions(-)
  create mode 100644 arch/arm/cpu/armv7/exynos/config.mk

 diff --git a/arch/arm/config.mk b/arch/arm/config.mk
 index fd3e5fb..5d39d39 100644
 --- a/arch/arm/config.mk
 +++ b/arch/arm/config.mk
 @@ -105,4 +105,4 @@ PLATFORM_CPPFLAGS += $(call cc-option, -mword-relocations)
  endif

  # limit ourselves to the sections we want in the .bin.
 -OBJCFLAGS += -j .text -j .rodata -j .data -j .u_boot_list -j .rel.dyn
 +OBJCFLAGS += -j .text -j .rodata -j .hash -j .data -j .got.plt -j 
 .u_boot_list -j .rel.dyn
 diff --git a/arch/arm/cpu/armv7/exynos/config.mk 
 b/arch/arm/cpu/armv7/exynos/config.mk
 new file mode 100644
 index 000..ee0d2da
 --- /dev/null
 +++ b/arch/arm/cpu/armv7/exynos/config.mk
 @@ -0,0 +1,7 @@
 +#
 +# Copyright (C) Albert ARIBAUD albert.u.b...@aribaud.net
 +#
 +# SPDX-License-Identifier: GPL-2.0+
 +#
 +
 +SPL_OBJCFLAGS += -j .machine_param
 diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds
 index 9463a33..4da5d24 100644
 --- a/arch/arm/cpu/u-boot.lds
 +++ b/arch/arm/cpu/u-boot.lds
 @@ -92,8 +92,6 @@ SECTIONS
 }

 .dynsym _end : { *(.dynsym) }
 -   .hash : { *(.hash) }
 -   .got.plt : { *(.got.plt) }
 .dynbss : { *(.dynbss) }
 .dynstr : { *(.dynstr*) }
 .dynamic : { *(.dynamic*) }
 @@ -101,4 +99,5 @@ SECTIONS
 .interp : { *(.interp*) }
 .gnu : { *(.gnu*) }
 .ARM.exidx : { *(.ARM.exidx*) }
 +   .gnu.linkonce.armexidx : { *(.gnu.linkonce.armexidx.*) }
  }
 diff --git a/spl/Makefile b/spl/Makefile
 index 2a787af..b95582b 100644
 --- a/spl/Makefile
 +++ b/spl/Makefile
 @@ -171,7 +171,8 @@ $(obj)$(BOARD)-spl.bin: $(obj)u-boot-spl.bin
  endif

  $(obj)$(SPL_BIN).bin:  $(obj)$(SPL_BIN)
 -   $(OBJCOPY) $(OBJCFLAGS) -O binary $ $@
 +   $(OBJCOPY) $(OBJCFLAGS) $(SPL_OBJCFLAGS) -O srec $ 
 $(obj)$(SPL_BIN).srec
 +   $(OBJCOPY) $(OBJCFLAGS) $(SPL_OBJCFLAGS) -O binary $ $@

  GEN_UBOOT = \
 cd $(obj)  $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) $(__START) \
 --
 1.8.3.2
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 00/11 V10] EXYNOS5420: Add SMDK5420 board support

2013-12-12 Thread Rajeshwari Birje
Hi Minkyu Kang,

Can we get this patch set reviewed..

On Wed, Dec 11, 2013 at 9:55 AM, Rajeshwari Birje
rajeshwari.bi...@gmail.com wrote:
 Hi Minkyu Kang,

 Please do let me know if any coments on this patch set.

 On Mon, Dec 9, 2013 at 2:20 PM, Rajeshwari S Shinde
 rajeshwar...@samsung.com wrote:
 This patch adds basic board support for SMDK5420 board.
 These patches are tested for booting fine on EVT1 SMDK5420.

 Changes in V2:
 - Corrected a compilation issue for SMDK5420.

 Changes in V3:
 - Add patch to support variable size SPL support
 - Add patch to disable SMU for eMMC.

 Changes in V4:
 - Added check for MAX77686 pmic compilation.
 - Added correct calculation of gpio based addresses.
 - Rebased on the latest u-boot code.
 - Removed patches for UART and TZPC changes as
 they were not needed.
 - Added flag to disable SMU for eMMC.

 Changes in V5:
 - Moved functions board_mmc_init and board_eth_init
 to common/board.c in case of device tree support.

 Changes in V6:
 - Rebased on the latest mainline branch.
 - Moved the definitions for SMU to arch/arm dwmmc.h

 Changes in V7:
 - Removed below patch as it is already merged
 DWMMC: SMDK5420: Disable SMU for eMMC
 - Corrected the multi line comments and removal of
 blank spaces and lines.
 - Corrected the license.

 Changes in V8:
 - corrected the if loops with if conditions of
 pro_id and cpu_id.

 Changes in V9:
 - Added macros to get the base address
 - Rebased on latest code.

 Changes in V10:
 - Added new structures for Power and DMC registers for
 5420.
 - Changed the input parameters for common dmc functions.
 - Removed unnecesarry blank lines and added where ever required.

 Rajeshwari S Shinde (11):
   EXYNOS5: Create a common board file
   Exynos5420: Add base addresses for 5420
   EXYNOS5420: Add power register structure.
   EXYNOS5420: Add dmc and phy_control register structure
   Exynos5420: Add clock initialization for 5420
   Exynos5420: Add DDR3 initialization for 5420
   Exynos5420: Add support for 5420 in pinmux and gpio
   Exynos5420: Add base patch for SMDK5420
   DTS: Add dts support for SMDK5420
   Config: Add initial config for SMDK5420
   SPL: EXYNOS: Prepare for variable size SPL support

  arch/arm/cpu/armv7/exynos/clock.c  | 280 -
  arch/arm/cpu/armv7/exynos/clock_init.h |  17 +
  arch/arm/cpu/armv7/exynos/clock_init_exynos5.c | 352 ++-
  arch/arm/cpu/armv7/exynos/dmc_common.c |  60 +-
  arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c  | 439 -
  arch/arm/cpu/armv7/exynos/exynos5_setup.h  | 764 --
  arch/arm/cpu/armv7/exynos/pinmux.c | 260 +++-
  arch/arm/dts/exynos5.dtsi  | 198 ++
  arch/arm/dts/exynos5250.dtsi   | 194 +-
  arch/arm/dts/exynos5420.dtsi   |  70 +++
  arch/arm/include/asm/arch-exynos/board.h   |  17 +
  arch/arm/include/asm/arch-exynos/clk.h |   1 +
  arch/arm/include/asm/arch-exynos/clock.h   | 494 +++
  arch/arm/include/asm/arch-exynos/cpu.h |  52 +-
  arch/arm/include/asm/arch-exynos/dmc.h | 177 ++
  arch/arm/include/asm/arch-exynos/gpio.h| 143 -
  arch/arm/include/asm/arch-exynos/periph.h  |   3 +
  arch/arm/include/asm/arch-exynos/power.h   | 837 
 +
  board/samsung/common/Makefile  |   4 +
  board/samsung/common/board.c   | 410 
  board/samsung/dts/exynos5420-smdk5420.dts  | 169 +
  board/samsung/smdk5250/exynos5-dt.c| 352 +--
  board/samsung/smdk5250/smdk5250.c  | 182 +-
  board/samsung/smdk5420/Makefile|  11 +
  board/samsung/smdk5420/smdk5420.c  | 159 +
  board/samsung/smdk5420/smdk5420_spl.c  |  52 ++
  boards.cfg |   1 +
  include/configs/arndale.h  |   1 +
  include/configs/exynos5-dt.h   | 289 +
  include/configs/exynos5250-dt.h| 283 +
  include/configs/smdk5420.h |  56 ++
  spl/Makefile   |   7 +-
  tools/Makefile |   3 +-
  tools/mkexynosspl.c| 167 +++--
  34 files changed, 5189 insertions(+), 1315 deletions(-)
  create mode 100644 arch/arm/dts/exynos5.dtsi
  create mode 100644 arch/arm/dts/exynos5420.dtsi
  create mode 100644 arch/arm/include/asm/arch-exynos/board.h
  create mode 100644 board/samsung/common/board.c
  create mode 100644 board/samsung/dts/exynos5420-smdk5420.dts
  create mode 100644 board/samsung/smdk5420/Makefile
  create mode 100644 board/samsung/smdk5420/smdk5420.c
  create mode 100644 board

Re: [U-Boot] [PATCH 00/11 V10] EXYNOS5420: Add SMDK5420 board support

2013-12-10 Thread Rajeshwari Birje
Hi Minkyu Kang,

Please do let me know if any coments on this patch set.

On Mon, Dec 9, 2013 at 2:20 PM, Rajeshwari S Shinde
rajeshwar...@samsung.com wrote:
 This patch adds basic board support for SMDK5420 board.
 These patches are tested for booting fine on EVT1 SMDK5420.

 Changes in V2:
 - Corrected a compilation issue for SMDK5420.

 Changes in V3:
 - Add patch to support variable size SPL support
 - Add patch to disable SMU for eMMC.

 Changes in V4:
 - Added check for MAX77686 pmic compilation.
 - Added correct calculation of gpio based addresses.
 - Rebased on the latest u-boot code.
 - Removed patches for UART and TZPC changes as
 they were not needed.
 - Added flag to disable SMU for eMMC.

 Changes in V5:
 - Moved functions board_mmc_init and board_eth_init
 to common/board.c in case of device tree support.

 Changes in V6:
 - Rebased on the latest mainline branch.
 - Moved the definitions for SMU to arch/arm dwmmc.h

 Changes in V7:
 - Removed below patch as it is already merged
 DWMMC: SMDK5420: Disable SMU for eMMC
 - Corrected the multi line comments and removal of
 blank spaces and lines.
 - Corrected the license.

 Changes in V8:
 - corrected the if loops with if conditions of
 pro_id and cpu_id.

 Changes in V9:
 - Added macros to get the base address
 - Rebased on latest code.

 Changes in V10:
 - Added new structures for Power and DMC registers for
 5420.
 - Changed the input parameters for common dmc functions.
 - Removed unnecesarry blank lines and added where ever required.

 Rajeshwari S Shinde (11):
   EXYNOS5: Create a common board file
   Exynos5420: Add base addresses for 5420
   EXYNOS5420: Add power register structure.
   EXYNOS5420: Add dmc and phy_control register structure
   Exynos5420: Add clock initialization for 5420
   Exynos5420: Add DDR3 initialization for 5420
   Exynos5420: Add support for 5420 in pinmux and gpio
   Exynos5420: Add base patch for SMDK5420
   DTS: Add dts support for SMDK5420
   Config: Add initial config for SMDK5420
   SPL: EXYNOS: Prepare for variable size SPL support

  arch/arm/cpu/armv7/exynos/clock.c  | 280 -
  arch/arm/cpu/armv7/exynos/clock_init.h |  17 +
  arch/arm/cpu/armv7/exynos/clock_init_exynos5.c | 352 ++-
  arch/arm/cpu/armv7/exynos/dmc_common.c |  60 +-
  arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c  | 439 -
  arch/arm/cpu/armv7/exynos/exynos5_setup.h  | 764 --
  arch/arm/cpu/armv7/exynos/pinmux.c | 260 +++-
  arch/arm/dts/exynos5.dtsi  | 198 ++
  arch/arm/dts/exynos5250.dtsi   | 194 +-
  arch/arm/dts/exynos5420.dtsi   |  70 +++
  arch/arm/include/asm/arch-exynos/board.h   |  17 +
  arch/arm/include/asm/arch-exynos/clk.h |   1 +
  arch/arm/include/asm/arch-exynos/clock.h   | 494 +++
  arch/arm/include/asm/arch-exynos/cpu.h |  52 +-
  arch/arm/include/asm/arch-exynos/dmc.h | 177 ++
  arch/arm/include/asm/arch-exynos/gpio.h| 143 -
  arch/arm/include/asm/arch-exynos/periph.h  |   3 +
  arch/arm/include/asm/arch-exynos/power.h   | 837 
 +
  board/samsung/common/Makefile  |   4 +
  board/samsung/common/board.c   | 410 
  board/samsung/dts/exynos5420-smdk5420.dts  | 169 +
  board/samsung/smdk5250/exynos5-dt.c| 352 +--
  board/samsung/smdk5250/smdk5250.c  | 182 +-
  board/samsung/smdk5420/Makefile|  11 +
  board/samsung/smdk5420/smdk5420.c  | 159 +
  board/samsung/smdk5420/smdk5420_spl.c  |  52 ++
  boards.cfg |   1 +
  include/configs/arndale.h  |   1 +
  include/configs/exynos5-dt.h   | 289 +
  include/configs/exynos5250-dt.h| 283 +
  include/configs/smdk5420.h |  56 ++
  spl/Makefile   |   7 +-
  tools/Makefile |   3 +-
  tools/mkexynosspl.c| 167 +++--
  34 files changed, 5189 insertions(+), 1315 deletions(-)
  create mode 100644 arch/arm/dts/exynos5.dtsi
  create mode 100644 arch/arm/dts/exynos5420.dtsi
  create mode 100644 arch/arm/include/asm/arch-exynos/board.h
  create mode 100644 board/samsung/common/board.c
  create mode 100644 board/samsung/dts/exynos5420-smdk5420.dts
  create mode 100644 board/samsung/smdk5420/Makefile
  create mode 100644 board/samsung/smdk5420/smdk5420.c
  create mode 100644 board/samsung/smdk5420/smdk5420_spl.c
  create mode 100644 include/configs/exynos5-dt.h
  create mode 100644 include/configs/smdk5420.h

 --
 

Re: [U-Boot] [PATCH 4/9 V9] Exynos5420: Add DDR3 initialization for 5420

2013-12-09 Thread Rajeshwari Birje
Hi Minkyu Kang,

Please do find the comment bellow.

On Thu, Dec 5, 2013 at 12:55 PM, Rajeshwari Birje
rajeshwari.bi...@gmail.com wrote:
 Hi Minkyu Kang,

 Thank you for comments.

 On Tue, Dec 3, 2013 at 11:45 AM, Minkyu Kang mk7.k...@samsung.com wrote:
 Dear Rajeshwari S Shinde,

 On 02/12/13 20:47, Rajeshwari S Shinde wrote:
 This patch intends to add DDR3 initialization code for Exynos5420.

 Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
 Signed-off-by: Akshay Saraswat aksha...@samsung.com
 Acked-by: Simon Glass s...@chromium.org
 ---
 Changes in V2:
   - Corrected a compilation issue for SMDK5250.
 Changes in V3:
   - None
 Changes in V4:
   - None
 Changes in V5:
   - None
 Changes in V6:
   - None
 Changes in V7:
   - Fixed multi line comment.
 Changes in V8:
   - None
 Changes in V9:
   - Used samsung_get base to get the dmc base address
  arch/arm/cpu/armv7/exynos/dmc_common.c|  10 +-
  arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c | 425 
 +-
  arch/arm/cpu/armv7/exynos/exynos5_setup.h |   2 +
  arch/arm/include/asm/arch-exynos/cpu.h|   4 +
  arch/arm/include/asm/arch-exynos/dmc.h| 123 ++---
  arch/arm/include/asm/arch-exynos/power.h  |   6 +
  6 files changed, 525 insertions(+), 45 deletions(-)

 diff --git a/arch/arm/cpu/armv7/exynos/dmc_common.c 
 b/arch/arm/cpu/armv7/exynos/dmc_common.c
 index 53cfe6e..9e432c2 100644
 --- a/arch/arm/cpu/armv7/exynos/dmc_common.c
 +++ b/arch/arm/cpu/armv7/exynos/dmc_common.c
 @@ -1,5 +1,5 @@
  /*
 - * Mem setup common file for different types of DDR present on SMDK5250 
 boards.
 + * Mem setup common file for different types of DDR present on Exynos 
 boards.
   *
   * Copyright (C) 2012 Samsung Electronics
   *
 @@ -152,14 +152,6 @@ void dmc_config_prech(struct mem_timings *mem, struct 
 exynos5_dmc *dmc)
   }
  }

 -void dmc_config_memory(struct mem_timings *mem, struct exynos5_dmc *dmc)
 -{
 - writel(mem-memconfig, dmc-memconfig0);
 - writel(mem-memconfig, dmc-memconfig1);
 - writel(DMC_MEMBASECONFIG0_VAL, dmc-membaseconfig0);
 - writel(DMC_MEMBASECONFIG1_VAL, dmc-membaseconfig1);
 -}
 -
  void mem_ctrl_init(int reset)
  {
   struct spl_machine_param *param = spl_get_machine_params();
 diff --git a/arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c 
 b/arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c
 index 5f5914e..aa46a43 100644
 --- a/arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c
 +++ b/arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c
 @@ -1,5 +1,5 @@
  /*
 - * DDR3 mem setup file for SMDK5250 board based on EXYNOS5
 + * DDR3 mem setup file for board based on EXYNOS5
   *
   * Copyright (C) 2012 Samsung Electronics
   *
 @@ -11,12 +11,14 @@
  #include asm/arch/clock.h
  #include asm/arch/cpu.h
  #include asm/arch/dmc.h
 +#include asm/arch/power.h
  #include common_setup.h
  #include exynos5_setup.h
  #include clock_init.h

 -#define RDLVL_COMPLETE_TIMEOUT   1
 +#define TIMEOUT  1

 +#ifdef CONFIG_EXYNOS5250
  static void reset_phy_ctrl(void)
  {
   struct exynos5_clock *clk =
 @@ -108,7 +110,7 @@ int ddr3_mem_ctrl_init(struct mem_timings *mem, 
 unsigned long mem_iv_size,

   /* Precharge Configuration */
   writel(mem-prechconfig_tp_cnt  PRECHCONFIG_TP_CNT_SHIFT,
 -dmc-prechconfig);
 +dmc-prechconfig0);

   /* Power Down mode Configuration */
   writel(mem-dpwrdn_cyc  PWRDNCONFIG_DPWRDN_CYC_SHIFT |
 @@ -174,7 +176,7 @@ int ddr3_mem_ctrl_init(struct mem_timings *mem, 
 unsigned long mem_iv_size,
   writel(val, phy1_ctrl-phy_con1);

   writel(CTRL_RDLVL_GATE_ENABLE, dmc-rdlvl_config);
 - i = RDLVL_COMPLETE_TIMEOUT;
 + i = TIMEOUT;
   while ((readl(dmc-phystatus) 
   (RDLVL_COMPLETE_CHO | RDLVL_COMPLETE_CH1)) !=
   (RDLVL_COMPLETE_CHO | RDLVL_COMPLETE_CH1)  i  0) {
 @@ -215,3 +217,418 @@ int ddr3_mem_ctrl_init(struct mem_timings *mem, 
 unsigned long mem_iv_size,
   | (mem-aref_en  CONCONTROL_AREF_EN_SHIFT), 
 dmc-concontrol);
   return 0;
  }
 +#endif
 +
 +#ifdef CONFIG_EXYNOS5420

 we can avoid ifdef here.

 int ddr3_mem_ctrl_init(...)
 {
 if (proid_is_exynos5250())
 exynos5250_ddr3_mem_ctrl_init();
 else
 exynos5420_ddr3_mem_ctrl_init();
 }

 Will do it this way
Doing it this way increases the spl size.
hence will keep the #ifdef defines.

-- 
Regards,
Rajeshwari Shinde

 +int ddr3_mem_ctrl_init(struct mem_timings *mem, unsigned long mem_iv_size,
 +int reset)
 +{
 + struct exynos5420_clock *clk =
 + (struct exynos5420_clock *)samsung_get_base_clock();
 + struct exynos5_power *power =
 + (struct exynos5_power *)samsung_get_base_power();
 + struct exynos5_phy_control *phy0_ctrl, *phy1_ctrl;
 + struct exynos5_dmc *drex0, *drex1;
 + struct exynos5_tzasc *tzasc0, *tzasc1;
 + uint32_t val

[U-Boot] SMDK5250 not booting on latest U-boot-samsung

2013-12-08 Thread Rajeshwari Birje
Hi All,

I have tried booting SMDK5250 on the latest U-boot-Samsung branch, It
builds fine but does not boot.
Observation:
If revert the following patch it works fine:
commit 47ed5dd031d7d2c587e6afd386e79ccec1a1b7f7
Author: Albert ARIBAUD albert.u.b...@aribaud.net
Date:   Thu Nov 7 14:21:46 2013 +0100

arm: keep all sections in ELF file

Current LDS files /DISCARD/ a lot of sections when linking ELF
files, causing diagnostic tools such as readelf or objdump to
produce partial output. Keep all section at link stage, filter
only at objcopy time so that .bin remains minimal.

Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net
Reviewed-by: Benoît Thébaudeau benoit.thebaud...@advansee.com

Kindly do let me know if any changes to be made.
-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/5] ARM: Exynos5250: move feature defines out of generic config file

2013-12-05 Thread Rajeshwari Birje
Hi Andre,

I have submitted a patch set for support of exynos5420 in which I
separate the config files to form one
common exynos5-dt.h and which is inherited in 5420 and 5250 config file.
May be u can use the same patch.


On Thu, Dec 5, 2013 at 1:38 PM, Minkyu Kang mk7.k...@samsung.com wrote:
 On 25/09/13 19:42, Andre Przywara wrote:
 The config file exynos5250-dt.h is used by two boards currently.
 To allow the Arndale board to use it too in the future, move some
 board specific defines out of that generic file.
 Update the copyright, header comment and include protection define
 on the way.

 Signed-off-by: Andre Przywara andre.przyw...@linaro.org
 ---
  include/configs/exynos5250-dt.h | 15 ---
  include/configs/smdk5250.h  | 10 +-
  include/configs/snow.h  | 10 +-
  3 files changed, 22 insertions(+), 13 deletions(-)

 diff --git a/include/configs/exynos5250-dt.h 
 b/include/configs/exynos5250-dt.h
 index c8c4b35..e855745 100644
 --- a/include/configs/exynos5250-dt.h
 +++ b/include/configs/exynos5250-dt.h
 @@ -1,13 +1,13 @@
  /*
 - * Copyright (C) 2012 Samsung Electronics
 + * Copyright (C) 2012,2013 Samsung Electronics
   *
 - * Configuration settings for the SAMSUNG EXYNOS5250 board.
 + * Configuration settings for SAMSUNG EXYNOS5250 based boards.
   *
   * SPDX-License-Identifier:  GPL-2.0+
   */

 -#ifndef __CONFIG_H
 -#define __CONFIG_H
 +#ifndef __CONFIG_EXYNOS_5250_DT_H
 +#define __CONFIG_EXYNOS_5250_DT_H

  /* High Level Configuration Options */
  #define CONFIG_SAMSUNG   /* in a SAMSUNG core */
 @@ -165,7 +165,6 @@
  /* Miscellaneous configurable options */
  #define CONFIG_SYS_LONGHELP  /* undef to save memory */
  #define CONFIG_SYS_HUSH_PARSER   /* use hush command parser   
  */
 -#define CONFIG_SYS_PROMPTSMDK5250 # 
  #define CONFIG_SYS_CBSIZE256 /* Console I/O Buffer Size */
  #define CONFIG_SYS_PBSIZE384 /* Print Buffer Size */
  #define CONFIG_SYS_MAXARGS   16  /* max number of command args 
 */
 @@ -205,7 +204,6 @@
  /* FLASH and environment organization */
  #define CONFIG_SYS_NO_FLASH
  #undef CONFIG_CMD_IMLS
 -#define CONFIG_IDENT_STRING   for SMDK5250

  #define CONFIG_SYS_MMC_ENV_DEV   0

 @@ -258,9 +256,6 @@
  #define CONFIG_I2C_EDID

  /* SPI */
 -#define CONFIG_ENV_IS_IN_SPI_FLASH
 -#define CONFIG_SPI_FLASH
 -
  #ifdef CONFIG_SPI_FLASH
  #define CONFIG_EXYNOS_SPI
  #define CONFIG_CMD_SF
 @@ -299,7 +294,6 @@
  #endif

  /* Sound */
 -#define CONFIG_CMD_SOUND
  #ifdef CONFIG_CMD_SOUND
  #define CONFIG_SOUND
  #define CONFIG_I2S
 @@ -317,7 +311,6 @@
  #define CONFIG_SHA256

  /* Display */
 -#define CONFIG_LCD
  #ifdef CONFIG_LCD
  #define CONFIG_EXYNOS_FB
  #define CONFIG_EXYNOS_DP
 diff --git a/include/configs/smdk5250.h b/include/configs/smdk5250.h
 index 183aae7..b1bb783 100644
 --- a/include/configs/smdk5250.h
 +++ b/include/configs/smdk5250.h
 @@ -9,9 +9,17 @@
  #ifndef __CONFIG_SMDK_H
  #define __CONFIG_SMDK_H

 +#define CONFIG_ENV_IS_IN_SPI_FLASH
 +#define CONFIG_SPI_FLASH
 +#define CONFIG_LCD
 +#define CONFIG_CMD_SOUND
 +
  #include configs/exynos5250-dt.h

 -#undef CONFIG_DEFAULT_DEVICE_TREE
  #define CONFIG_DEFAULT_DEVICE_TREE   exynos5250-smdk5250

 +#define CONFIG_SYS_PROMPT   SMDK5250 # 
 +
 +#define CONFIG_IDENT_STRING   for SMDK5250
 +
  #endif   /* __CONFIG_SMDK_H */
 diff --git a/include/configs/snow.h b/include/configs/snow.h
 index ed5c0b6..4d34c48 100644
 --- a/include/configs/snow.h
 +++ b/include/configs/snow.h
 @@ -9,9 +9,17 @@
  #ifndef __CONFIG_SNOW_H
  #define __CONFIG_SNOW_H

 +#define CONFIG_ENV_IS_IN_SPI_FLASH
 +#define CONFIG_SPI_FLASH
 +#define CONFIG_LCD
 +#define CONFIG_CMD_SOUND
 +
  #include configs/exynos5250-dt.h

 -#undef CONFIG_DEFAULT_DEVICE_TREE
  #define CONFIG_DEFAULT_DEVICE_TREE   exynos5250-snow

 +#define CONFIG_SYS_PROMPT   SMDK5250 # 

 SNOW #?

 +
 +#define CONFIG_IDENT_STRING   for SMDK5250

 SNOW?

 +
  #endif   /* __CONFIG_SNOW_H */


 Thanks,
 Minkyu Kang.
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot
-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/9 V9] Exynos5420: Add DDR3 initialization for 5420

2013-12-04 Thread Rajeshwari Birje
Hi Minkyu Kang,

Thank you for comments.

On Tue, Dec 3, 2013 at 11:45 AM, Minkyu Kang mk7.k...@samsung.com wrote:
 Dear Rajeshwari S Shinde,

 On 02/12/13 20:47, Rajeshwari S Shinde wrote:
 This patch intends to add DDR3 initialization code for Exynos5420.

 Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
 Signed-off-by: Akshay Saraswat aksha...@samsung.com
 Acked-by: Simon Glass s...@chromium.org
 ---
 Changes in V2:
   - Corrected a compilation issue for SMDK5250.
 Changes in V3:
   - None
 Changes in V4:
   - None
 Changes in V5:
   - None
 Changes in V6:
   - None
 Changes in V7:
   - Fixed multi line comment.
 Changes in V8:
   - None
 Changes in V9:
   - Used samsung_get base to get the dmc base address
  arch/arm/cpu/armv7/exynos/dmc_common.c|  10 +-
  arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c | 425 
 +-
  arch/arm/cpu/armv7/exynos/exynos5_setup.h |   2 +
  arch/arm/include/asm/arch-exynos/cpu.h|   4 +
  arch/arm/include/asm/arch-exynos/dmc.h| 123 ++---
  arch/arm/include/asm/arch-exynos/power.h  |   6 +
  6 files changed, 525 insertions(+), 45 deletions(-)

 diff --git a/arch/arm/cpu/armv7/exynos/dmc_common.c 
 b/arch/arm/cpu/armv7/exynos/dmc_common.c
 index 53cfe6e..9e432c2 100644
 --- a/arch/arm/cpu/armv7/exynos/dmc_common.c
 +++ b/arch/arm/cpu/armv7/exynos/dmc_common.c
 @@ -1,5 +1,5 @@
  /*
 - * Mem setup common file for different types of DDR present on SMDK5250 
 boards.
 + * Mem setup common file for different types of DDR present on Exynos 
 boards.
   *
   * Copyright (C) 2012 Samsung Electronics
   *
 @@ -152,14 +152,6 @@ void dmc_config_prech(struct mem_timings *mem, struct 
 exynos5_dmc *dmc)
   }
  }

 -void dmc_config_memory(struct mem_timings *mem, struct exynos5_dmc *dmc)
 -{
 - writel(mem-memconfig, dmc-memconfig0);
 - writel(mem-memconfig, dmc-memconfig1);
 - writel(DMC_MEMBASECONFIG0_VAL, dmc-membaseconfig0);
 - writel(DMC_MEMBASECONFIG1_VAL, dmc-membaseconfig1);
 -}
 -
  void mem_ctrl_init(int reset)
  {
   struct spl_machine_param *param = spl_get_machine_params();
 diff --git a/arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c 
 b/arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c
 index 5f5914e..aa46a43 100644
 --- a/arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c
 +++ b/arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c
 @@ -1,5 +1,5 @@
  /*
 - * DDR3 mem setup file for SMDK5250 board based on EXYNOS5
 + * DDR3 mem setup file for board based on EXYNOS5
   *
   * Copyright (C) 2012 Samsung Electronics
   *
 @@ -11,12 +11,14 @@
  #include asm/arch/clock.h
  #include asm/arch/cpu.h
  #include asm/arch/dmc.h
 +#include asm/arch/power.h
  #include common_setup.h
  #include exynos5_setup.h
  #include clock_init.h

 -#define RDLVL_COMPLETE_TIMEOUT   1
 +#define TIMEOUT  1

 +#ifdef CONFIG_EXYNOS5250
  static void reset_phy_ctrl(void)
  {
   struct exynos5_clock *clk =
 @@ -108,7 +110,7 @@ int ddr3_mem_ctrl_init(struct mem_timings *mem, unsigned 
 long mem_iv_size,

   /* Precharge Configuration */
   writel(mem-prechconfig_tp_cnt  PRECHCONFIG_TP_CNT_SHIFT,
 -dmc-prechconfig);
 +dmc-prechconfig0);

   /* Power Down mode Configuration */
   writel(mem-dpwrdn_cyc  PWRDNCONFIG_DPWRDN_CYC_SHIFT |
 @@ -174,7 +176,7 @@ int ddr3_mem_ctrl_init(struct mem_timings *mem, unsigned 
 long mem_iv_size,
   writel(val, phy1_ctrl-phy_con1);

   writel(CTRL_RDLVL_GATE_ENABLE, dmc-rdlvl_config);
 - i = RDLVL_COMPLETE_TIMEOUT;
 + i = TIMEOUT;
   while ((readl(dmc-phystatus) 
   (RDLVL_COMPLETE_CHO | RDLVL_COMPLETE_CH1)) !=
   (RDLVL_COMPLETE_CHO | RDLVL_COMPLETE_CH1)  i  0) {
 @@ -215,3 +217,418 @@ int ddr3_mem_ctrl_init(struct mem_timings *mem, 
 unsigned long mem_iv_size,
   | (mem-aref_en  CONCONTROL_AREF_EN_SHIFT), 
 dmc-concontrol);
   return 0;
  }
 +#endif
 +
 +#ifdef CONFIG_EXYNOS5420

 we can avoid ifdef here.

 int ddr3_mem_ctrl_init(...)
 {
 if (proid_is_exynos5250())
 exynos5250_ddr3_mem_ctrl_init();
 else
 exynos5420_ddr3_mem_ctrl_init();
 }

Will do it this way
 +int ddr3_mem_ctrl_init(struct mem_timings *mem, unsigned long mem_iv_size,
 +int reset)
 +{
 + struct exynos5420_clock *clk =
 + (struct exynos5420_clock *)samsung_get_base_clock();
 + struct exynos5_power *power =
 + (struct exynos5_power *)samsung_get_base_power();
 + struct exynos5_phy_control *phy0_ctrl, *phy1_ctrl;
 + struct exynos5_dmc *drex0, *drex1;
 + struct exynos5_tzasc *tzasc0, *tzasc1;
 + uint32_t val, n_lock_r, n_lock_w_phy0, n_lock_w_phy1;
 + int chip;
 + int i;
 +
 + phy0_ctrl = (struct exynos5_phy_control *)samsung_get_base_dmc_phy();
 + phy1_ctrl = (struct exynos5_phy_control *)(samsung_get_base_dmc_phy()
 +

Re: [U-Boot] [PATCH V3] exynos: spl: Add a custom spi copy function

2013-12-02 Thread Rajeshwari Birje
Hi Minkyu Kang,

Thank you for comments.



On Mon, Dec 2, 2013 at 2:18 PM, Minkyu Kang mk7.k...@samsung.com wrote:
 On 09/10/13 16:55, Rajeshwari Birje wrote:
 Hi Minkyu Kang,

 Since this patch is related to arch/arm spi booting, I had a doubt
 where would it get merged in u-boot-samsung.git or u-boot-spi.git.

 This patch is based on [U-Boot] [PATCH 4/4] spi: exynos: Support word
 transfers which is already merged in u-boot-spi.git.

 Now, that patch is merged to u-boot-samsung.
 Anyway I'm OK to pick this patch to u-boot-spi.


 Regards,
 Rajeshwari Shinde.

 On Tue, Oct 8, 2013 at 6:42 PM, Rajeshwari S Shinde
 rajeshwar...@samsung.com wrote:
 This patch implements a custom spi_copy funtion to copy u-boot from SF
 to RAM. This is faster then iROM spi_copy funtion as this runs spi at
 50Mhz and also in WORD mode of operation.

 Changed a printf in pinmux.c to debug just to avoid the compilation
 error in SPL.

 Signed-off-by: Alim Akhtar alim.akh...@samsung.com
 Signed-off-by: Tom Wai-Hong Tam waih...@chromium.org
 Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
 ---
 Based on following patch yet to be merged:
 [U-Boot] [PATCH 4/4] spi: exynos: Support word transfers
 Changes in V2:
 - Corrected the commit message.
 - Added a SPI timeout check.
 - Corrected the comments.
 Changes in V3:
 - Rebased on the latest u-boot-spi tree.
  arch/arm/cpu/armv7/exynos/pinmux.c |   2 +-
  arch/arm/cpu/armv7/exynos/spl_boot.c   | 122 
 -
  arch/arm/include/asm/arch-exynos/spi.h |   1 +
  include/configs/exynos5250-dt.h|   2 +
  4 files changed, 123 insertions(+), 4 deletions(-)

 diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c 
 b/arch/arm/cpu/armv7/exynos/pinmux.c
 index 8002bce..74cc700 100644
 --- a/arch/arm/cpu/armv7/exynos/pinmux.c
 +++ b/arch/arm/cpu/armv7/exynos/pinmux.c
 @@ -462,7 +462,7 @@ static int exynos4_pinmux_config(int peripheral, int 
 flags)
 case PERIPH_ID_SDMMC1:
 case PERIPH_ID_SDMMC3:
 case PERIPH_ID_SDMMC4:
 -   printf(SDMMC device %d not implemented\n, peripheral);
 +   debug(SDMMC device %d not implemented\n, peripheral);

 unrelated change.

As mentioned commit message
Changed a printf in pinmux.c to debug just to avoid the compilation
error in SPL.
 return -1;
 default:
 debug(%s: invalid peripheral %d, __func__, peripheral);
 diff --git a/arch/arm/cpu/armv7/exynos/spl_boot.c 
 b/arch/arm/cpu/armv7/exynos/spl_boot.c
 index 3651c00..6faf13f 100644
 --- a/arch/arm/cpu/armv7/exynos/spl_boot.c
 +++ b/arch/arm/cpu/armv7/exynos/spl_boot.c
 @@ -10,8 +10,11 @@
  #include asm/arch/clock.h
  #include asm/arch/clk.h
  #include asm/arch/dmc.h
 +#include asm/arch/periph.h
 +#include asm/arch/pinmux.h
  #include asm/arch/power.h
  #include asm/arch/spl.h
 +#include asm/arch/spi.h

  #include common_setup.h
  #include clock_init.h
 @@ -59,6 +62,119 @@ static int config_branch_prediction(int set_cr_z)
  }
  #endif

 +static void spi_rx_tx(struct exynos_spi *regs, int todo,
 +   void *dinp, void const *doutp, int i)
 +{
 +   uint *rxp = (uint *)(dinp + (i * (32 * 1024)));
 +   int rx_lvl, tx_lvl;
 +   uint out_bytes, in_bytes;
 +
 +   out_bytes = todo;
 +   in_bytes = todo;
 +   setbits_le32(regs-ch_cfg, SPI_CH_RST);
 +   clrbits_le32(regs-ch_cfg, SPI_CH_RST);
 +   writel(((todo * 8) / 32) | SPI_PACKET_CNT_EN, regs-pkt_cnt);
 +
 +   while (in_bytes) {
 +   uint32_t spi_sts;
 +   int temp;
 +
 +   spi_sts = readl(regs-spi_sts);
 +   rx_lvl = ((spi_sts  15)  0x7f);
 +   tx_lvl = ((spi_sts  6)  0x7f);
 +   while (tx_lvl  32  out_bytes) {
 +   temp = 0x;
 +   writel(temp, regs-tx_data);
 +   out_bytes -= 4;
 +   tx_lvl += 4;
 +   }
 +   while (rx_lvl = 4  in_bytes) {
 +   temp = readl(regs-rx_data);
 +   if (rxp)
 +   *rxp++ = temp;
 +   in_bytes -= 4;
 +   rx_lvl -= 4;
 +   }
 +   }
 +}
 +
 +/*
 + * Copy uboot from spi flash to RAM
 + *
 + * @parma uboot_size   size of u-boot to copy
 + * @param uboot_addr   address in u-boot to copy
 + */
 +static void exynos_spi_copy(unsigned int uboot_size, unsigned int 
 uboot_addr)
 +{
 +   int upto, todo;
 +   int i, timeout = 100;
 +   struct exynos_spi *regs = (struct exynos_spi *)CONFIG_ENV_SPI_BASE;
 +
 +   set_spi_clk(PERIPH_ID_SPI1, 5000); /* set spi clock to 50Mhz */
 +   /* set the spi1 GPIO */
 +   exynos_pinmux_config(PERIPH_ID_SPI1, PINMUX_FLAG_NONE);
 +
 +   /* set pktcnt and enable it */
 +   writel(4 | SPI_PACKET_CNT_EN, regs-pkt_cnt);
 +   /* set FB_CLK_SEL */
 +   writel

Re: [U-Boot] [PATCH v2] dwmmc: make driver usable for non-exynos platforms

2013-12-01 Thread Rajeshwari Birje
Hi All,

Iam a bit confused here.
After Jaehoon Chung has submitted the following patch:
https://www.mail-archive.com/u-boot@lists.denx.de/msg126921.html;

Do we need to include this patch also?

Regards,
Rajeshwari Shinde.


On Fri, Nov 29, 2013 at 5:46 PM, Alexey Brodkin
alexey.brod...@synopsys.com wrote:
 All looks good from my side;

 Please do a boot test on the real hardware and let me know before
 I can apply.


 Hi Pantelis,

 confirming - builds/works good for me.

 -Alexey
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mmc: dw_mmc: remove the exynos specific code in dw-mmc.c

2013-11-29 Thread Rajeshwari Birje
Hi,

Had raised this point when I had got comments for the patch
[10/10,V4] DWMMC: SMDK5420: Disable SMU for eMMC
https://patches.linaro.org/20666/

Acked-by:Rajeshwari Shinde rajeshwar...@samsung.com

Regards,
Rajeshwari Shinde

On Fri, Nov 29, 2013 at 4:53 PM, Alexey Brodkin
alexey.brod...@synopsys.com wrote:
 Acked-by: Alexey Brodkin abrod...@synopsys.com

 On Fri, 2013-11-29 at 20:08 +0900, Jaehoon Chung wrote:
 dw-mmc.c is the general driver file.
 So, remove the exynos specific code at dw-mmc.c.
 Instead, exynos specific cod can be move into exynos-dw_mmc.c.

 Signed-off-by: Jaehoon Chung jh80.ch...@samsung.com

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/9 v8] EXYNOS5420: Add SMDK5420 board support

2013-11-25 Thread Rajeshwari Birje
Hi Minkyu Kang.

Please do let me know if any comments or can we get this merged?

On Fri, Nov 15, 2013 at 10:29 AM, Rajeshwari S Shinde
rajeshwar...@samsung.com wrote:
 This patch adds basic board support for SMDK5420 board.
 These patches are tested for booting fine on EVT1 SMDK5420.

 Changes in V2:
 - Corrected a compilation issue for SMDK5420.

 Changes in V3:
 - Add patch to support variable size SPL support
 - Add patch to disable SMU for eMMC.

 Changes in V4:
 - Added check for MAX77686 pmic compilation.
 - Added correct calculation of gpio based addresses.
 - Rebased on the latest u-boot code.
 - Removed patches for UART and TZPC changes as
 they were not needed.
 - Added flag to disable SMU for eMMC.

 Changes in V5:
 - Moved functions board_mmc_init and board_eth_init
 to common/board.c in case of device tree support.

 Changes in V6:
 - Rebased on the latest mainline branch.
 - Moved the definitions for SMU to arch/arm dwmmc.h

 Changes in V7:
 - Removed below patch as it is already merged
 DWMMC: SMDK5420: Disable SMU for eMMC
 - Corrected the multi line comments and removal of
 blank spaces and lines.
 - Corrected the license.

 Changes in V8:
 - corrected the if loops with if conditions of
 pro_id and cpu_id.

 Rajeshwari S Shinde (9):
   EXYNOS5: Create a common board file
   Exynos5420: Add base addresses for 5420
   Exynos5420: Add clock initialization for 5420
   Exynos5420: Add DDR3 initialization for 5420
   Exynos5420: Add support for 5420 in pinmux and gpio
   Exynos5420: Add base patch for SMDK5420
   DTS: Add dts support for SMDK5420
   Config: Add initial config for SMDK5420
   SPL: EXYNOS: Prepare for variable size SPL support

  arch/arm/cpu/armv7/exynos/clock.c  | 258 -
  arch/arm/cpu/armv7/exynos/clock_init.h |  17 +
  arch/arm/cpu/armv7/exynos/clock_init_exynos5.c | 352 +++-
  arch/arm/cpu/armv7/exynos/dmc_common.c |  10 +-
  arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c  | 421 +-
  arch/arm/cpu/armv7/exynos/exynos5_setup.h  | 738 
 +++--
  arch/arm/cpu/armv7/exynos/pinmux.c | 260 -
  arch/arm/dts/exynos5.dtsi  | 198 +++
  arch/arm/dts/exynos5250.dtsi   | 196 +--
  arch/arm/dts/exynos5420.dtsi   |  70 +++
  arch/arm/include/asm/arch-exynos/board.h   |  17 +
  arch/arm/include/asm/arch-exynos/clk.h |   1 +
  arch/arm/include/asm/arch-exynos/clock.h   | 494 +
  arch/arm/include/asm/arch-exynos/cpu.h |  51 +-
  arch/arm/include/asm/arch-exynos/dmc.h | 123 +++--
  arch/arm/include/asm/arch-exynos/gpio.h| 143 -
  arch/arm/include/asm/arch-exynos/periph.h  |   3 +
  board/samsung/common/Makefile  |   4 +
  board/samsung/common/board.c   | 407 ++
  board/samsung/dts/exynos5420-smdk5420.dts  | 169 ++
  board/samsung/smdk5250/exynos5-dt.c| 361 +---
  board/samsung/smdk5250/smdk5250.c  | 182 +-
  board/samsung/smdk5420/Makefile|  34 ++
  board/samsung/smdk5420/smdk5420.c  | 159 ++
  board/samsung/smdk5420/smdk5420_spl.c  |  52 ++
  boards.cfg |   1 +
  include/configs/arndale.h  |   1 +
  include/configs/exynos5-dt.h   | 300 ++
  include/configs/exynos5250-dt.h| 316 +--
  include/configs/smdk5420.h |  56 ++
  spl/Makefile   |   7 +-
  tools/Makefile |   3 +-
  tools/mkexynosspl.c| 167 --
  33 files changed, 4227 insertions(+), 1344 deletions(-)
  create mode 100644 arch/arm/dts/exynos5.dtsi
  create mode 100644 arch/arm/dts/exynos5420.dtsi
  create mode 100644 arch/arm/include/asm/arch-exynos/board.h
  create mode 100644 board/samsung/common/board.c
  create mode 100644 board/samsung/dts/exynos5420-smdk5420.dts
  create mode 100644 board/samsung/smdk5420/Makefile
  create mode 100644 board/samsung/smdk5420/smdk5420.c
  create mode 100644 board/samsung/smdk5420/smdk5420_spl.c
  create mode 100644 include/configs/exynos5-dt.h
  create mode 100644 include/configs/smdk5420.h

 --
 1.7.12.4

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 07/10 V6] DTS: Add dts support for SMDK5420

2013-11-14 Thread Rajeshwari Birje
Hi Minkyu Kang,

On Thu, Nov 14, 2013 at 7:31 AM, Minkyu Kang proms...@gmail.com wrote:
 Dear Rajeshwari,


 On 13 November 2013 13:26, Rajeshwari Birje rajeshwari.bi...@gmail.com
 wrote:

 Hi Minkyu Kang,

 Thank you for comments.

 On Wed, Nov 13, 2013 at 8:47 AM, Minkyu Kang proms...@gmail.com wrote:
  Dear Rajeshwari S Shinde,
 
 
  On 29 October 2013 16:23, Rajeshwari S Shinde
  rajeshwar...@samsung.comwrote:
 
  This patch adds support for SMDK5420.
  exynos5.dtsi created is a common file which has the nodes common
  to both 5420 and 5250.
 
  Signed-off-by: Akshay Saraswat aksha...@samsung.com
  Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
  Acked-by: Simon Glass s...@chromium.org
  ---
  Changes in V2:
  - None
  Changes in V3:
  - None
  Changes in V4:
  - Added /include/ exynos5420.dtsi
  Changes in V5:
  - None
  Changes in V6:
  - None
   arch/arm/dts/exynos5.dtsi | 211
  ++
   arch/arm/dts/exynos5250.dtsi  | 178
  +
   arch/arm/dts/exynos5420.dtsi  |  74 +++
   board/samsung/dts/exynos5420-smdk5420.dts | 172
  
   4 files changed, 458 insertions(+), 177 deletions(-)
   create mode 100644 arch/arm/dts/exynos5.dtsi
   create mode 100644 arch/arm/dts/exynos5420.dtsi
   create mode 100644 board/samsung/dts/exynos5420-smdk5420.dts
 
  diff --git a/board/samsung/dts/exynos5420-smdk5420.dts
  b/board/samsung/dts/exynos5420-smdk5420.dts
  new file mode 100644
  index 000..5ef0c92
  --- /dev/null
  +++ b/board/samsung/dts/exynos5420-smdk5420.dts
  @@ -0,0 +1,172 @@
  +/*
  + * SAMSUNG SMDK5420 board device tree source
  + *
  + * Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
  + * Use of this source code is governed by a BSD-style license that can
  be
  + * found in the LICENSE file.
 
 
  is it right?
 Iam sorry did not get your question, about what are you pointing to?.


 The Copyright and License.
Have corrected this in V7.



 
 
  + */
  +
  +/dts-v1/;
  +/include/ exynos5420.dtsi
  +
  +/ {
  +   model = SAMSUNG SMDK5420 board based on EXYNOS5420;
  +   compatible = samsung,smdk5420, samsung,exynos5;
  +
  +   config {
  +   hwid = smdk5420 TEST A-A 9382;
  +   };
  +
  +   aliases {
  +   i2c0 = /i2c@12c6;
  +   i2c1 = /i2c@12c7;
  +   i2c2 = /i2c@12c8;
  +   i2c3 = /i2c@12c9;
  +   i2c4 = /i2c@12ca;
  +   i2c5 = /i2c@12cb;
  +   i2c6 = /i2c@12cc;
  +   i2c7 = /i2c@12cd;
  +   i2c8 = /i2c@12e0;
  +   i2c9 = /i2c@12e1;
  +   i2c10 = /i2c@12e2;
  +   spi0 = /spi@12d2;
  +   spi1 = /spi@12d3;
  +   spi2 = /spi@12d4;
  +   spi3 = /spi@131a;
  +   spi4 = /spi@131b;
  +   mmc0 = /mmc@1220;
  +   mmc1 = /mmc@1221;
  +   mmc2 = /mmc@1222;
  +   xhci0 = /xhci@1200;
  +   xhci1 = /xhci@1240;
  +   serial0 = /serial@12C3;
  +   console = /serial@12C3;
  +   };
  +
  +   tmu@1006 {
  +   samsung,min-temp= 25;
  +   samsung,max-temp= 125;
  +   samsung,start-warning   = 95;
  +   samsung,start-tripping  = 105;
  +   samsung,hw-tripping = 110;
  +   samsung,efuse-min-value = 40;
  +   samsung,efuse-value = 55;
  +   samsung,efuse-max-value = 100;
  +   samsung,slope   = 274761730;
  +   samsung,dc-value= 25;
  +   };
  +
  +   /* s2mps11 is on i2c bus 4 */
  +   i2c@12ca {
  +   #address-cells = 1;
  +   #size-cells = 0;
  +   pmic@66 {
  +   reg = 0x66;
  +   compatible = samsung,s2mps11-pmic;
  +   };
  +   };
  +
  +   spi@12d2 { /* spi0 */
  +   spi-max-frequency = 5000;
  +   firmware_storage_spi: flash@0 {
  +   reg = 0;
  +   };
  +   };
  +
  +   fimd@1440 {
  +   samsung,vl-freq = 60;
  +   samsung,vl-col = 2560;
  +   samsung,vl-row = 1600;
  +   samsung,vl-width = 2560;
  +   samsung,vl-height = 1600;
  +
  +   samsung,vl-clkp;
  +   samsung,vl-dp;
  +   samsung,vl-bpix = 4;
  +
  +   samsung,vl-hspw = 32;
  +   samsung,vl-hbpd = 80;
  +   samsung,vl-hfpd = 48;
  +   samsung,vl-vspw = 6;
  +   samsung,vl-vbpd = 37;
  +   samsung,vl-vfpd = 3;
  +   samsung,vl-cmd-allow-len

Re: [U-Boot] [PATCH 07/10 V6] DTS: Add dts support for SMDK5420

2013-11-12 Thread Rajeshwari Birje
Hi Minkyu Kang,

Thank you for comments.

On Wed, Nov 13, 2013 at 8:47 AM, Minkyu Kang proms...@gmail.com wrote:
 Dear Rajeshwari S Shinde,


 On 29 October 2013 16:23, Rajeshwari S Shinde rajeshwar...@samsung.comwrote:

 This patch adds support for SMDK5420.
 exynos5.dtsi created is a common file which has the nodes common
 to both 5420 and 5250.

 Signed-off-by: Akshay Saraswat aksha...@samsung.com
 Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
 Acked-by: Simon Glass s...@chromium.org
 ---
 Changes in V2:
 - None
 Changes in V3:
 - None
 Changes in V4:
 - Added /include/ exynos5420.dtsi
 Changes in V5:
 - None
 Changes in V6:
 - None
  arch/arm/dts/exynos5.dtsi | 211
 ++
  arch/arm/dts/exynos5250.dtsi  | 178 +
  arch/arm/dts/exynos5420.dtsi  |  74 +++
  board/samsung/dts/exynos5420-smdk5420.dts | 172 
  4 files changed, 458 insertions(+), 177 deletions(-)
  create mode 100644 arch/arm/dts/exynos5.dtsi
  create mode 100644 arch/arm/dts/exynos5420.dtsi
  create mode 100644 board/samsung/dts/exynos5420-smdk5420.dts

 diff --git a/arch/arm/dts/exynos5.dtsi b/arch/arm/dts/exynos5.dtsi
 new file mode 100644
 index 000..de86a06
 --- /dev/null
 +++ b/arch/arm/dts/exynos5.dtsi
 @@ -0,0 +1,211 @@
 +/*
 + * SAMSUNG EXYNOS5 SoC device tree source
 + *
 + * Copyright (c) 2013 Samsung Electronics Co., Ltd.
 + * http://www.samsung.com
 + *
 + * SAMSUNG EXYNOS5 SoC device nodes are listed in this file.
 + * EXYNOS5 based board files can include this file and provide
 + * values for board specfic bindings.
 + *
 + * Note: This file does not include device nodes for all the controllers
 in
 + * EXYNOS5 SoC. As device tree coverage for EXYNOS5 increases,
 + * additional nodes can be added to this file.
 + *
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License version 2 as
 + * published by the Free Software Foundation.


 please fix the license.


 +*/
 +
 +/include/ skeleton.dtsi
 +
 +/ {
 +   compatible = samsung,exynos5;
 +
 +   sromc@1225 {
 +   compatible = samsung,exynos-sromc;
 +   reg = 0x1225 0x20;
 +   #address-cells = 1;
 +   #size-cells = 0;
 +   };
 +
 +   i2c@12c6 {
 +   #address-cells = 1;
 +   #size-cells = 0;
 +   compatible = samsung,s3c2440-i2c;
 +   reg = 0x12C6 0x100;
 +   interrupts = 0 56 0;
 +   };
 +
 +   i2c@12c7 {
 +   #address-cells = 1;
 +   #size-cells = 0;
 +   compatible = samsung,s3c2440-i2c;
 +   reg = 0x12C7 0x100;
 +   interrupts = 0 57 0;
 +   };
 +
 +   i2c@12c8 {
 +   #address-cells = 1;
 +   #size-cells = 0;
 +   compatible = samsung,s3c2440-i2c;
 +   reg = 0x12C8 0x100;
 +   interrupts = 0 58 0;
 +   };
 +
 +   i2c@12c9 {
 +   #address-cells = 1;
 +   #size-cells = 0;
 +   compatible = samsung,s3c2440-i2c;
 +   reg = 0x12C9 0x100;
 +   interrupts = 0 59 0;
 +   };
 +
 +   spi@12d2 {
 +   #address-cells = 1;
 +   #size-cells = 0;
 +   compatible = samsung,exynos-spi;
 +   reg = 0x12d2 0x30;
 +   interrupts = 0 68 0;
 +   };
 +
 +   spi@12d3 {
 +   #address-cells = 1;
 +   #size-cells = 0;
 +   compatible = samsung,exynos-spi;
 +   reg = 0x12d3 0x30;
 +   interrupts = 0 69 0;
 +   };
 +
 +   spi@12d4 {
 +   #address-cells = 1;
 +   #size-cells = 0;
 +   compatible = samsung,exynos-spi;
 +   reg = 0x12d4 0x30;
 +   clock-frequency = 5000;
 +   interrupts = 0 70 0;
 +};
 +
 +   spi@131a {
 +   #address-cells = 1;
 +   #size-cells = 0;
 +   compatible = samsung,exynos-spi;
 +   reg = 0x131a 0x30;
 +   interrupts = 0 129 0;
 +   };
 +
 +   spi@131b {
 +   #address-cells = 1;
 +   #size-cells = 0;
 +   compatible = samsung,exynos-spi;
 +   reg = 0x131b 0x30;
 +   interrupts = 0 130 0;
 +   };
 +
 +   ehci@1211 {
 +   compatible = samsung,exynos-ehci;
 +   reg = 0x1211 0x100;
 +   #address-cells = 1;
 +   #size-cells = 1;
 +
 +   phy {
 +   compatible = samsung,exynos-usb-phy;
 +   reg = 0x1213 0x100;
 +   };
 +   };
 +
 +   

Re: [U-Boot] [PATCH 05/10 V6] Exynos5420: Add support for 5420 in pinmux and gpio

2013-11-12 Thread Rajeshwari Birje
Hi Minkyu Kang,

Thank you for comments.

On Wed, Nov 13, 2013 at 8:31 AM, Minkyu Kang proms...@gmail.com wrote:
 Dear Rajeshwari S Shinde,


 On 29 October 2013 16:23, Rajeshwari S Shinde rajeshwar...@samsung.comwrote:

 Adds code in pinmux and gpio framework to support Exynos5420.

 Signed-off-by: Naveen Krishna Chatradhi ch.nav...@samsung.com
 Signed-off-by: Akshay Saraswat aksha...@samsung.com
 Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
 Acked-by: Simon Glass s...@chromium.org
 ---
 Changes in V2:
 - None
 Changes in V3:
 - None
 Changes in V4:
 - Added correct calculation of gpio based addresses.
 Changes in V5:
 - None
 Changes in V6:
 - None
  arch/arm/cpu/armv7/exynos/pinmux.c| 241
 +-
  arch/arm/include/asm/arch-exynos/gpio.h   | 143 --
  arch/arm/include/asm/arch-exynos/periph.h |   3 +
  3 files changed, 372 insertions(+), 15 deletions(-)

 diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c
 b/arch/arm/cpu/armv7/exynos/pinmux.c
 index 8002bce..417ecae 100644
 --- a/arch/arm/cpu/armv7/exynos/pinmux.c
 +++ b/arch/arm/cpu/armv7/exynos/pinmux.c
 @@ -46,6 +46,41 @@ static void exynos5_uart_config(int peripheral)
 }
  }

 +static void exynos5420_uart_config(int peripheral)
 +{
 +   struct exynos5420_gpio_part1 *gpio1 =
 +   (struct exynos5420_gpio_part1
 *)samsung_get_base_gpio_part1();
 +   struct s5p_gpio_bank *bank;
 +   int i, start, count;
 +
 +   switch (peripheral) {
 +   case PERIPH_ID_UART0:
 +   bank = gpio1-a0;
 +   start = 0;
 +   count = 4;
 +   break;
 +   case PERIPH_ID_UART1:
 +   bank = gpio1-a0;
 +   start = 4;
 +   count = 4;
 +   break;
 +   case PERIPH_ID_UART2:
 +   bank = gpio1-a1;
 +   start = 0;
 +   count = 4;
 +   break;
 +   case PERIPH_ID_UART3:
 +   bank = gpio1-a1;
 +   start = 4;
 +   count = 2;
 +   break;

 +   }


 please add blank line.
will correct this


 +   for (i = start; i  start + count; i++) {
 +   s5p_gpio_set_pull(bank, i, GPIO_PULL_NONE);
 +   s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2));
 +   }
 +}
 +
  static int exynos5_mmc_config(int peripheral, int flags)
  {
 struct exynos5_gpio_part1 *gpio1 =
 @@ -101,6 +136,70 @@ static int exynos5_mmc_config(int peripheral, int
 flags)
 return 0;
  }

 +static int exynos5420_mmc_config(int peripheral, int flags)
 +{
 +   struct exynos5420_gpio_part3 *gpio3 =
 +   (struct exynos5420_gpio_part3
 *)samsung_get_base_gpio_part3();
 +   struct s5p_gpio_bank *bank = NULL, *bank_ext = NULL;
 +   int i, start = 0, gpio_func = 0;


 I think we don' have to set to 0 to start and gpio_func.
Will remove gpio_func, but if I dont set start to 0 I get following error:

pinmux.c: In function ‘exynos_pinmux_config’:
pinmux.c:173:20: warning: ‘start’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
pinmux.c:145:9: note: ‘start’ was declared here


 +
 +   switch (peripheral) {
 +   case PERIPH_ID_SDMMC0:
 +   bank = gpio3-c0;
 +   bank_ext = gpio3-c3;
 +   start = 0;
 +   gpio_func = GPIO_FUNC(0x2);
 +   break;
 +   case PERIPH_ID_SDMMC1:
 +   bank = gpio3-c1;
 +   bank_ext = gpio3-d1;
 +   start = 4;
 +   gpio_func = GPIO_FUNC(0x2);
 +   break;
 +   case PERIPH_ID_SDMMC2:
 +   bank = gpio3-c2;
 +   bank_ext = NULL;
 +   gpio_func = GPIO_FUNC(0x2);
 +   break;

 +   }


 please add blank line.
Will correct this


 +   if ((flags  PINMUX_FLAG_8BIT_MODE)  !bank_ext) {
 +   debug(SDMMC device %d does not support 8bit mode,
 + peripheral);
 +   return -1;
 +   }


 please add blank line.
Will correct this


 +   if (flags  PINMUX_FLAG_8BIT_MODE) {
 +   for (i = start; i = (start + 3); i++) {
 +   s5p_gpio_cfg_pin(bank_ext, i, gpio_func);


 gpio_func is always GPIO_FUNC(0x2).
 I think gpio_func is unnecessary.
will remove this


 +   s5p_gpio_set_pull(bank_ext, i, GPIO_PULL_UP);
 +   s5p_gpio_set_drv(bank_ext, i, GPIO_DRV_4X);
 +   }
 +   }


 please add blank line.
Will correct this


 +   for (i = 0; i  3; i++) {
 +   /*
 +* MMC0 is intended to be used for eMMC. The
 +* card detect pin is used as a VDDEN signal to
 +* power on the eMMC. The 5420 iROM makes
 +* this same assumption.
 +*/
 +   if ((peripheral == PERIPH_ID_SDMMC0)  (i == 2)) {
 +   

Re: [U-Boot] [PATCH 05/10 V6] Exynos5420: Add support for 5420 in pinmux and gpio

2013-11-12 Thread Rajeshwari Birje
Hi Minkyu Kang,

On Wed, Nov 13, 2013 at 11:34 AM, Rajeshwari Birje
rajeshwari.bi...@gmail.com wrote:
 Hi Minkyu Kang,

 Thank you for comments.

 On Wed, Nov 13, 2013 at 8:31 AM, Minkyu Kang proms...@gmail.com wrote:
 Dear Rajeshwari S Shinde,


 On 29 October 2013 16:23, Rajeshwari S Shinde 
 rajeshwar...@samsung.comwrote:

 Adds code in pinmux and gpio framework to support Exynos5420.

 Signed-off-by: Naveen Krishna Chatradhi ch.nav...@samsung.com
 Signed-off-by: Akshay Saraswat aksha...@samsung.com
 Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
 Acked-by: Simon Glass s...@chromium.org
 ---
 Changes in V2:
 - None
 Changes in V3:
 - None
 Changes in V4:
 - Added correct calculation of gpio based addresses.
 Changes in V5:
 - None
 Changes in V6:
 - None
  arch/arm/cpu/armv7/exynos/pinmux.c| 241
 +-
  arch/arm/include/asm/arch-exynos/gpio.h   | 143 --
  arch/arm/include/asm/arch-exynos/periph.h |   3 +
  3 files changed, 372 insertions(+), 15 deletions(-)

 diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c
 b/arch/arm/cpu/armv7/exynos/pinmux.c
 index 8002bce..417ecae 100644
 --- a/arch/arm/cpu/armv7/exynos/pinmux.c
 +++ b/arch/arm/cpu/armv7/exynos/pinmux.c
 @@ -46,6 +46,41 @@ static void exynos5_uart_config(int peripheral)
 }
  }

 +static void exynos5420_uart_config(int peripheral)
 +{
 +   struct exynos5420_gpio_part1 *gpio1 =
 +   (struct exynos5420_gpio_part1
 *)samsung_get_base_gpio_part1();
 +   struct s5p_gpio_bank *bank;
 +   int i, start, count;
 +
 +   switch (peripheral) {
 +   case PERIPH_ID_UART0:
 +   bank = gpio1-a0;
 +   start = 0;
 +   count = 4;
 +   break;
 +   case PERIPH_ID_UART1:
 +   bank = gpio1-a0;
 +   start = 4;
 +   count = 4;
 +   break;
 +   case PERIPH_ID_UART2:
 +   bank = gpio1-a1;
 +   start = 0;
 +   count = 4;
 +   break;
 +   case PERIPH_ID_UART3:
 +   bank = gpio1-a1;
 +   start = 4;
 +   count = 2;
 +   break;

 +   }


 please add blank line.
 will correct this


 +   for (i = start; i  start + count; i++) {
 +   s5p_gpio_set_pull(bank, i, GPIO_PULL_NONE);
 +   s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2));
 +   }
 +}
 +
  static int exynos5_mmc_config(int peripheral, int flags)
  {
 struct exynos5_gpio_part1 *gpio1 =
 @@ -101,6 +136,70 @@ static int exynos5_mmc_config(int peripheral, int
 flags)
 return 0;
  }

 +static int exynos5420_mmc_config(int peripheral, int flags)
 +{
 +   struct exynos5420_gpio_part3 *gpio3 =
 +   (struct exynos5420_gpio_part3
 *)samsung_get_base_gpio_part3();
 +   struct s5p_gpio_bank *bank = NULL, *bank_ext = NULL;
 +   int i, start = 0, gpio_func = 0;


 I think we don' have to set to 0 to start and gpio_func.
 Will remove gpio_func, but if I dont set start to 0 I get following error:

 pinmux.c: In function ‘exynos_pinmux_config’:
 pinmux.c:173:20: warning: ‘start’ may be used uninitialized in this
 function [-Wmaybe-uninitialized]
 pinmux.c:145:9: note: ‘start’ was declared here


 +
 +   switch (peripheral) {
 +   case PERIPH_ID_SDMMC0:
 +   bank = gpio3-c0;
 +   bank_ext = gpio3-c3;
 +   start = 0;
 +   gpio_func = GPIO_FUNC(0x2);
 +   break;
 +   case PERIPH_ID_SDMMC1:
 +   bank = gpio3-c1;
 +   bank_ext = gpio3-d1;
 +   start = 4;
 +   gpio_func = GPIO_FUNC(0x2);
 +   break;
 +   case PERIPH_ID_SDMMC2:
 +   bank = gpio3-c2;
 +   bank_ext = NULL;
 +   gpio_func = GPIO_FUNC(0x2);
 +   break;

 +   }


 please add blank line.
 Will correct this


 +   if ((flags  PINMUX_FLAG_8BIT_MODE)  !bank_ext) {
 +   debug(SDMMC device %d does not support 8bit mode,
 + peripheral);
 +   return -1;
 +   }


 please add blank line.
 Will correct this


 +   if (flags  PINMUX_FLAG_8BIT_MODE) {
 +   for (i = start; i = (start + 3); i++) {
 +   s5p_gpio_cfg_pin(bank_ext, i, gpio_func);


 gpio_func is always GPIO_FUNC(0x2).
 I think gpio_func is unnecessary.
 will remove this


 +   s5p_gpio_set_pull(bank_ext, i, GPIO_PULL_UP);
 +   s5p_gpio_set_drv(bank_ext, i, GPIO_DRV_4X);
 +   }
 +   }


 please add blank line.
 Will correct this


 +   for (i = 0; i  3; i++) {
 +   /*
 +* MMC0 is intended to be used for eMMC. The
 +* card detect pin is used as a VDDEN signal to
 +* power on the eMMC. The 5420 iROM makes
 +* this same assumption

Re: [U-Boot] [PATCH] Exynos5: Clock: Generic api to set and get clock rate and source

2013-11-11 Thread Rajeshwari Birje
Hi All,

This patch is based on:

[U-Boot] [PATCH 00/10 V6] EXYNOS5420: Add SMDK5420 board support

-- 
Regards,
Rajeshwari Shinde

On Mon, Nov 11, 2013 at 6:23 PM, Rajeshwari S Shinde
rajeshwar...@samsung.com wrote:
 This patch implements generic api for exynos5250 and exynos5420.
 These api's set and get clock rate based on the peripheral id.

 Signed-off-by: Andrew Bresticker abres...@chromium.org
 Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
 ---
  arch/arm/cpu/armv7/exynos/clock.c  | 958 
 -
  arch/arm/include/asm/arch-exynos/clk.h |  30 +-
  drivers/mmc/exynos_dw_mmc.c|  15 +-
  3 files changed, 385 insertions(+), 618 deletions(-)

 diff --git a/arch/arm/cpu/armv7/exynos/clock.c 
 b/arch/arm/cpu/armv7/exynos/clock.c
 index b52e61a..09e156c 100644
 --- a/arch/arm/cpu/armv7/exynos/clock.c
 +++ b/arch/arm/cpu/armv7/exynos/clock.c
 @@ -16,46 +16,97 @@
  #define PLL_DIV_65536  65536

  /* *
 - * This structure is to store the src bit, div bit and prediv bit
 - * positions of the peripheral clocks of the src and div registers
 + * This structure store positions of the peripheral clocks
 + * and their source, divider and predivider information.
 + * @periph_id: id of the peripheral
 + * @src_offset: offset of the source register
 + * @div_offset: offset of the divider register
 + * @prediv_offset: offset of the pre divider register
 + * @src_bit: bit location in the source register
 + * @div_bit: bit location in the divider register
 + * @pre_div_bit: bit location in the pre divider register
 + * @src_mask: mask for the source register value
 + * @div_mask: mask for the divider register value
 + * @pre_div_mask: mask for the pre divider register value
   */
  struct clk_bit_info {
 +   int32_t periph_id;
 +   int32_t src_offset;
 +   int32_t div_offset;
 +   int32_t prediv_offset;
 int8_t src_bit;
 int8_t div_bit;
 -   int8_t prediv_bit;
 +   int8_t pre_div_bit;
 +   int8_t src_mask;
 +   int32_t div_mask;
 +   int32_t pre_div_mask;
  };

 -/* src_bit div_bit prediv_bit */
 -static struct clk_bit_info clk_bit_info[PERIPH_ID_COUNT] = {
 -   {0, 0,  -1},
 -   {4, 4,  -1},
 -   {8, 8,  -1},
 -   {12,12, -1},
 -   {0, 0,  8},
 -   {4, 16, 24},
 -   {8, 0,  8},
 -   {12,16, 24},
 -   {-1,-1, -1},
 -   {16,0,  8},
 -   {20,16, 24},
 -   {24,0,  8},
 -   {0, 0,  4},
 -   {4, 12, 16},
 -   {-1,-1, -1},
 -   {-1,-1, -1},
 -   {-1,24, 0},
 -   {-1,24, 0},
 -   {-1,24, 0},
 -   {-1,24, 0},
 -   {-1,24, 0},
 -   {-1,24, 0},
 -   {-1,24, 0},
 -   {-1,24, 0},
 -   {24,0,  -1},
 -   {24,0,  -1},
 -   {24,0,  -1},
 -   {24,0,  -1},
 -   {24,0,  -1},
 +static struct clk_bit_info exynos5_bit_info_table[] = {
 +   {PERIPH_ID_UART0, 0x10250, 0x10558, -1, 0, 0, -1, 0xf, 0xf, -1},
 +   {PERIPH_ID_UART1, 0x10250, 0x10558, -1, 4, 4, -1, 0xf, 0xf, -1},
 +   {PERIPH_ID_UART2, 0x10250, 0x10558, -1, 8, 8, -1, 0xf, 0xf, -1},
 +   {PERIPH_ID_UART3, 0x10250, 0x10558, -1, 12, 12, -1, 0xf, 0xf, -1},
 +   {PERIPH_ID_I2C0, -1, 0x10514, 0x10510, -1, 24, 0, -1, 0x7, 0x7},
 +   {PERIPH_ID_I2C1, -1, 0x10514, 0x10510, -1, 24, 0, -1, 0x7, 0x7},
 +   {PERIPH_ID_I2C2, -1, 0x10514, 0x10510, -1, 24, 0, -1, 0x7, 0x7},
 +   {PERIPH_ID_I2C3, -1, 0x10514, 0x10510, -1, 24, 0, -1, 0x7, 0x7},
 +   {PERIPH_ID_I2C4, -1, 0x10514, 0x10510, -1, 24, 0, -1, 0x7, 0x7},
 +   {PERIPH_ID_I2C5, -1, 0x10514, 0x10510, -1, 24, 0, -1, 0x7, 0x7},
 +   {PERIPH_ID_I2C6, -1, 0x10514, 0x10510, -1, 24, 0, -1, 0x7, 0x7},
 +   {PERIPH_ID_I2C7, -1, 0x10514, 0x10510, -1, 24, 0, -1, 0x7, 0x7},
 +   {PERIPH_ID_I2C8, -1, 0x10514, 0x10510, -1, 24, 0, -1, 0x7, 0x7},
 +   {PERIPH_ID_I2C9, -1, 0x10514, 0x10510, -1, 24, 0, -1, 0x7, 0x7},
 +   {PERIPH_ID_I2C10, -1, 0x10514, 0x10510, -1, 24, 0, -1, 0x7, 0x7},
 +   {PERIPH_ID_SPI0, 0x10254, 0x1055c, 0x1055c, 16, 0, 8, 0xf, 0xf, 0xff},
 +   {PERIPH_ID_SPI1, 0x10254, 0x1055c, 0x1055c, 20, 16, 24, 0xf, 0xf, 
 0xff},
 +   {PERIPH_ID_SPI2, 0x10254, 0x10560, 0x10560, 24, 0, 8, 0xf, 0xf, 0xff},
 +   {PERIPH_ID_SPI3, 0x10270, 0x10580, 0x10580, 0, 0, 4, 0xf, 0xf, 0xff},
 +   {PERIPH_ID_SPI4, 0x10270, 0x10580, 0x10580, 4, 12, 16, 0xf, 0xf, 
 0xff},
 +   {PERIPH_ID_SDMMC0, 0x10244, 0x1054c, 0x1054c, 0, 0, 8, 0xf, 0xf, 
 0xff},
 +   {PERIPH_ID_SDMMC1, 0x10244, 0x1054c, 0x1054c, 4, 16, 24, 0xf, 0xf,
 +0xff},
 +   {PERIPH_ID_SDMMC2, 0x10244, 0x10550, 0x10550, 8, 0, 8, 0xf, 0xf, 
 0xff},
 +   {PERIPH_ID_SDMMC3, 0x10244, 0x10550, 0x10550, 12, 16, 24, 0xf, 0xf,
 +0xff},
 +   {PERIPH_ID_PWM0, 

Re: [U-Boot] [PATCH 01/10 V6] EXYNOS5: Create a common board file

2013-11-08 Thread Rajeshwari Birje
Hi Przemyslaw

On Fri, Nov 8, 2013 at 1:43 PM, Przemyslaw Marczak
p.marc...@samsung.com wrote:
 Hello Rajeshwari,


 On 10/29/2013 08:23 AM, Rajeshwari S Shinde wrote:

 Create a common board.c file for all functions which are common across
 all EXYNOS5 platforms.

 exynos_init function is provided for platform specific code.

 Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
 Acked-by: Simon Glass s...@chromium.org
 ---
 Changes in V2:
 - None
 Changes in V3:
 - None
 Changes in V4:
 - Added check for the compilation of MAX77686 pmic.
 Changes in V5:
 - Moved board_eth_init and board_mmc_init in case of
 device tree support
 Changes in V6:
 - None.
   arch/arm/include/asm/arch-exynos/board.h |  17 ++
   board/samsung/common/Makefile|   4 +
   board/samsung/common/board.c | 405
 +++
   board/samsung/smdk5250/exynos5-dt.c  | 361
 +--
   board/samsung/smdk5250/smdk5250.c| 182 +-
   include/configs/exynos5250-dt.h  |   2 +
   6 files changed, 435 insertions(+), 536 deletions(-)
   create mode 100644 arch/arm/include/asm/arch-exynos/board.h
   create mode 100644 board/samsung/common/board.c


 The name of exynos5 common file can't be just board.c since it is common
 only for Exynos5 boards and is placed in Samsung common.
 We have few Exynos4 boards in u-boot and in future we can introduce common
 board file for them too.
 So it is better to add some additional word to this file name. This also
 needs to change config name or add checking SOC version in common Makefile.

Cannot we use the same file even for exynos4 boards.

-- 
Regards,
Rajeshwari Shinde
 Thank you,
 --
 Przemyslaw Marczak
 Samsung RD Institute Poland
 Samsung Electronics
 p.marc...@samsung.com

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 01/10 V6] EXYNOS5: Create a common board file

2013-11-08 Thread Rajeshwari Birje
Hi,


On Fri, Nov 8, 2013 at 2:33 PM, Przemyslaw Marczak
p.marc...@samsung.com wrote:
 Hi,


 On 11/08/2013 09:37 AM, Rajeshwari Birje wrote:

 Hi Przemyslaw

 On Fri, Nov 8, 2013 at 1:43 PM, Przemyslaw Marczak
 p.marc...@samsung.com wrote:

 Hello Rajeshwari,


 On 10/29/2013 08:23 AM, Rajeshwari S Shinde wrote:


 Create a common board.c file for all functions which are common across
 all EXYNOS5 platforms.

 exynos_init function is provided for platform specific code.

 Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
 Acked-by: Simon Glass s...@chromium.org
 ---
 Changes in V2:
  - None
 Changes in V3:
  - None
 Changes in V4:
  - Added check for the compilation of MAX77686 pmic.
 Changes in V5:--
Regards,
Rajeshwari Shind
  - Moved board_eth_init and board_mmc_init in case of
  device tree support
 Changes in V6:
  - None.
arch/arm/include/asm/arch-exynos/board.h |  17 ++
board/samsung/common/Makefile|   4 +
board/samsung/common/board.c | 405
 +++
board/samsung/smdk5250/exynos5-dt.c  | 361
 +--
board/samsung/smdk5250/smdk5250.c| 182 +-
include/configs/exynos5250-dt.h  |   2 +
6 files changed, 435 insertions(+), 536 deletions(-)
create mode 100644 arch/arm/include/asm/arch-exynos/board.h
create mode 100644 board/samsung/common/board.c


 The name of exynos5 common file can't be just board.c since it is
 common
 only for Exynos5 boards and is placed in Samsung common.
 We have few Exynos4 boards in u-boot and in future we can introduce
 common
 board file for them too.
 So it is better to add some additional word to this file name. This also
 needs to change config name or add checking SOC version in common
 Makefile.

 Cannot we use the same file even for exynos4 boards.


 I'm not sure that you understand my intention.

 You want to introduce:
 board/samsung/common/board.c - with only Exynos5 code

 I mean that it should looks like this, e.g:
 board/samsung/common/board_exynos4.c - common code for all Exynos 4
 board/samsung/common/board_exynos5.c - common code for all Exynos 5
 since there is some duplicated code in Exynos4 boards that can be moved to
 one common file in the future.
 Do you understand my intention now?

Yes I understood your intention,  but had a question cannot we use the
same file board.c for exynos4 and exynos5 too.
Since both have most of functions similar like board_init,  dram_init,
board_uart_init and so on.

If u still feel that exynos4 and exynos5 have lots of functions
different in board/samsung we can create a seperate file. I was hoping
the same board.c could be reused for exynos4 also.

-- 
Regards,
Rajeshwari Shind

 Regards


 --
 Przemyslaw Marczak
 Samsung RD Institute Poland
 Samsung Electronics
 p.marc...@samsung.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 01/10 V6] EXYNOS5: Create a common board file

2013-11-08 Thread Rajeshwari Birje
Hi,

On Fri, Nov 8, 2013 at 3:16 PM, Przemyslaw Marczak
p.marc...@samsung.com wrote:
 Hi,


 On 11/08/2013 10:27 AM, Rajeshwari Birje wrote:

 Hi,


 On Fri, Nov 8, 2013 at 2:33 PM, Przemyslaw Marczak
 p.marc...@samsung.com wrote:

 Hi,


 On 11/08/2013 09:37 AM, Rajeshwari Birje wrote:


 Hi Przemyslaw

 On Fri, Nov 8, 2013 at 1:43 PM, Przemyslaw Marczak
 p.marc...@samsung.com wrote:


 Hello Rajeshwari,


 On 10/29/2013 08:23 AM, Rajeshwari S Shinde wrote:



 Create a common board.c file for all functions which are common across
 all EXYNOS5 platforms.

 exynos_init function is provided for platform specific code.

 Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
 Acked-by: Simon Glass s...@chromium.org
 ---
 Changes in V2:
   - None
 Changes in V3:
   - None
 Changes in V4:
   - Added check for the compilation of MAX77686 pmic.
 Changes in V5:--

 Regards,
 Rajeshwari Shind

   - Moved board_eth_init and board_mmc_init in case of
   device tree support
 Changes in V6:
   - None.
 arch/arm/include/asm/arch-exynos/board.h |  17 ++
 board/samsung/common/Makefile|   4 +
 board/samsung/common/board.c | 405
 +++
 board/samsung/smdk5250/exynos5-dt.c  | 361
 +--
 board/samsung/smdk5250/smdk5250.c| 182 +-
 include/configs/exynos5250-dt.h  |   2 +
 6 files changed, 435 insertions(+), 536 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-exynos/board.h
 create mode 100644 board/samsung/common/board.c


 The name of exynos5 common file can't be just board.c since it is
 common
 only for Exynos5 boards and is placed in Samsung common.
 We have few Exynos4 boards in u-boot and in future we can introduce
 common
 board file for them too.
 So it is better to add some additional word to this file name. This
 also
 needs to change config name or add checking SOC version in common
 Makefile.

 Cannot we use the same file even for exynos4 boards.


 I'm not sure that you understand my intention.

 You want to introduce:
 board/samsung/common/board.c - with only Exynos5 code

 I mean that it should looks like this, e.g:
 board/samsung/common/board_exynos4.c - common code for all Exynos 4
 board/samsung/common/board_exynos5.c - common code for all Exynos 5
 since there is some duplicated code in Exynos4 boards that can be moved
 to
 one common file in the future.
 Do you understand my intention now?

 Yes I understood your intention,  but had a question cannot we use the
 same file board.c for exynos4 and exynos5 too.
 Since both have most of functions similar like board_init,  dram_init,
 board_uart_init and so on.

 If u still feel that exynos4 and exynos5 have lots of functions
 different in board/samsung we can create a seperate file. I was hoping
 the same board.c could be reused for exynos4 also.

 Ah, ok. This is good idea with the one common file. Then we will have board
 files with strict board dependent functions. So I don't have any objections
 jet.
 Regards,

Ok Thank you.
-- 
Regards,
Rajeshwari Shinde


 --
 Przemyslaw Marczak
 Samsung RD Institute Poland
 Samsung Electronics
 p.marc...@samsung.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 00/10 V6] EXYNOS5420: Add SMDK5420 board support

2013-11-06 Thread Rajeshwari Birje
Hi Minkyu Kang,

On Thu, Oct 31, 2013 at 2:12 PM, Rajeshwari Birje
rajeshwari.bi...@gmail.com wrote:
 Hi Minkyu Kang,

 Kindly do review the patch set and do let me know if any review comments.
 Pantelis Antoniou has merged the patch 10 (DWMMC: SMDK5420: Disable
 SMU for eMMC) into mmc tree.

We have merge window in next three days, this patches are acked by Simon.
Can you please have a look and get it merged if no review comments
from your end, or
please do let me know if some rework needed.

-- 
Regards,
Rajeshwari Shinde
 Regards,
 Rajeshwari Shinde.

 On Tue, Oct 29, 2013 at 12:53 PM, Rajeshwari S Shinde
 rajeshwar...@samsung.com wrote:
 This patch adds basic board support for SMDK5420 board.
 These patches are tested for booting fine on EVT1 SMDK5420.

 Changes in V2:
 - Corrected a compilation issue for SMDK5420.

 Changes in V3:
 - Add patch to support variable size SPL support
 - Add patch to disable SMU for eMMC.

 Changes in V4:
 - Added check for MAX77686 pmic compilation.
 - Added correct calculation of gpio based addresses.
 - Rebased on the latest u-boot code.
 - Removed patches for UART and TZPC changes as
 they were not needed.
 - Added flag to disable SMU for eMMC.

 Changes in V5:
 - Moved functions board_mmc_init and board_eth_init
 to common/board.c in case of device tree support.

 Changes in V6:
 - Rebased on the latest mainline branch.
 - Moved the definitions for SMU to arch/arm dwmmc.h

 Rajeshwari S Shinde (10):
   EXYNOS5: Create a common board file
   Exynos5420: Add base addresses for 5420
   Exynos5420: Add clock initialization for 5420
   Exynos5420: Add DDR3 initialization for 5420
   Exynos5420: Add support for 5420 in pinmux and gpio
   Exynos5420: Add base patch for SMDK5420
   DTS: Add dts support for SMDK5420
   Config: Add initial config for SMDK5420
   SPL: EXYNOS: Prepare for variable size SPL support
   DWMMC: SMDK5420: Disable SMU for eMMC

  arch/arm/cpu/armv7/exynos/clock.c  | 270 -
  arch/arm/cpu/armv7/exynos/clock_init.h |  17 +
  arch/arm/cpu/armv7/exynos/clock_init_exynos5.c | 352 +++-
  arch/arm/cpu/armv7/exynos/dmc_common.c |  10 +-
  arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c  | 421 +-
  arch/arm/cpu/armv7/exynos/exynos5_setup.h  | 740 
 +++--
  arch/arm/cpu/armv7/exynos/pinmux.c | 241 +++-
  arch/arm/dts/exynos5.dtsi  | 211 +++
  arch/arm/dts/exynos5250.dtsi   | 178 +-
  arch/arm/dts/exynos5420.dtsi   |  74 +++
  arch/arm/include/asm/arch-exynos/board.h   |  17 +
  arch/arm/include/asm/arch-exynos/clk.h |   1 +
  arch/arm/include/asm/arch-exynos/clock.h   | 494 +
  arch/arm/include/asm/arch-exynos/cpu.h |  53 +-
  arch/arm/include/asm/arch-exynos/dmc.h | 121 ++--
  arch/arm/include/asm/arch-exynos/dwmmc.h   |  13 +
  arch/arm/include/asm/arch-exynos/gpio.h| 143 -
  arch/arm/include/asm/arch-exynos/periph.h  |   3 +
  board/samsung/common/Makefile  |   4 +
  board/samsung/common/board.c   | 407 ++
  board/samsung/dts/exynos5420-smdk5420.dts  | 172 ++
  board/samsung/smdk5250/exynos5-dt.c| 361 +---
  board/samsung/smdk5250/smdk5250.c  | 182 +-
  board/samsung/smdk5420/Makefile|  34 ++
  board/samsung/smdk5420/smdk5420.c  | 159 ++
  board/samsung/smdk5420/smdk5420_spl.c  |  52 ++
  boards.cfg |   1 +
  drivers/mmc/dw_mmc.c   |  11 +
  drivers/mmc/exynos_dw_mmc.c|   3 +
  include/configs/exynos5-dt.h   | 302 ++
  include/configs/exynos5250-dt.h| 317 +--
  include/configs/smdk5420.h |  56 ++
  include/dwmmc.h|   3 +
  spl/Makefile   |   7 +-
  tools/Makefile |   2 +
  tools/mkexynosspl.c| 167 --
  36 files changed, 4271 insertions(+), 1328 deletions(-)
  create mode 100644 arch/arm/dts/exynos5.dtsi
  create mode 100644 arch/arm/dts/exynos5420.dtsi
  create mode 100644 arch/arm/include/asm/arch-exynos/board.h
  create mode 100644 board/samsung/common/board.c
  create mode 100644 board/samsung/dts/exynos5420-smdk5420.dts
  create mode 100644 board/samsung/smdk5420/Makefile
  create mode 100644 board/samsung/smdk5420/smdk5420.c
  create mode 100644 board/samsung/smdk5420/smdk5420_spl.c
  create mode 100644 include/configs/exynos5-dt.h
  create mode 100644 include/configs/smdk5420.h

 --
 1.7.12.4

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot

Re: [U-Boot] [PATCH 00/10 V6] EXYNOS5420: Add SMDK5420 board support

2013-10-31 Thread Rajeshwari Birje
Hi Minkyu Kang,

Kindly do review the patch set and do let me know if any review comments.
Pantelis Antoniou has merged the patch 10 (DWMMC: SMDK5420: Disable
SMU for eMMC) into mmc tree.

Regards,
Rajeshwari Shinde.

On Tue, Oct 29, 2013 at 12:53 PM, Rajeshwari S Shinde
rajeshwar...@samsung.com wrote:
 This patch adds basic board support for SMDK5420 board.
 These patches are tested for booting fine on EVT1 SMDK5420.

 Changes in V2:
 - Corrected a compilation issue for SMDK5420.

 Changes in V3:
 - Add patch to support variable size SPL support
 - Add patch to disable SMU for eMMC.

 Changes in V4:
 - Added check for MAX77686 pmic compilation.
 - Added correct calculation of gpio based addresses.
 - Rebased on the latest u-boot code.
 - Removed patches for UART and TZPC changes as
 they were not needed.
 - Added flag to disable SMU for eMMC.

 Changes in V5:
 - Moved functions board_mmc_init and board_eth_init
 to common/board.c in case of device tree support.

 Changes in V6:
 - Rebased on the latest mainline branch.
 - Moved the definitions for SMU to arch/arm dwmmc.h

 Rajeshwari S Shinde (10):
   EXYNOS5: Create a common board file
   Exynos5420: Add base addresses for 5420
   Exynos5420: Add clock initialization for 5420
   Exynos5420: Add DDR3 initialization for 5420
   Exynos5420: Add support for 5420 in pinmux and gpio
   Exynos5420: Add base patch for SMDK5420
   DTS: Add dts support for SMDK5420
   Config: Add initial config for SMDK5420
   SPL: EXYNOS: Prepare for variable size SPL support
   DWMMC: SMDK5420: Disable SMU for eMMC

  arch/arm/cpu/armv7/exynos/clock.c  | 270 -
  arch/arm/cpu/armv7/exynos/clock_init.h |  17 +
  arch/arm/cpu/armv7/exynos/clock_init_exynos5.c | 352 +++-
  arch/arm/cpu/armv7/exynos/dmc_common.c |  10 +-
  arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c  | 421 +-
  arch/arm/cpu/armv7/exynos/exynos5_setup.h  | 740 
 +++--
  arch/arm/cpu/armv7/exynos/pinmux.c | 241 +++-
  arch/arm/dts/exynos5.dtsi  | 211 +++
  arch/arm/dts/exynos5250.dtsi   | 178 +-
  arch/arm/dts/exynos5420.dtsi   |  74 +++
  arch/arm/include/asm/arch-exynos/board.h   |  17 +
  arch/arm/include/asm/arch-exynos/clk.h |   1 +
  arch/arm/include/asm/arch-exynos/clock.h   | 494 +
  arch/arm/include/asm/arch-exynos/cpu.h |  53 +-
  arch/arm/include/asm/arch-exynos/dmc.h | 121 ++--
  arch/arm/include/asm/arch-exynos/dwmmc.h   |  13 +
  arch/arm/include/asm/arch-exynos/gpio.h| 143 -
  arch/arm/include/asm/arch-exynos/periph.h  |   3 +
  board/samsung/common/Makefile  |   4 +
  board/samsung/common/board.c   | 407 ++
  board/samsung/dts/exynos5420-smdk5420.dts  | 172 ++
  board/samsung/smdk5250/exynos5-dt.c| 361 +---
  board/samsung/smdk5250/smdk5250.c  | 182 +-
  board/samsung/smdk5420/Makefile|  34 ++
  board/samsung/smdk5420/smdk5420.c  | 159 ++
  board/samsung/smdk5420/smdk5420_spl.c  |  52 ++
  boards.cfg |   1 +
  drivers/mmc/dw_mmc.c   |  11 +
  drivers/mmc/exynos_dw_mmc.c|   3 +
  include/configs/exynos5-dt.h   | 302 ++
  include/configs/exynos5250-dt.h| 317 +--
  include/configs/smdk5420.h |  56 ++
  include/dwmmc.h|   3 +
  spl/Makefile   |   7 +-
  tools/Makefile |   2 +
  tools/mkexynosspl.c| 167 --
  36 files changed, 4271 insertions(+), 1328 deletions(-)
  create mode 100644 arch/arm/dts/exynos5.dtsi
  create mode 100644 arch/arm/dts/exynos5420.dtsi
  create mode 100644 arch/arm/include/asm/arch-exynos/board.h
  create mode 100644 board/samsung/common/board.c
  create mode 100644 board/samsung/dts/exynos5420-smdk5420.dts
  create mode 100644 board/samsung/smdk5420/Makefile
  create mode 100644 board/samsung/smdk5420/smdk5420.c
  create mode 100644 board/samsung/smdk5420/smdk5420_spl.c
  create mode 100644 include/configs/exynos5-dt.h
  create mode 100644 include/configs/smdk5420.h

 --
 1.7.12.4

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 10/10 V4] DWMMC: SMDK5420: Disable SMU for eMMC

2013-10-15 Thread Rajeshwari Birje
Hi Jaehoon

Thank you for comments,

On Tue, Oct 15, 2013 at 3:18 PM, Jaehoon Chung jh80.ch...@samsung.com wrote:
 Hi

 On 09/27/2013 09:10 PM, Rajeshwari S Shinde wrote:
 SMDK5420 has a new Security Management Unit added
 for dwmmc driver, hence, configuring the control
 registers to support booting via eMMC.

 Signed-off-by: Alim Akhtar alim.akh...@samsung.com
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 ---
 Changes in V3:
   - New patch.
 Changes in V4:
   Added flag to dissble SMU
  drivers/mmc/dw_mmc.c| 10 ++
  drivers/mmc/exynos_dw_mmc.c |  3 +++
  include/dwmmc.h | 15 +++
  3 files changed, 28 insertions(+)

 diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
 index a82ee17..2a8da5c 100644
 --- a/drivers/mmc/dw_mmc.c
 +++ b/drivers/mmc/dw_mmc.c
 @@ -300,6 +300,16 @@ static int dwmci_init(struct mmc *mmc)
   struct dwmci_host *host = (struct dwmci_host *)mmc-priv;
   u32 fifo_size;

 + if (host-quirks  DWMCI_QUIRK_DISABLE_SMU) {
 + dwmci_writel(host, EMMCP_MPSBEGIN0, 0);
 + dwmci_writel(host, EMMCP_SEND0, 0);
 + dwmci_writel(host, EMMCP_CTRL0,
 +  MPSCTRL_SECURE_READ_BIT |
 +  MPSCTRL_SECURE_WRITE_BIT |
 +  MPSCTRL_NON_SECURE_READ_BIT |
 +  MPSCTRL_NON_SECURE_WRITE_BIT | MPSCTRL_VALID);
 + }
 +
Is this ok?
or do you want me to create a function pointer for same and define the
function for this in exynos_dwmmc.c and call it here?

   dwmci_writel(host, DWMCI_PWREN, 1);

   if (!dwmci_wait_reset(host, DWMCI_RESET_ALL)) {
 diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
 index 4ef9fec..f7439a0 100644
 --- a/drivers/mmc/exynos_dw_mmc.c
 +++ b/drivers/mmc/exynos_dw_mmc.c
 @@ -62,6 +62,9 @@ int exynos_dwmci_add_port(int index, u32 regbase, int 
 bus_width, u32 clksel)
   host-name = EXYNOS DWMMC;
   host-ioaddr = (void *)regbase;
   host-buswidth = bus_width;
 +#ifdef CONFIG_EXYNOS5420
 + host-quirks = DWMCI_QUIRK_DISABLE_SMU;
 +#endif

   if (clksel) {
   host-clksel_val = clksel;
 diff --git a/include/dwmmc.h b/include/dwmmc.h
 index 08ced0b..00bceec 100644
 --- a/include/dwmmc.h
 +++ b/include/dwmmc.h
 @@ -49,6 +49,9 @@
  #define DWMCI_DSCADDR0x094
  #define DWMCI_BUFADDR0x098
  #define DWMCI_DATA   0x200
 +#define EMMCP_MPSBEGIN0  0x1200
 +#define EMMCP_SEND0  0x1204
 +#define EMMCP_CTRL0  0x120C

  /* Interrupt Mask register */
  #define DWMCI_INTMSK_ALL 0x
 @@ -123,6 +126,18 @@
  #define DWMCI_BMOD_IDMAC_FB  (1  1)
  #define DWMCI_BMOD_IDMAC_EN  (1  7)

 +#define MPSCTRL_SECURE_READ_BIT  (0x17)
 +#define MPSCTRL_SECURE_WRITE_BIT (0x16)
 +#define MPSCTRL_NON_SECURE_READ_BIT  (0x15)
 +#define MPSCTRL_NON_SECURE_WRITE_BIT (0x14)
 +#define MPSCTRL_USE_FUSE_KEY (0x13)
 +#define MPSCTRL_ECB_MODE (0x12)
 +#define MPSCTRL_ENCRYPTION   (0x11)
 +#define MPSCTRL_VALID(0x10)
 +
 +/* quirks */
 +#define DWMCI_QUIRK_DISABLE_SMU  (1  0)

 These values are exynos5420 specifi, isn't?
 Then i don't want to include into dwmmc.h
Fine will move this to arch/arm/include/asm/arch-exynos/dwmmc.h

 Best Regards,
 Jaehoon Chung
 +
-- 
Regards,
Rajeshwari Shinde
  struct dwmci_host {
   char *name;
   void *ioaddr;


 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V3] exynos: spl: Add a custom spi copy function

2013-10-09 Thread Rajeshwari Birje
Hi Minkyu Kang,

Since this patch is related to arch/arm spi booting, I had a doubt
where would it get merged in u-boot-samsung.git or u-boot-spi.git.

This patch is based on [U-Boot] [PATCH 4/4] spi: exynos: Support word
transfers which is already merged in u-boot-spi.git.

Regards,
Rajeshwari Shinde.

On Tue, Oct 8, 2013 at 6:42 PM, Rajeshwari S Shinde
rajeshwar...@samsung.com wrote:
 This patch implements a custom spi_copy funtion to copy u-boot from SF
 to RAM. This is faster then iROM spi_copy funtion as this runs spi at
 50Mhz and also in WORD mode of operation.

 Changed a printf in pinmux.c to debug just to avoid the compilation
 error in SPL.

 Signed-off-by: Alim Akhtar alim.akh...@samsung.com
 Signed-off-by: Tom Wai-Hong Tam waih...@chromium.org
 Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
 ---
 Based on following patch yet to be merged:
 [U-Boot] [PATCH 4/4] spi: exynos: Support word transfers
 Changes in V2:
 - Corrected the commit message.
 - Added a SPI timeout check.
 - Corrected the comments.
 Changes in V3:
 - Rebased on the latest u-boot-spi tree.
  arch/arm/cpu/armv7/exynos/pinmux.c |   2 +-
  arch/arm/cpu/armv7/exynos/spl_boot.c   | 122 
 -
  arch/arm/include/asm/arch-exynos/spi.h |   1 +
  include/configs/exynos5250-dt.h|   2 +
  4 files changed, 123 insertions(+), 4 deletions(-)

 diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c 
 b/arch/arm/cpu/armv7/exynos/pinmux.c
 index 8002bce..74cc700 100644
 --- a/arch/arm/cpu/armv7/exynos/pinmux.c
 +++ b/arch/arm/cpu/armv7/exynos/pinmux.c
 @@ -462,7 +462,7 @@ static int exynos4_pinmux_config(int peripheral, int 
 flags)
 case PERIPH_ID_SDMMC1:
 case PERIPH_ID_SDMMC3:
 case PERIPH_ID_SDMMC4:
 -   printf(SDMMC device %d not implemented\n, peripheral);
 +   debug(SDMMC device %d not implemented\n, peripheral);
 return -1;
 default:
 debug(%s: invalid peripheral %d, __func__, peripheral);
 diff --git a/arch/arm/cpu/armv7/exynos/spl_boot.c 
 b/arch/arm/cpu/armv7/exynos/spl_boot.c
 index 3651c00..6faf13f 100644
 --- a/arch/arm/cpu/armv7/exynos/spl_boot.c
 +++ b/arch/arm/cpu/armv7/exynos/spl_boot.c
 @@ -10,8 +10,11 @@
  #include asm/arch/clock.h
  #include asm/arch/clk.h
  #include asm/arch/dmc.h
 +#include asm/arch/periph.h
 +#include asm/arch/pinmux.h
  #include asm/arch/power.h
  #include asm/arch/spl.h
 +#include asm/arch/spi.h

  #include common_setup.h
  #include clock_init.h
 @@ -59,6 +62,119 @@ static int config_branch_prediction(int set_cr_z)
  }
  #endif

 +static void spi_rx_tx(struct exynos_spi *regs, int todo,
 +   void *dinp, void const *doutp, int i)
 +{
 +   uint *rxp = (uint *)(dinp + (i * (32 * 1024)));
 +   int rx_lvl, tx_lvl;
 +   uint out_bytes, in_bytes;
 +
 +   out_bytes = todo;
 +   in_bytes = todo;
 +   setbits_le32(regs-ch_cfg, SPI_CH_RST);
 +   clrbits_le32(regs-ch_cfg, SPI_CH_RST);
 +   writel(((todo * 8) / 32) | SPI_PACKET_CNT_EN, regs-pkt_cnt);
 +
 +   while (in_bytes) {
 +   uint32_t spi_sts;
 +   int temp;
 +
 +   spi_sts = readl(regs-spi_sts);
 +   rx_lvl = ((spi_sts  15)  0x7f);
 +   tx_lvl = ((spi_sts  6)  0x7f);
 +   while (tx_lvl  32  out_bytes) {
 +   temp = 0x;
 +   writel(temp, regs-tx_data);
 +   out_bytes -= 4;
 +   tx_lvl += 4;
 +   }
 +   while (rx_lvl = 4  in_bytes) {
 +   temp = readl(regs-rx_data);
 +   if (rxp)
 +   *rxp++ = temp;
 +   in_bytes -= 4;
 +   rx_lvl -= 4;
 +   }
 +   }
 +}
 +
 +/*
 + * Copy uboot from spi flash to RAM
 + *
 + * @parma uboot_size   size of u-boot to copy
 + * @param uboot_addr   address in u-boot to copy
 + */
 +static void exynos_spi_copy(unsigned int uboot_size, unsigned int uboot_addr)
 +{
 +   int upto, todo;
 +   int i, timeout = 100;
 +   struct exynos_spi *regs = (struct exynos_spi *)CONFIG_ENV_SPI_BASE;
 +
 +   set_spi_clk(PERIPH_ID_SPI1, 5000); /* set spi clock to 50Mhz */
 +   /* set the spi1 GPIO */
 +   exynos_pinmux_config(PERIPH_ID_SPI1, PINMUX_FLAG_NONE);
 +
 +   /* set pktcnt and enable it */
 +   writel(4 | SPI_PACKET_CNT_EN, regs-pkt_cnt);
 +   /* set FB_CLK_SEL */
 +   writel(SPI_FB_DELAY_180, regs-fb_clk);
 +   /* set CH_WIDTH and BUS_WIDTH as word */
 +   setbits_le32(regs-mode_cfg, SPI_MODE_CH_WIDTH_WORD |
 +   SPI_MODE_BUS_WIDTH_WORD);
 +   clrbits_le32(regs-ch_cfg, SPI_CH_CPOL_L); /* CPOL: active high */
 +
 +   /* clear rx and tx channel if set priveously */
 +   clrbits_le32(regs-ch_cfg, SPI_RX_CH_ON | 

Re: [U-Boot] [PATCH 09/10 V4] SPL: EXYNOS: Prepare for variable size SPL support

2013-10-09 Thread Rajeshwari Birje
Hi Simon,

We just have the binaries for BL1 which we receive with the product.

Regards,
Rajeshwari Shinde

On Tue, Oct 8, 2013 at 11:13 PM, Simon Glass s...@chromium.org wrote:
 On Fri, Sep 27, 2013 at 6:10 AM, Rajeshwari S Shinde 
 rajeshwar...@samsung.com wrote:

 When variable size SPL is used, the BL1 expects the SPL to be
 encapsulated differently: instead of putting the checksum at a fixed
 offset in the SPL blob, prepend the blob with a header including the
 size and the checksum.

 The enhancements include
 - adding a command line option, '--vs' to indicate the need for the
 variable size encapsulation
 - padding the fixed size encapsulated blob with 0xff instead of
 random
 memory contents
 - do not silently truncate the input file, report error instead
 - no need to explicitly closing files/freeing memory, this all
 happens
 on exit; removing cleanups it makes code clearer
 - profuse commenting
 - modify Makefile to allow enabling the new feature per board

 Signed-off-by: Vadim Bendebury vben...@chromium.org
 Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com


 Acked-by: Simon Glass s...@chromium.org

 Where is the new BL1 published, please?

 Regards,
 Simon

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot




-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 06/10 V4] Exynos5420: Add base patch for SMDK5420

2013-10-09 Thread Rajeshwari Birje
Hi Simon,

I guess you meant decode_sromc and board_eth_init functions.
Will add them in board.c and send next version.

Regards,
Rajeshwari Shinde

On Tue, Oct 8, 2013 at 11:07 PM, Simon Glass s...@chromium.org wrote:
 Hi Rajeshwari,

 On Fri, Sep 27, 2013 at 6:10 AM, Rajeshwari S Shinde 
 rajeshwar...@samsung.com wrote:

 Adding the base patch for Exynos based SMDK5420.
 This shall enable compilation and basic boot support for
 SMDK5420.

 Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
 Signed-off-by: Akshay Saraswat aksha...@samsung.com
 ---
 Changes in V2:
 - None
 Changes in V3:
 - None
 Changes in V4:
 - Rebased on latest u-boot-samsung tree.
  board/samsung/common/board.c  |   2 +
  board/samsung/smdk5420/Makefile   |  34 +
  board/samsung/smdk5420/smdk5420.c | 253
 ++
  board/samsung/smdk5420/smdk5420_spl.c |  52 +++
  boards.cfg|   1 +
  tools/Makefile|   2 +
  6 files changed, 344 insertions(+)
  create mode 100644 board/samsung/smdk5420/Makefile
  create mode 100644 board/samsung/smdk5420/smdk5420.c
  create mode 100644 board/samsung/smdk5420/smdk5420_spl.c

 diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
 index 7193c90..ce85ddb 100644
 --- a/board/samsung/common/board.c
 +++ b/board/samsung/common/board.c
 @@ -139,6 +139,7 @@ struct cros_ec_dev *board_get_cros_ec_dev(void)
 return local.cros_ec_dev;
  }

 +#ifdef CONFIG_CROS_EC
  static int board_init_cros_ec_devices(const void *blob)
  {
 local.cros_ec_err = cros_ec_init(blob, local.cros_ec_dev);
 @@ -147,6 +148,7 @@ static int board_init_cros_ec_devices(const void *blob)

 return 0;
  }
 +#endif

  #if defined(CONFIG_POWER)
  #ifdef CONFIG_POWER_MAX77686
 diff --git a/board/samsung/smdk5420/Makefile
 b/board/samsung/smdk5420/Makefile
 new file mode 100644
 index 000..be538ec
 --- /dev/null
 +++ b/board/samsung/smdk5420/Makefile
 @@ -0,0 +1,34 @@
 +#
 +# Copyright (C) 2013 Samsung Electronics
 +#
 +# SPDX-License-Identifier: GPL-2.0+
 +#
 +
 +include $(TOPDIR)/config.mk
 +
 +LIB= $(obj)lib$(BOARD).o
 +
 +COBJS  += smdk5420_spl.o
 +
 +ifndef CONFIG_SPL_BUILD
 +COBJS  += smdk5420.o
 +endif
 +
 +SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 +OBJS   := $(addprefix $(obj),$(COBJS) $(SOBJS))
 +
 +ALL:=   $(obj).depend $(LIB)
 +
 +all:   $(ALL)
 +
 +$(LIB):$(OBJS)
 +   $(call cmd_link_o_target, $(OBJS))
 +
 +#
 +
 +# defines $(obj).depend target
 +include $(SRCTREE)/rules.mk
 +
 +sinclude $(obj).depend
 +
 +#
 diff --git a/board/samsung/smdk5420/smdk5420.c
 b/board/samsung/smdk5420/smdk5420.c
 new file mode 100644
 index 000..cf76455
 --- /dev/null
 +++ b/board/samsung/smdk5420/smdk5420.c
 @@ -0,0 +1,253 @@
 +/*
 + * Copyright (C) 2013 Samsung Electronics
 + *
 + * SPDX-License-Identifier:GPL-2.0+
 + */
 +
 +#include common.h
 +#include fdtdec.h
 +#include asm/io.h
 +#include i2c.h
 +#include lcd.h
 +#include netdev.h
 +#include spi.h
 +#include asm/arch/board.h
 +#include asm/arch/cpu.h
 +#include asm/arch/dwmmc.h
 +#include asm/arch/gpio.h
 +#include asm/arch/mmc.h
 +#include asm/arch/pinmux.h
 +#include asm/arch/sromc.h
 +#include asm/arch/dp_info.h
 +#include power/pmic.h
 +
 +DECLARE_GLOBAL_DATA_PTR;
 +
 +#ifdef CONFIG_USB_EHCI_EXYNOS
 +static int board_usb_vbus_init(void)
 +{
 +   struct exynos5_gpio_part1 *gpio1 = (struct exynos5_gpio_part1 *)
 +
 samsung_get_base_gpio_part1();
 +
 +   /* Enable VBUS power switch */
 +   s5p_gpio_direction_output(gpio1-x2, 6, 1);
 +
 +   /* VBUS turn ON time */
 +   mdelay(3);
 +
 +   return 0;
 +}
 +#endif
 +
 +int exynos_init(void)
 +{
 +#ifdef CONFIG_USB_EHCI_EXYNOS
 +   board_usb_vbus_init();
 +#endif
 +   return 0;
 +}
 +
 +static int decode_sromc(const void *blob, struct fdt_sromc *config)
 +{
 +   int err;
 +   int node;
 +
 +   node = fdtdec_next_compatible(blob, 0,
 COMPAT_SAMSUNG_EXYNOS5_SROMC);
 +   if (node  0) {
 +   debug(Could not find SROMC node\n);
 +   return node;
 +   }
 +
 +   config-bank = fdtdec_get_int(blob, node, bank, 0);
 +   config-width = fdtdec_get_int(blob, node, width, 2);
 +
 +   err = fdtdec_get_int_array(blob, node, srom-timing,
 config-timing,
 +   FDT_SROM_TIMING_COUNT);
 +   if (err  0) {
 +   debug(Could not decode SROMC configuration Error: %s\n,
 + fdt_strerror(err));
 +   return -FDT_ERR_NOTFOUND;
 +   }
 +   return 0;
 +}
 +
 +int board_eth_init(bd_t *bis)
 +{
 +#ifdef CONFIG_SMC911X
 +   u32 smc_bw_conf, smc_bc_conf;
 +   struct fdt_sromc config;
 +   fdt_addr_t base_addr;
 +   int node;
 +
 +   node = 

Re: [U-Boot] [PATCH 00/10 V4] EXYNOS5420: Add SMDK5420 board support

2013-10-08 Thread Rajeshwari Birje
Hi Minkyu Kang,

Please do let me if any comments on this patch set

Regards,
Rajeshwari Shinde.

On Fri, Sep 27, 2013 at 5:40 PM, Rajeshwari S Shinde
rajeshwar...@samsung.com wrote:
 This patch adds basic board support for SMDK5420 board.
 These patches are tested for booting fine on EVT1 SMDK5420.

 Changes in V2:
 - Corrected a compilation issue for SMDK5420.

 Changes in V3:
 - Add patch to support variable size SPL support
 - Add patch to disable SMU for eMMC.

 Changes in V4:
 - Added check for MAX77686 pmic compilation.
 - Added correct calculation of gpio based addresses.
 - Rebased on the latest u-boot code.
 - Removed patches for UART and TZPC changes as
 they were not needed.
 - Added flag to disable SMU for eMMC.

 Rajeshwari S Shinde (9):
   EXYNOS5: Create a common board file
   Exynos5420: Add base addresses for 5420
   Exynos5420: Add clock initialization for 5420
   Exynos5420: Add DDR3 initialization for 5420
   Exynos5420: Add support for 5420 in pinmux and gpio
   Exynos5420: Add base patch for SMDK5420
   DTS: Add dts support for SMDK5420
   Config: Add initial config for SMDK5420
   SPL: EXYNOS: Prepare for variable size SPL support
   DWMMC: SMDK5420: Disable SMU for eMMC

  arch/arm/cpu/armv7/exynos/clock.c  | 270 -
  arch/arm/cpu/armv7/exynos/clock_init.h |  17 +
  arch/arm/cpu/armv7/exynos/clock_init_exynos5.c | 352 +++-
  arch/arm/cpu/armv7/exynos/dmc_common.c |  10 +-
  arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c  | 421 +-
  arch/arm/cpu/armv7/exynos/exynos5_setup.h  | 740 
 +++--
  arch/arm/cpu/armv7/exynos/pinmux.c | 245 +++-
  arch/arm/dts/exynos5.dtsi  | 213 +++
  arch/arm/dts/exynos5250.dtsi   | 177 +-
  arch/arm/dts/exynos5420.dtsi   |  74 +++
  arch/arm/include/asm/arch-exynos/board.h   |  17 +
  arch/arm/include/asm/arch-exynos/clk.h |   1 +
  arch/arm/include/asm/arch-exynos/clock.h   | 494 +
  arch/arm/include/asm/arch-exynos/cpu.h |  52 +-
  arch/arm/include/asm/arch-exynos/dmc.h | 121 ++--
  arch/arm/include/asm/arch-exynos/gpio.h| 143 -
  arch/arm/include/asm/arch-exynos/periph.h  |   3 +
  board/samsung/common/Makefile  |   4 +
  board/samsung/common/board.c   | 312 +++
  board/samsung/dts/exynos5420-smdk5420.dts  | 172 ++
  board/samsung/smdk5250/exynos5-dt.c| 269 +
  board/samsung/smdk5250/smdk5250.c  | 182 +-
  board/samsung/smdk5420/Makefile|  34 ++
  board/samsung/smdk5420/smdk5420.c  | 253 +
  board/samsung/smdk5420/smdk5420_spl.c  |  52 ++
  boards.cfg |   1 +
  drivers/mmc/dw_mmc.c   |  10 +
  drivers/mmc/exynos_dw_mmc.c|   3 +
  include/configs/exynos5-dt.h   | 302 ++
  include/configs/exynos5250-dt.h| 317 +--
  include/configs/smdk5420.h |  56 ++
  include/dwmmc.h|  15 +
  spl/Makefile   |   7 +-
  tools/Makefile |   2 +
  tools/mkexynosspl.c| 167 --
  35 files changed, 4271 insertions(+), 1237 deletions(-)
  create mode 100644 arch/arm/dts/exynos5.dtsi
  create mode 100644 arch/arm/dts/exynos5420.dtsi
  create mode 100644 arch/arm/include/asm/arch-exynos/board.h
  create mode 100644 board/samsung/common/board.c
  create mode 100644 board/samsung/dts/exynos5420-smdk5420.dts
  create mode 100644 board/samsung/smdk5420/Makefile
  create mode 100644 board/samsung/smdk5420/smdk5420.c
  create mode 100644 board/samsung/smdk5420/smdk5420_spl.c
  create mode 100644 include/configs/exynos5-dt.h
  create mode 100644 include/configs/smdk5420.h

 --
 1.7.12.4

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/4] spi: exynos: Improve performance

2013-10-08 Thread Rajeshwari Birje
Hi Jagan,

Yes I have tested them on u-boot-spi.git/master for spi booting.

Regards,
Rajeshwari Shinde.

On Tue, Oct 8, 2013 at 6:08 PM, Jagan Teki jagannadh.t...@gmail.com wrote:
 On Tue, Oct 8, 2013 at 4:20 PM, Rajeshwari S Shinde
 rajeshwar...@samsung.com wrote:
 This patchset has a set of patches which improves the
 performance of spi on exynos.
 Have combined all individual patches into a single patchset.
 Patches are based on u-boot-spi.git master branch.

 Thanks for your patch-set.
 Can you confirm, all these were tested against on u-boot-spi.git/master?

 --
 Thanks,
 Jagan.
 
 Jagannadha Sutradharudu Teki,
 E: jagannadh.t...@gmail.com, P: +91-9676773388
 Engineer - System Software Hacker
 U-boot - SPI Custodian and Zynq APSOC
 Ln: http://www.linkedin.com/in/jaganteki
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/4] spi: exynos: Improve performance

2013-10-08 Thread Rajeshwari Birje
Hi Jagan,

We have  W25Q80BW on smdk5250 board.

Regards,
Rajeshwari.

On Tue, Oct 8, 2013 at 6:14 PM, Jagan Teki jagannadh.t...@gmail.com wrote:
 On Tue, Oct 8, 2013 at 6:11 PM, Rajeshwari Birje
 rajeshwari.bi...@gmail.com wrote:
 Hi Jagan,

 Yes I have tested them on u-boot-spi.git/master for spi booting.

 Sorry for sequence of questions which spi flash parts you tested.?


 Regards,
 Rajeshwari Shinde.

 On Tue, Oct 8, 2013 at 6:08 PM, Jagan Teki jagannadh.t...@gmail.com wrote:
 On Tue, Oct 8, 2013 at 4:20 PM, Rajeshwari S Shinde
 rajeshwar...@samsung.com wrote:
 This patchset has a set of patches which improves the
 performance of spi on exynos.
 Have combined all individual patches into a single patchset.
 Patches are based on u-boot-spi.git master branch.

 Thanks for your patch-set.
 Can you confirm, all these were tested against on u-boot-spi.git/master?

 --
 Thanks,
 Jagan.
 
 Jagannadha Sutradharudu Teki,
 E: jagannadh.t...@gmail.com, P: +91-9676773388
 Engineer - System Software Hacker
 U-boot - SPI Custodian and Zynq APSOC
 Ln: http://www.linkedin.com/in/jaganteki
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



 --
 Regards,
 Rajeshwari Shinde



 --
 Thanks,
 Jagan.
 
 Jagannadha Sutradharudu Teki,
 E: jagannadh.t...@gmail.com, P: +91-9676773388
 Engineer - System Software Hacker
 U-boot - SPI Custodian and Zynq APSOC
 Ln: http://www.linkedin.com/in/jaganteki



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/4] spi: exynos: Improve performance

2013-10-08 Thread Rajeshwari Birje
Hi Jagan,

Posted http://patchwork.ozlabs.org/patch/247461/ V3.
Posted it separately as it is arch/arm related.

Regards,
Rajeshwari

On Tue, Oct 8, 2013 at 6:36 PM, Jagan Teki jagannadh.t...@gmail.com wrote:
 On Tue, Oct 8, 2013 at 6:34 PM, Rajeshwari Birje
 rajeshwari.bi...@gmail.com wrote:
 Hi Jagan,

 We have  W25Q80BW on smdk5250 board.

 Great, thanks for quick response.

 You missed one more patch http://patchwork.ozlabs.org/patch/247461/
 may be you have a plan for sending this later, true?


 Regards,
 Rajeshwari.

 On Tue, Oct 8, 2013 at 6:14 PM, Jagan Teki jagannadh.t...@gmail.com wrote:
 On Tue, Oct 8, 2013 at 6:11 PM, Rajeshwari Birje
 rajeshwari.bi...@gmail.com wrote:
 Hi Jagan,

 Yes I have tested them on u-boot-spi.git/master for spi booting.

 Sorry for sequence of questions which spi flash parts you tested.?


 Regards,
 Rajeshwari Shinde.

 On Tue, Oct 8, 2013 at 6:08 PM, Jagan Teki jagannadh.t...@gmail.com 
 wrote:
 On Tue, Oct 8, 2013 at 4:20 PM, Rajeshwari S Shinde
 rajeshwar...@samsung.com wrote:
 This patchset has a set of patches which improves the
 performance of spi on exynos.
 Have combined all individual patches into a single patchset.
 Patches are based on u-boot-spi.git master branch.

 Thanks for your patch-set.
 Can you confirm, all these were tested against on u-boot-spi.git/master?

 --
 Thanks,
 Jagan.
 
 Jagannadha Sutradharudu Teki,
 E: jagannadh.t...@gmail.com, P: +91-9676773388
 Engineer - System Software Hacker
 U-boot - SPI Custodian and Zynq APSOC
 Ln: http://www.linkedin.com/in/jaganteki
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



 --
 Regards,
 Rajeshwari Shinde



 --
 Thanks,
 Jagan.
 
 Jagannadha Sutradharudu Teki,
 E: jagannadh.t...@gmail.com, P: +91-9676773388
 Engineer - System Software Hacker
 U-boot - SPI Custodian and Zynq APSOC
 Ln: http://www.linkedin.com/in/jaganteki



 --
 Regards,
 Rajeshwari Shinde



 --
 Thanks,
 Jagan.
 
 Jagannadha Sutradharudu Teki,
 E: jagannadh.t...@gmail.com, P: +91-9676773388
 Engineer - System Software Hacker
 U-boot - SPI Custodian and Zynq APSOC
 Ln: http://www.linkedin.com/in/jaganteki



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] : SPI patches

2013-10-07 Thread Rajeshwari Birje
Hi Jagan,

Sorry for late reply.
Will work on this and will send the patches soon, was caught in other
project work.

Thanks and Regards,
Rajeshwari Shinde

On Mon, Oct 7, 2013 at 9:31 PM, Jagan Teki jagannadh.t...@gmail.com wrote:
 On Fri, Oct 4, 2013 at 1:34 AM, Jagan Teki jagannadh.t...@gmail.com wrote:
 Hi Rajeswari,

 Below is a list of pending patches on my queue:
 http://patchwork.ozlabs.org/patch/247461/
 http://patchwork.ozlabs.org/patch/247457/
 http://patchwork.ozlabs.org/patch/247452/
 http://patchwork.ozlabs.org/patch/247451/
 http://patchwork.ozlabs.org/patch/247450/

 Request you to fix my comments and re-base the same on to u-boot-spi.git repo
 with master-probe branch.

 Please test this new branch with your changes and let me know for any
 issues/concerns.

 Any update on this, I have plan to close this by next coming release.
 Please use u-boot-spi.git with master branch for testing.

 --
 Thanks,
 Jagan.
 
 Jagannadha Sutradharudu Teki,
 E: jagannadh.t...@gmail.com, P: +91-9676773388
 Engineer - System Software Hacker
 U-boot - SPI Custodian and Zynq APSOC
 Ln: http://www.linkedin.com/in/jaganteki
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] MMC: DWMMC: Correct the CLKDIV register value

2013-09-26 Thread Rajeshwari Birje
Hi Pantelis,

If Jaehoon Chung has no comments we can go with the same patch.
@Jaehoon: do let me know if any better suggestions.

Regards,
Rajeshwari


On Tue, Sep 17, 2013 at 8:57 PM, Pantelis Antoniou
pa...@antoniou-consulting.com wrote:
 Hi Rajesh,

 I guess we wait for an updated patch here?

 Regards

 -- Pantelis

 On Sep 11, 2013, at 4:25 PM, Rajeshwari Birje wrote:

 Hi Jaehoon Chung,

 Thank you for comments,



 On Wed, Sep 11, 2013 at 11:31 AM, Jaehoon Chung jh80.ch...@samsung.com 
 wrote:
 On 09/11/2013 02:28 PM, Rajeshwari Birje wrote:
 Hi All,

 Please do let me know if any comments on the same.

 Regards,
 Rajeshwari Shinde.

 On Thu, Aug 29, 2013 at 4:34 PM, Rajeshwari Birje
 rajeshwari.bi...@gmail.com wrote:
 CCing the MMC Maintainer.

 On Thu, Aug 29, 2013 at 4:22 PM, Rajeshwari S Shinde
 rajeshwar...@samsung.com wrote:
 This patch corrects the divider value written to CLKDIV register.
 Since SDCLKIN is divided inside controller by the DIVRATIO value set
 in the CLKSEL register, we need to use the same output clock value to
 calculate the CLKDIV value.
 as per user manual: cclk_in = SDCLKIN / (DIVRATIO + 1)

 Input parameter to mmc_clk is changed to dwmci_host, since
 we need the same to read DWMCI_CLKSEL register.

 This improves the read timing values for channel 0 on SMDK5250
 from 0.288sec to 0.144sec

 Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
 ---
 arch/arm/include/asm/arch-exynos/dwmmc.h |  4 
 drivers/mmc/dw_mmc.c |  2 +-
 drivers/mmc/exynos_dw_mmc.c  | 17 +++--
 include/dwmmc.h  |  2 +-
 4 files changed, 21 insertions(+), 4 deletions(-)

 diff --git a/arch/arm/include/asm/arch-exynos/dwmmc.h 
 b/arch/arm/include/asm/arch-exynos/dwmmc.h
 index b9eca76..f1c8d8a 100644
 --- a/arch/arm/include/asm/arch-exynos/dwmmc.h
 +++ b/arch/arm/include/asm/arch-exynos/dwmmc.h
 @@ -14,6 +14,10 @@
 #define DWMCI_SET_DRV_CLK(x)   ((x)  16)
 #define DWMCI_SET_DIV_RATIO(x) ((x)  24)

 +/* CLKSEL Register */
 +#define DWMCI_DIVRATIO_BIT 24
 +#define DWMCI_DIVRATIO_MASK0x7
 +
 #ifdef CONFIG_OF_CONTROL
 int exynos_dwmmc_init(const void *blob);
 #endif
 diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
 index a82ee17..3406bdd 100644
 --- a/drivers/mmc/dw_mmc.c
 +++ b/drivers/mmc/dw_mmc.c
 @@ -224,7 +224,7 @@ static int dwmci_setup_bus(struct dwmci_host *host, 
 u32 freq)
 * host-bus_hz should be set from user.
 */
if (host-mmc_clk)
 -   sclk = host-mmc_clk(host-dev_index);
 +   sclk = host-mmc_clk(host);
else if (host-bus_hz)
sclk = host-bus_hz;
else {
 diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
 index 4ef9fec..1ed4afe 100644
 --- a/drivers/mmc/exynos_dw_mmc.c
 +++ b/drivers/mmc/exynos_dw_mmc.c
 @@ -29,9 +29,22 @@ static void exynos_dwmci_clksel(struct dwmci_host 
 *host)
dwmci_writel(host, DWMCI_CLKSEL, host-clksel_val);
 }

 -unsigned int exynos_dwmci_get_clk(int dev_index)
 +unsigned int exynos_dwmci_get_clk(struct dwmci_host *host)
 {
 -   return get_mmc_clk(dev_index);
 +   unsigned long sclk;
 +   int8_t clk_div;
 +
 +   /*
 +* Since SDCLKIN is divided inside controller by the DIVRATIO
 +* value set in the CLKSEL register, we need to use the same 
 output
 +* clock value to calculate the CLKDIV value.
 +* as per user manual:cclk_in = SDCLKIN / (DIVRATIO + 1)
 +*/
 +   clk_div = ((dwmci_readl(host, DWMCI_CLKSEL)  
 DWMCI_DIVRATIO_BIT)
 +DWMCI_DIVRATIO_MASK) + 1;
 I known DIVRATIO is only exynos5 feature..
 And If clk_div is set to 0, then clk_phase/clk_strength is also set to 0.

 And I think we can fixed this problem into exynos_dwmci_add_port.

 Best Regards,
 Jaehoon Chung

 during the dwmci_setup_bus we call for mmc_clk,  this is where the
 get_mmc_clk(host-dev_index)  retruns you the parent clock but since
 we need the output of mux  cclk_in,
 added in the exynos_dwmci_get_clk.
 --
 Regards,
 Rajeshwari Shinde

 +   sclk = get_mmc_clk(host-dev_index);
 +
 +   return sclk / clk_div;
 }

 /*
 diff --git a/include/dwmmc.h b/include/dwmmc.h
 index 08ced0b..26b53af 100644
 --- a/include/dwmmc.h
 +++ b/include/dwmmc.h
 @@ -138,7 +138,7 @@ struct dwmci_host {
struct mmc *mmc;

void (*clksel)(struct dwmci_host *host);
 -   unsigned int (*mmc_clk)(int dev_index);
 +   unsigned int (*mmc_clk)(struct dwmci_host *host);
 };

 struct dwmci_idmac {
 --
 1.7.12.4

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



 --
 Regards,
 Rajeshwari Shinde








-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 05/12 V3] Exynos5420: Modify TZPC init to support 5420

2013-09-22 Thread Rajeshwari Birje
Hi Simon,

On Fri, Sep 20, 2013 at 8:31 PM, Simon Glass s...@chromium.org wrote:

 Hi Rajeshwari,

 On Fri, Sep 20, 2013 at 3:32 AM, Rajeshwari Birje 
 rajeshwari.bi...@gmail.com wrote:

 Hi Simon

 Thank you for coments.

 Regards,
 Rajeshwari Shinde

 On Thu, Sep 19, 2013 at 11:27 AM, Simon Glass s...@chromium.org wrote:

 Hi Rajeshwari,

 On Wed, Sep 11, 2013 at 4:01 AM, Rajeshwari S Shinde 
 rajeshwar...@samsung.com wrote:

  From: Akshay Saraswat aksha...@samsung.com
 
  Currently, part of TZPC init code for Exynos5 starts setting DECPROT
  from the base address 0x1010 upto 0x1019 but in case of
  Exynos5420 we need it to start from 0x0100E and keep end address
  same as 0x1019.
 
  Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
  Signed-off-by: Akshay Saraswat aksha...@samsung.com
  ---
  Changes in V2:
  - None
  Changes in V3:
  - None
   arch/arm/cpu/armv7/exynos/tzpc.c | 7 ++-
   1 file changed, 6 insertions(+), 1 deletion(-)
 
  diff --git a/arch/arm/cpu/armv7/exynos/tzpc.c
  b/arch/arm/cpu/armv7/exynos/tzpc.c
  index 395077c..1102596 100644
  --- a/arch/arm/cpu/armv7/exynos/tzpc.c
  +++ b/arch/arm/cpu/armv7/exynos/tzpc.c
  @@ -23,7 +23,12 @@ void tzpc_init(void)
  else if (cpu_is_exynos4())
  end = start + ((EXYNOS4_NR_TZPC_BANKS - 1) *
  TZPC_BASE_OFFSET);
 
  -   for (addr = start; addr = end; addr += TZPC_BASE_OFFSET) {
  +   if (proid_is_exynos5420())
  +   addr = start - 0x2;
 

 Shouldn't this be in a #define somewhere?

 Instead of having a  #define  we get the start address via
 samsung_get_base_tzpc, since there exception in case of 5420 where we need
 to start from 0x100E we put a if condition.


 Does that mean that the address returned by  samsung_get_base_tzpc()
 should be different for 5250 and 5420?

Yes they can be different, depends on the value you have mentioned in the
cpu.h file for that SOC.




  +   else
  +   addr = start;
  +
  +   for (; addr = end; addr += TZPC_BASE_OFFSET) {
  tzpc = (struct exynos_tzpc *)addr;
 
  if (addr == start)
  --
  1.7.12.4
 
 

 Regards,
 Simon


 --
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 11/12 V3] SPL: EXYNOS: Prepare for variable size SPL support

2013-09-22 Thread Rajeshwari Birje
Hi Simon,


On Thu, Sep 19, 2013 at 11:41 AM, Simon Glass s...@chromium.org wrote:

 On Wed, Sep 11, 2013 at 4:01 AM, Rajeshwari S Shinde 
 rajeshwar...@samsung.com wrote:

  When variable size SPL is used, the BL1 expects the SPL to be
  encapsulated differently: instead of putting the checksum at a fixed
  offset in the SPL blob, prepend the blob with a header including the
  size and the checksum.
 
  The enhancements include
  - adding a command line option, '--vs' to indicate the need for
 the
  variable size encapsulation
  - padding the fixed size encapsulated blob with 0xff instead of
  random
  memory contents
  - do not silently truncate the input file, report error instead
  - no need to explicitly closing files/freeing memory, this all
  happens
  on exit; removing cleanups it makes code clearer
  - profuse commenting
  - modify Makefile to allow enabling the new feature per board
 
  Signed-off-by: Vadim Bendebury vben...@chromium.org
  Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
 

 Acked-by: Simon Glass s...@chromium.org

 Will 5250 support variable-sized SPL also?

I have tested variable size support for 5420 as have bl1 image supporting
variable size for same.
I don't have a bl1 image supporting variable size for 5250, but it boots
fine without vriable size support even after applying this patch.
-- 
Regards,
Rajeshwari Shinde


 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 01/12 V3] EXYNOS5: Create a common board file

2013-09-22 Thread Rajeshwari Birje
Hi Simon,

On Sat, Sep 21, 2013 at 8:11 AM, Simon Glass s...@chromium.org wrote:

 Hi Rajeshwari,

 On Wed, Sep 11, 2013 at 4:01 AM, Rajeshwari S Shinde 
 rajeshwar...@samsung.com wrote:

  Create a common board.c file for all functions which are common across
  all EXYNOS5 platforms.
 
  exynos_init function is provided for platform cpecific code.
 
  Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
 

 I have a few more comments after trying this out on Pit.

 My source tree is here, in branch try-5420.

 git://git.denx.de/u-boot-x86.git

 This includes a few modifications to your patches to make them apply on
 mainline, and also one patch to fix Pit:

 - add a device tree
 - fix a few defines (CONFIG_POWER... instead of CONFIG_PMIC)
 - define CONFIG_POWER to get PS HOLD asserted (otherwise it powers off
 after 1 second)
 - disable MAX77686 PMIC (there is no driver for 77802)
 - remove PMIC code in smdk5420.c since it is already in
 board/samsung/common/board.c
 - serial support for SPL, not really needed
 - fix boards.cfg format
 - hack tools/Makefile

 With this I can boot to a prompt on Pit (I just type 'crosfw' inside the
 Chrome OS chroot to build and download over USB). I suspect SMDK5420 does
 not need PS_HOLD, and I think your PMIC code is not being included.

 I hope this helps with your patch preparation for v4 - it would be great if
 you could include Pit support as well as smdk5420. Hopefully they can use
 the same config, just a different device tree.

 Regards,
 Simon
 Okay, will insert these too before sending a V4 patch.

-- 
Regards,
Rajeshwari Shinde

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 05/12 V3] Exynos5420: Modify TZPC init to support 5420

2013-09-20 Thread Rajeshwari Birje
Hi Simon

Thank you for coments.

Regards,
Rajeshwari Shinde

On Thu, Sep 19, 2013 at 11:27 AM, Simon Glass s...@chromium.org wrote:

 Hi Rajeshwari,

 On Wed, Sep 11, 2013 at 4:01 AM, Rajeshwari S Shinde 
 rajeshwar...@samsung.com wrote:

  From: Akshay Saraswat aksha...@samsung.com
 
  Currently, part of TZPC init code for Exynos5 starts setting DECPROT
  from the base address 0x1010 upto 0x1019 but in case of
  Exynos5420 we need it to start from 0x0100E and keep end address
  same as 0x1019.
 
  Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
  Signed-off-by: Akshay Saraswat aksha...@samsung.com
  ---
  Changes in V2:
  - None
  Changes in V3:
  - None
   arch/arm/cpu/armv7/exynos/tzpc.c | 7 ++-
   1 file changed, 6 insertions(+), 1 deletion(-)
 
  diff --git a/arch/arm/cpu/armv7/exynos/tzpc.c
  b/arch/arm/cpu/armv7/exynos/tzpc.c
  index 395077c..1102596 100644
  --- a/arch/arm/cpu/armv7/exynos/tzpc.c
  +++ b/arch/arm/cpu/armv7/exynos/tzpc.c
  @@ -23,7 +23,12 @@ void tzpc_init(void)
  else if (cpu_is_exynos4())
  end = start + ((EXYNOS4_NR_TZPC_BANKS - 1) *
  TZPC_BASE_OFFSET);
 
  -   for (addr = start; addr = end; addr += TZPC_BASE_OFFSET) {
  +   if (proid_is_exynos5420())
  +   addr = start - 0x2;
 

 Shouldn't this be in a #define somewhere?

Instead of having a  #define  we get the start address via
samsung_get_base_tzpc, since there exception in case of 5420 where we need
to start from 0x100E we put a if condition.



  +   else
  +   addr = start;
  +
  +   for (; addr = end; addr += TZPC_BASE_OFFSET) {
  tzpc = (struct exynos_tzpc *)addr;
 
  if (addr == start)
  --
  1.7.12.4
 
 
 Regards,
 Simon

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot

 --
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 12/12 V3] DWMMC: SMDK5420: Disable SMU for eMMC

2013-09-19 Thread Rajeshwari Birje
Hi Simon,

Thank you for comments.
Will add a check so that it will be executed only for Exynos5420 boards.

Thanks and Regards,
Rajeshwari.


On Thu, Sep 19, 2013 at 11:42 AM, Simon Glass s...@chromium.org wrote:
 Hi Rajeshwari,

 On Wed, Sep 11, 2013 at 4:01 AM, Rajeshwari S Shinde 
 rajeshwar...@samsung.com wrote:

 SMDK5420 has a new Security Management Unit added
 for dwmmc driver, hence, configuring the control
 registers to support booting via eMMC.

 Signed-off-by: Alim Akhtar alim.akh...@samsung.com
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 ---
 Changes in V3:
 - New patch.
  drivers/mmc/dw_mmc.c |  7 +++
  include/dwmmc.h  | 12 
  2 files changed, 19 insertions(+)

 diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
 index a82ee17..d763949 100644
 --- a/drivers/mmc/dw_mmc.c
 +++ b/drivers/mmc/dw_mmc.c
 @@ -300,6 +300,13 @@ static int dwmci_init(struct mmc *mmc)
 struct dwmci_host *host = (struct dwmci_host *)mmc-priv;
 u32 fifo_size;

 +   dwmci_writel(host, EMMCP_MPSBEGIN0, 0);
 +   dwmci_writel(host, EMMCP_SEND0, 0);
 +   dwmci_writel(host, EMMCP_CTRL0,
 +   MPSCTRL_SECURE_READ_BIT | MPSCTRL_SECURE_WRITE_BIT |
 +   MPSCTRL_NON_SECURE_READ_BIT | MPSCTRL_NON_SECURE_WRITE_BIT
 |
 +   MPSCTRL_VALID);
 +


 Is this safe for all users of this file (Exynos5250, etc. ?

 Regards,
 Simon

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot




-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] MMC: DWMMC: Correct the CLKDIV register value

2013-09-11 Thread Rajeshwari Birje
Hi Jaehoon Chung,

Thank you for comments,



On Wed, Sep 11, 2013 at 11:31 AM, Jaehoon Chung jh80.ch...@samsung.com wrote:
 On 09/11/2013 02:28 PM, Rajeshwari Birje wrote:
 Hi All,

 Please do let me know if any comments on the same.

 Regards,
 Rajeshwari Shinde.

 On Thu, Aug 29, 2013 at 4:34 PM, Rajeshwari Birje
 rajeshwari.bi...@gmail.com wrote:
 CCing the MMC Maintainer.

 On Thu, Aug 29, 2013 at 4:22 PM, Rajeshwari S Shinde
 rajeshwar...@samsung.com wrote:
 This patch corrects the divider value written to CLKDIV register.
 Since SDCLKIN is divided inside controller by the DIVRATIO value set
 in the CLKSEL register, we need to use the same output clock value to
 calculate the CLKDIV value.
 as per user manual: cclk_in = SDCLKIN / (DIVRATIO + 1)

 Input parameter to mmc_clk is changed to dwmci_host, since
 we need the same to read DWMCI_CLKSEL register.

 This improves the read timing values for channel 0 on SMDK5250
 from 0.288sec to 0.144sec

 Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
 ---
  arch/arm/include/asm/arch-exynos/dwmmc.h |  4 
  drivers/mmc/dw_mmc.c |  2 +-
  drivers/mmc/exynos_dw_mmc.c  | 17 +++--
  include/dwmmc.h  |  2 +-
  4 files changed, 21 insertions(+), 4 deletions(-)

 diff --git a/arch/arm/include/asm/arch-exynos/dwmmc.h 
 b/arch/arm/include/asm/arch-exynos/dwmmc.h
 index b9eca76..f1c8d8a 100644
 --- a/arch/arm/include/asm/arch-exynos/dwmmc.h
 +++ b/arch/arm/include/asm/arch-exynos/dwmmc.h
 @@ -14,6 +14,10 @@
  #define DWMCI_SET_DRV_CLK(x)   ((x)  16)
  #define DWMCI_SET_DIV_RATIO(x) ((x)  24)

 +/* CLKSEL Register */
 +#define DWMCI_DIVRATIO_BIT 24
 +#define DWMCI_DIVRATIO_MASK0x7
 +
  #ifdef CONFIG_OF_CONTROL
  int exynos_dwmmc_init(const void *blob);
  #endif
 diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
 index a82ee17..3406bdd 100644
 --- a/drivers/mmc/dw_mmc.c
 +++ b/drivers/mmc/dw_mmc.c
 @@ -224,7 +224,7 @@ static int dwmci_setup_bus(struct dwmci_host *host, 
 u32 freq)
  * host-bus_hz should be set from user.
  */
 if (host-mmc_clk)
 -   sclk = host-mmc_clk(host-dev_index);
 +   sclk = host-mmc_clk(host);
 else if (host-bus_hz)
 sclk = host-bus_hz;
 else {
 diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
 index 4ef9fec..1ed4afe 100644
 --- a/drivers/mmc/exynos_dw_mmc.c
 +++ b/drivers/mmc/exynos_dw_mmc.c
 @@ -29,9 +29,22 @@ static void exynos_dwmci_clksel(struct dwmci_host *host)
 dwmci_writel(host, DWMCI_CLKSEL, host-clksel_val);
  }

 -unsigned int exynos_dwmci_get_clk(int dev_index)
 +unsigned int exynos_dwmci_get_clk(struct dwmci_host *host)
  {
 -   return get_mmc_clk(dev_index);
 +   unsigned long sclk;
 +   int8_t clk_div;
 +
 +   /*
 +* Since SDCLKIN is divided inside controller by the DIVRATIO
 +* value set in the CLKSEL register, we need to use the same output
 +* clock value to calculate the CLKDIV value.
 +* as per user manual:cclk_in = SDCLKIN / (DIVRATIO + 1)
 +*/
 +   clk_div = ((dwmci_readl(host, DWMCI_CLKSEL)  DWMCI_DIVRATIO_BIT)
 +DWMCI_DIVRATIO_MASK) + 1;
 I known DIVRATIO is only exynos5 feature..
 And If clk_div is set to 0, then clk_phase/clk_strength is also set to 0.

 And I think we can fixed this problem into exynos_dwmci_add_port.

 Best Regards,
 Jaehoon Chung

during the dwmci_setup_bus we call for mmc_clk,  this is where the
get_mmc_clk(host-dev_index)  retruns you the parent clock but since
we need the output of mux  cclk_in,
added in the exynos_dwmci_get_clk.
-- 
Regards,
Rajeshwari Shinde

 +   sclk = get_mmc_clk(host-dev_index);
 +
 +   return sclk / clk_div;
  }

  /*
 diff --git a/include/dwmmc.h b/include/dwmmc.h
 index 08ced0b..26b53af 100644
 --- a/include/dwmmc.h
 +++ b/include/dwmmc.h
 @@ -138,7 +138,7 @@ struct dwmci_host {
 struct mmc *mmc;

 void (*clksel)(struct dwmci_host *host);
 -   unsigned int (*mmc_clk)(int dev_index);
 +   unsigned int (*mmc_clk)(struct dwmci_host *host);
  };

  struct dwmci_idmac {
 --
 1.7.12.4

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



 --
 Regards,
 Rajeshwari Shinde




___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 00/12 V3] EXYNOS5420: Add SMDK5420 board support

2013-09-11 Thread Rajeshwari Birje
Hi All,

Please do let me if any review comments on these patches.

On Wed, Sep 11, 2013 at 3:31 PM, Rajeshwari S Shinde
rajeshwar...@samsung.com wrote:
 This patch adds basic board support for SMDK5420 board.
 These patches are tested for booting fine on EVT1 SMDK5420.

 Changes in V2:
 - Corrected a compilation issue for SMDK5420.

 Changes in V3:
 - Add patch to support variable size SPL support
 - Add patch to disable SMU for eMMC.

 Akshay Saraswat (4):
   Exynos5420: Add base addresses for 5420
   Exynos5420: Modify TZPC init to support 5420
   Exynos5420: Alter UNCON and UFCON for 5420
   Exynos5420: Add support for 5420 in pinmux and gpio

 Rajeshwari S Shinde (8):
   EXYNOS5: Create a common board file
   Exynos5420: Add clock initialization for 5420
   Exynos5420: Add DDR3 initialization for 5420
   Exynos5420: Add base patch for SMDK5420
   DTS: Add dts support for SMDK5420
   Config: Add initial config for SMDK5420
   SPL: EXYNOS: Prepare for variable size SPL support
   DWMMC: SMDK5420: Disable SMU for eMMC

  MAINTAINERS|   1 +
  Makefile   |   2 +-
  arch/arm/cpu/armv7/exynos/clock.c  | 270 -
  arch/arm/cpu/armv7/exynos/clock_init.h |  17 +
  arch/arm/cpu/armv7/exynos/clock_init_exynos5.c | 352 +++-
  arch/arm/cpu/armv7/exynos/dmc_common.c |   8 -
  arch/arm/cpu/armv7/exynos/dmc_init_ddr3.c  | 413 +-
  arch/arm/cpu/armv7/exynos/exynos5_setup.h  | 740 
 +++--
  arch/arm/cpu/armv7/exynos/pinmux.c | 171 +-
  arch/arm/cpu/armv7/exynos/tzpc.c   |   7 +-
  arch/arm/dts/exynos5.dtsi  | 213 +++
  arch/arm/dts/exynos5250.dtsi   | 177 +-
  arch/arm/dts/exynos5420.dtsi   |  74 +++
  arch/arm/include/asm/arch-exynos/board.h   |  17 +
  arch/arm/include/asm/arch-exynos/clk.h |   1 +
  arch/arm/include/asm/arch-exynos/clock.h   | 494 +
  arch/arm/include/asm/arch-exynos/cpu.h |  52 +-
  arch/arm/include/asm/arch-exynos/dmc.h | 121 ++--
  arch/arm/include/asm/arch-exynos/gpio.h|  52 ++
  board/samsung/common/Makefile  |   4 +
  board/samsung/common/board.c   | 314 +++
  board/samsung/dts/exynos5420-smdk5420.dts  | 172 ++
  board/samsung/smdk5250/exynos5-dt.c| 269 +
  board/samsung/smdk5250/smdk5250.c  | 182 +-
  board/samsung/smdk5420/Makefile|  50 ++
  board/samsung/smdk5420/smdk5420.c  | 281 ++
  board/samsung/smdk5420/smdk5420_spl.c  |  68 +++
  boards.cfg |   1 +
  drivers/mmc/dw_mmc.c   |   7 +
  drivers/serial/serial_s5p.c|   6 +
  include/configs/exynos5250-dt.h|   2 +
  include/configs/smdk5420.h | 321 +++
  include/dwmmc.h|  12 +
  spl/Makefile   |   7 +-
  tools/Makefile |   2 +
  tools/mkexynosspl.c| 166 --
  36 files changed, 4132 insertions(+), 914 deletions(-)
  create mode 100644 arch/arm/dts/exynos5.dtsi
  create mode 100644 arch/arm/dts/exynos5420.dtsi
  create mode 100644 arch/arm/include/asm/arch-exynos/board.h
  create mode 100644 board/samsung/common/board.c
  create mode 100644 board/samsung/dts/exynos5420-smdk5420.dts
  create mode 100644 board/samsung/smdk5420/Makefile
  create mode 100644 board/samsung/smdk5420/smdk5420.c
  create mode 100644 board/samsung/smdk5420/smdk5420_spl.c
  create mode 100644 include/configs/smdk5420.h

 --
 1.7.12.4

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] MMC: DWMMC: Correct the CLKDIV register value

2013-09-10 Thread Rajeshwari Birje
Hi All,

Please do let me know if any comments on the same.

Regards,
Rajeshwari Shinde.

On Thu, Aug 29, 2013 at 4:34 PM, Rajeshwari Birje
rajeshwari.bi...@gmail.com wrote:
 CCing the MMC Maintainer.

 On Thu, Aug 29, 2013 at 4:22 PM, Rajeshwari S Shinde
 rajeshwar...@samsung.com wrote:
 This patch corrects the divider value written to CLKDIV register.
 Since SDCLKIN is divided inside controller by the DIVRATIO value set
 in the CLKSEL register, we need to use the same output clock value to
 calculate the CLKDIV value.
 as per user manual: cclk_in = SDCLKIN / (DIVRATIO + 1)

 Input parameter to mmc_clk is changed to dwmci_host, since
 we need the same to read DWMCI_CLKSEL register.

 This improves the read timing values for channel 0 on SMDK5250
 from 0.288sec to 0.144sec

 Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
 ---
  arch/arm/include/asm/arch-exynos/dwmmc.h |  4 
  drivers/mmc/dw_mmc.c |  2 +-
  drivers/mmc/exynos_dw_mmc.c  | 17 +++--
  include/dwmmc.h  |  2 +-
  4 files changed, 21 insertions(+), 4 deletions(-)

 diff --git a/arch/arm/include/asm/arch-exynos/dwmmc.h 
 b/arch/arm/include/asm/arch-exynos/dwmmc.h
 index b9eca76..f1c8d8a 100644
 --- a/arch/arm/include/asm/arch-exynos/dwmmc.h
 +++ b/arch/arm/include/asm/arch-exynos/dwmmc.h
 @@ -14,6 +14,10 @@
  #define DWMCI_SET_DRV_CLK(x)   ((x)  16)
  #define DWMCI_SET_DIV_RATIO(x) ((x)  24)

 +/* CLKSEL Register */
 +#define DWMCI_DIVRATIO_BIT 24
 +#define DWMCI_DIVRATIO_MASK0x7
 +
  #ifdef CONFIG_OF_CONTROL
  int exynos_dwmmc_init(const void *blob);
  #endif
 diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
 index a82ee17..3406bdd 100644
 --- a/drivers/mmc/dw_mmc.c
 +++ b/drivers/mmc/dw_mmc.c
 @@ -224,7 +224,7 @@ static int dwmci_setup_bus(struct dwmci_host *host, u32 
 freq)
  * host-bus_hz should be set from user.
  */
 if (host-mmc_clk)
 -   sclk = host-mmc_clk(host-dev_index);
 +   sclk = host-mmc_clk(host);
 else if (host-bus_hz)
 sclk = host-bus_hz;
 else {
 diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
 index 4ef9fec..1ed4afe 100644
 --- a/drivers/mmc/exynos_dw_mmc.c
 +++ b/drivers/mmc/exynos_dw_mmc.c
 @@ -29,9 +29,22 @@ static void exynos_dwmci_clksel(struct dwmci_host *host)
 dwmci_writel(host, DWMCI_CLKSEL, host-clksel_val);
  }

 -unsigned int exynos_dwmci_get_clk(int dev_index)
 +unsigned int exynos_dwmci_get_clk(struct dwmci_host *host)
  {
 -   return get_mmc_clk(dev_index);
 +   unsigned long sclk;
 +   int8_t clk_div;
 +
 +   /*
 +* Since SDCLKIN is divided inside controller by the DIVRATIO
 +* value set in the CLKSEL register, we need to use the same output
 +* clock value to calculate the CLKDIV value.
 +* as per user manual:cclk_in = SDCLKIN / (DIVRATIO + 1)
 +*/
 +   clk_div = ((dwmci_readl(host, DWMCI_CLKSEL)  DWMCI_DIVRATIO_BIT)
 +DWMCI_DIVRATIO_MASK) + 1;
 +   sclk = get_mmc_clk(host-dev_index);
 +
 +   return sclk / clk_div;
  }

  /*
 diff --git a/include/dwmmc.h b/include/dwmmc.h
 index 08ced0b..26b53af 100644
 --- a/include/dwmmc.h
 +++ b/include/dwmmc.h
 @@ -138,7 +138,7 @@ struct dwmci_host {
 struct mmc *mmc;

 void (*clksel)(struct dwmci_host *host);
 -   unsigned int (*mmc_clk)(int dev_index);
 +   unsigned int (*mmc_clk)(struct dwmci_host *host);
  };

  struct dwmci_idmac {
 --
 1.7.12.4

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



 --
 Regards,
 Rajeshwari Shinde



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Exynos5250: I2C: Fix driver as per new I2C multibus/multiadapter support

2013-09-03 Thread Rajeshwari Birje
Hi Heiko,

Ok will work on same and get back to you in-case of any doubts.

Regards,
Rajehswari

On Tue, Sep 3, 2013 at 12:31 PM, Heiko Schocher h...@denx.de wrote:
 Hello Rajeshwari,

 Am 03.09.2013 08:20, schrieb Rajeshwari S Shinde:

 This patch fixes the S3C24xx I2C driver as per new I2C
 multibus/multiadapter support for Exynos5250.

 Change-Id: I95873fef7d312310670e3bb33ad9532c10f60463
 Signed-off-by: Rajeshwari S Shinderajeshwar...@samsung.com
 ---
   drivers/i2c/s3c24x0_i2c.c   | 14 +++---
   include/configs/exynos5250-dt.h |  3 ++-
   2 files changed, 9 insertions(+), 8 deletions(-)


 Hmm.. could you switch to the new i2c framework instead fixing
 the old state of the driver?

 Also there is another board which uses this driver:

 [hs@pollux u-boot]$ grep -lr CONFIG_DRIVER_S3C24X0_I2C include/configs/
 include/configs/exynos5250-dt.h
 include/configs/VCMA9.h
 [hs@pollux u-boot]$

 Please fix this too, if switching to the new framework ... thanks!

 diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c
 index cd09c78..5fdb85f 100644
 --- a/drivers/i2c/s3c24x0_i2c.c
 +++ b/drivers/i2c/s3c24x0_i2c.c
 @@ -53,7 +53,7 @@
   static unsigned int g_current_bus __attribute__((section(.data)));
   #ifdef CONFIG_OF_CONTROL
   static int i2c_busses __attribute__((section(.data)));
 -static struct s3c24x0_i2c_bus i2c_bus[CONFIG_MAX_I2C_NUM]
 +static struct s3c24x0_i2c_bus i2c_bus_data[CONFIG_SYS_NUM_I2C_BUSES]
 __attribute__((section(.data)));
   #endif

 @@ -160,7 +160,7 @@ int i2c_set_bus_num(unsigned int bus)
   {
 struct s3c24x0_i2c *i2c;

 -   if ((bus  0) || (bus= CONFIG_MAX_I2C_NUM)) {
 +   if ((bus  0) || (bus= CONFIG_SYS_NUM_I2C_BUSES)) {
 debug(Bad bus: %d\n, bus);
 return -1;
 }
 @@ -503,12 +503,12 @@ int i2c_write(uchar chip, uint addr, int alen, uchar
 *buffer, int len)
   void board_i2c_init(const void *blob)
   {
 int i;
 -   int node_list[CONFIG_MAX_I2C_NUM];
 +   int node_list[CONFIG_SYS_NUM_I2C_BUSES];
 int count;

 count = fdtdec_find_aliases_for_id(blob, i2c,
 COMPAT_SAMSUNG_S3C2440_I2C, node_list,
 -   CONFIG_MAX_I2C_NUM);
 +   CONFIG_SYS_NUM_I2C_BUSES);

 for (i = 0; i  count; i++) {
 struct s3c24x0_i2c_bus *bus;
 @@ -516,7 +516,7 @@ void board_i2c_init(const void *blob)

 if (node= 0)
 continue;
 -   bus =i2c_bus[i];
 +   bus =i2c_bus_data[i];

 bus-regs = (struct s3c24x0_i2c *)
 fdtdec_get_addr(blob, node, reg);
 bus-id = pinmux_decode_periph_id(blob, node);
 @@ -529,7 +529,7 @@ void board_i2c_init(const void *blob)
   static struct s3c24x0_i2c_bus *get_bus(unsigned int bus_idx)
   {
 if (bus_idx  i2c_busses)
 -   returni2c_bus[bus_idx];
 +   returni2c_bus_data[bus_idx];


 debug(Undefined bus: %d\n, bus_idx);
 return NULL;
 @@ -540,7 +540,7 @@ int i2c_get_bus_num_fdt(int node)
 int i;

 for (i = 0; i  i2c_busses; i++) {
 -   if (node == i2c_bus[i].node)
 +   if (node == i2c_bus_data[i].node)
 return i;
 }

 diff --git a/include/configs/exynos5250-dt.h
 b/include/configs/exynos5250-dt.h
 index 2b93a45..e6a2cd0 100644
 --- a/include/configs/exynos5250-dt.h
 +++ b/include/configs/exynos5250-dt.h
 @@ -254,8 +254,9 @@
   #define CONFIG_SYS_I2C_SPEED  10  /* 100 Kbps */
   #define CONFIG_DRIVER_S3C24X0_I2C
   #define CONFIG_I2C_MULTI_BUS


 no longer needed, if you use the new framework ...


 -#define CONFIG_MAX_I2C_NUM 8
   #define CONFIG_SYS_I2C_SLAVE0x0
 +#define CONFIG_SYS_I2C_MAX_HOPS 1


 you do not need the CONFIG_SYS_I2C_MAX_HOPS define, this define is
 only needed, if using muxes and using the new framework ...

 +#define CONFIG_SYS_NUM_I2C_BUSES 8


 no longer needed if you use the new framework ...


   #define CONFIG_I2C_EDID

   /* PMIC */


 I prefer to switch to the new framework, such it is done for the
 tegra driver, see commit:

 http://git.denx.de/?p=u-boot.git;a=commitdiff;h=1f2ba722ac06393d6abe6d4734824d3b98ea9108

 maybe a fix like this is for you also necessary, as you use fdt:

 http://git.denx.de/?p=u-boot.git;a=commitdiff;h=cdce889959c611876690a9f0a3c7ed9aa46189c4

 bye,
 Heiko
 --
 DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
 HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] MMC: DWMMC: Correct the CLKDIV register value

2013-09-01 Thread Rajeshwari Birje
Hi Simon,

On Thu, Aug 29, 2013 at 8:31 PM, Simon Glass s...@chromium.org wrote:
 On Thu, Aug 29, 2013 at 5:04 AM, Rajeshwari Birje
 rajeshwari.bi...@gmail.com wrote:
 CCing the MMC Maintainer.

 On Thu, Aug 29, 2013 at 4:22 PM, Rajeshwari S Shinde
 rajeshwar...@samsung.com wrote:
 This patch corrects the divider value written to CLKDIV register.
 Since SDCLKIN is divided inside controller by the DIVRATIO value set
 in the CLKSEL register, we need to use the same output clock value to
 calculate the CLKDIV value.
 as per user manual: cclk_in = SDCLKIN / (DIVRATIO + 1)

 Input parameter to mmc_clk is changed to dwmci_host, since
 we need the same to read DWMCI_CLKSEL register.

 This improves the read timing values for channel 0 on SMDK5250
 from 0.288sec to 0.144sec

 Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
 ---
  arch/arm/include/asm/arch-exynos/dwmmc.h |  4 
  drivers/mmc/dw_mmc.c |  2 +-
  drivers/mmc/exynos_dw_mmc.c  | 17 +++--
  include/dwmmc.h  |  2 +-
  4 files changed, 21 insertions(+), 4 deletions(-)

 diff --git a/arch/arm/include/asm/arch-exynos/dwmmc.h 
 b/arch/arm/include/asm/arch-exynos/dwmmc.h
 index b9eca76..f1c8d8a 100644
 --- a/arch/arm/include/asm/arch-exynos/dwmmc.h
 +++ b/arch/arm/include/asm/arch-exynos/dwmmc.h
 @@ -14,6 +14,10 @@
  #define DWMCI_SET_DRV_CLK(x)   ((x)  16)
  #define DWMCI_SET_DIV_RATIO(x) ((x)  24)

 +/* CLKSEL Register */
 +#define DWMCI_DIVRATIO_BIT 24
 +#define DWMCI_DIVRATIO_MASK0x7
 +
  #ifdef CONFIG_OF_CONTROL
  int exynos_dwmmc_init(const void *blob);
  #endif
 diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
 index a82ee17..3406bdd 100644
 --- a/drivers/mmc/dw_mmc.c
 +++ b/drivers/mmc/dw_mmc.c
 @@ -224,7 +224,7 @@ static int dwmci_setup_bus(struct dwmci_host *host, u32 
 freq)
  * host-bus_hz should be set from user.
  */
 if (host-mmc_clk)
 -   sclk = host-mmc_clk(host-dev_index);
 +   sclk = host-mmc_clk(host);

 Do you need to change dw_mmc_simple.c as well?
Not able to find any file dw_mmc_simple.c.
Please do let me know if I need to check any file getting effected.

 Regards,
 Simon
-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] MMC: DWMMC: Correct the CLKDIV register value

2013-08-29 Thread Rajeshwari Birje
CCing the MMC Maintainer.

On Thu, Aug 29, 2013 at 4:22 PM, Rajeshwari S Shinde
rajeshwar...@samsung.com wrote:
 This patch corrects the divider value written to CLKDIV register.
 Since SDCLKIN is divided inside controller by the DIVRATIO value set
 in the CLKSEL register, we need to use the same output clock value to
 calculate the CLKDIV value.
 as per user manual: cclk_in = SDCLKIN / (DIVRATIO + 1)

 Input parameter to mmc_clk is changed to dwmci_host, since
 we need the same to read DWMCI_CLKSEL register.

 This improves the read timing values for channel 0 on SMDK5250
 from 0.288sec to 0.144sec

 Signed-off-by: Rajeshwari S Shinde rajeshwar...@samsung.com
 ---
  arch/arm/include/asm/arch-exynos/dwmmc.h |  4 
  drivers/mmc/dw_mmc.c |  2 +-
  drivers/mmc/exynos_dw_mmc.c  | 17 +++--
  include/dwmmc.h  |  2 +-
  4 files changed, 21 insertions(+), 4 deletions(-)

 diff --git a/arch/arm/include/asm/arch-exynos/dwmmc.h 
 b/arch/arm/include/asm/arch-exynos/dwmmc.h
 index b9eca76..f1c8d8a 100644
 --- a/arch/arm/include/asm/arch-exynos/dwmmc.h
 +++ b/arch/arm/include/asm/arch-exynos/dwmmc.h
 @@ -14,6 +14,10 @@
  #define DWMCI_SET_DRV_CLK(x)   ((x)  16)
  #define DWMCI_SET_DIV_RATIO(x) ((x)  24)

 +/* CLKSEL Register */
 +#define DWMCI_DIVRATIO_BIT 24
 +#define DWMCI_DIVRATIO_MASK0x7
 +
  #ifdef CONFIG_OF_CONTROL
  int exynos_dwmmc_init(const void *blob);
  #endif
 diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
 index a82ee17..3406bdd 100644
 --- a/drivers/mmc/dw_mmc.c
 +++ b/drivers/mmc/dw_mmc.c
 @@ -224,7 +224,7 @@ static int dwmci_setup_bus(struct dwmci_host *host, u32 
 freq)
  * host-bus_hz should be set from user.
  */
 if (host-mmc_clk)
 -   sclk = host-mmc_clk(host-dev_index);
 +   sclk = host-mmc_clk(host);
 else if (host-bus_hz)
 sclk = host-bus_hz;
 else {
 diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
 index 4ef9fec..1ed4afe 100644
 --- a/drivers/mmc/exynos_dw_mmc.c
 +++ b/drivers/mmc/exynos_dw_mmc.c
 @@ -29,9 +29,22 @@ static void exynos_dwmci_clksel(struct dwmci_host *host)
 dwmci_writel(host, DWMCI_CLKSEL, host-clksel_val);
  }

 -unsigned int exynos_dwmci_get_clk(int dev_index)
 +unsigned int exynos_dwmci_get_clk(struct dwmci_host *host)
  {
 -   return get_mmc_clk(dev_index);
 +   unsigned long sclk;
 +   int8_t clk_div;
 +
 +   /*
 +* Since SDCLKIN is divided inside controller by the DIVRATIO
 +* value set in the CLKSEL register, we need to use the same output
 +* clock value to calculate the CLKDIV value.
 +* as per user manual:cclk_in = SDCLKIN / (DIVRATIO + 1)
 +*/
 +   clk_div = ((dwmci_readl(host, DWMCI_CLKSEL)  DWMCI_DIVRATIO_BIT)
 +DWMCI_DIVRATIO_MASK) + 1;
 +   sclk = get_mmc_clk(host-dev_index);
 +
 +   return sclk / clk_div;
  }

  /*
 diff --git a/include/dwmmc.h b/include/dwmmc.h
 index 08ced0b..26b53af 100644
 --- a/include/dwmmc.h
 +++ b/include/dwmmc.h
 @@ -138,7 +138,7 @@ struct dwmci_host {
 struct mmc *mmc;

 void (*clksel)(struct dwmci_host *host);
 -   unsigned int (*mmc_clk)(int dev_index);
 +   unsigned int (*mmc_clk)(struct dwmci_host *host);
  };

  struct dwmci_idmac {
 --
 1.7.12.4

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/6 V2] EXYNOS: I2S: Enable I2S0 channel

2013-08-19 Thread Rajeshwari Birje
Acked-by: Rajeshwari Shinde rajeshwar...@samsung.com
Tested-by: Rajeshwari Shinde rajeshwar...@samsung.com

On Sun, Aug 4, 2013 at 12:14 PM, Dani Krishna Mohan
krishna...@samsung.com wrote:
 This patch set replaces I2S1 channel with I2S0 channel.
 Corresponding changes have been done in audio codec to
  support I2S0 channel.

 Changes in V2:
 - Added cover letter.
 - Configured GPIO chipselect to enable MAX98095 codec.

 Dani Krishna Mohan (6):
   Sound: WM8994: Support I2S0 channel
   DTS: Addition of I2S0 channel and replacing I2S1
   ARM: Change from I2S1 to I2S0 for audio on SMDK5250
   Sound: I2S: Replacing I2S1 with I2S0 channel.
   DTS: Addition of GPIO chipselect for MAX98095
   Sound: MAX98095: Support I2S0 channel

  arch/arm/cpu/armv7/exynos/clock.c   |   13 ++--
  arch/arm/cpu/armv7/exynos/pinmux.c  |   15 -
  arch/arm/dts/exynos5250.dtsi|   10 ++-
  arch/arm/include/asm/arch-exynos/clock.h|8 ++-
  arch/arm/include/asm/arch-exynos/cpu.h  |2 +
  arch/arm/include/asm/arch-exynos/i2s-regs.h |6 ++
  arch/arm/include/asm/arch-exynos/periph.h   |1 +
  board/samsung/dts/exynos5250-smdk5250.dts   |8 +--
  board/samsung/dts/exynos5250-snow.dts   |9 +--
  drivers/sound/max98095.c|   29 
  drivers/sound/samsung-i2s.c |   16 +++--
  drivers/sound/sound.c   |2 +-
  drivers/sound/wm8994.c  |   95 
 +++
  drivers/sound/wm8994_registers.h|   77 --
  14 files changed, 149 insertions(+), 142 deletions(-)

 --
 1.7.9.5

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] arm: exynos: fix clock calculation

2013-07-09 Thread Rajeshwari Birje
Looks fine to me.

Acked-by: Rajeshwari Shinderajeshwar...@samsung.com

On Tue, Jul 9, 2013 at 1:07 PM, Minkyu Kang mk7.k...@samsung.com wrote:
 There are differnce with clock calcuation by cpu variations.
 This patch will fix it according to user manual.

 Signed-off-by: Minkyu Kang mk7.k...@samsung.com
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 ---
 Changes for v2:
  - remove hard-coded constants.

  arch/arm/cpu/armv7/exynos/clock.c |   43 
 -
  1 file changed, 38 insertions(+), 5 deletions(-)

 diff --git a/arch/arm/cpu/armv7/exynos/clock.c 
 b/arch/arm/cpu/armv7/exynos/clock.c
 index e1c4246..9f07181 100644
 --- a/arch/arm/cpu/armv7/exynos/clock.c
 +++ b/arch/arm/cpu/armv7/exynos/clock.c
 @@ -27,6 +27,10 @@
  #include asm/arch/clk.h
  #include asm/arch/periph.h

 +#define PLL_DIV_1024   1024
 +#define PLL_DIV_65535  65535
 +#define PLL_DIV_65536  65536
 +
  /* *
   * This structure is to store the src bit, div bit and prediv bit
   * positions of the peripheral clocks of the src and div registers
 @@ -85,6 +89,7 @@ static struct set_epll_con_val exynos5_epll_div[] = {
  static int exynos_get_pll_clk(int pllreg, unsigned int r, unsigned int k)
  {
 unsigned long m, p, s = 0, mask, fout;
 +   unsigned int div;
 unsigned int freq;
 /*
  * APLL_CON: MIDV [25:16]
 @@ -110,14 +115,42 @@ static int exynos_get_pll_clk(int pllreg, unsigned int 
 r, unsigned int k)
 if (pllreg == EPLL) {
 k = k  0x;
 /* FOUT = (MDIV + K / 65536) * FIN / (PDIV * 2^SDIV) */
 -   fout = (m + k / 65536) * (freq / (p * (1  s)));
 +   fout = (m + k / PLL_DIV_65536) * (freq / (p * (1  s)));
 } else if (pllreg == VPLL) {
 k = k  0xfff;
 -   /* FOUT = (MDIV + K / 1024) * FIN / (PDIV * 2^SDIV) */
 -   fout = (m + k / 1024) * (freq / (p * (1  s)));
 +
 +   /*
 +* Exynos4210
 +* FOUT = (MDIV + K / 1024) * FIN / (PDIV * 2^SDIV)
 +*
 +* Exynos4412
 +* FOUT = (MDIV + K / 65535) * FIN / (PDIV * 2^SDIV)
 +*
 +* Exynos5250
 +* FOUT = (MDIV + K / 65536) * FIN / (PDIV * 2^SDIV)
 +*/
 +   if (proid_is_exynos4210())
 +   div = PLL_DIV_1024;
 +   else if (proid_is_exynos4412())
 +   div = PLL_DIV_65535;
 +   else if (proid_is_exynos5250())
 +   div = PLL_DIV_65536;
 +   else
 +   return 0;
 +
 +   fout = (m + k / div) * (freq / (p * (1  s)));
 } else {
 -   /* FOUT = MDIV * FIN / (PDIV * 2^SDIV) */
 -   fout = m * (freq / (p * (1  s)));
 +   /*
 +* Exynos4210
 +* FOUT = MDIV * FIN / (PDIV * 2^SDIV)
 +*
 +* Exynos4412 / Exynos5250
 +* FOUT = MDIV * FIN / (PDIV * 2^(SDIV-1))
 +*/
 +   if (proid_is_exynos4210())
 +   fout = m * (freq / (p * (1  s)));
 +   else
 +   fout = m * (freq / (p * (1  (s - 1;
 }

 return fout;
 --
 1.7.9.5



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] arm: exynos: fix clock calculation

2013-07-07 Thread Rajeshwari Birje
Hi Minkyu Kang,

On Fri, Jul 5, 2013 at 3:43 PM, Minkyu Kang mk7.k...@samsung.com wrote:
 There are differnce with clock calcuation by cpu variations.
 This patch will fix it according to user manual.

 Signed-off-by: Minkyu Kang mk7.k...@samsung.com
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 ---
  arch/arm/cpu/armv7/exynos/clock.c |   37 
 +
  1 file changed, 33 insertions(+), 4 deletions(-)

 diff --git a/arch/arm/cpu/armv7/exynos/clock.c 
 b/arch/arm/cpu/armv7/exynos/clock.c
 index e1c4246..da43373 100644
 --- a/arch/arm/cpu/armv7/exynos/clock.c
 +++ b/arch/arm/cpu/armv7/exynos/clock.c
 @@ -85,6 +85,7 @@ static struct set_epll_con_val exynos5_epll_div[] = {
  static int exynos_get_pll_clk(int pllreg, unsigned int r, unsigned int k)
  {
 unsigned long m, p, s = 0, mask, fout;
 +   unsigned int div;
 unsigned int freq;
 /*
  * APLL_CON: MIDV [25:16]
 @@ -113,11 +114,39 @@ static int exynos_get_pll_clk(int pllreg, unsigned int 
 r, unsigned int k)
 fout = (m + k / 65536) * (freq / (p * (1  s)));
 } else if (pllreg == VPLL) {
 k = k  0xfff;
 -   /* FOUT = (MDIV + K / 1024) * FIN / (PDIV * 2^SDIV) */
 -   fout = (m + k / 1024) * (freq / (p * (1  s)));
 +
 +   /*
 +* Exynos4210
 +* FOUT = (MDIV + K / 1024) * FIN / (PDIV * 2^SDIV)
 +*
 +* Exynos4412
 +* FOUT = (MDIV + K / 65535) * FIN / (PDIV * 2^SDIV)
 +*
 +* Exynos5250
 +* FOUT = (MDIV + K / 65536) * FIN / (PDIV * 2^SDIV)
 +*/
 +   if (proid_is_exynos4210())
 +   div = 1024;
Cannot we remove these hard codings for div?
 +   else if (proid_is_exynos4412())
 +   div = 65535;
 +   else if (proid_is_exynos5250())
 +   div = 65536;
 +   else
 +   return 0;
 +
 +   fout = (m + k / div) * (freq / (p * (1  s)));
 } else {
 -   /* FOUT = MDIV * FIN / (PDIV * 2^SDIV) */
 -   fout = m * (freq / (p * (1  s)));
 +   /*
 +* Exynos4210
 +* FOUT = MDIV * FIN / (PDIV * 2^SDIV)
 +*
 +* Exynos4412 / Exynos5250
 +* FOUT = MDIV * FIN / (PDIV * 2^(SDIV-1))
 +*/
 +   if (proid_is_exynos4210())
 +   fout = m * (freq / (p * (1  s)));
 +   else
 +   fout = m * (freq / (p * (1  (s - 1;
 }

 return fout;
 --
 1.7.9.5

 --
 Thanks,
 Minkyu Kang.
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4 V3] EXYNOS: Move files from board/samsung to arch/arm

2013-07-04 Thread Rajeshwari Birje
Hi Minkyu Kang,

On Thu, Jul 4, 2013 at 11:27 AM, Minkyu Kang mk7.k...@samsung.com wrote:
 On 04/07/13 14:27, Rajeshwari Birje wrote:
 Hi Minkyu Kang,

 On Thu, Jul 4, 2013 at 7:31 AM, Minkyu Kang mk7.k...@samsung.com wrote:
 diff --git a/arch/arm/include/asm/arch-exynos/cpu.h 
 b/arch/arm/include/asm/arch-exynos/cpu.h
 index 36b98c8..75dbe26 100644
 --- a/arch/arm/include/asm/arch-exynos/cpu.h
 +++ b/arch/arm/include/asm/arch-exynos/cpu.h
 @@ -115,7 +115,7 @@
  #define EXYNOS5_DMC_PHY0_BASE0x10C0
  #define EXYNOS5_DMC_PHY1_BASE0x10C1

 maybe it can be dmc0 and dmc1
 If you want to keep the interface with exynos4.
 EXYNOS4 donot have seperate Phy controller it is a part of  DMC controller.
 then I need to add following for EXYNOS4
 EXYNOS4_DMC_PHY1_BASEDEVICE_NOT_AVAILABLE
 EXYNOS4_DMC_PHY_BASE   DEVICE_NOT_AVAILABLE


  #define EXYNOS5_GPIO_PART3_BASE  0x10D1
 -#define EXYNOS5_DMC_CTRL_BASE0x10DD
 +#define EXYNOS5_DMC0_BASE0x10DD

 why?
 if we want to make funstion to get the DMC base address it is needed
 to be added for EXYNOS5 as well
 hence made this change.

  #define EXYNOS5_GPIO_PART1_BASE  0x1140
  #define EXYNOS5_MIPI_DSIM_BASE   0x11D0
  #define EXYNOS5_USB_HOST_EHCI_BASE   0x1211
 @@ -135,6 +135,7 @@

  #define EXYNOS5_ADC_BASE DEVICE_NOT_AVAILABLE
  #define EXYNOS5_MODEM_BASE   DEVICE_NOT_AVAILABLE
 +#define EXYNOS5_DMC1_BASEDEVICE_NOT_AVAILABLE

 It looks weird.
 Since EXYNOS4 has 2 DMC controllers and EXYNOS5 has only 1 DMC
 controller I had to add this to avoid compilation error.
 Please do let me know if  you are fine with these changes.


 I suggest following.
 Needed a clarification:

 EXYNOS4_DMC_BASE0x-
 EXYNOS4_DMC_PHY_BASEDEVICE_NOT_AVAILABLE
 But we have 2 DMC controller DMC0 and DMC1
 so it will be  EXYNOS4_DMC0_BASE and  EXYNOS4_DMC1_BASE
 EXYNOS4_DMC1_BASE not available in EXYNOS5

 no.
 It means.. DO NOT define dmc0 and dmc1 separately.
 We need dmc base and we can access  dmc1.
 For example, uart have 4 devices but we defined uart0 address as UART's base.
 and access by offset.

 u32 offset = dev_index * sizeof(struct s5p_uart);
 return (struct s5p_uart *)(samsung_get_base_uart() + offset);
Thank you for clarification. Will make this change and send a new patch set.



 EXYNOS4X12_DMC_BASE 0x-
 EXYNOS4X12_DMC_PHY_BASE DEVICE_NOT_AVAILABLE

 EXYNOS5_DMC_PHY_BASE0x-
 It has 2 phy controllers so it would be EXYNOS5_DMC_PHY0_BASE and
 EXYNOS5_DMC_PHY1_BASE and it would be DEVICE_NOT_AVAILABLE in other 2
 SOC

 no.


 EXYNOS5_DMC_BASE0x-

 then we need to add 2 SAMSUNG_BASE.

 SAMSUNG_BASE(dmc, DMC_BASE)
 SAMSUNG_BASE(dmc_phy, DMC_PHY_BASE)

 and we can access dmc1 and dmc phy1 by offset.

 What do you think about it?

 Thanks,
 Minkyu Kang.

-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4 V3] EXYNOS: Move files from board/samsung to arch/arm

2013-07-03 Thread Rajeshwari Birje
Hi Minkyu Kang,

Thank you for comments. Please find the clarificatio below.

On Wed, Jul 3, 2013 at 5:40 PM, Minkyu Kang mk7.k...@samsung.com wrote:
 On 02/07/13 22:12, Rajeshwari Shinde wrote:
 This patch performs the following:

 1) Convert the assembly code for memory and clock initialization to C code.
 2) Move the memory and clock init codes from board/samsung to arch/arm
 3) Creat a common lowlevel_init file across Exynos4 and Exynos5. Converted
the common lowlevel_init from assembly to C-code
 4) Made spl_boot.c and tzpc_init.c common for both exynos4 and exynos5.
 5) Enable CONFIG_SKIP_LOWLEVEL_INIT as stack pointer initialisation is 
 already
done in _main.
 6) exynos-uboot-spl.lds made common across SMDKV310, Origen and SMDK5250.

 TEST: Tested SD-MMC boot on SMDK5250 and Origen.
   Tested USB and SPI boot on SMDK5250
   Compile tested for SMDKV310.

 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 ---
 Changes in V2:
 - Rebased on latest u-boot-samsung tree.
 - Incorporated review comments from Minkyu Kang.
 Changes in V3:
   - Optimised the mem_ctrl_init function for exynos4.
   - Removed magic numbers.
  arch/arm/cpu/armv7/exynos/Makefile |   17 +-
  .../arm/cpu/armv7/exynos}/clock_init.h |0
  arch/arm/cpu/armv7/exynos/clock_init_exynos4.c |   94 +
  .../arm/cpu/armv7/exynos/clock_init_exynos5.c  |   47 +--
  arch/arm/cpu/armv7/exynos/common_setup.h   |   43 ++
  .../arm/cpu/armv7/exynos}/dmc_common.c |7 +-
  .../arm/cpu/armv7/exynos}/dmc_init_ddr3.c  |   19 +-
  arch/arm/cpu/armv7/exynos/dmc_init_exynos4.c   |  212 ++
  .../arm/cpu/armv7/exynos/exynos4_setup.h   |  397 
 +--
  .../arm/cpu/armv7/exynos/exynos5_setup.h   |   28 +-
  arch/arm/cpu/armv7/exynos/lowlevel_init.c  |   73 
  .../arm/cpu/armv7/exynos}/spl_boot.c   |   74 +++-
  arch/arm/include/asm/arch-exynos/cpu.h |5 +-
  board/samsung/origen/Makefile  |   11 +-
  board/samsung/origen/lowlevel_init.S   |  357 -
  board/samsung/origen/mem_setup.S   |  421 
 
  board/samsung/origen/mmc_boot.c|   58 ---
  board/samsung/smdk5250/Makefile|   14 +-
  board/samsung/smdkv310/Makefile|   10 +-
  board/samsung/smdkv310/lowlevel_init.S |  414 
 ---
  board/samsung/smdkv310/mem_setup.S |  365 -
  board/samsung/smdkv310/mmc_boot.c  |   60 ---
  include/configs/exynos5250-dt.h|8 +-
  include/configs/origen.h   |8 +-
  include/configs/smdkv310.h |7 +-
  25 files changed, 770 insertions(+), 1979 deletions(-)
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/clock_init.h 
 (100%)
  create mode 100644 arch/arm/cpu/armv7/exynos/clock_init_exynos4.c
  rename board/samsung/smdk5250/clock_init.c = 
 arch/arm/cpu/armv7/exynos/clock_init_exynos5.c (95%)
  create mode 100644 arch/arm/cpu/armv7/exynos/common_setup.h
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/dmc_common.c 
 (97%)
  rename {board/samsung/smdk5250 = 
 arch/arm/cpu/armv7/exynos}/dmc_init_ddr3.c (95%)
  create mode 100644 arch/arm/cpu/armv7/exynos/dmc_init_exynos4.c
  rename board/samsung/origen/origen_setup.h = 
 arch/arm/cpu/armv7/exynos/exynos4_setup.h (65%)
  rename board/samsung/smdk5250/setup.h = 
 arch/arm/cpu/armv7/exynos/exynos5_setup.h (96%)
  create mode 100644 arch/arm/cpu/armv7/exynos/lowlevel_init.c
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/spl_boot.c 
 (74%)
  delete mode 100644 board/samsung/origen/lowlevel_init.S
  delete mode 100644 board/samsung/origen/mem_setup.S
  delete mode 100644 board/samsung/origen/mmc_boot.c
  delete mode 100644 board/samsung/smdkv310/lowlevel_init.S
  delete mode 100644 board/samsung/smdkv310/mem_setup.S
  delete mode 100644 board/samsung/smdkv310/mmc_boot.c

 diff --git a/arch/arm/cpu/armv7/exynos/Makefile 
 b/arch/arm/cpu/armv7/exynos/Makefile
 index b2f9152..4661155 100644
 --- a/arch/arm/cpu/armv7/exynos/Makefile
 +++ b/arch/arm/cpu/armv7/exynos/Makefile
 @@ -22,10 +22,19 @@ include $(TOPDIR)/config.mk

  LIB  = $(obj)lib$(SOC).o

 -COBJS+= clock.o power.o soc.o system.o pinmux.o tzpc.o
 -
 -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))
 +COBJS-y  += clock.o power.o soc.o system.o pinmux.o tzpc.o
 +
 +ifdef CONFIG_SPL_BUILD
 +COBJS-$(CONFIG_EXYNOS5)  += clock_init_exynos5.o
 +COBJS-$(CONFIG_EXYNOS5)  += dmc_common.o dmc_init_ddr3.o
 +COBJS-$(CONFIG_EXYNOS4210)+= dmc_init_exynos4.o clock_init_exynos4.o
 +COBJS-y  += spl_boot.o
 +COBJS-y  += lowlevel_init.o
 +endif
 +
 +COBJS   := $(COBJS-y)
 +SRCS := $(COBJS:.o=.c)
 +OBJS := 

Re: [U-Boot] [PATCH 4/4 V3] EXYNOS: Move files from board/samsung to arch/arm

2013-07-03 Thread Rajeshwari Birje
Hi Minkyu Kang,

On Thu, Jul 4, 2013 at 7:31 AM, Minkyu Kang mk7.k...@samsung.com wrote:
 diff --git a/arch/arm/include/asm/arch-exynos/cpu.h 
 b/arch/arm/include/asm/arch-exynos/cpu.h
 index 36b98c8..75dbe26 100644
 --- a/arch/arm/include/asm/arch-exynos/cpu.h
 +++ b/arch/arm/include/asm/arch-exynos/cpu.h
 @@ -115,7 +115,7 @@
  #define EXYNOS5_DMC_PHY0_BASE0x10C0
  #define EXYNOS5_DMC_PHY1_BASE0x10C1

 maybe it can be dmc0 and dmc1
 If you want to keep the interface with exynos4.
 EXYNOS4 donot have seperate Phy controller it is a part of  DMC controller.
 then I need to add following for EXYNOS4
 EXYNOS4_DMC_PHY1_BASEDEVICE_NOT_AVAILABLE
 EXYNOS4_DMC_PHY_BASE   DEVICE_NOT_AVAILABLE


  #define EXYNOS5_GPIO_PART3_BASE  0x10D1
 -#define EXYNOS5_DMC_CTRL_BASE0x10DD
 +#define EXYNOS5_DMC0_BASE0x10DD

 why?
 if we want to make funstion to get the DMC base address it is needed
 to be added for EXYNOS5 as well
 hence made this change.

  #define EXYNOS5_GPIO_PART1_BASE  0x1140
  #define EXYNOS5_MIPI_DSIM_BASE   0x11D0
  #define EXYNOS5_USB_HOST_EHCI_BASE   0x1211
 @@ -135,6 +135,7 @@

  #define EXYNOS5_ADC_BASE DEVICE_NOT_AVAILABLE
  #define EXYNOS5_MODEM_BASE   DEVICE_NOT_AVAILABLE
 +#define EXYNOS5_DMC1_BASEDEVICE_NOT_AVAILABLE

 It looks weird.
 Since EXYNOS4 has 2 DMC controllers and EXYNOS5 has only 1 DMC
 controller I had to add this to avoid compilation error.
 Please do let me know if  you are fine with these changes.


 I suggest following.
Needed a clarification:

 EXYNOS4_DMC_BASE0x-
 EXYNOS4_DMC_PHY_BASEDEVICE_NOT_AVAILABLE
But we have 2 DMC controller DMC0 and DMC1
so it will be  EXYNOS4_DMC0_BASE and  EXYNOS4_DMC1_BASE
EXYNOS4_DMC1_BASE not available in EXYNOS5

 EXYNOS4X12_DMC_BASE 0x-
 EXYNOS4X12_DMC_PHY_BASE DEVICE_NOT_AVAILABLE

 EXYNOS5_DMC_PHY_BASE0x-
It has 2 phy controllers so it would be EXYNOS5_DMC_PHY0_BASE and
EXYNOS5_DMC_PHY1_BASE and it would be DEVICE_NOT_AVAILABLE in other 2
SOC

 EXYNOS5_DMC_BASE0x-

 then we need to add 2 SAMSUNG_BASE.

 SAMSUNG_BASE(dmc, DMC_BASE)
 SAMSUNG_BASE(dmc_phy, DMC_PHY_BASE)

 and we can access dmc1 and dmc phy1 by offset.

 What do you think about it?

 Thanks,
 Minkyu Kang.
-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4 V2] EXYNOS: Move files from board/samsung to arch/arm.

2013-07-02 Thread Rajeshwari Birje
Hi Minkyu Kang,

Thank you for comments

On Tue, Jul 2, 2013 at 11:25 AM, Minkyu Kang mk7.k...@samsung.com wrote:
 Dear Rajeshwari,

 On 01/07/13 19:02, Rajeshwari Shinde wrote:
 This patch performs the following:

 1) Convert the assembly code for memory and clock initialization to C code.
 2) Move the memory and clock init codes from board/samsung to arch/arm
 3) Creat a common lowlevel_init file across Exynos4 and Exynos5. Converted
the common lowlevel_init from assembly to C-code
 4) Made spl_boot.c and tzpc_init.c common for both exynos4 and exynos5.
 5) Enable CONFIG_SKIP_LOWLEVEL_INIT as stack pointer initialisation is 
 already
done in _main.
 6) exynos-uboot-spl.lds made common across SMDKV310, Origen and SMDK5250.

 TEST: Tested SD-MMC boot on SMDK5250 and Origen.
   Tested USB and SPI boot on SMDK5250
   Compile tested for SMDKV310.

 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 ---
 Changes in V2:
   - Rebased on latest u-boot-samsung tree.
   - Incorporated review comments from Minkyu Kang.
  arch/arm/cpu/armv7/exynos/Makefile |   17 +-
  .../arm/cpu/armv7/exynos}/clock_init.h |0
  arch/arm/cpu/armv7/exynos/clock_init_exynos4.c |   94 +
  .../arm/cpu/armv7/exynos/clock_init_exynos5.c  |   27 +-
  arch/arm/cpu/armv7/exynos/common_setup.h   |   43 ++
  .../arm/cpu/armv7/exynos}/dmc_common.c |7 +-
  .../arm/cpu/armv7/exynos}/dmc_init_ddr3.c  |   17 +-
  arch/arm/cpu/armv7/exynos/dmc_init_exynos4.c   |  295 ++
  .../arm/cpu/armv7/exynos/exynos4_setup.h   |   97 +-
  .../arm/cpu/armv7/exynos/exynos5_setup.h   |   28 +-
  arch/arm/cpu/armv7/exynos/lowlevel_init.c  |   72 
  .../arm/cpu/armv7/exynos}/spl_boot.c   |   77 +++-
  board/samsung/origen/Makefile  |   11 +-
  board/samsung/origen/lowlevel_init.S   |  357 -
  board/samsung/origen/mem_setup.S   |  421 
 
  board/samsung/origen/mmc_boot.c|   58 ---
  board/samsung/smdk5250/Makefile|   14 +-
  board/samsung/smdkv310/Makefile|   10 +-
  board/samsung/smdkv310/lowlevel_init.S |  414 
 ---
  board/samsung/smdkv310/mem_setup.S |  365 -
  board/samsung/smdkv310/mmc_boot.c  |   60 ---
  include/configs/exynos5250-dt.h|8 +-
  include/configs/origen.h   |9 +-
  include/configs/smdkv310.h |8 +-
  24 files changed, 743 insertions(+), 1766 deletions(-)
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/clock_init.h 
 (100%)
  create mode 100644 arch/arm/cpu/armv7/exynos/clock_init_exynos4.c
  rename board/samsung/smdk5250/clock_init.c = 
 arch/arm/cpu/armv7/exynos/clock_init_exynos5.c (97%)
  create mode 100644 arch/arm/cpu/armv7/exynos/common_setup.h
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/dmc_common.c 
 (97%)
  rename {board/samsung/smdk5250 = 
 arch/arm/cpu/armv7/exynos}/dmc_init_ddr3.c (96%)
  create mode 100644 arch/arm/cpu/armv7/exynos/dmc_init_exynos4.c
  rename board/samsung/origen/origen_setup.h = 
 arch/arm/cpu/armv7/exynos/exynos4_setup.h (86%)
  rename board/samsung/smdk5250/setup.h = 
 arch/arm/cpu/armv7/exynos/exynos5_setup.h (96%)
  create mode 100644 arch/arm/cpu/armv7/exynos/lowlevel_init.c
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/spl_boot.c 
 (73%)
  delete mode 100644 board/samsung/origen/lowlevel_init.S
  delete mode 100644 board/samsung/origen/mem_setup.S
  delete mode 100644 board/samsung/origen/mmc_boot.c
  delete mode 100644 board/samsung/smdkv310/lowlevel_init.S
  delete mode 100644 board/samsung/smdkv310/mem_setup.S
  delete mode 100644 board/samsung/smdkv310/mmc_boot.c

 diff --git a/arch/arm/cpu/armv7/exynos/Makefile 
 b/arch/arm/cpu/armv7/exynos/Makefile
 index b2f9152..4661155 100644
 --- a/arch/arm/cpu/armv7/exynos/Makefile
 +++ b/arch/arm/cpu/armv7/exynos/Makefile
 @@ -22,10 +22,19 @@ include $(TOPDIR)/config.mk

  LIB  = $(obj)lib$(SOC).o

 -COBJS+= clock.o power.o soc.o system.o pinmux.o tzpc.o
 -
 -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))
 +COBJS-y  += clock.o power.o soc.o system.o pinmux.o tzpc.o
 +
 +ifdef CONFIG_SPL_BUILD
 +COBJS-$(CONFIG_EXYNOS5)  += clock_init_exynos5.o
 +COBJS-$(CONFIG_EXYNOS5)  += dmc_common.o dmc_init_ddr3.o
 +COBJS-$(CONFIG_EXYNOS4210)+= dmc_init_exynos4.o clock_init_exynos4.o
 +COBJS-y  += spl_boot.o
 +COBJS-y  += lowlevel_init.o
 +endif
 +
 +COBJS   := $(COBJS-y)
 +SRCS := $(COBJS:.o=.c)
 +OBJS := $(addprefix $(obj),$(COBJS))

  all:  $(obj).depend $(LIB)

 diff --git a/board/samsung/smdk5250/clock_init.h 
 b/arch/arm/cpu/armv7/exynos/clock_init.h
 similarity index 100%
 rename from 

Re: [U-Boot] [PATCH 4/4 V2] EXYNOS: Move files from board/samsung to arch/arm.

2013-07-02 Thread Rajeshwari Birje
Hi Minkyu Kang,

On Tue, Jul 2, 2013 at 11:25 AM, Minkyu Kang mk7.k...@samsung.com wrote:
 Dear Rajeshwari,

 On 01/07/13 19:02, Rajeshwari Shinde wrote:
 This patch performs the following:

 1) Convert the assembly code for memory and clock initialization to C code.
 2) Move the memory and clock init codes from board/samsung to arch/arm
 3) Creat a common lowlevel_init file across Exynos4 and Exynos5. Converted
the common lowlevel_init from assembly to C-code
 4) Made spl_boot.c and tzpc_init.c common for both exynos4 and exynos5.
 5) Enable CONFIG_SKIP_LOWLEVEL_INIT as stack pointer initialisation is 
 already
done in _main.
 6) exynos-uboot-spl.lds made common across SMDKV310, Origen and SMDK5250.

 TEST: Tested SD-MMC boot on SMDK5250 and Origen.
   Tested USB and SPI boot on SMDK5250
   Compile tested for SMDKV310.

 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 ---
 Changes in V2:
   - Rebased on latest u-boot-samsung tree.
   - Incorporated review comments from Minkyu Kang.
  arch/arm/cpu/armv7/exynos/Makefile |   17 +-
  .../arm/cpu/armv7/exynos}/clock_init.h |0
  arch/arm/cpu/armv7/exynos/clock_init_exynos4.c |   94 +
  .../arm/cpu/armv7/exynos/clock_init_exynos5.c  |   27 +-
  arch/arm/cpu/armv7/exynos/common_setup.h   |   43 ++
  .../arm/cpu/armv7/exynos}/dmc_common.c |7 +-
  .../arm/cpu/armv7/exynos}/dmc_init_ddr3.c  |   17 +-
  arch/arm/cpu/armv7/exynos/dmc_init_exynos4.c   |  295 ++
  .../arm/cpu/armv7/exynos/exynos4_setup.h   |   97 +-
  .../arm/cpu/armv7/exynos/exynos5_setup.h   |   28 +-
  arch/arm/cpu/armv7/exynos/lowlevel_init.c  |   72 
  .../arm/cpu/armv7/exynos}/spl_boot.c   |   77 +++-
  board/samsung/origen/Makefile  |   11 +-
  board/samsung/origen/lowlevel_init.S   |  357 -
  board/samsung/origen/mem_setup.S   |  421 
 
  board/samsung/origen/mmc_boot.c|   58 ---
  board/samsung/smdk5250/Makefile|   14 +-
  board/samsung/smdkv310/Makefile|   10 +-
  board/samsung/smdkv310/lowlevel_init.S |  414 
 ---
  board/samsung/smdkv310/mem_setup.S |  365 -
  board/samsung/smdkv310/mmc_boot.c  |   60 ---
  include/configs/exynos5250-dt.h|8 +-
  include/configs/origen.h   |9 +-
  include/configs/smdkv310.h |8 +-
  24 files changed, 743 insertions(+), 1766 deletions(-)
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/clock_init.h 
 (100%)
  create mode 100644 arch/arm/cpu/armv7/exynos/clock_init_exynos4.c
  rename board/samsung/smdk5250/clock_init.c = 
 arch/arm/cpu/armv7/exynos/clock_init_exynos5.c (97%)
  create mode 100644 arch/arm/cpu/armv7/exynos/common_setup.h
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/dmc_common.c 
 (97%)
  rename {board/samsung/smdk5250 = 
 arch/arm/cpu/armv7/exynos}/dmc_init_ddr3.c (96%)
  create mode 100644 arch/arm/cpu/armv7/exynos/dmc_init_exynos4.c
  rename board/samsung/origen/origen_setup.h = 
 arch/arm/cpu/armv7/exynos/exynos4_setup.h (86%)
  rename board/samsung/smdk5250/setup.h = 
 arch/arm/cpu/armv7/exynos/exynos5_setup.h (96%)
  create mode 100644 arch/arm/cpu/armv7/exynos/lowlevel_init.c
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/spl_boot.c 
 (73%)
  delete mode 100644 board/samsung/origen/lowlevel_init.S
  delete mode 100644 board/samsung/origen/mem_setup.S
  delete mode 100644 board/samsung/origen/mmc_boot.c
  delete mode 100644 board/samsung/smdkv310/lowlevel_init.S
  delete mode 100644 board/samsung/smdkv310/mem_setup.S
  delete mode 100644 board/samsung/smdkv310/mmc_boot.c

 diff --git a/arch/arm/cpu/armv7/exynos/Makefile 
 b/arch/arm/cpu/armv7/exynos/Makefile
 index b2f9152..4661155 100644
 --- a/arch/arm/cpu/armv7/exynos/Makefile
 +++ b/arch/arm/cpu/armv7/exynos/Makefile
 @@ -22,10 +22,19 @@ include $(TOPDIR)/config.mk

  LIB  = $(obj)lib$(SOC).o

 -COBJS+= clock.o power.o soc.o system.o pinmux.o tzpc.o
 -
 -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 -OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))
 +COBJS-y  += clock.o power.o soc.o system.o pinmux.o tzpc.o
 +
 +ifdef CONFIG_SPL_BUILD
 +COBJS-$(CONFIG_EXYNOS5)  += clock_init_exynos5.o
 +COBJS-$(CONFIG_EXYNOS5)  += dmc_common.o dmc_init_ddr3.o
 +COBJS-$(CONFIG_EXYNOS4210)+= dmc_init_exynos4.o clock_init_exynos4.o
 +COBJS-y  += spl_boot.o
 +COBJS-y  += lowlevel_init.o
 +endif
 +
 +COBJS   := $(COBJS-y)
 +SRCS := $(COBJS:.o=.c)
 +OBJS := $(addprefix $(obj),$(COBJS))

  all:  $(obj).depend $(LIB)

 diff --git a/board/samsung/smdk5250/clock_init.h 
 b/arch/arm/cpu/armv7/exynos/clock_init.h
 similarity index 100%
 rename from board/samsung/smdk5250/clock_init.h
 rename 

Re: [U-Boot] [PATCH] Origen: Correct equation to calculate PLL output frequency

2013-07-01 Thread Rajeshwari Birje
Hi Minkyu Kang,

As per the user manual I have for EXYNOS5 it is
FOUT = MDIV * FIN / (PDIV * 2^SDIV)

Regards,
Rajeshwari Shinde.

On Mon, Jul 1, 2013 at 1:56 PM, Minkyu Kang mk7.k...@samsung.com wrote:
 On 01/07/13 16:42, Rajeshwari Shinde wrote:
 EXYNOS4 user manual equation for calculating PLL output is
 FOUT= MDIV x FIN/(PDIV x 2^(SDIV -1))
 hence updating accordingly.

 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 ---
  arch/arm/cpu/armv7/exynos/clock.c |   11 +--
  1 files changed, 9 insertions(+), 2 deletions(-)

 diff --git a/arch/arm/cpu/armv7/exynos/clock.c 
 b/arch/arm/cpu/armv7/exynos/clock.c
 index e1c4246..af0fa5b 100644
 --- a/arch/arm/cpu/armv7/exynos/clock.c
 +++ b/arch/arm/cpu/armv7/exynos/clock.c
 @@ -116,8 +116,15 @@ static int exynos_get_pll_clk(int pllreg, unsigned int 
 r, unsigned int k)
   /* FOUT = (MDIV + K / 1024) * FIN / (PDIV * 2^SDIV) */
   fout = (m + k / 1024) * (freq / (p * (1  s)));
   } else {
 - /* FOUT = MDIV * FIN / (PDIV * 2^SDIV) */
 - fout = m * (freq / (p * (1  s)));
 + if (cpu_is_exynos4()) {
 + if (s  1)
 + s = 1;
 + /* FOUT = MDIV * FIN / (PDIV * 2^(SDIV - 1)) */
 + fout = m * (freq / (p * (1  (s - 1;
 + } else {
 + /* FOUT = MDIV * FIN / (PDIV * 2^SDIV) */
 + fout = m * (freq / (p * (1  s)));
 + }
   }

   return fout;


 I checked about it.
 It was wrong, but your patch doesn't fit too.

 exynos4210
 FOUT = MDIV * FIN / (PDIV * 2^(SDIV - 1))

 exynos4412
 FOUT = MDIV * FIN / (PDIV * 2^SDIV)

 exynos5250
 FOUT = MDIV * FIN / (PDIV * 2^(SDIV - 1))

 At past, our code was,
 FOUT = MDIV * FIN / (PDIV * 2^(SDIV - 1))
 It was changed by Akshay's patch.


 commit 234370cab4b2f096e095fe8f3284fd39740a4023
 Author: Akshay Saraswat aksha...@samsung.com
 Date:   Fri Mar 22 02:26:36 2013 +

 Exynos5: clock: Update the equation to calculate PLL output frequency

 According to the latest exynos5 user manual, the equation for
 calculating PLL output was changed to
 FOUT= MDIV x FIN/(PDIV x 2^SDIV)
 earlier it was
 FOUT= MDIV x FIN/(PDIV x 2^(SDIV -1))
 So updating the clock code accordingly.

 Signed-off-by: Hatim Ali hatim...@samsung.com
 Signed-off-by: Akshay Saraswat aksha...@samsung.com
 Acked-by: Simon Glass s...@chromium.org


 According to Akshay's patch.
 exynos5250 should be
 FOUT = MDIV * FIN / (PDIV * 2^SDIV)
 but my manual (I'm not sure that is latest version) shows
 FOUT = MDIV * FIN / (PDIV * 2^(SDIV - 1))

 Akshay,
 please check this.

 Rajeshwari,
 Thank you for raise this issue,
 I'll check it and resend the patch.

 Thanks,
 Minkyu Kang.
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/4 V2] EXYNOS: Convert Assembly code to c and make it common

2013-07-01 Thread Rajeshwari Birje
Hi Minkyu Kang,

Can we please get this merged soon after your review as it is effort
to rebase and test this each time.

On Mon, Jul 1, 2013 at 3:32 PM, Rajeshwari Shinde
rajeshwar...@samsung.com wrote:
 Convert the assembly code in board/samsung to c and move the same to arch/arm.
 lds file made common across SMDKV310, Origen and SMDK5250.
 Add the power reset and exit wakeup api for exynos.
 Initialise GPIO for uart in Origen and SMDKV310 using pinmux.

 Changes in V2:
 - Rebased on latest u-boot-samsung tree.
 - Incorporated review comments from Simon glass and
 Minkyu Kang.

 Rajeshwari Shinde (4):
   EXYNOS: Add API for power reset and exit wakeup
   EXYNOS: LDS file move to common
   EXYNOS4210: Configure GPIO for uart
   EXYNOS: Move files from board/samsung to arch/arm.

  arch/arm/cpu/armv7/exynos/Makefile |   17 +-
  .../arm/cpu/armv7/exynos}/clock_init.h |0
  arch/arm/cpu/armv7/exynos/clock_init_exynos4.c |   94 +
  .../arm/cpu/armv7/exynos/clock_init_exynos5.c  |   27 +-
  arch/arm/cpu/armv7/exynos/common_setup.h   |   43 ++
  .../arm/cpu/armv7/exynos}/dmc_common.c |7 +-
  .../arm/cpu/armv7/exynos}/dmc_init_ddr3.c  |   17 +-
  arch/arm/cpu/armv7/exynos/dmc_init_exynos4.c   |  295 ++
  .../arm/cpu/armv7/exynos/exynos4_setup.h   |   97 +-
  .../arm/cpu/armv7/exynos/exynos5_setup.h   |   28 +-
  arch/arm/cpu/armv7/exynos/lowlevel_init.c  |   72 
  arch/arm/cpu/armv7/exynos/pinmux.c |   40 ++
  arch/arm/cpu/armv7/exynos/power.c  |   50 +++
  .../arm/cpu/armv7/exynos}/spl_boot.c   |   77 +++-
  arch/arm/include/asm/arch-exynos/power.h   |   12 +
  .../exynos-uboot-spl.lds}  |0
  board/samsung/origen/Makefile  |   11 +-
  board/samsung/origen/lowlevel_init.S   |  357 -
  board/samsung/origen/mem_setup.S   |  421 
 
  board/samsung/origen/mmc_boot.c|   58 ---
  board/samsung/origen/origen.c  |   46 +++
  board/samsung/smdk5250/Makefile|   14 +-
  board/samsung/smdkv310/Makefile|   10 +-
  board/samsung/smdkv310/lowlevel_init.S |  414 ---
  board/samsung/smdkv310/mem_setup.S |  365 -
  board/samsung/smdkv310/mmc_boot.c  |   60 ---
  board/samsung/smdkv310/smdkv310.c  |   46 +++
  include/configs/exynos5250-dt.h|   10 +-
  include/configs/origen.h   |   10 +-
  include/configs/smdkv310.h |9 +-
  30 files changed, 940 insertions(+), 1767 deletions(-)
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/clock_init.h 
 (100%)
  create mode 100644 arch/arm/cpu/armv7/exynos/clock_init_exynos4.c
  rename board/samsung/smdk5250/clock_init.c = 
 arch/arm/cpu/armv7/exynos/clock_init_exynos5.c (97%)
  create mode 100644 arch/arm/cpu/armv7/exynos/common_setup.h
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/dmc_common.c 
 (97%)
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/dmc_init_ddr3.c 
 (96%)
  create mode 100644 arch/arm/cpu/armv7/exynos/dmc_init_exynos4.c
  rename board/samsung/origen/origen_setup.h = 
 arch/arm/cpu/armv7/exynos/exynos4_setup.h (86%)
  rename board/samsung/smdk5250/setup.h = 
 arch/arm/cpu/armv7/exynos/exynos5_setup.h (96%)
  create mode 100644 arch/arm/cpu/armv7/exynos/lowlevel_init.c
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/spl_boot.c (73%)
  rename board/samsung/{smdk5250/smdk5250-uboot-spl.lds = 
 common/exynos-uboot-spl.lds} (100%)
  delete mode 100644 board/samsung/origen/lowlevel_init.S
  delete mode 100644 board/samsung/origen/mem_setup.S
  delete mode 100644 board/samsung/origen/mmc_boot.c
  delete mode 100644 board/samsung/smdkv310/lowlevel_init.S
  delete mode 100644 board/samsung/smdkv310/mem_setup.S
  delete mode 100644 board/samsung/smdkv310/mmc_boot.c

 --
 1.7.4.4

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot

-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] SMDK5250: Remove reduntant code

2013-06-27 Thread Rajeshwari Birje
Hi Minkyu,

Please do let me know your coments on the same. If no comments can we
get this patch merged.

On Tue, Jun 25, 2013 at 7:25 PM, Simon Glass s...@chromium.org wrote:
 On Tue, Jun 25, 2013 at 6:47 AM, Rajeshwari Shinde rajeshwar...@samsung.com
 wrote:

 enum boot_mode is defined twice once in spl.h and also in
 spl_boot.c, hence removing the same from spl_boot.c and including
 the header file.

 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com


 Acked-by: Simon Glass s...@chromium.org

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot

-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4] EXYNOS: Move files from board/samsung to arch/arm.

2013-06-26 Thread Rajeshwari Birje
Hi Minkyu Kang,

I will have to rebase this patch on the latest u-boot-samsung tree,
before which please do let me know your comments on the same.

Regards,
Rajeshwari Shinde

On Wed, May 15, 2013 at 6:47 PM, Simon Glass s...@chromium.org wrote:
 Hi Rajeswari,

 On Sun, May 12, 2013 at 8:40 PM, Rajeshwari Birje
 rajeshwari.bi...@gmail.com wrote:
 Hi Simon,

 Thank you for reviewing the patch set.
 You need to apply the following patches for it to compile and work fine.

 EXYNOS: Add API for power reset and exit wakeup
 EXYNOS: LDS file move to common
 EXYNOS4210: Configure GPIO for uart
 EXYNOS: Move files from board/samsung to arch/arm.

 From the error it looks like EXYNOS: Add API for power reset and exit
 wakeup patch is missing.

 Yes that fixes it, thank you. I sent an email to the maintainer with the list.

 On Sun, May 12, 2013 at 12:09 AM, Simon Glass s...@chromium.org wrote:
 Hi Rajeshwari,

 On Wed, Apr 24, 2013 at 11:57 PM, Rajeshwari Shinde
 rajeshwar...@samsung.com wrote:
 This patch performs the following:

 1) Convert the assembly code for memory and clock initialization to C code.
 2) Move the memory and clock init codes from board/samsung to arch/arm
 3) Creat a common lowlevel_init file across Exynos4 and Exynos5. Converted
the common lowlevel_init from assembly to C-code
 4) Made spl_boot.c and tzpc_init.c common for both exynos4 and exynos5.
 5) Enable CONFIG_SKIP_LOWLEVEL_INIT as stack pointer initialisation is 
 already
 done in _main.
 6) exynos-uboot-spl.lds made common across SMDKV310, Origen and SMDK5250.

 TEST: Tested SD-MMC boot on SMDK5250 and Origen.
   Tested USB and SPI boot on SMDK5250
   Compile tested for SMDKV310.

 Signed-off-by: Hatim Ali hatim...@samsung.com
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com

 Congratulations on getting this patch together.

 It looks correct, but I had some problems getting it to build.
 Probably I am missing some other patch.

 Configuring for smdk5250 board...
 lowlevel_init.c: In function ‘do_lowlevel_init’:
 lowlevel_init.c:50:2: warning: implicit declaration of function
 ‘get_reset_status’ [-Wimplicit-function-declaration]
 spl_boot.c: In function ‘board_init_f’:
 spl_boot.c:141:3: warning: implicit declaration of function
 ‘power_exit_wakeup’ [-Wimplicit-function-declaration]
 arch/arm/cpu/armv7/exynos/libexynos.o: In function `board_init_f':
 /mnt/host/source/src/third_party/u-boot/files/arch/arm/cpu/armv7/exynos/spl_boot.c:141:
 undefined reference to `power_exit_wakeup'
 arch/arm/cpu/armv7/exynos/libexynos.o: In function `do_lowlevel_init':
 /mnt/host/source/src/third_party/u-boot/files/arch/arm/cpu/armv7/exynos/lowlevel_init.c:50:
 undefined reference to `get_reset_status'
 make[1]: *** [/mnt/host/source/src/third_party/u-boot/files/spl/u-boot-spl]
 Error 1

 I will send a separate email about the patch situation. Here are the
 patches I applied in reverse order - please let me know if I missed
 any.

 d3858f7 (HEAD, snow2) EXYNOS: Move files from board/samsung to arch/arm.
 e666035 hack: Remove TPM definitions from exysno5-dt.h so that next
 patch applies cleanly
 c9ec2d1 EXYNOS4210: Configure GPIO for uart
 cf6e500 EXYNOS: LDS file move to common
 a40665b EXYNOS: Add API for power reset and shutdown

 [snip]

 Regards,
 Simon



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4 V6] EXYNOS5: FDT: Add compatible strings for Serial

2013-06-24 Thread Rajeshwari Birje
Hi Minkyu,

Please do find the answer to your commnet.

On Mon, Jun 24, 2013 at 3:46 PM, Minkyu Kang mk7.k...@samsung.com wrote:
 On 24/06/13 18:16, Rajeshwari Shinde wrote:
 Add required compatible information for s5p serial driver

 Signed-off-by: Abhilash Kesavan a.kesa...@samsung.com
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 ---
 Changes in V2:
 - Changed the compatible string to samsung,exynos4210-uart
 Changes in V3:
 - Rebased on latest u-boot-samsung
 Changes in V4:
 - Rebased on latest u-boot-samsung
 - Changed to COMPAT_SAMSUNG_EXYNOS5_SERIAL to 
 COMPAT_SAMSUNG_EXYNOS_SERIAL
 Changes in V5:
 - None
 Changes in V6:
   - Moved compatible strings up with all other samsung strings.
  include/fdtdec.h |1 +
  lib/fdtdec.c |1 +
  2 files changed, 2 insertions(+), 0 deletions(-)

 diff --git a/include/fdtdec.h b/include/fdtdec.h
 index bc3b89b..bea326e 100644
 --- a/include/fdtdec.h
 +++ b/include/fdtdec.h
 @@ -90,6 +90,7 @@ enum fdt_compat_id {
   COMPAT_SAMSUNG_EXYNOS_FIMD, /* Exynos Display controller */
   COMPAT_SAMSUNG_EXYNOS5_DP,  /* Exynos Display port controller */
   COMPAT_SAMSUNG_EXYNOS5_DWMMC,   /* Exynos5 DWMMC controller */
 + COMPAT_SAMSUNG_EXYNOS_SERIAL,   /* Exynos UART */
   COMPAT_MAXIM_MAX77686_PMIC, /* MAX77686 PMIC */
   COMPAT_GENERIC_SPI_FLASH,   /* Generic SPI Flash chip */
   COMPAT_MAXIM_98095_CODEC,   /* MAX98095 Codec */
 diff --git a/lib/fdtdec.c b/lib/fdtdec.c
 index e3142cb..d1acc35 100644
 --- a/lib/fdtdec.c
 +++ b/lib/fdtdec.c
 @@ -63,6 +63,7 @@ static const char * const compat_names[COMPAT_COUNT] = {
   COMPAT(SAMSUNG_EXYNOS_FIMD, samsung,exynos-fimd),
   COMPAT(SAMSUNG_EXYNOS5_DP, samsung,exynos5-dp),
   COMPAT(SAMSUNG_EXYNOS5_DWMMC, samsung,exynos5250-dwmmc),
 + COMPAT(SAMSUNG_EXYNOS_SERIAL, samsung,exynos4210-uart),

 Is it exynos4210 specific?
 If not, how about exynos-uart?
We use samsung,exynos4210-uart to keep it same as it is in kernel.
This was changed after a commnet from Simon
http://lists.denx.de/pipermail/u-boot/2013-March/148095.html

   COMPAT(MAXIM_MAX77686_PMIC, maxim,max77686_pmic),
   COMPAT(GENERIC_SPI_FLASH, spi-flash),
   COMPAT(MAXIM_98095_CODEC, maxim,max98095-codec),


 Thanks,
 Minkyu Kang.

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot
-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/4 V6] EXYNOS5: FDT: Add serial device node values

2013-06-24 Thread Rajeshwari Birje
Hi Minkyu Kang,

Thank you for comment

On Mon, Jun 24, 2013 at 3:46 PM, Minkyu Kang mk7.k...@samsung.com wrote:
 On 24/06/13 18:16, Rajeshwari Shinde wrote:
 This patch adds the device node required for serial driver

 Signed-off-by: Abhilash Kesavan a.kesa...@samsung.com
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 ---
 Changes in V2:
 - Changed the compatible string to samsung,exynos4210-uart
 Changes in V3:
 - Added a alias console as we will support one at any point of time.
 Changes in V4:
 - Rebased on latest u-boot-samsung tree.
 Changes in V5:
 - Added device node for Snow board.
 Changes in V6:
   - Rebased on latest u-boot-samsung branch.
  arch/arm/dts/exynos5250.dtsi  |   28 
 
  board/samsung/dts/exynos5250-smdk5250.dts |2 ++
  board/samsung/dts/exynos5250-snow.dts |2 ++
  3 files changed, 32 insertions(+), 0 deletions(-)

 diff --git a/arch/arm/dts/exynos5250.dtsi b/arch/arm/dts/exynos5250.dtsi
 index cee4fe8..1e14154 100644
 --- a/arch/arm/dts/exynos5250.dtsi
 +++ b/arch/arm/dts/exynos5250.dtsi
 @@ -202,4 +202,32 @@
   interrupts = 0 78 0;
   };

 +

 please remove this extra line.

Will correct this and send a new patchset.
 + serial@12C0 {
 + compatible = samsung,exynos4210-uart;
 + reg = 0x12C0 0x100;
 + interrupts = 0 51 0;
 + id = 0;
 + };
 +
 + serial@12C1 {
 + compatible = samsung,exynos4210-uart;
 + reg = 0x12C1 0x100;
 + interrupts = 0 52 0;
 + id = 1;
 + };
 +
 + serial@12C2 {
 + compatible = samsung,exynos4210-uart;
 + reg = 0x12C2 0x100;
 + interrupts = 0 53 0;
 + id = 2;
 + };
 +
 + serial@12C3 {
 + compatible = samsung,exynos4210-uart;
 + reg = 0x12C3 0x100;
 + interrupts = 0 54 0;
 + id = 3;
 + };
  };
 diff --git a/board/samsung/dts/exynos5250-smdk5250.dts 
 b/board/samsung/dts/exynos5250-smdk5250.dts
 index 93375a6..80ffe30 100644
 --- a/board/samsung/dts/exynos5250-smdk5250.dts
 +++ b/board/samsung/dts/exynos5250-smdk5250.dts
 @@ -34,6 +34,8 @@
   mmc1 = /mmc@1221;
   mmc2 = /mmc@1222;
   mmc3 = /mmc@1223;
 + serial0 = /serial@12C3;
 + console = /serial@12C3;
   };

   sromc@1225 {
 diff --git a/board/samsung/dts/exynos5250-snow.dts 
 b/board/samsung/dts/exynos5250-snow.dts
 index d167df9..fdc047a 100644
 --- a/board/samsung/dts/exynos5250-snow.dts
 +++ b/board/samsung/dts/exynos5250-snow.dts
 @@ -34,6 +34,8 @@
   mmc1 = /mmc@1221;
   mmc2 = /mmc@1222;
   mmc3 = /mmc@1223;
 + serial0 = /serial@12C3;
 + console = /serial@12C3;
   };

   sound@12d6 {


 Thanks,
 Minkyu Kang.
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot
-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/4 V5] SMDK5250: FDT: Add device tree support for console

2013-06-20 Thread Rajeshwari Birje
Hi Minkyu Kang,

Any comments on this patch set? Please do let me know.

Regards,
Rajeshwari Shinde.


On Fri, May 17, 2013 at 4:33 PM, Rajeshwari Shinde
rajeshwar...@samsung.com wrote:
 Enabled fdt support for default console on SMDK5250.

 Changes in V2:
 - Changed the compatible string to samsung,exynos4210-uart
 Changes in V3:
 - Rebased the patchset on latest u-boot-samsung branch.
 - Added a alias console as we will support one at any point of time.
 - Moved driver config structure to data section.
 - Changed silent_console to silent-console.
 - Did put a check for base address before doing fdt decoding.
 Changes in V4:
 - Rebased the patchset on latest u-boot-samsung branch.
 - Changed to COMPAT_SAMSUNG_EXYNOS5_SERIAL to 
 COMPAT_SAMSUNG_EXYNOS_SERIAL
 Changes in V5:
 - Added serial device node for Snow board.

 Rajeshwari Shinde (4):
   EXYNOS5: FDT: Add compatible strings for Serial
   EXYNOS5: FDT: Add serial device node values
   S5P: Serial: Add fdt support to driver
   CONFIG: EXYNOS5: Enable silent console

  arch/arm/dts/exynos5250.dtsi  |   28 ++
  board/samsung/dts/exynos5250-smdk5250.dts |2 +
  board/samsung/dts/exynos5250-snow.dts |2 +
  drivers/serial/serial_s5p.c   |   78 
 +
  include/configs/exynos5250-dt.h   |2 +
  include/fdtdec.h  |1 +
  lib/fdtdec.c  |1 +
  7 files changed, 114 insertions(+), 0 deletions(-)

 --
 1.7.4.4

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] exynos: spl: Add a custom spi copy function

2013-06-05 Thread Rajeshwari Birje
Hi Jagan,

Simon had sent a V2 by rebasing the patch on MMC series submitted by
Amar, but there are no comments on those MMC patches and are not yet
merged. I incorporated the review comments given by Wolfgang Denk on
top of V1 and sent a V2 patch.

Regards,
Rajeshwari Shinde.

On Mon, Jun 3, 2013 at 12:36 AM, Jagan Teki jagannadh.t...@gmail.com wrote:
 Hi,

 I think this needs to send as v3, as Simon sent v2 for this.
 http://patchwork.ozlabs.org/patch/243139/

 --
 Thanks,
 Jagan.

 On Thu, May 30, 2013 at 12:01 PM, Rajeshwari Shinde
 rajeshwar...@samsung.com wrote:
 This patch implements a custom spi_copy funtion to copy u-boot from SF
 to RAM. This is faster then iROM spi_copy funtion as this runs spi at
 50Mhz and also in WORD mode of operation.

 Changed a printf in pinmux.c to debug just to avoid the compilation
 error in SPL.
 Removed enum for boot mode from spl_boot.c as it was already define
 in spl.h

 Based on [PATCH V2] spi: exynos: Support word transfers

 Signed-off-by: Alim Akhtar alim.akh...@samsung.com
 Signed-off-by: Tom Wai-Hong Tam waih...@chromium.org
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 ---
 Changes in V2:
 - Corrected the commit message.
 - Added a SPI timeout check.
 - Corrected the comments.
  arch/arm/cpu/armv7/exynos/pinmux.c |2 +-
  arch/arm/include/asm/arch-exynos/spi.h |2 +
  board/samsung/smdk5250/spl_boot.c  |  136 
 ---
  include/configs/exynos5250-dt.h|3 +
  spl/Makefile   |4 +
  5 files changed, 132 insertions(+), 15 deletions(-)

 diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c 
 b/arch/arm/cpu/armv7/exynos/pinmux.c
 index bd499b4..c484a86 100644
 --- a/arch/arm/cpu/armv7/exynos/pinmux.c
 +++ b/arch/arm/cpu/armv7/exynos/pinmux.c
 @@ -427,7 +427,7 @@ static int exynos4_pinmux_config(int peripheral, int 
 flags)
 case PERIPH_ID_SDMMC1:
 case PERIPH_ID_SDMMC3:
 case PERIPH_ID_SDMMC4:
 -   printf(SDMMC device %d not implemented\n, peripheral);
 +   debug(SDMMC device %d not implemented\n, peripheral);
 return -1;
 default:
 debug(%s: invalid peripheral %d, __func__, peripheral);
 diff --git a/arch/arm/include/asm/arch-exynos/spi.h 
 b/arch/arm/include/asm/arch-exynos/spi.h
 index e67ad27..3430ac1 100644
 --- a/arch/arm/include/asm/arch-exynos/spi.h
 +++ b/arch/arm/include/asm/arch-exynos/spi.h
 @@ -43,6 +43,8 @@ struct exynos_spi {

  #define SPI_TIMEOUT_MS 10

 +#define SF_READ_DATA_CMD   0x3
 +
  /* SPI_CHCFG */
  #define SPI_CH_HS_EN   (1  6)
  #define SPI_CH_RST (1  5)
 diff --git a/board/samsung/smdk5250/spl_boot.c 
 b/board/samsung/smdk5250/spl_boot.c
 index c0bcf46..85a5d68 100644
 --- a/board/samsung/smdk5250/spl_boot.c
 +++ b/board/samsung/smdk5250/spl_boot.c
 @@ -22,17 +22,13 @@

  #includecommon.h
  #includeconfig.h
 +#include asm/arch/clk.h
 +#include asm/arch/spi.h
 +#include asm/arch/pinmux.h
 +#include asm/arch/periph.h
 +#include asm/arch/spl.h

 -enum boot_mode {
 -   BOOT_MODE_MMC = 4,
 -   BOOT_MODE_SERIAL = 20,
 -   /* Boot based on Operating Mode pin settings */
 -   BOOT_MODE_OM = 32,
 -   BOOT_MODE_USB,  /* Boot using USB download */
 -};
 -
 -   typedef u32 (*spi_copy_func_t)(u32 offset, u32 nblock, u32 dst);
 -   typedef u32 (*usb_copy_func_t)(void);
 +typedef u32 (*usb_copy_func_t)(void);

  /*
   * Set/clear program flow prediction and return the previous state.
 @@ -48,6 +44,119 @@ static int config_branch_prediction(int set_cr_z)
 return cr  CR_Z;
  }

 +static void spi_rx_tx(struct exynos_spi *regs, int todo,
 +   void *dinp, void const *doutp, int i)
 +{
 +   uint *rxp = (uint *)(dinp + (i * (32 * 1024)));
 +   int rx_lvl, tx_lvl;
 +   uint out_bytes, in_bytes;
 +
 +   out_bytes = todo;
 +   in_bytes = todo;
 +   setbits_le32(regs-ch_cfg, SPI_CH_RST);
 +   clrbits_le32(regs-ch_cfg, SPI_CH_RST);
 +   writel(((todo * 8) / 32) | SPI_PACKET_CNT_EN, regs-pkt_cnt);
 +
 +   while (in_bytes) {
 +   uint32_t spi_sts;
 +   int temp;
 +
 +   spi_sts = readl(regs-spi_sts);
 +   rx_lvl = ((spi_sts  15)  0x7f);
 +   tx_lvl = ((spi_sts  6)  0x7f);
 +   while (tx_lvl  32  out_bytes) {
 +   temp = 0x;
 +   writel(temp, regs-tx_data);
 +   out_bytes -= 4;
 +   tx_lvl += 4;
 +   }
 +   while (rx_lvl = 4  in_bytes) {
 +   temp = readl(regs-rx_data);
 +   if (rxp)
 +   *rxp++ = temp;
 +   in_bytes -= 4;
 +   rx_lvl -= 4;
 +   }
 +   }
 +}
 +
 +/*
 +* Copy uboot from spi flash to RAM
 +*
 +* @parma uboot_sizesize of 

Re: [U-Boot] [PATCH V9 0/9] EXYNOS5: Enable DWMMC, add FDT support for DWMMC and enable EMMC boot

2013-05-29 Thread Rajeshwari Birje
Hi Andy,

U seem to be busy. I you have no issues can I ask Minkyu Kang to take
them in u-boot-samsung tree. Please do reply.

-- 
Regards,
Rajeshwari Shinde
On Fri, May 24, 2013 at 11:16 AM, Rajeshwari Birje
rajeshwari.bi...@gmail.com wrote:
 Hi Andy,

 Please do let us know if any comments on this patch set.
 If no comments can we get them merged, as they seem to be floating in
 mainline for quite sometime now.

 Regards,
 Rajeshwari Shinde

 On Sat, May 11, 2013 at 8:55 AM, Simon Glass s...@chromium.org wrote:
 On Sat, Apr 27, 2013 at 12:12 AM, amar_g amarendra...@samsung.com wrote:
 From: Amar amarendra...@samsung.com

 This patch set enables and initialises DWMMC for Exynos5250 on SMDK5250.
 Adds driver changes required for DWMMC.
 Adds FDT support for DWMMC.
 Adds EMMC boot support for SMDK5250.

 This patch set is based on:
 EXYNOS: mmc: support DesignWare Controller for Samsung-SoC, which
 is merged in u-boot-mmc.
 Exynos: clock: support get_mmc_clk for exynos.
 Add DT based ethernet driver for SMDK5250.
 SMDK5250: Add FDT support present at the following link
 http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/149991

 Changes since V1:
 1)Corrected in response to review comments.
 2)Created separate board files for FDT and non-FDT versions.
 3)Added binding file for DWMMC device node.
 4)Removed the propname 'index' from device node.
 5)Prefixed the vendor name 'samsung' before propname in device node.
 6)Ensured to have same signature for the function 
 exynos_dwmci_init()
 for both FDT and non-FDT versions.
 7)EMMC clock setting has been moved from spl_boot.c to clock_init.c.

 Changes since V2:
 1)Updation of commit message and resubmition of proper patch set.

 Changes since V3:
 1)Updated to use the macro DWMCI_CTRL_SEND_AS_CCSD instead of the
 hard coded value (1  10).
 2)In the file exynos_dw_mmc.c, replaced the new function
 exynos5_mmc_set_clk_div() with the existing function set_mmc_clk().
 set_mmc_clk() will do the purpose.
 3)In the file exynos_dw_mmc.c, computation of FSYS block clock
 divisor (pre-ratio) value is added.
 4)Removed the new function exynos5_mmc_set_clk_div() from clock.c.

 Changes since V4:
 1)Updated the function dwmci_send_cmd() to use get_timer() instead
 of using mdelay(1).
 2)Replaced the function call 'exynos_dwmmc_init(0, 8);' with the
 function exynos_dwmmc_add_port() in smdk5250.c.
 3)The function get_irom_func(int index) has been added to avoid
 type casting at many places.
 4)Used the generic function mmc_boot_part_access() instead of two
 functions mmc_boot_open() and mmc_boot_close(). By doing so user
 can specify which boot partition to be accessed (opened / closed).

 Changes since V5:
 1)Added the 'removable' flag to mmc device node.
 2)Changed the mmc clock value from 50MHz to 52MHz in the function
 exynos_dwmci_add_port() present in file drivers/mmc/exynos_dw_mmc.c.
 3)Enabled CONFIG_LCD only for non-FDT operation.
 4)Removed the function call i2c_init() present inside the
 function board_i2c_init().

 Changes since V6:
 1)Re-based to the patch SMDK5250: Add PMIC voltage settings.

 Changes since V7:
 1)Re-based to the patch
 Exynos: pwm: Remove dead code of function exynos5_get_pwm_clk.
 2)In file dw_mmc.c, updated the function dwmci_setup_bus() to
 return 0 if (freq == 0).This is to avoid the run time exception
 raise:Signal # 8 caught.
 3)In the files drivers/mmc/mmc.c and common/cmd_mmc.c, the piece
 of code involved in EMMC open/close and resize of EMMC boot
 partition has been made conditional and is enabled only if the
 macro CONFIG_SUPPORT_EMMC_BOOT is defined.
 4)The macros FSYS1_MMC0_DIV_MASK and FSYS1_MMC0_DIV_VAL are made
 local to file clock_init.c.

 Changes since V8:
 1)Re-based to the patch
 exynos: fdt: Add TMU node for snow.
 2)In spl_boot.c, updated USB boot piece of code, to use
 get_irom_func(int index) to avoid type casting.
 3)Updated the below in response to review comments
 a)Changed the type of input parameters from u32 to u8 for the
 function boot_part_access().
 b)Updated the function call to use a constant value 1,
 for boot_part_access(mmc, 1, part_num, access).
 c)In function dwmci_init, auto stop command is disabled, as this
 feature is not required.

 The series tested on snow:

 Acked-by: Simon Glass s...@chromium.org
 Tested-by: Simon Glass s...@chromium.org


 Amar (9):
   FDT: Add compatible string for DWMMC
   EXYNOS5: FDT: Add DWMMC device node data
   DWMMC: Initialise dwmci and resolve EMMC read write issues
   EXYNOS5: DWMMC: Added FDT support for DWMMC
   EXYNOS5

Re: [U-Boot] [HELP]: sf: winbond: add W25Q32

2013-05-28 Thread Rajeshwari Birje
Hi Jagan,

Yes you are right it has to be 16.
So you want me to and send a patch correcting it?
Or you want me to revert it and send a new patch?

-- 
Regards,
Rajeshwari Shinde
On Mon, May 27, 2013 at 12:30 PM, Jagan Teki jagannadh.t...@gmail.com wrote:
 Hi Rajeshwari,

 On Mon, May 27, 2013 at 11:59 AM, Jagan Teki jagannadh.t...@gmail.com wrote:
 Hi,

 Thanks for your response.

 On Mon, May 27, 2013 at 11:09 AM, Rajeshwari Birje
 rajeshwari.bi...@gmail.com wrote:
 Hi Jagan,

 Hope following reply answer your query.

 On Sat, May 25, 2013 at 2:08 AM, Jagan Teki jagannadh.t...@gmail.com 
 wrote:
 Hi,

 Any update on this, is this a different part w.r.t what I refer for?

 Thanks,
 Jagan.

 On Thu, May 23, 2013 at 2:22 PM, Jagan Teki jagannadh.t...@gmail.com 
 wrote:
 Hi Rajeshwari,

 +   {
 +   .id = 0x5014,

 is this id code is correct? it seems like 0x4014
 When you see the datasheet of W25Q80BW page 16, the table says its 5014h

 +   .nr_blocks  = 128,

 nr_blocks must be 16 i think?
 We use W25Q80BW which is 8MB, hence it is correct as per following 
 calculation;
 flash-size = 4096 * 16 * params-nr_blocks;

 Yes, it is 8M-BIT so the nr_blocks should be 16 to calculate the flash
 size as 1Mbyte.

 --
 Thanks,
 Jagan.


 +   .name   = W25Q80,
 +   },
  };

 Honestly the commit message itself is wrong, i guess.
 Yes this I agree is my fault, but wonder how it went in through all the 
 reviews.

 1. Can you please revert this patch, as commit message not looks good
 me and also some incorrect nr_blocks
 Please mentioned the exact details on commit message body reason
 for reverting
 2. And also send one more patch with a proper details. [exact name,
 nr_blocks .etc]

 ---
 Thanks,
 Jagan.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] EXYNOS: SPL: Add a custom spi copy function

2013-05-28 Thread Rajeshwari Birje
Hi Wolfgang Denk,

Thank you for review comments.

On Sun, May 12, 2013 at 2:01 AM, Wolfgang Denk w...@denx.de wrote:
 Dear Simon Glass,

 In message 1368285471-11039-1-git-send-email-...@chromium.org you wrote:
 From: Rajeshwari Shinde rajeshwar...@samsung.com

 This CL implements a custom spi_copy funtion to copy u-boot from SF to

 What is a CL ?

 Changed a printf in pimux.c to debug just to avoid the the compilation

 s/the the/the/ ??

 Removed the enum for boot mode from spl_boot.c as it was already define in 
 spl.h

 s/define/defined/

 Line length in commit messages should be not more than 72 characters.
Will correct these issues and resubmit the patch set soon.


 +/**
 + * Copy uboot from spi flash to RAM
 + *
 + * @parma uboot_size size of u-boot to copy
 + * @param uboot_addr address of u-boot to copy
 + */

 Incorrect multiline comment style.
Will correct these

 +static void exynos_spi_copy(unsigned int uboot_size, unsigned int 
 uboot_addr)
 +{
 + int upto, todo;
 + int i;
 + struct exynos_spi *regs = (struct exynos_spi *)CONFIG_ENV_SPI_BASE;
 +
 + set_spi_clk(PERIPH_ID_SPI1, 5000); /* set spi clock to 50Mhz */
 + /* set the spi1 GPIO */
 + exynos_pinmux_config(PERIPH_ID_SPI1, PINMUX_FLAG_NONE);
 +
 + /* set pktcnt and enable it */
 + writel(4 | SPI_PACKET_CNT_EN, regs-pkt_cnt);
 + /* set FB_CLK_SEL */
 + writel(SPI_FB_DELAY_180, regs-fb_clk);
 + /* set CH_WIDTH and BUS_WIDTH as word */
 + setbits_le32(regs-mode_cfg, SPI_MODE_CH_WIDTH_WORD |
 + SPI_MODE_BUS_WIDTH_WORD);
 + clrbits_le32(regs-ch_cfg, SPI_CH_CPOL_L); /* CPOL: active high */
 +
 + /* clear rx and tx channel if set priveously */
 + clrbits_le32(regs-ch_cfg, SPI_RX_CH_ON | SPI_TX_CH_ON);
 +
 + typedef u32 (*spi_copy_func_t)(u32 offset, u32 nblock, u32 dst);

 We do not allow typedefs or variable declarations etc. right in the
 middle of the code.

 I'm surprised that checkpatch does not complain here about not to add
 new typedefs ??
Basically  typedef u32 (*spi_copy_func_t)(u32 offset, u32 nblock, u32
dst); was removed in my original patch.
Will check and remove this from the version of patch set I submit.

 + /* waiting for TX done */
 + while (!(readl(regs-spi_sts)  SPI_ST_TX_DONE))
 + ;

 Potentially infinite loop.  This (and similar code) should always have
 a timeout and appropriate error handling.
Will add a timeout check here


 + /* let us our own function to copy u-boot from SF */

 Please fix the wording of this comment.
Will correct this.

 diff --git a/spl/Makefile b/spl/Makefile
 index b5a8de7..5e7816a 100644
 --- a/spl/Makefile
 +++ b/spl/Makefile
 @@ -94,6 +94,10 @@ LIBS-y += 
 arch/$(ARCH)/cpu/tegra-common/libcputegra-common.o
  LIBS-y += $(CPUDIR)/tegra-common/libtegra-common.o
  endif

 +ifneq ($(CONFIG_EXYNOS4)$(CONFIG_EXYNOS5),)
 +LIBS-y += $(CPUDIR)/s5p-common/libs5p-common.o
 +endif

 This should be done without the ifneq.
This is specific to samsung and currently used only by EXYNOS hence it
was added with a ifneq


 Best regards,

 Wolfgang Denk

 --
 DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
 HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
 Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
 Love all, trust a few.  - William Shakespeare
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot

-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [HELP]: sf: winbond: add W25Q32

2013-05-26 Thread Rajeshwari Birje
Hi Jagan,

Hope following reply answer your query.

On Sat, May 25, 2013 at 2:08 AM, Jagan Teki jagannadh.t...@gmail.com wrote:
 Hi,

 Any update on this, is this a different part w.r.t what I refer for?

 Thanks,
 Jagan.

 On Thu, May 23, 2013 at 2:22 PM, Jagan Teki jagannadh.t...@gmail.com wrote:
 Hi Rajeshwari,

 +   {
 +   .id = 0x5014,

 is this id code is correct? it seems like 0x4014
When you see the datasheet of W25Q80BW page 16, the table says its 5014h

 +   .nr_blocks  = 128,

 nr_blocks must be 16 i think?
We use W25Q80BW which is 8MB, hence it is correct as per following calculation;
flash-size = 4096 * 16 * params-nr_blocks;

 +   .name   = W25Q80,
 +   },
  };

 Honestly the commit message itself is wrong, i guess.
Yes this I agree is my fault, but wonder how it went in through all the reviews.

 Please comment.

 Thanks,
 Jagan.
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot

-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] MMC: DWMMC: Fix FIFO_DEPTH calculation

2013-05-24 Thread Rajeshwari Birje
Hi Jagan,

Please find my comments below.
On Fri, May 24, 2013 at 10:31 AM, Jagan Teki jagannadh.t...@gmail.com wrote:
 On Fri, May 24, 2013 at 7:12 AM, Jaehoon Chung jh80.ch...@samsung.com wrote:
 On 05/24/2013 03:27 AM, Jagan Teki wrote:
 On Thu, May 23, 2013 at 6:45 PM, Rajeshwari Shinde
 rajeshwar...@samsung.com wrote:
 Current DWMMC driver used to give FIFO underrun/overrun error every 3rd 
 time
 for mmc rescan command.
 In current code FIFO_DEPTH is getting calculated after reading the FIFOTH
 register and extracting the RX_WMARK bits from it i.e (RX_WMARK = 
 FIFO_DEPTH/2 -1).
 Instead of storing the correct value, we were recalculating the FIFO_DEPT 
 each
 time which is not correct.

 Signed-off-by: Hatim Ali hatim...@samsung.com
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 ---
  drivers/mmc/dw_mmc.c |6 --
  1 files changed, 4 insertions(+), 2 deletions(-)

 diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
 index 4070d4e..be590a4 100644
 --- a/drivers/mmc/dw_mmc.c
 +++ b/drivers/mmc/dw_mmc.c
 @@ -332,11 +332,13 @@ static int dwmci_init(struct mmc *mmc)
 dwmci_writel(host, DWMCI_BMOD, 1);

 fifo_size = dwmci_readl(host, DWMCI_FIFOTH);
 -   if (host-fifoth_val)
 +   if (host-fifoth_val) {

 What is the inital value for host-fifoth_val, for the first time call.?
 It should be set into board-specific file(dw-mmc_exynos.c) or others.

 I am unable to find dw-mmc_exynos.c on the master, and also I haven't
 see fifoth_val used other than dw_mmc.c
 Could you please help me out.
dw-mmc_exynos.c is merged in mmc tree. Yes  FIFO_DEPTH is set only in dw_mmc.c

 Thanks,
 Jagan.


 Best Regards,
 Jaehoon Chung

 fifoth_val = host-fifoth_val;
 -   else
 +   } else {
 fifoth_val = MSIZE(0x2) | RX_WMARK(fifo_size/2 -1) |
 TX_WMARK(fifo_size/2);
 +   host-fifoth_val = fifoth_val;
 +   }
 dwmci_writel(host, DWMCI_FIFOTH, fifoth_val);

 dwmci_writel(host, DWMCI_CLKENA, 0);
 --
 1.7.4.4


 Thanks,
 Jagan.


 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot

-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V9 0/9] EXYNOS5: Enable DWMMC, add FDT support for DWMMC and enable EMMC boot

2013-05-23 Thread Rajeshwari Birje
Hi Andy,

Please do let us know if any comments on this patch set.
If no comments can we get them merged, as they seem to be floating in
mainline for quite sometime now.

Regards,
Rajeshwari Shinde

On Sat, May 11, 2013 at 8:55 AM, Simon Glass s...@chromium.org wrote:
 On Sat, Apr 27, 2013 at 12:12 AM, amar_g amarendra...@samsung.com wrote:
 From: Amar amarendra...@samsung.com

 This patch set enables and initialises DWMMC for Exynos5250 on SMDK5250.
 Adds driver changes required for DWMMC.
 Adds FDT support for DWMMC.
 Adds EMMC boot support for SMDK5250.

 This patch set is based on:
 EXYNOS: mmc: support DesignWare Controller for Samsung-SoC, which
 is merged in u-boot-mmc.
 Exynos: clock: support get_mmc_clk for exynos.
 Add DT based ethernet driver for SMDK5250.
 SMDK5250: Add FDT support present at the following link
 http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/149991

 Changes since V1:
 1)Corrected in response to review comments.
 2)Created separate board files for FDT and non-FDT versions.
 3)Added binding file for DWMMC device node.
 4)Removed the propname 'index' from device node.
 5)Prefixed the vendor name 'samsung' before propname in device node.
 6)Ensured to have same signature for the function exynos_dwmci_init()
 for both FDT and non-FDT versions.
 7)EMMC clock setting has been moved from spl_boot.c to clock_init.c.

 Changes since V2:
 1)Updation of commit message and resubmition of proper patch set.

 Changes since V3:
 1)Updated to use the macro DWMCI_CTRL_SEND_AS_CCSD instead of the
 hard coded value (1  10).
 2)In the file exynos_dw_mmc.c, replaced the new function
 exynos5_mmc_set_clk_div() with the existing function set_mmc_clk().
 set_mmc_clk() will do the purpose.
 3)In the file exynos_dw_mmc.c, computation of FSYS block clock
 divisor (pre-ratio) value is added.
 4)Removed the new function exynos5_mmc_set_clk_div() from clock.c.

 Changes since V4:
 1)Updated the function dwmci_send_cmd() to use get_timer() instead
 of using mdelay(1).
 2)Replaced the function call 'exynos_dwmmc_init(0, 8);' with the
 function exynos_dwmmc_add_port() in smdk5250.c.
 3)The function get_irom_func(int index) has been added to avoid
 type casting at many places.
 4)Used the generic function mmc_boot_part_access() instead of two
 functions mmc_boot_open() and mmc_boot_close(). By doing so user
 can specify which boot partition to be accessed (opened / closed).

 Changes since V5:
 1)Added the 'removable' flag to mmc device node.
 2)Changed the mmc clock value from 50MHz to 52MHz in the function
 exynos_dwmci_add_port() present in file drivers/mmc/exynos_dw_mmc.c.
 3)Enabled CONFIG_LCD only for non-FDT operation.
 4)Removed the function call i2c_init() present inside the
 function board_i2c_init().

 Changes since V6:
 1)Re-based to the patch SMDK5250: Add PMIC voltage settings.

 Changes since V7:
 1)Re-based to the patch
 Exynos: pwm: Remove dead code of function exynos5_get_pwm_clk.
 2)In file dw_mmc.c, updated the function dwmci_setup_bus() to
 return 0 if (freq == 0).This is to avoid the run time exception
 raise:Signal # 8 caught.
 3)In the files drivers/mmc/mmc.c and common/cmd_mmc.c, the piece
 of code involved in EMMC open/close and resize of EMMC boot
 partition has been made conditional and is enabled only if the
 macro CONFIG_SUPPORT_EMMC_BOOT is defined.
 4)The macros FSYS1_MMC0_DIV_MASK and FSYS1_MMC0_DIV_VAL are made
 local to file clock_init.c.

 Changes since V8:
 1)Re-based to the patch
 exynos: fdt: Add TMU node for snow.
 2)In spl_boot.c, updated USB boot piece of code, to use
 get_irom_func(int index) to avoid type casting.
 3)Updated the below in response to review comments
 a)Changed the type of input parameters from u32 to u8 for the
 function boot_part_access().
 b)Updated the function call to use a constant value 1,
 for boot_part_access(mmc, 1, part_num, access).
 c)In function dwmci_init, auto stop command is disabled, as this
 feature is not required.

 The series tested on snow:

 Acked-by: Simon Glass s...@chromium.org
 Tested-by: Simon Glass s...@chromium.org


 Amar (9):
   FDT: Add compatible string for DWMMC
   EXYNOS5: FDT: Add DWMMC device node data
   DWMMC: Initialise dwmci and resolve EMMC read write issues
   EXYNOS5: DWMMC: Added FDT support for DWMMC
   EXYNOS5: DWMMC: Initialise the local variable to avoid unwanted
 results.
   SMDK5250: Initialise and Enable DWMMC, support FDT and non-FDT
   MMC: APIs to support resize of EMMC boot partition
   SMDK5250: Enable EMMC booting
   COMMON: MMC: Command to support 

[U-Boot] Issue in DWMMC in mainline

2013-05-21 Thread Rajeshwari Birje
Hi All,

I use the DWMMC driver in u-boot mainline on exynos board and face the
following issue.

I do a mmc rescan 3 times, then fourth time I get a DATA ERROR, which
is due to FIFO underun/overun, after which I don't even get Command
done interrupt.
Later on the mmcinfo value also is displayed wrong.

Please do let me know if anybody have a solution for same.
-- 
Thanks and Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4] EXYNOS: Move files from board/samsung to arch/arm.

2013-05-12 Thread Rajeshwari Birje
Hi Simon,

Thank you for reviewing the patch set.
You need to apply the following patches for it to compile and work fine.

EXYNOS: Add API for power reset and exit wakeup
EXYNOS: LDS file move to common
EXYNOS4210: Configure GPIO for uart
EXYNOS: Move files from board/samsung to arch/arm.

From the error it looks like EXYNOS: Add API for power reset and exit
wakeup patch is missing.

Regards,
Rajeshwari Shinde.


On Sun, May 12, 2013 at 12:09 AM, Simon Glass s...@chromium.org wrote:
 Hi Rajeshwari,

 On Wed, Apr 24, 2013 at 11:57 PM, Rajeshwari Shinde
 rajeshwar...@samsung.com wrote:
 This patch performs the following:

 1) Convert the assembly code for memory and clock initialization to C code.
 2) Move the memory and clock init codes from board/samsung to arch/arm
 3) Creat a common lowlevel_init file across Exynos4 and Exynos5. Converted
the common lowlevel_init from assembly to C-code
 4) Made spl_boot.c and tzpc_init.c common for both exynos4 and exynos5.
 5) Enable CONFIG_SKIP_LOWLEVEL_INIT as stack pointer initialisation is 
 already
 done in _main.
 6) exynos-uboot-spl.lds made common across SMDKV310, Origen and SMDK5250.

 TEST: Tested SD-MMC boot on SMDK5250 and Origen.
   Tested USB and SPI boot on SMDK5250
   Compile tested for SMDKV310.

 Signed-off-by: Hatim Ali hatim...@samsung.com
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com

 Congratulations on getting this patch together.

 It looks correct, but I had some problems getting it to build.
 Probably I am missing some other patch.

 Configuring for smdk5250 board...
 lowlevel_init.c: In function ‘do_lowlevel_init’:
 lowlevel_init.c:50:2: warning: implicit declaration of function
 ‘get_reset_status’ [-Wimplicit-function-declaration]
 spl_boot.c: In function ‘board_init_f’:
 spl_boot.c:141:3: warning: implicit declaration of function
 ‘power_exit_wakeup’ [-Wimplicit-function-declaration]
 arch/arm/cpu/armv7/exynos/libexynos.o: In function `board_init_f':
 /mnt/host/source/src/third_party/u-boot/files/arch/arm/cpu/armv7/exynos/spl_boot.c:141:
 undefined reference to `power_exit_wakeup'
 arch/arm/cpu/armv7/exynos/libexynos.o: In function `do_lowlevel_init':
 /mnt/host/source/src/third_party/u-boot/files/arch/arm/cpu/armv7/exynos/lowlevel_init.c:50:
 undefined reference to `get_reset_status'
 make[1]: *** [/mnt/host/source/src/third_party/u-boot/files/spl/u-boot-spl]
 Error 1

 I will send a separate email about the patch situation. Here are the
 patches I applied in reverse order - please let me know if I missed
 any.

 d3858f7 (HEAD, snow2) EXYNOS: Move files from board/samsung to arch/arm.
 e666035 hack: Remove TPM definitions from exysno5-dt.h so that next
 patch applies cleanly
 c9ec2d1 EXYNOS4210: Configure GPIO for uart
 cf6e500 EXYNOS: LDS file move to common
 a40665b EXYNOS: Add API for power reset and shutdown


 Regards,
 Simon

 ---
  arch/arm/cpu/armv7/exynos/Makefile |   14 +-
  .../arm/cpu/armv7/exynos}/clock_init.h |0
  arch/arm/cpu/armv7/exynos/clock_init_exynos4.c |   63 +++
  .../arm/cpu/armv7/exynos/clock_init_exynos5.c  |   26 +-
  arch/arm/cpu/armv7/exynos/common_setup.h   |   44 ++
  .../arm/cpu/armv7/exynos}/dmc_common.c |7 +-
  .../arm/cpu/armv7/exynos}/dmc_init_ddr3.c  |   17 +-
  arch/arm/cpu/armv7/exynos/dmc_init_exynos4.c   |  294 
  .../arm/cpu/armv7/exynos/exynos4_setup.h   |   72 +++-
  .../arm/cpu/armv7/exynos/exynos5_setup.h   |   53 +--
  arch/arm/cpu/armv7/exynos/lowlevel_init.c  |   72 +++
  .../arm/cpu/armv7/exynos}/spl_boot.c   |   90 +++-
  .../arm/cpu/armv7/exynos}/tzpc_init.c  |   17 +-
  arch/arm/include/asm/arch-exynos/spl.h |1 +
  arch/arm/include/asm/arch-exynos/tzpc.h|   28 ++
  board/samsung/origen/Makefile  |7 -
  board/samsung/origen/lowlevel_init.S   |  397 -
  board/samsung/origen/mem_setup.S   |  421 --
  board/samsung/origen/mmc_boot.c|   58 ---
  board/samsung/smdk5250/Makefile|9 -
  board/samsung/smdk5250/lowlevel_init.S |2 +
  board/samsung/smdkv310/Makefile|   10 +-
  board/samsung/smdkv310/lowlevel_init.S |  470 
 
  board/samsung/smdkv310/mem_setup.S |  365 ---
  board/samsung/smdkv310/mmc_boot.c  |   60 ---
  include/configs/exynos5250-dt.h|   12 +-
  include/configs/origen.h   |9 +-
  include/configs/smdkv310.h |8 +-
  spl/Makefile   |4 +
  29 files changed, 728 insertions(+), 1902 deletions(-)
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/clock_init.h 
 (100%)
  create mode 100644 arch/arm/cpu/armv7/exynos/clock_init_exynos4.c
  

Re: [U-Boot] [PATCH 1/3 V5] EXYNOS5: Add gpio pin numbering feature

2013-05-12 Thread Rajeshwari Birje
Hi Simon,

I applied the V5 patches on the latest u-boot-samsung tree and need
seem to compile fine.
Yes I will need to rebase them once the MMC patches get in, but will
wait for comments from Minkyu Kang as well
so that I can incorporate them and rebase the patch set once the MMC
patches get in.

Regards,
Rajeshwari Shinde.

On Sat, May 11, 2013 at 11:48 PM, Simon Glass s...@chromium.org wrote:
 HI Rajeshwari,

 On Wed, Apr 3, 2013 at 5:54 AM, Rajeshwari Shinde
 rajeshwar...@samsung.com wrote:
 This patch adds support for gpio pin numbering support on
 EXYNOS5250
 To have consistent 0..n-1 GPIO numbering the banks are divided
 into different parts where ever they have holes in them.

 Signed-off-by: Leela Krishna Amudala l.kris...@samsung.com
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 ---
 Changes in V2:
 - none.
 Changes in V3:
 - none.
 Changes in V4:
 - To have consistent 0..n-1 GPIO numbering the banks are divided
 into different parts where ever they have holes in them.
 - Combined previous patch 1 and 2 into single patch.
 Changes in V5:
 - Removed Exynos5 specific code in gpio driver api to
 get bank.
 - Added #define HAVE_GENERIC_GPIO in config file
 to remove conditinal CPU check in gpio driver.

 With this series I am getting errors in exynos5-dt.c:

 25: EXYNOS5: Add gpio pin numbering feature
arm: +   snow
 +exynos5-dt.c: In function 'board_usb_vbus_init':
 +exynos5-dt.c:79: error: 'struct exynos5_gpio_part1' has no member named 'x2'
 +exynos5-dt.c: In function 'board_enable_audio_codec':
 +exynos5-dt.c:95: error: 'struct exynos5_gpio_part1' has no member named 'x1'
 +exynos5-dt.c:96: error: 'struct exynos5_gpio_part1' has no member named 'x1'
 +exynos5-dt.c: In function 'exynos_cfg_lcd_gpio':
 +exynos5-dt.c:412: error: 'struct exynos5_gpio_part1' has no member named 'x1'
 +exynos5-dt.c:413: error: 'struct exynos5_gpio_part1' has no member named 'x1'
 +exynos5-dt.c:416: error: 'struct exynos5_gpio_part1' has no member named 'x0'


 This is probably due to new support added, so I think you need to
 adjust your patch.

 Here is the sequence I am testing with (reverse order of application):

 9529fd4 (HEAD, ws/snow, snow) EXYNOS5: GPIO: Enable GPIO Command for EXYNOS5
 0f81b33 S5P: Rename GPIO definitions
 0c6254b EXYNOS5: Add gpio pin numbering feature
 5a35ef9 CONFIG: EXYNOS5: Enable silent console
 6083f4f S5P: Serial: Add fdt support to driver
 2f78e0f EXYNOS5: FDT: Add serial device node values
 5b85902 EXYNOS5: FDT: Add compatible strings for Serial
 6402856 exynos: dts: Use 50MHz SPI flash speed on snow
 1a6900e EXYNOS: SPL: Add a custom spi copy function
 27530a7 EXYNOS: SPI: Support word transfers
 7f8ba96 EXYNOS: SPI: Minimise access to SPI FIFO level
 149742a EXYNOS: SPI: Support a delay after deactivate
 f3d8caf EXYNOS: Export timer_get_us() to get microsecond timer
 1aaa266 EXYNOS: SPI: Support SPI_PREAMBLE mode
 2752d08 SPI: Add support for preamble bytes
 279a5cb exynos: Enable mmc for snow
 a6280ba COMMON: MMC: Command to support EMMC booting and to resize
 EMMC boot partition
 19425ea SMDK5250: Enable EMMC booting
 5253ae0 MMC: APIs to support resize of EMMC boot partition
 15bb05e SMDK5250: Initialise and Enable DWMMC, support FDT and non-FDT
 eeef540 EXYNOS5: DWMMC: Initialise the local variable to avoid unwanted 
 results.
 a4d8bf2 EXYNOS5: DWMMC: Added FDT support for DWMMC
 71b87c4 DWMMC: Initialise dwmci and resolve EMMC read write issues
 97c6565 EXYNOS5: FDT: Add DWMMC device node data
 ec5fb8b FDT: Add compatible string for DWMMC
 e7c528b EXYNOS5: I2C: Add FDT and non-FDT support for I2C

 Regards,
 Simon


  arch/arm/cpu/armv7/exynos/pinmux.c  |  150 --
  arch/arm/include/asm/arch-exynos/cpu.h  |   10 +-
  arch/arm/include/asm/arch-exynos/gpio.h |  452 
 +++
  board/samsung/smdk5250/smdk5250.c   |   24 +-
  drivers/gpio/s5p_gpio.c |   42 +++
  include/configs/exynos5250-dt.h |1 +
  6 files changed, 522 insertions(+), 157 deletions(-)

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4 V4] CONFIG: EXYNOS5: Enable silent console

2013-05-12 Thread Rajeshwari Birje
Hi Simon,

Thank you for reviewing the patches.
Will soon send a patch to add the serial FDT nodes to snow as well.

Regards,
Rajeshwari Shinde.
On Sat, May 11, 2013 at 11:41 PM, Simon Glass s...@chromium.org wrote:
 On Tue, Apr 2, 2013 at 12:46 AM, Rajeshwari Shinde
 rajeshwar...@samsung.com wrote:
 This patch enables CONFIG_SILENT_CONSOLE for EXYNOS5.

 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 Acked-by: Simon Glass s...@chromium.org
 ---
 Changes in V2:
 - None
 Changes in V3:
 - None
 Changes in V4:
 - None
  include/configs/exynos5250-dt.h |2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)

 Tested on snow, with a change to add the serial console info to the
 device tree. Console works correctly and silent mode can be selected
 from FDT as expected.

 Tested-by: Simon Glass s...@chromium.org

 Rajeshwari, please could you send a patch to add the serial FDT nodes
 to snow also?

 Regards,
 Simon
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] EXYNOS: Export timer_get_us() to get microsecond timer

2013-05-12 Thread Rajeshwari Birje
Hi Simon,

Thank you for review comments,

On Sat, May 11, 2013 at 8:38 PM, Simon Glass s...@chromium.org wrote:
 On Fri, Mar 22, 2013 at 6:45 PM, Simon Glass s...@chromium.org wrote:
 Hi Rajeshwari,

 On Fri, Mar 22, 2013 at 5:28 AM, Rajeshwari Shinde
 rajeshwar...@samsung.com wrote:
 This function, if implemented by the board, provides a microsecond
 timer. The granularity may be larger than 1us if hardware does not
 support this.

 Signed-off-by: Simon Glass s...@chromium.org
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 ---
  include/common.h |8 
  1 files changed, 8 insertions(+), 0 deletions(-)

 diff --git a/include/common.h b/include/common.h
 index 4ad17ea..0c21edc 100644
 --- a/include/common.h
 +++ b/include/common.h
 @@ -558,6 +558,14 @@ void ddr_enable_ecc(unsigned int dram_size);
  #endif
  #endif

 +#if defined CONFIG_EXYNOS5

 I don't think we need the #ifdef. If some boards don't have then that is OK.

 Further to this, I suppose we can always remove the #ifdef when other
 boards define the function. So:
Will remove the #ifdef and resend the patch soon.

 Acked-by: Simon Glass s...@chromium.org
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot

-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/4] EXYNOS: Convert Assembly code to c and make it common.

2013-05-09 Thread Rajeshwari Birje
Hi Minkyu Kang,

Do let me know if any comments on this patch set.

Regards,
Rajeshwari Shinde.


 On Thu, Apr 25, 2013 at 11:27 AM, Rajeshwari Shinde
 rajeshwar...@samsung.com wrote:
 Convert the assembly code in board/samsung to c and move the same to 
 arch/arm.
 lds file made common across SMDKV310, Origen and SMDK5250.
 Add the power reset and exit wakeup api for exynos.
 Initialise GPIO for uart in Origen and SMDK5250 using pinmux.

 Rajeshwari Shinde (4):
   EXYNOS: Add API for power reset and exit wakeup
   EXYNOS: LDS file move to common
   EXYNOS4210: Configure GPIO for uart
   EXYNOS: Move files from board/samsung to arch/arm.

  arch/arm/cpu/armv7/exynos/Makefile |   14 +-
  .../arm/cpu/armv7/exynos}/clock_init.h |0
  arch/arm/cpu/armv7/exynos/clock_init_exynos4.c |   63 +++
  .../arm/cpu/armv7/exynos/clock_init_exynos5.c  |   26 +-
  arch/arm/cpu/armv7/exynos/common_setup.h   |   44 ++
  .../arm/cpu/armv7/exynos}/dmc_common.c |7 +-
  .../arm/cpu/armv7/exynos}/dmc_init_ddr3.c  |   17 +-
  arch/arm/cpu/armv7/exynos/dmc_init_exynos4.c   |  294 
  .../arm/cpu/armv7/exynos/exynos4_setup.h   |   72 +++-
  .../arm/cpu/armv7/exynos/exynos5_setup.h   |   53 +--
  arch/arm/cpu/armv7/exynos/lowlevel_init.c  |   72 +++
  arch/arm/cpu/armv7/exynos/pinmux.c |   40 ++
  arch/arm/cpu/armv7/exynos/power.c  |   50 ++
  .../arm/cpu/armv7/exynos}/spl_boot.c   |   90 +++-
  .../arm/cpu/armv7/exynos}/tzpc_init.c  |   17 +-
  arch/arm/include/asm/arch-exynos/power.h   |   10 +
  arch/arm/include/asm/arch-exynos/spl.h |1 +
  arch/arm/include/asm/arch-exynos/tzpc.h|   28 ++
  .../exynos-uboot-spl.lds}  |0
  board/samsung/origen/Makefile  |7 -
  board/samsung/origen/lowlevel_init.S   |  397 -
  board/samsung/origen/mem_setup.S   |  421 --
  board/samsung/origen/mmc_boot.c|   58 ---
  board/samsung/origen/origen.c  |   46 ++
  board/samsung/smdk5250/Makefile|9 -
  board/samsung/smdk5250/lowlevel_init.S |2 +
  board/samsung/smdkv310/Makefile|   10 +-
  board/samsung/smdkv310/lowlevel_init.S |  470 
 
  board/samsung/smdkv310/mem_setup.S |  365 ---
  board/samsung/smdkv310/mmc_boot.c  |   60 ---
  board/samsung/smdkv310/smdkv310.c  |   44 ++
  include/configs/exynos5250-dt.h|   14 +-
  include/configs/origen.h   |   10 +-
  include/configs/smdkv310.h |9 +-
  spl/Makefile   |4 +
  35 files changed, 921 insertions(+), 1903 deletions(-)
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/clock_init.h 
 (100%)
  create mode 100644 arch/arm/cpu/armv7/exynos/clock_init_exynos4.c
  rename board/samsung/smdk5250/clock_init.c = 
 arch/arm/cpu/armv7/exynos/clock_init_exynos5.c (97%)
  create mode 100644 arch/arm/cpu/armv7/exynos/common_setup.h
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/dmc_common.c 
 (97%)
  rename {board/samsung/smdk5250 = 
 arch/arm/cpu/armv7/exynos}/dmc_init_ddr3.c (96%)
  create mode 100644 arch/arm/cpu/armv7/exynos/dmc_init_exynos4.c
  rename board/samsung/origen/origen_setup.h = 
 arch/arm/cpu/armv7/exynos/exynos4_setup.h (89%)
  rename board/samsung/smdk5250/setup.h = 
 arch/arm/cpu/armv7/exynos/exynos5_setup.h (93%)
  create mode 100644 arch/arm/cpu/armv7/exynos/lowlevel_init.c
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/spl_boot.c 
 (61%)
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/tzpc_init.c 
 (81%)
  rename board/samsung/{smdk5250/smdk5250-uboot-spl.lds = 
 common/exynos-uboot-spl.lds} (100%)
  delete mode 100644 board/samsung/origen/lowlevel_init.S
  delete mode 100644 board/samsung/origen/mem_setup.S
  delete mode 100644 board/samsung/origen/mmc_boot.c
  delete mode 100644 board/samsung/smdkv310/lowlevel_init.S
  delete mode 100644 board/samsung/smdkv310/mem_setup.S
  delete mode 100644 board/samsung/smdkv310/mmc_boot.c

 --
 1.7.4.4

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



 --
 Regards,
 Rajeshwari Shinde



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/4] EXYNOS: Convert Assembly code to c and make it common.

2013-05-02 Thread Rajeshwari Birje
Hi Minkyu Kang,

Do let me know if any comments on this patch set.

Regards,
Rajeshwari Shinde.


On Thu, Apr 25, 2013 at 11:27 AM, Rajeshwari Shinde
rajeshwar...@samsung.com wrote:
 Convert the assembly code in board/samsung to c and move the same to arch/arm.
 lds file made common across SMDKV310, Origen and SMDK5250.
 Add the power reset and exit wakeup api for exynos.
 Initialise GPIO for uart in Origen and SMDK5250 using pinmux.

 Rajeshwari Shinde (4):
   EXYNOS: Add API for power reset and exit wakeup
   EXYNOS: LDS file move to common
   EXYNOS4210: Configure GPIO for uart
   EXYNOS: Move files from board/samsung to arch/arm.

  arch/arm/cpu/armv7/exynos/Makefile |   14 +-
  .../arm/cpu/armv7/exynos}/clock_init.h |0
  arch/arm/cpu/armv7/exynos/clock_init_exynos4.c |   63 +++
  .../arm/cpu/armv7/exynos/clock_init_exynos5.c  |   26 +-
  arch/arm/cpu/armv7/exynos/common_setup.h   |   44 ++
  .../arm/cpu/armv7/exynos}/dmc_common.c |7 +-
  .../arm/cpu/armv7/exynos}/dmc_init_ddr3.c  |   17 +-
  arch/arm/cpu/armv7/exynos/dmc_init_exynos4.c   |  294 
  .../arm/cpu/armv7/exynos/exynos4_setup.h   |   72 +++-
  .../arm/cpu/armv7/exynos/exynos5_setup.h   |   53 +--
  arch/arm/cpu/armv7/exynos/lowlevel_init.c  |   72 +++
  arch/arm/cpu/armv7/exynos/pinmux.c |   40 ++
  arch/arm/cpu/armv7/exynos/power.c  |   50 ++
  .../arm/cpu/armv7/exynos}/spl_boot.c   |   90 +++-
  .../arm/cpu/armv7/exynos}/tzpc_init.c  |   17 +-
  arch/arm/include/asm/arch-exynos/power.h   |   10 +
  arch/arm/include/asm/arch-exynos/spl.h |1 +
  arch/arm/include/asm/arch-exynos/tzpc.h|   28 ++
  .../exynos-uboot-spl.lds}  |0
  board/samsung/origen/Makefile  |7 -
  board/samsung/origen/lowlevel_init.S   |  397 -
  board/samsung/origen/mem_setup.S   |  421 --
  board/samsung/origen/mmc_boot.c|   58 ---
  board/samsung/origen/origen.c  |   46 ++
  board/samsung/smdk5250/Makefile|9 -
  board/samsung/smdk5250/lowlevel_init.S |2 +
  board/samsung/smdkv310/Makefile|   10 +-
  board/samsung/smdkv310/lowlevel_init.S |  470 
 
  board/samsung/smdkv310/mem_setup.S |  365 ---
  board/samsung/smdkv310/mmc_boot.c  |   60 ---
  board/samsung/smdkv310/smdkv310.c  |   44 ++
  include/configs/exynos5250-dt.h|   14 +-
  include/configs/origen.h   |   10 +-
  include/configs/smdkv310.h |9 +-
  spl/Makefile   |4 +
  35 files changed, 921 insertions(+), 1903 deletions(-)
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/clock_init.h 
 (100%)
  create mode 100644 arch/arm/cpu/armv7/exynos/clock_init_exynos4.c
  rename board/samsung/smdk5250/clock_init.c = 
 arch/arm/cpu/armv7/exynos/clock_init_exynos5.c (97%)
  create mode 100644 arch/arm/cpu/armv7/exynos/common_setup.h
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/dmc_common.c 
 (97%)
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/dmc_init_ddr3.c 
 (96%)
  create mode 100644 arch/arm/cpu/armv7/exynos/dmc_init_exynos4.c
  rename board/samsung/origen/origen_setup.h = 
 arch/arm/cpu/armv7/exynos/exynos4_setup.h (89%)
  rename board/samsung/smdk5250/setup.h = 
 arch/arm/cpu/armv7/exynos/exynos5_setup.h (93%)
  create mode 100644 arch/arm/cpu/armv7/exynos/lowlevel_init.c
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/spl_boot.c (61%)
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/tzpc_init.c 
 (81%)
  rename board/samsung/{smdk5250/smdk5250-uboot-spl.lds = 
 common/exynos-uboot-spl.lds} (100%)
  delete mode 100644 board/samsung/origen/lowlevel_init.S
  delete mode 100644 board/samsung/origen/mem_setup.S
  delete mode 100644 board/samsung/origen/mmc_boot.c
  delete mode 100644 board/samsung/smdkv310/lowlevel_init.S
  delete mode 100644 board/samsung/smdkv310/mem_setup.S
  delete mode 100644 board/samsung/smdkv310/mmc_boot.c

 --
 1.7.4.4

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3 V5] EXYNOS5: Add gpio pin numbering feature

2013-04-16 Thread Rajeshwari Birje
Hi Minkyu Kang,

Please do let me know if any comments on these patchset.

Regards,
Rajeshwari Shinde

On Wed, Apr 3, 2013 at 5:24 PM, Rajeshwari Shinde
rajeshwar...@samsung.com wrote:
 This patch adds support for gpio pin numbering support on
 EXYNOS5250
 To have consistent 0..n-1 GPIO numbering the banks are divided
 into different parts where ever they have holes in them.

 Signed-off-by: Leela Krishna Amudala l.kris...@samsung.com
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 ---
 Changes in V2:
 - none.
 Changes in V3:
 - none.
 Changes in V4:
 - To have consistent 0..n-1 GPIO numbering the banks are divided
 into different parts where ever they have holes in them.
 - Combined previous patch 1 and 2 into single patch.
 Changes in V5:
 - Removed Exynos5 specific code in gpio driver api to
 get bank.
 - Added #define HAVE_GENERIC_GPIO in config file
 to remove conditinal CPU check in gpio driver.
  arch/arm/cpu/armv7/exynos/pinmux.c  |  150 --
  arch/arm/include/asm/arch-exynos/cpu.h  |   10 +-
  arch/arm/include/asm/arch-exynos/gpio.h |  452 
 +++
  board/samsung/smdk5250/smdk5250.c   |   24 +-
  drivers/gpio/s5p_gpio.c |   42 +++
  include/configs/exynos5250-dt.h |1 +
  6 files changed, 522 insertions(+), 157 deletions(-)

 diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c 
 b/arch/arm/cpu/armv7/exynos/pinmux.c
 index bd499b4..2fb5963 100644
 --- a/arch/arm/cpu/armv7/exynos/pinmux.c
 +++ b/arch/arm/cpu/armv7/exynos/pinmux.c
 @@ -29,89 +29,77 @@

  static void exynos5_uart_config(int peripheral)
  {
 -   struct exynos5_gpio_part1 *gpio1 =
 -   (struct exynos5_gpio_part1 *) samsung_get_base_gpio_part1();
 -   struct s5p_gpio_bank *bank;
 int i, start, count;

 switch (peripheral) {
 case PERIPH_ID_UART0:
 -   bank = gpio1-a0;
 -   start = 0;
 +   start = EXYNOS5_GPIO_A00;
 count = 4;
 break;
 case PERIPH_ID_UART1:
 -   bank = gpio1-d0;
 -   start = 0;
 +   start = EXYNOS5_GPIO_D00;
 count = 4;
 break;
 case PERIPH_ID_UART2:
 -   bank = gpio1-a1;
 -   start = 0;
 +   start = EXYNOS5_GPIO_A10;
 count = 4;
 break;
 case PERIPH_ID_UART3:
 -   bank = gpio1-a1;
 -   start = 4;
 +   start = EXYNOS5_GPIO_A14;
 count = 2;
 break;
 }
 for (i = start; i  start + count; i++) {
 -   s5p_gpio_set_pull(bank, i, GPIO_PULL_NONE);
 -   s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2));
 +   gpio_set_pull(i, GPIO_PULL_NONE);
 +   gpio_cfg_pin(i, GPIO_FUNC(0x2));
 }
  }

  static int exynos5_mmc_config(int peripheral, int flags)
  {
 -   struct exynos5_gpio_part1 *gpio1 =
 -   (struct exynos5_gpio_part1 *) samsung_get_base_gpio_part1();
 -   struct s5p_gpio_bank *bank, *bank_ext;
 -   int i, start = 0, gpio_func = 0;
 +   int i, start, start_ext, gpio_func = 0;

 switch (peripheral) {
 case PERIPH_ID_SDMMC0:
 -   bank = gpio1-c0;
 -   bank_ext = gpio1-c1;
 -   start = 0;
 +   start = EXYNOS5_GPIO_C00;
 +   start_ext = EXYNOS5_GPIO_C10;
 gpio_func = GPIO_FUNC(0x2);
 break;
 case PERIPH_ID_SDMMC1:
 -   bank = gpio1-c2;
 -   bank_ext = NULL;
 +   start = EXYNOS5_GPIO_C20;
 +   start_ext = 0;
 break;
 case PERIPH_ID_SDMMC2:
 -   bank = gpio1-c3;
 -   bank_ext = gpio1-c4;
 -   start = 3;
 +   start = EXYNOS5_GPIO_C30;
 +   start_ext = EXYNOS5_GPIO_C43;
 gpio_func = GPIO_FUNC(0x3);
 break;
 case PERIPH_ID_SDMMC3:
 -   bank = gpio1-c4;
 -   bank_ext = NULL;
 +   start = EXYNOS5_GPIO_C40;
 +   start_ext = 0;
 break;
 }
 -   if ((flags  PINMUX_FLAG_8BIT_MODE)  !bank_ext) {
 +   if ((flags  PINMUX_FLAG_8BIT_MODE)  !start_ext) {
 debug(SDMMC device %d does not support 8bit mode,
 peripheral);
 return -1;
 }
 if (flags  PINMUX_FLAG_8BIT_MODE) {
 -   for (i = start; i = (start + 3); i++) {
 -   s5p_gpio_cfg_pin(bank_ext, i, gpio_func);
 -   s5p_gpio_set_pull(bank_ext, i, GPIO_PULL_UP);
 -   s5p_gpio_set_drv(bank_ext, i, GPIO_DRV_4X);
 +   for (i = start_ext; i = (start_ext + 3); i++) {
 +   gpio_cfg_pin(i, 

Re: [U-Boot] [PATCH v2 1/9] pmic:max77686: add function to set voltage and mode

2013-04-07 Thread Rajeshwari Birje
Hi Piotr,

I am not able to find any buck at address  0xff in user manual.
Other than that I am fine with it.

Acked-by:Rajeshwari Shinde rajeshwar...@samsung.com

On Thu, Apr 4, 2013 at 4:43 PM, Piotr Wilczek p.wilc...@samsung.com wrote:
 This patch add new functions to pmic max77686 to set voltage and mode.

 Signed-off-by: Piotr Wilczek p.wilc...@samsung.com
 Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
 CC: Minkyu Kang mk7.k...@samsung.com
 CC: Rajeshwari Shinde rajeshwar...@samsung.com

 ---
 Changes in v2:
 - changed printf to debug

  drivers/power/pmic/pmic_max77686.c |  186 
 
  include/power/max77686_pmic.h  |   11 +++
  2 files changed, 197 insertions(+)

 diff --git a/drivers/power/pmic/pmic_max77686.c 
 b/drivers/power/pmic/pmic_max77686.c
 index 7fcb4c0..6b7a1cd 100644
 --- a/drivers/power/pmic/pmic_max77686.c
 +++ b/drivers/power/pmic/pmic_max77686.c
 @@ -30,6 +30,192 @@

  DECLARE_GLOBAL_DATA_PTR;

 +static const char max77686_buck_addr[] = {
 +   0xff, 0x10, 0x12, 0x1c, 0x26, 0x30, 0x32, 0x34, 0x36, 0x38
 +};
 +
 +static unsigned int max77686_ldo_volt2hex(int ldo, ulong uV)
 +{
 +   unsigned int hex = 0;
 +   const unsigned int max_hex = 0x3f;
 +
 +   switch (ldo) {
 +   case 1:
 +   case 2:
 +   case 6:
 +   case 7:
 +   case 8:
 +   case 15:
 +   hex = (uV - 80) / 25000;
 +   break;
 +   default:
 +   hex = (uV - 80) / 5;
 +   }
 +
 +   if (0 = hex  hex = max_hex)
 +   return hex;
 +
 +   debug(%s: %ld is wrong voltage value for LDO%d\n, __func__, uV, 
 ldo);
 +   return 0;
 +}
 +
 +int max77686_set_ldo_voltage(struct pmic *p, int ldo, ulong uV)
 +{
 +   unsigned int val, ret, hex, adr, mask;
 +
 +   if (ldo  1  26  ldo) {
 +   printf(%s: %d is wrong ldo number\n, __func__, ldo);
 +   return -1;
 +   }
 +
 +   adr = MAX77686_REG_PMIC_LDO1CTRL1 + ldo - 1;
 +   mask = 0x3f;
 +   hex = max77686_ldo_volt2hex(ldo, uV);
 +
 +   if (!hex)
 +   return -1;
 +
 +   ret = pmic_reg_read(p, adr, val);
 +   val = ~mask;
 +   val |= hex;
 +   ret |= pmic_reg_write(p, adr, val);
 +
 +   return ret;
 +}
 +
 +int max77686_set_ldo_mode(struct pmic *p, int ldo, char opmode)
 +{
 +   unsigned int val, ret, mask, adr, mode;
 +
 +   if (ldo  1  26  ldo) {
 +   printf(%s: %d is wrong ldo number\n, __func__, ldo);
 +   return -1;
 +   }
 +
 +   adr = MAX77686_REG_PMIC_LDO1CTRL1 + ldo - 1;
 +
 +   /* mask */
 +   mask = 0xc0;
 +
 +   /* mode */
 +   if (opmode == OPMODE_OFF) {
 +   mode = 0x00;
 +   } else if (opmode == OPMODE_STANDBY) {
 +   switch (ldo) {
 +   case 2:
 +   case 6:
 +   case 7:
 +   case 8:
 +   case 10:
 +   case 11:
 +   case 12:
 +   case 14:
 +   case 15:
 +   case 16:
 +   mode = 0x40;
 +   break;
 +   default:
 +   mode = 0xff;
 +   }
 +   } else if (opmode == OPMODE_LPM) {
 +   mode = 0x80;
 +   } else if (opmode == OPMODE_ON) {
 +   mode = 0xc0;
 +   } else {
 +   mode = 0xff;
 +   }
 +
 +   if (mode == 0xff) {
 +   printf(%s: %d is not supported on LDO%d\n,
 +   __func__, opmode, ldo);
 +   return -1;
 +   }
 +
 +   ret = pmic_reg_read(p, adr, val);
 +   val = ~mask;
 +   val |= mode;
 +   ret |= pmic_reg_write(p, adr, val);
 +
 +   return ret;
 +}
 +
 +int max77686_set_buck_mode(struct pmic *p, int buck, char opmode)
 +{
 +   unsigned int val, ret, mask, adr, size, mode;
 +
 +   size = sizeof(max77686_buck_addr) / sizeof(*max77686_buck_addr);
 +   if (buck = size) {
 +   printf(%s: %d is wrong buck number\n, __func__, buck);
 +   return -1;
 +   }
 +
 +   adr = max77686_buck_addr[buck];
 +
 +   /* mask */
 +   switch (buck) {
 +   case 2:
 +   case 3:
 +   case 4:
 +   mask = 0x30;
 +   break;
 +   default:
 +   mask = 0x03;
 +   }
 +
 +   /* mode */
 +   if (opmode == OPMODE_OFF) {
 +   mode = 0x00;
 +   } else if (opmode == OPMODE_STANDBY) {
 +   switch (buck) {
 +   case 1:
 +   mode = 0x01;
 +   break;
 +   case 2:
 +   case 3:
 +   case 4:
 +   mode = 0x10;
 +   break;
 +   default:
 +   mode = 0xff;
 +   }
 +   } else if (opmode == OPMODE_LPM) {
 +   switch (buck) {
 +   case 2:
 +

Re: [U-Boot] [PATCH 2/6 V4] Sound: MAX98095: Add the driver for codec

2013-04-05 Thread Rajeshwari Birje
Hi Prem S,

We initialise MAX98095 using device tree, if you don't have a device
tree support u need to have a  asm/arch/sound.h
which will initialise all values like sample rate, codec type, etc..
Actually in u-boot we have added audio support to play a beep sound.
You can have look at drivers/sound/sound.c
To test the same you can have look at common/cmd_sound.c, where we
have 2 commands
sound init and sound play.

Hope this information will help you.

-- 
Regards,
Rajeshwari Shinde

On Fri, Apr 5, 2013 at 4:41 PM, prem s prem...@gmail.com wrote:
 Hi all,

 I am working on ODROID PC Exynos-4 Board (Cortex-A9). In that board i am
 working MAX98089 Audio codec.

 How to initialize this audio codec and how to test this one in UBOOT level.

 Can you please help me on this.

 Thanks

 Prem V.

 On Sat, Feb 16, 2013 at 9:51 AM, Simon Glass s...@chromium.org wrote:

 On Thu, Feb 14, 2013 at 9:46 PM, Rajeshwari Shinde
 rajeshwar...@samsung.com wrote:
  This patch adds the driver for codec MAX98095 required by Snow
  Board
 
  Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com

 Acked-by: Simon Glass s...@chromium.org
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot


 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Warning messages in latest u-boot-samsung

2013-04-02 Thread Rajeshwari Birje
Hi Minkyu Kang,

I am getting the following warning messages in the latest  u-boot-samsung tree.

/usr/local/arm/arm-2011.09/bin/arm-none-eabi-ld: warning:
/usr/local/arm/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/libgcc.a(bpabi.o)
uses variable-size enums yet the output is to use 32-bit enums; use of
enum values across objects may fail
/usr/local/arm/arm-2011.09/bin/arm-none-eabi-ld: warning:
/usr/local/arm/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/libgcc.a(_divdi3.o)
uses variable-size enums yet the output is to use 32-bit enums; use of
enum values across objects may fail
/usr/local/arm/arm-2011.09/bin/arm-none-eabi-ld: warning:
/usr/local/arm/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/libgcc.a(_udivdi3.o)
uses variable-size enums yet the output is to use 32-bit enums; use of
enum values across objects may fail

-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Warning messages in latest u-boot-samsung

2013-04-02 Thread Rajeshwari Birje
Hi Albert,

I am building for Samsung SMDK5250 and toolchain I use is arm-2011.09.
Is it the issue with my toolchain.

Regards,
Rajeshwari Shinde

On Tue, Apr 2, 2013 at 1:30 PM, Albert ARIBAUD
albert.u.b...@aribaud.net wrote:
 Hi Rajeshwari,

 On Tue, 2 Apr 2013 11:58:42 +0530, Rajeshwari Birje
 rajeshwari.bi...@gmail.com wrote:

 Hi Minkyu Kang,

 I am getting the following warning messages in the latest  u-boot-samsung 
 tree.

 /usr/local/arm/arm-2011.09/bin/arm-none-eabi-ld: warning:
 /usr/local/arm/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/libgcc.a(bpabi.o)
 uses variable-size enums yet the output is to use 32-bit enums; use of
 enum values across objects may fail
 /usr/local/arm/arm-2011.09/bin/arm-none-eabi-ld: warning:
 /usr/local/arm/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/libgcc.a(_divdi3.o)
 uses variable-size enums yet the output is to use 32-bit enums; use of
 enum values across objects may fail
 /usr/local/arm/arm-2011.09/bin/arm-none-eabi-ld: warning:
 /usr/local/arm/arm-2011.09/bin/../lib/gcc/arm-none-eabi/4.6.1/libgcc.a(_udivdi3.o)
 uses variable-size enums yet the output is to use 32-bit enums; use of
 enum values across objects may fail

 Exactly which target are you building and with which toolchain?

 Amicalement,
 --
 Albert.



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Warning messages in latest u-boot-samsung

2013-04-02 Thread Rajeshwari Birje
Hi Albert and Minkyu

Thank you for your inputs
Will recheck my compiler.

Thanks and Regards,
Rajeshwari Shinde.

On Tue, Apr 2, 2013 at 3:24 PM, Minkyu Kang mk7.k...@samsung.com wrote:

 On 02/04/13 18:50, Albert ARIBAUD wrote:
  Hi Rajeshwari,
 
  (pleale avoid top-posting, and quote only what is necessary to
  understand your answer)
 
  On Tue, 2 Apr 2013 15:00:55 +0530, Rajeshwari Birje
  rajeshwari.bi...@gmail.com wrote:
 
  Hi Albert,
 
  I am building for Samsung SMDK5250 and toolchain I use is arm-2011.09.
  Is it the issue with my toolchain.
 
  Apparently it is, as ARM gcc from ELDK 5.3 or Ubuntu give no warning
  for smdk5250 on u-boot-samsung/master.
 
  Regards,
  Rajeshwari Shinde
 
  Amicalement,
 

 Tested with eldk-5.2,
 I've got no warning or error for SMDK5250.

 Thanks,
 Minkyu Kang.




--
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3 V4] EXYNOS5: Add gpio pin numbering feature

2013-04-01 Thread Rajeshwari Birje
Hi Minkyu Kang,

Thank you for comments.

On Mon, Apr 1, 2013 at 5:27 PM, Minkyu Kang mk7.k...@samsung.com wrote:
 On 21/03/13 20:33, Rajeshwari Shinde wrote:
 This patch adds support for gpio pin numbering support on
 EXYNOS5250
 To have consistent 0..n-1 GPIO numbering the banks are divided
 into different parts where ever they have holes in them.

 Signed-off-by: Leela Krishna Amudala l.kris...@samsung.com
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 ---
 Changes in V2:
 - none.
 Changes in V3:
 - none.
 Changes in V4:
   - To have consistent 0..n-1 GPIO numbering the banks are divided
   into different parts where ever they have holes in them.
   - Combined previous patch 1 and 2 into single patch.
  arch/arm/cpu/armv7/exynos/pinmux.c  |  148 +---
  arch/arm/include/asm/arch-exynos/cpu.h  |   10 +-
  arch/arm/include/asm/arch-exynos/gpio.h |  376 
 ++-
  board/samsung/smdk5250/smdk5250.c   |   24 +--
  drivers/gpio/s5p_gpio.c |   65 ++-
  5 files changed, 508 insertions(+), 115 deletions(-)

 diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c
 index 656bf4a..1b882cb 100644
 --- a/drivers/gpio/s5p_gpio.c
 +++ b/drivers/gpio/s5p_gpio.c
 @@ -36,6 +36,27 @@
  #define RATE_MASK(x) (0x1  (x + 16))
  #define RATE_SET(x)  (0x1  (x + 16))

 +
 +struct gpio_info {
 + unsigned int reg_addr;  /* Address of register for this part */
 + unsigned int max_gpio;  /* Maximum GPIO in this part */
 +};
 +
 +#ifdef CONFIG_EXYNOS5

 I think, this ifdef is unnecessary.
I had put this #ifdef as EXYNOS4 will also have a gpio_data structure.

 +static const struct gpio_info gpio_data[EXYNOS5_GPIO_NUM_PARTS] = {

 maybe it should be exynos5_gpio_data?
No kept it as gpio_data as it would b easy to call the same from
s5p_gpio_get_bank function and exynos4 will also have a separate
structure.

 + { EXYNOS5_GPIO_PART1_BASE, EXYNOS5_GPIO_MAX_PORT_PART_1 },
 + { EXYNOS5_GPIO_PART2_BASE, EXYNOS5_GPIO_MAX_PORT_PART_2 },
 + { EXYNOS5_GPIO_PART3_BASE, EXYNOS5_GPIO_MAX_PORT_PART_3 },
 + { EXYNOS5_GPIO_PART4_BASE, EXYNOS5_GPIO_MAX_PORT_PART_4 },
 + { EXYNOS5_GPIO_PART5_BASE, EXYNOS5_GPIO_MAX_PORT_PART_5 },
 + { EXYNOS5_GPIO_PART6_BASE, EXYNOS5_GPIO_MAX_PORT_PART_6 },
 + { EXYNOS5_GPIO_PART7_BASE, EXYNOS5_GPIO_MAX_PORT_PART_7 },
 + { EXYNOS5_GPIO_PART8_BASE, EXYNOS5_GPIO_MAX_PORT },
 +};
 +
 +#define HAVE_GENERIC_GPIO
 +#endif
 +
  void s5p_gpio_cfg_pin(struct s5p_gpio_bank *bank, int gpio, int cfg)
  {
   unsigned int value;
 @@ -141,7 +162,30 @@ void s5p_gpio_set_rate(struct s5p_gpio_bank *bank, int 
 gpio, int mode)

   writel(value, bank-drv);
  }
 -
 +#ifdef HAVE_GENERIC_GPIO
 +static struct s5p_gpio_bank *s5p_gpio_get_bank(unsigned int gpio)

 please consider exynos4 also.
Yes will update the same for exynos4 and send as soon as possible.

 +{
 + const struct gpio_info *data;
 + unsigned int upto;
 + int i;
 +
 + for (i = upto = 0, data = gpio_data; i  EXYNOS5_GPIO_NUM_PARTS;
 + i++, upto = data-max_gpio, data++) {
 + debug(i=%d, upto=%d\n, i, upto);
 + if (gpio  data-max_gpio) {
 + struct s5p_gpio_bank *bank;
 + bank = (struct s5p_gpio_bank *)data-reg_addr;
 + bank += (gpio - upto) / GPIO_PER_BANK;
 + debug(   gpio=%d, bank=%p\n, gpio, bank);
 + return bank;
 + }
 + }
 +#ifndef CONFIG_SPL_BUILD
 + assert(gpio  EXYNOS5_GPIO_MAX_PORT);   /* ...which it will not be */
 +#endif
 + return NULL;
 +}
 +#else
  struct s5p_gpio_bank *s5p_gpio_get_bank(unsigned gpio)
  {
   int bank;
 @@ -151,6 +195,7 @@ struct s5p_gpio_bank *s5p_gpio_get_bank(unsigned gpio)
   bank *= sizeof(struct s5p_gpio_bank);
   return (struct s5p_gpio_bank *) (s5p_gpio_base(gpio) + bank);
  }
 +#endif

  int s5p_gpio_get_pin(unsigned gpio)
  {
 @@ -196,3 +241,21 @@ int gpio_set_value(unsigned gpio, int value)

   return 0;
  }
 +
 +void gpio_set_pull(int gpio, int mode)
 +{
 + s5p_gpio_set_pull(s5p_gpio_get_bank(gpio),
 + s5p_gpio_get_pin(gpio), mode);
 +}
 +
 +void gpio_set_drv(int gpio, int mode)
 +{
 + s5p_gpio_set_drv(s5p_gpio_get_bank(gpio),
 + s5p_gpio_get_pin(gpio), mode);
 +}
 +
 +void gpio_cfg_pin(int gpio, int cfg)
 +{
 + s5p_gpio_cfg_pin(s5p_gpio_get_bank(gpio),
 + s5p_gpio_get_pin(gpio), cfg);
 +}


 Thanks,
 Minkyu Kang.
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot

-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4 V3] EXYNOS5: FDT: Add compatible strings for Serial

2013-04-01 Thread Rajeshwari Birje
Hi Minkyu Kang,

Thank you for comment

On Fri, Mar 29, 2013 at 11:44 AM, Minkyu Kang mk7.k...@samsung.com wrote:
 Dear Rajeshwari Shinde,

 On 15/03/13 19:38, Rajeshwari Shinde wrote:
 Add required compatible information for s5p serial driver

 Signed-off-by: Abhilash Kesavan a.kesa...@samsung.com
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 Acked-by: Simon Glass s...@chromium.org
 ---
 Changes in V2:
 - Changed the compatible string to samsung,exynos4210-uart
 Chnages in V3:
   - Rebased on latest u-boot-samsung
  include/fdtdec.h |1 +
  lib/fdtdec.c |1 +
  2 files changed, 2 insertions(+), 0 deletions(-)

 diff --git a/include/fdtdec.h b/include/fdtdec.h
 index 6552942..9f9cb4f 100644
 --- a/include/fdtdec.h
 +++ b/include/fdtdec.h
 @@ -83,6 +83,7 @@ enum fdt_compat_id {
   COMPAT_SAMSUNG_EXYNOS_TMU,  /* Exynos TMU */
   COMPAT_MAXIM_MAX77686_PMIC, /* MAX77686 PMIC */
   COMPAT_MAXIM_98095_CODEC,   /* MAX98095 Codec */
 + COMPAT_SAMSUNG_EXYNOS5_SERIAL,  /* Exynos5 UART */

 Is it exynos5 only?
 I think, we can use it to all of exynos series.
Will correct the same to  COMPAT_SAMSUNG_EXYNOS_SERIAL and resend the patch.


   COMPAT_COUNT,
  };
 diff --git a/lib/fdtdec.c b/lib/fdtdec.c
 index 88f6b68..ee98e0e 100644
 --- a/lib/fdtdec.c
 +++ b/lib/fdtdec.c
 @@ -58,6 +58,7 @@ static const char * const compat_names[COMPAT_COUNT] = {
   COMPAT(SAMSUNG_EXYNOS_TMU, samsung,exynos-tmu),
   COMPAT(MAXIM_MAX77686_PMIC, maxim,max77686_pmic),
   COMPAT(MAXIM_98095_CODEC, maxim,max98095-codec),
 + COMPAT(SAMSUNG_EXYNOS5_SERIAL, samsung,exynos4210-uart),
  };

  const char *fdtdec_get_compatible(enum fdt_compat_id id)


 Thanks,
 Minkyu Kang.
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/4] power: Explicitly select pmic device's bus

2013-04-01 Thread Rajeshwari Birje
Hi Simon,

Just had one following comment

On Tue, Apr 2, 2013 at 5:34 AM, Simon Glass s...@chromium.org wrote:
 From: Aaron Durbin adur...@chromium.org

 The current pmic i2c code assumes the current i2c bus is
 the same as the pmic device's bus. There is nothing ensuring
 that to be true. Therefore, select the proper bus before performing
 a transaction.

 Signed-off-by: Aaron Durbin adur...@chromium.org
 Signed-off-by: Simon Glass s...@chromium.org
 Reviewed-by: Simon Glass s...@chromium.org
 ---
  drivers/power/power_i2c.c | 4 
  1 file changed, 4 insertions(+)

 diff --git a/drivers/power/power_i2c.c b/drivers/power/power_i2c.c
 index 3e5a784..ec9701e 100644
 --- a/drivers/power/power_i2c.c
 +++ b/drivers/power/power_i2c.c
 @@ -39,6 +39,8 @@ int pmic_reg_write(struct pmic *p, u32 reg, u32 val)
 if (check_reg(p, reg))
 return -1;

 +   I2C_SET_BUS(p-bus);
 +

Do we need to set I2C bus for each register read and write?
 switch (pmic_i2c_tx_num) {
 case 3:
 if (p-sensor_byte_order == PMIC_SENSOR_BYTE_ORDER_BIG) {
 @@ -82,6 +84,8 @@ int pmic_reg_read(struct pmic *p, u32 reg, u32 *val)
 if (check_reg(p, reg))
 return -1;

 +   I2C_SET_BUS(p-bus);
 +
 if (i2c_read(pmic_i2c_addr, reg, 1, buf, pmic_i2c_tx_num))
 return -1;

 --
 1.8.1.3

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot
-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] exynos5250: remove redundant SPI related configs

2013-03-26 Thread Rajeshwari Birje
Hi Inderpal Singh,

I observed even this defined twice can you please remove the same also
in your patch.
/* PMIC */
#define CONFIG_POWER
#define CONFIG_POWER_I2C
#define CONFIG_POWER_MAX77686

Regards,
Rajeshwari Shinde.

On Tue, Mar 26, 2013 at 3:07 PM, Inderpal Singh
inderpal.si...@linaro.org wrote:
 They have been defined once already. Hence remove the redundant definitions.

 Signed-off-by: Inderpal Singh inderpal.si...@linaro.org
 ---
  include/configs/exynos5250-dt.h |   21 -
  1 file changed, 21 deletions(-)

 diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h
 index 7308522..d5d8e3a 100644
 --- a/include/configs/exynos5250-dt.h
 +++ b/include/configs/exynos5250-dt.h
 @@ -267,27 +267,6 @@
  #define CONFIG_POWER_I2C
  #define CONFIG_POWER_MAX77686

 -/* SPI */
 -#define CONFIG_ENV_IS_IN_SPI_FLASH
 -#define CONFIG_SPI_FLASH
 -
 -#ifdef CONFIG_SPI_FLASH
 -#define CONFIG_EXYNOS_SPI
 -#define CONFIG_CMD_SF
 -#define CONFIG_CMD_SPI
 -#define CONFIG_SPI_FLASH_WINBOND
 -#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
 -#define CONFIG_SF_DEFAULT_SPEED5000
 -#define EXYNOS5_SPI_NUM_CONTROLLERS5
 -#endif
 -
 -#ifdef CONFIG_ENV_IS_IN_SPI_FLASH
 -#define CONFIG_ENV_SPI_MODESPI_MODE_0
 -#define CONFIG_ENV_SECT_SIZE   CONFIG_ENV_SIZE
 -#define CONFIG_ENV_SPI_BUS 1
 -#define CONFIG_ENV_SPI_MAX_HZ  5000
 -#endif
 -
  /* Ethernet Controllor Driver */
  #ifdef CONFIG_CMD_NET
  #define CONFIG_SMC911X
 --
 1.7.9.5

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Regards,
Rajeshwari Shinde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/3 V4] EXYNOS5: Add GPIO numbering feature

2013-03-25 Thread Rajeshwari Birje
Hi Minkyu Kang,

Please do review the patch set and do let me know if any comments.

Regards,
Rajeshwari Shinde

On Fri, Mar 22, 2013 at 3:43 AM, Simon Glass s...@chromium.org wrote:
 Hi Rajeshwari,

 On Thu, Mar 21, 2013 at 4:33 AM, Rajeshwari Shinde
 rajeshwar...@samsung.com wrote:
 Changes in V2:
 - Enabled CMD_GPIO as suggested by Simon Glass and
 supported same for EXYNOS5
 Changes in V3:
 - New patch added to rename S5P GPIO definitions to
 S5P_GPIO
 - GPIO Table added to calculate the base address
 of input gpio bank.
 Changes in V4:
 - To have consistent 0..n-1 GPIO numbering the banks are divided
 into different parts where ever they have holes in them.
 - Function and table to support gpio command moved to s5p-gpio driver
 - Rebased on latest u-boot-samsung tree

 Rajeshwari Shinde (3):
   EXYNOS5: Add gpio pin numbering feature
   S5P: Rename GPIO definitions
   EXYNOS5: GPIO: Enable GPIO Command for EXYNOS5

 I tested this on snow, using:

 # turn on backlight
 i2c dev 4; i2c mw 48 f 1; i2c mw 48 15 1; i2c md 48 0 20
 gpio set gpx30
 gpio set gpb20

 This seems to work fine.

 I also tested that the cros_ec keyboard works, using interrupt 182
 instead of 174) in the FDT:

 ec-interrupt = gpio 182 1;

 So it all looks good to me, thank you.

 Acked-by: Simon Glass s...@chromium.org
 Tested-by: Simon Glass s...@chromium.org


  arch/arm/cpu/armv7/exynos/pinmux.c   |  206 +++-
  arch/arm/include/asm/arch-exynos/cpu.h   |   10 +-
  arch/arm/include/asm/arch-exynos/gpio.h  |  410 
 --
  arch/arm/include/asm/arch-s5pc1xx/gpio.h |   26 +-
  board/samsung/goni/goni.c|4 +-
  board/samsung/origen/origen.c|8 +-
  board/samsung/smdk5250/smdk5250.c|   24 +--
  board/samsung/smdkc100/smdkc100.c|2 +-
  board/samsung/smdkv310/smdkv310.c|   10 +-
  board/samsung/trats/trats.c  |   16 +-
  board/samsung/universal_c210/universal.c |   36 ++--
  drivers/gpio/s5p_gpio.c  |  134 +-
  include/configs/exynos5250-dt.h  |1 +
  13 files changed, 669 insertions(+), 218 deletions(-)

 --
 1.7.4.4


 Regards,
 Simon
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] pmic:max77686: add function to set voltage and mode

2013-03-25 Thread Rajeshwari Birje
Hi Piotr Wilczek,

Nice idea to have a generic function.
Just have some minor comments.

On Mon, Mar 25, 2013 at 3:28 PM, Piotr Wilczek p.wilc...@samsung.com wrote:
 This patch add new functions to pmic max77686 to set voltage and mode.

 Signed-off-by: Piotr Wilczek p.wilc...@samsung.com
 Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
 CC: Minkyu Kang mk7.k...@samsung.com
 CC: Rajeshwari Shinde rajeshwar...@samsung.com
 ---
  drivers/power/pmic/pmic_max77686.c |  186 
 
  include/power/max77686_pmic.h  |   11 +++
  2 files changed, 197 insertions(+)

 diff --git a/drivers/power/pmic/pmic_max77686.c 
 b/drivers/power/pmic/pmic_max77686.c
 index 7fcb4c0..3895bc5 100644
 --- a/drivers/power/pmic/pmic_max77686.c
 +++ b/drivers/power/pmic/pmic_max77686.c
 @@ -30,6 +30,192 @@

  DECLARE_GLOBAL_DATA_PTR;

 +static const char max77686_buck_addr[] = {
 +   0xff, 0x10, 0x12, 0x1c, 0x26, 0x30, 0x32, 0x34, 0x36, 0x38
 +};
0xff is for?
I guess this is a array of Buck control 1 registers so we can be
specific in naming the same instead of just buck address.
Any way we have address for them defined as a enum in
include/power/max77686_pmic.h cant we use the same?
 +
 +static unsigned int max77686_ldo_volt2hex(int ldo, ulong uV)
 +{
 +   unsigned int hex = 0;
 +   const unsigned int MAX_HEX = 0x3f;
Any specific reason for this variable to be in capital..
 +
 +   switch (ldo) {
 +   case 1:
 +   case 2:
 +   case 6:
 +   case 7:
 +   case 8:
 +   case 15:
 +   hex = (uV - 80) / 25000;
 +   break;
 +   default:
 +   hex = (uV - 80) / 5;
 +   }
 +
 +   if (0 = hex  hex = MAX_HEX)
 +   return hex;
 +
 +   printf(%s: %ld is wrong voltage value for LDO%d\n, __func__, uV, 
 ldo);
Can we use debug instead of printf through out.
 +   return 0;
 +}
 +
 +int max77686_set_ldo_voltage(struct pmic *p, int ldo, ulong uV)
 +{
 +   unsigned int val, ret, hex, adr, mask;
 +
 +   if (ldo  1  26  ldo) {
 +   printf(%s: %d is wrong ldo number\n, __func__, ldo);
 +   return -1;
 +   }
 +
 +   adr = MAX77686_REG_PMIC_LDO1CTRL1 + ldo - 1;
 +   mask = 0x3f;
 +   hex = max77686_ldo_volt2hex(ldo, uV);
 +
 +   if (!hex)
 +   return -1;
 +
 +   ret = pmic_reg_read(p, adr, val);
 +   val = ~mask;
 +   val |= hex;
 +   ret |= pmic_reg_write(p, adr, val);
 +
 +   return ret;
 +}
 +
 +int max77686_set_ldo_mode(struct pmic *p, int ldo, char opmode)
 +{
 +   unsigned int val, ret, mask, adr, mode;
 +
 +   if (ldo  1  26  ldo) {
 +   printf(%s: %d is wrong ldo number\n, __func__, ldo);
 +   return -1;
 +   }
 +
 +   adr = MAX77686_REG_PMIC_LDO1CTRL1 + ldo - 1;
Cant we get the ldo addresses directly as they are available in the
include file.
Then top check would also go off.
 +
 +   /* mask */
 +   mask = 0xc0;
 +
 +   /* mode */
 +   if (opmode == OPMODE_OFF) {
 +   mode = 0x00;
 +   } else if (opmode == OPMODE_STANDBY) {
 +   switch (ldo) {
 +   case 2:
 +   case 6:
 +   case 7:
 +   case 8:
 +   case 10:
 +   case 11:
 +   case 12:
 +   case 14:
 +   case 15:
 +   case 16:
 +   mode = 0x40;
 +   break;
 +   default:
 +   mode = 0xff;
 +   }
 +   } else if (opmode == OPMODE_LPM) {
 +   mode = 0x80;
 +   } else if (opmode == OPMODE_ON) {
 +   mode = 0xc0;
Cant we remove this hard coding.
 +   } else {
 +   mode = 0xff;
 +   }
 +
 +   if (mode == 0xff) {
 +   printf(%s: %d is not supported on LDO%d\n,
 +   __func__, opmode, ldo);
 +   return -1;
 +   }
 +
 +   ret = pmic_reg_read(p, adr, val);
 +   val = ~mask;
 +   val |= mode;
 +   ret |= pmic_reg_write(p, adr, val);
 +
 +   return ret;
 +}
 +
 +int max77686_set_buck_mode(struct pmic *p, int buck, char opmode)
 +{
 +   unsigned int val, ret, mask, adr, size, mode;
 +
 +   size = sizeof(max77686_buck_addr) / sizeof(*max77686_buck_addr);
 +   if (buck = size) {
 +   printf(%s: %d is wrong buck number\n, __func__, buck);
 +   return -1;
 +   }
 +
 +   adr = max77686_buck_addr[buck];
 +
 +   /* mask */
 +   switch (buck) {
 +   case 2:
 +   case 3:
 +   case 4:
 +   mask = 0x30;
 +   break;
 +   default:
 +   mask = 0x03;
 +   }
 +
 +   /* mode */
 +   if (opmode == OPMODE_OFF) {
 +   mode = 0x00;
 +   } else if (opmode == OPMODE_STANDBY) {
 +   switch (buck) {
 +   case 1:
 +   mode = 

  1   2   3   >