Re: [U-Boot] [PATCH 7/7] ARM: bcm283x: move SoC headers to mach-bcm283x/include/mach

2015-03-16 Thread Stephen Warren
On 03/16/2015 04:35 AM, Masahiro Yamada wrote:
 Move arch/arm/include/asm/arch-bcm283x/*
   - arch/arm/mach-bcm283x/include/mach/*

 diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig

  config SYS_SOC
 - default bcm2835
 + default bcm283x

I think this means that the *automatic* calculation of DTB filename will
change. However, since we always explicitly set $fdtfile in
misc_init_r(), this shouldn't cause any practical problem.

Aside from the one comment I had, patches 4-7,
Acked-by: Stephen Warren swar...@wwwdotorg.org
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC PATCH] usb: dwc2: handle bcm2835 phys-virt address translations

2015-03-16 Thread Stephen Warren
On 03/15/2015 12:20 PM, Marek Vasut wrote:
 On Sunday, March 15, 2015 at 05:04:05 PM, Stephen Warren wrote:
 On 03/13/2015 12:13 AM, Stephen Warren wrote:
 BCM2835 bus addresses use the top 2 bits to determine whether peripherals
 use or bypass the GPU L1 and L2 cache. BCM2835-ARM-Peripherals.pdf states
 that: ...

 If you do end up applying this, the subject should say phys-bus not
 phys-virt.
 
 I'd say we should wait a bit until these patches stabilize a little more,
 don't you think so ?

I can see the argument. That said, I don't expect anything much to
stabilize about the patches; they appear to work!

It would be nice though if someone from the RPi Foundation could comment
on the exact effect of the upper bus address bits, and why 0xc would
work for RPi2 but 0x4 for the RPi 1. I wonder if the ARM cache status
(enabled, disabled) interacts with the GPU cache enable in any way, e.g.
burst vs. non-burst transactions on the bus or something? That's about
the only reason I can see for the RPi Foundation kernel working with 0x4
bus addresses on both chips, but U-Boot needing something different on
RPi2...

Dom, for reference, see:
http://lists.denx.de/pipermail/u-boot/2015-March/207947.html
http://lists.denx.de/pipermail/u-boot/2015-March/thread.html#207947
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 6/7] ARM: bcm283x: merge BCM2835/BCM2836 directories into mach-bcm283x

2015-03-16 Thread Masahiro Yamada
BCM2835 (used on Raspberry Pi) and BCM2836 (used on Raspberry Pi 2)
are similar enough.  One of the biggest differences is the ARM
processor.  It is reasonable to collect the source files into a
single place, arch/arm/mach-bcm283x/.

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
Cc: Stephen Warren swar...@nvidia.com
---

Changes in v2: None

 arch/arm/Kconfig   | 15 +++-
 arch/arm/Makefile  |  1 +
 arch/arm/cpu/arm1176/Makefile  |  2 --
 arch/arm/cpu/arm1176/bcm2835/Kconfig   | 12 ---
 arch/arm/cpu/armv7/Makefile|  1 -
 arch/arm/cpu/armv7/bcm2835/Makefile| 13 ---
 arch/arm/mach-bcm283x/Kconfig  | 40 ++
 .../{cpu/arm1176/bcm2835 = mach-bcm283x}/Makefile |  2 +-
 .../{cpu/arm1176/bcm2835 = mach-bcm283x}/init.c   |  0
 .../bcm2835 = mach-bcm283x}/lowlevel_init.S   |  0
 .../{cpu/arm1176/bcm2835 = mach-bcm283x}/mbox.c   |  0
 .../{cpu/arm1176/bcm2835 = mach-bcm283x}/reset.c  |  0
 .../{cpu/arm1176/bcm2835 = mach-bcm283x}/timer.c  |  0
 board/raspberrypi/rpi/Kconfig  | 15 
 board/raspberrypi/rpi_2/Kconfig| 15 
 configs/rpi_2_defconfig|  1 +
 configs/rpi_defconfig  |  1 +
 17 files changed, 48 insertions(+), 70 deletions(-)
 delete mode 100644 arch/arm/cpu/arm1176/bcm2835/Kconfig
 delete mode 100644 arch/arm/cpu/armv7/bcm2835/Makefile
 create mode 100644 arch/arm/mach-bcm283x/Kconfig
 rename arch/arm/{cpu/arm1176/bcm2835 = mach-bcm283x}/Makefile (72%)
 rename arch/arm/{cpu/arm1176/bcm2835 = mach-bcm283x}/init.c (100%)
 rename arch/arm/{cpu/arm1176/bcm2835 = mach-bcm283x}/lowlevel_init.S (100%)
 rename arch/arm/{cpu/arm1176/bcm2835 = mach-bcm283x}/mbox.c (100%)
 rename arch/arm/{cpu/arm1176/bcm2835 = mach-bcm283x}/reset.c (100%)
 rename arch/arm/{cpu/arm1176/bcm2835 = mach-bcm283x}/timer.c (100%)
 delete mode 100644 board/raspberrypi/rpi/Kconfig
 delete mode 100644 board/raspberrypi/rpi_2/Kconfig

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index b9ebee1..9292e98 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -286,13 +286,8 @@ config TARGET_MX35PDK
bool Support mx35pdk
select CPU_ARM1136
 
-config TARGET_RPI
-   bool Support rpi
-   select CPU_ARM1176
-
-config TARGET_RPI_2
-   bool Support rpi_2
-   select CPU_V7
+config ARCH_BCM283X
+   bool Broadcom BCM283X family
 
 config TARGET_INTEGRATORAP_CM946ES
bool Support integratorap_cm946es
@@ -723,9 +718,9 @@ endchoice
 
 source arch/arm/mach-at91/Kconfig
 
-source arch/arm/mach-davinci/Kconfig
+source arch/arm/mach-bcm283x/Kconfig
 
-source arch/arm/cpu/arm1176/bcm2835/Kconfig
+source arch/arm/mach-davinci/Kconfig
 
 source arch/arm/cpu/armv7/exynos/Kconfig
 
@@ -834,8 +829,6 @@ source board/palmtreo680/Kconfig
 source board/phytec/pcm051/Kconfig
 source board/ppcag/bg0900/Kconfig
 source board/pxa255_idp/Kconfig
-source board/raspberrypi/rpi/Kconfig
-source board/raspberrypi/rpi_2/Kconfig
 source board/samsung/smdk2410/Kconfig
 source board/sandisk/sansa_fuze_plus/Kconfig
 source board/scb9328/Kconfig
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 08946de..bac3cb2 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -5,6 +5,7 @@
 # Machine directory name.  This list is sorted alphanumerically
 # by CONFIG_* macro name.
 machine-$(CONFIG_ARCH_AT91)+= at91
+machine-$(CONFIG_ARCH_BCM283X) += bcm283x
 machine-$(CONFIG_ARCH_DAVINCI) += davinci
 machine-$(CONFIG_ARCH_HIGHBANK)+= highbank
 machine-$(CONFIG_ARCH_KEYSTONE)+= keystone
diff --git a/arch/arm/cpu/arm1176/Makefile b/arch/arm/cpu/arm1176/Makefile
index 480e130..deec427 100644
--- a/arch/arm/cpu/arm1176/Makefile
+++ b/arch/arm/cpu/arm1176/Makefile
@@ -10,5 +10,3 @@
 
 extra-y= start.o
 obj-y  = cpu.o
-
-obj-$(CONFIG_BCM2835) += bcm2835/
diff --git a/arch/arm/cpu/arm1176/bcm2835/Kconfig 
b/arch/arm/cpu/arm1176/bcm2835/Kconfig
deleted file mode 100644
index 73cc72b..000
--- a/arch/arm/cpu/arm1176/bcm2835/Kconfig
+++ /dev/null
@@ -1,12 +0,0 @@
-if TARGET_RPI || TARGET_RPI_2
-
-config DM
-   default y
-
-config DM_SERIAL
-   default y
-
-config DM_GPIO
-   default y
-
-endif
diff --git a/arch/arm/cpu/armv7/Makefile b/arch/arm/cpu/armv7/Makefile
index 1312a9d..21fc03b 100644
--- a/arch/arm/cpu/armv7/Makefile
+++ b/arch/arm/cpu/armv7/Makefile
@@ -39,7 +39,6 @@ endif
 
 obj-$(if $(filter am33xx,$(SOC)),y) += am33xx/
 obj-$(if $(filter armada-xp,$(SOC)),y) += armada-xp/
-obj-$(CONFIG_BCM2835) += bcm2835/
 obj-$(if $(filter bcm281xx,$(SOC)),y) += bcm281xx/
 obj-$(if $(filter bcmcygnus,$(SOC)),y) += bcmcygnus/
 obj-$(if $(filter bcmnsp,$(SOC)),y) += bcmnsp/
diff --git a/arch/arm/cpu/armv7/bcm2835/Makefile 
b/arch/arm/cpu/armv7/bcm2835/Makefile
deleted 

[U-Boot] [PATCH v2 7/7] ARM: bcm283x: move SoC headers to mach-bcm283x/include/mach

2015-03-16 Thread Masahiro Yamada
Move arch/arm/include/asm/arch-bcm283x/*
  - arch/arm/mach-bcm283x/include/mach/*

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
Cc: Stephen Warren swar...@nvidia.com
---

Changes in v2: None

 arch/arm/mach-bcm283x/Kconfig | 2 +-
 .../{include/asm/arch-bcm2835 = mach-bcm283x/include/mach}/gpio.h| 0
 .../{include/asm/arch-bcm2835 = mach-bcm283x/include/mach}/mbox.h| 0
 .../{include/asm/arch-bcm2835 = mach-bcm283x/include/mach}/sdhci.h   | 0
 .../{include/asm/arch-bcm2835 = mach-bcm283x/include/mach}/timer.h   | 0
 .../{include/asm/arch-bcm2835 = mach-bcm283x/include/mach}/wdog.h| 0
 drivers/mmc/bcm2835_sdhci.c   | 4 ++--
 7 files changed, 3 insertions(+), 3 deletions(-)
 rename arch/arm/{include/asm/arch-bcm2835 = mach-bcm283x/include/mach}/gpio.h 
(100%)
 rename arch/arm/{include/asm/arch-bcm2835 = mach-bcm283x/include/mach}/mbox.h 
(100%)
 rename arch/arm/{include/asm/arch-bcm2835 = 
mach-bcm283x/include/mach}/sdhci.h (100%)
 rename arch/arm/{include/asm/arch-bcm2835 = 
mach-bcm283x/include/mach}/timer.h (100%)
 rename arch/arm/{include/asm/arch-bcm2835 = mach-bcm283x/include/mach}/wdog.h 
(100%)

diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig
index d5e09e8..b43f2d9 100644
--- a/arch/arm/mach-bcm283x/Kconfig
+++ b/arch/arm/mach-bcm283x/Kconfig
@@ -31,7 +31,7 @@ config SYS_VENDOR
default raspberrypi
 
 config SYS_SOC
-   default bcm2835
+   default bcm283x
 
 config SYS_CONFIG_NAME
default rpi if TARGET_RPI
diff --git a/arch/arm/include/asm/arch-bcm2835/gpio.h 
b/arch/arm/mach-bcm283x/include/mach/gpio.h
similarity index 100%
rename from arch/arm/include/asm/arch-bcm2835/gpio.h
rename to arch/arm/mach-bcm283x/include/mach/gpio.h
diff --git a/arch/arm/include/asm/arch-bcm2835/mbox.h 
b/arch/arm/mach-bcm283x/include/mach/mbox.h
similarity index 100%
rename from arch/arm/include/asm/arch-bcm2835/mbox.h
rename to arch/arm/mach-bcm283x/include/mach/mbox.h
diff --git a/arch/arm/include/asm/arch-bcm2835/sdhci.h 
b/arch/arm/mach-bcm283x/include/mach/sdhci.h
similarity index 100%
rename from arch/arm/include/asm/arch-bcm2835/sdhci.h
rename to arch/arm/mach-bcm283x/include/mach/sdhci.h
diff --git a/arch/arm/include/asm/arch-bcm2835/timer.h 
b/arch/arm/mach-bcm283x/include/mach/timer.h
similarity index 100%
rename from arch/arm/include/asm/arch-bcm2835/timer.h
rename to arch/arm/mach-bcm283x/include/mach/timer.h
diff --git a/arch/arm/include/asm/arch-bcm2835/wdog.h 
b/arch/arm/mach-bcm283x/include/mach/wdog.h
similarity index 100%
rename from arch/arm/include/asm/arch-bcm2835/wdog.h
rename to arch/arm/mach-bcm283x/include/mach/wdog.h
diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c
index 92f7d89..4ec2968 100644
--- a/drivers/mmc/bcm2835_sdhci.c
+++ b/drivers/mmc/bcm2835_sdhci.c
@@ -39,8 +39,8 @@
 #include common.h
 #include malloc.h
 #include sdhci.h
-#include asm/arch/timer.h
-#include asm/arch-bcm2835/sdhci.h
+#include mach/timer.h
+#include mach/sdhci.h
 
 /* 400KHz is max freq for card ID etc. Use that as min */
 #define MIN_FREQ 40
-- 
1.9.1

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


[U-Boot] [PATCH v2 3/7] m68k: remove arch/m68k/lib/board.c

2015-03-16 Thread Masahiro Yamada
All the M68000 boards have switched to Generic Board.
This file is no longer necessary.

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
Cc: Huan Wang alison.w...@freescale.com
Cc: Angelo Dureghello ang...@sysam.it
---

Changes in v2: None

 arch/m68k/lib/Makefile |   3 -
 arch/m68k/lib/board.c  | 642 -
 2 files changed, 645 deletions(-)
 delete mode 100644 arch/m68k/lib/board.c

diff --git a/arch/m68k/lib/Makefile b/arch/m68k/lib/Makefile
index d0e1a84..73d40bd 100644
--- a/arch/m68k/lib/Makefile
+++ b/arch/m68k/lib/Makefile
@@ -5,9 +5,6 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
 
-ifndef CONFIG_SYS_GENERIC_BOARD
-obj-y   += board.o
-endif
 obj-$(CONFIG_CMD_BOOTM) += bootm.o
 obj-y  += cache.o
 obj-y  += interrupts.o
diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c
deleted file mode 100644
index 9caff73..000
--- a/arch/m68k/lib/board.c
+++ /dev/null
@@ -1,642 +0,0 @@
-/*
- * (C) Copyright 2003
- * Josef Baumgartner josef.baumgart...@telex.de
- *
- * (C) Copyright 2000-2002
- * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
- *
- * SPDX-License-Identifier:GPL-2.0+
- */
-
-#include common.h
-#include watchdog.h
-#include command.h
-#include malloc.h
-#include stdio_dev.h
-#include linux/compiler.h
-
-#include asm/immap.h
-
-#if defined(CONFIG_CMD_IDE)
-#include ide.h
-#endif
-#if defined(CONFIG_CMD_SCSI)
-#include scsi.h
-#endif
-#if defined(CONFIG_CMD_KGDB)
-#include kgdb.h
-#endif
-#ifdef CONFIG_STATUS_LED
-#include status_led.h
-#endif
-#include net.h
-#include serial.h
-#ifdef CONFIG_SYS_ALLOC_DPRAM
-#include commproc.h
-#endif
-#include version.h
-
-#if defined(CONFIG_HARD_I2C) || \
-   defined(CONFIG_SYS_I2C)
-#include i2c.h
-#endif
-
-#ifdef CONFIG_CMD_SPI
-#include spi.h
-#endif
-
-#ifdef CONFIG_BITBANGMII
-#include miiphy.h
-#endif
-
-#include nand.h
-
-DECLARE_GLOBAL_DATA_PTR;
-
-static char *failed = *** failed ***\n;
-
-#include environment.h
-
-extern ulong __init_end;
-extern ulong __bss_end;
-
-#if defined(CONFIG_WATCHDOG)
-# undef INIT_FUNC_WATCHDOG_INIT
-# define INIT_FUNC_WATCHDOG_INIT   watchdog_init,
-# define WATCHDOG_DISABLE  watchdog_disable
-
-extern int watchdog_init(void);
-extern int watchdog_disable(void);
-#else
-# define INIT_FUNC_WATCHDOG_INIT   /* undef */
-# define WATCHDOG_DISABLE  /* undef */
-#endif /* CONFIG_WATCHDOG */
-
-ulong monitor_flash_len;
-
-/
- * Utilities   *
- 
- */
-
-/*
- * All attempts to come up with a common initialization sequence
- * that works for all boards and architectures failed: some of the
- * requirements are just _too_ different. To get rid of the resulting
- * mess of board dependend #ifdef'ed code we now make the whole
- * initialization sequence configurable to the user.
- *
- * The requirements for any new initalization function is simple: it
- * receives a pointer to the global data structure as it's only
- * argument, and returns an integer return code, where 0 means
- * continue and != 0 means fatal error, hang the system.
- */
-typedef int (init_fnc_t) (void);
-
-/
- * Init Utilities
- 
- * Some of this code should be moved into the core functions,
- * but let's get it working (again) first...
- */
-
-static int init_baudrate (void)
-{
-   gd-baudrate = getenv_ulong(baudrate, 10, CONFIG_BAUDRATE);
-   return 0;
-}
-
-/***/
-
-static int init_func_ram (void)
-{
-   int board_type = 0; /* use dummy arg */
-   puts (DRAM:  );
-
-   if ((gd-ram_size = initdram (board_type))  0) {
-   print_size (gd-ram_size, \n);
-   return (0);
-   }
-   puts (failed);
-   return (1);
-}
-
-/***/
-
-#if defined(CONFIG_HARD_I2C) ||defined(CONFIG_SYS_I2C)
-static int init_func_i2c (void)
-{
-   puts (I2C:   );
-#ifdef CONFIG_SYS_I2C
-   i2c_init_all();
-#else
-   i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-#endif
-   puts (ready\n);
-   return (0);
-}
-#endif
-
-#if defined(CONFIG_HARD_SPI)
-static int init_func_spi (void)
-{
-   puts (SPI:   );
-   spi_init ();
-   puts (ready\n);
-   return (0);
-}
-#endif
-
-/***/
-
-/
- * Initialization sequence *
- 
- */
-
-init_fnc_t *init_sequence[] = {

Re: [U-Boot] Removing +S: magic from defconfig files ?

2015-03-16 Thread Masahiro Yamada
Hi Hans,

Sorry, I missed this message.


2015-03-07 22:54 GMT+09:00 Hans de Goede hdego...@redhat.com:
 Hi All,

 I was wondering, now that we've a single .config for both the SPL and non
 SPL builds, can we drop the +S: magic from defconfig files ?

Yes.

In u-boot/master, all the magic prefixes have gone.


commit 252ed8729d8a2571faacb6fdb3463df2361a733d
Author: Masahiro Yamada yamada.masah...@socionext.com
Date:   Thu Mar 12 13:24:39 2015 +0900

kconfig: remove meaningless prefixes in defconfig files






-- 
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 6/7] ARM: bcm283x: merge BCM2835/BCM2836 directories into mach-bcm283x

2015-03-16 Thread Masahiro Yamada
Hi Stephen,



2015-03-17 12:39 GMT+09:00 Stephen Warren swar...@nvidia.com:
 On 03/16/2015 04:35 AM, Masahiro Yamada wrote:
 BCM2835 (used on Raspberry Pi) and BCM2836 (used on Raspberry Pi 2)
 are similar enough.  One of the biggest differences is the ARM
 processor.  It is reasonable to collect the source files into a
 single place, arch/arm/mach-bcm283x/.

 diff --git a/arch/arm/cpu/arm1176/bcm2835/Makefile 
 b/arch/arm/mach-bcm283x/Makefile

 -obj-y:= lowlevel_init.o
 +obj-$(CONFIG_TARGET_RPI) += lowlevel_init.o
  obj-y+= init.o reset.o timer.o mbox.o

 Why is only one file conditional; shouldn't they all be either -y or
 -$(CONFIG_TARGET_RPI)?
 ___



This patch just moves source files, not changing the behavior.

If you see arch/arm/cpu/armv7/bcm2835/Makefile (it is added by you),

---8--
src_dir := ../../arm1176/bcm2835/

obj-y   :=
obj-y   += $(src_dir)/init.o
obj-y   += $(src_dir)/reset.o
obj-y   += $(src_dir)/timer.o
obj-y   += $(src_dir)/mbox.o
--8--


BCM2836 borrows source files from BCM2835, except lowlevel_init.S.

I intended to reflect the same behavior.



Anyway, lowlevel_init is not linked for Raspberry Pi2
because you added CONFIG_SKIP_LOWLEVEL_INIT to include/configs/rpi_2.h




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


[U-Boot] Set up stdio earlier when using driver model --- breaks sbc8548 booting.

2015-03-16 Thread Paul Gortmaker
Testing latest master on sbc8548 (ppc e500v2 single core) and it hangs
at the Net:  line; a working boot shows the full Net:  line as:

 -
PCI: Host, 64 bit, 66 MHz, sync, arbiter
  00:01.0 - 8086:1026 - Network controller
PCI1: Bus 00 - 00

PCIe1: disabled
In:serial
Out:   serial
Err:   serial
Net:   eTSEC0 [PRIME], eTSEC1
Hit any key to stop autoboot:  0
 -

So we never see the eTSEC0 or any other output after Net: .

My 1st bisect led to my own commit:

 -
commit 2bf4207b8a452476a591d733c6b8f09b337acc08
Author: Paul Gortmaker paul.gortma...@windriver.com
AuthorDate: Thu Aug 14 10:42:52 2014 -0400
Commit: York Sun york...@freescale.com
CommitDate: Fri Nov 14 11:12:13 2014 -0800

sbc8548: enable and test CONFIG_SYS_GENERIC_BOARD
 -

...but that is a red herring, since I'd tested it on master at Aug14,
but it wasn't committed to master until three months later.  So the
breakage is in that 3 month window.

Since I recorded the original baseline I'd tested on, I restarted the
bisect with that baseline as good and the above 2bf42 as bad, and just
added the oneline change for CONFIG_SYS_GENERIC_BOARD manually at each
bisect point.  Doing that led me unequivocally to:

 -
  commit 294b91a5817147d4b7f47be2ac69bac2a1f26491
  Author: Simon Glass s...@chromium.org
  Date:   Wed Sep 3 17:37:00 2014 -0600

Set up stdio earlier when using driver model
 -

Based on a part of that commit log, it says Should there be any
problems with this approach they can be dealt with as boards are
converted over to use driver model for serial.  So maybe the sbc8548 is
just missing some additional conversion?  Oddly it seems it is dying at
network device probing and not in/out/err that use serial as stdio.

Any hints on what to look at next to solve this would be appreciated. I
had a look at this link:

http://www.denx.de/wiki/U-Boot/DriverModel

..but wasn't sure where to go from there, since I'm still unsure what
the real root of the breakage is.

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


[U-Boot] [PATCH 2/7] powerpc: ppc4xx: remove JSE board support

2015-03-16 Thread Masahiro Yamada
This has not been converted to Generic Board, so should be removed.
(See doc/README.generic-board for details.)

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
Cc: Stephen Williams st...@icarus.com
---

 arch/powerpc/cpu/ppc4xx/Kconfig |   4 -
 board/jse/Kconfig   |   9 -
 board/jse/MAINTAINERS   |   6 -
 board/jse/Makefile  |  12 -
 board/jse/README.txt|  48 
 board/jse/flash.c   | 491 
 board/jse/host_bridge.c |  77 ---
 board/jse/init.S|  75 --
 board/jse/jse.c | 147 
 board/jse/jse_priv.h|  12 -
 board/jse/sdram.c   | 169 --
 configs/JSE_defconfig   |   3 -
 doc/README.scrapyard|   1 +
 include/configs/JSE.h   | 276 --
 14 files changed, 1 insertion(+), 1329 deletions(-)
 delete mode 100644 board/jse/Kconfig
 delete mode 100644 board/jse/MAINTAINERS
 delete mode 100644 board/jse/Makefile
 delete mode 100644 board/jse/README.txt
 delete mode 100644 board/jse/flash.c
 delete mode 100644 board/jse/host_bridge.c
 delete mode 100644 board/jse/init.S
 delete mode 100644 board/jse/jse.c
 delete mode 100644 board/jse/jse_priv.h
 delete mode 100644 board/jse/sdram.c
 delete mode 100644 configs/JSE_defconfig
 delete mode 100644 include/configs/JSE.h

diff --git a/arch/powerpc/cpu/ppc4xx/Kconfig b/arch/powerpc/cpu/ppc4xx/Kconfig
index 5db5e34..e151200 100644
--- a/arch/powerpc/cpu/ppc4xx/Kconfig
+++ b/arch/powerpc/cpu/ppc4xx/Kconfig
@@ -13,9 +13,6 @@ config TARGET_CSB272
 config TARGET_CSB472
bool Support csb472
 
-config TARGET_JSE
-   bool Support JSE
-
 config TARGET_KORAT
bool Support korat
 
@@ -204,7 +201,6 @@ source board/gdsys/405ex/Kconfig
 source board/gdsys/dlvision/Kconfig
 source board/gdsys/gdppc440etx/Kconfig
 source board/gdsys/intip/Kconfig
-source board/jse/Kconfig
 source board/korat/Kconfig
 source board/lwmon5/Kconfig
 source board/mosaixtech/icon/Kconfig
diff --git a/board/jse/Kconfig b/board/jse/Kconfig
deleted file mode 100644
index 48905fa..000
--- a/board/jse/Kconfig
+++ /dev/null
@@ -1,9 +0,0 @@
-if TARGET_JSE
-
-config SYS_BOARD
-   default jse
-
-config SYS_CONFIG_NAME
-   default JSE
-
-endif
diff --git a/board/jse/MAINTAINERS b/board/jse/MAINTAINERS
deleted file mode 100644
index 818a5a0..000
--- a/board/jse/MAINTAINERS
+++ /dev/null
@@ -1,6 +0,0 @@
-JSE BOARD
-M: Stephen Williams st...@icarus.com
-S: Maintained
-F: board/jse/
-F: include/configs/JSE.h
-F: configs/JSE_defconfig
diff --git a/board/jse/Makefile b/board/jse/Makefile
deleted file mode 100644
index feac3a8..000
--- a/board/jse/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# (C) Copyright 2006
-# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
-#
-# Copyright 2004 Picture Elements, Inc.
-# Stephen Williams st...@icarus.com
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-
-obj-y  = jse.o sdram.o flash.o host_bridge.o
-obj-y  += init.o
diff --git a/board/jse/README.txt b/board/jse/README.txt
deleted file mode 100644
index 84497db..000
--- a/board/jse/README.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-JSE Configuration Details
-
-Memory Bank 0 -- Flash chip

-
-0xfff0 - 0x
-
-The flash chip is really only 512Kbytes, but the high address bit of
-the 1Meg region is ignored, so the flash is replicated through the
-region. Thus, this is consistent with a flash base address 0xfff8.
-
-The placement at the end is to be consistent with reset behavior,
-where the processor itself initially uses this bus to load the branch
-vector and start running.
-
-On-Chip Memory
---
-
-0xf400 - 0xf4000fff
-
-The 405GPr includes a 4K on-chip memory that can be placed however
-software chooses. I choose to place the memory at this address, to
-keep it out of the cachable areas.
-
-
-Memory Bank 1 -- SystemACE Controller
--
-
-0xf000 - 0xf00f
-
-The SystemACE chip is along on peripheral bank CS#1. We don't need
-much space, but 1Meg is the smallest we can configure the chip to
-allocate. We need it far away from the flash region, because this
-region is set to be non-cached.
-
-
-Internal Peripherals
-
-
-0xef600300 - 0xef6008ff
-
-These are scattered various peripherals internal to the PPC405GPr
-chip.
-
-SDRAM
--
-
-0x - 0x07ff  (128 MBytes)
diff --git a/board/jse/flash.c b/board/jse/flash.c
deleted file mode 100644
index a550f7d..000
--- a/board/jse/flash.c
+++ /dev/null
@@ -1,491 +0,0 @@
-/*
- * (C) Copyright 2000-2004
- * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
- *
- * SPDX-License-Identifier:GPL-2.0+
- */
-
-/*
- * Modified 4/5/2001
- * Wait for completion of each sector erase command issued
- * 4/5/2001
- * Chris Hallinan - DS4.COM, Inc. - c...@net1plus.com
- */
-

[U-Boot] [PATCH 6/7] powerpc: ppc4xx: remove korat board support

2015-03-16 Thread Masahiro Yamada
This has not been converted to Generic Board, so should be removed.
(See doc/README.generic-board for details.)

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
Cc: Larry Johnson l...@acm.org
---

 arch/powerpc/cpu/ppc4xx/Kconfig |   4 -
 board/korat/Kconfig |   9 -
 board/korat/MAINTAINERS |   7 -
 board/korat/Makefile|   9 -
 board/korat/README  |  64 
 board/korat/config.mk   |  27 --
 board/korat/init.S  |  80 -
 board/korat/korat.c | 633 
 board/korat/u-boot-F7FC.lds | 124 
 configs/korat_defconfig |   3 -
 configs/korat_perm_defconfig|   4 -
 doc/README.scrapyard|   1 +
 include/configs/korat.h | 550 --
 13 files changed, 1 insertion(+), 1514 deletions(-)
 delete mode 100644 board/korat/Kconfig
 delete mode 100644 board/korat/MAINTAINERS
 delete mode 100644 board/korat/Makefile
 delete mode 100644 board/korat/README
 delete mode 100644 board/korat/config.mk
 delete mode 100644 board/korat/init.S
 delete mode 100644 board/korat/korat.c
 delete mode 100644 board/korat/u-boot-F7FC.lds
 delete mode 100644 configs/korat_defconfig
 delete mode 100644 configs/korat_perm_defconfig
 delete mode 100644 include/configs/korat.h

diff --git a/arch/powerpc/cpu/ppc4xx/Kconfig b/arch/powerpc/cpu/ppc4xx/Kconfig
index 75e4507..9e52d3f 100644
--- a/arch/powerpc/cpu/ppc4xx/Kconfig
+++ b/arch/powerpc/cpu/ppc4xx/Kconfig
@@ -13,9 +13,6 @@ config TARGET_CSB272
 config TARGET_CSB472
bool Support csb472
 
-config TARGET_KORAT
-   bool Support korat
-
 config TARGET_LWMON5
bool Support lwmon5
select SUPPORT_SPL
@@ -195,7 +192,6 @@ source board/gdsys/405ex/Kconfig
 source board/gdsys/dlvision/Kconfig
 source board/gdsys/gdppc440etx/Kconfig
 source board/gdsys/intip/Kconfig
-source board/korat/Kconfig
 source board/lwmon5/Kconfig
 source board/mosaixtech/icon/Kconfig
 source board/mpl/mip405/Kconfig
diff --git a/board/korat/Kconfig b/board/korat/Kconfig
deleted file mode 100644
index f434dea..000
--- a/board/korat/Kconfig
+++ /dev/null
@@ -1,9 +0,0 @@
-if TARGET_KORAT
-
-config SYS_BOARD
-   default korat
-
-config SYS_CONFIG_NAME
-   default korat
-
-endif
diff --git a/board/korat/MAINTAINERS b/board/korat/MAINTAINERS
deleted file mode 100644
index 8b96846..000
--- a/board/korat/MAINTAINERS
+++ /dev/null
@@ -1,7 +0,0 @@
-KORAT BOARD
-M: Larry Johnson l...@acm.org
-S: Maintained
-F: board/korat/
-F: include/configs/korat.h
-F: configs/korat_defconfig
-F: configs/korat_perm_defconfig
diff --git a/board/korat/Makefile b/board/korat/Makefile
deleted file mode 100644
index 63914bc..000
--- a/board/korat/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# (C) Copyright 2002-2007
-# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-
-obj-y  = korat.o
-extra-y+= init.o
diff --git a/board/korat/README b/board/korat/README
deleted file mode 100644
index e059f78..000
--- a/board/korat/README
+++ /dev/null
@@ -1,64 +0,0 @@
-The Korat board has two NOR flashes, FLASH0 and FLASH1, which are connected to
-chip select 0 and 1, respectively.  FLASH0 contains 16 MiB, and is mapped to
-addresses 0xFF00 - 0x as U-Boot Flash Bank #2.  FLASH1 contains
-from 16 to 128 MiB, and is mapped to 0xF?00 - 0xF7FF as U-Boot Flash
-Bank #1 (with the starting address depending on the flash size detected at
-runtime).  The write-enable pin on FLASH0 is disabled, so the contents of 
FLASH0
-cannot be modified in the field.  This also prevents FLASH0 from executing
-commands to return chip information, so its configuration is hard-coded in
-U-Boot.
-
-There are two versions of U-Boot for Korat: permanent and upgradable.  The
-permanent U-Boot is pre-programmed at the top of FLASH0, e.g., at addresses
-0xFFFA - 0x for the current 384 KiB size.  The upgradable U-Boot is
-located 256 KiB from the top of FLASH1, e.g. at addresses 0xF7F6000 - 
0xF7FC
-for the current 384 KiB size.  FLASH1 addresses 0xF7FE - 0xF7FF are
-used for the U-Boot environmental parameters, and addresses 0xF7FC -
-0xF7FD are used for the redundant copy of the parameters.  These locations
-are used by both versions of U-Boot.
-
-On booting, the permanent U-Boot in FLASH0 begins executing.  After performing
-minimal setup, it monitors the state of the board's Reset switch (GPIO47).  If
-the switch is sensed as open before a timeout period, then U-Boot branches to
-address 0xF7FBFFFC.  This causes the upgradable U-Boot to execute from the
-beginning.  If the switch remains closed thoughout the timeout period, the
-permanent U-Boot activates the on-board buzzer until the switch is sensed as
-opened.  It then continues to execute without branching to FLASH1.  The effect
-of this is that normally the Korat board 

[U-Boot] [PATCH 1/7] powerpc: mpc5xxx: remove BC3450 board support

2015-03-16 Thread Masahiro Yamada
This has not been converted to Generic Board, so should be removed.
(See doc/README.generic-board for details.)

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
---

 arch/powerpc/cpu/mpc5xxx/Kconfig |   4 -
 board/bc3450/Kconfig |   9 -
 board/bc3450/MAINTAINERS |   6 -
 board/bc3450/Makefile|   8 -
 board/bc3450/bc3450.c| 586 
 board/bc3450/cmd_bc3450.c| 805 ---
 board/bc3450/mt48lc16m16a2-75.h  |  18 -
 configs/BC3450_defconfig |   3 -
 doc/README.scrapyard |  15 +-
 include/configs/BC3450.h | 541 --
 10 files changed, 8 insertions(+), 1987 deletions(-)
 delete mode 100644 board/bc3450/Kconfig
 delete mode 100644 board/bc3450/MAINTAINERS
 delete mode 100644 board/bc3450/Makefile
 delete mode 100644 board/bc3450/bc3450.c
 delete mode 100644 board/bc3450/cmd_bc3450.c
 delete mode 100644 board/bc3450/mt48lc16m16a2-75.h
 delete mode 100644 configs/BC3450_defconfig
 delete mode 100644 include/configs/BC3450.h

diff --git a/arch/powerpc/cpu/mpc5xxx/Kconfig b/arch/powerpc/cpu/mpc5xxx/Kconfig
index 9da00da..1b81fb5 100644
--- a/arch/powerpc/cpu/mpc5xxx/Kconfig
+++ b/arch/powerpc/cpu/mpc5xxx/Kconfig
@@ -14,9 +14,6 @@ config TARGET_A3M071
 config TARGET_A4M072
bool Support a4m072
 
-config TARGET_BC3450
-   bool Support BC3450
-
 config TARGET_CANMB
bool Support canmb
 
@@ -84,7 +81,6 @@ endchoice
 
 source board/a3m071/Kconfig
 source board/a4m072/Kconfig
-source board/bc3450/Kconfig
 source board/canmb/Kconfig
 source board/cm5200/Kconfig
 source board/galaxy5200/Kconfig
diff --git a/board/bc3450/Kconfig b/board/bc3450/Kconfig
deleted file mode 100644
index a0fc19f..000
--- a/board/bc3450/Kconfig
+++ /dev/null
@@ -1,9 +0,0 @@
-if TARGET_BC3450
-
-config SYS_BOARD
-   default bc3450
-
-config SYS_CONFIG_NAME
-   default BC3450
-
-endif
diff --git a/board/bc3450/MAINTAINERS b/board/bc3450/MAINTAINERS
deleted file mode 100644
index 81a7076..000
--- a/board/bc3450/MAINTAINERS
+++ /dev/null
@@ -1,6 +0,0 @@
-BC3450 BOARD
-#M:-
-S: Maintained
-F: board/bc3450/
-F: include/configs/BC3450.h
-F: configs/BC3450_defconfig
diff --git a/board/bc3450/Makefile b/board/bc3450/Makefile
deleted file mode 100644
index b8d22ba..000
--- a/board/bc3450/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# (C) Copyright 2003-2006
-# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-
-obj-y  := bc3450.o cmd_bc3450.o
diff --git a/board/bc3450/bc3450.c b/board/bc3450/bc3450.c
deleted file mode 100644
index a5c6d75..000
--- a/board/bc3450/bc3450.c
+++ /dev/null
@@ -1,586 +0,0 @@
-/*
- * (C) Copyright 2003-2004
- * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
- *
- * (C) Copyright 2004
- * Mark Jonas, Freescale Semiconductor, mark.jo...@motorola.com.
- *
- * (C) Copyright 2004-2005
- * Martin Krause, TQ-Systems GmbH, martin.kra...@tqs.de
- *
- * (C) Copyright 2006
- * Stefan Strobl, GERSYS GmbH, stefan.str...@gersys.de
- *
- * SPDX-License-Identifier:GPL-2.0+
- */
-
-#include common.h
-#include mpc5xxx.h
-#include pci.h
-#include netdev.h
-
-#ifdef CONFIG_VIDEO_SM501
-#include sm501.h
-#endif
-
-#if defined(CONFIG_MPC5200_DDR)
-#include mt46v16m16-75.h
-#else
-#include mt48lc16m16a2-75.h
-#endif
-
-#ifdef CONFIG_RTC_MPC5200
-#include rtc.h
-#endif
-
-#ifdef CONFIG_PS2MULT
-void ps2mult_early_init(void);
-#endif
-
-#ifndef CONFIG_SYS_RAMBOOT
-static void sdram_start (int hi_addr)
-{
-   long hi_addr_bit = hi_addr ? 0x0100 : 0;
-
-   /* unlock mode register */
-   *(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x8000 |
-   hi_addr_bit;
-   __asm__ volatile (sync);
-
-   /* precharge all banks */
-   *(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x8002 |
-   hi_addr_bit;
-   __asm__ volatile (sync);
-
-#if SDRAM_DDR
-   /* set mode register: extended mode */
-   *(vu_long *)MPC5XXX_SDRAM_MODE = SDRAM_EMODE;
-   __asm__ volatile (sync);
-
-   /* set mode register: reset DLL */
-   *(vu_long *)MPC5XXX_SDRAM_MODE = SDRAM_MODE | 0x0400;
-   __asm__ volatile (sync);
-#endif
-
-   /* precharge all banks */
-   *(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x8002 |
-   hi_addr_bit;
-   __asm__ volatile (sync);
-
-   /* auto refresh */
-   *(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x8004 |
-   hi_addr_bit;
-   __asm__ volatile (sync);
-
-   /* set mode register */
-   *(vu_long *)MPC5XXX_SDRAM_MODE = SDRAM_MODE;
-   __asm__ volatile (sync);
-
-   /* normal operation */
-   *(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | hi_addr_bit;
-   __asm__ volatile (sync);
-}
-#endif
-
-/*
- * ATTENTION: Although partially referenced initdram does NOT make real use
- *  

[U-Boot] [PATCH 3/7] powerpc: mpc5xxx: remove aev, TB5200 board support

2015-03-16 Thread Masahiro Yamada
They have not been converted to Generic Board, so should be removed.
(See doc/README.generic-board for details.)

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
---

 arch/powerpc/cpu/mpc5xxx/Kconfig |   6 -
 board/tqc/tqm5200/Kconfig|  26 --
 board/tqc/tqm5200/MAINTAINERS|   3 -
 board/tqc/tqm5200/Makefile   |   2 +-
 board/tqc/tqm5200/cmd_tb5200.c   |  88 ---
 board/tqc/tqm5200/tqm5200.c  |  12 +-
 configs/TB5200_B_defconfig   |   4 -
 configs/TB5200_defconfig |   3 -
 configs/aev_defconfig|   3 -
 doc/README.scrapyard |   2 +
 include/configs/TB5200.h | 496 ---
 include/configs/aev.h| 390 --
 12 files changed, 4 insertions(+), 1031 deletions(-)
 delete mode 100644 board/tqc/tqm5200/cmd_tb5200.c
 delete mode 100644 configs/TB5200_B_defconfig
 delete mode 100644 configs/TB5200_defconfig
 delete mode 100644 configs/aev_defconfig
 delete mode 100644 include/configs/TB5200.h
 delete mode 100644 include/configs/aev.h

diff --git a/arch/powerpc/cpu/mpc5xxx/Kconfig b/arch/powerpc/cpu/mpc5xxx/Kconfig
index 1b81fb5..e2d48f3 100644
--- a/arch/powerpc/cpu/mpc5xxx/Kconfig
+++ b/arch/powerpc/cpu/mpc5xxx/Kconfig
@@ -65,15 +65,9 @@ config TARGET_DIGSY_MTC
 config TARGET_PCM030
bool Support pcm030
 
-config TARGET_AEV
-   bool Support aev
-
 config TARGET_CHARON
bool Support charon
 
-config TARGET_TB5200
-   bool Support TB5200
-
 config TARGET_TQM5200
bool Support TQM5200
 
diff --git a/board/tqc/tqm5200/Kconfig b/board/tqc/tqm5200/Kconfig
index 0e4cd69..738dc80 100644
--- a/board/tqc/tqm5200/Kconfig
+++ b/board/tqc/tqm5200/Kconfig
@@ -1,16 +1,3 @@
-if TARGET_AEV
-
-config SYS_BOARD
-   default tqm5200
-
-config SYS_VENDOR
-   default tqc
-
-config SYS_CONFIG_NAME
-   default aev
-
-endif
-
 if TARGET_CHARON
 
 config SYS_BOARD
@@ -24,19 +11,6 @@ config SYS_CONFIG_NAME
 
 endif
 
-if TARGET_TB5200
-
-config SYS_BOARD
-   default tqm5200
-
-config SYS_VENDOR
-   default tqc
-
-config SYS_CONFIG_NAME
-   default TB5200
-
-endif
-
 if TARGET_TQM5200
 
 config SYS_BOARD
diff --git a/board/tqc/tqm5200/MAINTAINERS b/board/tqc/tqm5200/MAINTAINERS
index d3eb543..12d143d 100644
--- a/board/tqc/tqm5200/MAINTAINERS
+++ b/board/tqc/tqm5200/MAINTAINERS
@@ -9,9 +9,6 @@ F:  configs/cam5200_defconfig
 F: configs/cam5200_niosflash_defconfig
 F: configs/fo300_defconfig
 F: configs/MiniFAP_defconfig
-F: include/configs/TB5200.h
-F: configs/TB5200_defconfig
-F: configs/TB5200_B_defconfig
 F: configs/TQM5200_defconfig
 F: configs/TQM5200_B_defconfig
 F: configs/TQM5200_B_HIGHBOOT_defconfig
diff --git a/board/tqc/tqm5200/Makefile b/board/tqc/tqm5200/Makefile
index 80c1eba..f7c97b7 100644
--- a/board/tqc/tqm5200/Makefile
+++ b/board/tqc/tqm5200/Makefile
@@ -5,4 +5,4 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
 
-obj-y  := tqm5200.o cmd_stk52xx.o cmd_tb5200.o cam5200_flash.o
+obj-y  := tqm5200.o cmd_stk52xx.o cam5200_flash.o
diff --git a/board/tqc/tqm5200/cmd_tb5200.c b/board/tqc/tqm5200/cmd_tb5200.c
deleted file mode 100644
index 876258d..000
--- a/board/tqc/tqm5200/cmd_tb5200.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * (C) Copyright 2005 - 2006
- * Martin Krause, TQ-Systems GmbH, martin.kra...@tqs.de.
- *
- * SPDX-License-Identifier:GPL-2.0+
- */
-
-/*
- * TB5200 specific functions
- */
-/*#define DEBUG*/
-
-#include common.h
-#include command.h
-
-#if defined(CONFIG_CMD_BSP)
-#if defined (CONFIG_TB5200)
-
-#define SM501_PANEL_DISPLAY_CONTROL0x0008UL
-
-static void led_init(void)
-{
-   struct mpc5xxx_gpt_0_7 *gpt = (struct mpc5xxx_gpt_0_7 *)MPC5XXX_GPT;
-
-   /* configure timer 4 for simple GPIO output */
-   gpt-gpt4.emsr |=  0x0024;
-}
-
-int cmd_led(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
-{
-   struct mpc5xxx_gpt_0_7 *gpt = (struct mpc5xxx_gpt_0_7 *)MPC5XXX_GPT;
-
-   led_init();
-
-   if (strcmp (argv[1], on) == 0) {
-   debug (switch status LED on\n);
-   gpt-gpt4.emsr |=  (1  4);
-   } else if (strcmp (argv[1], off) == 0) {
-   debug (switch status LED off\n);
-   gpt-gpt4.emsr =  ~(1  4);
-   } else {
-   printf (Usage:\nled on/off\n);
-   return 1;
-   }
-
-   return 0;
-}
-
-static void sm501_backlight (unsigned int state)
-{
-   if (state == 1) {
-   *(vu_long *)(SM501_MMIO_BASE+SM501_PANEL_DISPLAY_CONTROL) |=
-   (1  26) | (1  27);
-   } else if (state == 0)
-   *(vu_long *)(SM501_MMIO_BASE+SM501_PANEL_DISPLAY_CONTROL) =
-   ~((1  26) | (1  27));
-}
-
-int cmd_backlight(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
-{
-   if (strcmp (argv[1], on) == 0) {
-   debug (switch backlight on\n);
-   sm501_backlight (1);
-

[U-Boot] [PATCH 5/7] powerpc: mpc5xxx: remove galaxy5200 board support

2015-03-16 Thread Masahiro Yamada
This has not been converted to Generic Board, so should be removed.
(See doc/README.generic-board for details.)

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
Cc: Eric Millbrandt emillbra...@dekaresearch.com
---

 arch/powerpc/cpu/mpc5xxx/Kconfig |   4 -
 board/galaxy5200/Kconfig |   9 -
 board/galaxy5200/MAINTAINERS |   7 -
 board/galaxy5200/Makefile|   8 -
 board/galaxy5200/galaxy5200.c| 185 ---
 configs/galaxy5200_LOWBOOT_defconfig |   4 -
 configs/galaxy5200_defconfig |   4 -
 doc/README.scrapyard |   1 +
 include/configs/galaxy5200.h | 431 ---
 9 files changed, 1 insertion(+), 652 deletions(-)
 delete mode 100644 board/galaxy5200/Kconfig
 delete mode 100644 board/galaxy5200/MAINTAINERS
 delete mode 100644 board/galaxy5200/Makefile
 delete mode 100644 board/galaxy5200/galaxy5200.c
 delete mode 100644 configs/galaxy5200_LOWBOOT_defconfig
 delete mode 100644 configs/galaxy5200_defconfig
 delete mode 100644 include/configs/galaxy5200.h

diff --git a/arch/powerpc/cpu/mpc5xxx/Kconfig b/arch/powerpc/cpu/mpc5xxx/Kconfig
index e2d48f3..eec9d7d 100644
--- a/arch/powerpc/cpu/mpc5xxx/Kconfig
+++ b/arch/powerpc/cpu/mpc5xxx/Kconfig
@@ -20,9 +20,6 @@ config TARGET_CANMB
 config TARGET_CM5200
bool Support cm5200
 
-config TARGET_GALAXY5200
-   bool Support galaxy5200
-
 config TARGET_INKA4X0
bool Support inka4x0
 
@@ -77,7 +74,6 @@ source board/a3m071/Kconfig
 source board/a4m072/Kconfig
 source board/canmb/Kconfig
 source board/cm5200/Kconfig
-source board/galaxy5200/Kconfig
 source board/ifm/o2dnt2/Kconfig
 source board/inka4x0/Kconfig
 source board/intercontrol/digsy_mtc/Kconfig
diff --git a/board/galaxy5200/Kconfig b/board/galaxy5200/Kconfig
deleted file mode 100644
index 3103581..000
--- a/board/galaxy5200/Kconfig
+++ /dev/null
@@ -1,9 +0,0 @@
-if TARGET_GALAXY5200
-
-config SYS_BOARD
-   default galaxy5200
-
-config SYS_CONFIG_NAME
-   default galaxy5200
-
-endif
diff --git a/board/galaxy5200/MAINTAINERS b/board/galaxy5200/MAINTAINERS
deleted file mode 100644
index 614625d..000
--- a/board/galaxy5200/MAINTAINERS
+++ /dev/null
@@ -1,7 +0,0 @@
-GALAXY5200 BOARD
-#M:Eric Millbrandt emillbra...@dekaresearch.com
-S: Orphan (since 2014-06)
-F: board/galaxy5200/
-F: include/configs/galaxy5200.h
-F: configs/galaxy5200_defconfig
-F: configs/galaxy5200_LOWBOOT_defconfig
diff --git a/board/galaxy5200/Makefile b/board/galaxy5200/Makefile
deleted file mode 100644
index e0fcd39..000
--- a/board/galaxy5200/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# (C) Copyright 2003-2007
-# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-
-obj-y  := galaxy5200.o
diff --git a/board/galaxy5200/galaxy5200.c b/board/galaxy5200/galaxy5200.c
deleted file mode 100644
index 5d957b7..000
--- a/board/galaxy5200/galaxy5200.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * (C) Copyright 2003
- * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
- *
- * (C) Copyright 2004
- * Mark Jonas, Freescale Semiconductor, mark.jo...@motorola.com.
- *
- * (C) Copyright 2006
- * Eric Schumann, Phytec Messtechnik GmbH
- *
- * (C) Copyright 2009
- * Eric Millbrandt, DEKA Research and Development Corporation
- *
- * SPDX-License-Identifier:GPL-2.0+
- */
-
-#include common.h
-#include mpc5xxx.h
-#include pci.h
-#include asm/io.h
-
-#ifndef CONFIG_SYS_RAMBOOT
-static void sdram_start(int hi_addr)
-{
-   volatile struct mpc5xxx_cdm *cdm =
-   (struct mpc5xxx_cdm *)MPC5XXX_CDM;
-   volatile struct mpc5xxx_sdram *sdram =
-   (struct mpc5xxx_sdram *)MPC5XXX_SDRAM;
-
-   long hi_addr_bit = hi_addr ? 0x0100 : 0;
-
-   /* unlock mode register */
-   out_be32 (sdram-ctrl,
-   (SDRAM_CONTROL | 0x8000 | hi_addr_bit));
-
-   /* precharge all banks */
-   out_be32 (sdram-ctrl,
-   (SDRAM_CONTROL | 0x8002 | hi_addr_bit));
-
-#ifdef SDRAM_DDR
-   /* set mode register: extended mode */
-   out_be32 (sdram-mode, (SDRAM_EMODE));
-
-   /* set mode register: reset DLL */
-   out_be32 (sdram-mode, (SDRAM_MODE | 0x0400));
-#endif
-
-   /* precharge all banks */
-   out_be32 (sdram-ctrl,
-   (SDRAM_CONTROL | 0x8002 | hi_addr_bit));
-
-   /* auto refresh */
-   out_be32 (sdram-ctrl,
-   (SDRAM_CONTROL | 0x8004 | hi_addr_bit));
-
-   /* set mode register */
-   out_be32 (sdram-mode, (SDRAM_MODE));
-
-   /* normal operation */
-   out_be32 (sdram-ctrl,
-   (SDRAM_CONTROL | hi_addr_bit));
-
-   /* set CDM clock enable register, set MPC5200B SDRAM bus */
-   /* to reduced driver strength */
-   out_be32 (cdm-clock_enable, (0x00CF));
-}
-#endif
-
-/*
- * ATTENTION: Although partially referenced initdram does NOT make
- * real use of 

Re: [U-Boot] [PATCH 6/7] ARM: bcm283x: merge BCM2835/BCM2836 directories into mach-bcm283x

2015-03-16 Thread Stephen Warren
On 03/16/2015 04:35 AM, Masahiro Yamada wrote:
 BCM2835 (used on Raspberry Pi) and BCM2836 (used on Raspberry Pi 2)
 are similar enough.  One of the biggest differences is the ARM
 processor.  It is reasonable to collect the source files into a
 single place, arch/arm/mach-bcm283x/.

 diff --git a/arch/arm/cpu/arm1176/bcm2835/Makefile 
 b/arch/arm/mach-bcm283x/Makefile

 -obj-y:= lowlevel_init.o
 +obj-$(CONFIG_TARGET_RPI) += lowlevel_init.o
  obj-y+= init.o reset.o timer.o mbox.o

Why is only one file conditional; shouldn't they all be either -y or
-$(CONFIG_TARGET_RPI)?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v5 0/8] Extend LPC32xx functionality and add LPC32xx-based work_92015 board

2015-03-16 Thread Albert ARIBAUD
Hello Simon,

On Mon, 16 Mar 2015 11:40:54 -0600, Simon Glass s...@chromium.org
wrote:
 Hi Anish,
 
 On 16 March 2015 at 10:28, Anish Khurana anish.khurana130...@gmail.com 
 wrote:
  Hi Simon,
 
  can you please share the git branch so that I can also review it. I am
  writing for LPC2148 board.
 
 This is Albert's work. Once he shares if I am sure it will be public.

Since this is a derivative of the patch series I've posted here, I
could hardly see a problem in making it public anyway.

I've pushed the broken series, the one with I2C DM and COMPAT, as
branch dm-i2c of repo u-boot-arm. Anyone feel free to fiddle with
it.

 Regards,
 Simon

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


Re: [U-Boot] [PATCH 2/3] vexpress64: juno: add default NOR flash boot

2015-03-16 Thread Tom Rini
On Mon, Mar 16, 2015 at 01:23:52PM +0100, Linus Walleij wrote:

 This modifies the vexpress64 Juno configuration so that
 it will by default load and boot a kernel and a device tree
 from the images stored in the NOR flash. When we are
 at it, also define the proper command line for the Juno and
 indicate that the USB stick (/dev/sda1) is the default
 root file system.
 
 Signed-off-by: Linus Walleij linus.wall...@linaro.org

Reviewed-by: Tom Rini tr...@konsulko.com

-- 
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] [PATCH 1/3] common/armflash: Support for ARM flash images

2015-03-16 Thread Tom Rini
On Mon, Mar 16, 2015 at 01:23:51PM +0100, Linus Walleij wrote:

 The ARM reference designs all use a special flash image format
 that stores a footer (two versions exist) at the end of the last
 erase block of the image in flash memory.
 
 Version one of the footer is indicated by the magic number
 0xA09F at 12 bytes before the end of the flash block and
 version two is indicated by the magic number 0x464F4F54 0x464C5348
 (ASCII for FLSHFOOT) in the very last 8 bytes of the erase block.
 
 This command driver implements support for both versions of the
 AFS images (the name comes from the Linux driver in drivers/mtd/afs.c)
 and makes it possible to list images and load an image by name into
 the memory with these commands:
 
 afs - lists flash contents
 afs load image - loads image to address indicated in the image
 afs load image addres - loads image to a specified address
 
 This image scheme is used on the ARM Integrator family, ARM
 Versatile family, ARM RealView family (not yet supported in U-Boot)
 and ARM Versatile Express family up to and including the new
 Juno board for 64 bit development.
 
 Signed-off-by: Linus Walleij linus.wall...@linaro.org

Reviewed-by: Tom Rini tr...@konsulko.com

-- 
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] [PATCH 3/3] integrator: consolidate flash info

2015-03-16 Thread Tom Rini
On Mon, Mar 16, 2015 at 01:23:53PM +0100, Linus Walleij wrote:

 This consolidates the flash settings for the Integrator
 and activates the new ARM flash image support for them
 so images can be loaded by name from flash.
 
 Signed-off-by: Linus Walleij linus.wall...@linaro.org

Reviewed-by: Tom Rini tr...@konsulko.com

-- 
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] MIPS UHI spec

2015-03-16 Thread James Hogan
On 26/02/15 12:37, Daniel Schwierzeck wrote:
 2015-02-26 11:17 GMT+01:00 Paul Burton paul.bur...@imgtec.com:
 On Thu, Feb 19, 2015 at 01:50:23PM +, Matthew Fortune wrote:
 Hi Daniel,

 The spec for MIPS Unified Hosting Interface is available here:

 http://prplfoundation.org/wiki/MIPS_documentation

 As we have previously discussed, this is an ideal place to
 define the handover of device tree data from bootloader to
 kernel. Using a0 == -2 and defining which register(s) you
 need for the actual data will fit nicely. I'll happily
 include whatever is decided into the next version of the spec.
 
 this originates from an off-list discussion some months ago started by
 John Crispin.
 
 (CC +John, Ralf, Jonas, linux-mips)
 

 (CC +Andrew, Ezequiel, James, James)

 On the talk of DT handover, this recent patchset adding support for a
 system doing so to Linux is relevant:

 http://www.linux-mips.org/archives/linux-mips/2015-02/msg00312.html

 I'm also working on a system for which I'll need to implement DT
 handover very soon. It would be very nice if we could agree on some
 standard way of doing so (and eventually if the code on the Linux side
 can be generic enough to allow a multiplatform kernel).

 
 to be conformant with UHI I propose $a0 == -2 and $a1 == address of DT
 blob. It is a simple extension and should not interfere with the
 various legacy boot interfaces.

I was just looking at Andrew's patch:
http://patchwork.linux-mips.org/patch/9549/

How would the other registers (i.e. $a2 and $a3) be defined for this
boot interface? I'm guessing any future extensions are envisioned to use
a different negative value of $a0, in which case treating them as
unused/undefined is fine, but perhaps that should be spelt out in the
UHI spec?

Cheers
James

 
 U-Boot mainline code is almost ready for DT handover. I have prepared
 a patch [1] which completes it by implementing my proposal.
 
 [1] 
 http://git.denx.de/?p=u-boot/u-boot-mips.git;a=commitdiff;h=3464e8de491c640d14d72853a741cc367ebabc79
 



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


Re: [U-Boot] No console output once kernel starts loading.

2015-03-16 Thread Graeme Russ

Hi David,


On 05/03/15 09:46, DaveKucharczyk wrote:

I'm currently working on the kernel dtb for our MX53 board.

U-boot loads the dtb and kernel and then gets stuck at starting kernel

I've triple checked the uart pad setup in imx53.dtsi


This is probably a long shot, but I had the same issue when I did the 
original x86 port. It turned out that I had not routed the UART 
interrupt signal correctly in U-Boot - I think the Linux kernel may have 
been waiting on some kind of interrupt from the UART (probably buffer 
empty) before it sent anything to it.


Regards,


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


Re: [U-Boot] [PATCH 4/4] common/lcd_console: introduce display/framebuffer rotation

2015-03-16 Thread Igor Grinberg
On 03/16/15 10:32, Hannes Petermaier wrote:
 Hi Hannes,
 Hi Igor,
 
 +/* setup text-console */
 +debug([LCD] setting up console...\n);
 +#ifdef CONFIG_LCD_ROTATION
 +lcd_init_console(lcd_base,
 + panel_info.vl_col,
 + panel_info.vl_row,
 + panel_info.vl_rot);
   #else
 -console_rows = panel_info.vl_row / VIDEO_FONT_HEIGHT;
 +lcd_init_console(lcd_base,
 + panel_info.vl_col,
 + panel_info.vl_row,
 + 0);
   #endif
 Please, don't start the #ifdef mess here...
 just always pass the panel_info.vl_rot.
 This is not possible, because 'vl_rot' does'nt exist if
 CONFIG_LCD_ROTATION is not defined. (have a look into lcd.h).

 Of course I did before sending the reply...
 What I'm trying to say is - let it exist and default to 0 angle 
 rotation.

 I made this to be compatible to all who have allready initialized a
 panel_info without vl_rot.

 This increases the mess and I think is not sensible enough.
 Just change the users to initialize the panel_info with vl_rot.
 I think also that default initialization of globals is 0, right?
 If so, those users that do not initialize the vl_rot explicitly,
 should have it initialized to 0 implicitly by compiler.
 Yes, thats a good idea. I will check if the compiler really initializes 
 the global
 struct panel_info with zero and change this.
  
 [...]
   }
   +static inline void console_setrow180(u32 row, int clr)
 +{
 +int i;
 +uchar *dst = (uchar *)(cons.lcd_address +
 +   (cons.rows-row-1) * VIDEO_FONT_HEIGHT *
 +   cons.lcdsizex * PIXLBYTES);
 +
 +fbptr_t *d = (fbptr_t *)dst;
 +for (i = 0; i  (VIDEO_FONT_HEIGHT * cons.lcdsizex); i++)
 +*d++ = clr;
 +}
 +
 +static inline void console_moverow180(u32 rowdst, u32 rowsrc)
 +{
 +int i;
 +uchar *dst = (uchar *)(cons.lcd_address +
 +   (cons.rows-rowdst-1) * VIDEO_FONT_HEIGHT *
 +   cons.lcdsizex * PIXLBYTES);
 +
 +uchar *src = (uchar *)(cons.lcd_address +
 +   (cons.rows-rowsrc-1) * VIDEO_FONT_HEIGHT *
 +   cons.lcdsizex * PIXLBYTES);
 +
 +fbptr_t *pdst = (fbptr_t *)dst;
 +fbptr_t *psrc = (fbptr_t *)src;
 +for (i = 0; i  (VIDEO_FONT_HEIGHT * cons.lcdsizex); i++)
 +*pdst++ = *psrc++;
 +}
 +
 +#endif /* CONFIG_LCD_ROTATION */
 Can't this whole thing go into a separate file?
 So, the console stuff will only define weak functions which can be 
 overridden
 by the rotation functionality.
 This will keep the console code clean (also from ifdefs) and have the 
 rotation
 functionality cleanly added by a CONFIG_ symbol, which will control 
 the
 compilation for the separate file.
 Might be possible, which name should we give to it ? 
 lcd_console_rotation.c ?

 Sounds good.

 But how we deal with the function-pointer initialization ?

 I think the usual method would do...
 You call some kind of lcd_console_init_rot() with most of the code
 that you currently have in lcd_init_console() that is related to 
 rotation.
 If the CONFIG_LCD_ROTATION is not set, then the lcd_init_console() stub
 just returns the 0 rotation config.
 
 I just started to move rotation specific functions into own file, called 
 lcd_console_rotation.c and
 ran into some trouble.
 
 1) 
 I need during initialization the console_calc_rowcol(...) function, which 
 is provided by lcd.c.
 A possible solution might be to un-static it - but i am not happy with 
 this. 
 Another way could be to take up vl_rot into console_t structure and pass 
 only a pointer to structure to this function and decide inside the 
 function.
 But this would create a little mix between 0 degree and rotation code.
 Yet another idea is to have (also having pointer to console_t in call) in 
 lcd_console_rotation also such a calc function which overrides the values 
 calculated before.
 
 or maybe you've another solution ?

Well, you need to perform the rows and columns calculation regardless of
the rotation feature, so the console_calc_rowcol() should be there anyway.
It is a bonus that the rotation code can use the same function (and it
looks generic enough) for rows and columns calculation, so IMO, a cleaner
solution would be just make it non static.

 
 2)
 I need in almost every paint-function the framebuffer base 
 (cons.lcd_address) and the screen dimension.
 This information is stored in the static structure within lcd.c - i don't 
 like to make this public.
 A possible solution could be to change all painting function to work 
 without some global variable and pass
 a third argument, pointer to console_t, and take informations from there. 
 This will consume one more register
 on function call, runtime is equal i think.
 
 Whats your opinion around this ?

Well, since Nikita is working on refactoring the lcd.c stuff and
already examined several aproaches, I think he can provide a better
opinion on this.
Nikita?

 
 I would recommend extracting the 

[U-Boot] [PATCH v3] powerpc/t1023rdb: Add T1023 RDB board support

2015-03-16 Thread Shengzhou Liu
T1023RDB is a Freescale Reference Design Board that hosts the T1023 SoC.

T1023RDB board Overview
---
- T1023 SoC integrating two 64-bit e5500 cores up to 1.4GHz
- CoreNet fabric supporting coherent and noncoherent transactions with
  prioritization and bandwidth allocation
- SDRAM memory: 2GB Micron MT40A512M8HX unbuffered 32-bit DDR4 without ECC
- Accelerator: DPAA components consist of FMan, BMan, QMan, DCE and SEC
- Ethernet interfaces:
  - one 1G RGMII port on-board(RTL8211F PHY)
  - one 1G SGMII port on-board(RTL8211F PHY)
  - one 2.5G SGMII port on-board(AQR105 PHY)
- PCIe: Two Mini-PCIe connectors on-board.
- SerDes: 4 lanes up to 10.3125GHz
- NOR:  128MB S29GL01GS110TFIV10 Spansion NOR Flash
- NAND: 512MB S34MS04G200BFI000 Spansion NAND Flash
- eSPI: 64MB S25FL512SAGMFI010 Spansion SPI flash.
- USB: one Type-A USB 2.0 port with internal PHY
- eSDHC: support SD/MMC and eMMC card
- 256Kbit M24256 I2C EEPROM
- RTC: Real-time clock DS1339 on I2C bus
- UART: one serial port on-board with RJ45 connector
- Debugging: JTAG/COP for T1023 debugging

As well updated T1024RDB to add T1023RDB.

Signed-off-by: Shengzhou Liu shengzhou@freescale.com
---
v3: updated readme.
v2: updated the printout of serdes refclk.

 board/freescale/t102xrdb/Makefile   |  2 +-
 board/freescale/t102xrdb/README | 96 ++---
 board/freescale/t102xrdb/eth_t102xrdb.c | 23 ++--
 board/freescale/t102xrdb/t1023_rcw.cfg  |  8 +++
 board/freescale/t102xrdb/t102xrdb.c | 93 ++--
 board/freescale/t102xrdb/t102xrdb.h |  4 +-
 include/configs/T102xRDB.h  | 73 +
 7 files changed, 262 insertions(+), 37 deletions(-)
 create mode 100644 board/freescale/t102xrdb/t1023_rcw.cfg

diff --git a/board/freescale/t102xrdb/Makefile 
b/board/freescale/t102xrdb/Makefile
index a0cf8f6..0520066 100644
--- a/board/freescale/t102xrdb/Makefile
+++ b/board/freescale/t102xrdb/Makefile
@@ -8,7 +8,7 @@ ifdef CONFIG_SPL_BUILD
 obj-y += spl.o
 else
 obj-y   += t102xrdb.o
-obj-y   += cpld.o
+obj-$(CONFIG_T1024RDB)   += cpld.o
 obj-y   += eth_t102xrdb.o
 obj-$(CONFIG_PCI)   += pci.o
 endif
diff --git a/board/freescale/t102xrdb/README b/board/freescale/t102xrdb/README
index 2b17f50..35edfbd 100644
--- a/board/freescale/t102xrdb/README
+++ b/board/freescale/t102xrdb/README
@@ -98,6 +98,29 @@ T1024RDB board Overview
  - Four I2C ports
 
 
+T1023RDB board Overview
+---
+- T1023 SoC integrating two 64-bit e5500 cores up to 1.4GHz
+- CoreNet fabric supporting coherent and noncoherent transactions with
+  prioritization and bandwidth allocation
+- SDRAM memory: 2GB Micron MT40A512M8HX unbuffered 32-bit DDR4 w/o ECC
+- Accelerator: DPAA components consist of FMan, BMan, QMan, DCE and SEC
+- Ethernet interfaces:
+  - one 1G RGMII port on-board(RTL8211FS PHY)
+  - one 1G SGMII port on-board(RTL8211FS PHY)
+  - one 2.5G SGMII port on-board(AQR105 PHY)
+- PCIe: Two Mini-PCIe connectors on-board.
+- SerDes: 4 lanes up to 10.3125GHz
+- NOR:  128MB S29GL01GS110TFIV10 Spansion NOR Flash
+- NAND: 512MB S34MS04G200BFI000 Spansion NAND Flash
+- eSPI: 64MB S25FL512SAGMFI010 Spansion SPI flash.
+- USB: one Type-A USB 2.0 port with internal PHY
+- eSDHC: support SD/MMC and eMMC card
+- 256Kbit M24256 I2C EEPROM
+- RTC: Real-time clock DS1339U on I2C bus
+- UART: one serial port on-board with RJ45 connector
+- Debugging: JTAG/COP for T1023 debugging
+
 Memory map on T1024RDB
 --
 Start Address  End Address  DescriptionSize
@@ -124,22 +147,32 @@ Start Address   End Address Definition
Max size
 0xEFF2  0xEFF3  u-boot env (current bank)  128KB
 0xEFF0  0xEFF1  FMAN Ucode (current bank)  128KB
 0xEFE0  0xEFE3  QE firmware (current bank) 256KB
-0xED30  0xEFEF  rootfs (alt bank)  44MB
+0xED30  0xEFDF  rootfs (alt bank)  44MB
+0xED00  0xED2F  Guest image #3 (alternate bank) 3MB
+0xECD0  0xECFF  Guest image #2 (alternate bank) 3MB
+0xECA0 0xECCF  Guest image #1 (alternate bank) 3MB
+0xEC90 0xEC9F  HV config device tree(alt bank) 1MB
 0xEC80  0xEC8F  Hardware device tree (alt bank) 1MB
-0xEC02  0xEC7F  Linux.uImage (alt bank)7MB + 
875KB
+0xEC70 0xEC7F  HV.uImage (alternate bank)  1MB
+0xEC02  0xEC6F  Linux.uImage (alt bank)~7MB
 0xEC00  0xEC01  RCW (alt bank) 128KB
 0xEBF4  0xEBFF  u-boot (alt bank)  768KB
 0xEBF2  0xEBF3  u-boot env (alt bank)  128KB
 0xEBF0  0xEBF1  FMAN ucode (alt bank)  128KB
 0xEBE0  0xEBE3  QE firmware (alt bank) 256KB
-0xE930  

Re: [U-Boot] MIPS UHI spec

2015-03-16 Thread Matthew Fortune
James Hogan james.ho...@imgtec.com writes:
 On 26/02/15 12:37, Daniel Schwierzeck wrote:
  2015-02-26 11:17 GMT+01:00 Paul Burton paul.bur...@imgtec.com:
  On Thu, Feb 19, 2015 at 01:50:23PM +, Matthew Fortune wrote:
  Hi Daniel,
 
  The spec for MIPS Unified Hosting Interface is available here:
 
  http://prplfoundation.org/wiki/MIPS_documentation
 
  As we have previously discussed, this is an ideal place to define
  the handover of device tree data from bootloader to kernel. Using a0
  == -2 and defining which register(s) you need for the actual data
  will fit nicely. I'll happily include whatever is decided into the
  next version of the spec.
 
  this originates from an off-list discussion some months ago started by
  John Crispin.
 
  (CC +John, Ralf, Jonas, linux-mips)
 
 
  (CC +Andrew, Ezequiel, James, James)
 
  On the talk of DT handover, this recent patchset adding support for a
  system doing so to Linux is relevant:
 
 
  http://www.linux-mips.org/archives/linux-mips/2015-02/msg00312.html
 
  I'm also working on a system for which I'll need to implement DT
  handover very soon. It would be very nice if we could agree on some
  standard way of doing so (and eventually if the code on the Linux
  side can be generic enough to allow a multiplatform kernel).
 
 
  to be conformant with UHI I propose $a0 == -2 and $a1 == address of DT
  blob. It is a simple extension and should not interfere with the
  various legacy boot interfaces.
 
 I was just looking at Andrew's patch:
 http://patchwork.linux-mips.org/patch/9549/
 
 How would the other registers (i.e. $a2 and $a3) be defined for this
 boot interface? I'm guessing any future extensions are envisioned to use
 a different negative value of $a0, in which case treating them as
 unused/undefined is fine, but perhaps that should be spelt out in the
 UHI spec?

Sounds sensible. Making it explicit may help prevent anyone extending this
and presuming that they can give meaning to one of the unused registers.

Did anyone come to a conclusion on physical vs virtual address for the
DTB? I forgot to reply to the thread, I would have thought the KSEG0
address would be the obvious choice so that it is immediately usable from
ordinary memory accesses. However, that is only because I don't follow how
the kernel would benefit from being given a physical address. It can't be
remapped except for the case of segmentation control (I believe) so there
seems little risk in using KSEG0.

Thanks,
Matthew

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


[U-Boot] [PATCH 2/3] vexpress64: juno: add default NOR flash boot

2015-03-16 Thread Linus Walleij
This modifies the vexpress64 Juno configuration so that
it will by default load and boot a kernel and a device tree
from the images stored in the NOR flash. When we are
at it, also define the proper command line for the Juno and
indicate that the USB stick (/dev/sda1) is the default
root file system.

Signed-off-by: Linus Walleij linus.wall...@linaro.org
---
 include/configs/vexpress_aemv8a.h | 32 ++--
 1 file changed, 30 insertions(+), 2 deletions(-)

diff --git a/include/configs/vexpress_aemv8a.h 
b/include/configs/vexpress_aemv8a.h
index 810eef12deb1..e6fc2aeea2b8 100644
--- a/include/configs/vexpress_aemv8a.h
+++ b/include/configs/vexpress_aemv8a.h
@@ -198,14 +198,41 @@
 #define CONFIG_SYS_SDRAM_BASE  PHYS_SDRAM_1
 
 /* Initial environment variables */
-#ifdef CONFIG_TARGET_VEXPRESS64_BASE_FVP
+#ifdef CONFIG_TARGET_VEXPRESS64_JUNO
+/*
+ * Defines where the kernel and FDT exist in NOR flash and where it will
+ * be copied into DRAM
+ */
+#define CONFIG_EXTRA_ENV_SETTINGS  \
+   kernel_name=Image\0   \
+   kernel_addr=0x8000\0 \
+   fdt_name=juno\0 \
+   fdt_addr=0x8300\0 \
+   fdt_high=0x\0 \
+   initrd_high=0x\0 \
+
+/* Assume we boot with root on the first partition of a USB stick */
+#define CONFIG_BOOTARGSconsole=ttyAMA0,115200n8  \
+   root=/dev/sda1 rw  \
+   earlyprintk=pl011,0x7ff8 debug 
user_debug=31 \
+   loglevel=9
+
+/* Copy the kernel and FDT to DRAM memory and boot */
+#define CONFIG_BOOTCOMMAND afs load ${kernel_name} ${kernel_addr} ;  \
+   afs load  ${fdt_name} ${fdt_addr} ;  \
+   fdt addr ${fdt_addr}; fdt resize;  \
+   booti ${kernel_addr} - ${fdt_addr}
+
+#define CONFIG_BOOTDELAY   1
+
+#elif CONFIG_TARGET_VEXPRESS64_BASE_FVP
 #define CONFIG_EXTRA_ENV_SETTINGS  \
kernel_name=uImage\0  \
kernel_addr_r=0x8000\0\
initrd_name=ramdisk.img\0 \
initrd_addr_r=0x8800\0\
fdt_name=devtree.dtb\0\
-   fdt_addr_r=0x8300\0   \
+   fdt_addr_r=0x8300\0 \
fdt_high=0x\0 \
initrd_high=0x\0
 
@@ -253,6 +280,7 @@
 #define CONFIG_SYS_NO_FLASH
 #else
 #define CONFIG_CMD_FLASH
+#define CONFIG_CMD_ARMFLASH
 #define CONFIG_SYS_FLASH_CFI   1
 #define CONFIG_FLASH_CFI_DRIVER1
 #define CONFIG_SYS_FLASH_BASE  0x0800
-- 
1.9.3

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


[U-Boot] [PATCH 1/3] common/armflash: Support for ARM flash images

2015-03-16 Thread Linus Walleij
The ARM reference designs all use a special flash image format
that stores a footer (two versions exist) at the end of the last
erase block of the image in flash memory.

Version one of the footer is indicated by the magic number
0xA09F at 12 bytes before the end of the flash block and
version two is indicated by the magic number 0x464F4F54 0x464C5348
(ASCII for FLSHFOOT) in the very last 8 bytes of the erase block.

This command driver implements support for both versions of the
AFS images (the name comes from the Linux driver in drivers/mtd/afs.c)
and makes it possible to list images and load an image by name into
the memory with these commands:

afs - lists flash contents
afs load image - loads image to address indicated in the image
afs load image addres - loads image to a specified address

This image scheme is used on the ARM Integrator family, ARM
Versatile family, ARM RealView family (not yet supported in U-Boot)
and ARM Versatile Express family up to and including the new
Juno board for 64 bit development.

Signed-off-by: Linus Walleij linus.wall...@linaro.org
---
 common/Kconfig|   6 ++
 common/Makefile   |   1 +
 common/cmd_armflash.c | 279 ++
 3 files changed, 286 insertions(+)
 create mode 100644 common/cmd_armflash.c

diff --git a/common/Kconfig b/common/Kconfig
index e66277430459..4cde4b004880 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -193,6 +193,12 @@ config CMD_FLASH
erase - FLASH memory
protect - enable or disable FLASH write protection
 
+config CMD_ARMFLASH
+   depends on FLASH_CFI_DRIVER
+   bool armflash
+   help
+ ARM Ltd reference designs flash partition access
+
 config CMD_NAND
bool nand
help
diff --git a/common/Makefile b/common/Makefile
index 7216a1392230..252fbf194b0e 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -60,6 +60,7 @@ obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
 # command
 obj-$(CONFIG_CMD_AES) += cmd_aes.o
 obj-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o
+obj-$(CONFIG_CMD_ARMFLASH) += cmd_armflash.o
 obj-$(CONFIG_SOURCE) += cmd_source.o
 obj-$(CONFIG_CMD_SOURCE) += cmd_source.o
 obj-$(CONFIG_CMD_BDI) += cmd_bdinfo.o
diff --git a/common/cmd_armflash.c b/common/cmd_armflash.c
new file mode 100644
index ..d848a2769347
--- /dev/null
+++ b/common/cmd_armflash.c
@@ -0,0 +1,279 @@
+/*
+ * (C) Copyright 2015
+ * Linus Walleij, Linaro
+ *
+ * Support for ARM Flash Partitions
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+#include common.h
+#include command.h
+#include asm/io.h
+
+#define MAX_REGIONS 4
+#define MAX_IMAGES 32
+
+struct afs_region {
+   u32 load_address;
+   u32 size;
+   u32 offset;
+};
+
+struct afs_image {
+   flash_info_t *flinfo;
+   const char *name;
+   u32 version;
+   u32 entrypoint;
+   u32 attributes;
+   u32 region_count;
+   struct afs_region regions[MAX_REGIONS];
+   ulong flash_mem_start;
+   ulong flash_mem_end;
+};
+
+static struct afs_image afs_images[MAX_IMAGES];
+static int num_afs_images;
+
+static u32 compute_crc(ulong start, u32 len)
+{
+   u32 sum = 0;
+   int i;
+
+   if (len % 4 != 0) {
+   printf(bad checksumming\n);
+   return 0;
+   }
+
+   for (i = 0; i  len; i += 4) {
+   u32 val;
+
+   val = readl((void *)start + i);
+   if (val  ~sum)
+   sum++;
+   sum += val;
+   }
+   return ~sum;
+}
+
+static void parse_bank(ulong bank)
+{
+   int i;
+   ulong flstart, flend;
+   flash_info_t *info;
+
+   info = flash_info[bank];
+   if (info-flash_id != FLASH_MAN_CFI) {
+   printf(Bank %lu: missing or unknown FLASH type\n, bank);
+   return;
+   }
+   if (!info-sector_count) {
+   printf(Bank %lu: no FLASH sectors\n, bank);
+   return;
+   }
+
+   flstart = info-start[0];
+   flend = flstart + info-size;
+
+   for (i = 0; i  info-sector_count; ++i) {
+   ulong secstart, secend;
+   u32 foot1, foot2;
+
+   if (ctrlc())
+   break;
+
+   secstart = info-start[i];
+   if (i == info-sector_count-1)
+   secend = flend;
+   else
+   secend = info-start[i+1];
+
+   /* Check for v1 header */
+   foot1 = readl((void *)secend - 0x0c);
+   if (foot1 == 0xA09FU) {
+   struct afs_image *afi = afs_images[num_afs_images];
+   ulong imginfo;
+
+   afi-flinfo = info;
+   afi-version = 1;
+   afi-flash_mem_start = readl((void *)secend - 0x10);
+   afi-flash_mem_end = readl((void *)secend - 0x14);
+   afi-attributes = readl((void *)secend - 0x08);

[U-Boot] [PATCH 3/3] integrator: consolidate flash info

2015-03-16 Thread Linus Walleij
This consolidates the flash settings for the Integrator
and activates the new ARM flash image support for them
so images can be loaded by name from flash.

Signed-off-by: Linus Walleij linus.wall...@linaro.org
---
 include/configs/integrator-common.h | 22 ++
 include/configs/integratorap.h  | 16 +++-
 include/configs/integratorcp.h  | 22 ++
 3 files changed, 27 insertions(+), 33 deletions(-)

diff --git a/include/configs/integrator-common.h 
b/include/configs/integrator-common.h
index eac517aeeb1c..4362925ae1e1 100644
--- a/include/configs/integrator-common.h
+++ b/include/configs/integrator-common.h
@@ -86,3 +86,25 @@
CONFIG_SYS_INIT_RAM_SIZE - \
GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_GBL_DATA_OFFSET
+
+/*
+ * FLASH and environment organization
+ * Top varies according to amount fitted
+ * Reserve top 4 blocks of flash
+ * - ARM Boot Monitor
+ * - Unused
+ * - SIB block
+ * - U-Boot environment
+ */
+#define CONFIG_CMD_FLASH
+#define CONFIG_CMD_ARMFLASH
+#define CONFIG_SYS_FLASH_CFI   1
+#define CONFIG_FLASH_CFI_DRIVER1
+#define CONFIG_SYS_FLASH_BASE  0x2400
+#define CONFIG_SYS_MAX_FLASH_BANKS 1
+
+/* Timeout values in ticks */
+#define CONFIG_SYS_FLASH_ERASE_TOUT(2 * CONFIG_SYS_HZ) /* Erase Timeout */
+#define CONFIG_SYS_FLASH_WRITE_TOUT(2 * CONFIG_SYS_HZ) /* Write Timeout */
+#define CONFIG_SYS_FLASH_PROTECTION/* The devices have real protection */
+#define CONFIG_SYS_FLASH_EMPTY_INFO/* flinfo indicates empty blocks */
diff --git a/include/configs/integratorap.h b/include/configs/integratorap.h
index edea769a921d..e168c8c9ba57 100644
--- a/include/configs/integratorap.h
+++ b/include/configs/integratorap.h
@@ -55,22 +55,12 @@
  */
 #define CONFIG_SYS_PROMPT  Integrator-AP #   /* Monitor Command 
Prompt   */
 
-#define CONFIG_SYS_FLASH_BASE  0x2400
-
-/*---
- * FLASH and environment organization
- */
-#define CONFIG_SYS_FLASH_CFI   1
-#define CONFIG_FLASH_CFI_DRIVER1
-#define CONFIG_ENV_IS_NOWHERE
-#define CONFIG_SYS_MAX_FLASH_BANKS 1   /* max number of memory 
banks */
-/* timeout values are in ticks */
-#define CONFIG_SYS_FLASH_ERASE_TOUT(2*CONFIG_SYS_HZ)   /* Timeout for 
Flash Erase */
-#define CONFIG_SYS_FLASH_WRITE_TOUT(2*CONFIG_SYS_HZ)   /* Timeout for 
Flash Write */
+/* Flash settings */
+#define CONFIG_SYS_FLASH_SIZE  0x0200 /* 32 MiB */
 #define CONFIG_SYS_MAX_FLASH_SECT  128
+#define CONFIG_ENV_IS_NOWHERE  1
 #define CONFIG_ENV_SIZE32768
 
-
 /*---
  * PCI definitions
  */
diff --git a/include/configs/integratorcp.h b/include/configs/integratorcp.h
index 608719a7eacb..7c1ef2483ea2 100644
--- a/include/configs/integratorcp.h
+++ b/include/configs/integratorcp.h
@@ -55,28 +55,10 @@
  */
 #define CONFIG_SYS_PROMPT  Integrator-CP #   /* Monitor Command 
Prompt */
 
-/*
- * FLASH and environment organization
- * Top varies according to amount fitted
- * Reserve top 4 blocks of flash
- * - ARM Boot Monitor
- * - Unused
- * - SIB block
- * - U-Boot environment
- *
- * Base is always 0x2400
- */
-#define CONFIG_SYS_FLASH_BASE  0x2400
-#define CONFIG_SYS_FLASH_CFI   1
-#define CONFIG_FLASH_CFI_DRIVER1
-#define CONFIG_SYS_MAX_FLASH_SECT  64
-#define CONFIG_SYS_MAX_FLASH_BANKS 1   /* max number of memory 
banks */
 #define PHYS_FLASH_SIZE0x0100  /* 16MB */
-#define CONFIG_SYS_FLASH_ERASE_TOUT(2*CONFIG_SYS_HZ)   /* Timeout for 
Flash Erase */
-#define CONFIG_SYS_FLASH_WRITE_TOUT(2*CONFIG_SYS_HZ)   /* Timeout for 
Flash Write */
-
-#define CONFIG_SYS_MONITOR_LEN 0x0010
+#define CONFIG_SYS_MAX_FLASH_SECT  64
 #define CONFIG_ENV_IS_IN_FLASH 1
+#define CONFIG_SYS_MONITOR_LEN 0x0010
 
 /*
  * Move up the U-Boot  monitor area if more flash is fitted.
-- 
1.9.3

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


[U-Boot] [PATCH 6/7] ARM: bcm283x: merge BCM2835/BCM2836 directories into mach-bcm283x

2015-03-16 Thread Masahiro Yamada
BCM2835 (used on Raspberry Pi) and BCM2836 (used on Raspberry Pi 2)
are similar enough.  One of the biggest differences is the ARM
processor.  It is reasonable to collect the source files into a
single place, arch/arm/mach-bcm283x/.

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
Cc: Stephen Warren swar...@nvidia.com
---

 arch/arm/Kconfig   | 15 +++-
 arch/arm/Makefile  |  1 +
 arch/arm/cpu/arm1176/Makefile  |  2 --
 arch/arm/cpu/arm1176/bcm2835/Kconfig   | 12 ---
 arch/arm/cpu/armv7/Makefile|  1 -
 arch/arm/cpu/armv7/bcm2835/Makefile| 13 ---
 arch/arm/mach-bcm283x/Kconfig  | 40 ++
 .../{cpu/arm1176/bcm2835 = mach-bcm283x}/Makefile |  2 +-
 .../{cpu/arm1176/bcm2835 = mach-bcm283x}/init.c   |  0
 .../bcm2835 = mach-bcm283x}/lowlevel_init.S   |  0
 .../{cpu/arm1176/bcm2835 = mach-bcm283x}/mbox.c   |  0
 .../{cpu/arm1176/bcm2835 = mach-bcm283x}/reset.c  |  0
 .../{cpu/arm1176/bcm2835 = mach-bcm283x}/timer.c  |  0
 board/raspberrypi/rpi/Kconfig  | 15 
 board/raspberrypi/rpi_2/Kconfig| 15 
 configs/rpi_2_defconfig|  1 +
 configs/rpi_defconfig  |  1 +
 17 files changed, 48 insertions(+), 70 deletions(-)
 delete mode 100644 arch/arm/cpu/arm1176/bcm2835/Kconfig
 delete mode 100644 arch/arm/cpu/armv7/bcm2835/Makefile
 create mode 100644 arch/arm/mach-bcm283x/Kconfig
 rename arch/arm/{cpu/arm1176/bcm2835 = mach-bcm283x}/Makefile (72%)
 rename arch/arm/{cpu/arm1176/bcm2835 = mach-bcm283x}/init.c (100%)
 rename arch/arm/{cpu/arm1176/bcm2835 = mach-bcm283x}/lowlevel_init.S (100%)
 rename arch/arm/{cpu/arm1176/bcm2835 = mach-bcm283x}/mbox.c (100%)
 rename arch/arm/{cpu/arm1176/bcm2835 = mach-bcm283x}/reset.c (100%)
 rename arch/arm/{cpu/arm1176/bcm2835 = mach-bcm283x}/timer.c (100%)
 delete mode 100644 board/raspberrypi/rpi/Kconfig
 delete mode 100644 board/raspberrypi/rpi_2/Kconfig

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index b9ebee1..9292e98 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -286,13 +286,8 @@ config TARGET_MX35PDK
bool Support mx35pdk
select CPU_ARM1136
 
-config TARGET_RPI
-   bool Support rpi
-   select CPU_ARM1176
-
-config TARGET_RPI_2
-   bool Support rpi_2
-   select CPU_V7
+config ARCH_BCM283X
+   bool Broadcom BCM283X family
 
 config TARGET_INTEGRATORAP_CM946ES
bool Support integratorap_cm946es
@@ -723,9 +718,9 @@ endchoice
 
 source arch/arm/mach-at91/Kconfig
 
-source arch/arm/mach-davinci/Kconfig
+source arch/arm/mach-bcm283x/Kconfig
 
-source arch/arm/cpu/arm1176/bcm2835/Kconfig
+source arch/arm/mach-davinci/Kconfig
 
 source arch/arm/cpu/armv7/exynos/Kconfig
 
@@ -834,8 +829,6 @@ source board/palmtreo680/Kconfig
 source board/phytec/pcm051/Kconfig
 source board/ppcag/bg0900/Kconfig
 source board/pxa255_idp/Kconfig
-source board/raspberrypi/rpi/Kconfig
-source board/raspberrypi/rpi_2/Kconfig
 source board/samsung/smdk2410/Kconfig
 source board/sandisk/sansa_fuze_plus/Kconfig
 source board/scb9328/Kconfig
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 08946de..bac3cb2 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -5,6 +5,7 @@
 # Machine directory name.  This list is sorted alphanumerically
 # by CONFIG_* macro name.
 machine-$(CONFIG_ARCH_AT91)+= at91
+machine-$(CONFIG_ARCH_BCM283X) += bcm283x
 machine-$(CONFIG_ARCH_DAVINCI) += davinci
 machine-$(CONFIG_ARCH_HIGHBANK)+= highbank
 machine-$(CONFIG_ARCH_KEYSTONE)+= keystone
diff --git a/arch/arm/cpu/arm1176/Makefile b/arch/arm/cpu/arm1176/Makefile
index 480e130..deec427 100644
--- a/arch/arm/cpu/arm1176/Makefile
+++ b/arch/arm/cpu/arm1176/Makefile
@@ -10,5 +10,3 @@
 
 extra-y= start.o
 obj-y  = cpu.o
-
-obj-$(CONFIG_BCM2835) += bcm2835/
diff --git a/arch/arm/cpu/arm1176/bcm2835/Kconfig 
b/arch/arm/cpu/arm1176/bcm2835/Kconfig
deleted file mode 100644
index 73cc72b..000
--- a/arch/arm/cpu/arm1176/bcm2835/Kconfig
+++ /dev/null
@@ -1,12 +0,0 @@
-if TARGET_RPI || TARGET_RPI_2
-
-config DM
-   default y
-
-config DM_SERIAL
-   default y
-
-config DM_GPIO
-   default y
-
-endif
diff --git a/arch/arm/cpu/armv7/Makefile b/arch/arm/cpu/armv7/Makefile
index 1312a9d..21fc03b 100644
--- a/arch/arm/cpu/armv7/Makefile
+++ b/arch/arm/cpu/armv7/Makefile
@@ -39,7 +39,6 @@ endif
 
 obj-$(if $(filter am33xx,$(SOC)),y) += am33xx/
 obj-$(if $(filter armada-xp,$(SOC)),y) += armada-xp/
-obj-$(CONFIG_BCM2835) += bcm2835/
 obj-$(if $(filter bcm281xx,$(SOC)),y) += bcm281xx/
 obj-$(if $(filter bcmcygnus,$(SOC)),y) += bcmcygnus/
 obj-$(if $(filter bcmnsp,$(SOC)),y) += bcmnsp/
diff --git a/arch/arm/cpu/armv7/bcm2835/Makefile 
b/arch/arm/cpu/armv7/bcm2835/Makefile
deleted file mode 100644
index 

[U-Boot] [PATCH 3/7] m68k: remove arch board.c

2015-03-16 Thread Masahiro Yamada
All the M68000 boards have switched to Generic Board.
This file is no longer necessary.

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
---

 arch/m68k/lib/Makefile |   3 -
 arch/m68k/lib/board.c  | 642 -
 2 files changed, 645 deletions(-)
 delete mode 100644 arch/m68k/lib/board.c

diff --git a/arch/m68k/lib/Makefile b/arch/m68k/lib/Makefile
index d0e1a84..73d40bd 100644
--- a/arch/m68k/lib/Makefile
+++ b/arch/m68k/lib/Makefile
@@ -5,9 +5,6 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
 
-ifndef CONFIG_SYS_GENERIC_BOARD
-obj-y   += board.o
-endif
 obj-$(CONFIG_CMD_BOOTM) += bootm.o
 obj-y  += cache.o
 obj-y  += interrupts.o
diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c
deleted file mode 100644
index 9caff73..000
--- a/arch/m68k/lib/board.c
+++ /dev/null
@@ -1,642 +0,0 @@
-/*
- * (C) Copyright 2003
- * Josef Baumgartner josef.baumgart...@telex.de
- *
- * (C) Copyright 2000-2002
- * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
- *
- * SPDX-License-Identifier:GPL-2.0+
- */
-
-#include common.h
-#include watchdog.h
-#include command.h
-#include malloc.h
-#include stdio_dev.h
-#include linux/compiler.h
-
-#include asm/immap.h
-
-#if defined(CONFIG_CMD_IDE)
-#include ide.h
-#endif
-#if defined(CONFIG_CMD_SCSI)
-#include scsi.h
-#endif
-#if defined(CONFIG_CMD_KGDB)
-#include kgdb.h
-#endif
-#ifdef CONFIG_STATUS_LED
-#include status_led.h
-#endif
-#include net.h
-#include serial.h
-#ifdef CONFIG_SYS_ALLOC_DPRAM
-#include commproc.h
-#endif
-#include version.h
-
-#if defined(CONFIG_HARD_I2C) || \
-   defined(CONFIG_SYS_I2C)
-#include i2c.h
-#endif
-
-#ifdef CONFIG_CMD_SPI
-#include spi.h
-#endif
-
-#ifdef CONFIG_BITBANGMII
-#include miiphy.h
-#endif
-
-#include nand.h
-
-DECLARE_GLOBAL_DATA_PTR;
-
-static char *failed = *** failed ***\n;
-
-#include environment.h
-
-extern ulong __init_end;
-extern ulong __bss_end;
-
-#if defined(CONFIG_WATCHDOG)
-# undef INIT_FUNC_WATCHDOG_INIT
-# define INIT_FUNC_WATCHDOG_INIT   watchdog_init,
-# define WATCHDOG_DISABLE  watchdog_disable
-
-extern int watchdog_init(void);
-extern int watchdog_disable(void);
-#else
-# define INIT_FUNC_WATCHDOG_INIT   /* undef */
-# define WATCHDOG_DISABLE  /* undef */
-#endif /* CONFIG_WATCHDOG */
-
-ulong monitor_flash_len;
-
-/
- * Utilities   *
- 
- */
-
-/*
- * All attempts to come up with a common initialization sequence
- * that works for all boards and architectures failed: some of the
- * requirements are just _too_ different. To get rid of the resulting
- * mess of board dependend #ifdef'ed code we now make the whole
- * initialization sequence configurable to the user.
- *
- * The requirements for any new initalization function is simple: it
- * receives a pointer to the global data structure as it's only
- * argument, and returns an integer return code, where 0 means
- * continue and != 0 means fatal error, hang the system.
- */
-typedef int (init_fnc_t) (void);
-
-/
- * Init Utilities
- 
- * Some of this code should be moved into the core functions,
- * but let's get it working (again) first...
- */
-
-static int init_baudrate (void)
-{
-   gd-baudrate = getenv_ulong(baudrate, 10, CONFIG_BAUDRATE);
-   return 0;
-}
-
-/***/
-
-static int init_func_ram (void)
-{
-   int board_type = 0; /* use dummy arg */
-   puts (DRAM:  );
-
-   if ((gd-ram_size = initdram (board_type))  0) {
-   print_size (gd-ram_size, \n);
-   return (0);
-   }
-   puts (failed);
-   return (1);
-}
-
-/***/
-
-#if defined(CONFIG_HARD_I2C) ||defined(CONFIG_SYS_I2C)
-static int init_func_i2c (void)
-{
-   puts (I2C:   );
-#ifdef CONFIG_SYS_I2C
-   i2c_init_all();
-#else
-   i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-#endif
-   puts (ready\n);
-   return (0);
-}
-#endif
-
-#if defined(CONFIG_HARD_SPI)
-static int init_func_spi (void)
-{
-   puts (SPI:   );
-   spi_init ();
-   puts (ready\n);
-   return (0);
-}
-#endif
-
-/***/
-
-/
- * Initialization sequence *
- 
- */
-
-init_fnc_t *init_sequence[] = {
-   get_clocks,
-   env_init,
-   init_baudrate,
-   serial_init,
-   

[U-Boot] [PATCH 7/7] ARM: bcm283x: move SoC headers to mach-bcm283x/include/mach

2015-03-16 Thread Masahiro Yamada
Move arch/arm/include/asm/arch-bcm283x/*
  - arch/arm/mach-bcm283x/include/mach/*

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
Cc: Stephen Warren swar...@nvidia.com
---

 arch/arm/mach-bcm283x/Kconfig | 2 +-
 .../{include/asm/arch-bcm2835 = mach-bcm283x/include/mach}/gpio.h| 0
 .../{include/asm/arch-bcm2835 = mach-bcm283x/include/mach}/mbox.h| 0
 .../{include/asm/arch-bcm2835 = mach-bcm283x/include/mach}/sdhci.h   | 0
 .../{include/asm/arch-bcm2835 = mach-bcm283x/include/mach}/timer.h   | 0
 .../{include/asm/arch-bcm2835 = mach-bcm283x/include/mach}/wdog.h| 0
 drivers/mmc/bcm2835_sdhci.c   | 4 ++--
 7 files changed, 3 insertions(+), 3 deletions(-)
 rename arch/arm/{include/asm/arch-bcm2835 = mach-bcm283x/include/mach}/gpio.h 
(100%)
 rename arch/arm/{include/asm/arch-bcm2835 = mach-bcm283x/include/mach}/mbox.h 
(100%)
 rename arch/arm/{include/asm/arch-bcm2835 = 
mach-bcm283x/include/mach}/sdhci.h (100%)
 rename arch/arm/{include/asm/arch-bcm2835 = 
mach-bcm283x/include/mach}/timer.h (100%)
 rename arch/arm/{include/asm/arch-bcm2835 = mach-bcm283x/include/mach}/wdog.h 
(100%)

diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig
index d5e09e8..b43f2d9 100644
--- a/arch/arm/mach-bcm283x/Kconfig
+++ b/arch/arm/mach-bcm283x/Kconfig
@@ -31,7 +31,7 @@ config SYS_VENDOR
default raspberrypi
 
 config SYS_SOC
-   default bcm2835
+   default bcm283x
 
 config SYS_CONFIG_NAME
default rpi if TARGET_RPI
diff --git a/arch/arm/include/asm/arch-bcm2835/gpio.h 
b/arch/arm/mach-bcm283x/include/mach/gpio.h
similarity index 100%
rename from arch/arm/include/asm/arch-bcm2835/gpio.h
rename to arch/arm/mach-bcm283x/include/mach/gpio.h
diff --git a/arch/arm/include/asm/arch-bcm2835/mbox.h 
b/arch/arm/mach-bcm283x/include/mach/mbox.h
similarity index 100%
rename from arch/arm/include/asm/arch-bcm2835/mbox.h
rename to arch/arm/mach-bcm283x/include/mach/mbox.h
diff --git a/arch/arm/include/asm/arch-bcm2835/sdhci.h 
b/arch/arm/mach-bcm283x/include/mach/sdhci.h
similarity index 100%
rename from arch/arm/include/asm/arch-bcm2835/sdhci.h
rename to arch/arm/mach-bcm283x/include/mach/sdhci.h
diff --git a/arch/arm/include/asm/arch-bcm2835/timer.h 
b/arch/arm/mach-bcm283x/include/mach/timer.h
similarity index 100%
rename from arch/arm/include/asm/arch-bcm2835/timer.h
rename to arch/arm/mach-bcm283x/include/mach/timer.h
diff --git a/arch/arm/include/asm/arch-bcm2835/wdog.h 
b/arch/arm/mach-bcm283x/include/mach/wdog.h
similarity index 100%
rename from arch/arm/include/asm/arch-bcm2835/wdog.h
rename to arch/arm/mach-bcm283x/include/mach/wdog.h
diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c
index 92f7d89..4ec2968 100644
--- a/drivers/mmc/bcm2835_sdhci.c
+++ b/drivers/mmc/bcm2835_sdhci.c
@@ -39,8 +39,8 @@
 #include common.h
 #include malloc.h
 #include sdhci.h
-#include asm/arch/timer.h
-#include asm/arch-bcm2835/sdhci.h
+#include mach/timer.h
+#include mach/sdhci.h
 
 /* 400KHz is max freq for card ID etc. Use that as min */
 #define MIN_FREQ 40
-- 
1.9.1

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


Re: [U-Boot] MIPS UHI spec

2015-03-16 Thread James Hogan
On 16/03/15 11:53, Matthew Fortune wrote:
 James Hogan james.ho...@imgtec.com writes:
 On 26/02/15 12:37, Daniel Schwierzeck wrote:
 2015-02-26 11:17 GMT+01:00 Paul Burton paul.bur...@imgtec.com:
 On Thu, Feb 19, 2015 at 01:50:23PM +, Matthew Fortune wrote:
 Hi Daniel,

 The spec for MIPS Unified Hosting Interface is available here:

 http://prplfoundation.org/wiki/MIPS_documentation

 As we have previously discussed, this is an ideal place to define
 the handover of device tree data from bootloader to kernel. Using a0
 == -2 and defining which register(s) you need for the actual data
 will fit nicely. I'll happily include whatever is decided into the
 next version of the spec.

 this originates from an off-list discussion some months ago started by
 John Crispin.

 (CC +John, Ralf, Jonas, linux-mips)


 (CC +Andrew, Ezequiel, James, James)

 On the talk of DT handover, this recent patchset adding support for a
 system doing so to Linux is relevant:


 http://www.linux-mips.org/archives/linux-mips/2015-02/msg00312.html

 I'm also working on a system for which I'll need to implement DT
 handover very soon. It would be very nice if we could agree on some
 standard way of doing so (and eventually if the code on the Linux
 side can be generic enough to allow a multiplatform kernel).


 to be conformant with UHI I propose $a0 == -2 and $a1 == address of DT
 blob. It is a simple extension and should not interfere with the
 various legacy boot interfaces.

 I was just looking at Andrew's patch:
 http://patchwork.linux-mips.org/patch/9549/

 How would the other registers (i.e. $a2 and $a3) be defined for this
 boot interface? I'm guessing any future extensions are envisioned to use
 a different negative value of $a0, in which case treating them as
 unused/undefined is fine, but perhaps that should be spelt out in the
 UHI spec?
 
 Sounds sensible. Making it explicit may help prevent anyone extending this
 and presuming that they can give meaning to one of the unused registers.
 
 Did anyone come to a conclusion on physical vs virtual address for the
 DTB? I forgot to reply to the thread, I would have thought the KSEG0
 address would be the obvious choice so that it is immediately usable from
 ordinary memory accesses. However, that is only because I don't follow how
 the kernel would benefit from being given a physical address. It can't be
 remapped except for the case of segmentation control (I believe) so there
 seems little risk in using KSEG0.

The only obvious cases of physical addresses being passed into MIPS
Linux I can find by grepping for fw_arg[0123] are:
bcm3384: for DT boot, expects physical address of dtb in arg2
fw/sni and lantiq: expect physical arg pointer in arg1.

Physical addresses are probably of more use for arches where only
virtual addresses can be accessed after the MMU is turned on, and Linux
is started with the MMU turned off.

I suppose the problems with using virtual addresses for MIPS would be:
* limits it to low 256MB of RAM usually accessible in kseg0 and kseg1
* as you say, slightly less resistant to segmentation changes

I don't think either of those are really significant problems, though I
can see the appeal of physical addresses for this sort of interface. If
however the rest of the UHI boot APIs deal with directly usable
pointers, then maybe its best to stick with that pattern for consistency.

Cheers
James



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


[U-Boot] [PATCH 2/7] generic-board: select SYS_GENERIC_BOARD for some architectures

2015-03-16 Thread Masahiro Yamada
We have done with the generic board conversion for all the boards
of ARC, Blackfin, M68000, MicroBlaze, MIPS, NIOS2, Sandbox, X86.

Let's select SYS_GENERIC_BOARD for those architectures, so we can
tell which architecture has finished the conversion at a glance.

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
---

 arch/Kconfig | 12 
 arch/arc/include/asm/config.h|  1 -
 arch/blackfin/include/asm/config.h   |  1 -
 arch/m68k/include/asm/config.h   |  1 -
 arch/microblaze/include/asm/config.h |  1 -
 arch/nios2/include/asm/config.h  |  1 -
 arch/sandbox/config.mk   |  2 +-
 arch/x86/include/asm/config.h|  1 -
 include/configs/amcore.h |  2 --
 include/configs/dbau1x00.h   |  1 -
 include/configs/malta.h  |  1 -
 include/configs/pb1x00.h |  1 -
 include/configs/qemu-mips.h  |  1 -
 include/configs/qemu-mips64.h|  1 -
 include/configs/vct.h|  1 -
 15 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index cdd1662..ca617e7 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -1,6 +1,10 @@
 config HAVE_GENERIC_BOARD
bool
 
+config SYS_GENERIC_BOARD
+   bool
+   depends on HAVE_GENERIC_BOARD
+
 choice
prompt Architecture select
default SANDBOX
@@ -9,6 +13,7 @@ config ARC
bool ARC architecture
select HAVE_PRIVATE_LIBGCC
select HAVE_GENERIC_BOARD
+   select SYS_GENERIC_BOARD
 
 config ARM
bool ARM architecture
@@ -23,20 +28,24 @@ config AVR32
 config BLACKFIN
bool Blackfin architecture
select HAVE_GENERIC_BOARD
+   select SYS_GENERIC_BOARD
 
 config M68K
bool M68000 architecture
select HAVE_GENERIC_BOARD
+   select SYS_GENERIC_BOARD
 
 config MICROBLAZE
bool MicroBlaze architecture
select HAVE_GENERIC_BOARD
+   select SYS_GENERIC_BOARD
select SUPPORT_OF_CONTROL
 
 config MIPS
bool MIPS architecture
select HAVE_PRIVATE_LIBGCC
select HAVE_GENERIC_BOARD
+   select SYS_GENERIC_BOARD
 
 config NDS32
bool NDS32 architecture
@@ -44,6 +53,7 @@ config NDS32
 config NIOS2
bool Nios II architecture
select HAVE_GENERIC_BOARD
+   select SYS_GENERIC_BOARD
 
 config OPENRISC
bool OpenRISC architecture
@@ -57,6 +67,7 @@ config PPC
 config SANDBOX
bool Sandbox
select HAVE_GENERIC_BOARD
+   select SYS_GENERIC_BOARD
select SUPPORT_OF_CONTROL
 
 config SH
@@ -70,6 +81,7 @@ config X86
bool x86 architecture
select HAVE_PRIVATE_LIBGCC
select HAVE_GENERIC_BOARD
+   select SYS_GENERIC_BOARD
select SUPPORT_OF_CONTROL
 
 endchoice
diff --git a/arch/arc/include/asm/config.h b/arch/arc/include/asm/config.h
index b4e9099..8936f5c 100644
--- a/arch/arc/include/asm/config.h
+++ b/arch/arc/include/asm/config.h
@@ -7,7 +7,6 @@
 #ifndef __ASM_ARC_CONFIG_H_
 #define __ASM_ARC_CONFIG_H_
 
-#define CONFIG_SYS_GENERIC_BOARD
 #define CONFIG_SYS_GENERIC_GLOBAL_DATA
 #define CONFIG_SYS_BOOT_RAMDISK_HIGH
 #define CONFIG_ARCH_EARLY_INIT_R
diff --git a/arch/blackfin/include/asm/config.h 
b/arch/blackfin/include/asm/config.h
index 73cbfa2..d2cf71b 100644
--- a/arch/blackfin/include/asm/config.h
+++ b/arch/blackfin/include/asm/config.h
@@ -174,7 +174,6 @@
}
 #endif
 
-#define CONFIG_SYS_GENERIC_BOARD
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_ARCH_MISC_INIT
 
diff --git a/arch/m68k/include/asm/config.h b/arch/m68k/include/asm/config.h
index 7590842..e1458ac 100644
--- a/arch/m68k/include/asm/config.h
+++ b/arch/m68k/include/asm/config.h
@@ -7,7 +7,6 @@
 #ifndef _ASM_CONFIG_H_
 #define _ASM_CONFIG_H_
 
-#define CONFIG_SYS_GENERIC_BOARD
 #define CONFIG_SYS_GENERIC_GLOBAL_DATA
 
 #define CONFIG_NEEDS_MANUAL_RELOC
diff --git a/arch/microblaze/include/asm/config.h 
b/arch/microblaze/include/asm/config.h
index 32fd636..4af408a 100644
--- a/arch/microblaze/include/asm/config.h
+++ b/arch/microblaze/include/asm/config.h
@@ -12,6 +12,5 @@
 #endif
 
 #define CONFIG_NR_DRAM_BANKS   1
-#define CONFIG_SYS_GENERIC_BOARD
 
 #endif
diff --git a/arch/nios2/include/asm/config.h b/arch/nios2/include/asm/config.h
index 476a32b..9c13848 100644
--- a/arch/nios2/include/asm/config.h
+++ b/arch/nios2/include/asm/config.h
@@ -7,7 +7,6 @@
 #ifndef _ASM_CONFIG_H_
 #define _ASM_CONFIG_H_
 
-#define CONFIG_SYS_GENERIC_BOARD
 #define CONFIG_SYS_GENERIC_GLOBAL_DATA
 
 #endif
diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk
index e477a84..b05a90f 100644
--- a/arch/sandbox/config.mk
+++ b/arch/sandbox/config.mk
@@ -2,7 +2,7 @@
 # SPDX-License-Identifier: GPL-2.0+
 
 PLATFORM_CPPFLAGS += -D__SANDBOX__ -U_FORTIFY_SOURCE
-PLATFORM_CPPFLAGS += -DCONFIG_ARCH_MAP_SYSMEM -DCONFIG_SYS_GENERIC_BOARD
+PLATFORM_CPPFLAGS += -DCONFIG_ARCH_MAP_SYSMEM
 PLATFORM_LIBS += -lrt
 
 # Define this to avoid linking with SDL, which 

[U-Boot] [PATCH 4/7] malloc_f: remove redundant defalut values of CONFIG_SYS_MALLOC_F_LEN

2015-03-16 Thread Masahiro Yamada
The default value of CONFIG_SYS_MALLOC_F_LEN is defined by ./Kconfig
as 0x400.  Each defconfig or Kconfig need not repeat the same value.

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
---

 arch/arm/cpu/armv7/exynos/Kconfig | 3 ---
 arch/arm/cpu/armv7/omap3/Kconfig  | 3 ---
 arch/arm/mach-uniphier/Kconfig| 3 ---
 board/amcc/canyonlands/Kconfig| 4 
 board/ti/am335x/Kconfig   | 3 ---
 configs/Linksprite_pcDuino3_fdt_defconfig | 1 -
 configs/am335x_igep0033_defconfig | 1 -
 configs/cm_fx6_defconfig  | 1 -
 configs/cm_t335_defconfig | 1 -
 configs/gwventana_defconfig   | 1 -
 configs/mx6dlsabreauto_defconfig  | 1 -
 configs/mx6qsabreauto_defconfig   | 1 -
 configs/mx6qsabresd_defconfig | 1 -
 configs/mx6sxsabresd_defconfig| 1 -
 configs/nokia_rx51_defconfig  | 1 -
 configs/pcm051_rev1_defconfig | 1 -
 configs/pcm051_rev3_defconfig | 1 -
 configs/pengwyn_defconfig | 1 -
 configs/pepper_defconfig  | 1 -
 configs/rpi_2_defconfig   | 1 -
 configs/rpi_defconfig | 1 -
 configs/s5p_goni_defconfig| 1 -
 configs/sandbox_defconfig | 1 -
 configs/smdkc100_defconfig| 1 -
 configs/snapper9260_defconfig | 1 -
 configs/snapper9g20_defconfig | 1 -
 26 files changed, 37 deletions(-)

diff --git a/arch/arm/cpu/armv7/exynos/Kconfig 
b/arch/arm/cpu/armv7/exynos/Kconfig
index eb86a7f..9e47ed3 100644
--- a/arch/arm/cpu/armv7/exynos/Kconfig
+++ b/arch/arm/cpu/armv7/exynos/Kconfig
@@ -83,9 +83,6 @@ config DM_GPIO
 config SYS_MALLOC_F
default y
 
-config SYS_MALLOC_F_LEN
-   default 0x400
-
 source board/samsung/smdkv310/Kconfig
 source board/samsung/trats/Kconfig
 source board/samsung/universal_c210/Kconfig
diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig
index 65da6e2..aa2ff46 100644
--- a/arch/arm/cpu/armv7/omap3/Kconfig
+++ b/arch/arm/cpu/armv7/omap3/Kconfig
@@ -109,9 +109,6 @@ config DM_SERIAL
 config SYS_MALLOC_F
default y if DM
 
-config SYS_MALLOC_F_LEN
-   default 0x400 if DM
-
 config SYS_SOC
default omap3
 
diff --git a/arch/arm/mach-uniphier/Kconfig b/arch/arm/mach-uniphier/Kconfig
index 8335685..b6dc75f 100644
--- a/arch/arm/mach-uniphier/Kconfig
+++ b/arch/arm/mach-uniphier/Kconfig
@@ -51,9 +51,6 @@ endchoice
 config SYS_MALLOC_F
default y
 
-config SYS_MALLOC_F_LEN
-   default 0x400
-
 config CMD_PINMON
bool Enable boot mode pins monitor command
default y
diff --git a/board/amcc/canyonlands/Kconfig b/board/amcc/canyonlands/Kconfig
index 848e08f..c0dbd18 100644
--- a/board/amcc/canyonlands/Kconfig
+++ b/board/amcc/canyonlands/Kconfig
@@ -43,8 +43,4 @@ config SYS_MALLOC_F
bool
default y
 
-config SYS_MALLOC_F_LEN
-   hex
-   default 0x400
-
 endif
diff --git a/board/ti/am335x/Kconfig b/board/ti/am335x/Kconfig
index 722f9d5..8c45892 100644
--- a/board/ti/am335x/Kconfig
+++ b/board/ti/am335x/Kconfig
@@ -50,7 +50,4 @@ config DM_SERIAL
 config SYS_MALLOC_F
default y if DM
 
-config SYS_MALLOC_F_LEN
-   default 0x400 if DM
-
 endif
diff --git a/configs/Linksprite_pcDuino3_fdt_defconfig 
b/configs/Linksprite_pcDuino3_fdt_defconfig
index 1504664..87dd38f 100644
--- a/configs/Linksprite_pcDuino3_fdt_defconfig
+++ b/configs/Linksprite_pcDuino3_fdt_defconfig
@@ -14,4 +14,3 @@ CONFIG_DRAM_CLK=480
 CONFIG_DRAM_ZQ=122
 CONFIG_DRAM_EMR1=4
 CONFIG_SYS_MALLOC_F=y
-CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/am335x_igep0033_defconfig 
b/configs/am335x_igep0033_defconfig
index 8d38e26..a439298 100644
--- a/configs/am335x_igep0033_defconfig
+++ b/configs/am335x_igep0033_defconfig
@@ -4,4 +4,3 @@ CONFIG_SPL_STACK_R_ADDR=0x8200
 CONFIG_ARM=y
 CONFIG_TARGET_AM335X_IGEP0033=y
 CONFIG_SYS_MALLOC_F=y
-CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig
index 2fd21cf..00cbdd2 100644
--- a/configs/cm_fx6_defconfig
+++ b/configs/cm_fx6_defconfig
@@ -6,4 +6,3 @@ CONFIG_DM=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_MALLOC_F=y
-CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/cm_t335_defconfig b/configs/cm_t335_defconfig
index 086e526..31705f2 100644
--- a/configs/cm_t335_defconfig
+++ b/configs/cm_t335_defconfig
@@ -2,4 +2,3 @@ CONFIG_SPL=y
 CONFIG_ARM=y
 CONFIG_TARGET_CM_T335=y
 CONFIG_SYS_MALLOC_F=y
-CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/gwventana_defconfig b/configs/gwventana_defconfig
index 6eab019..d6bbdc1 100644
--- a/configs/gwventana_defconfig
+++ b/configs/gwventana_defconfig
@@ -3,4 +3,3 @@ 
CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL
 CONFIG_ARM=y
 CONFIG_TARGET_GW_VENTANA=y
 CONFIG_SYS_MALLOC_F=y
-CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git 

[U-Boot] [PATCH 0/7] Some improvements related to build system

2015-03-16 Thread Masahiro Yamada
 - Move GENERIC_BOARD CONFIGs
 - Remove arch/m68k/lib/board.c
 - Clean ups CONFIG_SYS_MALLOC_F and CONFIG_SYS_MALLOC_F_LEN
 - Move BCM283x code into arch/arm/mach-bcm283x



Masahiro Yamada (7):
  generic-board: move __HAVE_ARCH_GENERIC_BOARD to Kconfig
  generic-board: select SYS_GENERIC_BOARD for some architectures
  m68k: remove arch board.c
  malloc_f: remove redundant defalut values of CONFIG_SYS_MALLOC_F_LEN
  malloc_f: enable SYS_MALLOC_F by default if DM is on
  ARM: bcm283x: merge BCM2835/BCM2836 directories into mach-bcm283x
  ARM: bcm283x: move SoC headers to mach-bcm283x/include/mach

 Kconfig|   2 +-
 Makefile   |   2 +-
 README |   6 +-
 arch/Kconfig   |  26 +
 arch/arc/config.mk |   3 -
 arch/arc/include/asm/config.h  |   1 -
 arch/arm/Kconfig   |  15 +-
 arch/arm/Makefile  |   1 +
 arch/arm/config.mk |   3 -
 arch/arm/cpu/arm1176/Makefile  |   2 -
 arch/arm/cpu/arm1176/bcm2835/Kconfig   |  12 -
 arch/arm/cpu/armv7/Makefile|   1 -
 arch/arm/cpu/armv7/bcm2835/Makefile|  13 -
 arch/arm/cpu/armv7/exynos/Kconfig  |   6 -
 arch/arm/cpu/armv7/omap3/Kconfig   |   6 -
 arch/arm/mach-bcm283x/Kconfig  |  40 ++
 .../{cpu/arm1176/bcm2835 = mach-bcm283x}/Makefile |   2 +-
 .../include/mach}/gpio.h   |   0
 .../include/mach}/mbox.h   |   0
 .../include/mach}/sdhci.h  |   0
 .../include/mach}/timer.h  |   0
 .../include/mach}/wdog.h   |   0
 .../{cpu/arm1176/bcm2835 = mach-bcm283x}/init.c   |   0
 .../bcm2835 = mach-bcm283x}/lowlevel_init.S   |   0
 .../{cpu/arm1176/bcm2835 = mach-bcm283x}/mbox.c   |   0
 .../{cpu/arm1176/bcm2835 = mach-bcm283x}/reset.c  |   0
 .../{cpu/arm1176/bcm2835 = mach-bcm283x}/timer.c  |   0
 arch/arm/mach-tegra/Kconfig|   3 -
 arch/arm/mach-uniphier/Kconfig |   6 -
 arch/avr32/config.mk   |   3 -
 arch/blackfin/config.mk|   3 -
 arch/blackfin/include/asm/config.h |   1 -
 arch/m68k/config.mk|   3 -
 arch/m68k/include/asm/config.h |   1 -
 arch/m68k/lib/Makefile |   3 -
 arch/m68k/lib/board.c  | 642 -
 arch/microblaze/config.mk  |   1 -
 arch/microblaze/include/asm/config.h   |   1 -
 arch/mips/config.mk|   2 -
 arch/nios2/config.mk   |   2 -
 arch/nios2/include/asm/config.h|   1 -
 arch/powerpc/config.mk |   3 -
 arch/sandbox/config.mk |   5 +-
 arch/x86/Kconfig   |   3 -
 arch/x86/config.mk |   3 -
 arch/x86/include/asm/config.h  |   1 -
 board/amcc/canyonlands/Kconfig |   8 -
 board/raspberrypi/rpi/Kconfig  |  15 -
 board/raspberrypi/rpi_2/Kconfig|  15 -
 board/ti/am335x/Kconfig|   6 -
 configs/Linksprite_pcDuino3_fdt_defconfig  |   2 -
 configs/am335x_igep0033_defconfig  |   2 -
 configs/cm_fx6_defconfig   |   2 -
 configs/cm_t335_defconfig  |   2 -
 configs/gwventana_defconfig|   1 -
 configs/mx6dlsabreauto_defconfig   |   2 -
 configs/mx6qsabreauto_defconfig|   2 -
 configs/mx6qsabresd_defconfig  |   2 -
 configs/mx6sxsabresd_defconfig |   2 -
 configs/nokia_rx51_defconfig   |   2 -
 configs/pcm051_rev1_defconfig  |   2 -
 configs/pcm051_rev3_defconfig  |   2 -
 configs/pengwyn_defconfig  |   2 -
 configs/pepper_defconfig   |   2 -
 configs/rpi_2_defconfig|   3 +-
 configs/rpi_defconfig  |   3 +-
 configs/s5p_goni_defconfig |   2 -
 configs/sandbox_defconfig  |   2 -
 configs/smdkc100_defconfig |   2 -
 configs/snapper9260_defconfig  |   2 -
 configs/snapper9g20_defconfig  |   2 -
 configs/stv0991_defconfig  |   1 -
 doc/README.generic-board   |  12 +-
 

[U-Boot] [PATCH 1/7] generic-board: move __HAVE_ARCH_GENERIC_BOARD to Kconfig

2015-03-16 Thread Masahiro Yamada
Move the option to Kconfig renaming it to CONFIG_HAVE_GENERIC_BOARD.

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
---

 Makefile  |  2 +-
 README|  6 +++---
 arch/Kconfig  | 14 ++
 arch/arc/config.mk|  3 ---
 arch/arm/config.mk|  3 ---
 arch/avr32/config.mk  |  3 ---
 arch/blackfin/config.mk   |  3 ---
 arch/m68k/config.mk   |  3 ---
 arch/microblaze/config.mk |  1 -
 arch/mips/config.mk   |  2 --
 arch/nios2/config.mk  |  2 --
 arch/powerpc/config.mk|  3 ---
 arch/sandbox/config.mk|  3 ---
 arch/x86/config.mk|  3 ---
 doc/README.generic-board  | 12 +++-
 15 files changed, 25 insertions(+), 38 deletions(-)

diff --git a/Makefile b/Makefile
index 73e1362..f63748a 100644
--- a/Makefile
+++ b/Makefile
@@ -1163,7 +1163,7 @@ prepare2: prepare3 outputmakefile
 
 prepare1: prepare2 $(version_h) $(timestamp_h) \
include/config/auto.conf
-ifeq ($(__HAVE_ARCH_GENERIC_BOARD),)
+ifeq ($(CONFIG_HAVE_GENERIC_BOARD),)
 ifeq ($(CONFIG_SYS_GENERIC_BOARD),y)
@echo 2   Your architecture does not support generic board.
@echo 2   Please undefine CONFIG_SYS_GENERIC_BOARD in your board 
config file.
diff --git a/README b/README
index b0124d6..5d57eb9 100644
--- a/README
+++ b/README
@@ -4190,9 +4190,9 @@ Configuration Settings:
to this new framework over time. Defining this will disable the
arch/foo/lib/board.c file and use common/board_f.c and
common/board_r.c instead. To use this option your architecture
-   must support it (i.e. must define __HAVE_ARCH_GENERIC_BOARD in
-   its config.mk file). If you find problems enabling this option on
-   your board please report the problem and send patches!
+   must support it (i.e. must select HAVE_GENERIC_BOARD in arch/Kconfig).
+   If you find problems enabling this option on your board please report
+   the problem and send patches!
 
 - CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC (OMAP only)
This is set by OMAP boards for the max time that reset should
diff --git a/arch/Kconfig b/arch/Kconfig
index 3d419bc..cdd1662 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -1,3 +1,6 @@
+config HAVE_GENERIC_BOARD
+   bool
+
 choice
prompt Architecture select
default SANDBOX
@@ -5,34 +8,42 @@ choice
 config ARC
bool ARC architecture
select HAVE_PRIVATE_LIBGCC
+   select HAVE_GENERIC_BOARD
 
 config ARM
bool ARM architecture
select HAVE_PRIVATE_LIBGCC
+   select HAVE_GENERIC_BOARD
select SUPPORT_OF_CONTROL
 
 config AVR32
bool AVR32 architecture
+   select HAVE_GENERIC_BOARD
 
 config BLACKFIN
bool Blackfin architecture
+   select HAVE_GENERIC_BOARD
 
 config M68K
bool M68000 architecture
+   select HAVE_GENERIC_BOARD
 
 config MICROBLAZE
bool MicroBlaze architecture
+   select HAVE_GENERIC_BOARD
select SUPPORT_OF_CONTROL
 
 config MIPS
bool MIPS architecture
select HAVE_PRIVATE_LIBGCC
+   select HAVE_GENERIC_BOARD
 
 config NDS32
bool NDS32 architecture
 
 config NIOS2
bool Nios II architecture
+   select HAVE_GENERIC_BOARD
 
 config OPENRISC
bool OpenRISC architecture
@@ -40,10 +51,12 @@ config OPENRISC
 config PPC
bool PowerPC architecture
select HAVE_PRIVATE_LIBGCC
+   select HAVE_GENERIC_BOARD
select SUPPORT_OF_CONTROL
 
 config SANDBOX
bool Sandbox
+   select HAVE_GENERIC_BOARD
select SUPPORT_OF_CONTROL
 
 config SH
@@ -56,6 +69,7 @@ config SPARC
 config X86
bool x86 architecture
select HAVE_PRIVATE_LIBGCC
+   select HAVE_GENERIC_BOARD
select SUPPORT_OF_CONTROL
 
 endchoice
diff --git a/arch/arc/config.mk b/arch/arc/config.mk
index 4fcd407..04c034b 100644
--- a/arch/arc/config.mk
+++ b/arch/arc/config.mk
@@ -57,6 +57,3 @@ LDFLAGS_FINAL += -pie
 
 # Load address for standalone apps
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x8200
-
-# Support generic board on ARC
-__HAVE_ARCH_GENERIC_BOARD := y
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 0667984..c005ce4 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -19,9 +19,6 @@ PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections \
 PLATFORM_RELFLAGS += $(call cc-option, -msoft-float) \
   $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))
 
-# Support generic board on ARM
-__HAVE_ARCH_GENERIC_BOARD := y
-
 PLATFORM_CPPFLAGS += -D__ARM__
 
 # Choose between ARM/Thumb instruction sets
diff --git a/arch/avr32/config.mk b/arch/avr32/config.mk
index 8252f59..469185e 100644
--- a/arch/avr32/config.mk
+++ b/arch/avr32/config.mk
@@ -9,9 +9,6 @@ ifeq ($(CROSS_COMPILE),)
 CROSS_COMPILE := avr32-linux-
 endif
 
-# avr32 has generic board support
-__HAVE_ARCH_GENERIC_BOARD := y
-
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x
 
 PLATFORM_RELFLAGS  += 

[U-Boot] [PATCH 5/7] malloc_f: enable SYS_MALLOC_F by default if DM is on

2015-03-16 Thread Masahiro Yamada
This option has a bool type, not hex.
Fix it and enable it if CONFIG_DM is on because Driver Model always
requires malloc memory.  Devices are scanned twice, before/after
relocation.  CONFIG_SYS_MALLOC_F should be enabled to use malloc
memory before relocation.  As it is not board-independent, handle
it globally.

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
---

 Kconfig   | 2 +-
 arch/arm/cpu/armv7/exynos/Kconfig | 3 ---
 arch/arm/cpu/armv7/omap3/Kconfig  | 3 ---
 arch/arm/mach-tegra/Kconfig   | 3 ---
 arch/arm/mach-uniphier/Kconfig| 3 ---
 arch/x86/Kconfig  | 3 ---
 board/amcc/canyonlands/Kconfig| 4 
 board/ti/am335x/Kconfig   | 3 ---
 configs/Linksprite_pcDuino3_fdt_defconfig | 1 -
 configs/am335x_igep0033_defconfig | 1 -
 configs/cm_fx6_defconfig  | 1 -
 configs/cm_t335_defconfig | 1 -
 configs/mx6dlsabreauto_defconfig  | 1 -
 configs/mx6qsabreauto_defconfig   | 1 -
 configs/mx6qsabresd_defconfig | 1 -
 configs/mx6sxsabresd_defconfig| 1 -
 configs/nokia_rx51_defconfig  | 1 -
 configs/pcm051_rev1_defconfig | 1 -
 configs/pcm051_rev3_defconfig | 1 -
 configs/pengwyn_defconfig | 1 -
 configs/pepper_defconfig  | 1 -
 configs/rpi_2_defconfig   | 1 -
 configs/rpi_defconfig | 1 -
 configs/s5p_goni_defconfig| 1 -
 configs/sandbox_defconfig | 1 -
 configs/smdkc100_defconfig| 1 -
 configs/snapper9260_defconfig | 1 -
 configs/snapper9g20_defconfig | 1 -
 configs/stv0991_defconfig | 1 -
 include/configs/rcar-gen2-common.h| 2 --
 30 files changed, 1 insertion(+), 46 deletions(-)

diff --git a/Kconfig b/Kconfig
index 8f96c94..b5968d7 100644
--- a/Kconfig
+++ b/Kconfig
@@ -54,7 +54,7 @@ config CC_OPTIMIZE_FOR_SIZE
 
 config SYS_MALLOC_F
bool Enable malloc() pool before relocation
-   default 0x400
+   default y if DM
help
  Before relocation memory is very limited on many platforms. Still,
  we can provide a small malloc() pool if needed. Driver model in
diff --git a/arch/arm/cpu/armv7/exynos/Kconfig 
b/arch/arm/cpu/armv7/exynos/Kconfig
index 9e47ed3..bd7540a 100644
--- a/arch/arm/cpu/armv7/exynos/Kconfig
+++ b/arch/arm/cpu/armv7/exynos/Kconfig
@@ -80,9 +80,6 @@ config DM_SPI_FLASH
 config DM_GPIO
default y
 
-config SYS_MALLOC_F
-   default y
-
 source board/samsung/smdkv310/Kconfig
 source board/samsung/trats/Kconfig
 source board/samsung/universal_c210/Kconfig
diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig
index aa2ff46..1f96498 100644
--- a/arch/arm/cpu/armv7/omap3/Kconfig
+++ b/arch/arm/cpu/armv7/omap3/Kconfig
@@ -106,9 +106,6 @@ config DM_GPIO
 config DM_SERIAL
default y if DM
 
-config SYS_MALLOC_F
-   default y if DM
-
 config SYS_SOC
default omap3
 
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index fccfd79..fce1c1d 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -17,9 +17,6 @@ config TEGRA124
 
 endchoice
 
-config SYS_MALLOC_F
-   default y
-
 config SYS_MALLOC_F_LEN
default 0x1800
 
diff --git a/arch/arm/mach-uniphier/Kconfig b/arch/arm/mach-uniphier/Kconfig
index b6dc75f..20e20a5 100644
--- a/arch/arm/mach-uniphier/Kconfig
+++ b/arch/arm/mach-uniphier/Kconfig
@@ -48,9 +48,6 @@ config DCC_MICRO_SUPPORT_CARD
 
 endchoice
 
-config SYS_MALLOC_F
-   default y
-
 config CMD_PINMON
bool Enable boot mode pins monitor command
default y
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 35d24e4..da27115 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -76,9 +76,6 @@ config DM_GPIO
 config DM_SERIAL
default y
 
-config SYS_MALLOC_F
-   default y
-
 config SYS_MALLOC_F_LEN
default 0x800
 
diff --git a/board/amcc/canyonlands/Kconfig b/board/amcc/canyonlands/Kconfig
index c0dbd18..46efa7a 100644
--- a/board/amcc/canyonlands/Kconfig
+++ b/board/amcc/canyonlands/Kconfig
@@ -39,8 +39,4 @@ config DM
 config DM_SERIAL
default y
 
-config SYS_MALLOC_F
-   bool
-   default y
-
 endif
diff --git a/board/ti/am335x/Kconfig b/board/ti/am335x/Kconfig
index 8c45892..7cb006f 100644
--- a/board/ti/am335x/Kconfig
+++ b/board/ti/am335x/Kconfig
@@ -47,7 +47,4 @@ config DM_GPIO
 config DM_SERIAL
default y if DM
 
-config SYS_MALLOC_F
-   default y if DM
-
 endif
diff --git a/configs/Linksprite_pcDuino3_fdt_defconfig 
b/configs/Linksprite_pcDuino3_fdt_defconfig
index 87dd38f..7690d1e 100644
--- a/configs/Linksprite_pcDuino3_fdt_defconfig
+++ b/configs/Linksprite_pcDuino3_fdt_defconfig
@@ -13,4 +13,3 @@ CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=480
 CONFIG_DRAM_ZQ=122
 

Re: [U-Boot] [PATCH v5 0/8] Extend LPC32xx functionality and add LPC32xx-based work_92015 board

2015-03-16 Thread Simon Glass
Hi Albert,

On 14 March 2015 at 07:49, Albert ARIBAUD albert.arib...@3adev.fr wrote:

 Hi Simon,

 Le Fri, 13 Mar 2015 18:33:51 -0600, Simon Glass s...@chromium.org a
 écrit :

  Hi Albert,
 
  On 13 March 2015 at 02:04, Albert ARIBAUD (3ADEV)
  albert.arib...@3adev.fr wrote:
   This series extends functionality for the LPC32xx platform and
   introduces the WORK Microwave work_92105 board which makes use
   of the extended functionality.
  
   NOTES:
  
   A - I2C driver remains non-DM
  
   During v2 review, it was suggested to move to DM for I2C. However,
   this caused issues with the 'date', 'dtt' and 'eeprom' commands which
   are configured in this board. Therefore the I2C move to DM was not
   done.
 
  Does CONFIG_DM_I2C_COMPAT help with this? If you define that you get
  the old API.

 Nope, I tried CONFIG_I2C_COMPAT as soon as I hit the errors, and itdid
 not fix things.

That's unfortunate. Perhaps there are some things missing.



  Otherwise if you can share the (broken) patches I can take a look at
  how to fix those commands.

 I'll push a branch on Monday for this.

Thanks, I'll take a look when I get it.

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


Re: [U-Boot] MIPS UHI spec

2015-03-16 Thread Andrew Bresticker
On Mon, Mar 16, 2015 at 4:53 AM, Matthew Fortune
matthew.fort...@imgtec.com wrote:
 James Hogan james.ho...@imgtec.com writes:
 On 26/02/15 12:37, Daniel Schwierzeck wrote:
  2015-02-26 11:17 GMT+01:00 Paul Burton paul.bur...@imgtec.com:
  On Thu, Feb 19, 2015 at 01:50:23PM +, Matthew Fortune wrote:
  Hi Daniel,
 
  The spec for MIPS Unified Hosting Interface is available here:
 
  http://prplfoundation.org/wiki/MIPS_documentation
 
  As we have previously discussed, this is an ideal place to define
  the handover of device tree data from bootloader to kernel. Using a0
  == -2 and defining which register(s) you need for the actual data
  will fit nicely. I'll happily include whatever is decided into the
  next version of the spec.
 
  this originates from an off-list discussion some months ago started by
  John Crispin.
 
  (CC +John, Ralf, Jonas, linux-mips)
 
 
  (CC +Andrew, Ezequiel, James, James)
 
  On the talk of DT handover, this recent patchset adding support for a
  system doing so to Linux is relevant:
 
 
  http://www.linux-mips.org/archives/linux-mips/2015-02/msg00312.html
 
  I'm also working on a system for which I'll need to implement DT
  handover very soon. It would be very nice if we could agree on some
  standard way of doing so (and eventually if the code on the Linux
  side can be generic enough to allow a multiplatform kernel).
 
 
  to be conformant with UHI I propose $a0 == -2 and $a1 == address of DT
  blob. It is a simple extension and should not interfere with the
  various legacy boot interfaces.

 I was just looking at Andrew's patch:
 http://patchwork.linux-mips.org/patch/9549/

 How would the other registers (i.e. $a2 and $a3) be defined for this
 boot interface? I'm guessing any future extensions are envisioned to use
 a different negative value of $a0, in which case treating them as
 unused/undefined is fine, but perhaps that should be spelt out in the
 UHI spec?

 Sounds sensible. Making it explicit may help prevent anyone extending this
 and presuming that they can give meaning to one of the unused registers.

 Did anyone come to a conclusion on physical vs virtual address for the
 DTB? I forgot to reply to the thread, I would have thought the KSEG0
 address would be the obvious choice so that it is immediately usable from
 ordinary memory accesses. However, that is only because I don't follow how
 the kernel would benefit from being given a physical address. It can't be
 remapped except for the case of segmentation control (I believe) so there
 seems little risk in using KSEG0.

We've changed our bootloader to pass the DTB via KSEG0.  V2 of the
Pistachio platform patches I posted last week used this protocol.

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


Re: [U-Boot] bootcount: Add dcache flush to bootcount_store()

2015-03-16 Thread York Sun
Tom,

On 03/15/2015 11:30 AM, Tom Rini wrote:
 ... Add a few more PowerPC people.
 
 On Fri, Mar 13, 2015 at 10:34:03AM -0400, Tom Rini wrote:
 On Fri, Mar 13, 2015 at 09:48:56AM -0400, Tom Rini wrote:
 On Wed, Mar 11, 2015 at 09:51:38AM +0100, Stefan Roese wrote:

 Without this dcache_flush the updated bootcounter may not be saved to
 its location.

 This was detected on an iMX.6 platform using the OCRAM (internal SRAM)
 as bootcounter storage area. And issuing reset from within U-Boot
 cause the bootcounter to stay on its initial value.

 Signed-off-by: Stefan Roese s...@denx.de
 Reviewed-by: Tom Rini tr...@konsulko.com

 OK, this breaks some platforms:
powerpc:  +   TQM850L
 +(TQM850L) drivers/built-in.o: In function `bootcount_store':
 +(TQM850L) build/../drivers/bootcount/bootcount.c:64: undefined reference 
 to `flush_dcache_range'
 +(TQM850L) make[1]: *** [u-boot] Error 1
 +(TQM850L) make: *** [sub-make] Error 2

 We'll see how many others have the same problem soon and then I'll
 decide on nuking the old platforms of holding off on this change.

 Aside from the TQM 8xx family that Wolfgang owns we have mgcoge and
 mgcoge3ne also breaking from this
 (http://patchwork.ozlabs.org/patch/448849/) change.  Wolfgang, Holger,
 how do you want to proceed?  We either need cache operations or dropping
 bootcount from the platforms or dropping the platforms.

 Frankly, after looking at most of arch/powerpc/cpu/*/cache.c I suspect
 8xx and 83xx just need the dummy files copied over.
 
 OK, I went and poked at going one direction on this and then dug into
 the higher level problem more.  PowerPC _needs_ the current kernel's
 arch/powerpc/kernel/misc_32.S relevant cache functions ported over for
 everyone and we should kill the dummy functions we have today.  To try
 and encourage some folks to do this I'm going to drop this bootcount
 patch for now.
 

FWIW, powerpc mpc83xx, mpc85xx, mpc86xx all have flush_dcache_range() function
defined.

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


Re: [U-Boot] DRAM initialization hangs on MX28EVK rev. D

2015-03-16 Thread Adrien Decostre
Hello Fabio,

Thanks a lot for your quick answer.
If I correctly understand the board/freescale/mx28evk/README file, only
boot up from SD card or flash is supported. It is not possible to boot
uboot via USB (and by example the sbloader tool)?

Best regards

Adrien

On Fri, Mar 13, 2015 at 8:32 PM, Fabio Estevam feste...@gmail.com wrote:

 Hi Adrien,

 On Fri, Mar 13, 2015 at 12:44 PM, Adrien Decostre ad.decos...@gmail.com
 wrote:
  Dear all,
 
 
  I am quite new to uboot and I am experimenting it on a iMX28 EVK board
  (rev. D).
 
  I am building the uboot (2014.07 version) by means of buildroot (version
  2014.08) and I am using the standard mxs-bootlet package provided by
  buildroot.

 No, please don't use the bootlets.

 U-boot has included the bootlets functionality. So use U-boot only and
 things will be good.

 You see the hang because bootlets initialize DDR, then U-boot would
 try again to initialize it causing the hang.

 Take a look at the READMEs:

 doc/README.mxs
 board/freescale/mx28evk/README

 Regards,

 Fabio Estevam

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


Re: [U-Boot] DRAM initialization hangs on MX28EVK rev. D

2015-03-16 Thread Otavio Salvador
On Mon, Mar 16, 2015 at 12:51 PM, Adrien Decostre ad.decos...@gmail.com wrote:
 Thanks a lot for your quick answer.
 If I correctly understand the board/freescale/mx28evk/README file, only
 boot up from SD card or flash is supported. It is not possible to boot
 uboot via USB (and by example the sbloader tool)?

It is, for sure.

http://www.denx-cs.de/doku/?q=m28evkusbdownloader

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


Re: [U-Boot] [PATCH] arm: mx5: Add support for USB armory board

2015-03-16 Thread Chris Kuethe
On Tue, Feb 24, 2015 at 1:03 AM,  and...@inversepath.com wrote:
 From: Andrej Rosano and...@inversepath.com

 Add support for Inverse Path USB armory board, an open source
 flash-drive sized computer based on Freescale i.MX53 SoC.

 http://inversepath.com/usbarmory

 Signed-off-by: Andrej Rosano and...@inversepath.com

Tested-by: Chris Kuethe chris.kuethe+git...@gmail.com

= reset
resetting ...


U-Boot 2015.04-rc3-00209-ga74ef40-dirty (Mar 15 2015 - 22:04:22)

CPU:   Freescale i.MX53 rev2.1 at 800 MHz
Reset cause: WDOG
Board: Inverse Path USB armory MkI
I2C:   ready
DRAM:  512 MiB
MMC:   FSL_SDHC: 0
In:serial
Out:   serial
Err:   serial
CPU:   Freescale i.MX53 rev2.1 at 800 MHz
Reset cause: unknown reset
Net:   CPU Net Initialization Failed
No ethernet found.

-- 
GDB has a 'break' feature; why doesn't it have 'fix' too?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] bav335x support broken

2015-03-16 Thread Anish Khurana
Hi Giles,

I was browsing the code and it seems it is failing in spl_fat.c file
in function spl_load_image_fat_os() and internally calls
do_fat_read_at() function. Also I noticed that configuration is very
near to am335x( ti sitara) architecture, so probably can try some more
configure similar to am335x .

Thanks,
Anish


On Mon, Mar 16, 2015 at 12:02 PM, Gilles gil...@gigadevices.com wrote:
 Hi Anish,

 Thanks for pointing that out. I ran menuconfig and that fixed the compilation 
 issue however, now I'm getting this error when I try to run it:

 spl_load_image_fat_os: error reading image args, err - -1

 I guess I'll fool around with menuconfig see if there is something that 
 should be enabled and isn't. (maybe you have a suggestion on this?)

 Anyway, I'll post updated defconfigs when I figure it out. Hopefully this is 
 just a config issue.

 Thanks,
 Gilles
 .


 On Mar 14, 2015, at 10:55 , Anish Khurana anish.khurana130...@gmail.com 
 wrote:

 Hi Gilles,

 This u-boot version is having lot of changes , they have enabled
 Kconfig similar to Kernel and having GUI support ( make menuconfig) .
 so if you are gettting error as you mentioned , try to add Device
 model configurations  and SYS malloc() as :

 Steps 1 make birdland_bav335x config
 Step 2 make menuconfig
 Step 3 Device driver - Enable driver model, enable Driver model for serial)
 Step 4 malloc() pool , General setup -- Enable malloc() pool.

 Please try this , I think it will work.

 Thanks,
 Anish


 On Sat, Mar 14, 2015 at 10:36 AM, Gilles gil...@gigadevices.com wrote:
 Folks,

 I posted a patch to add support for bav335x boards (a322aad99de4). The 
 patch was tested against v2015.04-rc1 and worked perfectly but somehow, 
 something was introduced since then which breaks the board support.

 There are two main errors I need to fix before posting another patch but 
 need help with the second error.

 The first error is easy. Compilation throws:
 #error Please define NS16550 registers size.
 which I can simply fix by defining CONFIG_SYS_NS16550_REG_SIZE in 
 include/configs/bav335x.h
 ((( Altough I am stil puzzled as to why this was defined as -4 (where?) on 
 v2015.04-rc1 )))

 After adding the define, everything compiles up to failing on the final 
 link with:

 drivers/serial/built-in.o: In function `get_current':
 /home/gilles/bbdev/u-boot/drivers/serial/serial.c:389: undefined reference 
 to `default_serial_console'
 drivers/serial/built-in.o: In function `serial_initialize':

 Can anyone please explain what changed between 2015.04-rc1 and 2015.04-rc2 
 which could cause such a behavior? I have spent the last couple hours 
 re-basing a branch to see where it breaks as to maybe get a clue on what 
 changed but no luck so far. Any tips would be appreciated.

 Thanks,
 Gilles
 .



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

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


Re: [U-Boot] [PATCH v5 0/8] Extend LPC32xx functionality and add LPC32xx-based work_92015 board

2015-03-16 Thread Anish Khurana
Hi Simon,

can you please share the git branch so that I can also review it. I am
writing for LPC2148 board.

Thanks,
Anish



On Mon, Mar 16, 2015 at 9:16 PM, Simon Glass s...@chromium.org wrote:
 Hi Albert,

 On 14 March 2015 at 07:49, Albert ARIBAUD albert.arib...@3adev.fr wrote:

 Hi Simon,

 Le Fri, 13 Mar 2015 18:33:51 -0600, Simon Glass s...@chromium.org a
 écrit :

  Hi Albert,
 
  On 13 March 2015 at 02:04, Albert ARIBAUD (3ADEV)
  albert.arib...@3adev.fr wrote:
   This series extends functionality for the LPC32xx platform and
   introduces the WORK Microwave work_92105 board which makes use
   of the extended functionality.
  
   NOTES:
  
   A - I2C driver remains non-DM
  
   During v2 review, it was suggested to move to DM for I2C. However,
   this caused issues with the 'date', 'dtt' and 'eeprom' commands which
   are configured in this board. Therefore the I2C move to DM was not
   done.
 
  Does CONFIG_DM_I2C_COMPAT help with this? If you define that you get
  the old API.

 Nope, I tried CONFIG_I2C_COMPAT as soon as I hit the errors, and itdid
 not fix things.

 That's unfortunate. Perhaps there are some things missing.



  Otherwise if you can share the (broken) patches I can take a look at
  how to fix those commands.

 I'll push a branch on Monday for this.

 Thanks, I'll take a look when I get it.

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


Re: [U-Boot] [PATCH 4/4] common/lcd_console: introduce display/framebuffer rotation

2015-03-16 Thread Nikita Kiryanov

On 03/16/2015 01:35 PM, Igor Grinberg wrote:

On 03/16/15 10:32, Hannes Petermaier wrote:


2)
I need in almost every paint-function the framebuffer base
(cons.lcd_address) and the screen dimension.
This information is stored in the static structure within lcd.c - i don't
like to make this public.
A possible solution could be to change all painting function to work
without some global variable and pass
a third argument, pointer to console_t, and take informations from there.
This will consume one more register
on function call, runtime is equal i think.

Whats your opinion around this ?


Well, since Nikita is working on refactoring the lcd.c stuff and
already examined several aproaches, I think he can provide a better
opinion on this.
Nikita?


I think that passing a pointer to console_t is the way to go. You have an
object oriented design here, and that's the object oriented way of accessing
the object's members from its methods.

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


Re: [U-Boot] bootcount: Add dcache flush to bootcount_store()

2015-03-16 Thread Tom Rini
On Mon, Mar 16, 2015 at 08:57:02AM -0700, York Sun wrote:
 Tom,
 
 On 03/15/2015 11:30 AM, Tom Rini wrote:
  ... Add a few more PowerPC people.
  
  On Fri, Mar 13, 2015 at 10:34:03AM -0400, Tom Rini wrote:
  On Fri, Mar 13, 2015 at 09:48:56AM -0400, Tom Rini wrote:
  On Wed, Mar 11, 2015 at 09:51:38AM +0100, Stefan Roese wrote:
 
  Without this dcache_flush the updated bootcounter may not be saved to
  its location.
 
  This was detected on an iMX.6 platform using the OCRAM (internal SRAM)
  as bootcounter storage area. And issuing reset from within U-Boot
  cause the bootcounter to stay on its initial value.
 
  Signed-off-by: Stefan Roese s...@denx.de
  Reviewed-by: Tom Rini tr...@konsulko.com
 
  OK, this breaks some platforms:
 powerpc:  +   TQM850L
  +(TQM850L) drivers/built-in.o: In function `bootcount_store':
  +(TQM850L) build/../drivers/bootcount/bootcount.c:64: undefined reference 
  to `flush_dcache_range'
  +(TQM850L) make[1]: *** [u-boot] Error 1
  +(TQM850L) make: *** [sub-make] Error 2
 
  We'll see how many others have the same problem soon and then I'll
  decide on nuking the old platforms of holding off on this change.
 
  Aside from the TQM 8xx family that Wolfgang owns we have mgcoge and
  mgcoge3ne also breaking from this
  (http://patchwork.ozlabs.org/patch/448849/) change.  Wolfgang, Holger,
  how do you want to proceed?  We either need cache operations or dropping
  bootcount from the platforms or dropping the platforms.
 
  Frankly, after looking at most of arch/powerpc/cpu/*/cache.c I suspect
  8xx and 83xx just need the dummy files copied over.
  
  OK, I went and poked at going one direction on this and then dug into
  the higher level problem more.  PowerPC _needs_ the current kernel's
  arch/powerpc/kernel/misc_32.S relevant cache functions ported over for
  everyone and we should kill the dummy functions we have today.  To try
  and encourage some folks to do this I'm going to drop this bootcount
  patch for now.
  
 
 FWIW, powerpc mpc83xx, mpc85xx, mpc86xx all have flush_dcache_range() function
 defined.

Yes and no:
$ git grep -l flush_dcache_range arch/powerpc/
arch/powerpc/cpu/mpc512x/cache.c
arch/powerpc/cpu/mpc5xxx/cache.c
arch/powerpc/cpu/mpc83xx/cache.c
arch/powerpc/cpu/mpc85xx/cache.c
arch/powerpc/cpu/mpc86xx/cache.S
arch/powerpc/cpu/ppc4xx/cache.S

Of these only ppc4xx and mpc86xx are real functions, borrowed from the
kernel long long ago.  The rest are dummy functions.  And we should
instead make everyone have the same real functions the kernel does :)

-- 
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] tools/kwbimage.c: Correct header size for SPI boot

2015-03-16 Thread Kevin Smith
If defined, the macro CONFIG_SYS_SPI_U_BOOT_OFFS allows a board
to specify the offset of the payload image into the kwb image
file.  This value was being used to locate the image, but was not
used in the header size field of the main header.  Move the
use of this macro into the function that returns the header size
so that the same value is used in all places.

Signed-off-by: Kevin Smith kevin.sm...@elecsyscorp.com
---
 tools/kwbimage.c | 22 --
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/tools/kwbimage.c b/tools/kwbimage.c
index 9540e7e..1ff17ca 100644
--- a/tools/kwbimage.c
+++ b/tools/kwbimage.c
@@ -420,6 +420,18 @@ static size_t image_headersz_v1(struct image_tool_params 
*params,
*hasext = 1;
}
 
+#if defined(CONFIG_SYS_SPI_U_BOOT_OFFS)
+   if (headersz  CONFIG_SYS_SPI_U_BOOT_OFFS) {
+   fprintf(stderr, Error: Image header (incl. SPL image) too 
big!\n);
+   fprintf(stderr, header=0x%x 
CONFIG_SYS_SPI_U_BOOT_OFFS=0x%x!\n,
+   (int)headersz, CONFIG_SYS_SPI_U_BOOT_OFFS);
+   fprintf(stderr, Increase CONFIG_SYS_SPI_U_BOOT_OFFS!\n);
+   return 0;
+   } else {
+   headersz = CONFIG_SYS_SPI_U_BOOT_OFFS;
+   }
+#endif
+
/*
 * The payload should be aligned on some reasonable
 * boundary
@@ -869,16 +881,6 @@ static int kwbimage_generate(struct image_tool_params 
*params,
sizeof(struct ext_hdr_v0);
} else {
alloc_len = image_headersz_v1(params, NULL);
-#if defined(CONFIG_SYS_SPI_U_BOOT_OFFS)
-   if (alloc_len  CONFIG_SYS_SPI_U_BOOT_OFFS) {
-   fprintf(stderr, Error: Image header (incl. SPL image) 
too big!\n);
-   fprintf(stderr, header=0x%x 
CONFIG_SYS_SPI_U_BOOT_OFFS=0x%x!\n,
-   alloc_len, CONFIG_SYS_SPI_U_BOOT_OFFS);
-   fprintf(stderr, Increase 
CONFIG_SYS_SPI_U_BOOT_OFFS!\n);
-   } else {
-   alloc_len = CONFIG_SYS_SPI_U_BOOT_OFFS;
-   }
-#endif
}
 
hdr = malloc(alloc_len);
-- 
2.3.2
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] bootcount: Add dcache flush to bootcount_store()

2015-03-16 Thread York Sun


On 03/16/2015 10:05 AM, Tom Rini wrote:
 8xx and 83xx just need the dummy files copied over.

 OK, I went and poked at going one direction on this and then dug into
 the higher level problem more.  PowerPC _needs_ the current kernel's
 arch/powerpc/kernel/misc_32.S relevant cache functions ported over for
 everyone and we should kill the dummy functions we have today.  To try
 and encourage some folks to do this I'm going to drop this bootcount
 patch for now.


 FWIW, powerpc mpc83xx, mpc85xx, mpc86xx all have flush_dcache_range() 
 function
 defined.
 
 Yes and no:
 $ git grep -l flush_dcache_range arch/powerpc/
 arch/powerpc/cpu/mpc512x/cache.c
 arch/powerpc/cpu/mpc5xxx/cache.c
 arch/powerpc/cpu/mpc83xx/cache.c
 arch/powerpc/cpu/mpc85xx/cache.c
 arch/powerpc/cpu/mpc86xx/cache.S
 arch/powerpc/cpu/ppc4xx/cache.S
 
 Of these only ppc4xx and mpc86xx are real functions, borrowed from the
 kernel long long ago.  The rest are dummy functions.  And we should
 instead make everyone have the same real functions the kernel does :)
 

Ah! I was under the impression we use it. But we actually used flush_cache()
function.

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


Re: [U-Boot] bootcount: Add dcache flush to bootcount_store()

2015-03-16 Thread Tom Rini
On Mon, Mar 16, 2015 at 10:11:17AM -0700, York Sun wrote:
 
 
 On 03/16/2015 10:05 AM, Tom Rini wrote:
  8xx and 83xx just need the dummy files copied over.
 
  OK, I went and poked at going one direction on this and then dug into
  the higher level problem more.  PowerPC _needs_ the current kernel's
  arch/powerpc/kernel/misc_32.S relevant cache functions ported over for
  everyone and we should kill the dummy functions we have today.  To try
  and encourage some folks to do this I'm going to drop this bootcount
  patch for now.
 
 
  FWIW, powerpc mpc83xx, mpc85xx, mpc86xx all have flush_dcache_range() 
  function
  defined.
  
  Yes and no:
  $ git grep -l flush_dcache_range arch/powerpc/
  arch/powerpc/cpu/mpc512x/cache.c
  arch/powerpc/cpu/mpc5xxx/cache.c
  arch/powerpc/cpu/mpc83xx/cache.c
  arch/powerpc/cpu/mpc85xx/cache.c
  arch/powerpc/cpu/mpc86xx/cache.S
  arch/powerpc/cpu/ppc4xx/cache.S
  
  Of these only ppc4xx and mpc86xx are real functions, borrowed from the
  kernel long long ago.  The rest are dummy functions.  And we should
  instead make everyone have the same real functions the kernel does :)
 
 Ah! I was under the impression we use it. But we actually used flush_cache()
 function.

Yeah, there's some related cleanup that should be done too :)

-- 
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] [PATCH v5 0/8] Extend LPC32xx functionality and add LPC32xx-based work_92015 board

2015-03-16 Thread Simon Glass
Hi Anish,

On 16 March 2015 at 10:28, Anish Khurana anish.khurana130...@gmail.com wrote:
 Hi Simon,

 can you please share the git branch so that I can also review it. I am
 writing for LPC2148 board.

This is Albert's work. Once he shares if I am sure it will be public.

Regards,
Simon


 Thanks,
 Anish



 On Mon, Mar 16, 2015 at 9:16 PM, Simon Glass s...@chromium.org wrote:
 Hi Albert,

 On 14 March 2015 at 07:49, Albert ARIBAUD albert.arib...@3adev.fr wrote:

 Hi Simon,

 Le Fri, 13 Mar 2015 18:33:51 -0600, Simon Glass s...@chromium.org a
 écrit :

  Hi Albert,
 
  On 13 March 2015 at 02:04, Albert ARIBAUD (3ADEV)
  albert.arib...@3adev.fr wrote:
   This series extends functionality for the LPC32xx platform and
   introduces the WORK Microwave work_92105 board which makes use
   of the extended functionality.
  
   NOTES:
  
   A - I2C driver remains non-DM
  
   During v2 review, it was suggested to move to DM for I2C. However,
   this caused issues with the 'date', 'dtt' and 'eeprom' commands which
   are configured in this board. Therefore the I2C move to DM was not
   done.
 
  Does CONFIG_DM_I2C_COMPAT help with this? If you define that you get
  the old API.

 Nope, I tried CONFIG_I2C_COMPAT as soon as I hit the errors, and itdid
 not fix things.

 That's unfortunate. Perhaps there are some things missing.



  Otherwise if you can share the (broken) patches I can take a look at
  how to fix those commands.

 I'll push a branch on Monday for this.

 Thanks, I'll take a look when I get it.

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


Re: [U-Boot] [RFC 4/4] paz00: enable bootmenu

2015-03-16 Thread Stephen Warren

On 03/13/2015 04:49 PM, Andrey Danin wrote:

Signed-off-by: Andrey Danin danind...@mail.ru


Some explanation of what these new options do might be nice; the 
features/benefits they enable.


Are any of the options generally useful? If so, should they be enabled 
in tegra-common*.h?


You also didn't Cc Tom Warren (Tegra maintainer) so he likely won't see 
the emails and hence won't apply this patch.

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


[U-Boot] [PATCH] board/BuR/common: fix compiler warning

2015-03-16 Thread Hannes Petermaier
From: Hannes Petermaier hannes.peterma...@br-automation.com

Signed-off-by: Hannes Petermaier hannes.peterma...@br-automation.com
Signed-off-by: Hannes Petermaier oe5...@oevsv.at
---

 include/configs/bur_am335x_common.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/bur_am335x_common.h 
b/include/configs/bur_am335x_common.h
index a558e42..377e6cf 100644
--- a/include/configs/bur_am335x_common.h
+++ b/include/configs/bur_am335x_common.h
@@ -25,7 +25,7 @@
 fi; \
 setenv netdisplay0 ' \
 setcurs 1 9; puts myip; setcurs 10 9; puts ${ipaddr}; \
-setcurs 1 10;puts serverip; setcurs 10 10; puts ${serverip}\;' \
+setcurs 1 10;puts serverip; setcurs 10 10; puts ${serverip}; \
 run netdisplay0;  \
 setenv stdout nc;setenv stdin nc;setenv stderr nc\0
 
-- 
1.7.9.5

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


Re: [U-Boot] [PATCH 6/7] ARM: bcm283x: merge BCM2835/BCM2836 directories into mach-bcm283x

2015-03-16 Thread Stephen Warren
On 03/16/2015 09:51 PM, Masahiro Yamada wrote:
 Hi Stephen,
 
 
 
 2015-03-17 12:39 GMT+09:00 Stephen Warren swar...@nvidia.com:
 On 03/16/2015 04:35 AM, Masahiro Yamada wrote:
 BCM2835 (used on Raspberry Pi) and BCM2836 (used on Raspberry Pi 2)
 are similar enough.  One of the biggest differences is the ARM
 processor.  It is reasonable to collect the source files into a
 single place, arch/arm/mach-bcm283x/.

 diff --git a/arch/arm/cpu/arm1176/bcm2835/Makefile 
 b/arch/arm/mach-bcm283x/Makefile

 -obj-y:= lowlevel_init.o
 +obj-$(CONFIG_TARGET_RPI) += lowlevel_init.o
  obj-y+= init.o reset.o timer.o mbox.o

 Why is only one file conditional; shouldn't they all be either -y or
 -$(CONFIG_TARGET_RPI)?
 
 This patch just moves source files, not changing the behavior.
 
 If you see arch/arm/cpu/armv7/bcm2835/Makefile (it is added by you),
 
 ---8--
 src_dir := ../../arm1176/bcm2835/
 
 obj-y   :=
 obj-y   += $(src_dir)/init.o
 obj-y   += $(src_dir)/reset.o
 obj-y   += $(src_dir)/timer.o
 obj-y   += $(src_dir)/mbox.o
 --8--
 
 
 BCM2836 borrows source files from BCM2835, except lowlevel_init.S.
 
 I intended to reflect the same behavior.
 
 Anyway, lowlevel_init is not linked for Raspberry Pi2
 because you added CONFIG_SKIP_LOWLEVEL_INIT to include/configs/rpi_2.h

OK, that makes sense. But, shouldn't the bcm2835-specific file be left
in its existing location rather than putting it into a common location
when it isn't common?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH: V3] mpc85xx/T104xD4RDB: Add T104xD4RDB boards support

2015-03-16 Thread Vijay Rai
T1040D4RDB is a Freescale reference board that hosts the T1040 SoC.
T1040D4RDB is re-designed T1040RDB board with following changes :
- Support of DDR4 memory
- Support of 0x66 serdes protocol which can support following interfaces
- 2 RGMII's on DTSEC4, DTSEC5
- 1 SGMII on DTSEC3
- Support of QE-TDM

Similarily T1042D4RDB is a Freescale reference board that hosts the T1040
SoC. T1042D4RDB is re-designed T1042RDB board with following changes :
- Support of DDR4 memory
- Support for 0x86 serdes protocol which can support following interfaces
- 2 RGMII's on DTSEC4, DTSEC5
- 3 SGMII on DTSEC1, DTSEC2  DTSEC3
- Support of DIU

Signed-off-by: Vijay Rai vijay@freescale.com
Signed-off-by: Priyanka Jain priyanka.j...@freescale.com
---
Changes from V2:
 - adds SGMII suport using CPLD
 - removes extra endif

 board/freescale/t104xrdb/MAINTAINERS |8 ++
 board/freescale/t104xrdb/ddr.c   |6 
 board/freescale/t104xrdb/ddr.h   |   13 -
 board/freescale/t104xrdb/eth.c   |   20 +++--
 board/freescale/t104xrdb/t1040d4_rcw.cfg |7 +
 board/freescale/t104xrdb/t1042d4_rcw.cfg |7 +
 board/freescale/t104xrdb/t104xrdb.c  |   19 +---
 configs/T1040D4RDB_NAND_defconfig|5 
 configs/T1040D4RDB_SDCARD_defconfig  |5 
 configs/T1040D4RDB_SPIFLASH_defconfig|5 
 configs/T1040D4RDB_defconfig |4 +++
 configs/T1042D4RDB_NAND_defconfig|5 
 configs/T1042D4RDB_SDCARD_defconfig  |5 
 configs/T1042D4RDB_SPIFLASH_defconfig|5 
 configs/T1042D4RDB_defconfig |4 +++
 include/configs/T104xRDB.h   |   46 --
 16 files changed, 148 insertions(+), 16 deletions(-)
 create mode 100644 board/freescale/t104xrdb/t1040d4_rcw.cfg
 create mode 100644 board/freescale/t104xrdb/t1042d4_rcw.cfg
 create mode 100644 configs/T1040D4RDB_NAND_defconfig
 create mode 100644 configs/T1040D4RDB_SDCARD_defconfig
 create mode 100644 configs/T1040D4RDB_SPIFLASH_defconfig
 create mode 100644 configs/T1040D4RDB_defconfig
 create mode 100644 configs/T1042D4RDB_NAND_defconfig
 create mode 100644 configs/T1042D4RDB_SDCARD_defconfig
 create mode 100644 configs/T1042D4RDB_SPIFLASH_defconfig
 create mode 100644 configs/T1042D4RDB_defconfig

diff --git a/board/freescale/t104xrdb/MAINTAINERS 
b/board/freescale/t104xrdb/MAINTAINERS
index 13d9be9..32e044f 100644
--- a/board/freescale/t104xrdb/MAINTAINERS
+++ b/board/freescale/t104xrdb/MAINTAINERS
@@ -6,7 +6,13 @@ F: include/configs/T104xRDB.h
 F: configs/T1040RDB_defconfig
 F: configs/T1040RDB_NAND_defconfig
 F: configs/T1040RDB_SPIFLASH_defconfig
+F: configs/T1040D4RDB_defconfig
+F: configs/T1040D4RDB_NAND_defconfig
+F: configs/T1040D4RDB_SPIFLASH_defconfig
 F: configs/T1042RDB_defconfig
+F: configs/T1042D4RDB_defconfig
+F: configs/T1042D4RDB_NAND_defconfig
+F: configs/T1042D4RDB_SPIFLASH_defconfig
 F: configs/T1042RDB_PI_defconfig
 F: configs/T1042RDB_PI_NAND_defconfig
 F: configs/T1042RDB_PI_SPIFLASH_defconfig
@@ -15,6 +21,8 @@ T1040RDB_SDCARD BOARD
 #M:-
 S: Maintained
 F: configs/T1040RDB_SDCARD_defconfig
+F: configs/T1040D4RDB_SDCARD_defconfig
+F: configs/T1042D4RDB_SDCARD_defconfig
 F: configs/T1042RDB_PI_SDCARD_defconfig
 
 T1040RDB_SECURE_BOOT BOARD
diff --git a/board/freescale/t104xrdb/ddr.c b/board/freescale/t104xrdb/ddr.c
index e1148e5..3c4eabf 100644
--- a/board/freescale/t104xrdb/ddr.c
+++ b/board/freescale/t104xrdb/ddr.c
@@ -91,8 +91,14 @@ found:
popts-zq_en = 1;
 
/* DHC_EN =1, ODT = 75 Ohm */
+#ifdef CONFIG_SYS_FSL_DDR4
+   popts-ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_80ohm);
+   popts-ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_80ohm) |
+   DDR_CDR2_VREF_OVRD(70);   /* Vref = 70% */
+#else
popts-ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_75ohm);
popts-ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_75ohm);
+#endif
 }
 
 #if defined(CONFIG_DEEP_SLEEP)
diff --git a/board/freescale/t104xrdb/ddr.h b/board/freescale/t104xrdb/ddr.h
index ab1c32d..eb6ec70 100644
--- a/board/freescale/t104xrdb/ddr.h
+++ b/board/freescale/t104xrdb/ddr.h
@@ -28,6 +28,13 @@ static const struct board_specific_parameters udimm0[] = {
 *   num|  hi| rank|  clk| wrlvl |   wrlvl
 * ranks| mhz| GB  |adjst| start |   ctl2
 */
+#ifdef CONFIG_SYS_FSL_DDR4
+   {2,  1666, 0, 4, 7, 0x0808090B, 0x0C0D0E0A},
+   {2,  1900, 0, 4, 6, 0x08080A0C, 0x0D0E0F0A},
+   {1,  1666, 0, 4, 6, 0x0708090B, 0x0C0D0E09},
+   {1,  1900, 0, 4, 6, 0x08080A0C, 0x0D0E0F0A},
+   {1,  2200, 0, 4, 7, 0x08090A0D, 0x0F0F100C},
+#elif defined(CONFIG_SYS_FSL_DDR3)
{2,  833,  4, 4, 6, 0x06060607, 0x08080807},
{2,  833,  0, 4, 6, 0x06060607, 0x08080807},
  

[U-Boot] [PATCH 4/7] powerpc: ppc4xx: remove W7OLMC/W7OLMG board support

2015-03-16 Thread Masahiro Yamada
They have not been converted to Generic Board, so should be removed.
(See doc/README.generic-board for details.)

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
Cc: Erik Theisen ethei...@mindspring.com
---

 arch/powerpc/cpu/ppc4xx/Kconfig |   7 -
 board/w7o/Kconfig   |  19 -
 board/w7o/MAINTAINERS   |   8 -
 board/w7o/Makefile  |  13 -
 board/w7o/cmd_vpd.c |  48 ---
 board/w7o/errors.h  |  81 
 board/w7o/flash.c   | 927 
 board/w7o/fpga.c| 371 
 board/w7o/fsboot.c  |  73 
 board/w7o/init.S| 244 ---
 board/w7o/post1.S   | 724 ---
 board/w7o/post2.c   |  98 -
 board/w7o/u-boot.lds.debug  | 121 --
 board/w7o/vpd.c | 412 --
 board/w7o/vpd.h | 118 -
 board/w7o/w7o.c | 257 ---
 board/w7o/w7o.h |  73 
 board/w7o/watchdog.c|  31 --
 configs/W7OLMC_defconfig|   3 -
 configs/W7OLMG_defconfig|   3 -
 doc/README.scrapyard|   2 +
 include/configs/W7OLMC.h| 314 --
 include/configs/W7OLMG.h| 317 --
 23 files changed, 2 insertions(+), 4262 deletions(-)
 delete mode 100644 board/w7o/Kconfig
 delete mode 100644 board/w7o/MAINTAINERS
 delete mode 100644 board/w7o/Makefile
 delete mode 100644 board/w7o/cmd_vpd.c
 delete mode 100644 board/w7o/errors.h
 delete mode 100644 board/w7o/flash.c
 delete mode 100644 board/w7o/fpga.c
 delete mode 100644 board/w7o/fsboot.c
 delete mode 100644 board/w7o/init.S
 delete mode 100644 board/w7o/post1.S
 delete mode 100644 board/w7o/post2.c
 delete mode 100644 board/w7o/u-boot.lds.debug
 delete mode 100644 board/w7o/vpd.c
 delete mode 100644 board/w7o/vpd.h
 delete mode 100644 board/w7o/w7o.c
 delete mode 100644 board/w7o/w7o.h
 delete mode 100644 board/w7o/watchdog.c
 delete mode 100644 configs/W7OLMC_defconfig
 delete mode 100644 configs/W7OLMG_defconfig
 delete mode 100644 include/configs/W7OLMC.h
 delete mode 100644 include/configs/W7OLMG.h

diff --git a/arch/powerpc/cpu/ppc4xx/Kconfig b/arch/powerpc/cpu/ppc4xx/Kconfig
index e151200..75e4507 100644
--- a/arch/powerpc/cpu/ppc4xx/Kconfig
+++ b/arch/powerpc/cpu/ppc4xx/Kconfig
@@ -32,12 +32,6 @@ config TARGET_SC3
 config TARGET_T3CORP
bool Support t3corp
 
-config TARGET_W7OLMC
-   bool Support W7OLMC
-
-config TARGET_W7OLMG
-   bool Support W7OLMG
-
 config TARGET_ZEUS
bool Support zeus
 
@@ -212,7 +206,6 @@ source board/prodrive/p3p440/Kconfig
 source board/sbc405/Kconfig
 source board/sc3/Kconfig
 source board/t3corp/Kconfig
-source board/w7o/Kconfig
 source board/xes/xpedite1000/Kconfig
 source board/xilinx/ml507/Kconfig
 source board/xilinx/ppc405-generic/Kconfig
diff --git a/board/w7o/Kconfig b/board/w7o/Kconfig
deleted file mode 100644
index fd1b422..000
--- a/board/w7o/Kconfig
+++ /dev/null
@@ -1,19 +0,0 @@
-if TARGET_W7OLMC
-
-config SYS_BOARD
-   default w7o
-
-config SYS_CONFIG_NAME
-   default W7OLMC
-
-endif
-
-if TARGET_W7OLMG
-
-config SYS_BOARD
-   default w7o
-
-config SYS_CONFIG_NAME
-   default W7OLMG
-
-endif
diff --git a/board/w7o/MAINTAINERS b/board/w7o/MAINTAINERS
deleted file mode 100644
index bfedee5..000
--- a/board/w7o/MAINTAINERS
+++ /dev/null
@@ -1,8 +0,0 @@
-W7O BOARD
-M: Erik Theisen ethei...@mindspring.com
-S: Maintained
-F: board/w7o/
-F: include/configs/W7OLMC.h
-F: configs/W7OLMC_defconfig
-F: include/configs/W7OLMG.h
-F: configs/W7OLMG_defconfig
diff --git a/board/w7o/Makefile b/board/w7o/Makefile
deleted file mode 100644
index 955de50..000
--- a/board/w7o/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# (C) Copyright 2006
-# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
-#
-# (C) Copyright 2001
-# Erik Theisen, Wave 7 Optics, ethei...@mindspring.com.
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-
-obj-y  = w7o.o flash.o fpga.o fsboot.o post2.o vpd.o cmd_vpd.o \
- watchdog.o
-obj-y  += init.o post1.o
diff --git a/board/w7o/cmd_vpd.c b/board/w7o/cmd_vpd.c
deleted file mode 100644
index 879cb61..000
--- a/board/w7o/cmd_vpd.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * (C) Copyright 2001
- * Erik Theisen, Wave 7 Optics, ethei...@mindspring.com
- *
- * SPDX-License-Identifier:GPL-2.0+
- */
-
-#include common.h
-#include command.h
-
-#if defined(CONFIG_CMD_BSP)
-
-#include vpd.h
-
-/* ==
- * Interpreter command to retrieve board specific Vital Product Data, VPD
- * ==
- */
-int do_vpd (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
-{
-   VPD vpd;/* Board specific data struct */
-   uchar dev_addr = 

[U-Boot] [PATCH 0/7] powerpc: drop some non-generic boards

2015-03-16 Thread Masahiro Yamada

There are still many non-generic boards (=unmaintained boards)
remaining.  This series removes some of them.

If somebody wants to keep them, please speak up!
(I am CCing the board maintainers.)



Masahiro Yamada (7):
  powerpc: mpc5xxx: remove BC3450 board support
  powerpc: ppc4xx: remove JSE board support
  powerpc: mpc5xxx: remove aev, TB5200 board support
  powerpc: ppc4xx: remove W7OLMC/W7OLMG board support
  powerpc: mpc5xxx: remove galaxy5200 board support
  powerpc: ppc4xx: remove korat board support
  powerpc: mpc83xx: remove non-generic freescale boards

 arch/powerpc/cpu/mpc5xxx/Kconfig  |  14 -
 arch/powerpc/cpu/mpc83xx/Kconfig  |  33 --
 arch/powerpc/cpu/ppc4xx/Kconfig   |  15 -
 board/bc3450/Kconfig  |   9 -
 board/bc3450/MAINTAINERS  |   6 -
 board/bc3450/Makefile |   8 -
 board/bc3450/bc3450.c | 586 ---
 board/bc3450/cmd_bc3450.c | 805 --
 board/bc3450/mt48lc16m16a2-75.h   |  18 -
 board/freescale/common/pq-mds-pib.c   |  26 -
 board/freescale/mpc8308rdb/Kconfig|  12 -
 board/freescale/mpc8308rdb/MAINTAINERS|   6 -
 board/freescale/mpc8308rdb/Makefile   |  10 -
 board/freescale/mpc8308rdb/mpc8308rdb.c   | 192 ---
 board/freescale/mpc8308rdb/sdram.c|  81 ---
 board/freescale/mpc8313erdb/Kconfig   |  12 -
 board/freescale/mpc8313erdb/MAINTAINERS   |   9 -
 board/freescale/mpc8313erdb/Makefile  |   8 -
 board/freescale/mpc8313erdb/README| 111 
 board/freescale/mpc8313erdb/mpc8313erdb.c | 157 -
 board/freescale/mpc8313erdb/sdram.c   | 124 
 board/freescale/mpc8315erdb/Kconfig   |  12 -
 board/freescale/mpc8315erdb/MAINTAINERS   |   6 -
 board/freescale/mpc8315erdb/Makefile  |   8 -
 board/freescale/mpc8315erdb/README| 105 
 board/freescale/mpc8315erdb/mpc8315erdb.c | 246 
 board/freescale/mpc8315erdb/sdram.c   | 111 
 board/freescale/mpc8323erdb/Kconfig   |  12 -
 board/freescale/mpc8323erdb/MAINTAINERS   |   6 -
 board/freescale/mpc8323erdb/Makefile  |   8 -
 board/freescale/mpc8323erdb/README|  71 ---
 board/freescale/mpc8323erdb/mpc8323erdb.c | 222 ---
 board/freescale/mpc832xemds/Kconfig   |  12 -
 board/freescale/mpc832xemds/MAINTAINERS   |  10 -
 board/freescale/mpc832xemds/Makefile  |   9 -
 board/freescale/mpc832xemds/README| 128 -
 board/freescale/mpc832xemds/mpc832xemds.c | 166 --
 board/freescale/mpc832xemds/pci.c | 146 -
 board/freescale/mpc8349emds/Kconfig   |  12 -
 board/freescale/mpc8349emds/MAINTAINERS   |   6 -
 board/freescale/mpc8349emds/Makefile  |  10 -
 board/freescale/mpc8349emds/ddr.c | 101 
 board/freescale/mpc8349emds/mpc8349emds.c | 285 -
 board/freescale/mpc8349emds/pci.c | 192 ---
 board/freescale/mpc8349itx/Kconfig|  12 -
 board/freescale/mpc8349itx/MAINTAINERS|   8 -
 board/freescale/mpc8349itx/Makefile   |   8 -
 board/freescale/mpc8349itx/README | 187 --
 board/freescale/mpc8349itx/mpc8349itx.c   | 390 -
 board/freescale/mpc8349itx/pci.c  | 105 
 board/freescale/mpc837xemds/Kconfig   |  12 -
 board/freescale/mpc837xemds/MAINTAINERS   |   7 -
 board/freescale/mpc837xemds/Makefile  |   9 -
 board/freescale/mpc837xemds/README| 104 
 board/freescale/mpc837xemds/mpc837xemds.c | 346 ---
 board/freescale/mpc837xemds/pci.c | 147 -
 board/freescale/mpc837xemds/pci.h |   6 -
 board/galaxy5200/Kconfig  |   9 -
 board/galaxy5200/MAINTAINERS  |   7 -
 board/galaxy5200/Makefile |   8 -
 board/galaxy5200/galaxy5200.c | 185 --
 board/jse/Kconfig |   9 -
 board/jse/MAINTAINERS |   6 -
 board/jse/Makefile|  12 -
 board/jse/README.txt  |  48 --
 board/jse/flash.c | 491 
 board/jse/host_bridge.c   |  77 ---
 board/jse/init.S  |  75 ---
 board/jse/jse.c   | 147 -
 board/jse/jse_priv.h  |  12 -
 board/jse/sdram.c | 169 --
 board/korat/Kconfig   |   9 -
 board/korat/MAINTAINERS   |   7 -
 board/korat/Makefile  |   9 -
 board/korat/README|  64 ---
 board/korat/config.mk |  27 -
 board/korat/init.S|  80 ---
 board/korat/korat.c   | 633 
 board/korat/u-boot-F7FC.lds   | 124 
 board/tqc/tqm5200/Kconfig |  26 -
 board/tqc/tqm5200/MAINTAINERS |   3 -
 board/tqc/tqm5200/Makefile|   2 +-
 board/tqc/tqm5200/cmd_tb5200.c 

[U-Boot] [PATCH v2 5/7] malloc_f: enable SYS_MALLOC_F by default if DM is on

2015-03-16 Thread Masahiro Yamada
This option has a bool type, not hex.
Fix it and enable it if CONFIG_DM is on because Driver Model always
requires malloc memory.  Devices are scanned twice, before/after
relocation.  CONFIG_SYS_MALLOC_F should be enabled to use malloc
memory before relocation.  As it is board-independent, handle it
globally.

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
---

Changes in v2:
  - Fix a typo   s/not board-independent/board-independent/

 Kconfig   | 2 +-
 arch/arm/cpu/armv7/exynos/Kconfig | 3 ---
 arch/arm/cpu/armv7/omap3/Kconfig  | 3 ---
 arch/arm/mach-tegra/Kconfig   | 3 ---
 arch/arm/mach-uniphier/Kconfig| 3 ---
 arch/x86/Kconfig  | 3 ---
 board/amcc/canyonlands/Kconfig| 4 
 board/ti/am335x/Kconfig   | 3 ---
 configs/Linksprite_pcDuino3_fdt_defconfig | 1 -
 configs/am335x_igep0033_defconfig | 1 -
 configs/cm_fx6_defconfig  | 1 -
 configs/cm_t335_defconfig | 1 -
 configs/mx6dlsabreauto_defconfig  | 1 -
 configs/mx6qsabreauto_defconfig   | 1 -
 configs/mx6qsabresd_defconfig | 1 -
 configs/mx6sxsabresd_defconfig| 1 -
 configs/nokia_rx51_defconfig  | 1 -
 configs/pcm051_rev1_defconfig | 1 -
 configs/pcm051_rev3_defconfig | 1 -
 configs/pengwyn_defconfig | 1 -
 configs/pepper_defconfig  | 1 -
 configs/rpi_2_defconfig   | 1 -
 configs/rpi_defconfig | 1 -
 configs/s5p_goni_defconfig| 1 -
 configs/sandbox_defconfig | 1 -
 configs/smdkc100_defconfig| 1 -
 configs/snapper9260_defconfig | 1 -
 configs/snapper9g20_defconfig | 1 -
 configs/stv0991_defconfig | 1 -
 include/configs/rcar-gen2-common.h| 2 --
 30 files changed, 1 insertion(+), 46 deletions(-)

diff --git a/Kconfig b/Kconfig
index 8f96c94..b5968d7 100644
--- a/Kconfig
+++ b/Kconfig
@@ -54,7 +54,7 @@ config CC_OPTIMIZE_FOR_SIZE
 
 config SYS_MALLOC_F
bool Enable malloc() pool before relocation
-   default 0x400
+   default y if DM
help
  Before relocation memory is very limited on many platforms. Still,
  we can provide a small malloc() pool if needed. Driver model in
diff --git a/arch/arm/cpu/armv7/exynos/Kconfig 
b/arch/arm/cpu/armv7/exynos/Kconfig
index 9e47ed3..bd7540a 100644
--- a/arch/arm/cpu/armv7/exynos/Kconfig
+++ b/arch/arm/cpu/armv7/exynos/Kconfig
@@ -80,9 +80,6 @@ config DM_SPI_FLASH
 config DM_GPIO
default y
 
-config SYS_MALLOC_F
-   default y
-
 source board/samsung/smdkv310/Kconfig
 source board/samsung/trats/Kconfig
 source board/samsung/universal_c210/Kconfig
diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig
index aa2ff46..1f96498 100644
--- a/arch/arm/cpu/armv7/omap3/Kconfig
+++ b/arch/arm/cpu/armv7/omap3/Kconfig
@@ -106,9 +106,6 @@ config DM_GPIO
 config DM_SERIAL
default y if DM
 
-config SYS_MALLOC_F
-   default y if DM
-
 config SYS_SOC
default omap3
 
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index fccfd79..fce1c1d 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -17,9 +17,6 @@ config TEGRA124
 
 endchoice
 
-config SYS_MALLOC_F
-   default y
-
 config SYS_MALLOC_F_LEN
default 0x1800
 
diff --git a/arch/arm/mach-uniphier/Kconfig b/arch/arm/mach-uniphier/Kconfig
index b6dc75f..20e20a5 100644
--- a/arch/arm/mach-uniphier/Kconfig
+++ b/arch/arm/mach-uniphier/Kconfig
@@ -48,9 +48,6 @@ config DCC_MICRO_SUPPORT_CARD
 
 endchoice
 
-config SYS_MALLOC_F
-   default y
-
 config CMD_PINMON
bool Enable boot mode pins monitor command
default y
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 35d24e4..da27115 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -76,9 +76,6 @@ config DM_GPIO
 config DM_SERIAL
default y
 
-config SYS_MALLOC_F
-   default y
-
 config SYS_MALLOC_F_LEN
default 0x800
 
diff --git a/board/amcc/canyonlands/Kconfig b/board/amcc/canyonlands/Kconfig
index c0dbd18..46efa7a 100644
--- a/board/amcc/canyonlands/Kconfig
+++ b/board/amcc/canyonlands/Kconfig
@@ -39,8 +39,4 @@ config DM
 config DM_SERIAL
default y
 
-config SYS_MALLOC_F
-   bool
-   default y
-
 endif
diff --git a/board/ti/am335x/Kconfig b/board/ti/am335x/Kconfig
index 8c45892..7cb006f 100644
--- a/board/ti/am335x/Kconfig
+++ b/board/ti/am335x/Kconfig
@@ -47,7 +47,4 @@ config DM_GPIO
 config DM_SERIAL
default y if DM
 
-config SYS_MALLOC_F
-   default y if DM
-
 endif
diff --git a/configs/Linksprite_pcDuino3_fdt_defconfig 
b/configs/Linksprite_pcDuino3_fdt_defconfig
index 87dd38f..7690d1e 100644
--- a/configs/Linksprite_pcDuino3_fdt_defconfig
+++ b/configs/Linksprite_pcDuino3_fdt_defconfig
@@ -13,4 +13,3 

[U-Boot] [PATCH v2 0/7] Some improvements related to build system

2015-03-16 Thread Masahiro Yamada

 - Move GENERIC_BOARD CONFIGs
 - Remove arch/m68k/lib/board.c
 - Clean ups CONFIG_SYS_MALLOC_F and CONFIG_SYS_MALLOC_F_LEN
 - Move BCM283x code into arch/arm/mach-bcm283x



Masahiro Yamada (7):
  generic-board: move __HAVE_ARCH_GENERIC_BOARD to Kconfig
  generic-board: select SYS_GENERIC_BOARD for some architectures
  m68k: remove arch/m68k/lib/board.c
  malloc_f: remove redundant defalut values of CONFIG_SYS_MALLOC_F_LEN
  malloc_f: enable SYS_MALLOC_F by default if DM is on
  ARM: bcm283x: merge BCM2835/BCM2836 directories into mach-bcm283x
  ARM: bcm283x: move SoC headers to mach-bcm283x/include/mach

 Kconfig|   2 +-
 Makefile   |   2 +-
 README |   6 +-
 arch/Kconfig   |  26 +
 arch/arc/config.mk |   3 -
 arch/arc/include/asm/config.h  |   1 -
 arch/arm/Kconfig   |  15 +-
 arch/arm/Makefile  |   1 +
 arch/arm/config.mk |   3 -
 arch/arm/cpu/arm1176/Makefile  |   2 -
 arch/arm/cpu/arm1176/bcm2835/Kconfig   |  12 -
 arch/arm/cpu/armv7/Makefile|   1 -
 arch/arm/cpu/armv7/bcm2835/Makefile|  13 -
 arch/arm/cpu/armv7/exynos/Kconfig  |   6 -
 arch/arm/cpu/armv7/omap3/Kconfig   |   6 -
 arch/arm/mach-bcm283x/Kconfig  |  40 ++
 .../{cpu/arm1176/bcm2835 = mach-bcm283x}/Makefile |   2 +-
 .../include/mach}/gpio.h   |   0
 .../include/mach}/mbox.h   |   0
 .../include/mach}/sdhci.h  |   0
 .../include/mach}/timer.h  |   0
 .../include/mach}/wdog.h   |   0
 .../{cpu/arm1176/bcm2835 = mach-bcm283x}/init.c   |   0
 .../bcm2835 = mach-bcm283x}/lowlevel_init.S   |   0
 .../{cpu/arm1176/bcm2835 = mach-bcm283x}/mbox.c   |   0
 .../{cpu/arm1176/bcm2835 = mach-bcm283x}/reset.c  |   0
 .../{cpu/arm1176/bcm2835 = mach-bcm283x}/timer.c  |   0
 arch/arm/mach-tegra/Kconfig|   3 -
 arch/arm/mach-uniphier/Kconfig |   6 -
 arch/avr32/config.mk   |   3 -
 arch/blackfin/config.mk|   3 -
 arch/blackfin/include/asm/config.h |   1 -
 arch/m68k/config.mk|   3 -
 arch/m68k/include/asm/config.h |   1 -
 arch/m68k/lib/Makefile |   3 -
 arch/m68k/lib/board.c  | 642 -
 arch/microblaze/config.mk  |   1 -
 arch/microblaze/include/asm/config.h   |   1 -
 arch/mips/config.mk|   2 -
 arch/nios2/config.mk   |   2 -
 arch/nios2/include/asm/config.h|   1 -
 arch/powerpc/config.mk |   3 -
 arch/sandbox/config.mk |   5 +-
 arch/x86/Kconfig   |   3 -
 arch/x86/config.mk |   3 -
 arch/x86/include/asm/config.h  |   1 -
 board/amcc/canyonlands/Kconfig |   8 -
 board/raspberrypi/rpi/Kconfig  |  15 -
 board/raspberrypi/rpi_2/Kconfig|  15 -
 board/ti/am335x/Kconfig|   6 -
 configs/Linksprite_pcDuino3_fdt_defconfig  |   2 -
 configs/am335x_igep0033_defconfig  |   2 -
 configs/cm_fx6_defconfig   |   2 -
 configs/cm_t335_defconfig  |   2 -
 configs/gwventana_defconfig|   1 -
 configs/mx6dlsabreauto_defconfig   |   2 -
 configs/mx6qsabreauto_defconfig|   2 -
 configs/mx6qsabresd_defconfig  |   2 -
 configs/mx6sxsabresd_defconfig |   2 -
 configs/nokia_rx51_defconfig   |   2 -
 configs/pcm051_rev1_defconfig  |   2 -
 configs/pcm051_rev3_defconfig  |   2 -
 configs/pengwyn_defconfig  |   2 -
 configs/pepper_defconfig   |   2 -
 configs/rpi_2_defconfig|   3 +-
 configs/rpi_defconfig  |   3 +-
 configs/s5p_goni_defconfig |   2 -
 configs/sandbox_defconfig  |   2 -
 configs/smdkc100_defconfig |   2 -
 configs/snapper9260_defconfig  |   2 -
 configs/snapper9g20_defconfig  |   2 -
 configs/stv0991_defconfig  |   1 -
 doc/README.generic-board   |  12 +-
 

[U-Boot] [PATCH v2 4/7] malloc_f: remove redundant defalut values of CONFIG_SYS_MALLOC_F_LEN

2015-03-16 Thread Masahiro Yamada
The default value of CONFIG_SYS_MALLOC_F_LEN is defined by ./Kconfig
as 0x400.  Each defconfig or Kconfig need not repeat the same value.

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
---

Changes in v2: None

 arch/arm/cpu/armv7/exynos/Kconfig | 3 ---
 arch/arm/cpu/armv7/omap3/Kconfig  | 3 ---
 arch/arm/mach-uniphier/Kconfig| 3 ---
 board/amcc/canyonlands/Kconfig| 4 
 board/ti/am335x/Kconfig   | 3 ---
 configs/Linksprite_pcDuino3_fdt_defconfig | 1 -
 configs/am335x_igep0033_defconfig | 1 -
 configs/cm_fx6_defconfig  | 1 -
 configs/cm_t335_defconfig | 1 -
 configs/gwventana_defconfig   | 1 -
 configs/mx6dlsabreauto_defconfig  | 1 -
 configs/mx6qsabreauto_defconfig   | 1 -
 configs/mx6qsabresd_defconfig | 1 -
 configs/mx6sxsabresd_defconfig| 1 -
 configs/nokia_rx51_defconfig  | 1 -
 configs/pcm051_rev1_defconfig | 1 -
 configs/pcm051_rev3_defconfig | 1 -
 configs/pengwyn_defconfig | 1 -
 configs/pepper_defconfig  | 1 -
 configs/rpi_2_defconfig   | 1 -
 configs/rpi_defconfig | 1 -
 configs/s5p_goni_defconfig| 1 -
 configs/sandbox_defconfig | 1 -
 configs/smdkc100_defconfig| 1 -
 configs/snapper9260_defconfig | 1 -
 configs/snapper9g20_defconfig | 1 -
 26 files changed, 37 deletions(-)

diff --git a/arch/arm/cpu/armv7/exynos/Kconfig 
b/arch/arm/cpu/armv7/exynos/Kconfig
index eb86a7f..9e47ed3 100644
--- a/arch/arm/cpu/armv7/exynos/Kconfig
+++ b/arch/arm/cpu/armv7/exynos/Kconfig
@@ -83,9 +83,6 @@ config DM_GPIO
 config SYS_MALLOC_F
default y
 
-config SYS_MALLOC_F_LEN
-   default 0x400
-
 source board/samsung/smdkv310/Kconfig
 source board/samsung/trats/Kconfig
 source board/samsung/universal_c210/Kconfig
diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig
index 65da6e2..aa2ff46 100644
--- a/arch/arm/cpu/armv7/omap3/Kconfig
+++ b/arch/arm/cpu/armv7/omap3/Kconfig
@@ -109,9 +109,6 @@ config DM_SERIAL
 config SYS_MALLOC_F
default y if DM
 
-config SYS_MALLOC_F_LEN
-   default 0x400 if DM
-
 config SYS_SOC
default omap3
 
diff --git a/arch/arm/mach-uniphier/Kconfig b/arch/arm/mach-uniphier/Kconfig
index 8335685..b6dc75f 100644
--- a/arch/arm/mach-uniphier/Kconfig
+++ b/arch/arm/mach-uniphier/Kconfig
@@ -51,9 +51,6 @@ endchoice
 config SYS_MALLOC_F
default y
 
-config SYS_MALLOC_F_LEN
-   default 0x400
-
 config CMD_PINMON
bool Enable boot mode pins monitor command
default y
diff --git a/board/amcc/canyonlands/Kconfig b/board/amcc/canyonlands/Kconfig
index 848e08f..c0dbd18 100644
--- a/board/amcc/canyonlands/Kconfig
+++ b/board/amcc/canyonlands/Kconfig
@@ -43,8 +43,4 @@ config SYS_MALLOC_F
bool
default y
 
-config SYS_MALLOC_F_LEN
-   hex
-   default 0x400
-
 endif
diff --git a/board/ti/am335x/Kconfig b/board/ti/am335x/Kconfig
index 722f9d5..8c45892 100644
--- a/board/ti/am335x/Kconfig
+++ b/board/ti/am335x/Kconfig
@@ -50,7 +50,4 @@ config DM_SERIAL
 config SYS_MALLOC_F
default y if DM
 
-config SYS_MALLOC_F_LEN
-   default 0x400 if DM
-
 endif
diff --git a/configs/Linksprite_pcDuino3_fdt_defconfig 
b/configs/Linksprite_pcDuino3_fdt_defconfig
index 1504664..87dd38f 100644
--- a/configs/Linksprite_pcDuino3_fdt_defconfig
+++ b/configs/Linksprite_pcDuino3_fdt_defconfig
@@ -14,4 +14,3 @@ CONFIG_DRAM_CLK=480
 CONFIG_DRAM_ZQ=122
 CONFIG_DRAM_EMR1=4
 CONFIG_SYS_MALLOC_F=y
-CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/am335x_igep0033_defconfig 
b/configs/am335x_igep0033_defconfig
index 8d38e26..a439298 100644
--- a/configs/am335x_igep0033_defconfig
+++ b/configs/am335x_igep0033_defconfig
@@ -4,4 +4,3 @@ CONFIG_SPL_STACK_R_ADDR=0x8200
 CONFIG_ARM=y
 CONFIG_TARGET_AM335X_IGEP0033=y
 CONFIG_SYS_MALLOC_F=y
-CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig
index 2fd21cf..00cbdd2 100644
--- a/configs/cm_fx6_defconfig
+++ b/configs/cm_fx6_defconfig
@@ -6,4 +6,3 @@ CONFIG_DM=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_MALLOC_F=y
-CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/cm_t335_defconfig b/configs/cm_t335_defconfig
index 086e526..31705f2 100644
--- a/configs/cm_t335_defconfig
+++ b/configs/cm_t335_defconfig
@@ -2,4 +2,3 @@ CONFIG_SPL=y
 CONFIG_ARM=y
 CONFIG_TARGET_CM_T335=y
 CONFIG_SYS_MALLOC_F=y
-CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git a/configs/gwventana_defconfig b/configs/gwventana_defconfig
index 6eab019..d6bbdc1 100644
--- a/configs/gwventana_defconfig
+++ b/configs/gwventana_defconfig
@@ -3,4 +3,3 @@ 
CONFIG_SYS_EXTRA_OPTIONS=IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL
 CONFIG_ARM=y
 CONFIG_TARGET_GW_VENTANA=y
 CONFIG_SYS_MALLOC_F=y
-CONFIG_SYS_MALLOC_F_LEN=0x400
diff --git 

[U-Boot] [PATCH v2 1/7] generic-board: move __HAVE_ARCH_GENERIC_BOARD to Kconfig

2015-03-16 Thread Masahiro Yamada
Move the option to Kconfig renaming it to CONFIG_HAVE_GENERIC_BOARD.

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
---

Changes in v2: None

 Makefile  |  2 +-
 README|  6 +++---
 arch/Kconfig  | 14 ++
 arch/arc/config.mk|  3 ---
 arch/arm/config.mk|  3 ---
 arch/avr32/config.mk  |  3 ---
 arch/blackfin/config.mk   |  3 ---
 arch/m68k/config.mk   |  3 ---
 arch/microblaze/config.mk |  1 -
 arch/mips/config.mk   |  2 --
 arch/nios2/config.mk  |  2 --
 arch/powerpc/config.mk|  3 ---
 arch/sandbox/config.mk|  3 ---
 arch/x86/config.mk|  3 ---
 doc/README.generic-board  | 12 +++-
 15 files changed, 25 insertions(+), 38 deletions(-)

diff --git a/Makefile b/Makefile
index 73e1362..f63748a 100644
--- a/Makefile
+++ b/Makefile
@@ -1163,7 +1163,7 @@ prepare2: prepare3 outputmakefile
 
 prepare1: prepare2 $(version_h) $(timestamp_h) \
include/config/auto.conf
-ifeq ($(__HAVE_ARCH_GENERIC_BOARD),)
+ifeq ($(CONFIG_HAVE_GENERIC_BOARD),)
 ifeq ($(CONFIG_SYS_GENERIC_BOARD),y)
@echo 2   Your architecture does not support generic board.
@echo 2   Please undefine CONFIG_SYS_GENERIC_BOARD in your board 
config file.
diff --git a/README b/README
index b0124d6..5d57eb9 100644
--- a/README
+++ b/README
@@ -4190,9 +4190,9 @@ Configuration Settings:
to this new framework over time. Defining this will disable the
arch/foo/lib/board.c file and use common/board_f.c and
common/board_r.c instead. To use this option your architecture
-   must support it (i.e. must define __HAVE_ARCH_GENERIC_BOARD in
-   its config.mk file). If you find problems enabling this option on
-   your board please report the problem and send patches!
+   must support it (i.e. must select HAVE_GENERIC_BOARD in arch/Kconfig).
+   If you find problems enabling this option on your board please report
+   the problem and send patches!
 
 - CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC (OMAP only)
This is set by OMAP boards for the max time that reset should
diff --git a/arch/Kconfig b/arch/Kconfig
index 3d419bc..cdd1662 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -1,3 +1,6 @@
+config HAVE_GENERIC_BOARD
+   bool
+
 choice
prompt Architecture select
default SANDBOX
@@ -5,34 +8,42 @@ choice
 config ARC
bool ARC architecture
select HAVE_PRIVATE_LIBGCC
+   select HAVE_GENERIC_BOARD
 
 config ARM
bool ARM architecture
select HAVE_PRIVATE_LIBGCC
+   select HAVE_GENERIC_BOARD
select SUPPORT_OF_CONTROL
 
 config AVR32
bool AVR32 architecture
+   select HAVE_GENERIC_BOARD
 
 config BLACKFIN
bool Blackfin architecture
+   select HAVE_GENERIC_BOARD
 
 config M68K
bool M68000 architecture
+   select HAVE_GENERIC_BOARD
 
 config MICROBLAZE
bool MicroBlaze architecture
+   select HAVE_GENERIC_BOARD
select SUPPORT_OF_CONTROL
 
 config MIPS
bool MIPS architecture
select HAVE_PRIVATE_LIBGCC
+   select HAVE_GENERIC_BOARD
 
 config NDS32
bool NDS32 architecture
 
 config NIOS2
bool Nios II architecture
+   select HAVE_GENERIC_BOARD
 
 config OPENRISC
bool OpenRISC architecture
@@ -40,10 +51,12 @@ config OPENRISC
 config PPC
bool PowerPC architecture
select HAVE_PRIVATE_LIBGCC
+   select HAVE_GENERIC_BOARD
select SUPPORT_OF_CONTROL
 
 config SANDBOX
bool Sandbox
+   select HAVE_GENERIC_BOARD
select SUPPORT_OF_CONTROL
 
 config SH
@@ -56,6 +69,7 @@ config SPARC
 config X86
bool x86 architecture
select HAVE_PRIVATE_LIBGCC
+   select HAVE_GENERIC_BOARD
select SUPPORT_OF_CONTROL
 
 endchoice
diff --git a/arch/arc/config.mk b/arch/arc/config.mk
index 4fcd407..04c034b 100644
--- a/arch/arc/config.mk
+++ b/arch/arc/config.mk
@@ -57,6 +57,3 @@ LDFLAGS_FINAL += -pie
 
 # Load address for standalone apps
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x8200
-
-# Support generic board on ARC
-__HAVE_ARCH_GENERIC_BOARD := y
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 0667984..c005ce4 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -19,9 +19,6 @@ PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections \
 PLATFORM_RELFLAGS += $(call cc-option, -msoft-float) \
   $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))
 
-# Support generic board on ARM
-__HAVE_ARCH_GENERIC_BOARD := y
-
 PLATFORM_CPPFLAGS += -D__ARM__
 
 # Choose between ARM/Thumb instruction sets
diff --git a/arch/avr32/config.mk b/arch/avr32/config.mk
index 8252f59..469185e 100644
--- a/arch/avr32/config.mk
+++ b/arch/avr32/config.mk
@@ -9,9 +9,6 @@ ifeq ($(CROSS_COMPILE),)
 CROSS_COMPILE := avr32-linux-
 endif
 
-# avr32 has generic board support
-__HAVE_ARCH_GENERIC_BOARD := y
-
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x
 
 

[U-Boot] [PATCH v2 2/7] generic-board: select SYS_GENERIC_BOARD for some architectures

2015-03-16 Thread Masahiro Yamada
We have done with the generic board conversion for all the boards
of ARC, Blackfin, M68000, MicroBlaze, MIPS, NIOS2, Sandbox, X86.

Let's select SYS_GENERIC_BOARD for those architectures, so we can
tell which architecture has finished the conversion at a glance.

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
---

Changes in v2: None

 arch/Kconfig | 12 
 arch/arc/include/asm/config.h|  1 -
 arch/blackfin/include/asm/config.h   |  1 -
 arch/m68k/include/asm/config.h   |  1 -
 arch/microblaze/include/asm/config.h |  1 -
 arch/nios2/include/asm/config.h  |  1 -
 arch/sandbox/config.mk   |  2 +-
 arch/x86/include/asm/config.h|  1 -
 include/configs/amcore.h |  2 --
 include/configs/dbau1x00.h   |  1 -
 include/configs/malta.h  |  1 -
 include/configs/pb1x00.h |  1 -
 include/configs/qemu-mips.h  |  1 -
 include/configs/qemu-mips64.h|  1 -
 include/configs/vct.h|  1 -
 15 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index cdd1662..ca617e7 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -1,6 +1,10 @@
 config HAVE_GENERIC_BOARD
bool
 
+config SYS_GENERIC_BOARD
+   bool
+   depends on HAVE_GENERIC_BOARD
+
 choice
prompt Architecture select
default SANDBOX
@@ -9,6 +13,7 @@ config ARC
bool ARC architecture
select HAVE_PRIVATE_LIBGCC
select HAVE_GENERIC_BOARD
+   select SYS_GENERIC_BOARD
 
 config ARM
bool ARM architecture
@@ -23,20 +28,24 @@ config AVR32
 config BLACKFIN
bool Blackfin architecture
select HAVE_GENERIC_BOARD
+   select SYS_GENERIC_BOARD
 
 config M68K
bool M68000 architecture
select HAVE_GENERIC_BOARD
+   select SYS_GENERIC_BOARD
 
 config MICROBLAZE
bool MicroBlaze architecture
select HAVE_GENERIC_BOARD
+   select SYS_GENERIC_BOARD
select SUPPORT_OF_CONTROL
 
 config MIPS
bool MIPS architecture
select HAVE_PRIVATE_LIBGCC
select HAVE_GENERIC_BOARD
+   select SYS_GENERIC_BOARD
 
 config NDS32
bool NDS32 architecture
@@ -44,6 +53,7 @@ config NDS32
 config NIOS2
bool Nios II architecture
select HAVE_GENERIC_BOARD
+   select SYS_GENERIC_BOARD
 
 config OPENRISC
bool OpenRISC architecture
@@ -57,6 +67,7 @@ config PPC
 config SANDBOX
bool Sandbox
select HAVE_GENERIC_BOARD
+   select SYS_GENERIC_BOARD
select SUPPORT_OF_CONTROL
 
 config SH
@@ -70,6 +81,7 @@ config X86
bool x86 architecture
select HAVE_PRIVATE_LIBGCC
select HAVE_GENERIC_BOARD
+   select SYS_GENERIC_BOARD
select SUPPORT_OF_CONTROL
 
 endchoice
diff --git a/arch/arc/include/asm/config.h b/arch/arc/include/asm/config.h
index b4e9099..8936f5c 100644
--- a/arch/arc/include/asm/config.h
+++ b/arch/arc/include/asm/config.h
@@ -7,7 +7,6 @@
 #ifndef __ASM_ARC_CONFIG_H_
 #define __ASM_ARC_CONFIG_H_
 
-#define CONFIG_SYS_GENERIC_BOARD
 #define CONFIG_SYS_GENERIC_GLOBAL_DATA
 #define CONFIG_SYS_BOOT_RAMDISK_HIGH
 #define CONFIG_ARCH_EARLY_INIT_R
diff --git a/arch/blackfin/include/asm/config.h 
b/arch/blackfin/include/asm/config.h
index 73cbfa2..d2cf71b 100644
--- a/arch/blackfin/include/asm/config.h
+++ b/arch/blackfin/include/asm/config.h
@@ -174,7 +174,6 @@
}
 #endif
 
-#define CONFIG_SYS_GENERIC_BOARD
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_ARCH_MISC_INIT
 
diff --git a/arch/m68k/include/asm/config.h b/arch/m68k/include/asm/config.h
index 7590842..e1458ac 100644
--- a/arch/m68k/include/asm/config.h
+++ b/arch/m68k/include/asm/config.h
@@ -7,7 +7,6 @@
 #ifndef _ASM_CONFIG_H_
 #define _ASM_CONFIG_H_
 
-#define CONFIG_SYS_GENERIC_BOARD
 #define CONFIG_SYS_GENERIC_GLOBAL_DATA
 
 #define CONFIG_NEEDS_MANUAL_RELOC
diff --git a/arch/microblaze/include/asm/config.h 
b/arch/microblaze/include/asm/config.h
index 32fd636..4af408a 100644
--- a/arch/microblaze/include/asm/config.h
+++ b/arch/microblaze/include/asm/config.h
@@ -12,6 +12,5 @@
 #endif
 
 #define CONFIG_NR_DRAM_BANKS   1
-#define CONFIG_SYS_GENERIC_BOARD
 
 #endif
diff --git a/arch/nios2/include/asm/config.h b/arch/nios2/include/asm/config.h
index 476a32b..9c13848 100644
--- a/arch/nios2/include/asm/config.h
+++ b/arch/nios2/include/asm/config.h
@@ -7,7 +7,6 @@
 #ifndef _ASM_CONFIG_H_
 #define _ASM_CONFIG_H_
 
-#define CONFIG_SYS_GENERIC_BOARD
 #define CONFIG_SYS_GENERIC_GLOBAL_DATA
 
 #endif
diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk
index e477a84..b05a90f 100644
--- a/arch/sandbox/config.mk
+++ b/arch/sandbox/config.mk
@@ -2,7 +2,7 @@
 # SPDX-License-Identifier: GPL-2.0+
 
 PLATFORM_CPPFLAGS += -D__SANDBOX__ -U_FORTIFY_SOURCE
-PLATFORM_CPPFLAGS += -DCONFIG_ARCH_MAP_SYSMEM -DCONFIG_SYS_GENERIC_BOARD
+PLATFORM_CPPFLAGS += -DCONFIG_ARCH_MAP_SYSMEM
 PLATFORM_LIBS += -lrt
 
 # Define this to avoid 

Re: [U-Boot] [PATCH] arm: mx5: Add support for USB armory board

2015-03-16 Thread Chris Kuethe
On Mon, Mar 16, 2015 at 9:50 AM, Chris Kuethe chris.kue...@gmail.com wrote:
 On Tue, Feb 24, 2015 at 1:03 AM,  and...@inversepath.com wrote:
 From: Andrej Rosano and...@inversepath.com

 Add support for Inverse Path USB armory board, an open source
 flash-drive sized computer based on Freescale i.MX53 SoC.

 http://inversepath.com/usbarmory

 Signed-off-by: Andrej Rosano and...@inversepath.com

 Tested-by: Chris Kuethe chris.kuethe+git...@gmail.com

Derp. I didn't notice this before because I had a saved boot command...

+#define CONFIG_BOOTCOMMAND \
+ ext2load mmc 0:1 0x7080 /boot/uImage; ext2load mmc 0:1 \
+ 0x7100 /boot/imx53-usbarmory.dtb; bootm 0x7080 - 0x7100

Needs a space after mmc 0:1 or before 0x7100, otherwise you
get ext2load mmc 0:10x7100 which won't boot.

-- 
GDB has a 'break' feature; why doesn't it have 'fix' too?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Question about board-specific Makefile actions

2015-03-16 Thread Masahiro Yamada
Hi James,



2015-03-14 3:08 GMT+09:00 James Chargin jimccr...@gmail.com:
 These are correct in sub-directory Makefiles in general,
 but unfortunately, make clean does not descend into board/ directory
 for some reason.

 So, they do not work in board/*/Makefile


 Should this be considered a bug in the build system?

Kind of.

I hope it will be solved in a long run.

In U-Boot, ARCH, VENDOR, BOARD directories are still treated specially
for some historical reason.

Board directory is selected like follows:
libs-y += $(if $(BOARDDIR),board/$(BOARDDIR)/)

and it has made it difficult to descend into board/ by make clean
because make clean should not expect the existing .config file.

If we could completely switched to obj-$(CONFIG_FOO) style in the future,
this problem would go away.  We need more effort to achieve this.


 Should make descend
 into the board directory?

Yes.


 Or, at least, should there not be a way for a
 board directory to indicate which of any locally generated derived objects
 should be cleaned up?
 I hesitate to add to the top level Makefile for my specific board.

Sorry, I cannot suggest a good solution now.




-- 
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 v5 2/8] lpc32xx: mtd: nand: add MLC NAND controller

2015-03-16 Thread Scott Wood
On Sat, 2015-03-14 at 15:27 +0100, Albert ARIBAUD wrote:
 Bonjour Scott,
 
 Le Fri, 13 Mar 2015 16:57:33 -0500, Scott Wood
 scottw...@freescale.com a écrit :
 
  On Fri, 2015-03-13 at 09:04 +0100, Albert ARIBAUD (3ADEV) wrote:
   + /* go through all four small pages */
   + for (i = 0; i  4; i++) {
   + /* start auto decode (reads 528 NAND bytes) */
   + writel(0, lpc32xx_nand_mlc_registers-ecc_auto_dec_reg);
   + /* wait for controller to return to ready state */
   + timeout = LPC32X_NAND_TIMEOUT;
   + do {
   + if (timeout-- == 0)
   + return -1;
   + status = readl(lpc32xx_nand_mlc_registers-isr);
   + } while (!(status  ISR_CONTROLLER_READY));
  
  How much time does 1 reads of this register equate to?  Are you sure
  it's enough?  Timeouts should generally be in terms of time, not loop
  iterations.
 
 I followed the examples in several drivers where timeouts are by
 iteration. Note that  -- while this does not void your point --  I did
 not use 1 but 10, which at a CPU clock of 208 MHz, and assuming
 an optimistic one instruction per cycle and two instructions per loop,
 makes the loop last at least 960 us, well over the 600 us which the
 NAND takes for any page programming.

What if this driver ends up being used on hardware that runs
significantly faster than 208 MHz?  I could understand if it's hugely
space-constrained SPL code (like the ones that have to fit in 4K), but
otherwise why not make use of the timekeeping code that exists in U-Boot
(either by reading the timer, or by putting udelay(1) in the loop body)?

   +#define LARGE_PAGE_SIZE 2048
   +
   +int nand_spl_load_image(uint32_t offs, unsigned int size, void *dst)
   +{
   + struct lpc32xx_oob oob;
   + unsigned int page = offs / LARGE_PAGE_SIZE;
   + unsigned int left = DIV_ROUND_UP(size, LARGE_PAGE_SIZE);
   +
   + while (left) {
   + int res = read_single_page(dst, page, oob);
   + page++;
   + /* if read succeeded, even if fixed by ECC */
   + if (res = 0) {
   + /* skip bad block */
   + if (oob.free[0].free_oob_bytes[0] != 0xff)
   + continue;
   + if (oob.free[0].free_oob_bytes[1] != 0xff)
   + continue;
   + /* page is good, keep it */
   + dst += LARGE_PAGE_SIZE;
   + left--;
   + }
  
  You should be checking the designated page(s) of the block, rather than
  the current page, for the bad block markers -- and skipping the entire
  block if it's bad.
 
 Will fix this -- is there any helper function in the bad block
 management code for this? I could not find one, but I'm no NAND expert.

I don't know of any such helper -- outside of SPL it's handled via the
BBT.  fsl_ifc_spl.c is an example that checks for bad block markers, but
it's hardcoded to assume the first two pages of a block which is a bit
simpler than checking at the end of the block.

-Scott


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


Re: [U-Boot] [PATCH v2] sbc8548: document how to write main flash from alternate flash

2015-03-16 Thread Paul Gortmaker
On 15-03-16 04:01 PM, York Sun wrote:
 
 
 On 03/16/2015 12:53 PM, Paul Gortmaker wrote:
 If you are running on the alternate flash in order to fix a
 corrupted main flash image, it might be good to have the steps
 for that documented as well.

 Also delete any protect commands from non-active flash banks;
 they are only required for the instances where you are writing
 to the currently in use flash image.

 Signed-off-by: Paul Gortmaker paul.gortma...@windriver.com
 ---

 [v2: drop protect commands from instances where we flash the non
  active flash bank ; it wasn't protected anyway.]

  board/sbc8548/README | 12 ++--
  1 file changed, 10 insertions(+), 2 deletions(-)

 diff --git a/board/sbc8548/README b/board/sbc8548/README
 index feac5e3e63e5..92731645f266 100644
 --- a/board/sbc8548/README
 +++ b/board/sbc8548/README
 @@ -132,11 +132,19 @@ image in the SODIMM that is built with 
 CONFIG_SYS_ALT_BOOT enabled,
  
  tftp u-boot.bin
  md 20 10
 -protect off all
  era eff0 efff
  cp.b 20 eff0 10
  md eff0 10
 -protect on all
 +
 +If you are running the alternate 64MB /CS0 settings and want to update
 +the normal default 8MB u-boot image, then (built with CONFIG_SYS_ALT_BOOT
 +disabled) the steps will become:
 +
 +tftp u-boot.bin
 +md 20 10
 +erase effa efff
 +cp.b 20 effa 6
 +md effa 10
  
  Finally, if you are running the alternate 64MB /CS0 settings and want
  to update the in-use u-boot image, then (again with CONFIG_SYS_ALT_BOOT

 
 Paul,
 
 Sorry I didn't catch this in previous version. In your instruction, you 
 presume
 the tftp location is 0x20, which may not be the case. I suggest you add
 specific location in tftp command so it is clear.

Sure, I can do that.

 
 I also noticed the file size seems different in your README, comparing with 
 the
 section above. It may be worth to double check.

I think the reason for that was that the alternate flash has a large
sector size, and we can't get the exact number of 0x6 alignment
on 0x8 sized sectors.   From fli output:

  FF98 E  FFA0 E  FFA8 E  FFB0 E  FFB8 E
  FFC0 E  FFC8 E  FFD0 E  FFD8 E  FFE0 E
  FFE8 E  FFF0   RO   FFF8   RO 

I guess it could be 0x8 for write instead of 0x10, but for
some reason I recall it being useful to invalidate the environment
sector at the same time on the alt bank ; I can't recall why anymore...

The eTSEC aren't detected when I build v2015.04-rc3 ; if I solve that
then I'll try a 8 write for alt flash and see if it comes up OK.
(if you have a hint about the eTSEC, let me know ; will save me a bisect)

P.
--


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


Re: [U-Boot] bav335x support broken

2015-03-16 Thread Gilles
Hi Anish,

Thanks for pointing that out. I ran menuconfig and that fixed the compilation 
issue however, now I'm getting this error when I try to run it:

spl_load_image_fat_os: error reading image args, err - -1

I guess I'll fool around with menuconfig see if there is something that should 
be enabled and isn't. (maybe you have a suggestion on this?)

Anyway, I'll post updated defconfigs when I figure it out. Hopefully this is 
just a config issue.

Thanks,
Gilles
.


 On Mar 14, 2015, at 10:55 , Anish Khurana anish.khurana130...@gmail.com 
 wrote:
 
 Hi Gilles,
 
 This u-boot version is having lot of changes , they have enabled
 Kconfig similar to Kernel and having GUI support ( make menuconfig) .
 so if you are gettting error as you mentioned , try to add Device
 model configurations  and SYS malloc() as :
 
 Steps 1 make birdland_bav335x config
 Step 2 make menuconfig
 Step 3 Device driver - Enable driver model, enable Driver model for serial)
 Step 4 malloc() pool , General setup -- Enable malloc() pool.
 
 Please try this , I think it will work.
 
 Thanks,
 Anish
 
 
 On Sat, Mar 14, 2015 at 10:36 AM, Gilles gil...@gigadevices.com wrote:
 Folks,
 
 I posted a patch to add support for bav335x boards (a322aad99de4). The patch 
 was tested against v2015.04-rc1 and worked perfectly but somehow, something 
 was introduced since then which breaks the board support.
 
 There are two main errors I need to fix before posting another patch but 
 need help with the second error.
 
 The first error is easy. Compilation throws:
 #error Please define NS16550 registers size.
 which I can simply fix by defining CONFIG_SYS_NS16550_REG_SIZE in 
 include/configs/bav335x.h
 ((( Altough I am stil puzzled as to why this was defined as -4 (where?) on 
 v2015.04-rc1 )))
 
 After adding the define, everything compiles up to failing on the final link 
 with:
 
 drivers/serial/built-in.o: In function `get_current':
 /home/gilles/bbdev/u-boot/drivers/serial/serial.c:389: undefined reference 
 to `default_serial_console'
 drivers/serial/built-in.o: In function `serial_initialize':
 
 Can anyone please explain what changed between 2015.04-rc1 and 2015.04-rc2 
 which could cause such a behavior? I have spent the last couple hours 
 re-basing a branch to see where it breaks as to maybe get a clue on what 
 changed but no luck so far. Any tips would be appreciated.
 
 Thanks,
 Gilles
 .
 
 
 
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot

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


Re: [U-Boot] [PATCH 3/4] common/lcd_console: move single static variables into common (static) structure

2015-03-16 Thread Hannes Petermaier
Nikita Kiryanov nik...@compulab.co.il schrieb am 15.03.2015 19:57:08:

 Hi Hannes,
Hi Nikita,
 
  -static void *lcd_console_address;
  +struct console_t {
  +   short curr_col, curr_row;
  +   short cols, rows;
  +   void *lcd_address;
 
 Can this be void *base_address? I think that's a bit more descriptive.

Yes, i will do some cleanup after Patch 4/4 is finished and within this 
action i will rename this variable to
fbbase - this should be most descriptive.

 
 Other than that,
 Acked-by: Nikita Kiryanov nik...@compulab.co.il
 
  +};
 
 -- 
 Regards,
 Nikita Kiryanov
many thanks and best regards,
Hannes

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


[U-Boot] [PATCH 4/4] ARM: zynq: rename CONFIG_ZYNQ to CONFIG_ARCH_ZYNQ

2015-03-16 Thread Masahiro Yamada
Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
---

 arch/arm/Kconfig   | 2 +-
 arch/arm/Makefile  | 2 +-
 arch/arm/dts/Makefile  | 2 +-
 arch/arm/mach-zynq/Kconfig | 2 +-
 configs/zynq_microzed_defconfig| 2 +-
 configs/zynq_zc70x_defconfig   | 2 +-
 configs/zynq_zc770_xm010_defconfig | 2 +-
 configs/zynq_zc770_xm012_defconfig | 2 +-
 configs/zynq_zc770_xm013_defconfig | 2 +-
 configs/zynq_zed_defconfig | 2 +-
 configs/zynq_zybo_defconfig| 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 7af1e4b..d98b18e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -609,7 +609,7 @@ config TARGET_VF610TWR
bool Support vf610twr
select CPU_V7
 
-config ZYNQ
+config ARCH_ZYNQ
bool Xilinx Zynq Platform
select CPU_V7
select SUPPORT_SPL
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 45cb1d2..8b212a2 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -17,7 +17,7 @@ machine-$(CONFIG_ORION5X) += orion5x
 machine-$(CONFIG_TEGRA)+= tegra
 machine-$(CONFIG_ARCH_UNIPHIER)+= uniphier
 machine-$(CONFIG_ARCH_VERSATILE)   += versatile
-machine-$(CONFIG_ZYNQ) += zynq
+machine-$(CONFIG_ARCH_ZYNQ)+= zynq
 
 machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
 
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index cbe5b86..f59e23b 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -39,7 +39,7 @@ dtb-$(CONFIG_ARCH_UNIPHIER) += \
uniphier-ph1-pro4-ref.dtb \
uniphier-ph1-ld4-ref.dtb \
uniphier-ph1-sld8-ref.dtb
-dtb-$(CONFIG_ZYNQ) += zynq-zc702.dtb \
+dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb \
zynq-zc706.dtb \
zynq-zed.dtb \
zynq-zybo.dtb \
diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig
index 3a52535..d4fa87d 100644
--- a/arch/arm/mach-zynq/Kconfig
+++ b/arch/arm/mach-zynq/Kconfig
@@ -1,4 +1,4 @@
-if ZYNQ
+if ARCH_ZYNQ
 
 choice
prompt Xilinx Zynq board select
diff --git a/configs/zynq_microzed_defconfig b/configs/zynq_microzed_defconfig
index 39a7f6b..af531fa 100644
--- a/configs/zynq_microzed_defconfig
+++ b/configs/zynq_microzed_defconfig
@@ -1,6 +1,6 @@
 CONFIG_SPL=y
 CONFIG_ARM=y
-CONFIG_ZYNQ=y
+CONFIG_ARCH_ZYNQ=y
 CONFIG_TARGET_ZYNQ_MICROZED=y
 CONFIG_OF_CONTROL=y
 CONFIG_FIT=y
diff --git a/configs/zynq_zc70x_defconfig b/configs/zynq_zc70x_defconfig
index a8ef97f..4496059 100644
--- a/configs/zynq_zc70x_defconfig
+++ b/configs/zynq_zc70x_defconfig
@@ -1,6 +1,6 @@
 CONFIG_SPL=y
 CONFIG_ARM=y
-CONFIG_ZYNQ=y
+CONFIG_ARCH_ZYNQ=y
 CONFIG_TARGET_ZYNQ_ZC70X=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE=zynq-zc702
diff --git a/configs/zynq_zc770_xm010_defconfig 
b/configs/zynq_zc770_xm010_defconfig
index ecd245a..a2d294e 100644
--- a/configs/zynq_zc770_xm010_defconfig
+++ b/configs/zynq_zc770_xm010_defconfig
@@ -1,7 +1,7 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS=ZC770_XM010
 CONFIG_ARM=y
-CONFIG_ZYNQ=y
+CONFIG_ARCH_ZYNQ=y
 CONFIG_TARGET_ZYNQ_ZC770=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE=zynq-zc770-xm010
diff --git a/configs/zynq_zc770_xm012_defconfig 
b/configs/zynq_zc770_xm012_defconfig
index 341a4d8..3e7b8ed 100644
--- a/configs/zynq_zc770_xm012_defconfig
+++ b/configs/zynq_zc770_xm012_defconfig
@@ -1,7 +1,7 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS=ZC770_XM012
 CONFIG_ARM=y
-CONFIG_ZYNQ=y
+CONFIG_ARCH_ZYNQ=y
 CONFIG_TARGET_ZYNQ_ZC770=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE=zynq-zc770-xm012
diff --git a/configs/zynq_zc770_xm013_defconfig 
b/configs/zynq_zc770_xm013_defconfig
index ee08a9f..9563542 100644
--- a/configs/zynq_zc770_xm013_defconfig
+++ b/configs/zynq_zc770_xm013_defconfig
@@ -1,7 +1,7 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS=ZC770_XM013
 CONFIG_ARM=y
-CONFIG_ZYNQ=y
+CONFIG_ARCH_ZYNQ=y
 CONFIG_TARGET_ZYNQ_ZC770=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE=zynq-zc770-xm013
diff --git a/configs/zynq_zed_defconfig b/configs/zynq_zed_defconfig
index 2500d84..1decba4 100644
--- a/configs/zynq_zed_defconfig
+++ b/configs/zynq_zed_defconfig
@@ -1,6 +1,6 @@
 CONFIG_SPL=y
 CONFIG_ARM=y
-CONFIG_ZYNQ=y
+CONFIG_ARCH_ZYNQ=y
 CONFIG_TARGET_ZYNQ_ZED=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE=zynq-zed
diff --git a/configs/zynq_zybo_defconfig b/configs/zynq_zybo_defconfig
index c9d0121..6a47d5d 100644
--- a/configs/zynq_zybo_defconfig
+++ b/configs/zynq_zybo_defconfig
@@ -1,6 +1,6 @@
 CONFIG_SPL=y
 CONFIG_ARM=y
-CONFIG_ZYNQ=y
+CONFIG_ARCH_ZYNQ=y
 CONFIG_TARGET_ZYNQ_ZYBO=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE=zynq-zybo
-- 
1.9.1

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


[U-Boot] [PATCH 3/4] ARM: zynq: move SoC headers to mach-zynq/include/mach

2015-03-16 Thread Masahiro Yamada
Move arch/arm/include/asm/arch-zynq/*
  - arch/arm/mach-zynq/include/mach/*

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
---

 arch/arm/{include/asm/arch-zynq = mach-zynq/include/mach}/clk.h   | 0
 arch/arm/{include/asm/arch-zynq = mach-zynq/include/mach}/gpio.h  | 0
 arch/arm/{include/asm/arch-zynq = mach-zynq/include/mach}/hardware.h  | 0
 arch/arm/{include/asm/arch-zynq = mach-zynq/include/mach}/sys_proto.h | 0
 4 files changed, 0 insertions(+), 0 deletions(-)
 rename arch/arm/{include/asm/arch-zynq = mach-zynq/include/mach}/clk.h (100%)
 rename arch/arm/{include/asm/arch-zynq = mach-zynq/include/mach}/gpio.h (100%)
 rename arch/arm/{include/asm/arch-zynq = mach-zynq/include/mach}/hardware.h 
(100%)
 rename arch/arm/{include/asm/arch-zynq = mach-zynq/include/mach}/sys_proto.h 
(100%)

diff --git a/arch/arm/include/asm/arch-zynq/clk.h 
b/arch/arm/mach-zynq/include/mach/clk.h
similarity index 100%
rename from arch/arm/include/asm/arch-zynq/clk.h
rename to arch/arm/mach-zynq/include/mach/clk.h
diff --git a/arch/arm/include/asm/arch-zynq/gpio.h 
b/arch/arm/mach-zynq/include/mach/gpio.h
similarity index 100%
rename from arch/arm/include/asm/arch-zynq/gpio.h
rename to arch/arm/mach-zynq/include/mach/gpio.h
diff --git a/arch/arm/include/asm/arch-zynq/hardware.h 
b/arch/arm/mach-zynq/include/mach/hardware.h
similarity index 100%
rename from arch/arm/include/asm/arch-zynq/hardware.h
rename to arch/arm/mach-zynq/include/mach/hardware.h
diff --git a/arch/arm/include/asm/arch-zynq/sys_proto.h 
b/arch/arm/mach-zynq/include/mach/sys_proto.h
similarity index 100%
rename from arch/arm/include/asm/arch-zynq/sys_proto.h
rename to arch/arm/mach-zynq/include/mach/sys_proto.h
-- 
1.9.1

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


[U-Boot] [PATCH 1/4] ARM: zynq: pass -mfpu=neon only to lowlevel_init.S

2015-03-16 Thread Masahiro Yamada
The comment line in arch/arm/cpu/armv7/zynq/config.mk says that
the option -mfpu=neon is necessary for compiling lowlevel_init.S.
We do not have to give it to all the source files.

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
---

 arch/arm/cpu/armv7/zynq/Makefile  | 1 +
 arch/arm/cpu/armv7/zynq/config.mk | 7 ---
 2 files changed, 1 insertion(+), 7 deletions(-)
 delete mode 100644 arch/arm/cpu/armv7/zynq/config.mk

diff --git a/arch/arm/cpu/armv7/zynq/Makefile b/arch/arm/cpu/armv7/zynq/Makefile
index 901f2ce..bf29b4d 100644
--- a/arch/arm/cpu/armv7/zynq/Makefile
+++ b/arch/arm/cpu/armv7/zynq/Makefile
@@ -14,4 +14,5 @@ obj-y += ddrc.o
 obj-y  += slcr.o
 obj-y  += clk.o
 obj-y  += lowlevel_init.o
+AFLAGS_lowlevel_init.o := -mfpu=neon
 obj-$(CONFIG_SPL_BUILD)+= spl.o
diff --git a/arch/arm/cpu/armv7/zynq/config.mk 
b/arch/arm/cpu/armv7/zynq/config.mk
deleted file mode 100644
index 778a377..000
--- a/arch/arm/cpu/armv7/zynq/config.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# Copyright (C) 2013 - 2015 Xilinx, Inc. All rights reserved.
-#
-# SPDX-License-Identifier:  GPL-2.0
-#
-# Allow NEON instructions (needed for lowlevel_init.S with GNU toolchain)
-PLATFORM_RELFLAGS += -mfpu=neon
-- 
1.9.1

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


[U-Boot] [PATCH 2/4] ARM: zynq: move SoC sources to mach-zynq

2015-03-16 Thread Masahiro Yamada
Move arch/arm/cpu/armv7/zynq/* - arch/arm/mach-zynq/*

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
---

 arch/arm/Kconfig   | 2 +-
 arch/arm/Makefile  | 1 +
 arch/arm/cpu/armv7/Makefile| 1 -
 arch/arm/{cpu/armv7/zynq = mach-zynq}/Kconfig | 0
 arch/arm/{cpu/armv7/zynq = mach-zynq}/Makefile| 0
 arch/arm/{cpu/armv7/zynq = mach-zynq}/clk.c   | 0
 arch/arm/{cpu/armv7/zynq = mach-zynq}/cpu.c   | 0
 arch/arm/{cpu/armv7/zynq = mach-zynq}/ddrc.c  | 0
 arch/arm/{cpu/armv7/zynq = mach-zynq}/lowlevel_init.S | 0
 arch/arm/{cpu/armv7/zynq = mach-zynq}/slcr.c  | 0
 arch/arm/{cpu/armv7/zynq = mach-zynq}/spl.c   | 0
 arch/arm/{cpu/armv7/zynq = mach-zynq}/timer.c | 0
 arch/arm/{cpu/armv7/zynq = mach-zynq}/u-boot-spl.lds  | 0
 arch/arm/{cpu/armv7/zynq = mach-zynq}/u-boot.lds  | 0
 include/configs/zynq-common.h  | 4 ++--
 15 files changed, 4 insertions(+), 4 deletions(-)
 rename arch/arm/{cpu/armv7/zynq = mach-zynq}/Kconfig (100%)
 rename arch/arm/{cpu/armv7/zynq = mach-zynq}/Makefile (100%)
 rename arch/arm/{cpu/armv7/zynq = mach-zynq}/clk.c (100%)
 rename arch/arm/{cpu/armv7/zynq = mach-zynq}/cpu.c (100%)
 rename arch/arm/{cpu/armv7/zynq = mach-zynq}/ddrc.c (100%)
 rename arch/arm/{cpu/armv7/zynq = mach-zynq}/lowlevel_init.S (100%)
 rename arch/arm/{cpu/armv7/zynq = mach-zynq}/slcr.c (100%)
 rename arch/arm/{cpu/armv7/zynq = mach-zynq}/spl.c (100%)
 rename arch/arm/{cpu/armv7/zynq = mach-zynq}/timer.c (100%)
 rename arch/arm/{cpu/armv7/zynq = mach-zynq}/u-boot-spl.lds (100%)
 rename arch/arm/{cpu/armv7/zynq = mach-zynq}/u-boot.lds (100%)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index b9ebee1..7af1e4b 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -755,7 +755,7 @@ source arch/arm/mach-uniphier/Kconfig
 
 source arch/arm/mach-versatile/Kconfig
 
-source arch/arm/cpu/armv7/zynq/Kconfig
+source arch/arm/mach-zynq/Kconfig
 
 source arch/arm/cpu/armv7/Kconfig
 
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 08946de..45cb1d2 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -17,6 +17,7 @@ machine-$(CONFIG_ORION5X) += orion5x
 machine-$(CONFIG_TEGRA)+= tegra
 machine-$(CONFIG_ARCH_UNIPHIER)+= uniphier
 machine-$(CONFIG_ARCH_VERSATILE)   += versatile
+machine-$(CONFIG_ZYNQ) += zynq
 
 machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
 
diff --git a/arch/arm/cpu/armv7/Makefile b/arch/arm/cpu/armv7/Makefile
index 1312a9d..204cbdd 100644
--- a/arch/arm/cpu/armv7/Makefile
+++ b/arch/arm/cpu/armv7/Makefile
@@ -57,4 +57,3 @@ obj-$(if $(filter stv0991,$(SOC)),y) += stv0991/
 obj-$(CONFIG_ARCH_SUNXI) += sunxi/
 obj-$(CONFIG_U8500) += u8500/
 obj-$(CONFIG_VF610) += vf610/
-obj-$(CONFIG_ZYNQ) += zynq/
diff --git a/arch/arm/cpu/armv7/zynq/Kconfig b/arch/arm/mach-zynq/Kconfig
similarity index 100%
rename from arch/arm/cpu/armv7/zynq/Kconfig
rename to arch/arm/mach-zynq/Kconfig
diff --git a/arch/arm/cpu/armv7/zynq/Makefile b/arch/arm/mach-zynq/Makefile
similarity index 100%
rename from arch/arm/cpu/armv7/zynq/Makefile
rename to arch/arm/mach-zynq/Makefile
diff --git a/arch/arm/cpu/armv7/zynq/clk.c b/arch/arm/mach-zynq/clk.c
similarity index 100%
rename from arch/arm/cpu/armv7/zynq/clk.c
rename to arch/arm/mach-zynq/clk.c
diff --git a/arch/arm/cpu/armv7/zynq/cpu.c b/arch/arm/mach-zynq/cpu.c
similarity index 100%
rename from arch/arm/cpu/armv7/zynq/cpu.c
rename to arch/arm/mach-zynq/cpu.c
diff --git a/arch/arm/cpu/armv7/zynq/ddrc.c b/arch/arm/mach-zynq/ddrc.c
similarity index 100%
rename from arch/arm/cpu/armv7/zynq/ddrc.c
rename to arch/arm/mach-zynq/ddrc.c
diff --git a/arch/arm/cpu/armv7/zynq/lowlevel_init.S 
b/arch/arm/mach-zynq/lowlevel_init.S
similarity index 100%
rename from arch/arm/cpu/armv7/zynq/lowlevel_init.S
rename to arch/arm/mach-zynq/lowlevel_init.S
diff --git a/arch/arm/cpu/armv7/zynq/slcr.c b/arch/arm/mach-zynq/slcr.c
similarity index 100%
rename from arch/arm/cpu/armv7/zynq/slcr.c
rename to arch/arm/mach-zynq/slcr.c
diff --git a/arch/arm/cpu/armv7/zynq/spl.c b/arch/arm/mach-zynq/spl.c
similarity index 100%
rename from arch/arm/cpu/armv7/zynq/spl.c
rename to arch/arm/mach-zynq/spl.c
diff --git a/arch/arm/cpu/armv7/zynq/timer.c b/arch/arm/mach-zynq/timer.c
similarity index 100%
rename from arch/arm/cpu/armv7/zynq/timer.c
rename to arch/arm/mach-zynq/timer.c
diff --git a/arch/arm/cpu/armv7/zynq/u-boot-spl.lds 
b/arch/arm/mach-zynq/u-boot-spl.lds
similarity index 100%
rename from arch/arm/cpu/armv7/zynq/u-boot-spl.lds
rename to arch/arm/mach-zynq/u-boot-spl.lds
diff --git a/arch/arm/cpu/armv7/zynq/u-boot.lds b/arch/arm/mach-zynq/u-boot.lds
similarity index 100%
rename from arch/arm/cpu/armv7/zynq/u-boot.lds
rename to arch/arm/mach-zynq/u-boot.lds
diff --git a/include/configs/zynq-common.h 

[U-Boot] [PATCH 0/4] ARM: zynq: move sources to mach-zynq

2015-03-16 Thread Masahiro Yamada



Masahiro Yamada (4):
  ARM: zynq: pass -mfpu=neon only to lowlevel_init.S
  ARM: zynq: move SoC sources to mach-zynq
  ARM: zynq: move SoC headers to mach-zynq/include/mach
  ARM: zynq: rename CONFIG_ZYNQ to CONFIG_ARCH_ZYNQ

 arch/arm/Kconfig   | 4 ++--
 arch/arm/Makefile  | 1 +
 arch/arm/cpu/armv7/Makefile| 1 -
 arch/arm/cpu/armv7/zynq/config.mk  | 7 ---
 arch/arm/dts/Makefile  | 2 +-
 arch/arm/{cpu/armv7/zynq = mach-zynq}/Kconfig | 2 +-
 arch/arm/{cpu/armv7/zynq = mach-zynq}/Makefile| 1 +
 arch/arm/{cpu/armv7/zynq = mach-zynq}/clk.c   | 0
 arch/arm/{cpu/armv7/zynq = mach-zynq}/cpu.c   | 0
 arch/arm/{cpu/armv7/zynq = mach-zynq}/ddrc.c  | 0
 arch/arm/{include/asm/arch-zynq = mach-zynq/include/mach}/clk.h   | 0
 arch/arm/{include/asm/arch-zynq = mach-zynq/include/mach}/gpio.h  | 0
 .../{include/asm/arch-zynq = mach-zynq/include/mach}/hardware.h   | 0
 .../{include/asm/arch-zynq = mach-zynq/include/mach}/sys_proto.h  | 0
 arch/arm/{cpu/armv7/zynq = mach-zynq}/lowlevel_init.S | 0
 arch/arm/{cpu/armv7/zynq = mach-zynq}/slcr.c  | 0
 arch/arm/{cpu/armv7/zynq = mach-zynq}/spl.c   | 0
 arch/arm/{cpu/armv7/zynq = mach-zynq}/timer.c | 0
 arch/arm/{cpu/armv7/zynq = mach-zynq}/u-boot-spl.lds  | 0
 arch/arm/{cpu/armv7/zynq = mach-zynq}/u-boot.lds  | 0
 configs/zynq_microzed_defconfig| 2 +-
 configs/zynq_zc70x_defconfig   | 2 +-
 configs/zynq_zc770_xm010_defconfig | 2 +-
 configs/zynq_zc770_xm012_defconfig | 2 +-
 configs/zynq_zc770_xm013_defconfig | 2 +-
 configs/zynq_zed_defconfig | 2 +-
 configs/zynq_zybo_defconfig| 2 +-
 include/configs/zynq-common.h  | 4 ++--
 28 files changed, 15 insertions(+), 21 deletions(-)
 delete mode 100644 arch/arm/cpu/armv7/zynq/config.mk
 rename arch/arm/{cpu/armv7/zynq = mach-zynq}/Kconfig (98%)
 rename arch/arm/{cpu/armv7/zynq = mach-zynq}/Makefile (90%)
 rename arch/arm/{cpu/armv7/zynq = mach-zynq}/clk.c (100%)
 rename arch/arm/{cpu/armv7/zynq = mach-zynq}/cpu.c (100%)
 rename arch/arm/{cpu/armv7/zynq = mach-zynq}/ddrc.c (100%)
 rename arch/arm/{include/asm/arch-zynq = mach-zynq/include/mach}/clk.h (100%)
 rename arch/arm/{include/asm/arch-zynq = mach-zynq/include/mach}/gpio.h (100%)
 rename arch/arm/{include/asm/arch-zynq = mach-zynq/include/mach}/hardware.h 
(100%)
 rename arch/arm/{include/asm/arch-zynq = mach-zynq/include/mach}/sys_proto.h 
(100%)
 rename arch/arm/{cpu/armv7/zynq = mach-zynq}/lowlevel_init.S (100%)
 rename arch/arm/{cpu/armv7/zynq = mach-zynq}/slcr.c (100%)
 rename arch/arm/{cpu/armv7/zynq = mach-zynq}/spl.c (100%)
 rename arch/arm/{cpu/armv7/zynq = mach-zynq}/timer.c (100%)
 rename arch/arm/{cpu/armv7/zynq = mach-zynq}/u-boot-spl.lds (100%)
 rename arch/arm/{cpu/armv7/zynq = mach-zynq}/u-boot.lds (100%)

-- 
1.9.1

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


Re: [U-Boot] Commit 7ae47f6b causes a warning

2015-03-16 Thread Hannes Petermaier
 Hello Hannes,
Hi Albert,
many thanks - i will fix this, probably on wednesday and send a patch.

best regards,
Hannes

 
 On Tue,  3 Feb 2015 13:22:34 +0100, Hannes Petermaier oe5...@oevsv.at
 wrote:
 
  diff --git a/include/configs/bur_am335x_common.h 
b/include/configs/bur_am335x_common.h
  index e9d5d01..d7ea1c9 100644
  --- a/include/configs/bur_am335x_common.h
  +++ b/include/configs/bur_am335x_common.h
  @@ -12,6 +12,23 @@
   #ifndef __BUR_AM335X_COMMON_H__
   #define __BUR_AM335X_COMMON_H__
   /* 
- 
*/
  +#define BUR_COMMON_ENV \
  +defaultip=192.168.60.253\0 \
  +defaultsip=192.168.60.254\0 \
  +netconsole=echo switching to network console ...;  \
  +if dhcp; then  \
  +setenv ncip ${serverip}; else  \
  +setenv ncip 192.168.60.254;  \
  +setenv serverip 192.168.60.254;  \
  +setenv gatewayip 192.168.60.254;  \
  +setenv ipaddr 192.168.60.1;  \
  +fi; \
  +setenv netdisplay0 ' \
  +setcurs 1 9; puts myip; setcurs 10 9; puts ${ipaddr}; \
  +setcurs 1 10;puts serverip; setcurs 10 10; puts ${serverip}\;' \
 
 This line contains a '\;' sequence which gcc warns against:
 
cc1: warning: unknown escape sequence: '\;' [enabled by default]
 
 Could you post a fix?
 

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


Re: [U-Boot] [PATCH] sbc8548: document how to write main flash from alternate flash

2015-03-16 Thread York Sun


On 03/16/2015 10:57 AM, Paul Gortmaker wrote:
 If you are running on the alternate flash in order to fix a
 corrupted main flash image, it might be good to have the steps
 for that documented as well.
 
 Signed-off-by: Paul Gortmaker paul.gortma...@windriver.com
 ---
  board/sbc8548/README | 12 
  1 file changed, 12 insertions(+)
 
 diff --git a/board/sbc8548/README b/board/sbc8548/README
 index feac5e3e63e5..493ea837ba3b 100644
 --- a/board/sbc8548/README
 +++ b/board/sbc8548/README
 @@ -138,6 +138,18 @@ image in the SODIMM that is built with 
 CONFIG_SYS_ALT_BOOT enabled,
   md eff0 10
   protect on all
  
 +If you are running the alternate 64MB /CS0 settings and want to update
 +the normal default 8MB u-boot image, then (built with CONFIG_SYS_ALT_BOOT
 +disabled) the steps will become:
 +
 + tftp u-boot.bin
 + md 20 10
 + protect off all
 + erase effa efff
 + cp.b 20 effa 6
 + md effa 10
 + protect on all
 +
  Finally, if you are running the alternate 64MB /CS0 settings and want
  to update the in-use u-boot image, then (again with CONFIG_SYS_ALT_BOOT
  enabled) the steps will become:
 

It's good to have it documented. I don't think the protect command is needed
in this case (and some other cases in this README). You are not flashing current
booting image, the protection is just a software flag which only marks RO for
current image. You can confirm by running flinfo to show all sectors. The
protected sectors have RO.

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


Re: [U-Boot] [PATCH] board/BuR/common: fix compiler warning

2015-03-16 Thread Tom Rini
On Mon, Mar 16, 2015 at 07:20:31PM +0100, Hannes Petermaier wrote:

 From: Hannes Petermaier hannes.peterma...@br-automation.com
 
 Signed-off-by: Hannes Petermaier hannes.peterma...@br-automation.com
 Signed-off-by: Hannes Petermaier oe5...@oevsv.at

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] sbc8548: document how to write main flash from alternate flash

2015-03-16 Thread Paul Gortmaker
If you are running on the alternate flash in order to fix a
corrupted main flash image, it might be good to have the steps
for that documented as well.

Signed-off-by: Paul Gortmaker paul.gortma...@windriver.com
---
 board/sbc8548/README | 12 
 1 file changed, 12 insertions(+)

diff --git a/board/sbc8548/README b/board/sbc8548/README
index feac5e3e63e5..493ea837ba3b 100644
--- a/board/sbc8548/README
+++ b/board/sbc8548/README
@@ -138,6 +138,18 @@ image in the SODIMM that is built with CONFIG_SYS_ALT_BOOT 
enabled,
md eff0 10
protect on all
 
+If you are running the alternate 64MB /CS0 settings and want to update
+the normal default 8MB u-boot image, then (built with CONFIG_SYS_ALT_BOOT
+disabled) the steps will become:
+
+   tftp u-boot.bin
+   md 20 10
+   protect off all
+   erase effa efff
+   cp.b 20 effa 6
+   md effa 10
+   protect on all
+
 Finally, if you are running the alternate 64MB /CS0 settings and want
 to update the in-use u-boot image, then (again with CONFIG_SYS_ALT_BOOT
 enabled) the steps will become:
-- 
2.2.1

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


[U-Boot] [PATCH v2] sbc8548: document how to write main flash from alternate flash

2015-03-16 Thread Paul Gortmaker
If you are running on the alternate flash in order to fix a
corrupted main flash image, it might be good to have the steps
for that documented as well.

Also delete any protect commands from non-active flash banks;
they are only required for the instances where you are writing
to the currently in use flash image.

Signed-off-by: Paul Gortmaker paul.gortma...@windriver.com
---

[v2: drop protect commands from instances where we flash the non
 active flash bank ; it wasn't protected anyway.]

 board/sbc8548/README | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/board/sbc8548/README b/board/sbc8548/README
index feac5e3e63e5..92731645f266 100644
--- a/board/sbc8548/README
+++ b/board/sbc8548/README
@@ -132,11 +132,19 @@ image in the SODIMM that is built with 
CONFIG_SYS_ALT_BOOT enabled,
 
tftp u-boot.bin
md 20 10
-   protect off all
era eff0 efff
cp.b 20 eff0 10
md eff0 10
-   protect on all
+
+If you are running the alternate 64MB /CS0 settings and want to update
+the normal default 8MB u-boot image, then (built with CONFIG_SYS_ALT_BOOT
+disabled) the steps will become:
+
+   tftp u-boot.bin
+   md 20 10
+   erase effa efff
+   cp.b 20 effa 6
+   md effa 10
 
 Finally, if you are running the alternate 64MB /CS0 settings and want
 to update the in-use u-boot image, then (again with CONFIG_SYS_ALT_BOOT
-- 
2.2.1

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


Re: [U-Boot] [PATCH v2] sbc8548: document how to write main flash from alternate flash

2015-03-16 Thread York Sun


On 03/16/2015 12:53 PM, Paul Gortmaker wrote:
 If you are running on the alternate flash in order to fix a
 corrupted main flash image, it might be good to have the steps
 for that documented as well.
 
 Also delete any protect commands from non-active flash banks;
 they are only required for the instances where you are writing
 to the currently in use flash image.
 
 Signed-off-by: Paul Gortmaker paul.gortma...@windriver.com
 ---
 
 [v2: drop protect commands from instances where we flash the non
  active flash bank ; it wasn't protected anyway.]
 
  board/sbc8548/README | 12 ++--
  1 file changed, 10 insertions(+), 2 deletions(-)
 
 diff --git a/board/sbc8548/README b/board/sbc8548/README
 index feac5e3e63e5..92731645f266 100644
 --- a/board/sbc8548/README
 +++ b/board/sbc8548/README
 @@ -132,11 +132,19 @@ image in the SODIMM that is built with 
 CONFIG_SYS_ALT_BOOT enabled,
  
   tftp u-boot.bin
   md 20 10
 - protect off all
   era eff0 efff
   cp.b 20 eff0 10
   md eff0 10
 - protect on all
 +
 +If you are running the alternate 64MB /CS0 settings and want to update
 +the normal default 8MB u-boot image, then (built with CONFIG_SYS_ALT_BOOT
 +disabled) the steps will become:
 +
 + tftp u-boot.bin
 + md 20 10
 + erase effa efff
 + cp.b 20 effa 6
 + md effa 10
  
  Finally, if you are running the alternate 64MB /CS0 settings and want
  to update the in-use u-boot image, then (again with CONFIG_SYS_ALT_BOOT
 

Paul,

Sorry I didn't catch this in previous version. In your instruction, you presume
the tftp location is 0x20, which may not be the case. I suggest you add
specific location in tftp command so it is clear.

I also noticed the file size seems different in your README, comparing with the
section above. It may be worth to double check.

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


[U-Boot] [PATCH] serial/serial_arc: set registers address during compilation

2015-03-16 Thread Alexey Brodkin
Being global variable with 0 value it falls into .bss area which we may
only use after relocation to RAM. And right after relocation we zero
.bss - effectively cleaing register address set for early console.

Now with pre-set value regs variable is no longer in .bss and this way
safely survives relocation.

Signed-off-by: Alexey Brodkin abrod...@synopsys.com
---
 drivers/serial/serial_arc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/serial/serial_arc.c b/drivers/serial/serial_arc.c
index 2ddbf32..0ee8ce5 100644
--- a/drivers/serial/serial_arc.c
+++ b/drivers/serial/serial_arc.c
@@ -28,7 +28,7 @@ struct arc_serial_regs {
 #define UART_OVERFLOW_ERR  (1  1)
 #define UART_TXEMPTY   (1  7)
 
-struct arc_serial_regs *regs;
+struct arc_serial_regs *regs = (struct arc_serial_regs *)CONFIG_ARC_UART_BASE;
 
 static void arc_serial_setbrg(void)
 {
@@ -60,7 +60,6 @@ static void arc_serial_setbrg(void)
 
 static int arc_serial_init(void)
 {
-   regs = (struct arc_serial_regs *)CONFIG_ARC_UART_BASE;
serial_setbrg();
return 0;
 }
-- 
2.1.0

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


[U-Boot] [PATCH] common/board_f: make board_init_f_mem() independent on !CONFIG_X86

2015-03-16 Thread Alexey Brodkin
Even though board_init_f_mem() is not used on x86 today there's no
reason to not use it in the future.

Moreover board_init_f_mem() has nothing to do with any particular
architecture so move it away from #else /* CONFIG_X86 */

Signed-off-by: Alexey Brodkin abrod...@synopsys.com
Cc: Simon Glass s...@chromium.org
Cc: Tom Rini tr...@ti.com
---
 common/board_f.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/board_f.c b/common/board_f.c
index 731b539..f0c 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -1079,7 +1079,8 @@ void board_init_f_r(void)
/* NOTREACHED - board_init_r() does not return */
hang();
 }
-#else
+#endif /* CONFIG_X86 */
+
 ulong board_init_f_mem(ulong top)
 {
/* Leave space for the stack we are running with now */
@@ -1097,4 +1098,3 @@ ulong board_init_f_mem(ulong top)
 
return top;
 }
-#endif /* CONFIG_X86 */
-- 
2.1.0

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


Re: [U-Boot] [PATCH 4/4] common/lcd_console: introduce display/framebuffer rotation

2015-03-16 Thread Hannes Petermaier
 Hi Hannes,
Hi Igor,

  +/* setup text-console */
  +debug([LCD] setting up console...\n);
  +#ifdef CONFIG_LCD_ROTATION
  +lcd_init_console(lcd_base,
  + panel_info.vl_col,
  + panel_info.vl_row,
  + panel_info.vl_rot);
#else
  -console_rows = panel_info.vl_row / VIDEO_FONT_HEIGHT;
  +lcd_init_console(lcd_base,
  + panel_info.vl_col,
  + panel_info.vl_row,
  + 0);
#endif
  Please, don't start the #ifdef mess here...
  just always pass the panel_info.vl_rot.
  This is not possible, because 'vl_rot' does'nt exist if
  CONFIG_LCD_ROTATION is not defined. (have a look into lcd.h).
 
 Of course I did before sending the reply...
 What I'm trying to say is - let it exist and default to 0 angle 
rotation.
 
  I made this to be compatible to all who have allready initialized a
  panel_info without vl_rot.
 
 This increases the mess and I think is not sensible enough.
 Just change the users to initialize the panel_info with vl_rot.
 I think also that default initialization of globals is 0, right?
 If so, those users that do not initialize the vl_rot explicitly,
 should have it initialized to 0 implicitly by compiler.
Yes, thats a good idea. I will check if the compiler really initializes 
the global
struct panel_info with zero and change this.
 
[...]
}
+static inline void console_setrow180(u32 row, int clr)
  +{
  +int i;
  +uchar *dst = (uchar *)(cons.lcd_address +
  +   (cons.rows-row-1) * VIDEO_FONT_HEIGHT *
  +   cons.lcdsizex * PIXLBYTES);
  +
  +fbptr_t *d = (fbptr_t *)dst;
  +for (i = 0; i  (VIDEO_FONT_HEIGHT * cons.lcdsizex); i++)
  +*d++ = clr;
  +}
  +
  +static inline void console_moverow180(u32 rowdst, u32 rowsrc)
  +{
  +int i;
  +uchar *dst = (uchar *)(cons.lcd_address +
  +   (cons.rows-rowdst-1) * VIDEO_FONT_HEIGHT *
  +   cons.lcdsizex * PIXLBYTES);
  +
  +uchar *src = (uchar *)(cons.lcd_address +
  +   (cons.rows-rowsrc-1) * VIDEO_FONT_HEIGHT *
  +   cons.lcdsizex * PIXLBYTES);
  +
  +fbptr_t *pdst = (fbptr_t *)dst;
  +fbptr_t *psrc = (fbptr_t *)src;
  +for (i = 0; i  (VIDEO_FONT_HEIGHT * cons.lcdsizex); i++)
  +*pdst++ = *psrc++;
  +}
  +
  +#endif /* CONFIG_LCD_ROTATION */
  Can't this whole thing go into a separate file?
  So, the console stuff will only define weak functions which can be 
overridden
  by the rotation functionality.
  This will keep the console code clean (also from ifdefs) and have the 
rotation
  functionality cleanly added by a CONFIG_ symbol, which will control 
the
  compilation for the separate file.
  Might be possible, which name should we give to it ? 
lcd_console_rotation.c ?
 
 Sounds good.
 
  But how we deal with the function-pointer initialization ?
 
 I think the usual method would do...
 You call some kind of lcd_console_init_rot() with most of the code
 that you currently have in lcd_init_console() that is related to 
rotation.
 If the CONFIG_LCD_ROTATION is not set, then the lcd_init_console() stub
 just returns the 0 rotation config.

I just started to move rotation specific functions into own file, called 
lcd_console_rotation.c and
ran into some trouble.

1) 
I need during initialization the console_calc_rowcol(...) function, which 
is provided by lcd.c.
A possible solution might be to un-static it - but i am not happy with 
this. 
Another way could be to take up vl_rot into console_t structure and pass 
only a pointer to structure to this function and decide inside the 
function.
But this would create a little mix between 0 degree and rotation code.
Yet another idea is to have (also having pointer to console_t in call) in 
lcd_console_rotation also such a calc function which overrides the values 
calculated before.

or maybe you've another solution ?

2)
I need in almost every paint-function the framebuffer base 
(cons.lcd_address) and the screen dimension.
This information is stored in the static structure within lcd.c - i don't 
like to make this public.
A possible solution could be to change all painting function to work 
without some global variable and pass
a third argument, pointer to console_t, and take informations from there. 
This will consume one more register
on function call, runtime is equal i think.

Whats your opinion around this ?

  I would recommend extracting the whole if else ... structure into
  a separate function say lcd_setup_console_rot() or something and
  make the default one doing only the vl_rot == 0 stuff.
  Whats the use of this ?
  Should this also be in a separate file?
 
 Yes, that is how I think it will do better.
 
 Just to explain my points:
 1) make the rotation feature an integrative part of the code by always 
using
the rotation code: if CONFIG_LCD_ROTATION is *not* set then just 
rotate it
to 0 degrees and compile out the rest of the code.
 2) make 

Re: [U-Boot] [PATCH 4/4] common/lcd_console: introduce display/framebuffer rotation

2015-03-16 Thread Hannes Petermaier
Nikita Kiryanov nik...@compulab.co.il schrieb am 15.03.2015 19:56:31:

 
 Hi Hannes,
Hi Nikita,
many thanks for response.
 
 I second Grinberg's suggestion of a separate file and 0 degree default 
(also as a
 fallback for invalid rotation value, see below).
Okay - i will provide a V2 from this patch where i try to implement as 
sugessted, maybe we will need some V3 :-)
Probably on wednesday.

 Some additional comments:
 
  +
  +  If CONFIG_LCD_ROTATION is not defined, the console will be
  +  initialized with 0degree rotation
 
 This is enough. the screen behaves like the days before is vague and 
unnecessary
 (days before what?)
Okay - i will do so.

 
  +static inline void console_setrow0(u32 row, int clr)
  +{
   int i;
  +   uchar *dst = (uchar *)(cons.lcd_address +
  +row * VIDEO_FONT_HEIGHT *
  +cons.lcdsizex * PIXLBYTES);
 
  -   dest = (uchar *)(cons.lcd_address +
  -  y * lcd_line_length + x * NBITS(LCD_BPP) / 8);
  +   fbptr_t *d = (fbptr_t *)dst;
 
 Here you can just create the fbptr variable directly. You have a bunch 
of
 function where this recasting is avoidable.
 
  +   for (i = 0; i  (VIDEO_FONT_HEIGHT * cons.lcdsizex); i++)
  +  *d++ = clr;
  +}

 
  +void lcd_init_console(void *address, int vl_cols, int vl_rows, int 
vl_rot)
  +{
  +   memset(cons, 0, sizeof(cons));
  +   cons.lcd_address = address;
  +
  +   cons.lcdsizex = vl_cols;
  +   cons.lcdsizey = vl_rows;
  +
  +   if (vl_rot == 0) {
  +  cons.fp_putc_xy = lcd_putc_xy0;
  +  cons.fp_console_moverow = console_moverow0;
  +  cons.fp_console_setrow = console_setrow0;
  +  console_calc_rowcol(vl_cols, vl_rows, cons.cols, cons.rows);
  +#ifdef CONFIG_LCD_ROTATION
  +   } else if (vl_rot == 90) {
  +  cons.fp_putc_xy = lcd_putc_xy90;
  +  cons.fp_console_moverow = console_moverow90;
  +  cons.fp_console_setrow = console_setrow90;
  +  console_calc_rowcol(vl_rows, vl_cols, cons.cols, cons.rows);
  +   } else if (vl_rot == 180) {
  +  cons.fp_putc_xy = lcd_putc_xy180;
  +  cons.fp_console_moverow = console_moverow180;
  +  cons.fp_console_setrow = console_setrow180;
  +  console_calc_rowcol(vl_cols, vl_rows, cons.cols, cons.rows);
  +   } else if (vl_rot == 270) {
  +  cons.fp_putc_xy = lcd_putc_xy270;
  +  cons.fp_console_moverow = console_moverow270;
  +  cons.fp_console_setrow = console_setrow270;
  +  console_calc_rowcol(vl_rows, vl_cols, cons.cols, cons.rows);
  +#endif
  +   } else {
  +  puts(lcd_init_console: invalid framebuffer rotation!\n);
 
 This case leaves the function pointers uninitialized, which would crash 
the 
 system later on.
 I suggest you default to 0 degree rotation both for the generic case and 
for 
 the fallback behavior
 (with the warning message where necessary).
Oh my god, i haven't seen this mess ... i will remove it during moving 
lcd_rotation stuff
into separate file.

void lcd_putc(const char c)
{
   if (!lcd_is_enabled) {
  serial_putc(c);
  -
 
 This is a cleanup. It should not be in this patch.
I will make this cleanup in a following patch, after this series has been 
merged.


  --- a/include/lcd_console.h
  +++ b/include/lcd_console.h
  @@ -16,11 +16,12 @@
 * console has.
 *
 * @address: Console base address
  - * @rows: Number of rows in the console
  - * @cols: Number of columns in the console
  + * @vl_rows: Number of rows in the console
  + * @vl_cols: Number of columns in the console
  + * @vl_rot: Rotation of display in degree (0 - 90 - 180 - 270) 
counterlockwise
 */
  -void lcd_init_console(void *address, int rows, int cols);
  -
  +/*void lcd_init_console(void *address, int rows, int cols); */
 
 Please delete this comment
Okay.

 -- 
 Regards,
 Nikita Kiryanov
best regards,
Hannes




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


[U-Boot] [PATCH v2] powerpc/t1023rdb: Add T1023 RDB board support

2015-03-16 Thread Shengzhou Liu
T1023RDB is a Freescale Reference Design Board that hosts the T1023 SoC.

T1023RDB board Overview
---
- T1023 SoC integrating two 64-bit e5500 cores up to 1.4GHz
- CoreNet fabric supporting coherent and noncoherent transactions with
  prioritization and bandwidth allocation
- SDRAM memory: 2GB Micron MT40A512M8HX unbuffered 32-bit DDR4 without ECC
- Accelerator: DPAA components consist of FMan, BMan, QMan, DCE and SEC
- Ethernet interfaces:
  - one 1G RGMII port on-board(RTL8211F PHY)
  - one 1G SGMII port on-board(RTL8211F PHY)
  - one 2.5G SGMII port on-board(AQR105 PHY)
- PCIe: Two Mini-PCIe connectors on-board.
- SerDes: 4 lanes up to 10.3125GHz
- NOR:  128MB S29GL01GS110TFIV10 Spansion NOR Flash
- NAND: 512MB S34MS04G200BFI000 Spansion NAND Flash
- eSPI: 64MB S25FL512SAGMFI010 Spansion SPI flash.
- USB: one Type-A USB 2.0 port with internal PHY
- eSDHC: support SD/MMC card and eMMC on-board
- 256Kbit M24256 I2C EEPROM
- RTC: Real-time clock DS1339 on I2C bus
- UART: one serial port on-board with RJ45 connector
- Debugging: JTAG/COP for T1023 debugging

As well updated T1024RDB to add T1023RDB.

Signed-off-by: Shengzhou Liu shengzhou@freescale.com
---
v2: updated the printout of serdes refclk.

 board/freescale/t102xrdb/Makefile   |  2 +-
 board/freescale/t102xrdb/README | 89 +--
 board/freescale/t102xrdb/eth_t102xrdb.c | 23 ++--
 board/freescale/t102xrdb/t1023_rcw.cfg  |  8 +++
 board/freescale/t102xrdb/t102xrdb.c | 94 +++--
 board/freescale/t102xrdb/t102xrdb.h |  4 +-
 include/configs/T102xRDB.h  | 73 +
 7 files changed, 260 insertions(+), 33 deletions(-)
 create mode 100644 board/freescale/t102xrdb/t1023_rcw.cfg

diff --git a/board/freescale/t102xrdb/Makefile 
b/board/freescale/t102xrdb/Makefile
index a0cf8f6..0520066 100644
--- a/board/freescale/t102xrdb/Makefile
+++ b/board/freescale/t102xrdb/Makefile
@@ -8,7 +8,7 @@ ifdef CONFIG_SPL_BUILD
 obj-y += spl.o
 else
 obj-y   += t102xrdb.o
-obj-y   += cpld.o
+obj-$(CONFIG_T1024RDB)   += cpld.o
 obj-y   += eth_t102xrdb.o
 obj-$(CONFIG_PCI)   += pci.o
 endif
diff --git a/board/freescale/t102xrdb/README b/board/freescale/t102xrdb/README
index 2b17f50..775de06 100644
--- a/board/freescale/t102xrdb/README
+++ b/board/freescale/t102xrdb/README
@@ -98,6 +98,29 @@ T1024RDB board Overview
  - Four I2C ports
 
 
+T1023RDB board Overview
+---
+- T1023 SoC integrating two 64-bit e5500 cores up to 1.4GHz
+- CoreNet fabric supporting coherent and noncoherent transactions with
+  prioritization and bandwidth allocation
+- SDRAM memory: 2GB Micron MT40A512M8HX unbuffered 32-bit DDR4 w/o ECC
+- Accelerator: DPAA components consist of FMan, BMan, QMan, DCE and SEC
+- Ethernet interfaces:
+  - one 1G RGMII port on-board(RTL8211FS PHY)
+  - one 1G SGMII port on-board(RTL8211FS PHY)
+  - one 2.5G SGMII port on-board(AQR105 PHY)
+- PCIe: Two Mini-PCIe connectors on-board.
+- SerDes: 4 lanes up to 10.3125GHz
+- NOR:  128MB S29GL01GS110TFIV10 Spansion NOR Flash
+- NAND: 512MB S34MS04G200BFI000 Spansion NAND Flash
+- eSPI: 64MB S25FL512SAGMFI010 Spansion SPI flash.
+- USB: one Type-A USB 2.0 port with internal PHY
+- eSDHC: support SD/MMC and eMMC card
+- 256Kbit M24256 I2C EEPROM
+- RTC: Real-time clock DS1339U on I2C bus
+- UART: one serial port on-board with RJ45 connector
+- Debugging: JTAG/COP for T1023 debugging
+
 Memory map on T1024RDB
 --
 Start Address  End Address  DescriptionSize
@@ -124,22 +147,32 @@ Start Address   End Address Definition
Max size
 0xEFF2  0xEFF3  u-boot env (current bank)  128KB
 0xEFF0  0xEFF1  FMAN Ucode (current bank)  128KB
 0xEFE0  0xEFE3  QE firmware (current bank) 256KB
-0xED30  0xEFEF  rootfs (alt bank)  44MB
+0xED30  0xEFDF  rootfs (alt bank)  44MB
+0xED00  0xED2F  Guest image #3 (alternate bank) 3MB
+0xECD0  0xECFF  Guest image #2 (alternate bank) 3MB
+0xECA0 0xECCF  Guest image #1 (alternate bank) 3MB
+0xEC90 0xEC9F  HV config device tree(alt bank) 1MB
 0xEC80  0xEC8F  Hardware device tree (alt bank) 1MB
-0xEC02  0xEC7F  Linux.uImage (alt bank)7MB + 
875KB
+0xEC70 0xEC7F  HV.uImage (alternate bank)  1MB
+0xEC02  0xEC6F  Linux.uImage (alt bank)~7MB
 0xEC00  0xEC01  RCW (alt bank) 128KB
 0xEBF4  0xEBFF  u-boot (alt bank)  768KB
 0xEBF2  0xEBF3  u-boot env (alt bank)  128KB
 0xEBF0  0xEBF1  FMAN ucode (alt bank)  128KB
 0xEBE0  0xEBE3  QE firmware (alt bank) 256KB
-0xE930  0xEBEF