[PATCHv2] mci: omap: Fix default value of mci.f_max

2013-10-02 Thread Teresa Gámez
With commit c2ef47887 mci.f_max default value is
only set when pdata is available.

Fix this with always setting the mci.f_max default
value and overrite it when pdata available.

Signed-off-by: Teresa Gámez t.ga...@phytec.de
---
changes in v2:
- set default value always and overwrite it when pdata available 
- updated commit message

 drivers/mci/omap_hsmmc.c |4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/mci/omap_hsmmc.c b/drivers/mci/omap_hsmmc.c
index a2cd3fe..19db461 100644
--- a/drivers/mci/omap_hsmmc.c
+++ b/drivers/mci/omap_hsmmc.c
@@ -609,19 +609,17 @@ static int omap_mmc_probe(struct device_d *dev)
hsmmc-mci.voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
 
hsmmc-mci.f_min = 40;
+   hsmmc-mci.f_max = 5200;
 
pdata = (struct omap_hsmmc_platform_data *)dev-platform_data;
if (pdata) {
if (pdata-f_max)
hsmmc-mci.f_max = pdata-f_max;
-   else
-   hsmmc-mci.f_max = 5200;
 
if (pdata-devname)
hsmmc-mci.devname = pdata-devname;
}
 
-
dev-priv = hsmmc;
dev-detect = omap_mmc_detect,
 
-- 
1.7.0.4


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 1/4] i.mx53: voipac: Change machine type identifier

2013-10-02 Thread Sascha Hauer
On Tue, Oct 01, 2013 at 11:35:19PM +0200, Rostislav Lisovy wrote:
 Signed-off-by: Rostislav Lisovy lis...@gmail.com
 
 
 diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
 index 325513f..b4c8228 100644
 --- a/arch/arm/tools/mach-types
 +++ b/arch/arm/tools/mach-types
 @@ -3314,7 +3314,7 @@ dimm_imx28  MACH_DIMM_IMX28 
 DIMM_IMX28  3355
  amk_a4   MACH_AMK_A4 AMK_A4  
 3356
  gnet_sgmeMACH_GNET_SGME  GNET_SGME   3357
  shooter_uMACH_SHOOTER_U  SHOOTER_U   3358
 -vmx53MACH_VMX53  VMX53   
 3359
 +voipac   MACH_MX53_VOIPACMX53_VOIPAC 
 3359

This file is autogenerated from http://www.arm.linux.org.uk/developer/machines/
and can only be updated from there. No manual changes are allowed since
they would be overwritten by the next update.

Sascha

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 1/8] images: correctly linebreak built images output

2013-10-02 Thread Sascha Hauer
On Sun, Sep 29, 2013 at 09:59:29PM +0200, Lucas Stach wrote:
 Signed-off-by: Lucas Stach d...@lynxeye.de
 ---
  images/Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/images/Makefile b/images/Makefile
 index c723b1a..ac5cf8c 100644
 --- a/images/Makefile
 +++ b/images/Makefile
 @@ -120,7 +120,7 @@ targets += $(foreach m, $(image-y), $(FILE_$(m)))
  SECONDARY: $(addprefix $(obj)/,$(targets))
  
  images: $(addprefix $(obj)/, $(image-y)) FORCE
 - @echo images built:\n $(patsubst %,%\\n,$(image-y))
 + @echo -e images built:\n $(patsubst %,%\\n,$(image-y))

Gnagnagna

This was working on Debian because there a quite broken dash builtin for
'echo' was used. The dash echo builtin does its best to be incompatible
with stanard echo behaviour: It interpretes control characters even if
-e is not given. Instead of at least ignoring the -e option it echos
'-e' to standard out.

I changed the above to:

@echo images built:
@for i in $(image-y); do echo $$i; done

The next step would be to use the SHELL make variable to force to a
known shell.

Sascha

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCHv2] mci: omap: Fix default value of mci.f_max

2013-10-02 Thread Sascha Hauer
On Wed, Oct 02, 2013 at 08:22:30AM +0200, Teresa Gámez wrote:
 With commit c2ef47887 mci.f_max default value is
 only set when pdata is available.
 
 Fix this with always setting the mci.f_max default
 value and overrite it when pdata available.
 
 Signed-off-by: Teresa Gámez t.ga...@phytec.de

Applied, thanks

Sascha

 ---
 changes in v2:
 - set default value always and overwrite it when pdata available 
 - updated commit message
 
  drivers/mci/omap_hsmmc.c |4 +---
  1 files changed, 1 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/mci/omap_hsmmc.c b/drivers/mci/omap_hsmmc.c
 index a2cd3fe..19db461 100644
 --- a/drivers/mci/omap_hsmmc.c
 +++ b/drivers/mci/omap_hsmmc.c
 @@ -609,19 +609,17 @@ static int omap_mmc_probe(struct device_d *dev)
   hsmmc-mci.voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
  
   hsmmc-mci.f_min = 40;
 + hsmmc-mci.f_max = 5200;
  
   pdata = (struct omap_hsmmc_platform_data *)dev-platform_data;
   if (pdata) {
   if (pdata-f_max)
   hsmmc-mci.f_max = pdata-f_max;
 - else
 - hsmmc-mci.f_max = 5200;
  
   if (pdata-devname)
   hsmmc-mci.devname = pdata-devname;
   }
  
 -
   dev-priv = hsmmc;
   dev-detect = omap_mmc_detect,
  
 -- 
 1.7.0.4
 
 
 ___
 barebox mailing list
 barebox@lists.infradead.org
 http://lists.infradead.org/mailman/listinfo/barebox

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 5/6] ARM: vexpress: Fix compiler warning

2013-10-02 Thread Sascha Hauer
On Tue, Oct 01, 2013 at 03:22:50PM +0200, Jean-Christophe PLAGNIOL-VILLARD 
wrote:
 On 08:22 Tue 01 Oct , Sascha Hauer wrote:
  Fixes:
  
  arch/arm/boards/vexpress/init.c: In function 'vexpress_core_init':
  arch/arm/boards/vexpress/init.c:139:22: warning: 'hostname' may be used 
  uninitialized in this function [-Wmaybe-uninitialized]
  
  Signed-off-by: Sascha Hauer s.ha...@pengutronix.de
  ---
   arch/arm/boards/vexpress/init.c | 2 ++
   1 file changed, 2 insertions(+)
  
  diff --git a/arch/arm/boards/vexpress/init.c 
  b/arch/arm/boards/vexpress/init.c
  index 48bc11e..5358be3 100644
  --- a/arch/arm/boards/vexpress/init.c
  +++ b/arch/arm/boards/vexpress/init.c
  @@ -133,6 +133,8 @@ static int vexpress_core_init(void)
  hostname = vexpress-a9;
  else if (cpu_is_cortex_a15())
  hostname = vexpress-a15;
  +   else
  +   hostname = vexpress-unknown;
 
 so set hostname by default not on else

Ok, changed this.

Sascha

  }
   
  barebox_set_model(ARM Vexpress);
  -- 
  1.8.4.rc3
  
  
  ___
  barebox mailing list
  barebox@lists.infradead.org
  http://lists.infradead.org/mailman/listinfo/barebox
 

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 3/6] ARM: mx23-evk: Fix result checking of devfs_add_partition

2013-10-02 Thread Sascha Hauer
On Tue, Oct 01, 2013 at 09:49:47AM +0200, Uwe Kleine-König wrote:
 Hello Sascha,
 
 On Tue, Oct 01, 2013 at 08:22:05AM +0200, Sascha Hauer wrote:
  +   if (IS_ERR(cdev))
  +   return PTR_ERR(cdev);
  +   return 0;
 In Linux you can use
 
   return PTR_ERR_OR_ZERO(cdev)
 
 instead. Didn't check if barebox already has that.

I wasn't aware this exists. barebox currently doesn't have this, but it
would be nice to introduce it.

Sascha

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 1/4] i.mx53: voipac: Change machine type identifier

2013-10-02 Thread Rostislav Lisovy
Hello Sascha;
Sorry for my mistake. I checked beforehand, if there is the
same record in mach-types in Linux kernel -- there is none,
so I thought this file is like 'Barebox specific copy'.
I find the name vmx53 confusing, however we have to stick
with it.

Regards;
Rostislav


On Wed, 2013-10-02 at 09:22 +0200, Sascha Hauer wrote:
 On Tue, Oct 01, 2013 at 11:35:19PM +0200, Rostislav Lisovy wrote:
  Signed-off-by: Rostislav Lisovy lis...@gmail.com
  
  
  diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
  index 325513f..b4c8228 100644
  --- a/arch/arm/tools/mach-types
  +++ b/arch/arm/tools/mach-types
  @@ -3314,7 +3314,7 @@ dimm_imx28MACH_DIMM_IMX28 
  DIMM_IMX28  3355
   amk_a4 MACH_AMK_A4 AMK_A4  
  3356
   gnet_sgme  MACH_GNET_SGME  GNET_SGME   3357
   shooter_u  MACH_SHOOTER_U  SHOOTER_U   3358
  -vmx53  MACH_VMX53  VMX53   
  3359
  +voipac MACH_MX53_VOIPACMX53_VOIPAC 
  3359
 
 This file is autogenerated from 
 http://www.arm.linux.org.uk/developer/machines/
 and can only be updated from there. No manual changes are allowed since
 they would be overwritten by the next update.
 
 Sascha
 



___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 2/4] i.mx53: voipac: Add board specific + flash header constructing code

2013-10-02 Thread Rostislav Lisovy
Hello Antony;
OK -- I should probably add my name (even if I did not change
almost anything).

Regards;
Rostislav


On Wed, 2013-10-02 at 10:15 +0400, Antony Pavlov wrote:
  diff --git a/arch/arm/boards/freescale-mx53-voipac/flash_header.c
 b/arch/arm/boards/freescale-mx53-voipac/flash_header.c
  new file mode 100644
  index 000..c9ae06c
  --- /dev/null
  +++ b/arch/arm/boards/freescale-mx53-voipac/flash_header.c
  @@ -0,0 +1,102 @@
  +/*
  + * Copyright (C) 2011 Marc Kleine-Budde m...@pengutronix.de
 
 This file is rather like freescale-mx53-smd/flash_header.c,
 but please change copyright header.



___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[PATCH 1/4] am33xx_generic: convert from switch to if/else

2013-10-02 Thread Jan Luebbe
The function am33xx_get_cpu_rev may be called before barebox_arm_entry(),
so we need to avoid switch statements. One example is the BeagleBone,
where we use this function to differenciate between the white and black
variants.

Signed-off-by: Jan Luebbe j...@pengutronix.de
---
 arch/arm/mach-omap/am33xx_generic.c |   31 +++
 1 file changed, 11 insertions(+), 20 deletions(-)

diff --git a/arch/arm/mach-omap/am33xx_generic.c 
b/arch/arm/mach-omap/am33xx_generic.c
index 3690ce1..251c8d4 100644
--- a/arch/arm/mach-omap/am33xx_generic.c
+++ b/arch/arm/mach-omap/am33xx_generic.c
@@ -43,30 +43,21 @@ void __noreturn reset_cpu(unsigned long addr)
  * The significance of the CPU revision depends upon the cpu type.
  * Latest known revision is considered default.
  *
+ * This function is called before barebox_arm_entry(), so avoid switch
+ * statements.
+ *
  * @return silicon version
  */
 u32 am33xx_get_cpu_rev(void)
 {
-   u32 version, retval;
-
-   version = (readl(AM33XX_IDCODE_REG)  28)  0xF;
-
-   switch (version) {
-   case 0:
-   retval = AM335X_ES1_0;
-   break;
-   case 1:
-   retval = AM335X_ES2_0;
-   break;
-   case 2:
-   /*
-* Fall through the default case.
-*/
-   default:
-   retval = AM335X_ES2_1;
-   }
-
-   return retval;
+   u32 version = (readl(AM33XX_IDCODE_REG)  28)  0xF;
+
+   if (version == 0)
+   return AM335X_ES1_0;
+   else if (version == 1)
+   return AM335X_ES2_0;
+   else
+   return AM335X_ES2_1;
 }
 
 /**
-- 
1.7.10.4


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[PATCH 2/4] arm: mmu: be more verbose if ttb setup fails

2013-10-02 Thread Jan Luebbe
Signed-off-by: Jan Luebbe j...@pengutronix.de
---
 arch/arm/cpu/mmu.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c
index e3ea3b6..fae83f3 100644
--- a/arch/arm/cpu/mmu.c
+++ b/arch/arm/cpu/mmu.c
@@ -285,7 +285,7 @@ static int mmu_init(void)
ttb = (unsigned long *)((unsigned long)ttb  ~0x3fff);
 
if (!request_sdram_region(ttb, (unsigned long)ttb, SZ_16K))
-   pr_err(Error: Can't request SDRAM region for ttb\n);
+   pr_err(Error: Can't request SDRAM region for ttb at 
%p\n, ttb);
} else {
ttb = memalign(0x1, 0x4000);
}
-- 
1.7.10.4


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[PATCH 3/4] arm: omap: am33xx_generic: fix DDR setup for DDR2

2013-10-02 Thread Jan Luebbe
For DDR2 RAMs, regs-zq_config is not used, which causes the
AM33XX_EMIF4_0_REG(SDRAM_CONFIG) register to be left unconfigured, resulting
in boot failure.

It seems that the DDR2 case was missed during the consolidation in commit
9f122f8bf023a12ad5f84b61d1d74d3ff06104dd. The actual call for the Bone was
removed in 88659d9c4a87a730f6efe4f38c011e8e0214a67b.

Signed-off-by: Jan Luebbe j...@pengutronix.de
---
I've tested this on White and Black BeagleBones. An additional test on the
PCM051 would be good.

 arch/arm/mach-omap/am33xx_generic.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap/am33xx_generic.c 
b/arch/arm/mach-omap/am33xx_generic.c
index 251c8d4..3e2b6c4 100644
--- a/arch/arm/mach-omap/am33xx_generic.c
+++ b/arch/arm/mach-omap/am33xx_generic.c
@@ -302,7 +302,7 @@ void am33xx_config_sdram(const struct am33xx_emif_regs 
*regs)
 
writel(regs-sdram_ref_ctrl, AM33XX_EMIF4_0_REG(SDRAM_REF_CTRL));
writel(regs-sdram_ref_ctrl, AM33XX_EMIF4_0_REG(SDRAM_REF_CTRL_SHADOW));
-   writel(regs-sdram_config, CM_EMIF_SDRAM_CONFIG);
+   writel(regs-sdram_config, AM33XX_EMIF4_0_REG(SDRAM_CONFIG));
 }
 
 void am33xx_config_io_ctrl(int ioctrl)
-- 
1.7.10.4


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


BeagleBone fixes cleanup

2013-10-02 Thread Jan Luebbe
Hi,

I've tried the recent changes in next on both BeagleBones.

These are actual fixes:
[PATCH 1/4] am33xx_generic: convert from switch to if/else
[PATCH 3/4] arm: omap: am33xx_generic: fix DDR setup for DDR2

These are more 'nice to have':
[PATCH 2/4] arm: mmu: be more verbose if ttb setup fails
[PATCH 4/4] beaglebone: use most recent timings for white variant

Regards,
Jan

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 1/4] am33xx_generic: convert from switch to if/else

2013-10-02 Thread Lucas Stach
Am Mittwoch, den 02.10.2013, 21:30 +0200 schrieb Jan Luebbe:
 The function am33xx_get_cpu_rev may be called before barebox_arm_entry(),
 so we need to avoid switch statements. 

Uhm, could you please be more verbose on _why_ we need to avoid switch
statements at this stage? I might be running into the same failure with
Tegra at some point if there's a real issue.

Thanks,
Lucas

 One example is the BeagleBone,
 where we use this function to differenciate between the white and black
 variants.
 
 Signed-off-by: Jan Luebbe j...@pengutronix.de
 ---
  arch/arm/mach-omap/am33xx_generic.c |   31 +++
  1 file changed, 11 insertions(+), 20 deletions(-)
 
 diff --git a/arch/arm/mach-omap/am33xx_generic.c 
 b/arch/arm/mach-omap/am33xx_generic.c
 index 3690ce1..251c8d4 100644
 --- a/arch/arm/mach-omap/am33xx_generic.c
 +++ b/arch/arm/mach-omap/am33xx_generic.c
 @@ -43,30 +43,21 @@ void __noreturn reset_cpu(unsigned long addr)
   * The significance of the CPU revision depends upon the cpu type.
   * Latest known revision is considered default.
   *
 + * This function is called before barebox_arm_entry(), so avoid switch
 + * statements.
 + *
   * @return silicon version
   */
  u32 am33xx_get_cpu_rev(void)
  {
 - u32 version, retval;
 -
 - version = (readl(AM33XX_IDCODE_REG)  28)  0xF;
 -
 - switch (version) {
 - case 0:
 - retval = AM335X_ES1_0;
 - break;
 - case 1:
 - retval = AM335X_ES2_0;
 - break;
 - case 2:
 - /*
 -  * Fall through the default case.
 -  */
 - default:
 - retval = AM335X_ES2_1;
 - }
 -
 - return retval;
 + u32 version = (readl(AM33XX_IDCODE_REG)  28)  0xF;
 +
 + if (version == 0)
 + return AM335X_ES1_0;
 + else if (version == 1)
 + return AM335X_ES2_0;
 + else
 + return AM335X_ES2_1;
  }
  
  /**



___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH] i2c-omap: Update driver

2013-10-02 Thread Jan Lübbe
On Mon, 2013-09-30 at 10:16 +0200, Sascha Hauer wrote: 
 On Thu, Sep 26, 2013 at 01:40:24PM +0200, Jan Weitzel wrote:
  The driver didn't work well with at24 driver. NACKS are lost.
  Errors are lost in isr due to the local variable err. Also we didn't wait 
  for
  bus free in omap_i2c_xfer_msg.
  
  Fix issues and get other improvements from linux kernel
  
  Tested on OMAP4 and AM335x
  
  Signed-off-by: Jan Weitzel j.weit...@phytec.de
 
 Applied, thanks

When booting my BeagleBone with this, I see:
i2c-omap i2c-am33xx0: bus 0 rev84148224.11 at 100 kHz

The revision entry looks strange, but the at24 EEPROM continues to be
accessible. I've not yet looked at it in detail. Jan, do you have an
idea?

Regards,
Jan


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 1/4] am33xx_generic: convert from switch to if/else

2013-10-02 Thread Jan Lübbe
On Wed, 2013-10-02 at 21:45 +0200, Lucas Stach wrote: 
 Am Mittwoch, den 02.10.2013, 21:30 +0200 schrieb Jan Luebbe:
  The function am33xx_get_cpu_rev may be called before barebox_arm_entry(),
  so we need to avoid switch statements. 
 
 Uhm, could you please be more verbose on _why_ we need to avoid switch
 statements at this stage? I might be running into the same failure with
 Tegra at some point if there's a real issue.

I believe the problem is that the table is accessed using absolute
addresses. Before the call to barebox_arm_entry() barebox may be running
at a different address.

Regards,
Jan


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH 1/4] am33xx_generic: convert from switch to if/else

2013-10-02 Thread Lucas Stach
Am Mittwoch, den 02.10.2013, 22:04 +0200 schrieb Jan Lübbe:
 On Wed, 2013-10-02 at 21:45 +0200, Lucas Stach wrote: 
  Am Mittwoch, den 02.10.2013, 21:30 +0200 schrieb Jan Luebbe:
   The function am33xx_get_cpu_rev may be called before barebox_arm_entry(),
   so we need to avoid switch statements. 
  
  Uhm, could you please be more verbose on _why_ we need to avoid switch
  statements at this stage? I might be running into the same failure with
  Tegra at some point if there's a real issue.
 
 I believe the problem is that the table is accessed using absolute
 addresses. Before the call to barebox_arm_entry() barebox may be running
 at a different address.
 
Ah, so it's producing a jump table with absolute offsets even for this
rather trivial switch statement? I can see how this would cause issues.
How about using -fno-jump-tables for the objects that are referenced
in the early startup code? This may allow you to drop this code
workaround.

Regards,
Lucas



___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox