[U-Boot] [PATCH] [trivial] env: remove value from boolean defines

2011-12-25 Thread Igor Grinberg
Several boolean defines have a value assigned.
Remove the value as defining the symbol is enough.

Signed-off-by: Igor Grinberg grinb...@compulab.co.il
---
 include/environment.h |8 
 tools/envcrc.c|6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/environment.h b/include/environment.h
index 3c145af..1ef44f3 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -22,7 +22,7 @@
  */
 
 #ifndef _ENVIRONMENT_H_
-#define _ENVIRONMENT_H_1
+#define _ENVIRONMENT_H_
 
 /**
  *
@@ -64,10 +64,10 @@
 # if   (CONFIG_ENV_ADDR = CONFIG_SYS_MONITOR_BASE)  \
(CONFIG_ENV_ADDR + CONFIG_ENV_SIZE) =  \
(CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
-#  define ENV_IS_EMBEDDED  1
+#  define ENV_IS_EMBEDDED
 # endif
 # if defined(CONFIG_ENV_ADDR_REDUND) || defined(CONFIG_ENV_OFFSET_REDUND)
-#  define CONFIG_SYS_REDUNDAND_ENVIRONMENT 1
+#  define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 # endif
 # ifdef CONFIG_ENV_IS_EMBEDDED
 #  error do not define CONFIG_ENV_IS_EMBEDDED in your board config
@@ -120,7 +120,7 @@ extern unsigned long nand_env_oob_offset;
  * calculated automatically (i.e. NAND), take the board opt-in.
  */
 #if defined(CONFIG_ENV_IS_EMBEDDED)  !defined(ENV_IS_EMBEDDED)
-# define ENV_IS_EMBEDDED 1
+# define ENV_IS_EMBEDDED
 #endif
 
 /* The build system likes to know if the env is embedded */
diff --git a/tools/envcrc.c b/tools/envcrc.c
index 51e3f54..08d2a8f 100644
--- a/tools/envcrc.c
+++ b/tools/envcrc.c
@@ -53,15 +53,15 @@
 # endif
 # if (CONFIG_ENV_ADDR = CONFIG_SYS_MONITOR_BASE)  \
  ((CONFIG_ENV_ADDR + CONFIG_ENV_SIZE) = (CONFIG_SYS_MONITOR_BASE + 
CONFIG_SYS_MONITOR_LEN))
-#  define ENV_IS_EMBEDDED  1
+#  define ENV_IS_EMBEDDED
 # endif
 # if defined(CONFIG_ENV_ADDR_REDUND) || defined(CONFIG_ENV_OFFSET_REDUND)
-#  define CONFIG_SYS_REDUNDAND_ENVIRONMENT 1
+#  define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 # endif
 #endif /* CONFIG_ENV_IS_IN_FLASH */
 
 #if defined(ENV_IS_EMBEDDED)  !defined(CONFIG_BUILD_ENVCRC)
-# define CONFIG_BUILD_ENVCRC 1
+# define CONFIG_BUILD_ENVCRC
 #endif
 
 #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT
-- 
1.7.3.4

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


Re: [U-Boot] [PATCH] [trivial] env: remove value from boolean defines

2011-12-25 Thread Marek Vasut
 Several boolean defines have a value assigned.
 Remove the value as defining the symbol is enough.
 
 Signed-off-by: Igor Grinberg grinb...@compulab.co.il

I'm fine with this. How did you find it ?

M

 ---
  include/environment.h |8 
  tools/envcrc.c|6 +++---
  2 files changed, 7 insertions(+), 7 deletions(-)
 
 diff --git a/include/environment.h b/include/environment.h
 index 3c145af..1ef44f3 100644
 --- a/include/environment.h
 +++ b/include/environment.h
 @@ -22,7 +22,7 @@
   */
 
  #ifndef _ENVIRONMENT_H_
 -#define _ENVIRONMENT_H_  1
 +#define _ENVIRONMENT_H_
 
  /*
 * *
 @@ -64,10 +64,10 @@
  # if (CONFIG_ENV_ADDR = CONFIG_SYS_MONITOR_BASE)  \
   (CONFIG_ENV_ADDR + CONFIG_ENV_SIZE) =  \
   (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
 -#  define ENV_IS_EMBEDDED1
 +#  define ENV_IS_EMBEDDED
  # endif
  # if defined(CONFIG_ENV_ADDR_REDUND) || defined(CONFIG_ENV_OFFSET_REDUND)
 -#  define CONFIG_SYS_REDUNDAND_ENVIRONMENT   1
 +#  define CONFIG_SYS_REDUNDAND_ENVIRONMENT
  # endif
  # ifdef CONFIG_ENV_IS_EMBEDDED
  #  error do not define CONFIG_ENV_IS_EMBEDDED in your board config
 @@ -120,7 +120,7 @@ extern unsigned long nand_env_oob_offset;
   * calculated automatically (i.e. NAND), take the board opt-in.
   */
  #if defined(CONFIG_ENV_IS_EMBEDDED)  !defined(ENV_IS_EMBEDDED)
 -# define ENV_IS_EMBEDDED 1
 +# define ENV_IS_EMBEDDED
  #endif
 
  /* The build system likes to know if the env is embedded */
 diff --git a/tools/envcrc.c b/tools/envcrc.c
 index 51e3f54..08d2a8f 100644
 --- a/tools/envcrc.c
 +++ b/tools/envcrc.c
 @@ -53,15 +53,15 @@
  # endif
  # if (CONFIG_ENV_ADDR = CONFIG_SYS_MONITOR_BASE)  \
   ((CONFIG_ENV_ADDR + CONFIG_ENV_SIZE) = (CONFIG_SYS_MONITOR_BASE +
 CONFIG_SYS_MONITOR_LEN)) -#  define ENV_IS_EMBEDDED   1
 +#  define ENV_IS_EMBEDDED
  # endif
  # if defined(CONFIG_ENV_ADDR_REDUND) || defined(CONFIG_ENV_OFFSET_REDUND)
 -#  define CONFIG_SYS_REDUNDAND_ENVIRONMENT   1
 +#  define CONFIG_SYS_REDUNDAND_ENVIRONMENT
  # endif
  #endif   /* CONFIG_ENV_IS_IN_FLASH */
 
  #if defined(ENV_IS_EMBEDDED)  !defined(CONFIG_BUILD_ENVCRC)
 -# define CONFIG_BUILD_ENVCRC 1
 +# define CONFIG_BUILD_ENVCRC
  #endif
 
  #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC 00/14] x86 touch-ups (Includes new init sequence!)

2011-12-25 Thread Graeme Russ
On 23/12/11 23:25, Graeme Russ wrote:

[snip]

 So a quick overview of the new sequence and it's associated elegance (IMHO)
 (keep in mind this is x86 centric)
  - CPU boots and runs the reset vector code
  - early_board_init performs any insanely-low-level init that is needed
  - car_init sets up Cache-As-RAM (and clears it so gd is zero'd)
  - set up a stack in CAR
  - call board_init_f() passing the address of gd in CAR[1][2]
  - board_init_f() runs the 'init_sequence_f' functions which should
initialise console and SDRAM
  - board_init_f() calls back into the assembler routine
board_init_f_r_trampoline - This routine is very simple - It creates a
new stack in SDRAM and calls back into board_init_f_r
  - board_init_f_r is running in Flash, but with SDRAM initialised. It
runs an init loop which copies gd from CAR to SDRAM, initialises the
CPU cache (which destroys all data in CAR, but that is all safely in
RAM by now), copies U-Boot to RAM, clears BSS and jumps to the in-RAM
version of board_init_r which finishes the initialisation and enters
the main loop
 
 The memory layout for x86 is pretty simple right now - gd is at top-of-RAM
 and the stack sits just below it. U-Boot .text, .data, .bss etc are below
 the stack and the heap is below U-Boot. I understand that other arch's are
 more complex (LCD frame buffers in top-of-RAM for example) - I think this
 can all be dealt with elegantly with this code as well, but I have not
 attempted to do so
 
  [1] The board_init_f() has different meanings for different arch's already
  [2] This parameter is not used, but could be in future to remove the 'gd
  pointer in a fixed register' hack

This will not work as printf() and friends require a functional Global Data
pointer

Passing a Global Data pointer to board_init_f_r() like I do is also
problematic - I move Global Data to RAM and trash the in-cache copy, but
the gd still points to the (now trashed) cache copy until we jump to RAM
(quite frankly, I don't know how it worked in the first place...)

The only way this can work is if I either:
 1) Reserve a register, or
 2) Reserve a writeable location in some memory location which is available
prior to SDRAM init

x86 is the only arch that does not use a reserved register for the global
data pointer, but I have proved previously that x86 is capable of this
construct:

http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/88462

So I'll adjust this patch set accordingly

Regards,

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


Re: [U-Boot] [PATCH] [trivial] env: remove value from boolean defines

2011-12-25 Thread Igor Grinberg
On 12/26/11 01:34, Marek Vasut wrote:
 Several boolean defines have a value assigned.
 Remove the value as defining the symbol is enough.

 Signed-off-by: Igor Grinberg grinb...@compulab.co.il
 
 I'm fine with this. How did you find it ?

Occasionally...
I told you (at the KS) I'm working on something environment related.
I hope to post it soon (before the end of the merge window).


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


[U-Boot] [PATCH] [trivial] common.h: remove value from bool defines

2011-12-25 Thread Igor Grinberg
Several boolean defines have a value assigned.
Remove the value as defining the symbol is enough.

Signed-off-by: Igor Grinberg grinb...@compulab.co.il
---
 include/common.h |   16 
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/common.h b/include/common.h
index 5cfdd76..695e43c 100644
--- a/include/common.h
+++ b/include/common.h
@@ -22,10 +22,10 @@
  */
 
 #ifndef __COMMON_H_
-#define __COMMON_H_1
+#define __COMMON_H_
 
 #undef _LINUX_CONFIG_H
-#define _LINUX_CONFIG_H 1  /* avoid reading Linux autoconf.h file  */
+#define _LINUX_CONFIG_H/* avoid reading Linux autoconf.h file  
*/
 
 #ifndef __ASSEMBLY__   /* put C only stuff in this section */
 
@@ -51,18 +51,18 @@ typedef volatile unsigned char  vu_char;
 defined(CONFIG_MPC859DSL)  || \
 defined(CONFIG_MPC866) || defined(CONFIG_MPC866T)  || \
 defined(CONFIG_MPC866P)
-# define CONFIG_MPC866_FAMILY 1
+# define CONFIG_MPC866_FAMILY
 #elif defined(CONFIG_MPC870) \
|| defined(CONFIG_MPC875) \
|| defined(CONFIG_MPC880) \
|| defined(CONFIG_MPC885)
-# define CONFIG_MPC885_FAMILY   1
+# define CONFIG_MPC885_FAMILY
 #endif
 #if   defined(CONFIG_MPC860)  \
|| defined(CONFIG_MPC860T) \
|| defined(CONFIG_MPC866_FAMILY) \
|| defined(CONFIG_MPC885_FAMILY)
-# define CONFIG_MPC86x 1
+# define CONFIG_MPC86x
 #endif
 #elif defined(CONFIG_5xx)
 #include asm/5xx_immap.h
@@ -77,10 +77,10 @@ typedef volatile unsigned char  vu_char;
|| defined(CONFIG_MPC8248) \
|| defined(CONFIG_MPC8271) \
|| defined(CONFIG_MPC8272)
-#define CONFIG_MPC8272_FAMILY  1
+#define CONFIG_MPC8272_FAMILY
 #endif
 #if defined(CONFIG_MPC8272_FAMILY)
-#define CONFIG_MPC8260 1
+#define CONFIG_MPC8260
 #endif
 #include asm/immap_8260.h
 #endif
@@ -200,7 +200,7 @@ typedef void (interrupt_handler_t)(void *);
  || defined(CONFIG_8xx_CONS_SCC1) || defined(CONFIG_8xx_CONS_SCC2) \
  || defined(CONFIG_8xx_CONS_SCC3) || defined(CONFIG_8xx_CONS_SCC4)
 
-#define CONFIG_SERIAL_MULTI1
+#define CONFIG_SERIAL_MULTI
 
 #endif
 
-- 
1.7.3.4

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


Re: [U-Boot] [RFC 00/14] x86 touch-ups (Includes new init sequence!)

2011-12-25 Thread Simon Glass
Hi Graeme,

On Sun, Dec 25, 2011 at 9:18 PM, Graeme Russ graeme.r...@gmail.com wrote:
 On 23/12/11 23:25, Graeme Russ wrote:

 [snip]

 So a quick overview of the new sequence and it's associated elegance
(IMHO)
 (keep in mind this is x86 centric)
  - CPU boots and runs the reset vector code
  - early_board_init performs any insanely-low-level init that is needed
  - car_init sets up Cache-As-RAM (and clears it so gd is zero'd)
  - set up a stack in CAR
  - call board_init_f() passing the address of gd in CAR[1][2]
  - board_init_f() runs the 'init_sequence_f' functions which should
initialise console and SDRAM
  - board_init_f() calls back into the assembler routine
board_init_f_r_trampoline - This routine is very simple - It creates a
new stack in SDRAM and calls back into board_init_f_r
  - board_init_f_r is running in Flash, but with SDRAM initialised. It
runs an init loop which copies gd from CAR to SDRAM, initialises the
CPU cache (which destroys all data in CAR, but that is all safely in
RAM by now), copies U-Boot to RAM, clears BSS and jumps to the in-RAM
version of board_init_r which finishes the initialisation and enters
the main loop

 The memory layout for x86 is pretty simple right now - gd is at
top-of-RAM
 and the stack sits just below it. U-Boot .text, .data, .bss etc are below
 the stack and the heap is below U-Boot. I understand that other arch's
are
 more complex (LCD frame buffers in top-of-RAM for example) - I think this
 can all be dealt with elegantly with this code as well, but I have not
 attempted to do so

  [1] The board_init_f() has different meanings for different arch's
already
  [2] This parameter is not used, but could be in future to remove the 'gd
  pointer in a fixed register' hack

 This will not work as printf() and friends require a functional Global
Data
 pointer

 Passing a Global Data pointer to board_init_f_r() like I do is also
 problematic - I move Global Data to RAM and trash the in-cache copy, but
 the gd still points to the (now trashed) cache copy until we jump to RAM
 (quite frankly, I don't know how it worked in the first place...)

 The only way this can work is if I either:
  1) Reserve a register, or
  2) Reserve a writeable location in some memory location which is
available
prior to SDRAM init

 x86 is the only arch that does not use a reserved register for the global
 data pointer, but I have proved previously that x86 is capable of this
 construct:

 http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/88462

 So I'll adjust this patch set accordingly

I have a unified board series for ARM and x86 so will see if I can send it.
Still needs work on x86.

Regards,
Simon


 Regards,

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


[U-Boot] [PATCH] i.mx6q: mx6qarm2: Enable the usboh3 clock

2011-12-25 Thread Dirk Behme
From: Eric Nelson eric.nel...@boundarydevices.com

Bits 0 and 1 of CCM_CCGR7 are the usboh3 clock enable bits. Enabling this
clock is necessary for the USB download.

Signed-off-by: Eric Nelson eric.nel...@boundarydevices.com
CC: Jason Hui jason@linaro.org
---
 board/freescale/mx6qarm2/imximage.cfg |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/board/freescale/mx6qarm2/imximage.cfg 
b/board/freescale/mx6qarm2/imximage.cfg
index ffac1b4..5f0ee0d 100644
--- a/board/freescale/mx6qarm2/imximage.cfg
+++ b/board/freescale/mx6qarm2/imximage.cfg
@@ -164,4 +164,4 @@ DATA 4 0x020c4070 0x0FFFC000
 DATA 4 0x020c4074 0x3FF0
 DATA 4 0x020c4078 0x00FFF300
 DATA 4 0x020c407c 0x0FC3
-DATA 4 0x020c4080 0x03FC
+DATA 4 0x020c4080 0x03FF
-- 
1.7.7.4

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


[U-Boot] [PATCH v3] i.mx: i.mx6q: add the initial support for i.mx6q Sabre Lite board

2011-12-25 Thread Dirk Behme
From: Jason Liu jason@linaro.org

Add the initial support for Freescale i.MX6Q Sabre Lite board

Signed-off-by: Dirk Behme dirk.be...@de.bosch.com
CC: Jason Liu jason@linaro.org
CC: Eric Nelson eric.nel...@boundarydevices.com
---
V3: Add a readme.
Enable the usboh3 clock: Bits 0 and 1 of CCM_CCGR7 are the usboh3
clock enable bits. Enabling this clock is necessary for the USB download:

-DATA 4 0x020c4080 0x03FC
+DATA 4 0x020c4080 0x03FF

V2: change the default script to let linaro image boot, and also
change the default env to dev 0, which is normal SD slot, not
the Micro-SD slot

 MAINTAINERS   |1 
 board/freescale/mx6qsabrelite/Makefile|   42 ++
 board/freescale/mx6qsabrelite/imximage.cfg|  170 ++
 board/freescale/mx6qsabrelite/mx6qsabrelite.c |  150 ++
 boards.cfg|1 
 doc/README.mx6qsabrelite  |   67 ++
 include/configs/mx6qsabrelite.h   |  162 
 7 files changed, 593 insertions(+)
 create mode 100644 board/freescale/mx6qsabrelite/Makefile
 create mode 100644 board/freescale/mx6qsabrelite/imximage.cfg
 create mode 100644 board/freescale/mx6qsabrelite/mx6qsabrelite.c
 create mode 100644 include/configs/mx6qsabrelite.h

Index: freescale-u-boot-imx.git/MAINTAINERS
===
--- freescale-u-boot-imx.git.orig/MAINTAINERS
+++ freescale-u-boot-imx.git/MAINTAINERS
@@ -579,6 +579,7 @@ Jason Liu r64...@freescale.com
mx53evk i.MX53
mx53locoi.MX53
mx6qarm2i.MX6Q
+   mx6qsabrelite   i.MX6Q
 
 Enric Balletbo i Serra eballe...@iseebcn.com
 
Index: freescale-u-boot-imx.git/board/freescale/mx6qsabrelite/Makefile
===
--- /dev/null
+++ freescale-u-boot-imx.git/board/freescale/mx6qsabrelite/Makefile
@@ -0,0 +1,42 @@
+#
+# Copyright (C) 2007, Guennadi Liakhovetski l...@denx.de
+#
+# (C) Copyright 2011 Freescale Semiconductor, Inc.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+COBJS  := mx6qsabrelite.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
Index: freescale-u-boot-imx.git/board/freescale/mx6qsabrelite/imximage.cfg
===
--- /dev/null
+++ freescale-u-boot-imx.git/board/freescale/mx6qsabrelite/imximage.cfg
@@ -0,0 +1,170 @@
+# Copyright (C) 2011 Freescale Semiconductor, Inc.
+# Jason Liu r64...@freescale.com
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not write to the Free Software
+# Foundation Inc. 51 Franklin Street Fifth Floor Boston,
+# MA 02110-1301 USA
+#
+# Refer docs/README.imxmage for more details about how-to configure
+# and create imximage boot image
+#
+# The syntax is taken as close as possible with the kwbimage
+
+# image version
+
+IMAGE_VERSION 2
+
+# Boot Device : one of
+# spi, sd (the board has no nand neither onenand)
+
+BOOT_FROM  sd
+
+# Device Configuration Data (DCD)
+#
+# Each entry must have the format:
+# Addr-type   AddressValue
+#
+#