Re: [U-Boot] [PATCH v2] blackfin: Fix using gd->baudrate before setting its value

2013-07-14 Thread Axel Lin
2013/7/1 Sonic Zhang :
> Acked-by: Sonic Zhang

hi Sonic,
I thought you will pick up this patch, but now I got your ACK and I have
no idea who will take this patch.

Just wondering if this patch should be applied for v2013.07?

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


[U-Boot] [PATCH v2 1/1] patman: README documentation nits (unit test)

2013-07-14 Thread Gerhard Sittig
adjust instructions for the invocation of Patman's self test: the -t
flag appears to have a different meaning now, refer to the --test option
for the builtin unit test; adjust a directory location and make sure to
run the file which resides in the source directory

Signed-off-by: Gerhard Sittig 
---
 tools/patman/README |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

changes in v2:
- fix another previously missed directory location
- prefix script with './' since '.' is usually not in $PATH

couldn't determine the appropriate subsystem/tree and corresponding
custodian for this patch, who'd pick it up and thus is to Cc: to?
Simon, can you take it?

diff --git a/tools/patman/README b/tools/patman/README
index 8cffcd1..c954989 100644
--- a/tools/patman/README
+++ b/tools/patman/README
@@ -452,12 +452,12 @@ Most of these are indicated by a TODO in the code.
 
 It would be nice if this could handle the In-reply-to side of things.
 
-The tests are incomplete, as is customary. Use the -t flag to run them,
-and make sure you are in the tools/scripts/patman directory first:
+The tests are incomplete, as is customary. Use the --test flag to run them,
+and make sure you are in the tools/patman directory first:
 
 $ cd /path/to/u-boot
-$ cd tools/scripts/patman
-$ patman -t
+$ cd tools/patman
+$ ./patman --test
 
 Error handling doesn't always produce friendly error messages - e.g.
 putting an incorrect tag in a commit may provide a confusing message.
-- 
1.7.10.4

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


[U-Boot] Patman failure on Linux Mint 14

2013-07-14 Thread Gerhard Sittig
Hi there!

Patman for some reason "doesn't work for me".  It won't find
commits from the sandbox/repo, but wants me to specify -c
manually.  Then it won't detect or cannot grok subject prefixes
and fails to determine email addresses.  From the documentation I
see how useful the tool is and feel how great and desirable it is
to have such a tool at hand when iterating a series through
review.  It's a pity that it won't run here.  Since it works for
others, the problem must be in my setup.


The git history suggests that Python 2.7.4 is required, while my
distribution (Linux Mint 14, derived from Ubuntu 12.10) ships
with 2.7.3.

OTOH this very Python version works for others, and a local
installation of 2.7.5 (default configure except for --prefix
$HOME) doesn't help either.


The unit test output is rather lengthy, yet apparently condenses
into just two spots and a lot of followup errors:

The testIndent() case in test.py won't pass (succeeds although
it's supposed to fail).  Changing 'tab' in GetData() from a
verbatim tab in quotes into an explicit '\t' doesn't help (but
visually more clearly reflects the specific type of whitespace).
Running the script under 'env LC_ALL=C' didn't help either.  Is
this some language or locale specific stuff that can be overcome
"from outside", or do I have a more severe problem with the
Python runtime where string operation and whitespace handling
isn't dependable?

Email address handling fails for the BuildEmailList(),
EmailPatches(), and LookupEmail() routines, and all of them for
the same reason of missing 'fileno' member in what's supposed to
be a file stream.  The specific error output is:

  AttributeError: _SpoofOut instance has no attribute 'fileno'

After searching the web I got that much:  When run under test
(doctest), file output is implemented by the _SpoofOut class to
catch programs' output, to compare runtime behaviour against
expectations.  While this stream setup mostly works for the
purpose of I/O and testing, it specifically lacks the 'fileno'
member and thus breaks those uses which rely on this property.

Can't tell whether this condition applies to "regular application
invocation" as well or to the specific libraries or abstractions
used in the patman setup (saw 'fileno' references in terminal and
process related stuff, but don't know enough Python to really
tell what to do there).  Just in case, I ran the unit test from
within screen(1) as well as without it in a mere terminal.


The local setup is:

  $ lsb_release -d -s
  Linux Mint 14 Nadia
  $ python --version
  Python 2.7.5
  $ git describe
  v2013.07-rc3-1-g1c2d113
  (one patch, the patman doc update)

Am I missing some external dependencies or proper configuration
(either in the system, in Python, in git, or in patman)?  What
can I do to better diagnose the issue or make patman work here as
well?  It's so great a tool!


virtually yours
Gerhard Sittig
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: off...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] mx6: Factor out common HDMI setup code

2013-07-14 Thread Eric Nelson

Hi Pardeep,

On 07/12/2013 03:21 PM, Pardeep Kumar Singla wrote:

Instead of duplicating HDMI setup code for every mx6 board, factor out the 
common code

Signed-off-by: Pardeep Kumar Singla 
---
  arch/arm/cpu/armv7/mx6/soc.c  |   51 ++
  arch/arm/include/asm/arch-mx6/mxc_hdmi.h  |6 ++
  arch/arm/include/asm/arch-mx6/sys_proto.h |   13 
  board/boundary/nitrogen6x/nitrogen6x.c|   57 +---
  board/freescale/mx6qsabrelite/mx6qsabrelite.c |   60 ++--
  board/wandboard/wandboard.c   |   91 ++---
  include/configs/mx6qsabrelite.h   |8 ++-
  include/configs/nitrogen6x.h  |2 +-
  include/configs/wandboard.h   |1 +
  9 files changed, 106 insertions(+), 183 deletions(-)

diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
index fc436fb..6e79310 100644
--- a/arch/arm/cpu/armv7/mx6/soc.c
+++ b/arch/arm/cpu/armv7/mx6/soc.c
@@ -32,6 +32,8 @@
  #include 
  #include 
  #include 
+#include 
+#include 

  struct scu_regs {
u32 ctrl;
@@ -228,3 +230,52 @@ const struct boot_mode soc_boot_modes[] = {
  void s_init(void)
  {
  }
+
+#ifdef CONFIG_IMX_HDMI
+void imx_enable_hdmi_phy(struct display_info_t const *dev)
+{


The only reason this has a dev parameter is so it can be used by
auto-detect code.

It should be kept out of this code to make the interface clearer.

Boards that support auto-detect (mx6qsabrelite/nitrogen6x)
can wrap it.


+   struct hdmi_regs *hdmi  = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
+   u8 reg;
+   reg = readb(&hdmi->phy_conf0);
+   reg |= HDMI_PHY_CONF0_PDZ_MASK;
+   writeb(reg, &hdmi->phy_conf0);
+   udelay(3000);
+   reg |= HDMI_PHY_CONF0_ENTMDS_MASK;
+   writeb(reg, &hdmi->phy_conf0);
+   udelay(3000);
+   reg |= HDMI_PHY_CONF0_GEN2_TXPWRON_MASK;
+   writeb(reg, &hdmi->phy_conf0);
+   writeb(HDMI_MC_PHYRSTZ_ASSERT, &hdmi->mc_phyrstz);
+}
+
+void imx_setup_hdmi(void)
+{
+   struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
+   struct hdmi_regs *hdmi  = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
+   int reg;
+
+   /* Turn on IPU clock */
+   reg = readl(&mxc_ccm->CCGR3);
+   reg |= MXC_CCM_CCGR3_IPU1_IPU_DI0_OFFSET;
+   writel(reg, &mxc_ccm->CCGR3);
+
+   /* Turn on HDMI PHY clock */
+   reg = readl(&mxc_ccm->CCGR2);
+   reg |=  MXC_CCM_CCGR2_HDMI_TX_IAHBCLK_MASK|
+MXC_CCM_CCGR2_HDMI_TX_ISFRCLK_MASK;
+   writel(reg, &mxc_ccm->CCGR2);
+/* clear HDMI PHY reset */
+writeb(HDMI_MC_PHYRSTZ_DEASSERT, &hdmi->mc_phyrstz);



There's a lot of policy in this register write and some of it isn't
really HDMI-specific (LDB clock selects). I'd recommend keeping
that in board-specific code:


+   reg = readl(&mxc_ccm->chsccdr);
+   reg &= ~(MXC_CCM_CHSCCDR_IPU1_DI0_PRE_CLK_SEL_MASK|
+MXC_CCM_CHSCCDR_IPU1_DI0_PODF_MASK|
+MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_MASK);
+   reg |= (CHSCCDR_CLK_SEL_LDB_DI0
+<< MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_OFFSET)|
+(CHSCCDR_PODF_DIVIDE_BY_3
+<< MXC_CCM_CHSCCDR_IPU1_DI0_PODF_OFFSET)
+|(CHSCCDR_IPU_PRE_CLK_540M_PFD
+<< MXC_CCM_CHSCCDR_IPU1_DI0_PRE_CLK_SEL_OFFSET);
+   writel(reg, &mxc_ccm->chsccdr);
+}
+#endif
diff --git a/arch/arm/include/asm/arch-mx6/mxc_hdmi.h 
b/arch/arm/include/asm/arch-mx6/mxc_hdmi.h
index 9dccb3f..9e2074b 100644
--- a/arch/arm/include/asm/arch-mx6/mxc_hdmi.h
+++ b/arch/arm/include/asm/arch-mx6/mxc_hdmi.h
@@ -21,6 +21,12 @@
  #ifndef __MXC_HDMI_H__
  #define __MXC_HDMI_H__

+#ifdef CONFIG_IMX_HDMI
+#include
+void imx_enable_hdmi_phy(struct display_info_t const *dev);
+void imx_setup_hdmi(void);
+#endif
+
  /*
   * Hdmi controller registers
   */
diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h 
b/arch/arm/include/asm/arch-mx6/sys_proto.h
index 38e4e51..9fb539b 100644
--- a/arch/arm/include/asm/arch-mx6/sys_proto.h
+++ b/arch/arm/include/asm/arch-mx6/sys_proto.h
@@ -25,6 +25,9 @@
  #define _SYS_PROTO_H_

  #include 
+#include
+#include 
+#include 

  #define MXC_CPU_MX51  0x51
  #define MXC_CPU_MX53  0x53
@@ -34,6 +37,16 @@
  #define MXC_CPU_MX6Q  0x63

  #define is_soc_rev(rev)   ((get_cpu_rev() & 0xFF) - rev)


This is specific to a couple of boards, and not mx6-specific:


+
+struct display_info_t {
+   intbus;
+   intaddr;
+   intpixfmt;
+   int(*detect)(struct display_info_t const *dev);
+   void(*enable)(struct display_info_t const *dev);
+   structfb_videomode mode;
+};
+



  u32 get_cpu_rev(void);
  const char *get_imx_type(u32 imxtype);
  unsigned imx_ddr_size(void);
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c 
b/board/boundary/nitrogen6x/nitrogen6x.c
index 8f0f9b8..d97d47a 100644
--- a/boar

[U-Boot] [PATCH 2/2 V3] PPC MPC83xx: Fix MPC8323ERDB build warning

2013-07-14 Thread Wolfgang Denk
Fix:

mpc8323erdb.c: In function 'mac_read_from_eeprom':
mpc8323erdb.c:198:3: warning: dereferencing type-punned pointer will
break strict-aliasing rules [-Wstrict-aliasing]

Signed-off-by: Wolfgang Denk 
cc: Timur Tabi 
cc: Kim Phillips 
---
V2: use uint32_t for crc_buf to make sure we always get exactly
32 bit; thanks to Timur Tabi for pointing out.
V3: also use uint32_t for the size of the memcpy(), again thanks to
Timur Tabi for pointing out.

 board/freescale/mpc8323erdb/mpc8323erdb.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/board/freescale/mpc8323erdb/mpc8323erdb.c 
b/board/freescale/mpc8323erdb/mpc8323erdb.c
index f29b2f4..533cb08 100644
--- a/board/freescale/mpc8323erdb/mpc8323erdb.c
+++ b/board/freescale/mpc8323erdb/mpc8323erdb.c
@@ -195,7 +195,11 @@ int mac_read_from_eeprom(void)
printf("\nEEPROM @ 0x%02x read FAILED!!!\n",
   CONFIG_SYS_I2C_EEPROM_ADDR);
} else {
-   if (crc32(crc, buf, 24) == *(unsigned int *)&buf[24]) {
+   uint32_t crc_buf;
+
+   memcpy(&crc_buf, &buf[24], sizeof(uint32_t));
+
+   if (crc32(crc, buf, 24) == crc_buf) {
printf("Reading MAC from EEPROM\n");
for (i = 0; i < 4; i++) {
if (memcmp(&buf[i * 6], "\0\0\0\0\0\0", 6)) {
-- 
1.7.11.7

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


Re: [U-Boot] [PATCH] ppc: mpc8323erdb: Fix compiler warning

2013-07-14 Thread Wolfgang Denk
Dear Marek Vasut,

In message <1373710940-15779-1-git-send-email-ma...@denx.de> you wrote:
> Fix the following warning:
> 
> mpc8323erdb.c: In function 'mac_read_from_eeprom':
> mpc8323erdb.c:198:3: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules [-Wstrict-aliasing]
>if (crc32(crc, buf, 24) == *(unsigned int *)&buf[24]) {
>^
> 
> Size remains unchanged after and before fix:
> 
>textdata bss dec hex filename
>  206977   18748   23344  249069   3cced ./u-boot
> 
> Note the fix is the crudest possible, but also least intrusive.

Please see Timur's review comments to my original patch for this
isssue ([1]). The "unsigned int" should indeed be fixed.

I resubmitted a v2 with the review comments incorporated on July 08,
see [2], but I caught only one part of the needed changes.  V3 sent
right now; see [3].  I'd rather see this added than yours.

Also note that it might be a good idea to add the MPC83xx custodion to
the Cc: list of such patches...


[1] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/163386
[2] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/165266
[3] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/165731


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
You got to learn three things. What's  real,  what's  not  real,  and
what's the difference."   - Terry Pratchett, _Witches Abroad_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2 V2] PPC MPC83xx: Fix MPC8323ERDB build warning

2013-07-14 Thread Wolfgang Denk
Dear Timur Tabi,

In message <51db3787.4000...@tabi.org> you wrote:
> On 07/08/2013 01:19 PM, Wolfgang Denk wrote:
> > +   uint32_t crc_buf;
> > +
> > +   memcpy(&crc_buf, &buf[24], sizeof(unsigned int));
> 
> Well, this is wrong, because it should be sizeof(uint32_t).  Or maybe
> sizeof(crc_buf).

Indedd. Sorry.  V3 on the way.

Thanks!

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
Your own mileage may vary.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/1] patman: README documentation nits (unit test)

2013-07-14 Thread Simon Glass
On Sun, Jul 14, 2013 at 2:27 AM, Gerhard Sittig  wrote:

> adjust instructions for the invocation of Patman's self test: the -t
> flag appears to have a different meaning now, refer to the --test option
> for the builtin unit test; adjust a directory location and make sure to
> run the file which resides in the source directory
>
> Signed-off-by: Gerhard Sittig 
>

Acked-by: Simon Glass 

Tom, would you like to pick this fix up now, or should I do it in the next
merge window?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/1] OMAP3: igep00x0: allow booting with a FDT from MMC

2013-07-14 Thread Javier Martinez Canillas
IGEP boards now have Device Tree support in the mainline
kernel. To boot an IGEP board using a DT, a uEnv.txt plain
text file could be used to define a custom uenvcmd that will
be run by the default boot command.

It is more convenient to change the default boot command to
allow loading a FDT if it is stored in a uSD/MMC partition.
If no FDT is found then the command behaves just as it used
so this change won't break existing setup for current users.

Signed-off-by: Javier Martinez Canillas 
---
 board/isee/igep00x0/igep00x0.c |   14 ++
 include/configs/igep00x0.h |9 +
 2 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c
index 0d4679d..fdd2773 100644
--- a/board/isee/igep00x0/igep00x0.c
+++ b/board/isee/igep00x0/igep00x0.c
@@ -154,6 +154,18 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
+void set_fdt(void)
+{
+   switch (gd->bd->bi_arch_number) {
+   case MACH_TYPE_IGEP0020:
+   setenv("fdtfile", "omap3-igep0020.dtb");
+   break;
+   case MACH_TYPE_IGEP0030:
+   setenv("fdtfile", "omap3-igep0030.dtb");
+   break;
+   }
+}
+
 /*
  * Routine: misc_init_r
  * Description: Configure board specific parts
@@ -166,6 +178,8 @@ int misc_init_r(void)
 
dieid_num_r();
 
+   set_fdt();
+
return 0;
 }
 
diff --git a/include/configs/igep00x0.h b/include/configs/igep00x0.h
index 1d8090b..72752af 100644
--- a/include/configs/igep00x0.h
+++ b/include/configs/igep00x0.h
@@ -149,6 +149,7 @@
 #define CONFIG_EXTRA_ENV_SETTINGS \
"usbtty=cdc_acm\0" \
"loadaddr=0x8200\0" \
+   "fdtaddr=0x8160\0" \
"usbtty=cdc_acm\0" \
"console=ttyO2,115200n8\0" \
"mpurate=auto\0" \
@@ -180,9 +181,12 @@
"importbootenv=echo Importing environment from mmc ...; " \
"env import -t $loadaddr $filesize\0" \
"loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
+   "loadfdt=fatload mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
"bootm ${loadaddr}\0" \
+   "mmcbootfdt=echo Booting with DT from mmc ...; " \
+   "bootm ${loadaddr} - ${fdtaddr}\0" \
"nandboot=echo Booting from onenand ...; " \
"run nandargs; " \
"onenand read ${loadaddr} 28 40; " \
@@ -199,6 +203,11 @@
"run uenvcmd;" \
"fi;" \
"if run loaduimage; then " \
+   "if test -n $fdtfile; then " \
+   "if run loadfdt; then " \
+   "run mmcbootfdt;" \
+   "fi;" \
+   "fi;" \
"run mmcboot;" \
"fi;" \
"fi;" \
-- 
1.7.7.6

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


Re: [U-Boot] [PATCH 2/2 V3] PPC MPC83xx: Fix MPC8323ERDB build warning

2013-07-14 Thread Timur Tabi

Wolfgang Denk wrote:

mpc8323erdb.c: In function 'mac_read_from_eeprom':
mpc8323erdb.c:198:3: warning: dereferencing type-punned pointer will
break strict-aliasing rules [-Wstrict-aliasing]

Signed-off-by: Wolfgang Denk
cc: Timur Tabi
cc: Kim Phillips


Ack.

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


Re: [U-Boot] [PATCH] ppc: mpc8323erdb: Fix compiler warning

2013-07-14 Thread Marek Vasut
Hello Wolfgang,

> Dear Marek Vasut,
> 
> In message <1373710940-15779-1-git-send-email-ma...@denx.de> you wrote:
> > Fix the following warning:
> > 
> > mpc8323erdb.c: In function 'mac_read_from_eeprom':
> > mpc8323erdb.c:198:3: warning: dereferencing type-punned pointer will
> > break strict-aliasing rules [-Wstrict-aliasing]
> > 
> >if (crc32(crc, buf, 24) == *(unsigned int *)&buf[24]) {
> >^
> > 
> > Size remains unchanged after and before fix:
> >textdata bss dec hex filename
> >  
> >  206977   18748   23344  249069   3cced ./u-boot
> > 
> > Note the fix is the crudest possible, but also least intrusive.
> 
> Please see Timur's review comments to my original patch for this
> isssue ([1]). The "unsigned int" should indeed be fixed.
> 
> I resubmitted a v2 with the review comments incorporated on July 08,
> see [2], but I caught only one part of the needed changes.  V3 sent
> right now; see [3].  I'd rather see this added than yours.

OK, I didn't know you were at it.

> Also note that it might be a good idea to add the MPC83xx custodion to
> the Cc: list of such patches...

Yes, I only added the board maintainer, who's apparently no longer at FSL :(

> [1] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/163386
> [2] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/165266
> [3] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/165731

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mx6qsabrelite: Remove mx6qsabrelite code in favor of nitrogen6x

2013-07-14 Thread Otavio Salvador
On Sun, Jul 14, 2013 at 11:40 PM, Fabio Estevam  wrote:
> From: Fabio Estevam 
>
> mx6qsabrelite and nitrogen6q boards are hardware compatible, so let's avoid 
> the
> code duplication and only use the nitrogen6x source code to make board code
> maintainance easier.
>
> Tested booting a mainline device tree kernel on a mx6qsabrelite board.
>
> Signed-off-by: Fabio Estevam 

I think this is a huge improvement I am just not sure about the
environment preserving for sabrelite. I think most people using
sabrelite end using the U-Boot from SPI NOR.

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] mx6qsabrelite: Remove mx6qsabrelite code in favor of nitrogen6x

2013-07-14 Thread Fabio Estevam
From: Fabio Estevam 

mx6qsabrelite and nitrogen6q boards are hardware compatible, so let's avoid the
code duplication and only use the nitrogen6x source code to make board code
maintainance easier.

Tested booting a mainline device tree kernel on a mx6qsabrelite board.

Signed-off-by: Fabio Estevam 
---
 .../nitrogen6x/README.mx6qsabrelite}   |   0
 .../nitrogen6x/{README => README.nitrogen6x}   |   0
 board/freescale/mx6qsabrelite/Makefile |  41 -
 board/freescale/mx6qsabrelite/mx6qsabrelite.c  | 848 -
 boards.cfg |   2 +-
 include/configs/mx6qsabrelite.h| 297 
 include/configs/nitrogen6x.h   |  80 +-
 7 files changed, 80 insertions(+), 1188 deletions(-)
 rename board/{freescale/mx6qsabrelite/README => 
boundary/nitrogen6x/README.mx6qsabrelite} (100%)
 rename board/boundary/nitrogen6x/{README => README.nitrogen6x} (100%)
 delete mode 100644 board/freescale/mx6qsabrelite/Makefile
 delete mode 100644 board/freescale/mx6qsabrelite/mx6qsabrelite.c
 delete mode 100644 include/configs/mx6qsabrelite.h

diff --git a/board/freescale/mx6qsabrelite/README 
b/board/boundary/nitrogen6x/README.mx6qsabrelite
similarity index 100%
rename from board/freescale/mx6qsabrelite/README
rename to board/boundary/nitrogen6x/README.mx6qsabrelite
diff --git a/board/boundary/nitrogen6x/README 
b/board/boundary/nitrogen6x/README.nitrogen6x
similarity index 100%
rename from board/boundary/nitrogen6x/README
rename to board/boundary/nitrogen6x/README.nitrogen6x
diff --git a/board/freescale/mx6qsabrelite/Makefile 
b/board/freescale/mx6qsabrelite/Makefile
deleted file mode 100644
index cf344e4..000
diff --git a/board/freescale/mx6qsabrelite/mx6qsabrelite.c 
b/board/freescale/mx6qsabrelite/mx6qsabrelite.c
deleted file mode 100644
index 862bc30..000
diff --git a/boards.cfg b/boards.cfg
index db56488..86e2fd6 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -259,7 +259,7 @@ vision2  arm armv7   
vision2 ttcontr
 cgtqmx6qevalarm armv7   
cgtqmx6eval congatec   mx6 
cgtqmx6eval:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg,MX6Q
 mx6qarm2 arm armv7   mx6qarm2
freescale  mx6
mx6qarm2:IMX_CONFIG=board/freescale/mx6qarm2/imximage.cfg
 mx6qsabreautoarm armv7   mx6qsabreauto   
freescale  mx6
mx6qsabreauto:IMX_CONFIG=board/freescale/mx6qsabreauto/imximage.cfg,MX6Q
-mx6qsabrelitearm armv7   mx6qsabrelite   
freescale  mx6
mx6qsabrelite:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg
+mx6qsabrelitearm armv7   nitrogen6x  
boundary   mx6
nitrogen6x:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q.cfg,MX6Q,DDR_MB=1024,SABRELITE
 mx6dlsabresd arm armv7   mx6sabresd  
freescale  mx6
mx6sabresd:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6dl.cfg,MX6DL
 mx6qsabresd  arm armv7   mx6sabresd  
freescale  mx6
mx6sabresd:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg,MX6Q
 mx6slevk arm armv7   mx6slevk
freescale  mx6
mx6slevk:IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL
diff --git a/include/configs/mx6qsabrelite.h b/include/configs/mx6qsabrelite.h
deleted file mode 100644
index c7db81d..000
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h
index 74df66c..85eecfc 100644
--- a/include/configs/nitrogen6x.h
+++ b/include/configs/nitrogen6x.h
@@ -186,6 +186,80 @@
 
 #define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
 
+#if defined(CONFIG_SABRELITE)
+#define CONFIG_EXTRA_ENV_SETTINGS \
+   "script=boot.scr\0" \
+   "uimage=uImage\0" \
+   "console=ttymxc1\0" \
+   "fdt_high=0x\0" \
+   "initrd_high=0x\0" \
+   "fdt_file=imx6q-sabrelite.dtb\0" \
+   "fdt_addr=0x1100\0" \
+   "boot_fdt=try\0" \
+   "ip_dyn=yes\0" \
+   "mmcdev=0\0" \
+   "mmcpart=1\0" \
+   "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
+   "mmcargs=setenv bootargs console=${console},${baudrate} " \
+   "root=${mmcroot}\0" \
+   "loadbootscript=" \
+   "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
+   "bootscript=echo Running bootscript from mmc ...; " \
+   "source\0" \
+   "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
+   "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
+   "mmcboot=echo Booting from mmc ...; " \
+   "run mmcargs; " \
+   "if test ${boot_fdt} = yes || test ${boot_fdt} = try;

Re: [U-Boot] [PATCH] mx6qsabrelite: Remove mx6qsabrelite code in favor of nitrogen6x

2013-07-14 Thread Fabio Estevam
Hi Otavio,

On Sun, Jul 14, 2013 at 11:44 PM, Otavio Salvador
 wrote:
> On Sun, Jul 14, 2013 at 11:40 PM, Fabio Estevam  wrote:
>> From: Fabio Estevam 
>>
>> mx6qsabrelite and nitrogen6q boards are hardware compatible, so let's avoid 
>> the
>> code duplication and only use the nitrogen6x source code to make board code
>> maintainance easier.
>>
>> Tested booting a mainline device tree kernel on a mx6qsabrelite board.
>>
>> Signed-off-by: Fabio Estevam 
>
> I think this is a huge improvement I am just not sure about the
> environment preserving for sabrelite. I think most people using
> sabrelite end using the U-Boot from SPI NOR.

I can't say whether SPI NOR or SD card is the most common medium for
storing the environment variables for sabrelite, but my main goal here
was to try to keep compability with existing code.

Currently mx6qsabrelite defines CONFIG_ENV_IS_IN_MMC, so I kept the
same here. This patch introduces no change in functional behaviour.

If we think CONFIG_ENV_IS_IN_xxx should be changed, then this is
something to be handled by a separate patch.

Regards,

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


Re: [U-Boot] [PATCH] mx6qsabrelite: Remove mx6qsabrelite code in favor of nitrogen6x

2013-07-14 Thread Otavio Salvador
On Sun, Jul 14, 2013 at 11:52 PM, Fabio Estevam  wrote:
> Hi Otavio,
>
> On Sun, Jul 14, 2013 at 11:44 PM, Otavio Salvador
>  wrote:
>> On Sun, Jul 14, 2013 at 11:40 PM, Fabio Estevam  wrote:
>>> From: Fabio Estevam 
>>>
>>> mx6qsabrelite and nitrogen6q boards are hardware compatible, so let's avoid 
>>> the
>>> code duplication and only use the nitrogen6x source code to make board code
>>> maintainance easier.
>>>
>>> Tested booting a mainline device tree kernel on a mx6qsabrelite board.
>>>
>>> Signed-off-by: Fabio Estevam 
>>
>> I think this is a huge improvement I am just not sure about the
>> environment preserving for sabrelite. I think most people using
>> sabrelite end using the U-Boot from SPI NOR.
>
> I can't say whether SPI NOR or SD card is the most common medium for
> storing the environment variables for sabrelite, but my main goal here
> was to try to keep compability with existing code.
>
> Currently mx6qsabrelite defines CONFIG_ENV_IS_IN_MMC, so I kept the
> same here. This patch introduces no change in functional behaviour.
>
> If we think CONFIG_ENV_IS_IN_xxx should be changed, then this is
> something to be handled by a separate patch.

Agreed :-)

Reviewed-by: Otavio Salvador 

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [[PATCH v2 5/6] USB: ehci: Add a weak function for resetting devices

2013-07-14 Thread Marek Vasut
Dear Dan Murphy,

> Roger
> 
> On 07/11/2013 09:23 AM, Roger Quadros wrote:
> > Hi Marek,
> > 
> > On 07/11/2013 03:35 PM, Marek Vasut wrote:
> >> Dear Roger Quadros,
> >> 
> >>> On 07/11/2013 02:16 AM, Dan Murphy wrote:
>  On 07/10/2013 05:20 PM, Marek Vasut wrote:
> > Dear Dan Murphy,
> > 
> >> Add a __weak function that can be overridden to reset devices
> >> attached to an ehci devices after the FEAT_POWER has been submitted
> >> 
> >> Signed-off-by: Dan Murphy 
> >> ---
> >> 
> >>  drivers/usb/host/ehci-hcd.c |7 +++
> >>  1 file changed, 7 insertions(+)
> >> 
> >> diff --git a/drivers/usb/host/ehci-hcd.c
> >> b/drivers/usb/host/ehci-hcd.c index 706cf0c..fdd3994 100644
> >> --- a/drivers/usb/host/ehci-hcd.c
> >> +++ b/drivers/usb/host/ehci-hcd.c
> >> @@ -616,6 +616,11 @@ __weak uint32_t
> >> *ehci_get_portsc_register(struct ehci_hcor *hcor, int port) return
> >> (uint32_t *)&hcor->or_portsc[port];
> >> 
> >>  }
> >> 
> >> +__weak void ehci_reset_attached_devices(int port)
> >> +{
> >> +  return;
> >> +}
> >>> 
> >>> Does this function need to be ehci specific? Other USB controllers
> >>> might also need such a function.
> >> 
> >> You'd need to implement this for each of the xHCIs
> > 
> > OK.
> 
> I can move the API to the usb-hub to call this after the FEAT_POWER is
> completed
> 
> >> +
> > 
> > Can the reset not happen elsewhere?
>  
>  I have tried to move this around and keep this out of this file
>  completely but nothing else seems to work.
>  
>  For port 2 where the USB3530 is we don't have the issue the 3530
>  enumerates properly.
>  
>  I did not see any information in the data sheet eluding to a timing
>  issue.
> >>> 
> >>> This is the information I had received earlier from SMSC about USB3503A
> >>> hub
> 
> This has nothing to do with the 3503A this is the LAN9730.  The 3503 works
> just fine without the additional reset.
> 
> >>> "You need the host up and running, and ready to go, THEN negate
> >>> RESET_N. That is probably 95% of the issues."
> >>> 
> >>> Please make sure the following sequence is done.
> >>> 
> >>> - power up hub (RESET is active at this point).
> >>> - start USB controller
> >>> - wait a few ms
> >>> - release hub RESET.
> >>> 
> >>> giving a quick look at the u-boot code it seems you need to release the
> >>> hub reset after usb_lowlevel_init() _OR_ usb_init() returns.
> >> 
> >> Then it would also work in usb_lowlevel_init() ?
> > 
> > It should as long as we place the "release reset" after EHCI controller
> > has started. Maybe safer to put it in the end of usb_lowlevel_init().
> > 
> > cheers,
> > -roger
> 
> I moved the reset to the usb_lowlevel_init and it did not work.
> I tried holding the 9730 in reset until after ehci hcd init is complete and
> pulled it out of reset once the hcd is initialized but still no
> enumeration.

Can you try waiting a little after negating the reset ? It might be that the 
device takes some time to come back to life.

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mx6qsabrelite: Remove mx6qsabrelite code in favor of nitrogen6x

2013-07-14 Thread Eric Nelson

On 07/14/2013 07:58 PM, Otavio Salvador wrote:

On Sun, Jul 14, 2013 at 11:52 PM, Fabio Estevam  wrote:

Hi Otavio,

On Sun, Jul 14, 2013 at 11:44 PM, Otavio Salvador
 wrote:

On Sun, Jul 14, 2013 at 11:40 PM, Fabio Estevam  wrote:

From: Fabio Estevam 

mx6qsabrelite and nitrogen6q boards are hardware compatible, so let's avoid the
code duplication and only use the nitrogen6x source code to make board code
maintainance easier.

Tested booting a mainline device tree kernel on a mx6qsabrelite board.

Signed-off-by: Fabio Estevam 


I think this is a huge improvement I am just not sure about the
environment preserving for sabrelite. I think most people using
sabrelite end using the U-Boot from SPI NOR.


I can't say whether SPI NOR or SD card is the most common medium for
storing the environment variables for sabrelite, but my main goal here
was to try to keep compability with existing code.

Currently mx6qsabrelite defines CONFIG_ENV_IS_IN_MMC, so I kept the
same here. This patch introduces no change in functional behaviour.

If we think CONFIG_ENV_IS_IN_xxx should be changed, then this is
something to be handled by a separate patch.


Agreed :-)

Reviewed-by: Otavio Salvador 



+1

We should also add something to the README file though.

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


Re: [U-Boot] [PATCH v2] blackfin: Fix using gd->baudrate before setting its value

2013-07-14 Thread Zhang, Sonic
Hi Axel,

It is in the blackfin u-boot next tree.

Regards,

Sonic

>-Original Message-
>From: Axel Lin [mailto:axel@ingics.com]
>Sent: Sunday, July 14, 2013 3:06 PM
>To: Sonic Zhang
>Cc: Zhang, Sonic; Tom Rini; Marek Vasut; Bob Liu; U-Boot
>Subject: Re: [U-Boot] [PATCH v2] blackfin: Fix using gd->baudrate before 
>setting
>its value
>
>2013/7/1 Sonic Zhang :
>> Acked-by: Sonic Zhang
>
>hi Sonic,
>I thought you will pick up this patch, but now I got your ACK and I have no 
>idea
>who will take this patch.
>
>Just wondering if this patch should be applied for v2013.07?
>
>Regards,
>Axel


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


Re: [U-Boot] [PATCH] mx6qsabrelite: Remove mx6qsabrelite code in favor of nitrogen6x

2013-07-14 Thread Fabio Estevam
Hi Eric,

On Mon, Jul 15, 2013 at 1:09 AM, Eric Nelson
 wrote:

>> Agreed :-)
>>
>> Reviewed-by: Otavio Salvador 
>>
>
> +1
>
> We should also add something to the README file though.

In this patch I am still using the original README's:

rename board/{freescale/mx6qsabrelite/README =>
boundary/nitrogen6x/README.mx6qsabrelite} (100%)
rename board/boundary/nitrogen6x/{README => README.nitrogen6x} (100%)

What would you like me to the README?

Regards,

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


[U-Boot] random compile error "unrecognized command line option '-mshort-load-bytes'" with arm-eabi-gcc 4.6.x

2013-07-14 Thread Yingchun Li
I have ported u-boot to my android4.2 source and use the android toolchain,
which has a gcc version 4.6.x-google 20120106.
my envisionment for build: ubuntu 10.04, with a host gcc version 4.4.3.
my platform is arm-v7, cotex-a5.
the problem is that some times u-boot will encounter the following compile
error(I use a 'make -j32' for building android):

target thumb C++: libGLES_trace <=
frameworks/native/opengl/libs/GLES_trace/src/gltrace_context.cpp
CC  ispi.c
target thumb C++: libGLES_trace <=
frameworks/native/opengl/libs/GLES_trace/src/gltrace_egl.cpp
CC  spl.c
target thumb C++: libGLES_trace <=
frameworks/native/opengl/libs/GLES_trace/src/gltrace_eglapi.cpp

MAKEarch/arm/lib/
CC  timer.c
cc1: error: unrecognized command line option '-mshort-load-bytes'
make[2]: *** 
[/home/jenkins/workspace/droid-4.2.2_r1/out/target/product/aere/obj/u-boot/arch/arm/cpu/armv7/rda/timer.o]
Error 1
make[1]: *** 
[/home/jenkins/workspace/droid-4.2.2_r1/out/target/product/aere/obj/u-boot/arch/arm/cpu/armv7/rda/librda.o]
Error 2
make[1]: Leaving directory `/home/jenkins/workspace/rdadroid-4.2.2_r1/u-boot'
make: *** [out/target/product/aere/obj/u-boot/u-boot.img] Error 2
make: *** Waiting for unfinished jobs


but if I build it again, the compile error disappeared。

I know the gcc after 3.5 don't support option -mshort-load-bytes, but my
gcc-version
is 4.6, and I checked include/generated/cc_options.mk, if build fail, the
content is:
"CC_OPTIONS += -marm
CC_OPTIONS += -mno-thumb-interwork
CC_OPTIONS += -mabi=apcs-gnu
CC_OPTIONS += -mabi=aapcs-linux
CC_OPTIONS += -march=armv7-a
CC_OPTIONS += -fno-stack-protector
CC_OPTIONS += -Wno-format-nonliteral
CC_OPTIONS += -Wno-format-security
CC_OPTIONS += -fstack-usage
CC_OPTIONS += -fno-toplevel-reorder
CC_OPTIONS += -mshort-load-bytes
"
if success, there is no "CC_OPTIONS += -mshort-load-bytes".
so, anyone can tell me how to debug this problems?
thank you!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot