[U-Boot] [RFCv2a PATCH 06/14] kconfig: switch to Kconfig

2014-05-27 Thread Masahiro Yamada
This commit enables Kconfig.
Going forward, we use Kconfig for board configuration.
mkconfig will never be used. Nor will include/config.mk be generated.

Kconfig must be adjusted for U-Boot because our situation is
a little more complicated than Linux Kernel.
We have to generate multiple binary images (Full U-Boot, SPL, TPL)
from one source tree.
Each image needs each configuration input.

Our approach is like this:

Every board has a signle defconfig file under configs directory.
SPL/TPL image, if it is supported, shares the same defconfig file
with the full U-boot image.

First, you need to configure for the target baord like this.

 make board_name_defconfig

A file .config will be created, storing configs setting
for all the images of the  target board.
You can use make config, make menuconfig etc. to create
a new .config or modify the existing one.

And then run make.

Kbuild will automatically invoke make silentoldconfig if auto.conf
is missing or need to be updated.
The full, SPL, TPL image has its own auto.conf:
  - include/config/auto.conf  (for full image)
  - spl/include/config/auto.conf  (for SPL)
  - tpl/include/config/auto.conf  (for TPL)

How to generate three different auto.conf file from the same .config ?

The key is CONFIG_SPL_BUILD and CONFIG_TPL_BUILD.
CONFIG_SPL_BUILD is defined for both SPL and TPL, while CONFIG_TPL
is only for TPL image.

Some config macros only make sense for the full U-Boot.

For instance,

If you describe Kconfig entry like this:

config SYS_HUSH_PARSER
bool Hush Parser
depends on !SPL_BUILD

CONFIG_SYS_HUSH_PARSER will be conceiled from SPL/TPL auto.conf.

If you want to set a config macro for each image separately,
you need to define another CONFIG.
Maybe CONFIG_SPL_ or CPNFIG_TPL_ prefix would be better for clarification.
For example,  CONFIG_SYS_TEXT_BASE, CONFIG_SPL_TEXT_BASE,
CONFIG_TPL_TEXT_BASE, respectively.

I have to admit duplicating config macros is painful but we get
a single defconfig file in return.

By the way, there is another item worth remarking here:
coexistence of Kconfig and board herder files.

Prior to Kconfig, we used C headers to define define a set of configs.

We expect a very long term to move existing config macros to Kconfig.
Two different infractructure must coexist in the interim.

In our former configuration scheme, include/autoconf.mk was generated
for the use in makefiles.
It is still generated in include/, spl/include/, tpl/include/ directory
for the full, SPL, TPL image, respectively.

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
---

 .gitignore|   2 -
 Makefile  | 114 ++
 arch/m68k/cpu/mcf52x2/config.mk   |  16 +++---
 arch/m68k/cpu/mcf532x/config.mk   |   6 +-
 arch/m68k/cpu/mcf5445x/config.mk  |   4 +-
 arch/powerpc/cpu/ppc4xx/config.mk |   4 +-
 config.mk |  10 
 include/.gitignore|   1 -
 scripts/Makefile  |   2 +-
 scripts/Makefile.autoconf | 100 +
 scripts/Makefile.build|  31 ---
 scripts/basic/fixdep.c|   6 +-
 scripts/kconfig/Makefile  |  12 +++-
 scripts/kconfig/confdata.c|   8 +++
 scripts/silentoldconfig.sh|  71 
 spl/Makefile  |  31 +--
 tools/Makefile|   2 +-
 tools/env/Makefile|   2 +-
 18 files changed, 291 insertions(+), 131 deletions(-)
 create mode 100644 scripts/Makefile.autoconf
 create mode 100644 scripts/silentoldconfig.sh

diff --git a/.gitignore b/.gitignore
index a6b2d1c..abb92cd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -56,8 +56,6 @@
 #
 /include/config/
 /include/generated/
-/include/spl-autoconf.mk
-/include/tpl-autoconf.mk
 
 # stgit generated dirs
 patches-*
diff --git a/Makefile b/Makefile
index 928a880..cce091f 100644
--- a/Makefile
+++ b/Makefile
@@ -166,9 +166,6 @@ VPATH   := $(srctree)$(if 
$(KBUILD_EXTMOD),:$(KBUILD_EXTMOD))
 
 export srctree objtree VPATH
 
-MKCONFIG   := $(srctree)/mkconfig
-export MKCONFIG
-
 # Make sure CDPATH settings don't interfere
 unexport CDPATH
 
@@ -189,9 +186,6 @@ HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \
 
 export HOSTARCH HOSTOS
 
-# Deal with colliding definitions from tcsh etc.
-VENDOR=
-
 #
 
 # set default to nothing for native builds
@@ -199,6 +193,9 @@ ifeq ($(HOSTARCH),$(ARCH))
 CROSS_COMPILE ?=
 endif
 
+KCONFIG_CONFIG ?= .config
+export KCONFIG_CONFIG
+
 # SHELL used by kbuild
 CONFIG_SHELL := $(shell if [ -x $$BASH ]; then echo $$BASH; \
  else if [ -x /bin/bash ]; then echo /bin/bash; \
@@ -477,28 +474,51 @@ ifeq ($(config-targets),1)
 # Read arch specific Makefile to set KBUILD_DEFCONFIG as needed.
 # KBUILD_DEFCONFIG may point out an alternative default 

[U-Boot] [RFCv2a PATCH 08/14] buildman: adjust for Kconfig

2014-05-27 Thread Masahiro Yamada
Use make board_defconfig instead of make board_config.

FIXME!
This fixup is bad because it spends still depends on boards.cfg
to support options such as -a ARCH, -c CPU etc.
We want to delete it when switching to Kconfig.

We have to invent another method without using boards.cfg.

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
---

 tools/buildman/board.py   | 2 +-
 tools/buildman/builder.py | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/buildman/board.py b/tools/buildman/board.py
index 5172a47..7bcc932 100644
--- a/tools/buildman/board.py
+++ b/tools/buildman/board.py
@@ -17,7 +17,7 @@ class Board:
 soc: Name of SOC, or '' if none (e.g. mx31)
 vendor: Name of vendor (e.g. armltd)
 board_name: Name of board (e.g. integrator)
-target: Target name (use make target_config to configure)
+target: Target name (use make target_defconfig to configure)
 options: board-specific options (e.g. integratorcp:CM1136)
 
 self.target = target
diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py
index 4a2d753..6ccb5f6 100644
--- a/tools/buildman/builder.py
+++ b/tools/buildman/builder.py
@@ -198,7 +198,7 @@ class BuilderThread(threading.Thread):
 commit_upto: Commit number to build (0...n-1)
 brd: Board object to build
 work_dir: Directory to which the source will be checked out
-do_config: True to run a make board_config on the source
+do_config: True to run a make board_defconfig on the source
 force_build: Force a build even if one was previously done
 
 Returns:
@@ -251,7 +251,7 @@ class BuilderThread(threading.Thread):
 args = ['O=build', '-s']
 if self.builder.num_jobs is not None:
 args.extend(['-j', str(self.builder.num_jobs)])
-config_args = ['%s_config' % brd.target]
+config_args = ['%s_defconfig' % brd.target]
 config_out = ''
 args.extend(self.builder.toolchains.GetMakeArguments(brd))
 
@@ -404,7 +404,7 @@ class BuilderThread(threading.Thread):
 work_dir = self.builder.GetThreadDir(self.thread_num)
 self.toolchain = None
 if job.commits:
-# Run 'make board_config' on the first commit
+# Run 'make board_defconfig' on the first commit
 do_config = True
 commit_upto  = 0
 force_build = False
-- 
1.9.1

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


[U-Boot] [RFCv2a PATCH 04/14] kconfig: add basic Kconfig files

2014-05-27 Thread Masahiro Yamada
This commit adds more Kconfig files, which were written by hand.

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
---

 Kconfig  | 41 +
 arch/Kconfig | 66 
 2 files changed, 107 insertions(+)
 create mode 100644 Kconfig
 create mode 100644 arch/Kconfig

diff --git a/Kconfig b/Kconfig
new file mode 100644
index 000..4ddb425
--- /dev/null
+++ b/Kconfig
@@ -0,0 +1,41 @@
+#
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/kconfig-language.txt.
+#
+mainmenu U-Boot $UBOOTVERSION Configuration
+
+config UBOOTVERSION
+   string
+   option env=UBOOTVERSION
+
+config KCONFIG_OBJDIR
+   string
+   option env=KCONFIG_OBJDIR
+
+menu General setup
+
+config SPL_BUILD
+   bool
+   depends on $KCONFIG_OBJDIR=spl/ || $KCONFIG_OBJDIR=tpl/
+   default y
+
+config TPL_BUILD
+   bool
+   depends on $KCONFIG_OBJDIR=tpl/
+   default y
+
+config SPL
+   bool
+   prompt Build SPL image if !SPL_BUILD
+   default y if SPL_BUILD
+
+config TPL
+   bool
+   depends on SPL
+   prompt Build TPL image if !SPL_BUILD
+   default y if TPL_BUILD
+   default n
+
+endmenu# General setup
+
+source arch/Kconfig
diff --git a/arch/Kconfig b/arch/Kconfig
new file mode 100644
index 000..8620a4f
--- /dev/null
+++ b/arch/Kconfig
@@ -0,0 +1,66 @@
+choice
+   prompt Architecture select
+   default SANDBOX
+
+config ARC
+   bool ARC architecture
+
+config ARM
+   bool ARM architecture
+
+config AVR32
+   bool AVR32 architecture
+
+config BLACKFIN
+   bool Blackfin architecture
+
+config M68K
+   bool M68000 architecture
+
+config MICROBLAZE
+   bool MicroBlaze architecture
+
+config MIPS
+   bool MIPS architecture
+
+config NDS32
+   bool NDS32 architecture
+
+config NIOS2
+   bool Nios II architecture
+
+config OPENRISC
+   bool OpenRISC architecture
+
+config PPC
+   bool PowerPC architecture
+
+config SANDBOX
+   bool Sandbox
+
+config SH
+   bool SuperH architecture
+
+config SPARC
+   bool SPARC architecture
+
+config X86
+   bool x86 architecture
+
+endchoice
+
+source arch/arc/Kconfig
+source arch/arm/Kconfig
+source arch/avr32/Kconfig
+source arch/blackfin/Kconfig
+source arch/m68k/Kconfig
+source arch/microblaze/Kconfig
+source arch/mips/Kconfig
+source arch/nds32/Kconfig
+source arch/nios2/Kconfig
+source arch/openrisc/Kconfig
+source arch/powerpc/Kconfig
+source arch/sandbox/Kconfig
+source arch/sh/Kconfig
+source arch/sparc/Kconfig
+source arch/x86/Kconfig
-- 
1.9.1

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


[U-Boot] [RFCv2a PATCH 11/14] kconfig: remove old script

2014-05-27 Thread Masahiro Yamada
mkconfig is no longer used in Kconfig.

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
---

 mkconfig | 192 ---
 1 file changed, 192 deletions(-)
 delete mode 100755 mkconfig

diff --git a/mkconfig b/mkconfig
deleted file mode 100755
index cd911a9..000
--- a/mkconfig
+++ /dev/null
@@ -1,192 +0,0 @@
-#!/bin/sh -e
-
-# Script to create header files and links to configure
-# U-Boot for a specific board.
-#
-# Parameters:  Target  Architecture  CPU  Board [VENDOR] [SOC]
-#
-# (C) 2002-2013 DENX Software Engineering, Wolfgang Denk w...@denx.de
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-
-APPEND=no  # Default: Create new config file
-BOARD_NAME=  # Name to print in make output
-TARGETS=
-
-arch=
-cpu=
-board=
-vendor=
-soc=
-options=
-
-if [ \( $# -eq 2 \) -a \( $1 = -A \) ] ; then
-   # Automatic mode
-   line=`awk '($0 !~ /^#/  $7 ~ /^'$2'$/) { print $1, $2, $3, $4, $5, 
$6, $7, $8 }' $srctree/boards.cfg`
-   if [ -z $line ] ; then
-   echo make: *** No rule to make target \`$2_config'.  Stop. 2
-   exit 1
-   fi
-
-   set ${line}
-   # add default board name if needed
-   [ $# = 3 ]  set ${line} ${1}
-fi
-
-while [ $# -gt 0 ] ; do
-   case $1 in
-   --) shift ; break ;;
-   -a) shift ; APPEND=yes ;;
-   -n) shift ; BOARD_NAME=${7%_config} ; shift ;;
-   -t) shift ; TARGETS=`echo $1 | sed 's:_: :g'` ${TARGETS} ; shift ;;
-   *)  break ;;
-   esac
-done
-
-[ $# -lt 7 ]  exit 1
-[ $# -gt 8 ]  exit 1
-
-# Strip all options and/or _config suffixes
-CONFIG_NAME=${7%_config}
-
-[ ${BOARD_NAME} ] || BOARD_NAME=${7%_config}
-
-arch=$2
-cpu=`echo $3 | awk 'BEGIN {FS = :} ; {print $1}'`
-spl_cpu=`echo $3 | awk 'BEGIN {FS = :} ; {print $2}'`
-if [ $6 = none ] ; then
-   board=
-elif [ $6 = - ] ; then
-   board=${BOARD_NAME}
-else
-   board=$6
-fi
-[ $5 != - ]  vendor=$5
-[ $4 != - ]  soc=$4
-[ $# -gt 7 ]  [ $8 != - ]  {
-   # check if we have a board config name in the options field
-   # the options field mave have a board config name and a list
-   # of options, both separated by a colon (':'); the options are
-   # separated by commas (',').
-   #
-   # Check for board name
-   tmp=${8%:*}
-   if [ $tmp ] ; then
-   CONFIG_NAME=$tmp
-   fi
-   # Check if we only have a colon...
-   if [ ${tmp} != $8 ] ; then
-   options=${8#*:}
-   TARGETS=`echo ${options} | sed 's:,: :g'` ${TARGETS}
-   fi
-}
-
-if [ ${ARCH} -a ${ARCH} != ${arch} ]; then
-   echo Failed: \$ARCH=${ARCH}, should be '${arch}' for ${BOARD_NAME} 
12
-   exit 1
-fi
-
-#
-# Test above needed aarch64, now we need arm
-#
-if [ ${arch} = aarch64 ]; then
-   arch=arm
-fi
-
-if [ $options ] ; then
-   echo Configuring for ${BOARD_NAME} - Board: ${CONFIG_NAME}, Options: 
${options}
-else
-   echo Configuring for ${BOARD_NAME} board...
-fi
-
-#
-# Create link to architecture specific headers
-#
-if [ -n $KBUILD_SRC ] ; then
-   mkdir -p ${objtree}/include
-   LNPREFIX=${srctree}/arch/${arch}/include/asm/
-   cd ${objtree}/include
-   mkdir -p asm
-else
-   cd arch/${arch}/include
-fi
-
-rm -f asm/arch
-
-if [ -z ${soc} ] ; then
-   ln -s ${LNPREFIX}arch-${cpu} asm/arch
-else
-   ln -s ${LNPREFIX}arch-${soc} asm/arch
-fi
-
-if [ ${arch} = arm ] ; then
-   rm -f asm/proc
-   ln -s ${LNPREFIX}proc-armv asm/proc
-fi
-
-if [ -z $KBUILD_SRC ] ; then
-   cd ${srctree}/include
-fi
-
-#
-# Create include file for Make
-#
-( echo ARCH   = ${arch}
-if [ ! -z $spl_cpu ] ; then
-   echo 'ifeq ($(CONFIG_SPL_BUILD),y)'
-   echo CPU= ${spl_cpu}
-   echo else
-   echo CPU= ${cpu}
-   echo endif
-else
-   echo CPU= ${cpu}
-fi
-echo BOARD  = ${board}
-
-[ ${vendor} ]  echo VENDOR = ${vendor}
-[ ${soc}]  echo SOC= ${soc}
-exit 0 )  config.mk
-
-# Assign board directory to BOARDIR variable
-if [ -z ${vendor} ] ; then
-BOARDDIR=${board}
-else
-BOARDDIR=${vendor}/${board}
-fi
-
-#
-# Create board specific header file
-#
-if [ $APPEND = yes ]   # Append to existing config file
-then
-   echo  config.h
-else
-config.h  # Create new config file
-fi
-echo /* Automatically generated - do not edit */ config.h
-
-for i in ${TARGETS} ; do
-   i=`echo ${i} | sed '/=/ {s/=/  /;q; } ; { s/$/ 1/; }'`
-   echo #define CONFIG_${i} config.h ;
-done
-
-echo #define CONFIG_SYS_ARCH  \${arch}\   config.h
-echo #define CONFIG_SYS_CPU   \${cpu}\config.h
-echo #define CONFIG_SYS_BOARD \${board}\  config.h
-
-[ ${vendor} ]  echo #define CONFIG_SYS_VENDOR \${vendor}\  config.h
-
-[ ${soc}]  echo #define CONFIG_SYS_SOC\${soc}\ config.h
-
-[ ${board}  ]  echo #define CONFIG_BOARDDIR board/$BOARDDIR  config.h
-cat  EOF  config.h
-#include config_cmd_defaults.h

[U-Boot] [RFCv2a PATCH 07/14] MAKEALL: adjust for Kconfig

2014-05-27 Thread Masahiro Yamada
Use make board_defconfig instead of make board_config.

FIXME!
This fixup is bad because it spends still depends on boards.cfg
to support options such as -a ARCH, -c CPU etc.
We want to delete it when switching to Kconfig.

We have to invent another method without using boards.cfg.

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
---

 MAKEALL | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/MAKEALL b/MAKEALL
index 020e65f..45b28f4 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -506,9 +506,9 @@ get_target_location() {
 
set ${line}
 
-   CONFIG_NAME=${7%_config}
+   CONFIG_NAME=${7%_defconfig}
 
-   [ ${BOARD_NAME} ] || BOARD_NAME=${7%_config}
+   [ ${BOARD_NAME} ] || BOARD_NAME=${7%_defconfig}
 
if [ $# -gt 5 ]; then
if [ $6 = - ] ; then
@@ -645,7 +645,7 @@ build_target() {
fi
 
${MAKE} distclean /dev/null
-   ${MAKE} -s ${target}_config
+   ${MAKE} -s ${target}_defconfig
 
${MAKE} ${JOBS} ${CHECK} all \
${LOG_DIR}/$target.MAKELOG 2 ${LOG_DIR}/$target.ERR
-- 
1.9.1

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


[U-Boot] [RFCv2a PATCH 02/14] Do not apply: tools: add genkconfig

2014-05-27 Thread Masahiro Yamada
 
 Do not apply this patch to the main line
 

 What is this tool?
 --

This tool converts boards.cfg to defconfig and Kconfig files.

It automatically generates
 - arch/${ARCH}/Kconfig
 - board/${VENDOR}/${BOARD}/Kconfig
 - board/${BOARD}/Kconfig
 - configs/*_defconfig

 How to use?
 ---

Open tools/print_allconfigs with an editor.

Adjust cross compilers part for your environment.

  # Specify your favoriate cross tools
  CROSS_COMPILE_ARC=arc-linux-
  CROSS_COMPILE_AARCH64=aarch64-linux-gnu-
  CROSS_COMPILE_ARM=arm-unknown-linux-gnueabi-
   [snip]
  CROSS_COMPILE_X86=i386-linux-

And then, run tools/genkconfig.

 Why is this patch here?
 ---

The file boards.cfg is touched very frequently.
All the time, new/old boards are being added/removed.

The next commit was generated based on the u-boot/master at the time
I posted it.
It will become out-dated soon.

You can update it with this tool.

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
---

 tools/genkconfig   | 244 +
 tools/print_allconfigs |  77 
 2 files changed, 321 insertions(+)
 create mode 100755 tools/genkconfig
 create mode 100755 tools/print_allconfigs

diff --git a/tools/genkconfig b/tools/genkconfig
new file mode 100755
index 000..bed188d
--- /dev/null
+++ b/tools/genkconfig
@@ -0,0 +1,244 @@
+#!/bin/bash
+
+set -e
+
+rm -rf configs
+mkdir -p configs/spl configs/tpl
+find board -name Kconfig | xargs rm -f
+
+get_arch()
+{
+   case $arch in
+   powerpc) echo PPC;;
+   *)   echo ${1^^};;
+   esac
+}
+
+arch_list=arc arm avr32 blackfin m68k microblaze mips nds32 nios2 openrisc 
powerpc sandbox sh sparc x86
+
+for arch in $arch_list
+do
+   ARCH=$(get_arch $arch)
+
+   case $arch in
+   blackfin) menu=Blackfin;;
+   m68k) menu=M68000;;
+   microblaze) menu=MicroBlaze;;
+   nios2) menu=Nios II;;
+   openrisc) menu=OpenRISC;;
+   powerpc) menu=PowerPC;;
+   sandbox) menu=Sandbox;;
+   sh) menu=SuperH;;
+   x86) menu=x86;;
+   *) menu=${arch^^};;
+   esac
+
+cat EOF  arch/$arch/Kconfig
+menu $menu architecture
+   depends on $ARCH
+
+config SYS_ARCH
+   string
+   default $arch
+
+EOF
+
+if [ $arch = sandbox ]; then
+cat EOF  arch/$arch/Kconfig
+config SYS_CPU
+   string
+   default $arch
+
+config SYS_BOARD
+   string
+   default $arch
+
+config SYS_CONFIG_NAME
+   string
+   default $arch
+EOF
+else
+cat EOF  arch/$arch/Kconfig
+choice
+   prompt Target select
+
+EOF
+fi
+
+done
+
+write_defconfig ()
+{
+   if [ $spl_enable = y ]; then
+   echo  $defconfig CONFIG_SPL=y
+   fi
+
+   if [ $tpl_enable = y ]; then
+   echo  $defconfig CONFIG_TPL=y
+   fi
+
+   echo  $defconfig CONFIG_$ARCH=y
+
+   if [ $arch != sandbox ]; then
+   echo  $defconfig CONFIG_$TARGET=y
+   fi
+}
+
+write_kconfig ()
+{
+   echo  $kconfig
+   echo  $kconfig if $TARGET
+   echo  $kconfig
+
+   echo  $kconfig config SYS_CPU
+   echo  $kconfig   string
+   if [ $spl_cpu != $cpu ]; then
+   echo  $kconfig   default \$spl_cpu\ if SPL_BUILD
+   echo  $kconfig   default \$cpu\ if !SPL_BUILD
+   else
+   echo  $kconfig   default \$cpu\
+   fi
+   echo  $kconfig
+
+   echo  $kconfig config SYS_BOARD
+   echo  $kconfig   string
+   echo  $kconfig   default \$board\
+   echo  $kconfig
+
+   if [ $vendor != - ]; then
+   echo  $kconfig config SYS_VENDOR
+   echo  $kconfig   string
+   echo  $kconfig   default \$vendor\
+   echo  $kconfig
+   fi
+
+   if [ $soc != - ]; then
+   echo  $kconfig config SYS_SOC
+   echo  $kconfig   string
+   echo  $kconfig   default \$soc\
+   echo  $kconfig
+   fi
+
+   echo  $kconfig config SYS_CONFIG_NAME
+   echo  $kconfig   string
+   echo  $kconfig   default \$config_name\
+   echo  $kconfig
+
+   if [ $extra_options ]; then
+   # O2MNT_O2M110, O2MNT_O2M112, O2MNT_O2M113 boards include
+   # double-quotations in the extra option field.
+   # We must escape them.
+   echo  $kconfig config SYS_EXTRA_OPTIONS
+   echo  $kconfig   string
+   echo  $kconfig   default \$(echo $extra_options | sed 
-e 's//\\/g')\
+   echo  $kconfig
+   fi
+
+   echo  $kconfig endif
+}
+
+sed -e 's/Orphan/Active/' -e '/#/d' boards.cfg | \
+tools/reformat.py -i -d '-' -s 8 |
+while read -r status arch cpu soc vendor board target options 

[U-Boot] [RFCv2a PATCH 09/14] kconfig: delete redundant CONFIG_${ARCH} definition

2014-05-27 Thread Masahiro Yamada
CONFIG_${ARCH} is defined by Kconfig.

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
Reviewed-by: Simon Glass s...@chromium.org
---

 arch/arc/config.mk   | 2 +-
 arch/arm/config.mk   | 2 +-
 arch/avr32/config.mk | 1 -
 arch/blackfin/config.mk  | 1 -
 arch/m68k/config.mk  | 2 +-
 arch/mips/config.mk  | 2 +-
 arch/nds32/config.mk | 2 +-
 arch/nios2/config.mk | 2 +-
 arch/openrisc/config.mk  | 2 +-
 arch/powerpc/config.mk   | 2 +-
 arch/sandbox/config.mk   | 2 +-
 arch/sparc/config.mk | 2 +-
 arch/x86/cpu/config.mk   | 2 +-
 include/configs/microblaze-generic.h | 1 -
 14 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/arch/arc/config.mk b/arch/arc/config.mk
index a3b8df7..e408800 100644
--- a/arch/arc/config.mk
+++ b/arch/arc/config.mk
@@ -21,7 +21,7 @@ ifeq ($(CROSS_COMPILE),)
 CROSS_COMPILE := $(ARC_CROSS_COMPILE)
 endif
 
-PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -DCONFIG_ARC -gdwarf-2
+PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2
 
 # Needed for relocation
 LDFLAGS_FINAL += -pie
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 66ecc2e..31e042a 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -22,7 +22,7 @@ PLATFORM_RELFLAGS += $(call cc-option, -msoft-float) \
 # Support generic board on ARM
 __HAVE_ARCH_GENERIC_BOARD := y
 
-PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
+PLATFORM_CPPFLAGS += -D__ARM__
 
 # Choose between ARM/Thumb instruction sets
 ifeq ($(CONFIG_SYS_THUMB_BUILD),y)
diff --git a/arch/avr32/config.mk b/arch/avr32/config.mk
index 28a371c..469185e 100644
--- a/arch/avr32/config.mk
+++ b/arch/avr32/config.mk
@@ -9,7 +9,6 @@ ifeq ($(CROSS_COMPILE),)
 CROSS_COMPILE := avr32-linux-
 endif
 
-PLATFORM_CPPFLAGS += -DCONFIG_AVR32
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x
 
 PLATFORM_RELFLAGS  += -ffixed-r5 -fPIC -mno-init-got -mrelax
diff --git a/arch/blackfin/config.mk b/arch/blackfin/config.mk
index fcaa44f..7b17b75 100644
--- a/arch/blackfin/config.mk
+++ b/arch/blackfin/config.mk
@@ -21,7 +21,6 @@ endif
 CONFIG_BFIN_BOOT_MODE := $(strip $(CONFIG_BFIN_BOOT_MODE:%=%))
 
 PLATFORM_RELFLAGS += -ffixed-P3 -fomit-frame-pointer -mno-fdpic
-PLATFORM_CPPFLAGS += -DCONFIG_BLACKFIN
 
 LDFLAGS_FINAL += --gc-sections
 LDFLAGS += -m elf32bfin
diff --git a/arch/m68k/config.mk b/arch/m68k/config.mk
index 33b3d51..3b3a7e8 100644
--- a/arch/m68k/config.mk
+++ b/arch/m68k/config.mk
@@ -11,7 +11,7 @@ endif
 
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x2
 
-PLATFORM_CPPFLAGS += -DCONFIG_M68K -D__M68K__
+PLATFORM_CPPFLAGS += -D__M68K__
 PLATFORM_LDFLAGS  += -n
 PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
 PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
diff --git a/arch/mips/config.mk b/arch/mips/config.mk
index f4a234a..a2d07af 100644
--- a/arch/mips/config.mk
+++ b/arch/mips/config.mk
@@ -25,7 +25,7 @@ endif
 # Default to EB if no endianess is configured
 ENDIANNESS ?= -EB
 
-PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__
+PLATFORM_CPPFLAGS += -D__MIPS__
 
 __HAVE_ARCH_GENERIC_BOARD := y
 
diff --git a/arch/nds32/config.mk b/arch/nds32/config.mk
index 1024852..5ac9f90 100644
--- a/arch/nds32/config.mk
+++ b/arch/nds32/config.mk
@@ -17,6 +17,6 @@ CONFIG_STANDALONE_LOAD_ADDR = 0x30 \
 
 PLATFORM_RELFLAGS  += -fno-strict-aliasing -fno-common -mrelax
 PLATFORM_RELFLAGS  += -gdwarf-2
-PLATFORM_CPPFLAGS  += -DCONFIG_NDS32 -D__nds32__ -G0 -ffixed-10 -fpie
+PLATFORM_CPPFLAGS  += -D__nds32__ -G0 -ffixed-10 -fpie
 
 LDFLAGS_u-boot = --gc-sections --relax
diff --git a/arch/nios2/config.mk b/arch/nios2/config.mk
index 65a5a40..82bd887 100644
--- a/arch/nios2/config.mk
+++ b/arch/nios2/config.mk
@@ -12,7 +12,7 @@ endif
 
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x0200
 
-PLATFORM_CPPFLAGS += -DCONFIG_NIOS2 -D__NIOS2__
+PLATFORM_CPPFLAGS += -D__NIOS2__
 PLATFORM_CPPFLAGS += -G0
 
 LDFLAGS_FINAL += --gc-sections
diff --git a/arch/openrisc/config.mk b/arch/openrisc/config.mk
index 9902b9a..cd95f24 100644
--- a/arch/openrisc/config.mk
+++ b/arch/openrisc/config.mk
@@ -11,6 +11,6 @@ endif
 
 # r10 used for global object pointer, already set in OR32 GCC but just to be
 # clear
-PLATFORM_CPPFLAGS += -DCONFIG_OPENRISC -D__OR1K__ -ffixed-r10
+PLATFORM_CPPFLAGS += -D__OR1K__ -ffixed-r10
 
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x4
diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk
index fb7096e..6329b6c 100644
--- a/arch/powerpc/config.mk
+++ b/arch/powerpc/config.mk
@@ -13,7 +13,7 @@ CONFIG_STANDALONE_LOAD_ADDR ?= 0x4
 LDFLAGS_FINAL += --gc-sections
 PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections \
-meabi
-PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__ -ffixed-r2
+PLATFORM_CPPFLAGS += -D__powerpc__ -ffixed-r2
 PLATFORM_LDFLAGS  += -n
 
 # Support generic board 

[U-Boot] [RFCv2a PATCH 14/14] build: remove CONFIG_{SPL, TPL}_TEXT_BASE from config headers

2014-05-27 Thread Masahiro Yamada
All the CONFIG_SPL_TEXT_BASE and CONFIG_TPL_TEXT_BASE definition
were moved to defconfig.
Now we can clean-up config headers.

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
---

 include/config_fallbacks.h | 5 -
 include/configs/B4860QDS.h | 1 -
 include/configs/BSC9131RDB.h   | 1 -
 include/configs/BSC9132QDS.h   | 1 -
 include/configs/C29XPCIE.h | 2 --
 include/configs/P1010RDB.h | 5 -
 include/configs/P1022DS.h  | 4 
 include/configs/P1_P2_RDB.h| 4 
 include/configs/T104xRDB.h | 1 -
 include/configs/T208xQDS.h | 1 -
 include/configs/T208xRDB.h | 1 -
 include/configs/T4240QDS.h | 1 -
 include/configs/a3m071.h   | 1 -
 include/configs/am335x_igep0033.h  | 1 -
 include/configs/am3517_crane.h | 1 -
 include/configs/am3517_evm.h   | 1 -
 include/configs/am43xx_evm.h   | 1 -
 include/configs/apf27.h| 1 -
 include/configs/arndale.h  | 1 -
 include/configs/bur_am335x_common.h| 1 -
 include/configs/cam_enc_4xx.h  | 1 -
 include/configs/cm_t35.h   | 1 -
 include/configs/da850evm.h | 1 -
 include/configs/devkit8000.h   | 1 -
 include/configs/exynos5250-dt.h| 1 -
 include/configs/hawkboard.h| 1 -
 include/configs/ipam390.h  | 1 -
 include/configs/k2hk_evm.h | 1 -
 include/configs/lwmon5.h   | 1 -
 include/configs/m53evk.h   | 1 -
 include/configs/mcx.h  | 1 -
 include/configs/mx31pdk.h  | 1 -
 include/configs/mxs.h  | 1 -
 include/configs/omap3_evm_common.h | 1 -
 include/configs/origen.h   | 1 -
 include/configs/p1_p2_rdb_pc.h | 4 
 include/configs/palmtreo680.h  | 1 -
 include/configs/pcm051.h   | 1 -
 include/configs/sama5d3xek.h   | 1 -
 include/configs/siemens-am33x-common.h | 1 -
 include/configs/smdk5420.h | 6 --
 include/configs/smdkv310.h | 1 -
 include/configs/socfpga_cyclone5.h | 3 ---
 include/configs/tam3517-common.h   | 1 -
 include/configs/tao3530.h  | 1 -
 include/configs/tegra114-common.h  | 1 -
 include/configs/tegra124-common.h  | 1 -
 include/configs/tegra20-common.h   | 1 -
 include/configs/tegra30-common.h   | 1 -
 include/configs/ti814x_evm.h   | 1 -
 include/configs/ti816x_evm.h   | 1 -
 include/configs/ti_am335x_common.h | 1 -
 include/configs/ti_omap3_common.h  | 1 -
 include/configs/ti_omap4_common.h  | 1 -
 include/configs/ti_omap5_common.h  | 1 -
 include/configs/tricorder.h| 1 -
 include/configs/tx25.h | 1 -
 include/configs/vpac270.h  | 1 -
 include/configs/woodburn_sd.h  | 1 -
 include/configs/x600.h | 1 -
 include/configs/zynq-common.h  | 3 ---
 61 files changed, 88 deletions(-)

diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h
index 11f375c..b304a41 100644
--- a/include/config_fallbacks.h
+++ b/include/config_fallbacks.h
@@ -83,9 +83,4 @@
 #define CONFIG_SYS_HZ  1000
 #endif
 
-#ifdef CONFIG_TPL_BUILD
-# undef CONFIG_SPL_TEXT_BASE
-# define CONFIG_SPL_TEXT_BASE CONFIG_TPL_TEXT_BASE
-#endif
-
 #endif /* __CONFIG_FALLBACKS_H */
diff --git a/include/configs/B4860QDS.h b/include/configs/B4860QDS.h
index c4eb50d..f15ae30 100644
--- a/include/configs/B4860QDS.h
+++ b/include/configs/B4860QDS.h
@@ -34,7 +34,6 @@
 #define CONFIG_SPL_DRIVERS_MISC_SUPPORT
 #define CONFIG_FSL_LAW /* Use common FSL init code */
 #define CONFIG_SYS_TEXT_BASE   0x00201000
-#define CONFIG_SPL_TEXT_BASE   0xFFFD8000
 #define CONFIG_SPL_PAD_TO  0x4
 #define CONFIG_SPL_MAX_SIZE0x28000
 #define RESET_VECTOR_OFFSET0x27FFC
diff --git a/include/configs/BSC9131RDB.h b/include/configs/BSC9131RDB.h
index 56a3e94..8bbb696 100644
--- a/include/configs/BSC9131RDB.h
+++ b/include/configs/BSC9131RDB.h
@@ -33,7 +33,6 @@
 #define CONFIG_SPL_TARGET  u-boot-with-spl.bin
 
 #define CONFIG_SYS_TEXT_BASE   0x00201000
-#define CONFIG_SPL_TEXT_BASE   0xE000
 #define CONFIG_SPL_MAX_SIZE8192
 #define CONFIG_SPL_RELOC_TEXT_BASE 0x0010
 #define CONFIG_SPL_RELOC_STACK 0x0010
diff --git a/include/configs/BSC9132QDS.h b/include/configs/BSC9132QDS.h
index 4089b33..7675502 100644
--- a/include/configs/BSC9132QDS.h
+++ b/include/configs/BSC9132QDS.h
@@ -49,7 +49,6 @@
 #define CONFIG_SPL_TARGET  u-boot-with-spl.bin
 
 #define CONFIG_SYS_TEXT_BASE   0x00201000
-#define CONFIG_SPL_TEXT_BASE   0xE000
 #define CONFIG_SPL_MAX_SIZE8192
 #define CONFIG_SPL_RELOC_TEXT_BASE 0x0010
 #define CONFIG_SPL_RELOC_STACK 0x0010
diff --git 

[U-Boot] [RFCv2a PATCH 12/14] build: split CONFIG_SPL_TEXT_BASE into two different macros

2014-05-27 Thread Masahiro Yamada
We are about to move CONFIG_SPL_TEXT_BASE from header files to defconfig.
But we cannot move them as they are.

The problem is that #ifdef statements are used in board headers with
TPL support. Like this:

  #ifdef CONFIG_TPL_BUILD
  #define CONFIG_SPL_TEXT_BASE0xD0001000
  #elif defined(CONFIG_SPL_BUILD)
  #define CONFIG_SPL_TEXT_BASE0xff80
  #endif

We cannot describe conditinal statments in defconfig.
One possible solution is to add CONFIG_TPL_TEXT_BASE.

This commit modifies the code as follow:

  #ifdef CONFIG_TPL_BUILD
  #define CONFIG_TPL_TEXT_BASE0xD0001000
  #elif defined(CONFIG_SPL_BUILD)
  #define CONFIG_SPL_TEXT_BASE0xff80
  #endif

(include/config_fallbakcs.h should also be tweaked because some other
parts still reference to CONFIG_SPL_TEXT_BASE)

In the next commit, it will be converted into defconfig like this:

  CONFIG_SPL_TEXT_BASE=0xff80
  CONFIG_TPL_TEXT_BASE=0xd0001000

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
---

 include/config_fallbacks.h | 5 +
 include/configs/C29XPCIE.h | 2 +-
 include/configs/P1010RDB.h | 2 +-
 include/configs/P1022DS.h  | 2 +-
 include/configs/P1_P2_RDB.h| 2 +-
 include/configs/p1_p2_rdb_pc.h | 2 +-
 6 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h
index b304a41..11f375c 100644
--- a/include/config_fallbacks.h
+++ b/include/config_fallbacks.h
@@ -83,4 +83,9 @@
 #define CONFIG_SYS_HZ  1000
 #endif
 
+#ifdef CONFIG_TPL_BUILD
+# undef CONFIG_SPL_TEXT_BASE
+# define CONFIG_SPL_TEXT_BASE CONFIG_TPL_TEXT_BASE
+#endif
+
 #endif /* __CONFIG_FALLBACKS_H */
diff --git a/include/configs/C29XPCIE.h b/include/configs/C29XPCIE.h
index 8ae33a5..51e7fcb 100644
--- a/include/configs/C29XPCIE.h
+++ b/include/configs/C29XPCIE.h
@@ -38,7 +38,7 @@
 #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
 #define CONFIG_SPL_COMMON_INIT_DDR
 #define CONFIG_SPL_MAX_SIZE(128  10)
-#define CONFIG_SPL_TEXT_BASE   0xf8f81000
+#define CONFIG_TPL_TEXT_BASE   0xf8f81000
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
 #define CONFIG_SYS_NAND_U_BOOT_SIZE(832  10)
 #define CONFIG_SYS_NAND_U_BOOT_DST (0x1100)
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index c491b50..afd8945 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -119,7 +119,7 @@
 #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
 #define CONFIG_SPL_COMMON_INIT_DDR
 #define CONFIG_SPL_MAX_SIZE(128  10)
-#define CONFIG_SPL_TEXT_BASE   0xD0001000
+#define CONFIG_TPL_TEXT_BASE   0xD0001000
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
 #define CONFIG_SYS_NAND_U_BOOT_SIZE(576  10)
 #define CONFIG_SYS_NAND_U_BOOT_DST (0x1100)
diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h
index 54e2569..4683900 100644
--- a/include/configs/P1022DS.h
+++ b/include/configs/P1022DS.h
@@ -90,7 +90,7 @@
 #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
 #define CONFIG_SPL_COMMON_INIT_DDR
 #define CONFIG_SPL_MAX_SIZE(128  10)
-#define CONFIG_SPL_TEXT_BASE   0xf8f81000
+#define CONFIG_TPL_TEXT_BASE   0xf8f81000
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
 #define CONFIG_SYS_NAND_U_BOOT_SIZE(832  10)
 #define CONFIG_SYS_NAND_U_BOOT_DST (0x1100)
diff --git a/include/configs/P1_P2_RDB.h b/include/configs/P1_P2_RDB.h
index c75638a..2867fb5 100644
--- a/include/configs/P1_P2_RDB.h
+++ b/include/configs/P1_P2_RDB.h
@@ -104,7 +104,7 @@
 #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
 #define CONFIG_SPL_COMMON_INIT_DDR
 #define CONFIG_SPL_MAX_SIZE(128  10)
-#define CONFIG_SPL_TEXT_BASE   0xf8f81000
+#define CONFIG_TPL_TEXT_BASE   0xf8f81000
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
 #define CONFIG_SYS_NAND_U_BOOT_SIZE(832  10)
 #define CONFIG_SYS_NAND_U_BOOT_DST (0x1100)
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index 9b58950..0d70ec1 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -218,7 +218,7 @@
 #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
 #define CONFIG_SPL_COMMON_INIT_DDR
 #define CONFIG_SPL_MAX_SIZE(128  10)
-#define CONFIG_SPL_TEXT_BASE   0xf8f81000
+#define CONFIG_TPL_TEXT_BASE   0xf8f81000
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
 #define CONFIG_SYS_NAND_U_BOOT_SIZE(832  10)
 #define CONFIG_SYS_NAND_U_BOOT_DST (0x1100)
-- 
1.9.1

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


[U-Boot] [RFCv2a PATCH 05/14] include: define CONFIG_SPL and CONFIG_TPL as 1

2014-05-27 Thread Masahiro Yamada
We are about to switch to Kconfig in the next commit.
But there are something to get done beforehand.

In Kconfig, include/generated/autoconf.h defines boolean
CONFIG macros as 1.

CONFIG_SPL and CONFIG_TPL, if defined, must be defined as 1.
Otherwise, when switching to Kconfig, the build log
would be sprinkled with warning messages like this:
  warning: CONFIG_SPL redefined [enabled by default]

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
Reviewed-by: Simon Glass s...@chromium.org
---

 doc/README.SPL | 2 +-
 include/configs/B4860QDS.h | 2 +-
 include/configs/BSC9131RDB.h   | 2 +-
 include/configs/BSC9132QDS.h   | 2 +-
 include/configs/C29XPCIE.h | 4 ++--
 include/configs/MPC8313ERDB.h  | 2 +-
 include/configs/P1010RDB.h | 8 
 include/configs/P1022DS.h  | 8 
 include/configs/P1_P2_RDB.h| 8 
 include/configs/T104xRDB.h | 2 +-
 include/configs/T208xQDS.h | 2 +-
 include/configs/T208xRDB.h | 2 +-
 include/configs/T4240QDS.h | 2 +-
 include/configs/a3m071.h   | 2 +-
 include/configs/am335x_igep0033.h  | 2 +-
 include/configs/am3517_crane.h | 2 +-
 include/configs/am3517_evm.h   | 2 +-
 include/configs/apf27.h| 2 +-
 include/configs/arndale.h  | 2 +-
 include/configs/bur_am335x_common.h| 2 +-
 include/configs/cam_enc_4xx.h  | 2 +-
 include/configs/cm_t35.h   | 2 +-
 include/configs/da850evm.h | 2 +-
 include/configs/devkit8000.h   | 2 +-
 include/configs/exynos5-dt.h   | 2 +-
 include/configs/hawkboard.h| 2 +-
 include/configs/ipam390.h  | 2 +-
 include/configs/lwmon5.h   | 2 +-
 include/configs/m53evk.h   | 2 +-
 include/configs/mcx.h  | 2 +-
 include/configs/microblaze-generic.h   | 2 +-
 include/configs/mx31pdk.h  | 2 +-
 include/configs/mxs.h  | 2 +-
 include/configs/omap3_evm_common.h | 2 +-
 include/configs/origen.h   | 2 +-
 include/configs/p1_p2_rdb_pc.h | 8 
 include/configs/palmtreo680.h  | 2 +-
 include/configs/pcm051.h   | 2 +-
 include/configs/sama5d3xek.h   | 2 +-
 include/configs/siemens-am33x-common.h | 2 +-
 include/configs/smdkv310.h | 2 +-
 include/configs/socfpga_cyclone5.h | 2 +-
 include/configs/tam3517-common.h   | 2 +-
 include/configs/tao3530.h  | 2 +-
 include/configs/tegra-common.h | 2 +-
 include/configs/ti814x_evm.h   | 2 +-
 include/configs/ti816x_evm.h   | 2 +-
 include/configs/ti_armv7_common.h  | 2 +-
 include/configs/tricorder.h| 2 +-
 include/configs/tx25.h | 2 +-
 include/configs/vpac270.h  | 2 +-
 include/configs/woodburn_sd.h  | 2 +-
 include/configs/x600.h | 2 +-
 include/configs/zynq-common.h  | 2 +-
 54 files changed, 67 insertions(+), 67 deletions(-)

diff --git a/doc/README.SPL b/doc/README.SPL
index 57a39a4..2b4b0b8 100644
--- a/doc/README.SPL
+++ b/doc/README.SPL
@@ -40,7 +40,7 @@ COBJS-$(CONFIG_SPL_BUILD) += foo.o
 
 The building of SPL images can be with:
 
-#define CONFIG_SPL
+#define CONFIG_SPL 1
 
 Because SPL images normally have a different text base, one has to be
 configured by defining CONFIG_SPL_TEXT_BASE. The linker script has to be
diff --git a/include/configs/B4860QDS.h b/include/configs/B4860QDS.h
index 1af9ba6..cb35116 100644
--- a/include/configs/B4860QDS.h
+++ b/include/configs/B4860QDS.h
@@ -23,7 +23,7 @@
 #define CONFIG_RAMBOOT_TEXT_BASE   CONFIG_SYS_TEXT_BASE
 #define CONFIG_RESET_VECTOR_ADDRESS0xfffc
 #else
-#define CONFIG_SPL
+#define CONFIG_SPL 1
 #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
 #define CONFIG_SPL_ENV_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
diff --git a/include/configs/BSC9131RDB.h b/include/configs/BSC9131RDB.h
index 5a316c8..e6b46e4 100644
--- a/include/configs/BSC9131RDB.h
+++ b/include/configs/BSC9131RDB.h
@@ -25,7 +25,7 @@
 #endif
 
 #ifdef CONFIG_NAND
-#define CONFIG_SPL
+#define CONFIG_SPL 1
 #define CONFIG_SPL_INIT_MINIMAL
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_NAND_SUPPORT
diff --git a/include/configs/BSC9132QDS.h b/include/configs/BSC9132QDS.h
index 7bb5d33..fc45e45 100644
--- a/include/configs/BSC9132QDS.h
+++ b/include/configs/BSC9132QDS.h
@@ -41,7 +41,7 @@
 #endif
 
 #ifdef CONFIG_NAND
-#define CONFIG_SPL
+#define CONFIG_SPL 1
 #define CONFIG_SPL_INIT_MINIMAL
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_NAND_SUPPORT
diff --git a/include/configs/C29XPCIE.h b/include/configs/C29XPCIE.h
index 9e12fac..f382b48 100644
--- a/include/configs/C29XPCIE.h
+++ b/include/configs/C29XPCIE.h
@@ -24,8 +24,8 @@
 #endif
 
 #ifdef CONFIG_NAND
-#define CONFIG_SPL
-#define CONFIG_TPL
+#define CONFIG_SPL 1
+#define 

[U-Boot] [RFCv2a PATCH 10/14] kbuild: remove CONFIG_SPL/CONFIG_TPL definition in config headers

2014-05-27 Thread Masahiro Yamada
CONFIG_SPL and CONFIG_TPL are defined in Kconfig.

Remove the redundant definition in config headers.

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
Reviewed-by: Simon Glass s...@chromium.org
---

 include/configs/B4860QDS.h | 1 -
 include/configs/BSC9131RDB.h   | 1 -
 include/configs/BSC9132QDS.h   | 1 -
 include/configs/C29XPCIE.h | 2 --
 include/configs/MPC8313ERDB.h  | 1 -
 include/configs/P1010RDB.h | 4 
 include/configs/P1022DS.h  | 4 
 include/configs/P1_P2_RDB.h| 4 
 include/configs/T104xRDB.h | 1 -
 include/configs/T208xQDS.h | 1 -
 include/configs/T208xRDB.h | 1 -
 include/configs/T4240QDS.h | 1 -
 include/configs/a3m071.h   | 1 -
 include/configs/am335x_igep0033.h  | 1 -
 include/configs/am3517_crane.h | 1 -
 include/configs/am3517_evm.h   | 1 -
 include/configs/apf27.h| 1 -
 include/configs/arndale.h  | 1 -
 include/configs/bur_am335x_common.h| 1 -
 include/configs/cam_enc_4xx.h  | 1 -
 include/configs/cm_t35.h   | 1 -
 include/configs/da850evm.h | 1 -
 include/configs/devkit8000.h   | 1 -
 include/configs/exynos5-dt.h   | 1 -
 include/configs/hawkboard.h| 1 -
 include/configs/ipam390.h  | 1 -
 include/configs/lwmon5.h   | 1 -
 include/configs/m53evk.h   | 1 -
 include/configs/mcx.h  | 1 -
 include/configs/microblaze-generic.h   | 1 -
 include/configs/mx31pdk.h  | 1 -
 include/configs/mxs.h  | 1 -
 include/configs/omap3_evm_common.h | 1 -
 include/configs/origen.h   | 1 -
 include/configs/p1_p2_rdb_pc.h | 4 
 include/configs/palmtreo680.h  | 1 -
 include/configs/pcm051.h   | 1 -
 include/configs/sama5d3xek.h   | 1 -
 include/configs/siemens-am33x-common.h | 1 -
 include/configs/smdkv310.h | 1 -
 include/configs/socfpga_cyclone5.h | 1 -
 include/configs/tam3517-common.h   | 1 -
 include/configs/tao3530.h  | 1 -
 include/configs/tegra-common.h | 1 -
 include/configs/ti814x_evm.h   | 1 -
 include/configs/ti816x_evm.h   | 1 -
 include/configs/ti_armv7_common.h  | 1 -
 include/configs/tricorder.h| 1 -
 include/configs/tx25.h | 1 -
 include/configs/vpac270.h  | 1 -
 include/configs/woodburn_sd.h  | 1 -
 include/configs/x600.h | 1 -
 include/configs/zynq-common.h  | 1 -
 53 files changed, 66 deletions(-)

diff --git a/include/configs/B4860QDS.h b/include/configs/B4860QDS.h
index cb35116..c4eb50d 100644
--- a/include/configs/B4860QDS.h
+++ b/include/configs/B4860QDS.h
@@ -23,7 +23,6 @@
 #define CONFIG_RAMBOOT_TEXT_BASE   CONFIG_SYS_TEXT_BASE
 #define CONFIG_RESET_VECTOR_ADDRESS0xfffc
 #else
-#define CONFIG_SPL 1
 #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
 #define CONFIG_SPL_ENV_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
diff --git a/include/configs/BSC9131RDB.h b/include/configs/BSC9131RDB.h
index e6b46e4..56a3e94 100644
--- a/include/configs/BSC9131RDB.h
+++ b/include/configs/BSC9131RDB.h
@@ -25,7 +25,6 @@
 #endif
 
 #ifdef CONFIG_NAND
-#define CONFIG_SPL 1
 #define CONFIG_SPL_INIT_MINIMAL
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_NAND_SUPPORT
diff --git a/include/configs/BSC9132QDS.h b/include/configs/BSC9132QDS.h
index fc45e45..4089b33 100644
--- a/include/configs/BSC9132QDS.h
+++ b/include/configs/BSC9132QDS.h
@@ -41,7 +41,6 @@
 #endif
 
 #ifdef CONFIG_NAND
-#define CONFIG_SPL 1
 #define CONFIG_SPL_INIT_MINIMAL
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_NAND_SUPPORT
diff --git a/include/configs/C29XPCIE.h b/include/configs/C29XPCIE.h
index f382b48..8ae33a5 100644
--- a/include/configs/C29XPCIE.h
+++ b/include/configs/C29XPCIE.h
@@ -24,8 +24,6 @@
 #endif
 
 #ifdef CONFIG_NAND
-#define CONFIG_SPL 1
-#define CONFIG_TPL 1
 #ifdef CONFIG_TPL_BUILD
 #define CONFIG_SPL_NAND_BOOT
 #define CONFIG_SPL_FLUSH_IMAGE
diff --git a/include/configs/MPC8313ERDB.h b/include/configs/MPC8313ERDB.h
index 7f5aa59..dd81229 100644
--- a/include/configs/MPC8313ERDB.h
+++ b/include/configs/MPC8313ERDB.h
@@ -19,7 +19,6 @@
 #define CONFIG_MPC8313ERDB 1
 
 #ifdef CONFIG_NAND
-#define CONFIG_SPL 1
 #define CONFIG_SPL_INIT_MINIMAL
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_NAND_SUPPORT
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index 86d62e1..c491b50 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -21,7 +21,6 @@
 #define CONFIG_NAND_FSL_IFC
 
 #ifdef CONFIG_SDCARD
-#define CONFIG_SPL 1
 #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
 #define CONFIG_SPL_DRIVERS_MISC_SUPPORT
 #define CONFIG_SPL_ENV_SUPPORT
@@ -56,7 +55,6 @@
 #define CONFIG_SYS_TEXT_BASE   0x1100
 #define 

[U-Boot] [RFCv2b PATCH 11/14] kconfig: remove old script

2014-05-27 Thread Masahiro Yamada
mkconfig is no longer used in Kconfig.

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
---

 mkconfig | 192 ---
 1 file changed, 192 deletions(-)
 delete mode 100755 mkconfig

diff --git a/mkconfig b/mkconfig
deleted file mode 100755
index cd911a9..000
--- a/mkconfig
+++ /dev/null
@@ -1,192 +0,0 @@
-#!/bin/sh -e
-
-# Script to create header files and links to configure
-# U-Boot for a specific board.
-#
-# Parameters:  Target  Architecture  CPU  Board [VENDOR] [SOC]
-#
-# (C) 2002-2013 DENX Software Engineering, Wolfgang Denk w...@denx.de
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-
-APPEND=no  # Default: Create new config file
-BOARD_NAME=  # Name to print in make output
-TARGETS=
-
-arch=
-cpu=
-board=
-vendor=
-soc=
-options=
-
-if [ \( $# -eq 2 \) -a \( $1 = -A \) ] ; then
-   # Automatic mode
-   line=`awk '($0 !~ /^#/  $7 ~ /^'$2'$/) { print $1, $2, $3, $4, $5, 
$6, $7, $8 }' $srctree/boards.cfg`
-   if [ -z $line ] ; then
-   echo make: *** No rule to make target \`$2_config'.  Stop. 2
-   exit 1
-   fi
-
-   set ${line}
-   # add default board name if needed
-   [ $# = 3 ]  set ${line} ${1}
-fi
-
-while [ $# -gt 0 ] ; do
-   case $1 in
-   --) shift ; break ;;
-   -a) shift ; APPEND=yes ;;
-   -n) shift ; BOARD_NAME=${7%_config} ; shift ;;
-   -t) shift ; TARGETS=`echo $1 | sed 's:_: :g'` ${TARGETS} ; shift ;;
-   *)  break ;;
-   esac
-done
-
-[ $# -lt 7 ]  exit 1
-[ $# -gt 8 ]  exit 1
-
-# Strip all options and/or _config suffixes
-CONFIG_NAME=${7%_config}
-
-[ ${BOARD_NAME} ] || BOARD_NAME=${7%_config}
-
-arch=$2
-cpu=`echo $3 | awk 'BEGIN {FS = :} ; {print $1}'`
-spl_cpu=`echo $3 | awk 'BEGIN {FS = :} ; {print $2}'`
-if [ $6 = none ] ; then
-   board=
-elif [ $6 = - ] ; then
-   board=${BOARD_NAME}
-else
-   board=$6
-fi
-[ $5 != - ]  vendor=$5
-[ $4 != - ]  soc=$4
-[ $# -gt 7 ]  [ $8 != - ]  {
-   # check if we have a board config name in the options field
-   # the options field mave have a board config name and a list
-   # of options, both separated by a colon (':'); the options are
-   # separated by commas (',').
-   #
-   # Check for board name
-   tmp=${8%:*}
-   if [ $tmp ] ; then
-   CONFIG_NAME=$tmp
-   fi
-   # Check if we only have a colon...
-   if [ ${tmp} != $8 ] ; then
-   options=${8#*:}
-   TARGETS=`echo ${options} | sed 's:,: :g'` ${TARGETS}
-   fi
-}
-
-if [ ${ARCH} -a ${ARCH} != ${arch} ]; then
-   echo Failed: \$ARCH=${ARCH}, should be '${arch}' for ${BOARD_NAME} 
12
-   exit 1
-fi
-
-#
-# Test above needed aarch64, now we need arm
-#
-if [ ${arch} = aarch64 ]; then
-   arch=arm
-fi
-
-if [ $options ] ; then
-   echo Configuring for ${BOARD_NAME} - Board: ${CONFIG_NAME}, Options: 
${options}
-else
-   echo Configuring for ${BOARD_NAME} board...
-fi
-
-#
-# Create link to architecture specific headers
-#
-if [ -n $KBUILD_SRC ] ; then
-   mkdir -p ${objtree}/include
-   LNPREFIX=${srctree}/arch/${arch}/include/asm/
-   cd ${objtree}/include
-   mkdir -p asm
-else
-   cd arch/${arch}/include
-fi
-
-rm -f asm/arch
-
-if [ -z ${soc} ] ; then
-   ln -s ${LNPREFIX}arch-${cpu} asm/arch
-else
-   ln -s ${LNPREFIX}arch-${soc} asm/arch
-fi
-
-if [ ${arch} = arm ] ; then
-   rm -f asm/proc
-   ln -s ${LNPREFIX}proc-armv asm/proc
-fi
-
-if [ -z $KBUILD_SRC ] ; then
-   cd ${srctree}/include
-fi
-
-#
-# Create include file for Make
-#
-( echo ARCH   = ${arch}
-if [ ! -z $spl_cpu ] ; then
-   echo 'ifeq ($(CONFIG_SPL_BUILD),y)'
-   echo CPU= ${spl_cpu}
-   echo else
-   echo CPU= ${cpu}
-   echo endif
-else
-   echo CPU= ${cpu}
-fi
-echo BOARD  = ${board}
-
-[ ${vendor} ]  echo VENDOR = ${vendor}
-[ ${soc}]  echo SOC= ${soc}
-exit 0 )  config.mk
-
-# Assign board directory to BOARDIR variable
-if [ -z ${vendor} ] ; then
-BOARDDIR=${board}
-else
-BOARDDIR=${vendor}/${board}
-fi
-
-#
-# Create board specific header file
-#
-if [ $APPEND = yes ]   # Append to existing config file
-then
-   echo  config.h
-else
-config.h  # Create new config file
-fi
-echo /* Automatically generated - do not edit */ config.h
-
-for i in ${TARGETS} ; do
-   i=`echo ${i} | sed '/=/ {s/=/  /;q; } ; { s/$/ 1/; }'`
-   echo #define CONFIG_${i} config.h ;
-done
-
-echo #define CONFIG_SYS_ARCH  \${arch}\   config.h
-echo #define CONFIG_SYS_CPU   \${cpu}\config.h
-echo #define CONFIG_SYS_BOARD \${board}\  config.h
-
-[ ${vendor} ]  echo #define CONFIG_SYS_VENDOR \${vendor}\  config.h
-
-[ ${soc}]  echo #define CONFIG_SYS_SOC\${soc}\ config.h
-
-[ ${board}  ]  echo #define CONFIG_BOARDDIR board/$BOARDDIR  config.h
-cat  EOF  config.h
-#include config_cmd_defaults.h

[U-Boot] [RFCv2b PATCH 08/14] buildman: adjust for Kconfig

2014-05-27 Thread Masahiro Yamada
Use make board_defconfig instead of make board_config.

WARNING
This adjustment is not enough.
MAKEALL should parse defconfig files instead of boards.cfg.
This commit has not got this rework done yet.

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
---

 tools/buildman/board.py   | 2 +-
 tools/buildman/builder.py | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/buildman/board.py b/tools/buildman/board.py
index 5172a47..7bcc932 100644
--- a/tools/buildman/board.py
+++ b/tools/buildman/board.py
@@ -17,7 +17,7 @@ class Board:
 soc: Name of SOC, or '' if none (e.g. mx31)
 vendor: Name of vendor (e.g. armltd)
 board_name: Name of board (e.g. integrator)
-target: Target name (use make target_config to configure)
+target: Target name (use make target_defconfig to configure)
 options: board-specific options (e.g. integratorcp:CM1136)
 
 self.target = target
diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py
index 4a2d753..6ccb5f6 100644
--- a/tools/buildman/builder.py
+++ b/tools/buildman/builder.py
@@ -198,7 +198,7 @@ class BuilderThread(threading.Thread):
 commit_upto: Commit number to build (0...n-1)
 brd: Board object to build
 work_dir: Directory to which the source will be checked out
-do_config: True to run a make board_config on the source
+do_config: True to run a make board_defconfig on the source
 force_build: Force a build even if one was previously done
 
 Returns:
@@ -251,7 +251,7 @@ class BuilderThread(threading.Thread):
 args = ['O=build', '-s']
 if self.builder.num_jobs is not None:
 args.extend(['-j', str(self.builder.num_jobs)])
-config_args = ['%s_config' % brd.target]
+config_args = ['%s_defconfig' % brd.target]
 config_out = ''
 args.extend(self.builder.toolchains.GetMakeArguments(brd))
 
@@ -404,7 +404,7 @@ class BuilderThread(threading.Thread):
 work_dir = self.builder.GetThreadDir(self.thread_num)
 self.toolchain = None
 if job.commits:
-# Run 'make board_config' on the first commit
+# Run 'make board_defconfig' on the first commit
 do_config = True
 commit_upto  = 0
 force_build = False
-- 
1.9.1

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


[U-Boot] [RFCv2b PATCH 04/14] kconfig: add basic Kconfig files

2014-05-27 Thread Masahiro Yamada
This commit adds more Kconfig files, which were written by hand.

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
---

 Kconfig | 45 +
 1 file changed, 45 insertions(+)
 create mode 100644 Kconfig

diff --git a/Kconfig b/Kconfig
new file mode 100644
index 000..491fbc3
--- /dev/null
+++ b/Kconfig
@@ -0,0 +1,45 @@
+#
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/kconfig-language.txt.
+#
+mainmenu U-Boot $UBOOTVERSION Configuration
+
+config UBOOTVERSION
+   string
+   option env=UBOOTVERSION
+
+config KCONFIG_OBJDIR
+   string
+   option env=KCONFIG_OBJDIR
+
+menu General setup
+
+config SPL_BUILD
+   bool
+   depends on $KCONFIG_OBJDIR=spl/ || $KCONFIG_OBJDIR=tpl/
+   default y
+
+config TPL_BUILD
+   bool
+   depends on $KCONFIG_OBJDIR=tpl/
+   default y
+
+config SPL
+   bool
+   prompt Build SPL image if !SPL_BUILD
+   default y if SPL_BUILD
+
+config TPL
+   bool
+   depends on SPL
+   prompt Build TPL image if !SPL_BUILD
+   default y if TPL_BUILD
+   default n
+
+endmenu# General setup
+
+config ARCH
+   string
+   option env=ARCH
+
+source arch/$ARCH/Kconfig
-- 
1.9.1

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


[U-Boot] [RFCv2b PATCH 10/14] kbuild: remove CONFIG_SPL/CONFIG_TPL definition in config headers

2014-05-27 Thread Masahiro Yamada
CONFIG_SPL and CONFIG_TPL are defined in Kconfig.

Remove the redundant definition in config headers.

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
Reviewed-by: Simon Glass s...@chromium.org
---

 include/configs/B4860QDS.h | 1 -
 include/configs/BSC9131RDB.h   | 1 -
 include/configs/BSC9132QDS.h   | 1 -
 include/configs/C29XPCIE.h | 2 --
 include/configs/MPC8313ERDB.h  | 1 -
 include/configs/P1010RDB.h | 4 
 include/configs/P1022DS.h  | 4 
 include/configs/P1_P2_RDB.h| 4 
 include/configs/T104xRDB.h | 1 -
 include/configs/T208xQDS.h | 1 -
 include/configs/T208xRDB.h | 1 -
 include/configs/T4240QDS.h | 1 -
 include/configs/a3m071.h   | 1 -
 include/configs/am335x_igep0033.h  | 1 -
 include/configs/am3517_crane.h | 1 -
 include/configs/am3517_evm.h   | 1 -
 include/configs/apf27.h| 1 -
 include/configs/arndale.h  | 1 -
 include/configs/bur_am335x_common.h| 1 -
 include/configs/cam_enc_4xx.h  | 1 -
 include/configs/cm_t35.h   | 1 -
 include/configs/da850evm.h | 1 -
 include/configs/devkit8000.h   | 1 -
 include/configs/exynos5-dt.h   | 1 -
 include/configs/hawkboard.h| 1 -
 include/configs/ipam390.h  | 1 -
 include/configs/lwmon5.h   | 1 -
 include/configs/m53evk.h   | 1 -
 include/configs/mcx.h  | 1 -
 include/configs/microblaze-generic.h   | 1 -
 include/configs/mx31pdk.h  | 1 -
 include/configs/mxs.h  | 1 -
 include/configs/omap3_evm_common.h | 1 -
 include/configs/origen.h   | 1 -
 include/configs/p1_p2_rdb_pc.h | 4 
 include/configs/palmtreo680.h  | 1 -
 include/configs/pcm051.h   | 1 -
 include/configs/sama5d3xek.h   | 1 -
 include/configs/siemens-am33x-common.h | 1 -
 include/configs/smdkv310.h | 1 -
 include/configs/socfpga_cyclone5.h | 1 -
 include/configs/tam3517-common.h   | 1 -
 include/configs/tao3530.h  | 1 -
 include/configs/tegra-common.h | 1 -
 include/configs/ti814x_evm.h   | 1 -
 include/configs/ti816x_evm.h   | 1 -
 include/configs/ti_armv7_common.h  | 1 -
 include/configs/tricorder.h| 1 -
 include/configs/tx25.h | 1 -
 include/configs/vpac270.h  | 1 -
 include/configs/woodburn_sd.h  | 1 -
 include/configs/x600.h | 1 -
 include/configs/zynq-common.h  | 1 -
 53 files changed, 66 deletions(-)

diff --git a/include/configs/B4860QDS.h b/include/configs/B4860QDS.h
index cb35116..c4eb50d 100644
--- a/include/configs/B4860QDS.h
+++ b/include/configs/B4860QDS.h
@@ -23,7 +23,6 @@
 #define CONFIG_RAMBOOT_TEXT_BASE   CONFIG_SYS_TEXT_BASE
 #define CONFIG_RESET_VECTOR_ADDRESS0xfffc
 #else
-#define CONFIG_SPL 1
 #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
 #define CONFIG_SPL_ENV_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
diff --git a/include/configs/BSC9131RDB.h b/include/configs/BSC9131RDB.h
index e6b46e4..56a3e94 100644
--- a/include/configs/BSC9131RDB.h
+++ b/include/configs/BSC9131RDB.h
@@ -25,7 +25,6 @@
 #endif
 
 #ifdef CONFIG_NAND
-#define CONFIG_SPL 1
 #define CONFIG_SPL_INIT_MINIMAL
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_NAND_SUPPORT
diff --git a/include/configs/BSC9132QDS.h b/include/configs/BSC9132QDS.h
index fc45e45..4089b33 100644
--- a/include/configs/BSC9132QDS.h
+++ b/include/configs/BSC9132QDS.h
@@ -41,7 +41,6 @@
 #endif
 
 #ifdef CONFIG_NAND
-#define CONFIG_SPL 1
 #define CONFIG_SPL_INIT_MINIMAL
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_NAND_SUPPORT
diff --git a/include/configs/C29XPCIE.h b/include/configs/C29XPCIE.h
index f382b48..8ae33a5 100644
--- a/include/configs/C29XPCIE.h
+++ b/include/configs/C29XPCIE.h
@@ -24,8 +24,6 @@
 #endif
 
 #ifdef CONFIG_NAND
-#define CONFIG_SPL 1
-#define CONFIG_TPL 1
 #ifdef CONFIG_TPL_BUILD
 #define CONFIG_SPL_NAND_BOOT
 #define CONFIG_SPL_FLUSH_IMAGE
diff --git a/include/configs/MPC8313ERDB.h b/include/configs/MPC8313ERDB.h
index 7f5aa59..dd81229 100644
--- a/include/configs/MPC8313ERDB.h
+++ b/include/configs/MPC8313ERDB.h
@@ -19,7 +19,6 @@
 #define CONFIG_MPC8313ERDB 1
 
 #ifdef CONFIG_NAND
-#define CONFIG_SPL 1
 #define CONFIG_SPL_INIT_MINIMAL
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_NAND_SUPPORT
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index 86d62e1..c491b50 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -21,7 +21,6 @@
 #define CONFIG_NAND_FSL_IFC
 
 #ifdef CONFIG_SDCARD
-#define CONFIG_SPL 1
 #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
 #define CONFIG_SPL_DRIVERS_MISC_SUPPORT
 #define CONFIG_SPL_ENV_SUPPORT
@@ -56,7 +55,6 @@
 #define CONFIG_SYS_TEXT_BASE   0x1100
 #define 

[U-Boot] [RFCv2b PATCH 02/14] Do not apply: tools: add genkconfig

2014-05-27 Thread Masahiro Yamada
 
 Do not apply this patch to the main line
 

 What is this tool?
 --

This tool converts boards.cfg to defconfig and Kconfig files.

It automatically generates
 - arch/${ARCH}/Kconfig
 - board/${VENDOR}/${BOARD}/Kconfig
 - board/${BOARD}/Kconfig
 - arch/${ARCH}/configs/*_defconfig

 How to use?
 ---

Open tools/print_allconfigs with an editor.

Adjust cross compilers part for your environment.

  # Specify your favoriate cross tools
  CROSS_COMPILE_ARC=arc-linux-
  CROSS_COMPILE_AARCH64=aarch64-linux-gnu-
  CROSS_COMPILE_ARM=arm-unknown-linux-gnueabi-
   [snip]
  CROSS_COMPILE_X86=i386-linux-

And then, run tools/genkconfig.

 Why is this patch here?
 ---

The file boards.cfg is touched very frequently.
All the time, new/old boards are being added/removed.

The next commit was generated based on the u-boot/master at the time
I posted it.
It will become out-dated soon.

You can update it with this tool.

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
---

 tools/genkconfig   | 239 +
 tools/print_allconfigs |  77 
 2 files changed, 316 insertions(+)
 create mode 100755 tools/genkconfig
 create mode 100755 tools/print_allconfigs

diff --git a/tools/genkconfig b/tools/genkconfig
new file mode 100755
index 000..14126ab
--- /dev/null
+++ b/tools/genkconfig
@@ -0,0 +1,239 @@
+#!/bin/bash
+
+set -e
+
+find board -name Kconfig | xargs rm -f
+
+get_arch()
+{
+   case $arch in
+   powerpc) echo PPC;;
+   *)   echo ${1^^};;
+   esac
+}
+
+arch_list=arc arm avr32 blackfin m68k microblaze mips nds32 nios2 openrisc 
powerpc sandbox sh sparc x86
+
+for arch in $arch_list
+do
+   rm -rf arch/$arch/configs
+   mkdir arch/$arch/configs
+
+   ARCH=$(get_arch $arch)
+
+   case $arch in
+   blackfin) menu=Blackfin;;
+   m68k) menu=M68000;;
+   microblaze) menu=MicroBlaze;;
+   nios2) menu=Nios II;;
+   openrisc) menu=OpenRISC;;
+   powerpc) menu=PowerPC;;
+   sandbox) menu=Sandbox;;
+   sh) menu=SuperH;;
+   x86) menu=x86;;
+   *) menu=${arch^^};;
+   esac
+
+cat EOF  arch/$arch/Kconfig
+config $ARCH
+   bool
+   default y
+
+config SYS_ARCH
+   string
+   default $arch
+
+EOF
+
+if [ $arch = sandbox ]; then
+cat EOF  arch/$arch/Kconfig
+config SYS_CPU
+   string
+   default $arch
+
+config SYS_BOARD
+   string
+   default $arch
+
+config SYS_CONFIG_NAME
+   string
+   default $arch
+EOF
+else
+cat EOF  arch/$arch/Kconfig
+choice
+   prompt Target select
+
+EOF
+fi
+
+done
+
+write_defconfig ()
+{
+   if [ $spl_enable = y ]; then
+   echo  $defconfig CONFIG_SPL=y
+   fi
+
+   if [ $tpl_enable = y ]; then
+   echo  $defconfig CONFIG_TPL=y
+   fi
+
+   if [ $arch != sandbox ]; then
+   echo  $defconfig CONFIG_$TARGET=y
+   fi
+}
+
+write_kconfig ()
+{
+   echo  $kconfig
+   echo  $kconfig if $TARGET
+   echo  $kconfig
+
+   echo  $kconfig config SYS_CPU
+   echo  $kconfig   string
+   if [ $spl_cpu != $cpu ]; then
+   echo  $kconfig   default \$spl_cpu\ if SPL_BUILD
+   echo  $kconfig   default \$cpu\ if !SPL_BUILD
+   else
+   echo  $kconfig   default \$cpu\
+   fi
+   echo  $kconfig
+
+   echo  $kconfig config SYS_BOARD
+   echo  $kconfig   string
+   echo  $kconfig   default \$board\
+   echo  $kconfig
+
+   if [ $vendor != - ]; then
+   echo  $kconfig config SYS_VENDOR
+   echo  $kconfig   string
+   echo  $kconfig   default \$vendor\
+   echo  $kconfig
+   fi
+
+   if [ $soc != - ]; then
+   echo  $kconfig config SYS_SOC
+   echo  $kconfig   string
+   echo  $kconfig   default \$soc\
+   echo  $kconfig
+   fi
+
+   echo  $kconfig config SYS_CONFIG_NAME
+   echo  $kconfig   string
+   echo  $kconfig   default \$config_name\
+   echo  $kconfig
+
+   if [ $extra_options ]; then
+   # O2MNT_O2M110, O2MNT_O2M112, O2MNT_O2M113 boards include
+   # double-quotations in the extra option field.
+   # We must escape them.
+   echo  $kconfig config SYS_EXTRA_OPTIONS
+   echo  $kconfig   string
+   echo  $kconfig   default \$(echo $extra_options | sed 
-e 's//\\/g')\
+   echo  $kconfig
+   fi
+
+   echo  $kconfig endif
+}
+
+sed -e 's/Orphan/Active/' -e '/#/d' boards.cfg | \
+tools/reformat.py -i -d '-' -s 8 |
+while read -r status arch cpu soc vendor board target options maintainers
+do
+   

[U-Boot] [RFCv2b PATCH 14/14] remove CONFIG_{SPL, TPL}_TEXT_BASE from config headers

2014-05-27 Thread Masahiro Yamada
All the CONFIG_SPL_TEXT_BASE and CONFIG_TPL_TEXT_BASE definition
were moved to defconfig.
Now we can clean-up config headers.

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
---

 include/config_fallbacks.h | 5 -
 include/configs/B4860QDS.h | 1 -
 include/configs/BSC9131RDB.h   | 1 -
 include/configs/BSC9132QDS.h   | 1 -
 include/configs/C29XPCIE.h | 2 --
 include/configs/P1010RDB.h | 5 -
 include/configs/P1022DS.h  | 4 
 include/configs/T104xRDB.h | 1 -
 include/configs/T208xQDS.h | 1 -
 include/configs/T208xRDB.h | 1 -
 include/configs/T4240QDS.h | 1 -
 include/configs/a3m071.h   | 1 -
 include/configs/am335x_igep0033.h  | 1 -
 include/configs/am3517_crane.h | 1 -
 include/configs/am3517_evm.h   | 1 -
 include/configs/am43xx_evm.h   | 1 -
 include/configs/apf27.h| 1 -
 include/configs/arndale.h  | 1 -
 include/configs/bur_am335x_common.h| 1 -
 include/configs/cam_enc_4xx.h  | 1 -
 include/configs/cm_t35.h   | 1 -
 include/configs/da850evm.h | 1 -
 include/configs/devkit8000.h   | 1 -
 include/configs/exynos5250-dt.h| 1 -
 include/configs/hawkboard.h| 1 -
 include/configs/ipam390.h  | 1 -
 include/configs/k2hk_evm.h | 1 -
 include/configs/lwmon5.h   | 1 -
 include/configs/m53evk.h   | 1 -
 include/configs/mcx.h  | 1 -
 include/configs/mx31pdk.h  | 1 -
 include/configs/mxs.h  | 1 -
 include/configs/omap3_evm_common.h | 1 -
 include/configs/origen.h   | 1 -
 include/configs/p1_p2_rdb_pc.h | 4 
 include/configs/palmtreo680.h  | 1 -
 include/configs/pcm051.h   | 1 -
 include/configs/sama5d3xek.h   | 1 -
 include/configs/siemens-am33x-common.h | 1 -
 include/configs/smdk5420.h | 6 --
 include/configs/smdkv310.h | 1 -
 include/configs/socfpga_cyclone5.h | 3 ---
 include/configs/tam3517-common.h   | 1 -
 include/configs/tao3530.h  | 1 -
 include/configs/tegra114-common.h  | 1 -
 include/configs/tegra124-common.h  | 1 -
 include/configs/tegra20-common.h   | 1 -
 include/configs/tegra30-common.h   | 1 -
 include/configs/ti814x_evm.h   | 1 -
 include/configs/ti816x_evm.h   | 1 -
 include/configs/ti_am335x_common.h | 1 -
 include/configs/ti_omap3_common.h  | 1 -
 include/configs/ti_omap4_common.h  | 1 -
 include/configs/ti_omap5_common.h  | 1 -
 include/configs/tricorder.h| 1 -
 include/configs/tx25.h | 1 -
 include/configs/vpac270.h  | 1 -
 include/configs/woodburn_sd.h  | 1 -
 include/configs/x600.h | 1 -
 include/configs/zynq-common.h  | 3 ---
 60 files changed, 84 deletions(-)

diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h
index 11f375c..b304a41 100644
--- a/include/config_fallbacks.h
+++ b/include/config_fallbacks.h
@@ -83,9 +83,4 @@
 #define CONFIG_SYS_HZ  1000
 #endif
 
-#ifdef CONFIG_TPL_BUILD
-# undef CONFIG_SPL_TEXT_BASE
-# define CONFIG_SPL_TEXT_BASE CONFIG_TPL_TEXT_BASE
-#endif
-
 #endif /* __CONFIG_FALLBACKS_H */
diff --git a/include/configs/B4860QDS.h b/include/configs/B4860QDS.h
index c4eb50d..f15ae30 100644
--- a/include/configs/B4860QDS.h
+++ b/include/configs/B4860QDS.h
@@ -34,7 +34,6 @@
 #define CONFIG_SPL_DRIVERS_MISC_SUPPORT
 #define CONFIG_FSL_LAW /* Use common FSL init code */
 #define CONFIG_SYS_TEXT_BASE   0x00201000
-#define CONFIG_SPL_TEXT_BASE   0xFFFD8000
 #define CONFIG_SPL_PAD_TO  0x4
 #define CONFIG_SPL_MAX_SIZE0x28000
 #define RESET_VECTOR_OFFSET0x27FFC
diff --git a/include/configs/BSC9131RDB.h b/include/configs/BSC9131RDB.h
index 56a3e94..8bbb696 100644
--- a/include/configs/BSC9131RDB.h
+++ b/include/configs/BSC9131RDB.h
@@ -33,7 +33,6 @@
 #define CONFIG_SPL_TARGET  u-boot-with-spl.bin
 
 #define CONFIG_SYS_TEXT_BASE   0x00201000
-#define CONFIG_SPL_TEXT_BASE   0xE000
 #define CONFIG_SPL_MAX_SIZE8192
 #define CONFIG_SPL_RELOC_TEXT_BASE 0x0010
 #define CONFIG_SPL_RELOC_STACK 0x0010
diff --git a/include/configs/BSC9132QDS.h b/include/configs/BSC9132QDS.h
index 4089b33..7675502 100644
--- a/include/configs/BSC9132QDS.h
+++ b/include/configs/BSC9132QDS.h
@@ -49,7 +49,6 @@
 #define CONFIG_SPL_TARGET  u-boot-with-spl.bin
 
 #define CONFIG_SYS_TEXT_BASE   0x00201000
-#define CONFIG_SPL_TEXT_BASE   0xE000
 #define CONFIG_SPL_MAX_SIZE8192
 #define CONFIG_SPL_RELOC_TEXT_BASE 0x0010
 #define CONFIG_SPL_RELOC_STACK 0x0010
diff --git a/include/configs/C29XPCIE.h 

[U-Boot] [RFCv2b PATCH 07/14] MAKEALL: adjust for Kconfig

2014-05-27 Thread Masahiro Yamada
Use make board_defconfig instead of make board_config.

WARNING
This adjustment is not enough.
MAKEALL should parse defconfig files instead of boards.cfg.
This commit has not got this rework done yet.

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
---

 MAKEALL | 14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/MAKEALL b/MAKEALL
index 37ef71e..8781504 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -506,9 +506,9 @@ get_target_location() {
 
set ${line}
 
-   CONFIG_NAME=${7%_config}
+   CONFIG_NAME=${7%_defconfig}
 
-   [ ${BOARD_NAME} ] || BOARD_NAME=${7%_config}
+   [ ${BOARD_NAME} ] || BOARD_NAME=${7%_defconfig}
 
if [ $# -gt 5 ]; then
if [ $6 = - ] ; then
@@ -640,12 +640,20 @@ build_target() {
MAKE=make
fi
 
+   if [ $target_arch = aarch64 ]; then
+   target_arch_fixup=arm
+   else
+   target_arch_fixup=$target_arch
+   fi
+
+   MAKE=$MAKE ARCH=$target_arch_fixup
+
if [  ${output_dir} != . ] ; then
MAKE=${MAKE} O=${output_dir}
fi
 
${MAKE} distclean /dev/null
-   ${MAKE} -s ${target}_config
+   ${MAKE} -s ${target}_defconfig
 
${MAKE} ${JOBS} ${CHECK} all \
${LOG_DIR}/$target.MAKELOG 2 ${LOG_DIR}/$target.ERR
-- 
1.9.1

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


[U-Boot] [RFCv2b PATCH 05/14] include: define CONFIG_SPL and CONFIG_TPL as 1

2014-05-27 Thread Masahiro Yamada
We are about to switch to Kconfig in the next commit.
But there are something to get done beforehand.

In Kconfig, include/generated/autoconf.h defines boolean
CONFIG macros as 1.

CONFIG_SPL and CONFIG_TPL, if defined, must be defined as 1.
Otherwise, when switching to Kconfig, the build log
would be sprinkled with warning messages like this:
  warning: CONFIG_SPL redefined [enabled by default]

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
Reviewed-by: Simon Glass s...@chromium.org
---

 doc/README.SPL | 2 +-
 include/configs/B4860QDS.h | 2 +-
 include/configs/BSC9131RDB.h   | 2 +-
 include/configs/BSC9132QDS.h   | 2 +-
 include/configs/C29XPCIE.h | 4 ++--
 include/configs/MPC8313ERDB.h  | 2 +-
 include/configs/P1010RDB.h | 8 
 include/configs/P1022DS.h  | 8 
 include/configs/P1_P2_RDB.h| 8 
 include/configs/T104xRDB.h | 2 +-
 include/configs/T208xQDS.h | 2 +-
 include/configs/T208xRDB.h | 2 +-
 include/configs/T4240QDS.h | 2 +-
 include/configs/a3m071.h   | 2 +-
 include/configs/am335x_igep0033.h  | 2 +-
 include/configs/am3517_crane.h | 2 +-
 include/configs/am3517_evm.h   | 2 +-
 include/configs/apf27.h| 2 +-
 include/configs/arndale.h  | 2 +-
 include/configs/bur_am335x_common.h| 2 +-
 include/configs/cam_enc_4xx.h  | 2 +-
 include/configs/cm_t35.h   | 2 +-
 include/configs/da850evm.h | 2 +-
 include/configs/devkit8000.h   | 2 +-
 include/configs/exynos5-dt.h   | 2 +-
 include/configs/hawkboard.h| 2 +-
 include/configs/ipam390.h  | 2 +-
 include/configs/lwmon5.h   | 2 +-
 include/configs/m53evk.h   | 2 +-
 include/configs/mcx.h  | 2 +-
 include/configs/microblaze-generic.h   | 2 +-
 include/configs/mx31pdk.h  | 2 +-
 include/configs/mxs.h  | 2 +-
 include/configs/omap3_evm_common.h | 2 +-
 include/configs/origen.h   | 2 +-
 include/configs/p1_p2_rdb_pc.h | 8 
 include/configs/palmtreo680.h  | 2 +-
 include/configs/pcm051.h   | 2 +-
 include/configs/sama5d3xek.h   | 2 +-
 include/configs/siemens-am33x-common.h | 2 +-
 include/configs/smdkv310.h | 2 +-
 include/configs/socfpga_cyclone5.h | 2 +-
 include/configs/tam3517-common.h   | 2 +-
 include/configs/tao3530.h  | 2 +-
 include/configs/tegra-common.h | 2 +-
 include/configs/ti814x_evm.h   | 2 +-
 include/configs/ti816x_evm.h   | 2 +-
 include/configs/ti_armv7_common.h  | 2 +-
 include/configs/tricorder.h| 2 +-
 include/configs/tx25.h | 2 +-
 include/configs/vpac270.h  | 2 +-
 include/configs/woodburn_sd.h  | 2 +-
 include/configs/x600.h | 2 +-
 include/configs/zynq-common.h  | 2 +-
 54 files changed, 67 insertions(+), 67 deletions(-)

diff --git a/doc/README.SPL b/doc/README.SPL
index 57a39a4..2b4b0b8 100644
--- a/doc/README.SPL
+++ b/doc/README.SPL
@@ -40,7 +40,7 @@ COBJS-$(CONFIG_SPL_BUILD) += foo.o
 
 The building of SPL images can be with:
 
-#define CONFIG_SPL
+#define CONFIG_SPL 1
 
 Because SPL images normally have a different text base, one has to be
 configured by defining CONFIG_SPL_TEXT_BASE. The linker script has to be
diff --git a/include/configs/B4860QDS.h b/include/configs/B4860QDS.h
index 1af9ba6..cb35116 100644
--- a/include/configs/B4860QDS.h
+++ b/include/configs/B4860QDS.h
@@ -23,7 +23,7 @@
 #define CONFIG_RAMBOOT_TEXT_BASE   CONFIG_SYS_TEXT_BASE
 #define CONFIG_RESET_VECTOR_ADDRESS0xfffc
 #else
-#define CONFIG_SPL
+#define CONFIG_SPL 1
 #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
 #define CONFIG_SPL_ENV_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
diff --git a/include/configs/BSC9131RDB.h b/include/configs/BSC9131RDB.h
index 5a316c8..e6b46e4 100644
--- a/include/configs/BSC9131RDB.h
+++ b/include/configs/BSC9131RDB.h
@@ -25,7 +25,7 @@
 #endif
 
 #ifdef CONFIG_NAND
-#define CONFIG_SPL
+#define CONFIG_SPL 1
 #define CONFIG_SPL_INIT_MINIMAL
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_NAND_SUPPORT
diff --git a/include/configs/BSC9132QDS.h b/include/configs/BSC9132QDS.h
index 7bb5d33..fc45e45 100644
--- a/include/configs/BSC9132QDS.h
+++ b/include/configs/BSC9132QDS.h
@@ -41,7 +41,7 @@
 #endif
 
 #ifdef CONFIG_NAND
-#define CONFIG_SPL
+#define CONFIG_SPL 1
 #define CONFIG_SPL_INIT_MINIMAL
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_NAND_SUPPORT
diff --git a/include/configs/C29XPCIE.h b/include/configs/C29XPCIE.h
index 9e12fac..f382b48 100644
--- a/include/configs/C29XPCIE.h
+++ b/include/configs/C29XPCIE.h
@@ -24,8 +24,8 @@
 #endif
 
 #ifdef CONFIG_NAND
-#define CONFIG_SPL
-#define CONFIG_TPL
+#define CONFIG_SPL 1
+#define 

[U-Boot] [RFCv2b PATCH 12/14] split CONFIG_SPL_TEXT_BASE and CONFIG_TPL_TEXT_BASE

2014-05-27 Thread Masahiro Yamada
We are about to move CONFIG_SPL_TEXT_BASE from header files to defconfig.
But we cannot move them as they are.

The problem is that #ifdef statements are used in board headers with
TPL support. Like this:

  #ifdef CONFIG_TPL_BUILD
  #define CONFIG_SPL_TEXT_BASE0xD0001000
  #elif defined(CONFIG_SPL_BUILD)
  #define CONFIG_SPL_TEXT_BASE0xff80
  #endif

We cannot describe conditinal statments in defconfig.
One possible solution is to add CONFIG_TPL_TEXT_BASE.

This commit modifies the code as follow:

  #ifdef CONFIG_TPL_BUILD
  #define CONFIG_TPL_TEXT_BASE0xD0001000
  #elif defined(CONFIG_SPL_BUILD)
  #define CONFIG_SPL_TEXT_BASE0xff80
  #endif

(include/config_fallbakcs.h should also be tweaked because some other
parts still reference to CONFIG_SPL_TEXT_BASE)

In the next commit, it will be converted into defconfig like this:

  CONFIG_SPL_TEXT_BASE=0xff80
  CONFIG_TPL_TEXT_BASE=0xd0001000

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
---

 include/config_fallbacks.h | 5 +
 include/configs/C29XPCIE.h | 2 +-
 include/configs/P1010RDB.h | 2 +-
 include/configs/P1022DS.h  | 2 +-
 include/configs/P1_P2_RDB.h| 2 +-
 include/configs/p1_p2_rdb_pc.h | 2 +-
 6 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h
index b304a41..11f375c 100644
--- a/include/config_fallbacks.h
+++ b/include/config_fallbacks.h
@@ -83,4 +83,9 @@
 #define CONFIG_SYS_HZ  1000
 #endif
 
+#ifdef CONFIG_TPL_BUILD
+# undef CONFIG_SPL_TEXT_BASE
+# define CONFIG_SPL_TEXT_BASE CONFIG_TPL_TEXT_BASE
+#endif
+
 #endif /* __CONFIG_FALLBACKS_H */
diff --git a/include/configs/C29XPCIE.h b/include/configs/C29XPCIE.h
index 8ae33a5..51e7fcb 100644
--- a/include/configs/C29XPCIE.h
+++ b/include/configs/C29XPCIE.h
@@ -38,7 +38,7 @@
 #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
 #define CONFIG_SPL_COMMON_INIT_DDR
 #define CONFIG_SPL_MAX_SIZE(128  10)
-#define CONFIG_SPL_TEXT_BASE   0xf8f81000
+#define CONFIG_TPL_TEXT_BASE   0xf8f81000
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
 #define CONFIG_SYS_NAND_U_BOOT_SIZE(832  10)
 #define CONFIG_SYS_NAND_U_BOOT_DST (0x1100)
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index c491b50..afd8945 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -119,7 +119,7 @@
 #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
 #define CONFIG_SPL_COMMON_INIT_DDR
 #define CONFIG_SPL_MAX_SIZE(128  10)
-#define CONFIG_SPL_TEXT_BASE   0xD0001000
+#define CONFIG_TPL_TEXT_BASE   0xD0001000
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
 #define CONFIG_SYS_NAND_U_BOOT_SIZE(576  10)
 #define CONFIG_SYS_NAND_U_BOOT_DST (0x1100)
diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h
index 54e2569..4683900 100644
--- a/include/configs/P1022DS.h
+++ b/include/configs/P1022DS.h
@@ -90,7 +90,7 @@
 #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
 #define CONFIG_SPL_COMMON_INIT_DDR
 #define CONFIG_SPL_MAX_SIZE(128  10)
-#define CONFIG_SPL_TEXT_BASE   0xf8f81000
+#define CONFIG_TPL_TEXT_BASE   0xf8f81000
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
 #define CONFIG_SYS_NAND_U_BOOT_SIZE(832  10)
 #define CONFIG_SYS_NAND_U_BOOT_DST (0x1100)
diff --git a/include/configs/P1_P2_RDB.h b/include/configs/P1_P2_RDB.h
index c75638a..2867fb5 100644
--- a/include/configs/P1_P2_RDB.h
+++ b/include/configs/P1_P2_RDB.h
@@ -104,7 +104,7 @@
 #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
 #define CONFIG_SPL_COMMON_INIT_DDR
 #define CONFIG_SPL_MAX_SIZE(128  10)
-#define CONFIG_SPL_TEXT_BASE   0xf8f81000
+#define CONFIG_TPL_TEXT_BASE   0xf8f81000
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
 #define CONFIG_SYS_NAND_U_BOOT_SIZE(832  10)
 #define CONFIG_SYS_NAND_U_BOOT_DST (0x1100)
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index 9b58950..0d70ec1 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -218,7 +218,7 @@
 #define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
 #define CONFIG_SPL_COMMON_INIT_DDR
 #define CONFIG_SPL_MAX_SIZE(128  10)
-#define CONFIG_SPL_TEXT_BASE   0xf8f81000
+#define CONFIG_TPL_TEXT_BASE   0xf8f81000
 #define CONFIG_SYS_MPC85XX_NO_RESETVEC
 #define CONFIG_SYS_NAND_U_BOOT_SIZE(832  10)
 #define CONFIG_SYS_NAND_U_BOOT_DST (0x1100)
-- 
1.9.1

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


[U-Boot] [RFCv2b PATCH 09/14] kconfig: delete redundant CONFIG_${ARCH} definition

2014-05-27 Thread Masahiro Yamada
CONFIG_${ARCH} is defined by Kconfig.

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
Reviewed-by: Simon Glass s...@chromium.org
---

 arch/arc/config.mk   | 2 +-
 arch/arm/config.mk   | 2 +-
 arch/avr32/config.mk | 1 -
 arch/blackfin/config.mk  | 1 -
 arch/m68k/config.mk  | 2 +-
 arch/mips/config.mk  | 2 +-
 arch/nds32/config.mk | 2 +-
 arch/nios2/config.mk | 2 +-
 arch/openrisc/config.mk  | 2 +-
 arch/powerpc/config.mk   | 2 +-
 arch/sandbox/config.mk   | 2 +-
 arch/sparc/config.mk | 2 +-
 arch/x86/cpu/config.mk   | 2 +-
 include/configs/microblaze-generic.h | 1 -
 14 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/arch/arc/config.mk b/arch/arc/config.mk
index a3b8df7..e408800 100644
--- a/arch/arc/config.mk
+++ b/arch/arc/config.mk
@@ -21,7 +21,7 @@ ifeq ($(CROSS_COMPILE),)
 CROSS_COMPILE := $(ARC_CROSS_COMPILE)
 endif
 
-PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -DCONFIG_ARC -gdwarf-2
+PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2
 
 # Needed for relocation
 LDFLAGS_FINAL += -pie
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 66ecc2e..31e042a 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -22,7 +22,7 @@ PLATFORM_RELFLAGS += $(call cc-option, -msoft-float) \
 # Support generic board on ARM
 __HAVE_ARCH_GENERIC_BOARD := y
 
-PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
+PLATFORM_CPPFLAGS += -D__ARM__
 
 # Choose between ARM/Thumb instruction sets
 ifeq ($(CONFIG_SYS_THUMB_BUILD),y)
diff --git a/arch/avr32/config.mk b/arch/avr32/config.mk
index 28a371c..469185e 100644
--- a/arch/avr32/config.mk
+++ b/arch/avr32/config.mk
@@ -9,7 +9,6 @@ ifeq ($(CROSS_COMPILE),)
 CROSS_COMPILE := avr32-linux-
 endif
 
-PLATFORM_CPPFLAGS += -DCONFIG_AVR32
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x
 
 PLATFORM_RELFLAGS  += -ffixed-r5 -fPIC -mno-init-got -mrelax
diff --git a/arch/blackfin/config.mk b/arch/blackfin/config.mk
index c9927b8..135119c 100644
--- a/arch/blackfin/config.mk
+++ b/arch/blackfin/config.mk
@@ -23,7 +23,6 @@ endif
 CONFIG_BFIN_BOOT_MODE := $(strip $(CONFIG_BFIN_BOOT_MODE:%=%))
 
 PLATFORM_RELFLAGS += -ffixed-P3 -fomit-frame-pointer -mno-fdpic
-PLATFORM_CPPFLAGS += -DCONFIG_BLACKFIN
 
 LDFLAGS_FINAL += --gc-sections
 LDFLAGS += -m elf32bfin
diff --git a/arch/m68k/config.mk b/arch/m68k/config.mk
index 33b3d51..3b3a7e8 100644
--- a/arch/m68k/config.mk
+++ b/arch/m68k/config.mk
@@ -11,7 +11,7 @@ endif
 
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x2
 
-PLATFORM_CPPFLAGS += -DCONFIG_M68K -D__M68K__
+PLATFORM_CPPFLAGS += -D__M68K__
 PLATFORM_LDFLAGS  += -n
 PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
 PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
diff --git a/arch/mips/config.mk b/arch/mips/config.mk
index f4a234a..a2d07af 100644
--- a/arch/mips/config.mk
+++ b/arch/mips/config.mk
@@ -25,7 +25,7 @@ endif
 # Default to EB if no endianess is configured
 ENDIANNESS ?= -EB
 
-PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__
+PLATFORM_CPPFLAGS += -D__MIPS__
 
 __HAVE_ARCH_GENERIC_BOARD := y
 
diff --git a/arch/nds32/config.mk b/arch/nds32/config.mk
index 1024852..5ac9f90 100644
--- a/arch/nds32/config.mk
+++ b/arch/nds32/config.mk
@@ -17,6 +17,6 @@ CONFIG_STANDALONE_LOAD_ADDR = 0x30 \
 
 PLATFORM_RELFLAGS  += -fno-strict-aliasing -fno-common -mrelax
 PLATFORM_RELFLAGS  += -gdwarf-2
-PLATFORM_CPPFLAGS  += -DCONFIG_NDS32 -D__nds32__ -G0 -ffixed-10 -fpie
+PLATFORM_CPPFLAGS  += -D__nds32__ -G0 -ffixed-10 -fpie
 
 LDFLAGS_u-boot = --gc-sections --relax
diff --git a/arch/nios2/config.mk b/arch/nios2/config.mk
index 65a5a40..82bd887 100644
--- a/arch/nios2/config.mk
+++ b/arch/nios2/config.mk
@@ -12,7 +12,7 @@ endif
 
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x0200
 
-PLATFORM_CPPFLAGS += -DCONFIG_NIOS2 -D__NIOS2__
+PLATFORM_CPPFLAGS += -D__NIOS2__
 PLATFORM_CPPFLAGS += -G0
 
 LDFLAGS_FINAL += --gc-sections
diff --git a/arch/openrisc/config.mk b/arch/openrisc/config.mk
index 9902b9a..cd95f24 100644
--- a/arch/openrisc/config.mk
+++ b/arch/openrisc/config.mk
@@ -11,6 +11,6 @@ endif
 
 # r10 used for global object pointer, already set in OR32 GCC but just to be
 # clear
-PLATFORM_CPPFLAGS += -DCONFIG_OPENRISC -D__OR1K__ -ffixed-r10
+PLATFORM_CPPFLAGS += -D__OR1K__ -ffixed-r10
 
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x4
diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk
index fb7096e..6329b6c 100644
--- a/arch/powerpc/config.mk
+++ b/arch/powerpc/config.mk
@@ -13,7 +13,7 @@ CONFIG_STANDALONE_LOAD_ADDR ?= 0x4
 LDFLAGS_FINAL += --gc-sections
 PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections \
-meabi
-PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__ -ffixed-r2
+PLATFORM_CPPFLAGS += -D__powerpc__ -ffixed-r2
 PLATFORM_LDFLAGS  += -n
 
 # Support generic board 

[U-Boot] [RFC] Two sets of experimental Kconfig patches

2014-05-27 Thread Masahiro Yamada
Hi.

I've posted two sets of Kconfig RFC patches: RFCv2a and RFCv2b

The difference from v1  is that 
Full U-boot image, SPL and TPL share a single defconfig
and make config is done in one-shot.

This approach dates back to Simon's following comments:

On Thu, 20 Mar 2014 19:15:30 -0700
Simon Glass s...@chromium.org wrote:

  But, our situation is a little more complicated.
  We need to generate 3 images at most: main image, SPL and TPL.
  And each of them can have a different set of CONFIGs.
 
  For example, we can describe a board header file like this:
 
#if defined(CONFIG_TPL_BUILD)
# define CONFIG_FOO   100
#elif defined(CONFIG_SPL_BUILD)
# define CONFIG_FOO   50
#else
# define CONFIG_FOO   10
# define CONFIG_BAR
#endif
 
 I wonder if we should drop this, and require that all have the same
 options? That would involve requiring that board config files are not
 permitted to use #ifdef CONFIG_SPL or #ifdef CONFIG_TPL.
 
 Does that seem like a bad restriction? The advantage is that we only
 need one defconfig for each board. It seems to me that things are
 going to get really painful if we have three different configs.
 
 Of course, this doesn't preclude #ifdefs in the Makefiles or actual
 source code, but we already have SPL-specific feature options.
 
 I'm not 100% clear on the constraints here.


In my opition, this approach might work, but will be painful.

Anyway I just wanted to see what would happen
if multiple binary images had a single defconfig in common.

We will have to duplicate many configs with CONFIG_SPL_
and CONFIG_TPL_ prefixes.

For example,
 - CONFIG_SYS_TEXT_BASE  (text base for the full image)
 - CONFIG_SPL_TEXT_BASE  (text base for SPL)
 - CONFIG_TPL_TEXT_BASE  (text base for TPL)

 - CONFIG_OF_CONTROL (enables OF control for the full image)
 - CONFIG_SPL_OF_CONTROL  (enables OF control for SPL)
 - CONFIG_TPL_OF_CONTROL  (enables OF control for TPL)

Probably I will not adopt this approach, but your comments
are welcome.



The difference between RFCv2a and RFCv2b is
how ARCH should be passed to the build system.

In RFCv2a, ARCH is determined by Kconfig.
We don't have to give it from the command line.
All defconfig files are stored in configs/ directory.


In RFCv2b, ARCH should be given from the command line
as in Linux Kernel:
   make ARCH=arch   board_name_defconfig
   make ARCH=archCROSS_COMPILE=gcc_prefix
Defconfig files are stored in arch/${ARCH}/configs/ directory.


I just tried Linux's way implementation because Stephen mentioned so.

On Thu, 24 Apr 2014 14:36:33 -0600
Stephen Warren swar...@wwwdotorg.org wrote:

  But in U-Boot, ARCH is not given from the command line.
  Which means we cannot know ARCH before the board configuration.
  That is why *_defconfig files over all architectures should be
  gathered into one directory ./configs/.
  (The problem is configs/ directory contains about 1200 files!)
 
 Perhaps we can change the command-line used to build U-Boot, rather than
 shoe-horning U-Boot's Kconfig usage to fit that current limitation.


But I am not sure if other users are comfortable with giving ARCH=arch
for every configuration and build.
Your comments are welcome.



If you want to easily try and compare them, you can also
use my GitHub repository:

git clone git://github.com/masahir0y/u-boot-kbuild.git

There are some branches.
kconfig_rfc:  RFC
kconfig_v1:   Version1
kconfig_rfc2a:   RFCv2a
kconfig_rfc2b:   RFCv2b





Best Regards
Masahiro Yamada

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


[U-Boot] Statically allocate a range of physical memory to an OS image.

2014-05-27 Thread mazen.e
Hello,

I want to execute a an OS (either Linux or Android) on the Arndale exynos
5250 board. The board features 2 GB of RAM. However, I want to statically
alloacate a specifc region of RAM (e.g. 1 GB) to be used by the OS,  While
the other 1 GB is reserved for other purposes.

 What is the best way to achieve this goal? do I need to change the FDT to
reflect only the region of memory that I want to be visible by the OS? or
can it be done througth the bootargs passed from uboot to the kernel?

 
Please share your ideas.

Many thanks.



--
View this message in context: 
http://u-boot.10912.n7.nabble.com/Statically-allocate-a-range-of-physical-memory-to-an-OS-image-tp180825.html
Sent from the U-Boot mailing list archive at Nabble.com.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] macb: make checkpatch clean

2014-05-27 Thread Josh Wu

Hi, Dear Andreas

On 5/27/2014 4:55 AM, Andreas Bießmann wrote:

This also renames the CONFIG_SYS_MACB_xx defines. They are used just local and
therefore don't need the CONFIG_SYS_ prefix.

Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com


This patch looks good to me.
Reviewed-by: Josh Wu josh...@atmel.com

Best Regards,
Josh Wu


---

  drivers/net/macb.c |   56 +++-
  1 file changed, 29 insertions(+), 27 deletions(-)

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 781a272..750331d 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -40,11 +40,11 @@
  
  #include macb.h
  
-#define CONFIG_SYS_MACB_RX_BUFFER_SIZE		4096

-#define CONFIG_SYS_MACB_RX_RING_SIZE   (CONFIG_SYS_MACB_RX_BUFFER_SIZE 
/ 128)
-#define CONFIG_SYS_MACB_TX_RING_SIZE   16
-#define CONFIG_SYS_MACB_TX_TIMEOUT 1000
-#define CONFIG_SYS_MACB_AUTONEG_TIMEOUT500
+#define MACB_RX_BUFFER_SIZE4096
+#define MACB_RX_RING_SIZE  (MACB_RX_BUFFER_SIZE / 128)
+#define MACB_TX_RING_SIZE  16
+#define MACB_TX_TIMEOUT1000
+#define MACB_AUTONEG_TIMEOUT   500
  
  struct macb_dma_desc {

u32 addr;
@@ -170,7 +170,7 @@ int macb_miiphy_read(const char *devname, u8 phy_adr, u8 
reg, u16 *value)
struct eth_device *dev = eth_get_dev_by_name(devname);
struct macb_device *macb = to_macb(dev);
  
-	if ( macb-phy_addr != phy_adr )

+   if (macb-phy_addr != phy_adr)
return -1;
  
  	arch_get_mdio_control(devname);

@@ -184,7 +184,7 @@ int macb_miiphy_write(const char *devname, u8 phy_adr, u8 
reg, u16 value)
struct eth_device *dev = eth_get_dev_by_name(devname);
struct macb_device *macb = to_macb(dev);
  
-	if ( macb-phy_addr != phy_adr )

+   if (macb-phy_addr != phy_adr)
return -1;
  
  	arch_get_mdio_control(devname);

@@ -208,11 +208,12 @@ static int macb_send(struct eth_device *netdev, void 
*packet, int length)
  
  	ctrl = length  TXBUF_FRMLEN_MASK;

ctrl |= TXBUF_FRAME_END;
-   if (tx_head == (CONFIG_SYS_MACB_TX_RING_SIZE - 1)) {
+   if (tx_head == (MACB_TX_RING_SIZE - 1)) {
ctrl |= TXBUF_WRAP;
macb-tx_head = 0;
-   } else
+   } else {
macb-tx_head++;
+   }
  
  	macb-tx_ring[tx_head].ctrl = ctrl;

macb-tx_ring[tx_head].addr = paddr;
@@ -223,7 +224,7 @@ static int macb_send(struct eth_device *netdev, void 
*packet, int length)
 * I guess this is necessary because the networking core may
 * re-use the transmit buffer as soon as we return...
 */
-   for (i = 0; i = CONFIG_SYS_MACB_TX_TIMEOUT; i++) {
+   for (i = 0; i = MACB_TX_TIMEOUT; i++) {
barrier();
ctrl = macb-tx_ring[tx_head].ctrl;
if (ctrl  TXBUF_USED)
@@ -233,7 +234,7 @@ static int macb_send(struct eth_device *netdev, void 
*packet, int length)
  
  	dma_unmap_single(packet, length, paddr);
  
-	if (i = CONFIG_SYS_MACB_TX_TIMEOUT) {

+   if (i = MACB_TX_TIMEOUT) {
if (ctrl  TXBUF_UNDERRUN)
printf(%s: TX underrun\n, netdev-name);
if (ctrl  TXBUF_EXHAUSTED)
@@ -256,7 +257,7 @@ static void reclaim_rx_buffers(struct macb_device *macb,
while (i  new_tail) {
macb-rx_ring[i].addr = ~RXADDR_USED;
i++;
-   if (i  CONFIG_SYS_MACB_RX_RING_SIZE)
+   if (i  MACB_RX_RING_SIZE)
i = 0;
}
  
@@ -295,7 +296,7 @@ static int macb_recv(struct eth_device *netdev)

if (wrapped) {
unsigned int headlen, taillen;
  
-headlen = 128 * (CONFIG_SYS_MACB_RX_RING_SIZE

+   headlen = 128 * (MACB_RX_RING_SIZE
 - macb-rx_tail);
taillen = length - headlen;
memcpy((void *)NetRxPackets[0],
@@ -306,11 +307,11 @@ static int macb_recv(struct eth_device *netdev)
}
  
  			NetReceive(buffer, length);

-   if (++rx_tail = CONFIG_SYS_MACB_RX_RING_SIZE)
+   if (++rx_tail = MACB_RX_RING_SIZE)
rx_tail = 0;
reclaim_rx_buffers(macb, rx_tail);
} else {
-   if (++rx_tail = CONFIG_SYS_MACB_RX_RING_SIZE) {
+   if (++rx_tail = MACB_RX_RING_SIZE) {
wrapped = 1;
rx_tail = 0;
}
@@ -333,7 +334,7 @@ static void macb_phy_reset(struct macb_device *macb)
macb_mdio_write(macb, MII_BMCR, (BMCR_ANENABLE
 | BMCR_ANRESTART));
  
-	for (i = 0; i  CONFIG_SYS_MACB_AUTONEG_TIMEOUT / 100; i++) {

+   

Re: [U-Boot] [PATCH v2 1/3] net: macb: enable dcache in macb

2014-05-27 Thread Josh Wu

Hi, Andreas

On 5/27/2014 5:06 AM, Andreas Bießmann wrote:

Hi Josh,

On 19.05.14 13:51, Josh Wu wrote:

Add to code to flush the dcache after we writing in DMA buffer.
Also we need invalidate the dcache before we check the status in the
DMA buffer.

Tested in SAMA5D3x-EK with gmac0. Tftp download speed shows in below:
Disable DCache: 1.1 MiB/s
Enable DCache: 1.6 MiB/s
Increase speed with about 40%.

The code should have no impact with the boards which are not
enable_dcache().
Tested in AT91SAM9M10G45EK.

Signed-off-by: Josh Wu josh...@atmel.com
---
v1 - v2:
   no change.

  drivers/net/macb.c |   51 +++
  1 file changed, 51 insertions(+)

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 781a272..b18f07b 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -194,6 +194,39 @@ int macb_miiphy_write(const char *devname, u8 phy_adr, u8 
reg, u16 value)
  }
  #endif
  
+#define	IS_RX	1

+#defineIS_TX   0
+static inline void macb_invalidate_ring_desc(struct macb_device *macb, bool 
is_rx)
+{
+   if (is_rx)
+   invalidate_dcache_range(macb-rx_ring_dma, macb-rx_ring_dma +
+   CONFIG_SYS_MACB_RX_RING_SIZE * sizeof(struct 
macb_dma_desc));

these lines produce checkpatch 'line over 80 chars' warnings. Could you
please check my macb cleanup patch [1] and adopt yours to that one?


No problem.


Could you please also do a formal review of that patch?


Thanks for the clean up patch. I already add my Reviewed-by in that patch.



Also it could make sens to introduce some MACB_RX_RING_BYTE_SIZE or
something like this to prevent writing always the multiply by
sizeof(macb_dma_desc).
If you could a new version of this patch it could go in as the first
version was in merge window phase AFAIR. The other two patches in this
series are ok.


So I will resend a new version of this patch which will rebase on your 
clean up macb patch.

Thanks.

Best Regards,
Josh Wu



Best regards

Andreas Bießmann

[1] http://patchwork.ozlabs.org/patch/352624/


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


[U-Boot] [RESEND][PATCH v2 1/3] net: macb: enable dcache in macb

2014-05-27 Thread Josh Wu
Add to code to flush the dcache after we writing in DMA buffer.
Also we need invalidate the dcache before we check the status in the
DMA buffer.

Tested in SAMA5D3x-EK with gmac0. Tftp download speed shows in below:
Disable DCache: 1.1 MiB/s
Enable DCache: 1.6 MiB/s
Increase speed with about 40%.

The code should have no impact with the boards which are not
enable_dcache().
Tested in AT91SAM9M10G45EK.

Signed-off-by: Josh Wu josh...@atmel.com
---
v2 resend: 
  1. rebase Andreas' macb clean up patch: 
http://patchwork.ozlabs.org/patch/352624/
  2. add definitions: MACB_TX/RX_DMA_DESC_SIZE for the TX/RX dma descriptor 
buffer size.
  3. replace the IS_RX/IS_TX with RX/TX, which is more readable.
  4. fix checkpatch warnings.

v1 - v2: none

 drivers/net/macb.c |   61 
 1 file changed, 57 insertions(+), 4 deletions(-)

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 750331d..01a94a4 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -51,6 +51,10 @@ struct macb_dma_desc {
u32 ctrl;
 };
 
+#define DMA_DESC_BYTES(n)  (n * sizeof(struct macb_dma_desc))
+#define MACB_TX_DMA_DESC_SIZE  (DMA_DESC_BYTES(MACB_TX_RING_SIZE))
+#define MACB_RX_DMA_DESC_SIZE  (DMA_DESC_BYTES(MACB_RX_RING_SIZE))
+
 #define RXADDR_USED0x0001
 #define RXADDR_WRAP0x0002
 
@@ -194,6 +198,39 @@ int macb_miiphy_write(const char *devname, u8 phy_adr, u8 
reg, u16 value)
 }
 #endif
 
+#define RX 1
+#define TX 0
+static inline void macb_invalidate_ring_desc(struct macb_device *macb, bool rx)
+{
+   if (rx)
+   invalidate_dcache_range(macb-rx_ring_dma, macb-rx_ring_dma +
+   MACB_RX_DMA_DESC_SIZE);
+   else
+   invalidate_dcache_range(macb-tx_ring_dma, macb-tx_ring_dma +
+   MACB_TX_DMA_DESC_SIZE);
+}
+
+static inline void macb_flush_ring_desc(struct macb_device *macb, bool rx)
+{
+   if (rx)
+   flush_dcache_range(macb-rx_ring_dma, macb-rx_ring_dma +
+   MACB_RX_DMA_DESC_SIZE);
+   else
+   flush_dcache_range(macb-tx_ring_dma, macb-tx_ring_dma +
+   MACB_TX_DMA_DESC_SIZE);
+}
+
+static inline void macb_flush_rx_buffer(struct macb_device *macb)
+{
+   flush_dcache_range(macb-rx_buffer_dma, macb-rx_buffer_dma +
+   MACB_RX_BUFFER_SIZE);
+}
+
+static inline void macb_invalidate_rx_buffer(struct macb_device *macb)
+{
+   invalidate_dcache_range(macb-rx_buffer_dma, macb-rx_buffer_dma +
+   MACB_RX_BUFFER_SIZE);
+}
 
 #if defined(CONFIG_CMD_NET)
 
@@ -218,6 +255,9 @@ static int macb_send(struct eth_device *netdev, void 
*packet, int length)
macb-tx_ring[tx_head].ctrl = ctrl;
macb-tx_ring[tx_head].addr = paddr;
barrier();
+   macb_flush_ring_desc(macb, TX);
+   /* Do we need check paddr and length is dcache line aligned? */
+   flush_dcache_range(paddr, paddr + length);
macb_writel(macb, NCR, MACB_BIT(TE) | MACB_BIT(RE) | MACB_BIT(TSTART));
 
/*
@@ -226,6 +266,7 @@ static int macb_send(struct eth_device *netdev, void 
*packet, int length)
 */
for (i = 0; i = MACB_TX_TIMEOUT; i++) {
barrier();
+   macb_invalidate_ring_desc(macb, TX);
ctrl = macb-tx_ring[tx_head].ctrl;
if (ctrl  TXBUF_USED)
break;
@@ -254,6 +295,8 @@ static void reclaim_rx_buffers(struct macb_device *macb,
unsigned int i;
 
i = macb-rx_tail;
+
+   macb_invalidate_ring_desc(macb, RX);
while (i  new_tail) {
macb-rx_ring[i].addr = ~RXADDR_USED;
i++;
@@ -267,6 +310,7 @@ static void reclaim_rx_buffers(struct macb_device *macb,
}
 
barrier();
+   macb_flush_ring_desc(macb, RX);
macb-rx_tail = new_tail;
 }
 
@@ -280,6 +324,8 @@ static int macb_recv(struct eth_device *netdev)
u32 status;
 
for (;;) {
+   macb_invalidate_ring_desc(macb, RX);
+
if (!(macb-rx_ring[rx_tail].addr  RXADDR_USED))
return -1;
 
@@ -293,6 +339,8 @@ static int macb_recv(struct eth_device *netdev)
if (status  RXBUF_FRAME_END) {
buffer = macb-rx_buffer + 128 * macb-rx_tail;
length = status  RXBUF_FRMLEN_MASK;
+
+   macb_invalidate_rx_buffer(macb);
if (wrapped) {
unsigned int headlen, taillen;
 
@@ -506,6 +554,9 @@ static int macb_init(struct eth_device *netdev, bd_t *bd)
macb-rx_ring[i].ctrl = 0;
paddr += 128;
}
+   macb_flush_ring_desc(macb, RX);
+   macb_flush_rx_buffer(macb);
+
for (i = 0; i  MACB_TX_RING_SIZE; i++) {
macb-tx_ring[i].addr = 0;
if (i == 

[U-Boot] [RFC] Moving boards without maintainers to Orphan

2014-05-27 Thread Masahiro Yamada
Hi.

Do you think it is a good idea to move all boards
whose maintainer field is empty ('-')
to Orphan ?

Best Regards
Masahiro Yamada

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


Re: [U-Boot] [PATCH v7] nand/denali: Adding Denali NAND driver support

2014-05-27 Thread Chin Liang See
Hi Masahiro,

On Mon, 2014-05-26 at 13:58 +0900, Masahiro Yamada wrote:
 Hi Chin,
 
 Could you tell me the status of Denali NAND driver?
 
 Please apply my feedback and post v8.
 I really need this driver.
 

Sorry as I was busy on some issues recently.
Let me work out the v8 patch and send out within this few days.
Thanks for reminding.

Chin Liang


 Thanks,
 
 Best Regards
 Masahiro Yamada
 


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


Re: [U-Boot] Statically allocate a range of physical memory to an OS image.

2014-05-27 Thread Wolfgang Denk
Dear mazen.e,

In message 1401177091915-180825.p...@n7.nabble.com you wrote:
 
 I want to execute a an OS (either Linux or Android) on the Arndale exynos
 5250 board. The board features 2 GB of RAM. However, I want to statically
 alloacate a specifc region of RAM (e.g. 1 GB) to be used by the OS,  While
 the other 1 GB is reserved for other purposes.

If you boot an OS, you don;t reserve any memory in U-Boot at all.  At
the moment U-Boot branches to the OS entry point, U-Boot is dead and
gone, including any memory alocation information that might have been
present in U-Boot.

It is then up to the OS to set up it's own memory manegement.

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
Every solution breeds new problems.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Statically allocate a range of physical memory to an OS image.

2014-05-27 Thread mazen.e
Great, many thanks for this information.

On the other hand,  according to my basic understanding (Please correct me
if I am wrong), U-boot can pass through the bootargs env variable
information about available memory in the platform. For instance,  bootargs 
mem=512M@0xA000 .. instructs the kernel that the available memory is 512
MB starting @ 0xA000, in such case the rest of the platform memory is
not even visible to the kernel and its MMU. Is this conclusion true?

Thank you very much.





--
View this message in context: 
http://u-boot.10912.n7.nabble.com/Statically-allocate-a-range-of-physical-memory-to-an-OS-image-tp180825p180832.html
Sent from the U-Boot mailing list archive at Nabble.com.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v5 0/5] enable support for x16 NAND devices

2014-05-27 Thread Gupta, Pekon
Hello Scott, Tom,


From: Gupta, Pekon

*changes v4 - v5*
[PATCH 1/5] no change
[PATCH 2/5] fixed compilation error for OMAP3 platforms
[PATCH 3/5] no change
[PATCH 4/5] dropped old [PATCH] mtd: nand: omap: add 
CONFIG_SYS_NAND_BUSWIDTH_16BIT to
indicate NAND device bus-width
instead new [PATCH] mtd: nand: omap: add 
 CONFIG_SYS_NAND_BUSWIDTH_16BIT to indicate
NAND device bus-width
[PATCH 5/5] additional cleanup in include/configs/cm_t35.h
Build tested for:  MAKEALL -s am33xx -s omap3 -s omap4 -s omap5
Rebased above series:  
http://lists.denx.de/pipermail/u-boot/2014-April/177323.html


This series few other patch series are awaiting response from
long time. In particular without this series many of the platforms
will _not_ work out-of-the box with x16 NAND device. Hence,
please give these patches a look and accept them if all okay.

Also, another series which has simple changes and clean-up is
awaiting acceptance from long.
[PATCH v2 0/7] mtd: nand: omap: clean up of omap_elm and omap_gpmc driver

This all will save some effort in resolving merge conflicts and rebases,
while moving forward with new patches.


with regards, pekon


*changes v3 - v4*
[PATCH 1/5] no update
[PATCH 2/5] new mtd: nand: force NAND_CMD_READID onto 8-bit bus
[PATCH 3/5] new mtd: nand: fix GET/SET_FEATURES address on 16-bit devices
[PATCH 4/5]  same as [PATCH v2 2/3] rebased over 
http://lists.denx.de/pipermail/u-boot/2014-
April/177323.html
[PATCH 5/5] no update


*changes v2 - v3*
[PATCH v3 1/3] (new) porting Brian Norri's patch from linux tree
   This patch allows reading of ONFI params independent of controller 
 configuration
   and NAND device width.
[PATCH v3 2/2] rebase [PATCH v2 2/4] on latest release
[PATCH v3 3/3] (new) cleaned remaining GPMC_NAND_ECC_LP_xx macros from OMAP3 
platform
Compile Tested# ./MAKEALL -s omap3 -s omap4 -s omap5 -s dra7xx -s am33xx


*changes v1 - v2*
[PATCH v2 1/4]:
  - dropped NAND_BUSWIDTH_AUTO, instead using CONFIG_SYS_NAND_ONFI_DETECTION
  - added check in nand_flash_detect_onfi() for x8 mode
[PATCH v2 2/4]: (new) Adds CONFIG_SYS_NAND_DEVICE_WIDTH
  - updated for auto-detection of bus-width in non-SPL and ONFI_DETECTION mode
  Refer: http://lists.denx.de/pipermail/u-boot/2013-September/163748.html
[PATCH v2 3/4] no update
[PATCH v2 4/4] disabled Pulls on output only I/O pads.
  - updated commit description to add details about NAND cape


*original v1*
This series includes independent patch-sets aiming to enable x16 NAND
support on AM33xx boards (like beaglebone-LT).
[PATCH 1/4]: This patch is ported from linux driver/mtd/nand to allow detection
   device-width of NAND by reading ONFI parameter page.
[PATCH 2/4]: enable NAND_BUSWIDTH_AUTO feature in omap_nand.c
[PATCH 3/4]: cleaning of GPMC configs for NAND and NOR

Brian Norris (2):
  mtd: nand: don't use read_buf for 8-bit ONFI transfers
  mtd: nand: force NAND_CMD_READID onto 8-bit bus

David Mosberger (1):
  mtd: nand: fix GET/SET_FEATURES address on 16-bit devices

Pekon Gupta (2):
  mtd: nand: omap: add CONFIG_SYS_NAND_BUSWIDTH_16BIT to indicate NAND
device bus-width
  omap3: remove remnant macros GPMC_NAND_ECC_LP_x8_LAYOUT and
GPMC_NAND_ECC_LP_x16_LAYOUT

 arch/arm/cpu/armv7/omap3/mem.c| 12 
 arch/arm/include/asm/arch-omap3/mem.h |  8 
 board/compulab/cm_t35/cm_t35.c| 12 ++--
 doc/README.nand   | 18 ++
 drivers/mtd/nand/am335x_spl_bch.c |  2 +-
 drivers/mtd/nand/atmel_nand.c |  2 +-
 drivers/mtd/nand/nand_base.c  | 11 +++
 drivers/mtd/nand/nand_spl_simple.c|  2 +-
 drivers/mtd/nand/omap_gpmc.c  | 13 +
 include/configs/am3517_crane.h|  1 +
 include/configs/cm_t335.h |  1 -
 include/configs/cm_t35.h  |  1 -
 include/configs/devkit8000.h  |  1 +
 include/configs/dig297.h  |  1 +
 include/configs/omap3_beagle.h|  1 +
 include/configs/omap3_evm_common.h|  2 +-
 include/configs/omap3_igep00x0.h  |  1 +
 include/configs/omap3_logic.h |  1 +
 include/configs/omap3_overo.h |  1 +
 include/configs/omap3_zoom1.h |  1 +
 include/configs/pengwyn.h |  1 -
 include/configs/tam3517-common.h  |  1 +
 include/configs/tao3530.h |  2 +-
 include/configs/tseries.h |  1 -
 include/linux/mtd/nand.h  | 19 +++
 25 files changed, 73 insertions(+), 43 deletions(-)

--
1.8.5.1.163.gd7aced9

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


Re: [U-Boot] pxa310 SDHC support.

2014-05-27 Thread Marek Vasut
On Tuesday, May 27, 2014 at 02:53:44 AM, aking_jin wrote:
 On 2014/5/26 Mon 22:15, Marek Vasut wrote:
  On Monday, May 26, 2014 at 03:55:58 PM, aking wrote:
  
  [...]
  
  The PXA27x controller works even with SDXC , that is tested. I
  suspect there might be some change in the PXA3xx controller, but I
  don't really know for sure. You'd have to check.
  
  Thank you for your answer.  are you using SD mode or SPI Mode? which
  version are you using?
  
  I believe the pxa_mmc_gen.c is what needs to be used. There is no other
  PXA MMC driver in U-Boot mainline. I now noticed it has some basic
  monahans (pxa3xx) support too.
  
Could you give out a log with MACRO CONFIG_MMC_TRACE on your
  
  pxa27x device ? any initialize ,read ,write, erase operation?
  
Sorry for disturb you.
  
  No, I cannot, sorry. I don't have the PXA27x device handy.
 
 Thanks , are you using SPI mode or SD mode with your SDXC card? This is
 Important.

SD mode.

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


[U-Boot] U-boot hangs on imx6 pci driver

2014-05-27 Thread Fabio Estevam
Hi,

Working on a mx6solo board with PCIe driver enabled in U-boot, I
notice that after doing several reboots a hang is seen on the PCIe
driver:

PCI Autoconfig: Bus Memory region: [0x110-0x1ef],
Physical Memory [110-1efx]
PCI Autoconfig: Bus I/O region: [0x100-0x10f],
Physical Memory: [100-10f]
### IN - imx_pcie_read_config
### 1 - imx_pcie_read_config
### 2 - imx_pcie_read_config
### 3 - imx_pcie_read_config
### 4 - imx_pcie_read_config - va_address = 0x 1ffc00c
### 5 - imx_pcie_read_config
### OUT - imx_pcie_read_config
### IN - imx_pcie_read_config
### 1 - imx_pcie_read_config
### 2 - imx_pcie_read_config
### 3 - imx_pcie_read_config
### 4 - imx_pcie_read_config - va_address = 0x 1ffc000
### 5 - imx_pcie_read_config
### OUT - imx_pcie_read_config
### IN - imx_pcie_read_config
### 1 - imx_pcie_read_config
### 2 - imx_pcie_read_config
### 3 - imx_pcie_read_config
### 4 - imx_pcie_read_config - va_address = 0x 1ffc000
### 5 - imx_pcie_read_config
### OUT - imx_pcie_read_config
### IN - imx_pcie_read_config
### 1 - imx_pcie_read_config
### 2 - imx_pcie_read_config
### 3 - imx_pcie_read_config
### 4 - imx_pcie_read_config - va_address = 0x 1ffc008
### 5 - imx_pcie_read_config
### OUT - imx_pcie_read_config
  00:01.0 - 16c3:abcd - Bridge device
### IN - imx_pcie_read_config
### 1 - imx_pcie_read_config
### 2 - imx_pcie_read_config
### 3 - imx_pcie_read_config
### 4 - imx_pcie_read_config - va_address = 0x 1ffc008
### 5 - imx_pcie_read_config
### OUT - imx_pcie_read_config
### IN - imx_pcie_read_config
### 1 - imx_pcie_read_config
### 2 - imx_pcie_read_config
### 3 - imx_pcie_read_config
### 4 - imx_pcie_read_config - va_address = 0x 1ffc004
### 5 - imx_pcie_read_config
### OUT - imx_pcie_read_config
### IN - imx_pcie_write_config
### OUT - imx_pcie_write_config
### IN - imx_pcie_read_config
### 1 - imx_pcie_read_config
### 2 - imx_pcie_read_config
### 3 - imx_pcie_read_config
### 4 - imx_pcie_read_config - va_address = 0x 1ffc010
### 5 - imx_pcie_read_config
### OUT - imx_pcie_read_config
PCI Autoconfig: BAR 0, I/O, size=0xfff4, address=0x100
bus_lower=0x100fff4### IN - imx_pcie_write_config
### OUT - imx_pcie_write_config

### IN - imx_pcie_write_config
### OUT - imx_pcie_write_config
### IN - imx_pcie_read_config
### 1 - imx_pcie_read_config
### 2 - imx_pcie_read_config
### 3 - imx_pcie_read_config
### 4 - imx_pcie_read_config - va_address = 0x 1ffc014
### 5 - imx_pcie_read_config
### OUT - imx_pcie_read_config
### IN - imx_pcie_read_config
### 1 - imx_pcie_read_config
### 2 - imx_pcie_read_config
### 3 - imx_pcie_read_config
### 4 - imx_pcie_read_config - va_address = 0x 1ffc004
### 5 - imx_pcie_read_config
### OUT - imx_pcie_read_config
### IN - imx_pcie_write_config
### OUT - imx_pcie_write_config
### IN - imx_pcie_read_config
### 1 - imx_pcie_read_config
### 2 - imx_pcie_read_config
### 3 - imx_pcie_read_config
### 4 - imx_pcie_read_config - va_address = 0x 1ffc00c
### 5 - imx_pcie_read_config
### OUT - imx_pcie_read_config
### IN - imx_pcie_write_config
### OUT - imx_pcie_write_config
### IN - imx_pcie_read_config
### 1 - imx_pcie_read_config
### 2 - imx_pcie_read_config
### 3 - imx_pcie_read_config
### 4 - imx_pcie_read_config - va_address = 0x 1ffc00c
### 5 - imx_pcie_read_config
### OUT - imx_pcie_read_config
### IN - imx_pcie_write_config
### OUT - imx_pcie_write_config
PCI Autoconfig: Found P2P bridge, device 1
### IN - imx_pcie_read_config
### 1 - imx_pcie_read_config
### 2 - imx_pcie_read_config
### 3 - imx_pcie_read_config
### 4 - imx_pcie_read_config - va_address = 0x 1ffc004
### 5 - imx_pcie_read_config
### OUT - imx_pcie_read_config
### IN - imx_pcie_read_config
### 1 - imx_pcie_read_config
### 2 - imx_pcie_read_config
### 3 - imx_pcie_read_config
### 4 - imx_pcie_read_config - va_address = 0x 1ffc018
### 5 - imx_pcie_read_config
### OUT - imx_pcie_read_config
### IN - imx_pcie_write_config
### OUT - imx_pcie_write_config
### IN - imx_pcie_read_config
### 1 - imx_pcie_read_config
### 2 - imx_pcie_read_config
### 3 - imx_pcie_read_config
### 4 - imx_pcie_read_config - va_address = 0x 1ffc018
### 5 - imx_pcie_read_config
### OUT - imx_pcie_read_config
### IN - imx_pcie_write_config
### OUT - imx_pcie_write_config
### IN - imx_pcie_read_config
### 1 - imx_pcie_read_config
### 2 - imx_pcie_read_config
### 3 - imx_pcie_read_config
### 4 - imx_pcie_read_config - va_address = 0x 1ffc018
### 5 - imx_pcie_read_config
### OUT - imx_pcie_read_config
### IN - imx_pcie_write_config
### OUT - imx_pcie_write_config
### IN - imx_pcie_read_config
### 1 - imx_pcie_read_config
### 2 - imx_pcie_read_config
### 3 - imx_pcie_read_config
### 4 - imx_pcie_read_config - va_address = 0x 1ffc020
### 5 - imx_pcie_read_config
### OUT - imx_pcie_read_config
### IN - imx_pcie_write_config
### OUT - imx_pcie_write_config
### IN - imx_pcie_read_config
### 1 - imx_pcie_read_config
### 2 - imx_pcie_read_config
### 3 - imx_pcie_read_config
### 4 - 

Re: [U-Boot] Statically allocate a range of physical memory to an OS image.

2014-05-27 Thread Wolfgang Denk
Dear mazen.e,

In message 1401191218533-180832.p...@n7.nabble.com you wrote:
 
 On the other hand,  according to my basic understanding (Please correct me
 if I am wrong), U-boot can pass through the bootargs env variable
 information about available memory in the platform. For instance,  bootargs 
 mem=512M@0xA000 .. instructs the kernel that the available memory is 512
 MB starting @ 0xA000, in such case the rest of the platform memory is
 not even visible to the kernel and its MMU. Is this conclusion true?

Actually, today we use the device tree to pass this information.

And it is not correct that any memory outside the specification of
mem= is not _visible_ to the kernel.  Please understand that it is
really up to the kernel (or whatever program you boot) to set up hiw
own memory map.  In case of the Linux, it is the Linux kernel itself
which implements the mem= ABI - and if you use it, it choses to
_ignore_ any other possibly existing memory regions.  But this is
totally voluntary, and done only in Linux.  There is nothing that
U-Boot does here, so the term not visible is only true in the sense
because the kernel decides to close both eyes and never will even
attempt to look in that direction.

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
In matters of principle, stand like a rock;  in  matters  of  taste,
swim with the current.- Thomas Jefferson
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Mainline u-boot SPL for socfpga

2014-05-27 Thread Pavel Machek
Hi!

(Sorry for the delay)

   I know u-boot SPL misses critical parts, but I was told that u-boot
   proper should have everything. Only... I was not able to get it to
   work. [I'm attempting to load recent u-boot from patched/old u-boot; I
   know this is not exactly recommended, but due to spl/proper split, it
   should work AFAIK... and does for old versions.]
  
  I have not tried booting u-boot proper from mainline. It just seemed 
  pointless 
  to me to be working from 2 source trees to make a single product.
  
  I will give it a go though.
 
 
 Actually the U-Boot is working. You just need to #undef
 CONFIG_SOCFPGA_VIRTUAL_TARGET and build it. I loaded it using a working
 Preloader and I can reach the U-Boot console.

Aha, you are right, I forgot about VIRTUAL_TARGET define.

 U-Boot 2014.07-rc1-00079-g2072e72-dirty (May 16 2014 - 15:54:55)
 
 CPU   : Altera SOCFPGA Platform
 BOARD : Altera SOCFPGA Cyclone5 Board
 DRAM:  1 GiB
 WARNING: Caches not enabled
 Using default environment
 
 In:serial
 Out:   serial
 Err:   serial
 Net:   No ethernet found.

Do you have any hints how to get ethernet to work?

Plus, for me it says:

tertiary u-boot 13.760972 Warning: Your board does not use generic
board. Please read
tertiary u-boot 13.770775 doc/README.generic-board and take
action. Boards not
tertiary u-boot 13.779813 upgraded by the late 2014 may break or be
removed.


  As Chin Liang See has said, there are two issues thwarting this: legal AND 
  source conformance. The code we can fix, the legal can only be fixed by 
  bending Altera - I am going to do that too.
 
 
 We are making some progress on this. Once we have final green light, we
 will start the upstreaming of SDRAM code. :)

Looking forward :-).

Thanks,
Pavel


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] generic board for socfpga

2014-05-27 Thread Pavel Machek

Socfpga u-boot works fine with CONFIG_SYS_GENERIC_BOARD, so enable
that option as documentation suggests.

Signed-off-by: Pavel Machek pa...@denx.de

diff --git a/include/configs/socfpga_cyclone5.h 
b/include/configs/socfpga_cyclone5.h
index 2fc16ef..72d77f4 100644
--- a/include/configs/socfpga_cyclone5.h
+++ b/include/configs/socfpga_cyclone5.h
@@ -16,6 +16,8 @@
 /* Virtual target or real hardware */
 #define CONFIG_SOCFPGA_VIRTUAL_TARGET
 
+#define CONFIG_SYS_GENERIC_BOARD
+
 #define CONFIG_ARMV7
 #define CONFIG_SYS_DCACHE_OFF
 #undef CONFIG_USE_IRQ

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2] Separate EBV Socrates board from Altera Cyclone 5 board and from Virtual Target

2014-05-27 Thread Pavel Machek

Altera Cyclone 5 board is very different board (big, rectangular,
expensive) than EBV Socrates (small, circular, cheap) board. Different
parts are used there, too, but same configuration of u-boot works on
both. Nevertheless, printing wrong name confuses users. Virtual target
is completely different, and board configured for it will not boot on
physical targets.

Therefore this splits the configuration so that u-boot knows they are
different. So far it is only used for correcting the puts, but there
may be other uses in future.

Signed-off-by: Pavel Machek pa...@denx.de

---

Diff from v1: separate virtual target, too, and make it apply to
recent u-boot.

diff --git a/board/altera/socfpga/socfpga_cyclone5.c 
b/board/altera/socfpga/socfpga_cyclone5.c
index a960eb6..33946b6 100644
--- a/board/altera/socfpga/socfpga_cyclone5.c
+++ b/board/altera/socfpga/socfpga_cyclone5.c
@@ -28,7 +28,7 @@ int print_cpuinfo(void)
  */
 int checkboard(void)
 {
-   puts(BOARD : Altera SOCFPGA Cyclone5 Board\n);
+   puts(BOARD :  ALTERA_BOARD_NAME \n);
return 0;
 }
 
diff --git a/boards.cfg b/boards.cfg
index 221b7f8..6eebbf5 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -379,6 +379,8 @@ Active  arm armv7  rmobile renesas  
   lager
 Active  arm armv7  s5pc1xx samsung goni
s5p_goni  - 

Przemyslaw Marczak p.marc...@samsung.com
 Active  arm armv7  s5pc1xx samsung smdkc100
smdkc100  - 

Minkyu Kang mk7.k...@samsung.com
 Active  arm armv7  socfpga altera  socfpga 
socfpga_cyclone5  - 

-
+Active  arm armv7  socfpga altera  socfpga 
socfpga_virtual  -  

   -
+Active  arm armv7  socfpga altera  socfpga 
socfpga_socrates  - 

-
 Active  arm armv7  u8500   st-ericsson snowball
snowball  - 

Mathieu Poirier mathieu.poir...@linaro.org
 Active  arm armv7  u8500   st-ericsson u8500   
u8500_href- 

-
 Active  arm armv7  vf610   freescale   vf610twr
vf610twr  
vf610twr:IMX_CONFIG=board/freescale/vf610twr/imximage.cfg   
  Alison Wang 
b18...@freescale.com
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
new file mode 100644
index 000..4d90952
--- /dev/null
+++ b/include/configs/socfpga_common.h
@@ -0,0 +1,240 @@
+/*
+ *  Copyright (C) 2012 Altera Corporation www.altera.com
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+#ifndef __CONFIG_COMMON_H
+#define __CONFIG_COMMON_H
+
+#include asm/arch/socfpga_base_addrs.h
+#include ../../board/altera/socfpga/pinmux_config.h
+#include ../../board/altera/socfpga/pll_config.h
+
+/*
+ * High level configuration
+ */
+
+#define CONFIG_SYS_GENERIC_BOARD
+
+#define CONFIG_ARMV7
+#define CONFIG_SYS_DCACHE_OFF
+#undef CONFIG_USE_IRQ
+
+#define CONFIG_MISC_INIT_R
+#define CONFIG_SINGLE_BOOTLOADER
+#define CONFIG_SOCFPGA
+
+/* base address for .text section */
+#ifdef CONFIG_SOCFPGA_VIRTUAL_TARGET
+#define CONFIG_SYS_TEXT_BASE   0x0840
+#else
+#define CONFIG_SYS_TEXT_BASE   0x0140
+#endif
+#define CONFIG_SYS_LOAD_ADDR   0x7fc0
+
+/* Console I/O Buffer Size */
+#define CONFIG_SYS_CBSIZE  256
+/* Monitor Command Prompt */
+#define CONFIG_SYS_PROMPT  SOCFPGA_CYCLONE5 # 
+#define CONFIG_SYS_PBSIZE  (CONFIG_SYS_CBSIZE + \
+   sizeof(CONFIG_SYS_PROMPT) + 16)
+
+/*
+ * Display CPU and Board Info
+ */
+#define CONFIG_DISPLAY_CPUINFO
+#define CONFIG_DISPLAY_BOARDINFO
+
+/*
+ * Enable early stage initialization at C environment
+ */
+#define CONFIG_BOARD_EARLY_INIT_F
+
+/* flat device tree */

Re: [U-Boot] Statically allocate a range of physical memory to an OS image.

2014-05-27 Thread mazen.e
Great, thank you very much for this valuable information.



--
View this message in context: 
http://u-boot.10912.n7.nabble.com/Statically-allocate-a-range-of-physical-memory-to-an-OS-image-tp180825p180840.html
Sent from the U-Boot mailing list archive at Nabble.com.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] U-boot hangs on imx6 pci driver

2014-05-27 Thread Marek Vasut
On Tuesday, May 27, 2014 at 02:30:27 PM, Fabio Estevam wrote:
 Hi,
 
 Working on a mx6solo board with PCIe driver enabled in U-boot, I
 notice that after doing several reboots a hang is seen on the PCIe
 driver:

[...]

 Any suggestions?

Take a look at SR# 1-1347946851 in the FSL internal bug tracker. It looks like 
the PCIe IP core implementation in the MX6 is bugged in my opinion.

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 v2] Separate EBV Socrates board from Altera Cyclone 5 board and from Virtual Target

2014-05-27 Thread Detlev Zundel
Hi Pavel,

 Altera Cyclone 5 board is very different board (big, rectangular,
 expensive) than EBV Socrates (small, circular, cheap) board. Different
 parts are used there, too, but same configuration of u-boot works on
 both. Nevertheless, printing wrong name confuses users. Virtual target
 is completely different, and board configured for it will not boot on
 physical targets.

Thanks for the initiative again.

 Therefore this splits the configuration so that u-boot knows they are
 different. So far it is only used for correcting the puts, but there
 may be other uses in future.

 Signed-off-by: Pavel Machek pa...@denx.de

 ---

 Diff from v1: separate virtual target, too, and make it apply to
 recent u-boot.

 diff --git a/board/altera/socfpga/socfpga_cyclone5.c 
 b/board/altera/socfpga/socfpga_cyclone5.c
 index a960eb6..33946b6 100644
 --- a/board/altera/socfpga/socfpga_cyclone5.c
 +++ b/board/altera/socfpga/socfpga_cyclone5.c
 @@ -28,7 +28,7 @@ int print_cpuinfo(void)
   */
  int checkboard(void)
  {
 - puts(BOARD : Altera SOCFPGA Cyclone5 Board\n);
 + puts(BOARD :  ALTERA_BOARD_NAME \n);
   return 0;
  }
  
 diff --git a/boards.cfg b/boards.cfg
 index 221b7f8..6eebbf5 100644
 --- a/boards.cfg
 +++ b/boards.cfg
 @@ -379,6 +379,8 @@ Active  arm armv7  rmobile renesas
  lager
  Active  arm armv7  s5pc1xx samsung goni  
   s5p_goni  - 
   
   Przemyslaw Marczak p.marc...@samsung.com
  Active  arm armv7  s5pc1xx samsung smdkc100  
   smdkc100  - 
   
   Minkyu Kang mk7.k...@samsung.com
  Active  arm armv7  socfpga altera  socfpga   
   socfpga_cyclone5  - 
   
   -
 +Active  arm armv7  socfpga altera  socfpga   
   socfpga_virtual  -  
   
  -
 +Active  arm armv7  socfpga altera  socfpga   
   socfpga_socrates

As you correctly note, the socrates is sold by EBV and not Altera so I
guess the 5th column needs to be changed.  Will this still work?

Other than that:

Acked-by: Detlev Zundel d...@denx.de

Cheers
  Detlev
  
-- 
Those who would give up essential liberty to purchase a little
temporary safety, deserve neither liberty nor safety.
 -- Benjamin Franklin
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Booting armv8 kernel on uboot

2014-05-27 Thread feng...@phytium.com.cn

Dear Tom, Tiger, 

 
 hi Tom,
 
 On Thu, May 22, 2014 at 10:26:17PM +0800, feng...@phytium.com.cn wrote:
 
 
 Hi ,
 I have added mmc driver into the vexpress64 board file for uboot and tested
 it on FVP base model. I tried booting a kernel on that but it is aborting
 with the following message:
 Final value for argc=3
 Loading Kernel Image ... OK
 kernel loaded at 0x0008, end = 0x00827024
 using: FDT
 reserving fdt memory region: addr=8000 size=1
 ## initrd_high = 0x, copy_to_ram = 1
 ramdisk load start = 0x, ramdisk load end = 0x
 ## device tree at 90008000 ... 9000a850 (len=22609 
 [0x5851])
 Loading Device Tree to 9fffa000, end 9850 ... OK
 Initial value for argc=3
 Final value for argc=3
 ## Transferring control to Linux (at address 8)...
 Starting kernel ...
 
 Synchronous Abort handler, esr 0x0200
 ELR: 8
 LR:  fff90fc8
 x0 : 9fffa000 x1 : 1c09
 x2 : 1c09 x3 : 0020
 x4 : fff6b834 x5 : 
 x6 : fff6bb40 x7 : ffd0
 x8 : 000f x9 : 7ff8e000
 x10: fffb7188 x11: 
 x12: 6000 x13: 0004
 x14: 0003 x15: fffc7c20
 x16:  x17: 
 x18: fff6beb8 x19: 0008
 x20: fffc7a70 x21: 
 x22:  x23: fff6d8d8
 x24:  x25: fffc2630
 x26:  x27: 80008000
 x28:  x29: fff6bb40
 
 Can anyone please provide the procedure on how to boot the kernel with
 u-boot on armv8 models ?
 I always use mkimage converting kernel to uImage and booting it. It works 
 fine.
 Wish this help you.
 
 Which version of the model are you using and which kernel tree?  Thanks!
 
 The model is the most recent FVP from linaro website and the kernel is a very 
 old one.
 But mkimage has nothing to do with the kernel. uImage produced
 by mkimage is correctly loaded by u-boot for aarch64. 
 I will make a test with the most recently kernel and give you feedback.
 
I have made a kernel booting test.

u-boot:  cloned from git tree.
Foundation Model: FM000-KT-00035-r0p8-52rel06.tar, downloaded from arm website.
Linux kernel: linux-3.14.4.tar.xz, stable version from kernel.org

steps:
1. compile u-boot,  replace CONFIG_GICV3 with CONFIG_GICV2 in vexpress_aemv8a.h
due to GICv3 support has not been upstream to kernel mainline.

2. compile linux kernel, use arch/arm64/boot/configs/defconfig as the default 
configuration.
then, 
mkimage -A arm64 -O linux -C none -T kernel -a 0x8008 -e 0x8008 -n 
3.14.4 -d Image uImage

3. use linux/arch/arm64/boot/dts/foundation-v8.dts as the device tree, because 
CONFIG_SYS_TEXT_BASE is  0x8000 I reconfigure 'cpu-release-addr' as 
0x8007fff0.
   then,
   dtc  foundation-v8.dts -O dtb -o u-boot.dtb

4. run foundation model:
Foundation_v8 --image=u-boot.elf --data=uImage@0x9000 
--data=u-boot.dtb@0xa000 --cores=4

5. In u-boot command line, type the following command to boot os,
bootm 0x9000 - 0xa000

I did not test the rootfs yet.

Best regards,
David


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


Re: [U-Boot] [PATCH v2] Separate EBV Socrates board from Altera Cyclone 5 board and from Virtual Target

2014-05-27 Thread Pavel Machek
Hi, Detlev!

  Altera Cyclone 5 board is very different board (big, rectangular,
  expensive) than EBV Socrates (small, circular, cheap) board. Different
  parts are used there, too, but same configuration of u-boot works on
  both. Nevertheless, printing wrong name confuses users. Virtual target
  is completely different, and board configured for it will not boot on
  physical targets.
 
 Thanks for the initiative again.

I'm celebrating mainline u-boot on my target :-).

  --- a/boards.cfg
  +++ b/boards.cfg
  @@ -379,6 +379,8 @@ Active  arm armv7  rmobile renesas  
 lager
   Active  arm armv7  s5pc1xx samsung goni
  s5p_goni  - 
  
  Przemyslaw Marczak p.marc...@samsung.com
   Active  arm armv7  s5pc1xx samsung smdkc100
  smdkc100  - 
  
  Minkyu Kang mk7.k...@samsung.com
   Active  arm armv7  socfpga altera  socfpga 
  socfpga_cyclone5  - 
  
  -
  +Active  arm armv7  socfpga altera  socfpga 
  socfpga_virtual  -  
  
 -
  +Active  arm armv7  socfpga altera  socfpga 
  socfpga_socrates
 
 As you correctly note, the socrates is sold by EBV and not Altera so I
 guess the 5th column needs to be changed.  Will this still work?

That will result in:

  CC  arch/arm/lib/eabi_compat.o
scripts/Makefile.build:64:
/home/pavel/wagabuibui/u-boot/board/ebv/socfpga/Makefile: No such file
or directory
make[2]: *** No rule to make target
`/home/pavel/wagabuibui/u-boot/board/ebv/socfpga/Makefile'.  Stop.

...and I don't think we want to do board/{altera,ebv} symlink. Are
there any other options? Or is altera in the boards file simply
acceptable?

Thanks,
Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC, PATCH v2 2/4] lib, rbtree: resync with Linux-3.14

2014-05-27 Thread Tom Rini
On Mon, May 26, 2014 at 09:05:47AM +0200, Marek Vasut wrote:
 On Monday, May 26, 2014 at 07:32:22 AM, Heiko Schocher wrote:
  Hello Marek,
  
  Am 24.05.2014 12:30, schrieb Marek Vasut:
   On Thursday, May 22, 2014 at 12:43:06 PM, Heiko Schocher wrote:
   resync with linux:
   
   commit 455c6fdbd219161bd09b1165f11699d6d73de11c
   Author: Linus Torvaldstorva...@linux-foundation.org
   Date:   Sun Mar 30 20:40:15 2014 -0700
   
Linux 3.14
   
   Needed for the MTD/UBI/UBIFS resync
   
   Signed-off-by: Heiko Schocherh...@denx.de
   Cc: Marek Vasutma...@denx.de
   Cc: Sergey Lapinsla...@ossfans.org
   Cc: Scott Woodscottw...@freescale.com
   
   Did you just copy the files over or did you change anything in them? If
   you changed anything, I'd say that should go into some compat header so
   there's a minimum amount of changes compared to the mainline linux code.
  
  Just copied the file from Linux, changed the license file header,
  and add:
  
  +#define __UBOOT__
#include linux/rbtree_augmented.h
  +#ifndef __UBOOT__
#include linux/export.h
  +#else
  +#include ubi_uboot.h
  +#endif
  
  so, that should be ok.
 
 Thanks for clarifying, I suppose that might need to be in the commit message 
 though , so once we decide to do resync again, we'd know what the code looked 
 like compared to 3.14 .

Agreed, thanks.

-- 
Tom


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


Re: [U-Boot] [RFC PATCH 09/22] Remove form-feeds from dlmalloc.c

2014-05-27 Thread Jon Loeliger
All in favor of the patch, but there is a typo here:

 These don't really server any purpose in the modern age, IMO. On the

s/server/serve/

Note trailing 'r'.  IMO,  I'd toss out the ', IMO' too if it were my patch.


Thanks,
jdl

On Sat, May 24, 2014 at 4:21 PM, Simon Glass s...@chromium.org wrote:
 These don't really server any purpose in the modern age, IMO. On the
 other hand they show up as annoying control characters in my editor, which
 then happily removes them.

 I believe we can drop these characters from the file.

 Signed-off-by: Simon Glass s...@chromium.org
 ---

  common/dlmalloc.c | 46 +++---
  1 file changed, 23 insertions(+), 23 deletions(-)

 diff --git a/common/dlmalloc.c b/common/dlmalloc.c
 index 3c70d5d..d1cd561 100644
 --- a/common/dlmalloc.c
 +++ b/common/dlmalloc.c
 @@ -220,7 +220,7 @@

  */

 -
 +

  /* Preliminaries */

 @@ -1132,7 +1132,7 @@ gAllocatedSize))

  #endif

 -
 +

  /*
Type declarations
 @@ -1272,7 +1272,7 @@ nextchunk- 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 serviced via calls to mmap, and then later released via munmap.

  */
 -
 +
  /*  sizes, alignments */

  #define SIZE_SZ(sizeof(INTERNAL_SIZE_T))
 @@ -1297,7 +1297,7 @@ nextchunk- 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  #define aligned_OK(m)(((unsigned long)((m))  (MALLOC_ALIGN_MASK)) == 0)


 -
 +

  /*
Physical chunk operations
 @@ -1332,7 +1332,7 @@ nextchunk- 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  #define chunk_at_offset(p, s)  ((mchunkptr)(((char*)(p)) + (s)))


 -
 +

  /*
Dealing with use bits
 @@ -1371,7 +1371,7 @@ nextchunk- 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   (((mchunkptr)(((char*)(p)) + (s)))-size = ~(PREV_INUSE))


 -
 +

  /*
Dealing with size fields
 @@ -1394,7 +1394,7 @@ nextchunk- 
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  #define set_foot(p, s)   (((mchunkptr)((char*)(p) + (s)))-prev_size = (s))


 -
 +


  /*
 @@ -1566,7 +1566,7 @@ void mem_malloc_init(ulong start, ulong size)

  #define is_small_request(nb) (nb  MAX_SMALLBIN_SIZE - SMALLBIN_WIDTH)

 -
 +

  /*
  To help compensate for the large number of bins, a one-level index
 @@ -1590,7 +1590,7 @@ void mem_malloc_init(ulong start, ulong size)
  #define clear_binblock(ii)  (binblocks_w = (mbinptr)(binblocks_r  
 ~(idx2binblock(ii


 -
 +


  /*  Other static bookkeeping data */
 @@ -1628,7 +1628,7 @@ static unsigned int max_n_mmaps = 0;
  static unsigned long max_mmapped_mem = 0;
  #endif

 -
 +

  /*
Debugging support
 @@ -1769,7 +1769,7 @@ static void do_check_malloced_chunk(p, s) mchunkptr p; 
 INTERNAL_SIZE_T s;
  #define check_malloced_chunk(P,N)
  #endif

 -
 +

  /*
Macro-based internal utilities
 @@ -1841,7 +1841,7 @@ static void do_check_malloced_chunk(p, s) mchunkptr p; 
 INTERNAL_SIZE_T s;
(last_remainder-fd = last_remainder-bk = last_remainder)


 -
 +


  /* Routines dealing with mmap(). */
 @@ -1972,7 +1972,7 @@ static mchunkptr mremap_chunk(p, new_size) mchunkptr p; 
 size_t new_size;
  #endif /* HAVE_MMAP */


 -
 +

  /*
Extend the top-most chunk by obtaining memory from system.
 @@ -2089,7 +2089,7 @@ static void malloc_extend_top(nb) INTERNAL_SIZE_T nb;
  }


 -
 +

  /* Main public routines */

 @@ -2396,7 +2396,7 @@ Void_t* mALLOc(bytes) size_t bytes;
  }


 -
 +

  /*

 @@ -2513,7 +2513,7 @@ void fREe(mem) Void_t* mem;
  }


 -
 +


  /*
 @@ -2750,7 +2750,7 @@ Void_t* rEALLOc(oldmem, bytes) Void_t* oldmem; size_t 
 bytes;
  }


 -
 +

  /*

 @@ -2868,7 +2868,7 @@ Void_t* mEMALIGn(alignment, bytes) size_t alignment; 
 size_t bytes;

  }

 -
 +


  /*
 @@ -2975,7 +2975,7 @@ void cfree(mem) Void_t *mem;
  }
  #endif

 -
 +

  /*

 @@ -3056,7 +3056,7 @@ int malloc_trim(pad) size_t pad;
}
  }

 -
 +

  /*
malloc_usable_size:
 @@ -3092,7 +3092,7 @@ size_t malloc_usable_size(mem) Void_t* mem;
  }


 -
 +

  /* Utility to update current_mallinfo for malloc_stats and mallinfo() */

 @@ -3136,7 +3136,7 @@ static void malloc_update_mallinfo()
  }
  #endif /* DEBUG */

 -
 +

  /*

 @@ -3183,7 +3183,7 @@ struct mallinfo mALLINFo()
  #endif /* DEBUG */


 -
 +

  /*
mallopt:
 --
 1.9.1.423.g4596e3a

 ___
 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] [RFC, PATCH v2 1/4] dm: rename device struct to udevice

2014-05-27 Thread Tom Rini
On Thu, May 22, 2014 at 12:43:05PM +0200, Heiko Schocher wrote:

 using UBI and DM together leads in compiler error, as
 both define a struct device, so rename struct device
 in include/dm/device.h to struct udevice, as we use
 linux code (MTD/UBI/UBIFS some USB code,...) and cannot
 change the linux struct device
 
 Signed-off-by: Heiko Schocher h...@denx.de
 Cc: Simon Glass s...@chromium.org
 Cc: Marek Vasut ma...@denx.de

Applied to u-boot/master, thanks!

-- 
Tom


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


[U-Boot] [PATCH] FDT: Fix DTC repository references

2014-05-27 Thread Jon Loeliger
The Device Tree Compiler (DTC) used to have its master
repository located on jdl.com.  While it is still there,
its official, new, shiny location is on kernel.org here:

git://git.kernel.org/pub/scm/utils/dtc/dtc.git

Update a few references to point there instead.

Signed-off-by: Jon Loeliger j...@jdl.com
---
 doc/README.fdt-control   | 4 ++--
 doc/uImage.FIT/howto.txt | 5 -
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/doc/README.fdt-control b/doc/README.fdt-control
index 86bae68..0ceebe7 100644
--- a/doc/README.fdt-control
+++ b/doc/README.fdt-control
@@ -66,11 +66,11 @@ Tools
 
 To use this feature you will need to get the device tree compiler here:
 
-   git://jdl.com/software/dtc.git
+   git://git.kernel.org/pub/scm/utils/dtc/dtc.git
 
 For example:
 
-   $ git clone git://jdl.com/software/dtc.git
+   $ git clone git://git.kernel.org/pub/scm/utils/dtc/dtc.git
$ cd dtc
$ make
$ sudo make install
diff --git a/doc/uImage.FIT/howto.txt b/doc/uImage.FIT/howto.txt
index 526be55..14e316f 100644
--- a/doc/uImage.FIT/howto.txt
+++ b/doc/uImage.FIT/howto.txt
@@ -16,7 +16,10 @@ create an uImage in the new format: mkimage and dtc, 
although only one
 (mkimage) is invoked directly. dtc is called from within mkimage and operates
 behind the scenes, but needs to be present in the $PATH nevertheless. It is
 important that the dtc used has support for binary includes -- refer to
-www.jdl.com for its latest version. mkimage (together with dtc) takes as input
+
+   git://git.kernel.org/pub/scm/utils/dtc/dtc.git
+
+for its latest version. mkimage (together with dtc) takes as input
 an image source file, which describes the contents of the image and defines
 its various properties used during booting. By convention, image source file
 has the .its extension, also, the details of its format are given in
-- 
1.9.0

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


[U-Boot] [ANN] U-Boot v2014.07-rc2 released

2014-05-27 Thread Tom Rini
Hey all,

I've pushed v2014.07-rc2 out to the repository and tarballs should exist
soon.

Looking over the log, we've gotten some of the re-syncing that needed
doing done, but there's still more on my end that needs to be picked up,
so I'll be getting on that shortly.

As always, if anything is broken please speak up.

Thanks all!

-- 
Tom


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


Re: [U-Boot] [RFC PATCH 08/22] dm: Use '*' to indicate a device is activated

2014-05-27 Thread Jon Loeliger
Why is '*' better than 'active' here?

At the very least, you need to convince me in the
log message.

Thanks,
jdl


On Sat, May 24, 2014 at 4:21 PM, Simon Glass s...@chromium.org wrote:
 Make both dm enumeration commands support showing whether a driver is active
 or not, and use a consistent indicator (an asterisk).

 Signed-off-by: Simon Glass s...@chromium.org
 ---

  test/dm/cmd_dm.c | 11 ++-
  1 file changed, 6 insertions(+), 5 deletions(-)

 diff --git a/test/dm/cmd_dm.c b/test/dm/cmd_dm.c
 index c6b2eb8..ee02314 100644
 --- a/test/dm/cmd_dm.c
 +++ b/test/dm/cmd_dm.c
 @@ -23,9 +23,9 @@ static int display_succ(struct device *in, char *buf)
 char local[16];
 struct device *pos, *n, *prev = NULL;

 -   printf(%s- %s @ %08x, buf, in-name, (uint)map_to_sysmem(in));
 -   if (in-flags  DM_FLAG_ACTIVATED)
 -   puts( - activated);
 +   printf(%s- %c %s @ %08x, buf,
 +  in-flags  DM_FLAG_ACTIVATED ? '*' : ' ',
 +  in-name, (uint)map_to_sysmem(in));
 puts(\n);

 if (list_empty(in-child_head))
 @@ -84,8 +84,9 @@ static int do_dm_dump_uclass(cmd_tbl_t *cmdtp, int flag, 
 int argc,
 for (ret = uclass_first_device(id, dev);
  dev;
  ret = uclass_next_device(dev)) {
 -   printf(  %s @ %08x:\n, dev-name,
 -  (uint)map_to_sysmem(dev));
 +   printf(  %c %s @ %08x:\n,
 +  dev-flags  DM_FLAG_ACTIVATED ? '*' : ' ',
 +  dev-name, (uint)map_to_sysmem(dev));
 }
 puts(\n);
 }
 --
 1.9.1.423.g4596e3a

 ___
 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] please pull u-boot-arc master

2014-05-27 Thread Alexey Brodkin
Dear Tom,

The following changes since commit
9665fa8f9e1488209d5e01d0792c243e0a220c5a:

  Merge branch 'master' of git://git.denx.de/u-boot-arm (2014-05-24
06:34:08 -0400)

are available in the git repository at:


  git://git.denx.de/u-boot-arc.git master

for you to fetch changes up to 7f6a6db638f6375255abb198d32c8917f8c031e9:

  tb100 - add Abilis TB100 board (2014-05-27 18:22:24 +0400)


Alexey Brodkin (1):
  tb100 - add Abilis TB100 board

 board/abilis/tb100/Makefile |   7 +
 board/abilis/tb100/tb100.c  |  23 
 boards.cfg  |   1 +
 include/configs/tb100.h | 123
++
 4 files changed, 154 insertions(+)
 create mode 100644 board/abilis/tb100/Makefile
 create mode 100644 board/abilis/tb100/tb100.c
 create mode 100644 include/configs/tb100.h

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


Re: [U-Boot] U-boot hangs on imx6 pci driver

2014-05-27 Thread David Müller (ELSOFT AG)
Marek Vasut wrote:
 Take a look at SR# 1-1347946851 in the FSL internal bug tracker. It
 looks like the PCIe IP core implementation in the MX6 is bugged in my
 opinion.

Are there any publicly available info regarding this SR?

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


Re: [U-Boot] U-boot hangs on imx6 pci driver

2014-05-27 Thread Marek Vasut
On Tuesday, May 27, 2014 at 04:43:08 PM, David Müller (ELSOFT AG) wrote:
 Marek Vasut wrote:
  Take a look at SR# 1-1347946851 in the FSL internal bug tracker. It
  looks like the PCIe IP core implementation in the MX6 is bugged in my
  opinion.
 
 Are there any publicly available info regarding this SR?

Scrubbed the irrelevant bits:

--8--
Please find a defect report below for the i.MX6DL PCI express driver in current 
Linux 3.10.17-1.0.0-ga released by Freescale:

Priority: High

Issue Type: Defect Report
Problem Category: Freescale Software
Problem Domain: Serial Connectivity

Project Name: Freescale SabreSDP
Industry Segment: Industrial

Target Processor: i.MX6DL Processors
Target HW Platform: i.MX6DL SabreSDP
Target OS: Linux
Target Software Package: Linux imx_3.10.17_1.0.0_ga

PC Host System O/S, Version: Not Applicable in this case

Reproducibility: Rarely
Steps to Reproduce:
  Prep:
  1) Take MX6DL SabreSDP platform
  2) Attach Intel i210 PCI express card
  3) Install BSP with kernel 3.10.17-1.0.0-ga onto SD card
  4) Boot the platform and confirm the i210 is recognized

  Test:
  1) Power on the MX6DL SabreSDP
  2) Boot the kernel
  3) Verify the SabreSDP recognized the i210
  4) When the platform reaches the init process, trigger a software-reboot
  5) The software-reboot will put the platform back into U-Boot, so the SabreSDP
 will again continue from step 2) by booting the kernel automatically.

  Test steps 2)...5) must be performed at least 1 times.

Expected Results:
  1 of 1 times, the PCI express i210 card will be recognized by the
  platform. The PCI express link will always reliably come up.

Observed Results:
  After some hundreds of the soft-reboot cycles, the i210 is not recognized. 
  This is caused by the PCI express link failing to come up. We see link never 
  came up message in the kernel log.

Description:
  We perform the test above -- soft-restarting the MX6DL SabreSDP platform with 
  Linux 3.10.17-1.0.0-ga in quick sequences. We would expect for the PCIe link 
  to reliably come up in all of the 1 cycles, but in some of those cycles, 
  the link fails to come up.

  Can you please confirm/replicate the issue and provide us with a fix ?
--8--

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


Re: [U-Boot] [RFC PATCH 17/22] dm: Expand and improve the device lifecycle docs

2014-05-27 Thread Jon Loeliger
On Sat, May 24, 2014 at 4:21 PM, Simon Glass s...@chromium.org wrote:
 The lifecycle of a device is an important part of driver model. Add to the
 existing documentation and clarify it.

 Thanks for Jon Loeliger j...@jdl.com for helping with the text and
 suggesting improvements.

 (Jon please comment/adjust to help clarify things further)

Clearly that line should be below the '---'. :-)

 Reported-by: Jon Loeliger j...@jdl.com

 Signed-off-by: Simon Glass s...@chromium.org
 ---

A few nits, but otherwise feel free to add my ACK as well.



  Platform Data
  -

 +Platform data is like Linux platform data, if you are familiar with that.
 +It provides the board-specific information to start up a device.
 +
 +Why is this information not just stored in the device driver itself? The
 +idea is that the device driver is generic, and can in principle operate on
 +any board that has that type of device. For example, with modern
 +highly-complex SoCs it is common for the IP to come from an IP vendor, and
 +therefore (for example) the MMC controller may be the same on chips from
 +different vendors. It makes no sense to write independent drivers for the
 +MMC controller on each vendor's SoC, when they are all almost the same.
 +Similarly, we may have 6 UARTs in an SoC, all of which are mostly the same,
 +but lie at different addresses in the address space.
 +
 +Using the UART example, we have a single driver and it is instantiated 6
 +times by supplying 6 lots of platform data. Each lot of platform data
 +gives the driver name and a pointer to a structure containing information
 +about this instance - e.g. the address of the register space. It may be that
 +one of the UARTS supports RS-485 operation - this can be added as a flag in
 +the platform data, which is set for this one port and clear for the rest.
 +
 +Think of your driver as a generic piece of code which knows how to talk to
 +a device, but needs to know where it is, any variant/option information and
 +so on. Platform data provides this link between the generic piece of code
 +and the specific way it is bound on a particular board.
 +
 +Examples of platform data include:
 +
 +   - The base address of the IP block's register space
 +   - Configuration options, like:
 + - the SPI polarity and maximum speed for a SPI controller
 + - the I2C speed to use for an I2C device
 + - the number of GPIOs available in a GPIO device
 +   - Note this can be parsed from the Device Tree (see below)

Not sure to what 'this' refers in that last bullet.  Should that whole last
line read more like:

- Data that can be parsed from the Device Tree (see below)


  Where does the platform data come from? See demo-pdata.c which
  sets up a table of driver names and their associated platform data.

This is a weak explanation of platform data origin.  At the very least
we need to say it is allocated per-device if needed, and then point
to the demo-pdata.c as an *example*.


  The data can be interpreted by the drivers however they like - it is
 @@ -259,21 +296,30 @@ following device tree fragment:
 sides = 4;
 };

 +This means that instead of having lots of U_BOOT_DEVICE() declarations in
 +the board file, we put these in the device tree. The allows a lot more

s/The/This approach/

 +generality, since the same board file can support many types of boards (e,g.
 +with the same SoC) just by using different device trees. An added benefit
 +is that the Linux device tree can be used, thus further simplifying the
 +task of board-bring up either for U-Boot or Linux devs (whoever gets to the
 +baord first!).

I'd also s/devs/developers/.  But that may be just me. :-)

  The easiest way to make this work it to add a few members to the driver:

 .platdata_auto_alloc_size = sizeof(struct dm_test_pdata),
 .ofdata_to_platdata = testfdt_ofdata_to_platdata,
 -   .probe  = testfdt_drv_probe,

  The 'auto_alloc' feature allowed space for the platdata to be allocated
  and zeroed before the driver's ofdata_to_platdata method is called. This
 -method reads the information out of the device tree and puts it in
 -dev-platdata. Then the probe method is called to set up the device.
 +method (which the driver writer supplies) should read the information out
 +of the device tree and puts it in dev-platdata. Thus when the probe method

s/puts/put/..; But *which* method here?  The ofdata_to_platdata()?  I think
that needs to be explicitly referenced in the text here:

The ofdata_to_platdata() method, which the driver write supplies, should
parse the device tree node for this device and place it in the
dev-platdata.


 +is called later (to set up the device ready for use) the platform data will
 +be present.

  Note that both methods are optional. If you provide an ofdata_to_platdata
 -method then it wlil be called first (after bind). If you provide a probe
 -method it will be called next.
 +method then it wlil be 

Re: [U-Boot] [RFC PATCH 05/22] sandbox: Remove all drivers before exit

2014-05-27 Thread Jon Loeliger
On Sat, May 24, 2014 at 4:21 PM, Simon Glass s...@chromium.org wrote:
 Drivers are supposed to be able to close down cleanly. To set a good example,
 make sandbox shut down its driver model drivers and remove them before exit.

Right.  But we should be careful here...

 It may be desirable to do the same more generally once driver model is more
 widely-used. This could be done during bootm, before U-Boot jumps to the OS.
 It seems far too early to make this change.

Some drivers should probably NOT be shut down prior to bootm handing
off to some other OS.   It could be that their sole purpose for starting and
running was to enable some continued driver state for the OS.

I'm thinking of some clock, or PHY or maybe some aspect of the ARM SCU
that should be left running.

So maybe if there is a general shutdown pass, there might be a need for
a flag to indicate that it is/isn't OK to do so at OS-hand-off time.

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


Re: [U-Boot] [RFC PATCH 16/22] dm: Add a way to indicate a preferred device within a uclass

2014-05-27 Thread Jon Loeliger
 The preferred device can be specified with a DM_FLAG_PREFER flag or a
 'dm,prefer' property in the device tree node.

 It is possible that a better approach will come to light in the future, but
 this gets around the problem as it currently stands.

Here's your clue that something isn't quite right here.  Again, this looks like
the us of a DTS property to describe a SW functionality rather than describe
the HW itself.


I'm not sure what needs to be done here either, but maybe it centers on
a better understanding of *why* something is being preferred?  And what
if it is preferred, then what does that really mean?  And what if two devices
are labelled as preferred -- Is that OK?  Who checks and enforces it?

Sure, this may be a hack for now, but it needs more thought.

HTH,
jdl

On Sat, May 24, 2014 at 4:21 PM, Simon Glass s...@chromium.org wrote:
 Where there are serveral device options that can be chosen, often one is
 preferred. This can normally be handled by aliases in the device tree.

 However, when a device can be specified either with platform data or
 with a device tree node, which one should dm use? This situation happens
 with sandbox, where we want to use the device tree version if we have
 a device tree, and fall back to the platform data version if not. We need
 this to work because without a console U-Boot will not function.

 The original approach was just to take the first device in the uclass and
 use that, but this does not work because the ordering is unknown.

 The preferred device can be specified with a DM_FLAG_PREFER flag or a
 'dm,prefer' property in the device tree node.

 It is possible that a better approach will come to light in the future, but
 this gets around the problem as it currently stands.

 Signed-off-by: Simon Glass s...@chromium.org
 ---

  drivers/core/device.c|  5 +
  drivers/core/uclass.c| 15 ++-
  include/dm/device.h  |  3 +++
  include/dm/uclass-internal.h |  3 ++-
  include/dm/uclass.h  | 15 +++
  test/dm/test-fdt.c   | 14 ++
  test/dm/test.dts |  1 +
  7 files changed, 54 insertions(+), 2 deletions(-)

 diff --git a/drivers/core/device.c b/drivers/core/device.c
 index 2c2634e..6b2c8f9 100644
 --- a/drivers/core/device.c
 +++ b/drivers/core/device.c
 @@ -10,6 +10,7 @@
   */

  #include common.h
 +#include fdtdec.h
  #include malloc.h
  #include dm/device.h
  #include dm/device-internal.h
 @@ -21,6 +22,8 @@
  #include linux/err.h
  #include linux/list.h

 +DECLARE_GLOBAL_DATA_PTR;
 +
  /**
   * device_chld_unbind() - Unbind all device's children from the device
   *
 @@ -95,6 +98,8 @@ int device_bind(struct device *parent, struct driver *drv, 
 const char *name,
 dev-parent = parent;
 dev-driver = drv;
 dev-uclass = uc;
 +   if (fdtdec_get_bool(gd-fdt_blob, of_offset, dm,prefer))
 +   dev-flags |= DM_FLAG_PREFER;
 if (!dev-platdata  drv-platdata_auto_alloc_size)
 dev-flags |= DM_FLAG_ALLOC_PDATA;

 diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c
 index afb5fdc..d02ea5e 100644
 --- a/drivers/core/uclass.c
 +++ b/drivers/core/uclass.c
 @@ -149,7 +149,8 @@ int uclass_find_device(enum uclass_id id, int index, 
 struct device **devp)
 return ret;

 list_for_each_entry(dev, uc-dev_head, uclass_node) {
 -   if (!index--) {
 +   if (index == -1 ? (dev-flags  DM_FLAG_PREFER) :
 +   !index--) {
 *devp = dev;
 return 0;
 }
 @@ -177,6 +178,18 @@ int uclass_get_device(enum uclass_id id, int index, 
 struct device **devp)
 return 0;
  }

 +int uclass_get_preferred_device(enum uclass_id id, struct device **devp)
 +{
 +   int err;
 +
 +   err = uclass_get_device(id, -1, devp);
 +   if (!err || err != -ENODEV)
 +   return err;
 +
 +   /* Nothing found, just pick the first device */
 +   return uclass_get_device(id, 0, devp);
 +}
 +
  int uclass_first_device(enum uclass_id id, struct device **devp)
  {
 struct uclass *uc;
 diff --git a/include/dm/device.h b/include/dm/device.h
 index 32650fd..d3c04ed 100644
 --- a/include/dm/device.h
 +++ b/include/dm/device.h
 @@ -26,6 +26,9 @@ struct driver_info;
  /* DM should init this device prior to relocation */
  #define DM_FLAG_PRE_RELOC  (1  2)

 +/* DM should prefer this driver when searching a uclass */
 +#define DM_FLAG_PREFER (1  3)
 +
  /**
   * struct device - An instance of a driver
   *
 diff --git a/include/dm/uclass-internal.h b/include/dm/uclass-internal.h
 index cc65d52..79b4d9e 100644
 --- a/include/dm/uclass-internal.h
 +++ b/include/dm/uclass-internal.h
 @@ -13,7 +13,8 @@
  /**
   * uclass_find_device() - Return n-th child of uclass
   * @id:Id number of the uclass
 - * @index: Position of the child in uclass's list
 + * @index: 

Re: [U-Boot] please pull u-boot-arc master

2014-05-27 Thread Tom Rini
On Tue, May 27, 2014 at 02:28:20PM +, Alexey Brodkin wrote:

 Dear Tom,
 
 The following changes since commit
 9665fa8f9e1488209d5e01d0792c243e0a220c5a:
 
   Merge branch 'master' of git://git.denx.de/u-boot-arm (2014-05-24
 06:34:08 -0400)
 
 are available in the git repository at:
 
 
   git://git.denx.de/u-boot-arc.git master
 
 for you to fetch changes up to 7f6a6db638f6375255abb198d32c8917f8c031e9:
 
   tb100 - add Abilis TB100 board (2014-05-27 18:22:24 +0400)
 
 
 Alexey Brodkin (1):
   tb100 - add Abilis TB100 board
 
  board/abilis/tb100/Makefile |   7 +
  board/abilis/tb100/tb100.c  |  23 
  boards.cfg  |   1 +
  include/configs/tb100.h | 123
 ++
  4 files changed, 154 insertions(+)
  create mode 100644 board/abilis/tb100/Makefile
  create mode 100644 board/abilis/tb100/tb100.c
  create mode 100644 include/configs/tb100.h

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [RFC PATCH 07/22] dm: Allow drivers to be marked 'before relocation'

2014-05-27 Thread Jon Loeliger
 Allow drivers to mark themselves as 'pre-reloc' which means that they will
 be initialised prior to relocation. This can be done either with a driver
 flag or with a 'dm,pre-reloc' device tree property.

Hmmm,  dm,pre-reloc isn't really describing the hardware any more.
That's really a flag for the purpose of telling SW how it should work.
We really should be careful here to maintain the DTS content as a
description of the hardware.

HTH,
jdl

On Sat, May 24, 2014 at 4:21 PM, Simon Glass s...@chromium.org wrote:
 Driver model currently only operates after relocation is complete. In this
 state U-Boot typically has a small amount of memory available. In adding
 support for driver model prior to relocation we must try to use as little
 memory as possible.

 In addition, on some machines the memory has not be inited and/or the CPU
 is not running at full speed or the data cache is off. These can reduce
 execution performance, so the less initialisation that is done before
 relocation the better.

 An immediately-obvious improvement is to only initialise drivers which are
 actually going to be used before relocation. On many boards the only such
 driver is a serial UART, so this provides a very large potential benefit.

 Allow drivers to mark themselves as 'pre-reloc' which means that they will
 be initialised prior to relocation. This can be done either with a driver
 flag or with a 'dm,pre-reloc' device tree property.

 To support this, the various dm scanning function now take a 'pre_reloc_only'
 parameter which indicates that only drivers marked pre-reloc should be
 bound.

 Signed-off-by: Simon Glass s...@chromium.org
 ---

  common/board_r.c |  4 ++--
  doc/driver-model/README.txt  | 23 +++---
  drivers/core/device.c|  6 --
  drivers/core/lists.c |  6 +++---
  drivers/core/root.c  | 11 +++
  include/dm/device-internal.h |  6 --
  include/dm/device.h  |  5 +
  include/dm/lists.h   |  2 +-
  include/dm/root.h|  8 ++--
  test/dm/core.c   | 47 
 ++--
  test/dm/test-driver.c| 11 +++
  test/dm/test-fdt.c   | 20 ++-
  test/dm/test-main.c  |  4 ++--
  test/dm/test.dts | 11 +++
  14 files changed, 128 insertions(+), 36 deletions(-)

 diff --git a/common/board_r.c b/common/board_r.c
 index d1f0aa9..d2a59ee 100644
 --- a/common/board_r.c
 +++ b/common/board_r.c
 @@ -276,13 +276,13 @@ static int initr_dm(void)
 debug(dm_init() failed: %d\n, ret);
 return ret;
 }
 -   ret = dm_scan_platdata();
 +   ret = dm_scan_platdata(false);
 if (ret) {
 debug(dm_scan_platdata() failed: %d\n, ret);
 return ret;
 }
  #ifdef CONFIG_OF_CONTROL
 -   ret = dm_scan_fdt(gd-fdt_blob);
 +   ret = dm_scan_fdt(gd-fdt_blob, false);
 if (ret) {
 debug(dm_scan_fdt() failed: %d\n, ret);
 return ret;
 diff --git a/doc/driver-model/README.txt b/doc/driver-model/README.txt
 index e0b395a..deacfe9 100644
 --- a/doc/driver-model/README.txt
 +++ b/doc/driver-model/README.txt
 @@ -332,26 +332,35 @@ dealing with this might not be worth it.
  - Implemented a GPIO system, trying to keep it simple


 +Pre-Relocation Support
 +--
 +
 +For pre-relocation we simply call the driver model init function. Only
 +drivers marked with DM_FLAG_PRE_RELOC or the device tree 'dm,pre-reloc'
 +flag are initialised prior to relocation. This helps to reduce the driver
 +model overhead.
 +
 +Then post relocation we throw that away and re-init driver model again.
 +For drivers which require some sort of continuity between pre- and
 +post-relocation devices, we can provide access to the pre-relocation
 +device pointers, but this is not currently implemented (the root device
 +pointer is saved but not made available).
 +
 +
  Things to punt for later
  

  - SPL support - this will have to be present before many drivers can be
  converted, but it seems like we can add it once we are happy with the
  core implementation.
 -- Pre-relocation support - similar story

 -That is not to say that no thinking has gone into these - in fact there
 +That is not to say that no thinking has gone into this - in fact there
  is quite a lot there. However, getting these right is non-trivial and
  there is a high cost associated with going down the wrong path.

  For SPL, it may be possible to fit in a simplified driver model with only
  bind and probe methods, to reduce size.

 -For pre-relocation we can simply call the driver model init function. Then
 -post relocation we throw that away and re-init driver model again. For 
 drivers
 -which require some sort of continuity between pre- and post-relocation
 -devices, we can provide access to the pre-relocation device pointers.
 -
  

Re: [U-Boot] [PATCH v2 1/2] Exynos5420: Introduce support for the Peach-Pit board

2014-05-27 Thread Akshay Saraswat
Hi Simon,

Hi Akshay,

On 26 May 2014 03:33, Akshay Saraswat aksha...@samsung.com wrote:
 Hi Simon,

Hi Akshay,

On 21 May 2014 23:23, Akshay Saraswat aksha...@samsung.com wrote:
 While the Exynos5420 chip is used in both Smdk5420 and in the Peach-Pit
 line of devices, there could be other boards using the same chip, so a
 common configuration file is being added (exynos5420.h) as well
 as two common device tree files (exynos54xx.dtsi  exynos5420.dtsi).

 The peach board as declared in boards.cfg is a copy of smdk5420
 declaration. The configuration files are similar, but define different
 default device trees, console serial ports and prompts.

 The device tree files for smdk5420 and peach-pit inherit from the same
 common file.

 Signed-off-by: Vadim Bendebury vben...@chromium.org
 Signed-off-by: Akshay Saraswat aksha...@samsung.com
 Acked-by: Simon Glass s...@chromium.org

This looks good to me. I think you might have an extra space in the
last column of your boards.cfg addition, and CONFIG_CHROMEOS_PEACH
might not be needed.


 Will fix these in the next version.


But I can't get pit to boot with these patches - it hangs in SPL. Do
you know what is going on?


 For me, these patches are working fine. I have tested them over three 
 different pit boards.
 I am not sure what could be wrong. I will try over more of those boards, if 
 I witness
 something like this I will update.

I am not actually using the latest Pit hardware, although what I have
works fine with the Chromium tree. I suppose it could be a BL1
problems, also I am using 'crosfw' (and thus cros_bundle_firmware) to
write to the board. If you have any ideas let me know, but it
shouldn't hold up your patches. It just prevents me from adding
'Tested-by' to your patches.


I tested over variety of pit boards. And also, I am using the same BL1 what we
used for chromebooks. Definitely, this abnormal boot behaviour is not because
of that. But yes I am not doing emerge and I am not using 'crosfw' because I
think it will need few other changes. So probably, this is why these patches
are not booting.
I just did make peach-pit_config  make -j32.


Regards,
Simon


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


[U-Boot] NAND custodian (was Re: [PATCH v5 0/5] enable support for x16 NAND devices)

2014-05-27 Thread Scott Wood
On Tue, 2014-05-27 at 11:48 +, Gupta, Pekon wrote:
 Hello Scott, Tom,
 
 
 From: Gupta, Pekon
 
 *changes v4 - v5*
 [PATCH 1/5] no change
 [PATCH 2/5] fixed compilation error for OMAP3 platforms
 [PATCH 3/5] no change
 [PATCH 4/5] dropped old [PATCH] mtd: nand: omap: add 
 CONFIG_SYS_NAND_BUSWIDTH_16BIT to
 indicate NAND device bus-width
 instead new [PATCH] mtd: nand: omap: add 
  CONFIG_SYS_NAND_BUSWIDTH_16BIT to indicate
 NAND device bus-width
 [PATCH 5/5] additional cleanup in include/configs/cm_t35.h
 Build tested for:  MAKEALL -s am33xx -s omap3 -s omap4 -s omap5
 Rebased above series:  
 http://lists.denx.de/pipermail/u-boot/2014-April/177323.html
 
 
 This series few other patch series are awaiting response from
 long time.

Sorry for the delay -- I've been fairly busy, and don't usually get
around to processing U-Boot patches until after the merge window closes.
The IRC channel topic has been lying and saying the merge window is
still open (also, http://www.denx.de/wiki/U-Boot/ReleaseCycle says that
the merge window is open and will close in negative 24 days).

Given that I don't do much with NAND myself these days, that the patch
volume is higher than when I started as NAND custodian, and that I now
have maintainership duties in Linux competing for my time, I'm wondering
if someone else (maybe you or Heiko?) wants to step into the NAND
custodian role.

-Scott


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


Re: [U-Boot] [RFC PATCH 17/22] dm: Expand and improve the device lifecycle docs

2014-05-27 Thread Jon Loeliger
 +2. U-Boot scans through top-level nodes in the the device tree. It looks
 +at the compatible string in each node and uses the of_match part of the
 +U_BOOT_DRIVER() structure to find the right driver for each node. It then

Why is the scan only on the top level?  My GPIO nodes are, for example,
under an SOC node.

Thanks,
jdl

On Sat, May 24, 2014 at 4:21 PM, Simon Glass s...@chromium.org wrote:
 The lifecycle of a device is an important part of driver model. Add to the
 existing documentation and clarify it.

 Thanks for Jon Loeliger j...@jdl.com for helping with the text and
 suggesting improvements.

 (Jon please comment/adjust to help clarify things further)

 Reported-by: Jon Loeliger j...@jdl.com

 Signed-off-by: Simon Glass s...@chromium.org
 ---

  doc/driver-model/README.txt | 197 
 ++--
  1 file changed, 191 insertions(+), 6 deletions(-)

 diff --git a/doc/driver-model/README.txt b/doc/driver-model/README.txt
 index deacfe9..90e0516 100644
 --- a/doc/driver-model/README.txt
 +++ b/doc/driver-model/README.txt
 @@ -95,11 +95,12 @@ are provided in test/dm. To run them, try:
  You should see something like this:

  ...U-Boot banner...
 -Running 12 driver model tests
 +Running 15 driver model tests
  Test: dm_test_autobind
  Test: dm_test_autoprobe
  Test: dm_test_children
  Test: dm_test_fdt
 +Test: dm_test_fdt_pre_reloc
  Test: dm_test_gpio
  sandbox_gpio: sb_gpio_get_value: error: offset 4 not reserved
  Test: dm_test_leak
 @@ -109,6 +110,8 @@ You should see something like this:
  Test: dm_test_operations
  Test: dm_test_ordering
  Test: dm_test_platdata
 +Test: dm_test_pre_reloc
 +Test: dm_test_prefer
  Test: dm_test_remove
  Test: dm_test_uclass
  Failures: 0
 @@ -222,6 +225,40 @@ device tree) and probe.
  Platform Data
  -

 +Platform data is like Linux platform data, if you are familiar with that.
 +It provides the board-specific information to start up a device.
 +
 +Why is this information not just stored in the device driver itself? The
 +idea is that the device driver is generic, and can in principle operate on
 +any board that has that type of device. For example, with modern
 +highly-complex SoCs it is common for the IP to come from an IP vendor, and
 +therefore (for example) the MMC controller may be the same on chips from
 +different vendors. It makes no sense to write independent drivers for the
 +MMC controller on each vendor's SoC, when they are all almost the same.
 +Similarly, we may have 6 UARTs in an SoC, all of which are mostly the same,
 +but lie at different addresses in the address space.
 +
 +Using the UART example, we have a single driver and it is instantiated 6
 +times by supplying 6 lots of platform data. Each lot of platform data
 +gives the driver name and a pointer to a structure containing information
 +about this instance - e.g. the address of the register space. It may be that
 +one of the UARTS supports RS-485 operation - this can be added as a flag in
 +the platform data, which is set for this one port and clear for the rest.
 +
 +Think of your driver as a generic piece of code which knows how to talk to
 +a device, but needs to know where it is, any variant/option information and
 +so on. Platform data provides this link between the generic piece of code
 +and the specific way it is bound on a particular board.
 +
 +Examples of platform data include:
 +
 +   - The base address of the IP block's register space
 +   - Configuration options, like:
 + - the SPI polarity and maximum speed for a SPI controller
 + - the I2C speed to use for an I2C device
 + - the number of GPIOs available in a GPIO device
 +   - Note this can be parsed from the Device Tree (see below)
 +
  Where does the platform data come from? See demo-pdata.c which
  sets up a table of driver names and their associated platform data.
  The data can be interpreted by the drivers however they like - it is
 @@ -259,21 +296,30 @@ following device tree fragment:
 sides = 4;
 };

 +This means that instead of having lots of U_BOOT_DEVICE() declarations in
 +the board file, we put these in the device tree. The allows a lot more
 +generality, since the same board file can support many types of boards (e,g.
 +with the same SoC) just by using different device trees. An added benefit
 +is that the Linux device tree can be used, thus further simplifying the
 +task of board-bring up either for U-Boot or Linux devs (whoever gets to the
 +baord first!).

  The easiest way to make this work it to add a few members to the driver:

 .platdata_auto_alloc_size = sizeof(struct dm_test_pdata),
 .ofdata_to_platdata = testfdt_ofdata_to_platdata,
 -   .probe  = testfdt_drv_probe,

  The 'auto_alloc' feature allowed space for the platdata to be allocated
  and zeroed before the driver's ofdata_to_platdata method is called. This
 

[U-Boot] Howto u-boot an evk1100 ?

2014-05-27 Thread Sril
Hi,
I plan to run linux on this box : sdramc bug free on my atevk1100.
I took patches from mailling list archive but, when I compile I can see led 4 
red unblanking and led 5 green unblanking.
Does someone knows what does this mean ?
I try to put usart0 but nothing on minicom : usart1 successfully tested on 
usart_example.c from atmel dev kit for evk1100.


What must I do : where are docs, please ?

Best regards.
S. Major

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


Re: [U-Boot] [PATCH v3 1/3] dts: re-write dts/Makefile more simply with Kbuild

2014-05-27 Thread York Sun
On 02/04/2014 06:28 PM, Masahiro Yamada wrote:
 Useful rules in scripts/Makefile.lib allows us to easily
 generate a device tree blob and wrap it in assembly code.
 
 We do not need to parse a linker script to get output format and arch.
 
 This commit deletes ./u-boot.dtb since it is a copy of dts/dt.dtb.
 
 Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
 ---
 
 Changes in v3: None
 Changes in v2:
   - Rebase on Kbuild series v9
   - Add ';' which was missing in arch/arm/lib/board.c
 

snip

  
 diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
 index b770e25..38b9c7d 100644
 --- a/arch/arm/lib/board.c
 +++ b/arch/arm/lib/board.c
 @@ -280,7 +280,7 @@ void board_init_f(ulong bootflag)
   gd-mon_len = _bss_end_ofs;
  #ifdef CONFIG_OF_EMBED
   /* Get a pointer to the FDT */
 - gd-fdt_blob = _binary_dt_dtb_start;
 + gd-fdt_blob = __dtb_db_begin;

Is this a typo? I believe it should be __dtb_dt_begin. Did anyone see the
compiling error?

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


Re: [U-Boot] [PATCH v2] Prevent a buffer overflow in mkimage when signing with SHA256

2014-05-27 Thread Simon Glass
On 26 May 2014 06:27, Michael van der Westhuizen
michael.vanderwesthui...@smart-africa.com wrote:
 Due to the FIT_MAX_HASH_LEN constant not having been updated
 to support SHA256 signatures one will always see a buffer
 overflow in fit_image_process_hash when signing images that
 use this larger hash.  This is exposed by vboot_test.sh.

 Signed-off-by: Michael van der Westhuizen mich...@smart-africa.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


Re: [U-Boot] [RFC PATCH 05/22] sandbox: Remove all drivers before exit

2014-05-27 Thread Simon Glass
Hi Jon,

On 27 May 2014 09:28, Jon Loeliger loeli...@gmail.com wrote:
 On Sat, May 24, 2014 at 4:21 PM, Simon Glass s...@chromium.org wrote:
 Drivers are supposed to be able to close down cleanly. To set a good example,
 make sandbox shut down its driver model drivers and remove them before exit.

 Right.  But we should be careful here...

 It may be desirable to do the same more generally once driver model is more
 widely-used. This could be done during bootm, before U-Boot jumps to the OS.
 It seems far too early to make this change.

 Some drivers should probably NOT be shut down prior to bootm handing
 off to some other OS.   It could be that their sole purpose for starting and
 running was to enable some continued driver state for the OS.

 I'm thinking of some clock, or PHY or maybe some aspect of the ARM SCU
 that should be left running.

 So maybe if there is a general shutdown pass, there might be a need for
 a flag to indicate that it is/isn't OK to do so at OS-hand-off time.

Yes agreed. I think we can cross that bridge when we come to it
though. So long as the drivers have a way of shutting down then we
have at least encouraged driver authors to think about this issue. My
concern was that in U-Boot people might think that the remove() method
is a waste of time.

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


Re: [U-Boot] Howto u-boot an evk1100 ?

2014-05-27 Thread Andreas Bießmann
Dear Sril,

On 27.05.14 17:51, Sril wrote:
 Hi,
 I plan to run linux on this box : sdramc bug free on my atevk1100.
 I took patches from mailling list archive but, when I compile I can see led 4 
 red unblanking and led 5 green unblanking.
 Does someone knows what does this mean ?

AFAIK is there no support for avr32 uc3 devices currently. There where
some patches but mainline only the ap700x devices are supported.

 I try to put usart0 but nothing on minicom : usart1 successfully tested on 
 usart_example.c from atmel dev kit for evk1100.
 
 
 What must I do : where are docs, please ?

Which docs do you mean? UC3 spec is @atmel.com ;)

Best regards

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


Re: [U-Boot] [RFC PATCH 07/22] dm: Allow drivers to be marked 'before relocation'

2014-05-27 Thread Simon Glass
Hi Jon,

On 27 May 2014 09:36, Jon Loeliger loeli...@gmail.com wrote:
 Allow drivers to mark themselves as 'pre-reloc' which means that they will
 be initialised prior to relocation. This can be done either with a driver
 flag or with a 'dm,pre-reloc' device tree property.

 Hmmm,  dm,pre-reloc isn't really describing the hardware any more.
 That's really a flag for the purpose of telling SW how it should work.
 We really should be careful here to maintain the DTS content as a
 description of the hardware.

Yes this always comes up. Another approach would be to declare that a
serial driver must be available and just use the console alias and
assume that the device must be pre-reloc. But I worry that with I2C,
SPI , etc. potentially wanting pre-reloc init this might be a losing
battle.

This way, board authors have complete flexibility, and the file is in
after all the U-Boot source tree.

Regards,
Simon


 HTH,
 jdl

 On Sat, May 24, 2014 at 4:21 PM, Simon Glass s...@chromium.org wrote:
 Driver model currently only operates after relocation is complete. In this
 state U-Boot typically has a small amount of memory available. In adding
 support for driver model prior to relocation we must try to use as little
 memory as possible.

 In addition, on some machines the memory has not be inited and/or the CPU
 is not running at full speed or the data cache is off. These can reduce
 execution performance, so the less initialisation that is done before
 relocation the better.

 An immediately-obvious improvement is to only initialise drivers which are
 actually going to be used before relocation. On many boards the only such
 driver is a serial UART, so this provides a very large potential benefit.

 Allow drivers to mark themselves as 'pre-reloc' which means that they will
 be initialised prior to relocation. This can be done either with a driver
 flag or with a 'dm,pre-reloc' device tree property.

 To support this, the various dm scanning function now take a 'pre_reloc_only'
 parameter which indicates that only drivers marked pre-reloc should be
 bound.

 Signed-off-by: Simon Glass s...@chromium.org
 ---

  common/board_r.c |  4 ++--
  doc/driver-model/README.txt  | 23 +++---
  drivers/core/device.c|  6 --
  drivers/core/lists.c |  6 +++---
  drivers/core/root.c  | 11 +++
  include/dm/device-internal.h |  6 --
  include/dm/device.h  |  5 +
  include/dm/lists.h   |  2 +-
  include/dm/root.h|  8 ++--
  test/dm/core.c   | 47 
 ++--
  test/dm/test-driver.c| 11 +++
  test/dm/test-fdt.c   | 20 ++-
  test/dm/test-main.c  |  4 ++--
  test/dm/test.dts | 11 +++
  14 files changed, 128 insertions(+), 36 deletions(-)

 diff --git a/common/board_r.c b/common/board_r.c
 index d1f0aa9..d2a59ee 100644
 --- a/common/board_r.c
 +++ b/common/board_r.c
 @@ -276,13 +276,13 @@ static int initr_dm(void)
 debug(dm_init() failed: %d\n, ret);
 return ret;
 }
 -   ret = dm_scan_platdata();
 +   ret = dm_scan_platdata(false);
 if (ret) {
 debug(dm_scan_platdata() failed: %d\n, ret);
 return ret;
 }
  #ifdef CONFIG_OF_CONTROL
 -   ret = dm_scan_fdt(gd-fdt_blob);
 +   ret = dm_scan_fdt(gd-fdt_blob, false);
 if (ret) {
 debug(dm_scan_fdt() failed: %d\n, ret);
 return ret;
 diff --git a/doc/driver-model/README.txt b/doc/driver-model/README.txt
 index e0b395a..deacfe9 100644
 --- a/doc/driver-model/README.txt
 +++ b/doc/driver-model/README.txt
 @@ -332,26 +332,35 @@ dealing with this might not be worth it.
  - Implemented a GPIO system, trying to keep it simple


 +Pre-Relocation Support
 +--
 +
 +For pre-relocation we simply call the driver model init function. Only
 +drivers marked with DM_FLAG_PRE_RELOC or the device tree 'dm,pre-reloc'
 +flag are initialised prior to relocation. This helps to reduce the driver
 +model overhead.
 +
 +Then post relocation we throw that away and re-init driver model again.
 +For drivers which require some sort of continuity between pre- and
 +post-relocation devices, we can provide access to the pre-relocation
 +device pointers, but this is not currently implemented (the root device
 +pointer is saved but not made available).
 +
 +
  Things to punt for later
  

  - SPL support - this will have to be present before many drivers can be
  converted, but it seems like we can add it once we are happy with the
  core implementation.
 -- Pre-relocation support - similar story

 -That is not to say that no thinking has gone into these - in fact there
 +That is not to say that no thinking has gone into this - in fact there
  is quite a lot there. However, getting these right is non-trivial and
  there is a high 

Re: [U-Boot] Standalone application issue.

2014-05-27 Thread Rommel G Custodio
Dear Mazen

mazen.e mazen.ezzeddine at gmail.com writes:

 
 Thanks Wolfgang,
 
 I will do and post the result.
 
 Many thanks.

I've never got bootm to run any of the standalone applications in the 
example directory but through trial and error (maybe luck) bootelf works 
for me. I've tested that this works with old 2010.XX and latest 2014.XX 
releases. Note I use PowerPC, but worth I try in your case I guess.


This is how I build the hello_world binary:

tools/mkimage -A powerpc -T standalone -C none -a 0x20 -e 0x20 -n 
hello_world -d examples/standalone/hello_world hello_world.img

And these are these serries of commands that loads and executes the binary:

usb start
fatload usb 0 8 hello_world.img
bootelf 80040


-
test # usb start
(Re)start USB...
USB:   Register  NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 3 USB Device(s) found
   scanning bus for storage devices... 1 Storage Device(s) found
test # fatload usb 0 8 hello_world.img
reading hello_world.img

69441 bytes read
test # bootelf 80040
## Starting application at 0x0004 ...
Example expects ABI version 6
Actual U-Boot ABI version 6
Hello World
argc = 1
argv[0] = 80040
argv[1] = NULL
Hit any key to exit ...

## Application terminated, rc = 0x0
test #
-

Good luck!

All the best,
Rommel


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


Re: [U-Boot] Howto u-boot an evk1100 ?

2014-05-27 Thread Sril


Thanks for your answers Andreas.

AFAIK is there no support for avr32 uc3 devices currently. There where
some patches but mainline only the ap700x devices are supported.
Currently Yes, there is not.

ap700x and uc3 are not so nearby procs. There is no cache and no mmu in many 
uc3. In more general way to think, each at32 is far from another, IMHO.

Let's start with :
http://lists.denx.de/pipermail/u-boot/2009-January/thread.html#45925

So, none worked in evk1100 since that time.
I've been surprised and I tried to find some people here and avrfreaks.
I'm not in the habit to re-invent the wheel.
In this case, my purpose is to integrate patches from a worked version of 
u-boot evk1100.

Which docs do you mean? UC3 spec is @atmel.com ;)
A README.evk1100 in doc directory for instance.
Most of UC3 (at32uc3a0512) spec is already code in patches.

One can notice that there is no sdramc bug anymore in evk1100. I see no reason 
at all actually to put it in u-boot. This plate had probably been crushed out 
by other eval cards that worked well with their first trial product.

Ok, see ya.
Best regards.


Le Mardi 27 mai 2014 23h08, Andreas Bießmann andreas.de...@googlemail.com a 
écrit :
Dear Sril,

 On 27.05.14 17:51, Sril wrote:
 Hi,
 I plan to run linux on this box : sdramc bug free on my atevk1100.
 I took patches from mailling list archive but, when I compile I can see
led 4 red unblanking and led 5 green unblanking.
 Does someone knows what does this mean ?

AFAIK is there no support for avr32 uc3 devices currently. There where
some patches but mainline only the ap700x devices are supported.

 I try to put usart0 but nothing on minicom : usart1 successfully tested 
on usart_example.c from atmel dev kit for evk1100.
 
 
 What must I do : where are docs, please ?

Which docs do you mean? UC3 spec is @atmel.com ;)




Best regards

Andreas Bießmann

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


Re: [U-Boot] [PATCH v3 1/3] dts: re-write dts/Makefile more simply with Kbuild

2014-05-27 Thread Masahiro Yamada
Hi York,

  diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
  index b770e25..38b9c7d 100644
  --- a/arch/arm/lib/board.c
  +++ b/arch/arm/lib/board.c
  @@ -280,7 +280,7 @@ void board_init_f(ulong bootflag)
  gd-mon_len = _bss_end_ofs;
   #ifdef CONFIG_OF_EMBED
  /* Get a pointer to the FDT */
  -   gd-fdt_blob = _binary_dt_dtb_start;
  +   gd-fdt_blob = __dtb_db_begin;
 
 Is this a typo? I believe it should be __dtb_dt_begin. Did anyone see the
 compiling error?


Yes, it's a typo.
I had already posted a patch.
http://patchwork.ozlabs.org/patch/342815/

Even such a simple one has been waiting for more than one month
in Patchwork queue.
:-(

For now, CONFIG_OF_EMBED is defined for MicroBlaze.
I guess nobody saw the compile error.



Best Regards
Masahiro Yamada]

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


Re: [U-Boot] Standalone application issue.

2014-05-27 Thread Wolfgang Denk
Dear Rommel,

In message loom.20140528t012622...@post.gmane.org you wrote:
 
 I've never got bootm to run any of the standalone applications in the 

Actually go is the native command that is supposed tobe used to
start SA apps.

 example directory but through trial and error (maybe luck) bootelf works 
 for me. I've tested that this works with old 2010.XX and latest 2014.XX 
 releases. Note I use PowerPC, but worth I try in your case I guess.
 
 
 This is how I build the hello_world binary:
 
 tools/mkimage -A powerpc -T standalone -C none -a 0x20 -e 0x20 -n 
 hello_world -d examples/standalone/hello_world hello_world.img
 
 And these are these serries of commands that loads and executes the binary:
 
 usb start
 fatload usb 0 8 hello_world.img
 bootelf 80040

Frankly, this is crap.  You don;t make use of the image header here,
so you could as well save all the efforts.  Just store hello_world
(the ELF file) in your file system, then load that dierectly, and
start it.  There is no sense in using mkimage as done above.

 test # bootelf 80040
 ## Starting application at 0x0004 ...
 Example expects ABI version 6
 Actual U-Boot ABI version 6
 Hello World
 argc = 1
 argv[0] = 80040
 argv[1] = NULL
 Hit any key to exit ...

And how would you pass additional arguments to the SA app?

Use go, this was made for the purpose at hand!

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
Everybody is talking about the  weather  but  nobody  does  anything
about it.   - Mark Twain
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Booting armv8 kernel on uboot

2014-05-27 Thread TigerLiu
Hi, fenghua:
Followed your steps, I also downloaded  linux-3.14.4.tar.xz .
And run it with ATF + Uboot.
It could boot into linux kernel, and hangs at mounting root fs.

Thanks a lot!

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


Re: [U-Boot] Standalone application issue.

2014-05-27 Thread Rommel G Custodio
Dear Wolfgang,

Wolfgang Denk wd at denx.de writes:

 
 Dear Rommel,
 
 In message loom.20140528T012622-10 at post.gmane.org you wrote:
  

snipped

 
 Use go, this was made for the purpose at hand!

Thanks for the comments! I will give it a go next time :-)

 
 Best regards,
 
 Wolfgang Denk
 

All the best,
Rommel


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


Re: [U-Boot] [RFC, PATCH v2 2/4] lib, rbtree: resync with Linux-3.14

2014-05-27 Thread Heiko Schocher

Hello Tom, Marek,

Am 27.05.2014 16:21, schrieb Tom Rini:

On Mon, May 26, 2014 at 09:05:47AM +0200, Marek Vasut wrote:

On Monday, May 26, 2014 at 07:32:22 AM, Heiko Schocher wrote:

Hello Marek,

Am 24.05.2014 12:30, schrieb Marek Vasut:

On Thursday, May 22, 2014 at 12:43:06 PM, Heiko Schocher wrote:

resync with linux:

commit 455c6fdbd219161bd09b1165f11699d6d73de11c
Author: Linus Torvaldstorva...@linux-foundation.org
Date:   Sun Mar 30 20:40:15 2014 -0700

  Linux 3.14

Needed for the MTD/UBI/UBIFS resync

Signed-off-by: Heiko Schocherh...@denx.de
Cc: Marek Vasutma...@denx.de
Cc: Sergey Lapinsla...@ossfans.org
Cc: Scott Woodscottw...@freescale.com


Did you just copy the files over or did you change anything in them? If
you changed anything, I'd say that should go into some compat header so
there's a minimum amount of changes compared to the mainline linux code.


Just copied the file from Linux, changed the license file header,
and add:

+#define __UBOOT__
   #includelinux/rbtree_augmented.h
+#ifndef __UBOOT__
   #includelinux/export.h
+#else
+#includeubi_uboot.h
+#endif

so, that should be ok.


Thanks for clarifying, I suppose that might need to be in the commit message
though , so once we decide to do resync again, we'd know what the code looked
like compared to 3.14 .


Agreed, thanks.


Ok, fixed... but I want to wait for some testing results before posting
a v3.

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