[U-Boot] about am335x watchdog

2014-02-25 Thread Yan, Miao
Hi Tom,

   In commit 6843918e0035bf06cb65ad2b4c98b38e86e43bd5: am335x: Enable 
CONFIG_OMAP_WATCHDOG support,
hardware watchdog is enabled for am335x by default which is disabled in SPL,  
is this required by Linux or U-Boot
itself ?
   I am asking because when testing with VxWorks (watchdog driver not 
configured) , I saw random reboot a 
few seconds after kernel booted.  Does U-Boot expect OS to handle such cases  ? 
Thanks.

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


Re: [U-Boot] [PATCH v3 1/7] nand: Add zynq nand controller driver support

2014-02-25 Thread Michal Simek
Hi Scott,

On 02/17/2014 01:26 PM, Siva Durga Prasad Paladugu wrote:
 From: Jagannadha Sutradharudu Teki jaga...@xilinx.com
 
 Added support for Zynq Nand controller driver.
 
 Signed-off-by: Siva Durga Prasad Paladugu siva...@xilinx.com
 Signed-off-by: Jagannadha Sutradharudu Teki jaga...@xilinx.com
 ---
 Changes for v3:
 -Fixed all review comments on v1 as
 some comments are not fixed on v2.
 -Separeted out the nand patch series
 as per Michal comment.
 Changes for v2:
 -Fixed issues pointed by Scott
 ---
  README|3 +
  arch/arm/include/asm/arch-zynq/hardware.h |2 +
  drivers/mtd/nand/Makefile |1 +
  drivers/mtd/nand/zynq_nand.c  | 1188 
 +
  4 files changed, 1194 insertions(+), 0 deletions(-)
  create mode 100755 drivers/mtd/nand/zynq_nand.c

One note: Here is incorrect file permission.

Can you please review this driver?
Patches 2-7 should go through ARM tree but this first one should
go through your tree.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP - KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform




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] arm: am335x: DXR2: Reset SMSC LAN9303 switch via GPIO upon bootup

2014-02-25 Thread Stefan Roese
Since the switch may be re-configured for VLAN usage in Linux (or any
other OS), lets reset the switch to its default register values upon
power-up. Otherwise network might not be available in U-Boot.

Signed-off-by: Stefan Roese s...@denx.de
Cc: Heiko Schocher h...@denx.de
Cc: Roger Meier r.me...@siemens.com
Cc: Lukas Stockmann lukas.stockm...@siemens.com
Cc: Tom Rini tr...@ti.com
---
 board/siemens/dxr2/board.c | 7 +++
 board/siemens/dxr2/mux.c   | 2 ++
 include/configs/dxr2.h | 1 +
 3 files changed, 10 insertions(+)

diff --git a/board/siemens/dxr2/board.c b/board/siemens/dxr2/board.c
index 6c316fa..f87315c 100644
--- a/board/siemens/dxr2/board.c
+++ b/board/siemens/dxr2/board.c
@@ -232,6 +232,13 @@ int board_eth_init(bd_t *bis)
 
factoryset_setenv();
 
+   /* Reset SMSC LAN9303 switch for default configuration */
+   gpio_request(GPIO_LAN9303_NRST, nRST);
+   gpio_direction_output(GPIO_LAN9303_NRST, 0);
+   /* assert active low reset for 200us */
+   udelay(200);
+   gpio_set_value(GPIO_LAN9303_NRST, 1);
+
/* Set rgmii mode and enable rmii clock to be sourced from chip */
writel((RMII_MODE_ENABLE | RMII_CHIPCKL_ENABLE), cdev-miisel);
 
diff --git a/board/siemens/dxr2/mux.c b/board/siemens/dxr2/mux.c
index 5c22999..f2314b5 100644
--- a/board/siemens/dxr2/mux.c
+++ b/board/siemens/dxr2/mux.c
@@ -221,6 +221,8 @@ static struct module_pin_mux gpios_pin_mux[] = {
{OFFSET(ain0), MODE(7) | RXACTIVE | PULLUDDIS},
{OFFSET(vrefp), MODE(7) | RXACTIVE | PULLUDDIS},
{OFFSET(vrefn), MODE(7) | RXACTIVE | PULLUDDIS},
+   /* nRST for SMSC LAN9303 switch - GPIO2_24 */
+   {OFFSET(lcd_pclk), MODE(7) },   /* LAN9303 nRST */
{-1},
 };
 
diff --git a/include/configs/dxr2.h b/include/configs/dxr2.h
index 1e42f5c..b01a9fe 100644
--- a/include/configs/dxr2.h
+++ b/include/configs/dxr2.h
@@ -26,6 +26,7 @@
 
 #define BOARD_DFU_BUTTON_GPIO  27
 #define BOARD_DFU_BUTTON_LED   64
+#define GPIO_LAN9303_NRST  88  /* GPIO2_24 = gpio88 */
 
 #undef CONFIG_DOS_PARTITION
 #undef CONFIG_CMD_FAT
-- 
1.8.5.5

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


[U-Boot] [PATCH v2 2/2] kbuild: Move linker sciript check to prepare1

2014-02-25 Thread Masahiro Yamada
Same as the previous commit.
Move sanity check to prepare1 target to avoid nasty troubles.

Before this commit, LDSCRIPT existence was not checked
when it was specified by CONFIG_SYS_LDSCRIPT.
Now LDSCRIPT existence is checked for all boards.

$(wildcard $(LDSCRIPT)) must point to the linker scripts
with absolute path.
Otherwise, make will terminate with a false error
on out-of-tree build.

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

Changes in v2:
  - Always specify LDSCRIPT with absolute path.
Add $(srctree)/  to  $(CONFIG_SYS_LDSCRIPT).
Modify some config headers to adjust for that.

 Makefile | 9 +
 include/configs/MPC8536DS.h  | 2 +-
 include/configs/MPC8569MDS.h | 2 +-
 include/configs/MPC8572DS.h  | 2 +-
 include/configs/P1023RDS.h   | 2 +-
 include/configs/P1_P2_RDB.h  | 2 +-
 6 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index fffeb7e..d3b0afb 100644
--- a/Makefile
+++ b/Makefile
@@ -495,7 +495,7 @@ ifndef LDSCRIPT
#LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug
ifdef CONFIG_SYS_LDSCRIPT
# need to strip off double quotes
-   LDSCRIPT := $(CONFIG_SYS_LDSCRIPT:%=%)
+   LDSCRIPT := $(srctree)/$(CONFIG_SYS_LDSCRIPT:%=%)
endif
 endif
 
@@ -518,9 +518,6 @@ ifndef LDSCRIPT
# We don't expect a Makefile here
LDSCRIPT_MAKEFILE_DIR =
endif
-   ifeq ($(wildcard $(LDSCRIPT)),)
-$(error could not find linker script)
-   endif
 endif
 
 else
@@ -996,6 +993,10 @@ ifeq ($(CONFIG_SYS_GENERIC_BOARD),y)
@/bin/false
 endif
 endif
+ifeq ($(wildcard $(LDSCRIPT)),)
+   @echo 2   Could not find linker script.
+   @/bin/false
+endif
 
 archprepare: prepare1 scripts_basic
 
diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h
index 57bf04f..9846118 100644
--- a/include/configs/MPC8536DS.h
+++ b/include/configs/MPC8536DS.h
@@ -24,7 +24,7 @@
 #define CONFIG_SYS_TEXT_BASE_SPL 0xfff0
 #define CONFIG_SYS_MONITOR_BASECONFIG_SYS_TEXT_BASE_SPL /* start of 
monitor */
 #else
-#define CONFIG_SYS_LDSCRIPT $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds
+#define CONFIG_SYS_LDSCRIPT $(CPUDIR)/u-boot-nand.lds
 #define CONFIG_SYS_TEXT_BASE   0xf8f82000
 #endif /* CONFIG_NAND_SPL */
 #endif
diff --git a/include/configs/MPC8569MDS.h b/include/configs/MPC8569MDS.h
index 33cadb9..58b9c26 100644
--- a/include/configs/MPC8569MDS.h
+++ b/include/configs/MPC8569MDS.h
@@ -56,7 +56,7 @@ extern unsigned long get_clock_freq(void);
 #define CONFIG_SYS_TEXT_BASE_SPL 0xfff0
 #define CONFIG_SYS_MONITOR_BASECONFIG_SYS_TEXT_BASE_SPL /* start of 
monitor */
 #else
-#define CONFIG_SYS_LDSCRIPT $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds
+#define CONFIG_SYS_LDSCRIPT $(CPUDIR)/u-boot-nand.lds
 #define CONFIG_SYS_TEXT_BASE   0xf8f82000
 #endif
 #endif
diff --git a/include/configs/MPC8572DS.h b/include/configs/MPC8572DS.h
index f457719..7b63945 100644
--- a/include/configs/MPC8572DS.h
+++ b/include/configs/MPC8572DS.h
@@ -24,7 +24,7 @@
 #define CONFIG_SYS_TEXT_BASE_SPL 0xfff0
 #define CONFIG_SYS_MONITOR_BASECONFIG_SYS_TEXT_BASE_SPL /* start of 
monitor */
 #else
-#define CONFIG_SYS_LDSCRIPT $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds
+#define CONFIG_SYS_LDSCRIPT $(CPUDIR)/u-boot-nand.lds
 #define CONFIG_SYS_TEXT_BASE   0xf8f82000
 #endif /* CONFIG_NAND_SPL */
 #endif
diff --git a/include/configs/P1023RDS.h b/include/configs/P1023RDS.h
index ec72c78..2ffa354 100644
--- a/include/configs/P1023RDS.h
+++ b/include/configs/P1023RDS.h
@@ -26,7 +26,7 @@
 #ifdef CONFIG_NAND_SPL
 #define CONFIG_SYS_MONITOR_BASECONFIG_SYS_TEXT_BASE_SPL /* start of 
monitor */
 #else
-#define CONFIG_SYS_LDSCRIPT $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds
+#define CONFIG_SYS_LDSCRIPT $(CPUDIR)/u-boot-nand.lds
 #define CONFIG_SYS_MONITOR_BASECONFIG_SYS_TEXT_BASE/* start of 
monitor */
 #endif /* CONFIG_NAND_SPL */
 #endif
diff --git a/include/configs/P1_P2_RDB.h b/include/configs/P1_P2_RDB.h
index 32ed0c2..2ffaf5c 100644
--- a/include/configs/P1_P2_RDB.h
+++ b/include/configs/P1_P2_RDB.h
@@ -38,7 +38,7 @@
 #define CONFIG_SYS_TEXT_BASE_SPL 0xfff0
 #define CONFIG_SYS_MONITOR_BASECONFIG_SYS_TEXT_BASE_SPL /* start of 
monitor */
 #else
-#define CONFIG_SYS_LDSCRIPT $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds
+#define CONFIG_SYS_LDSCRIPT $(CPUDIR)/u-boot-nand.lds
 #define CONFIG_SYS_TEXT_BASE   0xf8f82000
 #endif /* CONFIG_NAND_SPL */
 #endif
-- 
1.8.3.2

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


[U-Boot] [PATCH v2 0/2] Kbuild: Fix a false error of sanity check

2014-02-25 Thread Masahiro Yamada

Masahiro Yamada (2):
  kbuild: Fix a false error of generic board support
  kbuild: Move linker sciript check to prepare1

 Makefile | 24 
 include/configs/MPC8536DS.h  |  2 +-
 include/configs/MPC8569MDS.h |  2 +-
 include/configs/MPC8572DS.h  |  2 +-
 include/configs/P1023RDS.h   |  2 +-
 include/configs/P1_P2_RDB.h  |  2 +-
 6 files changed, 17 insertions(+), 17 deletions(-)

-- 
1.8.3.2

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


[U-Boot] [PATCH v2 1/2] kbuild: Fix a false error of generic board support

2014-02-25 Thread Masahiro Yamada
Before this commit, make terminated with an error
where is shouldn't under some condition.

This bug happened when we built a board unsupporting
generic board right after building with generic board.

For example, the following sequence failed.
(harmony uses generic board but microblaze-generic does not
support it)

  $ make harmony_config
  Configuring for harmony board...
  $ make CROSS_COMPILE=arm-linux-gnueabi-
[ Build succeed ]
  $ make microblaze-generic_config
  Configuring for microblaze-generic board...
  $ make CROSS_COMPILE=microblaze-linux-
  Makefile:488: *** Your architecture does not support generic board.
  Please undefined CONFIG_SYS_GENERIC_BOARD in your board config file.  Stop.

We had to do make clean before building the microblaze board.

This commit fixes this unconvenience.

Move generic board sanity check to prepare1 target,
which is run after generation of include/autoconf.mk.

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

Changes in v2:
  - Fix commit log.
 s/make mrproper/make clean/

 Makefile | 15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index 84d6db4..fffeb7e 100644
--- a/Makefile
+++ b/Makefile
@@ -485,13 +485,6 @@ ifeq ($(wildcard include/config.mk),)
 $(error System not configured - see README)
 endif
 
-ifeq ($(__HAVE_ARCH_GENERIC_BOARD),)
-ifneq ($(CONFIG_SYS_GENERIC_BOARD),)
-$(error Your architecture does not support generic board. \
-Please undefined CONFIG_SYS_GENERIC_BOARD in your board config file)
-endif
-endif
-
 # If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use
 # that (or fail if absent).  Otherwise, search for a linker script in a
 # standard location.
@@ -996,7 +989,13 @@ endif
 prepare2: prepare3 outputmakefile
 
 prepare1: prepare2 $(version_h) $(timestamp_h)
-   @:
+ifeq ($(__HAVE_ARCH_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.
+   @/bin/false
+endif
+endif
 
 archprepare: prepare1 scripts_basic
 
-- 
1.8.3.2

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


Re: [U-Boot] [U-Boot, v2] part_efi: fix protective mbr struct allocation

2014-02-25 Thread Tom Rini
On Thu, Feb 13, 2014 at 09:48:24AM +0100, Hector Palacios wrote:

 The calloc() call was allocating space for the sizeof the struct
 pointer rather than for the struct contents.
 Besides, since this buffer is passed to mmc for writing and some
 platforms may use cache, the legacy_mbr struct should be cache-aligned.
 
 Signed-off-by: Hector Palacios hector.palac...@digi.com
 Tested-by: Lukasz Majewski l.majew...@samsung.com

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] kbuild: fix SPL link bug when USE_PRIVATE_LIBGCC is yes

2014-02-25 Thread Tom Rini
On Mon, Feb 24, 2014 at 08:44:14PM +0900, Masahiro Yamada wrote:

 Commit 6825a95 (kbuild: use Linux Kernel build scripts)
 changed the behavior of linkage when USE_PRIAVATE_LIBGCC
 is defined as yes.
 (It dropped arch/arm/lib/eabi_compat.o from the
 target library.)
 
 Affected boards are all Tegra boards.
 
 This commit gets back the same behavior as before Kbuild series.
 
 Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
 Cc: Tom Warren twar...@nvidia.com
 Cc: Tom Rini tr...@ti.com

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] fs/fdos: Remove

2014-02-25 Thread Tom Rini
On Fri, Feb 21, 2014 at 08:42:59AM -0500, Tom Rini wrote:

 We have an unused FAT implementation in fs/fdos, remove.
 
 Signed-off-by: Tom Rini tr...@ti.com

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] x86: coreboot: delete unused coreboot/config.mk

2014-02-25 Thread Tom Rini
On Mon, Feb 24, 2014 at 09:36:35PM +0900, Masahiro Yamada wrote:

 HOSTCFLAGS_autoconf.mk.dep was added by commit 422322f
 but it has never been used.
 
 Cc: Vadim Bendebury vben...@chromium.org
 Cc: Simon Glass s...@chromium.org
 Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] boards.cfg: Keep arc entries sorted

2014-02-25 Thread Tom Rini
On Mon, Feb 24, 2014 at 10:32:42AM -0300, Fabio Estevam wrote:

 Run tools/reformat.py -i -d '-' -s 8 boards.cfg boards0.cfg  mv 
 boards0.cfg boards.cfg
 in order to keep arc entries sorted.
 
 Signed-off-by: Fabio Estevam fabio.este...@freescale.com

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] power: fix: Do not execute pmic command when not all necessary parameters are passed

2014-02-25 Thread Tom Rini
On Mon, Feb 24, 2014 at 01:33:08PM +0100, Łukasz Majewski wrote:

 Lack of this check resulted in a data abort when CPU tried to execute the
 following command (without further mandatory input): 'pmic MAX77686_PMIC'.
 
 Only the 'pmic list' command requires one passed parameter.
 Other require at least two valid parameters for correct operation.
 
 Signed-off-by: Lukasz Majewski l.majew...@samsung.com

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] arm: delete unused macro CONFIG_ARCH_DEVICE_TREE

2014-02-25 Thread Tom Rini
On Mon, Feb 24, 2014 at 09:45:48PM +0900, Masahiro Yamada wrote:

 Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
 Cc: Tom Warren twar...@nvidia.com
 Cc: Stephen Warren swar...@nvidia.com
 Cc: Rajeshwari Birje rajeshwar...@samsung.com
 Cc: Inderpal Singh inderpal.si...@linaro.org

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v5] Makefile: add a new script to check -fstack-usage support

2014-02-25 Thread Tom Rini
On Wed, Dec 11, 2013 at 08:11:34PM +0900, Masahiro Yamada wrote:

 If -fstack-usage option is given to crosstools
 that do not support it, gcc displays a warning message
 but still exits with status 0.
 
 This means we can not rely on $(call cc-option,...)
 to detect if -fstack-usage option is supported or not.
 
 Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com

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 V3 00/12] Exynos4: add support for device tree

2014-02-25 Thread Piotr Wilczek
This patch set enables support for device tree on all Exynos4 based boards.

DT support is enabled on Exynos mipi dsim and sdhci drives.
Common board.c file is reused for all functions common for
Exynos4 boards. Board specific files are implemented in the board files.
Origen, Universal, Trats and Trats2 boards are modifed to support device tree.

Changes for v3:
 - moved max77686 init function to smdk5250 board file
 - board DTS files moved to arch/arm/dts
 - rebased on the latest tree

Changes for v2:
 - removed incorrectly implemented check for invalid peripheral id
 - removed unnecesary white space
 - removed panel specific init function 's6e8ax0_init' to the board file
 - removed duplicate DTB node parsing for panel_info.logo_on
 - added (weak) exynos_lcd_panel_init function for panel specific
initialisation from board file
 - fixed checking for SDMMC boundary
 - fiex debug message
 - fixed comment to 'pwr_gpio' struct filed
 - new patch to move checkboard to common file
 - reuse existing common board.c file
 - new patch that removes unused max77686_init function
 - fixed mmc2 addres in DT on Trats2

Piotr Wilczek (12):
  exynos4:pinmux:fdt: decode peripheral id
  video:mipidsim:fdt: Add DT support for mipi dsim driver
  video:exynos_fb:fdt: add additional fdt data
  drivers:mmc:sdhci: enable support for DT
  board:samsung: move checkboard to common file
  arm:exynos: add common DTS file for exynos 4
  board:samsung:common: move max77686 init function
  arm:exynos: enable sdhci and misc_init to common board
  board:origen: Enable device tree on Origen
  board:universal: Enable device tree on Universal
  board:trats: Enable device tree on Trats
  board:trats2: Enable device tree on Trats2

Piotr Wilczek (12):
  exynos4:pinmux:fdt: decode peripheral id
  video:mipidsim:fdt: Add DT support for mipi dsim driver
  video:exynos_fb:fdt: add additional fdt data
  drivers:mmc:sdhci: enable support for DT
  board:samsung: move checkboard to common file
  arm:exynos: add common DTS file for exynos 4
  board:samsung:common: move max77686 init function
  arm:exynos: enable sdhci and misc_init to common board
  board:origen: Enable device tree on Origen
  board:universal: Enable device tree on Universal
  board:trats: Enable device tree on Trats
  board:trats2: Enable device tree on Trats2

 arch/arm/cpu/armv7/exynos/pinmux.c   |  17 ++
 arch/arm/dts/Makefile|   5 +
 arch/arm/dts/exynos4.dtsi| 139 +
 arch/arm/dts/exynos4210-origen.dts   |  45 +++
 arch/arm/dts/exynos4210-trats.dts| 120 
 arch/arm/dts/exynos4210-universal_c210.dts   |  83 +
 arch/arm/dts/exynos4412-trats2.dts   | 434 +++
 arch/arm/include/asm/arch-exynos/board.h |  12 +
 arch/arm/include/asm/arch-exynos/mipi_dsim.h |   5 +
 arch/arm/include/asm/arch-exynos/mmc.h   |   7 +
 board/samsung/common/board.c | 180 ---
 board/samsung/origen/origen.c| 112 +--
 board/samsung/smdk5250/exynos5-dt.c  |  15 -
 board/samsung/smdk5250/smdk5250.c| 125 
 board/samsung/smdk5420/smdk5420.c|  15 -
 board/samsung/trats/trats.c  | 213 +
 board/samsung/trats2/trats2.c| 233 +-
 board/samsung/universal_c210/universal.c | 204 -
 drivers/mmc/s5p_sdhci.c  | 129 
 drivers/video/exynos_fb.c|  21 ++
 drivers/video/exynos_mipi_dsi.c  |  96 ++
 include/configs/exynos4-dt.h | 144 +
 include/configs/origen.h | 117 +++-
 include/configs/s5pc210_universal.h  | 145 +++--
 include/configs/trats.h  | 192 +++-
 include/configs/trats2.h | 198 ++--
 include/fdtdec.h |   2 +
 include/sdhci.h  |   5 +
 lib/fdtdec.c |   2 +
 29 files changed, 1683 insertions(+), 1332 deletions(-)
 create mode 100644 arch/arm/dts/exynos4.dtsi
 create mode 100644 arch/arm/dts/exynos4210-origen.dts
 create mode 100644 arch/arm/dts/exynos4210-trats.dts
 create mode 100644 arch/arm/dts/exynos4210-universal_c210.dts
 create mode 100644 arch/arm/dts/exynos4412-trats2.dts
 create mode 100644 include/configs/exynos4-dt.h

-- 
1.8.3.2

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


[U-Boot] [PATCH V3 01/12] exynos4:pinmux:fdt: decode peripheral id

2014-02-25 Thread Piotr Wilczek
This patch adds api to decode peripheral id based on interrupt number.

Signed-off-by: Piotr Wilczek p.wilc...@samsung.com
Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
CC: Minkyu Kang mk7.k...@samsung.com
---
Changes for v3:
 - none

Changes for v2:
 - removed incorrectly implemented check for invalid peripheral id
 - removed unnecesary white space

 arch/arm/cpu/armv7/exynos/pinmux.c | 17 +
 1 file changed, 17 insertions(+)

diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c 
b/arch/arm/cpu/armv7/exynos/pinmux.c
index 645c497..8d6e5c1 100644
--- a/arch/arm/cpu/armv7/exynos/pinmux.c
+++ b/arch/arm/cpu/armv7/exynos/pinmux.c
@@ -741,6 +741,21 @@ int exynos_pinmux_config(int peripheral, int flags)
 }
 
 #ifdef CONFIG_OF_CONTROL
+static int exynos4_pinmux_decode_periph_id(const void *blob, int node)
+{
+   int err;
+   u32 cell[3];
+
+   err = fdtdec_get_int_array(blob, node, interrupts, cell,
+   ARRAY_SIZE(cell));
+   if (err) {
+   debug( invalid peripheral id\n);
+   return PERIPH_ID_NONE;
+   }
+
+   return cell[1];
+}
+
 static int exynos5_pinmux_decode_periph_id(const void *blob, int node)
 {
int err;
@@ -758,6 +773,8 @@ int pinmux_decode_periph_id(const void *blob, int node)
 {
if (cpu_is_exynos5())
return  exynos5_pinmux_decode_periph_id(blob, node);
+   else if (cpu_is_exynos4())
+   return  exynos4_pinmux_decode_periph_id(blob, node);
else
return PERIPH_ID_NONE;
 }
-- 
1.8.3.2

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


[U-Boot] [PATCH V3 02/12] video:mipidsim:fdt: Add DT support for mipi dsim driver

2014-02-25 Thread Piotr Wilczek
This patch enables parsing mipi data from device tree.
Non device tree case is still supported.

Signed-off-by: Piotr Wilczek p.wilc...@samsung.com
Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
Cc: Minkyu Kang mk7.k...@samsung.com
---
Changes for v3:
 - none

Changes for v2:
 - removed panel specific init function 's6e8ax0_init' to the board file

 arch/arm/include/asm/arch-exynos/mipi_dsim.h |  5 ++
 drivers/video/exynos_mipi_dsi.c  | 96 
 include/fdtdec.h |  1 +
 lib/fdtdec.c |  1 +
 4 files changed, 103 insertions(+)

diff --git a/arch/arm/include/asm/arch-exynos/mipi_dsim.h 
b/arch/arm/include/asm/arch-exynos/mipi_dsim.h
index 40aca71..50e5c25 100644
--- a/arch/arm/include/asm/arch-exynos/mipi_dsim.h
+++ b/arch/arm/include/asm/arch-exynos/mipi_dsim.h
@@ -12,6 +12,7 @@
 
 #include linux/list.h
 #include linux/fb.h
+#include lcd.h
 
 #define PANEL_NAME_SIZE(32)
 
@@ -368,8 +369,12 @@ int exynos_mipi_dsi_register_lcd_device(struct 
mipi_dsim_lcd_device
*lcd_dev);
 
 void exynos_set_dsim_platform_data(struct exynos_platform_mipi_dsim *pd);
+void exynos_init_dsim_platform_data(vidinfo_t *vid);
 
 /* panel driver init based on mipi dsi interface */
 void s6e8ax0_init(void);
 
+#ifdef CONFIG_OF_CONTROL
+extern int mipi_power(void);
+#endif
 #endif /* _DSIM_H */
diff --git a/drivers/video/exynos_mipi_dsi.c b/drivers/video/exynos_mipi_dsi.c
index 8bb8fea..6c10f11 100644
--- a/drivers/video/exynos_mipi_dsi.c
+++ b/drivers/video/exynos_mipi_dsi.c
@@ -9,6 +9,8 @@
 
 #include common.h
 #include malloc.h
+#include fdtdec.h
+#include libfdt.h
 #include linux/err.h
 #include asm/arch/dsim.h
 #include asm/arch/mipi_dsim.h
@@ -22,7 +24,14 @@
 #define master_to_driver(a)(a-dsim_lcd_drv)
 #define master_to_device(a)(a-dsim_lcd_dev)
 
+DECLARE_GLOBAL_DATA_PTR;
+
 static struct exynos_platform_mipi_dsim *dsim_pd;
+#ifdef CONFIG_OF_CONTROL
+static struct mipi_dsim_config dsim_config_dt;
+static struct exynos_platform_mipi_dsim dsim_platform_data_dt;
+static struct mipi_dsim_lcd_device mipi_lcd_device_dt;
+#endif
 
 struct mipi_dsim_ddi {
int bus_id;
@@ -238,3 +247,90 @@ void exynos_set_dsim_platform_data(struct 
exynos_platform_mipi_dsim *pd)
 
dsim_pd = pd;
 }
+
+#ifdef CONFIG_OF_CONTROL
+int exynos_dsim_config_parse_dt(const void *blob)
+{
+   int node;
+
+   node = fdtdec_next_compatible(blob, 0, COMPAT_SAMSUNG_EXYNOS_MIPI_DSI);
+   if (node = 0) {
+   printf(exynos_mipi_dsi: Can't get device node for mipi dsi\n);
+   return -ENODEV;
+   }
+
+   dsim_config_dt.e_interface = fdtdec_get_int(blob, node,
+   samsung,dsim-config-e_interface, 0);
+
+   dsim_config_dt.e_virtual_ch = fdtdec_get_int(blob, node,
+   samsung,dsim-config-e_virtual_ch, 0);
+
+   dsim_config_dt.e_pixel_format = fdtdec_get_int(blob, node,
+   samsung,dsim-config-e_pixel_format, 0);
+
+   dsim_config_dt.e_burst_mode = fdtdec_get_int(blob, node,
+   samsung,dsim-config-e_burst_mode, 0);
+
+   dsim_config_dt.e_no_data_lane = fdtdec_get_int(blob, node,
+   samsung,dsim-config-e_no_data_lane, 0);
+
+   dsim_config_dt.e_byte_clk = fdtdec_get_int(blob, node,
+   samsung,dsim-config-e_byte_clk, 0);
+
+   dsim_config_dt.hfp = fdtdec_get_int(blob, node,
+   samsung,dsim-config-hfp, 0);
+
+   dsim_config_dt.p = fdtdec_get_int(blob, node,
+ samsung,dsim-config-p, 0);
+   dsim_config_dt.m = fdtdec_get_int(blob, node,
+ samsung,dsim-config-m, 0);
+   dsim_config_dt.s = fdtdec_get_int(blob, node,
+ samsung,dsim-config-s, 0);
+
+   dsim_config_dt.pll_stable_time = fdtdec_get_int(blob, node,
+   samsung,dsim-config-pll_stable_time, 0);
+
+   dsim_config_dt.esc_clk = fdtdec_get_int(blob, node,
+   samsung,dsim-config-esc_clk, 0);
+
+   dsim_config_dt.stop_holding_cnt = fdtdec_get_int(blob, node,
+   samsung,dsim-config-stop_holding_cnt, 0);
+
+   dsim_config_dt.bta_timeout = fdtdec_get_int(blob, node,
+   samsung,dsim-config-bta_timeout, 0);
+
+   dsim_config_dt.rx_timeout = fdtdec_get_int(blob, node,
+   samsung,dsim-config-rx_timeout, 0);
+
+   mipi_lcd_device_dt.name = fdtdec_get_config_string(blob,
+   samsung,dsim-device-name);
+
+   mipi_lcd_device_dt.id = fdtdec_get_int(blob, node,
+   samsung,dsim-device-id, 0);
+
+   

[U-Boot] [PATCH V3 03/12] video:exynos_fb:fdt: add additional fdt data

2014-02-25 Thread Piotr Wilczek
This patch adds additional data parsing from DTB and adds the new
exynos_lcd_panel_init() function for panel specific initialisation
from the board file.

Signed-off-by: Piotr Wilczek p.wilc...@samsung.com
Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
Cc: Minkyu Kang mk7.k...@samsung.com
---
Changes for v3:
 - none

Changes for v2:
 - removed duplicate DTB node parsing for panel_info.logo_on
 - added (weak) exynos_lcd_panel_init function for panel specific
initialisation from board file

 drivers/video/exynos_fb.c | 21 +
 1 file changed, 21 insertions(+)

diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c
index 00a0a11..88d9037 100644
--- a/drivers/video/exynos_fb.c
+++ b/drivers/video/exynos_fb.c
@@ -104,6 +104,13 @@ void __exynos_backlight_reset(void)
 void exynos_backlight_reset(void)
__attribute__((weak, alias(__exynos_backlight_reset)));
 
+int __exynos_lcd_panel_init(vidinfo_t *vid)
+{
+   return 0;
+}
+int exynos_lcd_panel_init(vidinfo_t *vid)
+   __attribute__((weak, alias(__exynos_lcd_panel_init)));
+
 static void lcd_panel_on(vidinfo_t *vid)
 {
udelay(vid-init_delay);
@@ -269,6 +276,15 @@ int exynos_fimd_parse_dt(const void *blob)
panel_info.dual_lcd_enabled = fdtdec_get_int(blob, node,
samsung,dual-lcd-enabled, 0);
 
+   panel_info.resolution = fdtdec_get_int(blob, node,
+   samsung,resolution, 0);
+
+   panel_info.rgb_mode = fdtdec_get_int(blob, node,
+   samsung,rgb-mode, 0);
+
+   panel_info.power_on_delay = fdtdec_get_int(blob, node,
+   samsung,power-on-delay, 0);
+
return 0;
 }
 #endif
@@ -281,10 +297,15 @@ void lcd_ctrl_init(void *lcdbase)
 #ifdef CONFIG_OF_CONTROL
if (exynos_fimd_parse_dt(gd-fdt_blob))
debug(Can't get proper panel info\n);
+#ifdef CONFIG_EXYNOS_MIPI_DSIM
+   exynos_init_dsim_platform_data(panel_info);
+#endif
+   exynos_lcd_panel_init(panel_info);
 #else
/* initialize parameters which is specific to panel. */
init_panel_info(panel_info);
 #endif
+
panel_width = panel_info.vl_width;
panel_height = panel_info.vl_height;
 
-- 
1.8.3.2

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


[U-Boot] [PATCH V3 04/12] drivers:mmc:sdhci: enable support for DT

2014-02-25 Thread Piotr Wilczek
This patch enables support for device tree for sdhci driver.
Non DT case is still supported.

Signed-off-by: Piotr Wilczek p.wilc...@samsung.com
Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
Cc: Minkyu Kang mk7.k...@samsung.com
---
Changes for v3:
 - none

Changes for v2:
 - fixed checking for SDMMC boundary
 - fiex debug message
 - fixed comment to 'pwr_gpio' struct filed

 arch/arm/include/asm/arch-exynos/mmc.h |   7 ++
 drivers/mmc/s5p_sdhci.c| 129 +
 include/fdtdec.h   |   1 +
 include/sdhci.h|   5 ++
 lib/fdtdec.c   |   1 +
 5 files changed, 143 insertions(+)

diff --git a/arch/arm/include/asm/arch-exynos/mmc.h 
b/arch/arm/include/asm/arch-exynos/mmc.h
index 98d6530..0fb6461 100644
--- a/arch/arm/include/asm/arch-exynos/mmc.h
+++ b/arch/arm/include/asm/arch-exynos/mmc.h
@@ -53,6 +53,8 @@
 #define SDHCI_CTRL4_DRIVE_MASK(_x) ((_x)  16)
 #define SDHCI_CTRL4_DRIVE_SHIFT(16)
 
+#define SDHCI_MAX_HOSTS 4
+
 int s5p_sdhci_init(u32 regbase, int index, int bus_width);
 
 static inline int s5p_mmc_init(int index, int bus_width)
@@ -62,4 +64,9 @@ static inline int s5p_mmc_init(int index, int bus_width)
 
return s5p_sdhci_init(base, index, bus_width);
 }
+
+#ifdef CONFIG_OF_CONTROL
+int exynos_mmc_init(const void *blob);
+#endif
+
 #endif
diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c
index 40ff873..ccae4cc 100644
--- a/drivers/mmc/s5p_sdhci.c
+++ b/drivers/mmc/s5p_sdhci.c
@@ -8,8 +8,15 @@
 #include common.h
 #include malloc.h
 #include sdhci.h
+#include fdtdec.h
+#include libfdt.h
+#include asm/gpio.h
 #include asm/arch/mmc.h
 #include asm/arch/clk.h
+#include errno.h
+#ifdef CONFIG_OF_CONTROL
+#include asm/arch/pinmux.h
+#endif
 
 static char *S5P_NAME = SAMSUNG SDHCI;
 static void s5p_sdhci_set_control_reg(struct sdhci_host *host)
@@ -86,3 +93,125 @@ int s5p_sdhci_init(u32 regbase, int index, int bus_width)
 
return add_sdhci(host, 5200, 40);
 }
+
+#ifdef CONFIG_OF_CONTROL
+struct sdhci_host sdhci_host[SDHCI_MAX_HOSTS];
+
+static int do_sdhci_init(struct sdhci_host *host)
+{
+   int dev_id, flag;
+   int err = 0;
+
+   flag = host-bus_width == 8 ? PINMUX_FLAG_8BIT_MODE : PINMUX_FLAG_NONE;
+   dev_id = host-index + PERIPH_ID_SDMMC0;
+
+   if (fdt_gpio_isvalid(host-pwr_gpio)) {
+   gpio_direction_output(host-pwr_gpio.gpio, 1);
+   err = exynos_pinmux_config(dev_id, flag);
+   if (err) {
+   debug(MMC not configured\n);
+   return err;
+   }
+   }
+
+   if (fdt_gpio_isvalid(host-cd_gpio)) {
+   gpio_direction_output(host-cd_gpio.gpio, 0xf);
+   if (gpio_get_value(host-cd_gpio.gpio))
+   return -ENODEV;
+
+   err = exynos_pinmux_config(dev_id, flag);
+   if (err) {
+   printf(external SD not configured\n);
+   return err;
+   }
+   }
+
+   host-name = S5P_NAME;
+
+   host-quirks = SDHCI_QUIRK_NO_HISPD_BIT | SDHCI_QUIRK_BROKEN_VOLTAGE |
+   SDHCI_QUIRK_BROKEN_R1B | SDHCI_QUIRK_32BIT_DMA_ADDR |
+   SDHCI_QUIRK_WAIT_SEND_CMD;
+   host-voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
+   host-version = sdhci_readw(host, SDHCI_HOST_VERSION);
+
+   host-set_control_reg = s5p_sdhci_set_control_reg;
+   host-set_clock = set_mmc_clk;
+
+   host-host_caps = MMC_MODE_HC;
+
+   return add_sdhci(host, 5200, 40);
+}
+
+static int sdhci_get_config(const void *blob, int node, struct sdhci_host 
*host)
+{
+   int bus_width, dev_id;
+   unsigned int base;
+
+   /* Get device id */
+   dev_id = pinmux_decode_periph_id(blob, node);
+   if (dev_id  PERIPH_ID_SDMMC0  dev_id  PERIPH_ID_SDMMC3) {
+   debug(MMC: Can't get device id\n);
+   return -1;
+   }
+   host-index = dev_id - PERIPH_ID_SDMMC0;
+
+   /* Get bus width */
+   bus_width = fdtdec_get_int(blob, node, samsung,bus-width, 0);
+   if (bus_width = 0) {
+   debug(MMC: Can't get bus-width\n);
+   return -1;
+   }
+   host-bus_width = bus_width;
+
+   /* Get the base address from the device node */
+   base = fdtdec_get_addr(blob, node, reg);
+   if (!base) {
+   debug(MMC: Can't get base address\n);
+   return -1;
+   }
+   host-ioaddr = (void *)base;
+
+   fdtdec_decode_gpio(blob, node, pwr-gpios, host-pwr_gpio);
+   fdtdec_decode_gpio(blob, node, cd-gpios, host-cd_gpio);
+
+   return 0;
+}
+
+static int process_nodes(const void *blob, int node_list[], int count)
+{
+   struct sdhci_host *host;
+   int i, node;
+
+   debug(%s: count = %d\n, __func__, count);
+
+   /* build sdhci_host[] for each controller */
+   for 

[U-Boot] [PATCH V3 05/12] board:samsung: move checkboard to common file

2014-02-25 Thread Piotr Wilczek
The checkboard function's implementation is common for all
DT supporting boards and should be placed in the board common file.

Signed-off-by: Piotr Wilczek p.wilc...@samsung.com
Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
Cc: Chander Kashyap k.chan...@samsung.com
Cc: Rajeshwari S Shinde rajeshwar...@samsung.com
Cc: Amar amarendra...@samsung.com

Acked-by: Rajeshwari Shinde rajeshwar...@samsung.com
---
Changes for v3:
 - none

Changes for v2:
 - new patch

 board/samsung/common/board.c| 12 
 board/samsung/smdk5250/exynos5-dt.c | 15 ---
 board/samsung/smdk5420/smdk5420.c   | 15 ---
 3 files changed, 12 insertions(+), 30 deletions(-)

diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index cd873bc..f8562b2 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -377,7 +377,19 @@ int board_mmc_init(bd_t *bis)
return ret;
 }
 #endif
+
+#ifdef CONFIG_DISPLAY_BOARDINFO
+int checkboard(void)
+{
+   const char *board_name;
+
+   board_name = fdt_getprop(gd-fdt_blob, 0, model, NULL);
+   printf(Board: %s\n, board_name ? board_name : unknown);
+
+   return 0;
+}
 #endif
+#endif /* CONFIG_OF_CONTROL */
 
 #ifdef CONFIG_BOARD_LATE_INIT
 int board_late_init(void)
diff --git a/board/samsung/smdk5250/exynos5-dt.c 
b/board/samsung/smdk5250/exynos5-dt.c
index 5fb8664..b22fba5 100644
--- a/board/samsung/smdk5250/exynos5-dt.c
+++ b/board/samsung/smdk5250/exynos5-dt.c
@@ -45,21 +45,6 @@ int exynos_init(void)
return 0;
 }
 
-#ifdef CONFIG_DISPLAY_BOARDINFO
-int checkboard(void)
-{
-   const char *board_name;
-
-   board_name = fdt_getprop(gd-fdt_blob, 0, model, NULL);
-   if (board_name == NULL)
-   printf(\nUnknown Board\n);
-   else
-   printf(\nBoard: %s\n, board_name);
-
-   return 0;
-}
-#endif
-
 #ifdef CONFIG_LCD
 void exynos_cfg_lcd_gpio(void)
 {
diff --git a/board/samsung/smdk5420/smdk5420.c 
b/board/samsung/smdk5420/smdk5420.c
index 3ad2ad0..e4606ec 100644
--- a/board/samsung/smdk5420/smdk5420.c
+++ b/board/samsung/smdk5420/smdk5420.c
@@ -142,18 +142,3 @@ int board_get_revision(void)
 {
return 0;
 }
-
-#ifdef CONFIG_DISPLAY_BOARDINFO
-int checkboard(void)
-{
-   const char *board_name;
-
-   board_name = fdt_getprop(gd-fdt_blob, 0, model, NULL);
-   if (board_name == NULL)
-   printf(\nUnknown Board\n);
-   else
-   printf(\nBoard: %s\n, board_name);
-
-   return 0;
-}
-#endif
-- 
1.8.3.2

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


[U-Boot] [PATCH V3 06/12] arm:exynos: add common DTS file for exynos 4

2014-02-25 Thread Piotr Wilczek
This patch adds common dtsi file and config header for all
Exynos 4 based boards.

Patch additionaly adds board specific (weak) functions for
board_early_init_f and board_power_init functions.

Signed-off-by: Piotr Wilczek p.wilc...@samsung.com
Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
Cc: Minkyu Kang mk7.k...@samsung.com
---
Changes for v3:
 - none

Changes for v2:
 - reuse existing common board.c file

 arch/arm/dts/exynos4.dtsi| 139 +
 arch/arm/include/asm/arch-exynos/board.h |  12 +++
 board/samsung/common/board.c |  18 +++-
 include/configs/exynos4-dt.h | 144 +++
 4 files changed, 311 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/dts/exynos4.dtsi
 create mode 100644 include/configs/exynos4-dt.h

diff --git a/arch/arm/dts/exynos4.dtsi b/arch/arm/dts/exynos4.dtsi
new file mode 100644
index 000..38a6919
--- /dev/null
+++ b/arch/arm/dts/exynos4.dtsi
@@ -0,0 +1,139 @@
+/*
+ * Samsung's Exynos4 SoC common device tree source
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+/include/ skeleton.dtsi
+
+/ {
+
+   serial@1380 {
+   compatible = samsung,exynos4210-uart;
+   reg = 0x1380 0x3c;
+   id = 0;
+   };
+
+   serial@1381 {
+   compatible = samsung,exynos4210-uart;
+   reg = 0x1381 0x3c;
+   id = 1;
+   };
+
+   serial@1382 {
+   compatible = samsung,exynos4210-uart;
+   reg = 0x1382 0x3c;
+   id = 2;
+   };
+
+   serial@1383 {
+   compatible = samsung,exynos4210-uart;
+   reg = 0x1383 0x3c;
+   id = 3;
+   };
+
+   serial@1384 {
+   compatible = samsung,exynos4210-uart;
+   reg = 0x1384 0x3c;
+   id = 4;
+   };
+
+   i2c@1386 {
+   #address-cells = 1;
+   #size-cells = 0;
+   compatible = samsung,s3c2440-i2c;
+   interrupts = 0 0 0;
+   };
+
+   i2c@1387 {
+   #address-cells = 1;
+   #size-cells = 0;
+   compatible = samsung,s3c2440-i2c;
+   interrupts = 1 1 0;
+   };
+
+   i2c@1388 {
+   #address-cells = 1;
+   #size-cells = 0;
+   compatible = samsung,s3c2440-i2c;
+   interrupts = 2 2 0;
+   };
+
+   i2c@1389 {
+   #address-cells = 1;
+   #size-cells = 0;
+   compatible = samsung,s3c2440-i2c;
+   interrupts = 3 3 0;
+   };
+
+   i2c@138a {
+   #address-cells = 1;
+   #size-cells = 0;
+   compatible = samsung,s3c2440-i2c;
+   interrupts = 4 4 0;
+   };
+
+   i2c@138b {
+   #address-cells = 1;
+   #size-cells = 0;
+   compatible = samsung,s3c2440-i2c;
+   interrupts = 5 5 0;
+   };
+
+   i2c@138c {
+   #address-cells = 1;
+   #size-cells = 0;
+   compatible = samsung,s3c2440-i2c;
+   interrupts = 6 6 0;
+   };
+
+   i2c@138d {
+   #address-cells = 1;
+   #size-cells = 0;
+   compatible = samsung,s3c2440-i2c;
+   interrupts = 7 7 0;
+   };
+
+   sdhci@1251 {
+   #address-cells = 1;
+   #size-cells = 0;
+   compatible = samsung,exynos-mmc;
+   reg = 0x1251 0x1000;
+   interrupts = 0 75 0;
+   };
+
+   sdhci@1252 {
+   #address-cells = 1;
+   #size-cells = 0;
+   compatible = samsung,exynos-mmc;
+   reg = 0x1252 0x1000;
+   interrupts = 0 76 0;
+   };
+
+   sdhci@1253 {
+   #address-cells = 1;
+   #size-cells = 0;
+   compatible = samsung,exynos-mmc;
+   reg = 0x1253 0x1000;
+   interrupts = 0 77 0;
+   };
+
+   sdhci@1254 {
+   #address-cells = 1;
+   #size-cells = 0;
+   compatible = samsung,exynos-mmc;
+   reg = 0x1254 0x1000;
+   interrupts = 0 78 0;
+   };
+
+   gpio: gpio {
+   gpio-controller;
+   #gpio-cells = 2;
+
+   interrupt-controller;
+   #interrupt-cells = 2;
+   };
+};
diff --git a/arch/arm/include/asm/arch-exynos/board.h 
b/arch/arm/include/asm/arch-exynos/board.h
index 243fb12..1b1cd0d 100644
--- a/arch/arm/include/asm/arch-exynos/board.h
+++ b/arch/arm/include/asm/arch-exynos/board.h
@@ -14,4 +14,16 @@
  */
 int exynos_init(void);
 
+/*
+ * Exynos board specific changes for
+ * 

[U-Boot] [PATCH V3 07/12] board:samsung:common: move max77686 init function

2014-02-25 Thread Piotr Wilczek
This patch moves board specific max77686 init function from
common board to smdk5250 board file.

Signed-off-by: Piotr Wilczek p.wilc...@samsung.com
Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
Cc: Rajeshwari S Shinde rajeshwar...@samsung.com
Cc: Rajeshwari Birje rajeshwari.bi...@gmail.com
Cc: Minkyu Kang mk7.k...@samsung.com
---
Changes for v3:
 - max77686 init function is moved to smdk5250 board file

Changes for v2:
 - new patch

 board/samsung/common/board.c  | 120 
 board/samsung/smdk5250/smdk5250.c | 125 ++
 2 files changed, 125 insertions(+), 120 deletions(-)

diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index cf78d36..a74b044 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -22,7 +22,6 @@
 #include asm/arch/power.h
 #include power/pmic.h
 #include asm/arch/sromc.h
-#include power/max77686_pmic.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -175,129 +174,10 @@ static int board_init_cros_ec_devices(const void *blob)
 #endif
 
 #if defined(CONFIG_POWER)
-#ifdef CONFIG_POWER_MAX77686
-static int pmic_reg_update(struct pmic *p, int reg, uint regval)
-{
-   u32 val;
-   int ret = 0;
-
-   ret = pmic_reg_read(p, reg, val);
-   if (ret) {
-   debug(%s: PMIC %d register read failed\n, __func__, reg);
-   return -1;
-   }
-   val |= regval;
-   ret = pmic_reg_write(p, reg, val);
-   if (ret) {
-   debug(%s: PMIC %d register write failed\n, __func__, reg);
-   return -1;
-   }
-   return 0;
-}
-
-static int max77686_init(void)
-{
-   struct pmic *p;
-
-   if (pmic_init(I2C_PMIC))
-   return -1;
-
-   p = pmic_get(MAX77686_PMIC);
-   if (!p)
-   return -ENODEV;
-
-   if (pmic_probe(p))
-   return -1;
-
-   if (pmic_reg_update(p, MAX77686_REG_PMIC_32KHZ, MAX77686_32KHCP_EN))
-   return -1;
-
-   if (pmic_reg_update(p, MAX77686_REG_PMIC_BBAT,
-   MAX77686_BBCHOSTEN | MAX77686_BBCVS_3_5V))
-   return -1;
-
-   /* VDD_MIF */
-   if (pmic_reg_write(p, MAX77686_REG_PMIC_BUCK1OUT,
-  MAX77686_BUCK1OUT_1V)) {
-   debug(%s: PMIC %d register write failed\n, __func__,
- MAX77686_REG_PMIC_BUCK1OUT);
-   return -1;
-   }
-
-   if (pmic_reg_update(p, MAX77686_REG_PMIC_BUCK1CRTL,
-   MAX77686_BUCK1CTRL_EN))
-   return -1;
-
-   /* VDD_ARM */
-   if (pmic_reg_write(p, MAX77686_REG_PMIC_BUCK2DVS1,
-  MAX77686_BUCK2DVS1_1_3V)) {
-   debug(%s: PMIC %d register write failed\n, __func__,
- MAX77686_REG_PMIC_BUCK2DVS1);
-   return -1;
-   }
-
-   if (pmic_reg_update(p, MAX77686_REG_PMIC_BUCK2CTRL1,
-   MAX77686_BUCK2CTRL_ON))
-   return -1;
-
-   /* VDD_INT */
-   if (pmic_reg_write(p, MAX77686_REG_PMIC_BUCK3DVS1,
-  MAX77686_BUCK3DVS1_1_0125V)) {
-   debug(%s: PMIC %d register write failed\n, __func__,
- MAX77686_REG_PMIC_BUCK3DVS1);
-   return -1;
-   }
-
-   if (pmic_reg_update(p, MAX77686_REG_PMIC_BUCK3CTRL,
-   MAX77686_BUCK3CTRL_ON))
-   return -1;
-
-   /* VDD_G3D */
-   if (pmic_reg_write(p, MAX77686_REG_PMIC_BUCK4DVS1,
-  MAX77686_BUCK4DVS1_1_2V)) {
-   debug(%s: PMIC %d register write failed\n, __func__,
- MAX77686_REG_PMIC_BUCK4DVS1);
-   return -1;
-   }
-
-   if (pmic_reg_update(p, MAX77686_REG_PMIC_BUCK4CTRL1,
-   MAX77686_BUCK3CTRL_ON))
-   return -1;
-
-   /* VDD_LDO2 */
-   if (pmic_reg_update(p, MAX77686_REG_PMIC_LDO2CTRL1,
-   MAX77686_LD02CTRL1_1_5V | EN_LDO))
-   return -1;
-
-   /* VDD_LDO3 */
-   if (pmic_reg_update(p, MAX77686_REG_PMIC_LDO3CTRL1,
-   MAX77686_LD03CTRL1_1_8V | EN_LDO))
-   return -1;
-
-   /* VDD_LDO5 */
-   if (pmic_reg_update(p, MAX77686_REG_PMIC_LDO5CTRL1,
-   MAX77686_LD05CTRL1_1_8V | EN_LDO))
-   return -1;
-
-   /* VDD_LDO10 */
-   if (pmic_reg_update(p, MAX77686_REG_PMIC_LDO10CTRL1,
-   MAX77686_LD10CTRL1_1_8V | EN_LDO))
-   return -1;
-
-   return 0;
-}
-#endif
-
 int power_init_board(void)
 {
-   int ret = 0;
-
set_ps_hold_ctrl();
 
-#ifdef CONFIG_POWER_MAX77686
-   ret = max77686_init();
-#endif
-
return exynos_power_init();
 }
 #endif
diff --git a/board/samsung/smdk5250/smdk5250.c 
b/board/samsung/smdk5250/smdk5250.c
index a69f73d..28a6d9e 100644
--- 

[U-Boot] [PATCH V3 08/12] arm:exynos: enable sdhci and misc_init to common board

2014-02-25 Thread Piotr Wilczek
This patch enables sdhci initialisation and misc_init_r in common board
file for all exynos 4 based boards.

Signed-off-by: Piotr Wilczek p.wilc...@samsung.com
Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
Cc: Minkyu Kang mk7.k...@samsung.com
---
Changes for v3:
 - none

Changes for v2:
 - new patch

 board/samsung/common/board.c | 30 ++
 1 file changed, 30 insertions(+)

diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index a74b044..e95e9c4 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -22,6 +22,8 @@
 #include asm/arch/power.h
 #include power/pmic.h
 #include asm/arch/sromc.h
+#include lcd.h
+#include samsung/misc.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -183,6 +185,7 @@ int power_init_board(void)
 #endif
 
 #ifdef CONFIG_OF_CONTROL
+#ifdef CONFIG_SMC911X
 static int decode_sromc(const void *blob, struct fdt_sromc *config)
 {
int err;
@@ -206,6 +209,7 @@ static int decode_sromc(const void *blob, struct fdt_sromc 
*config)
}
return 0;
 }
+#endif
 
 int board_eth_init(bd_t *bis)
 {
@@ -263,10 +267,18 @@ int board_mmc_init(bd_t *bis)
 {
int ret;
 
+#ifdef CONFIG_SDHCI
+   /* mmc initializattion for available channels */
+   ret = exynos_mmc_init(gd-fdt_blob);
+   if (ret)
+   debug(mmc init failed\n);
+#endif
+#ifdef CONFIG_DWMMC
/* dwmmc initializattion for available channels */
ret = exynos_dwmmc_init(gd-fdt_blob);
if (ret)
debug(dwmmc init failed\n);
+#endif
 
return ret;
 }
@@ -315,3 +327,21 @@ int arch_early_init_r(void)
 
return 0;
 }
+
+#ifdef CONFIG_MISC_INIT_R
+int misc_init_r(void)
+{
+#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
+   set_board_info();
+#endif
+#ifdef CONFIG_LCD_MENU
+   keys_init();
+   check_boot_mode();
+#endif
+#ifdef CONFIG_CMD_BMP
+   if (panel_info.logo_on)
+   draw_logo();
+#endif
+   return 0;
+}
+#endif
-- 
1.8.3.2

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


[U-Boot] [PATCH V3 11/12] board:trats: Enable device tree on Trats

2014-02-25 Thread Piotr Wilczek
This patch enables to run Trats board on device tree.

Signed-off-by: Piotr Wilczek p.wilc...@samsung.com
Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
CC: Minkyu Kang mk7.k...@samsung.com
CC: Lukasz Majewski l.majew...@samsung.com
---
Changes for v3:
 - dts file moved to arch/arm/dts

Changes for v2:
 - no changes
 
 arch/arm/dts/Makefile |   3 +-
 arch/arm/dts/exynos4210-trats.dts | 120 +
 board/samsung/trats/trats.c   | 213 ++
 include/configs/trats.h   | 192 --
 4 files changed, 174 insertions(+), 354 deletions(-)
 create mode 100644 arch/arm/dts/exynos4210-trats.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index d30954c..20c081e 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -1,5 +1,6 @@
 dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \
-   exynos4210-universal_c210.dtb
+   exynos4210-universal_c210.dtb \
+   exynos4210-trats.dtb
 
 dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \
exynos5250-snow.dtb \
diff --git a/arch/arm/dts/exynos4210-trats.dts 
b/arch/arm/dts/exynos4210-trats.dts
new file mode 100644
index 000..79fdad2
--- /dev/null
+++ b/arch/arm/dts/exynos4210-trats.dts
@@ -0,0 +1,120 @@
+/*
+ * Samsung's Exynos4210 based Trats board device tree source
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+/dts-v1/;
+/include/ exynos4.dtsi
+
+/ {
+   model = Samsung Trats based on Exynos4210;
+   compatible = samsung,trats, samsung,exynos4210;
+
+   config {
+   samsung,dsim-device-name = s6e8ax0;
+   };
+
+   aliases {
+   i2c0 = /i2c@1386;
+   i2c1 = /i2c@1387;
+   i2c2 = /i2c@1388;
+   i2c3 = /i2c@1389;
+   i2c4 = /i2c@138a;
+   i2c5 = /i2c@138b;
+   i2c6 = /i2c@138c;
+   i2c7 = /i2c@138d;
+   serial0 = /serial@1380;
+   console = /serial@1382;
+   mmc0 = sdhci@1251;
+   mmc2 = sdhci@1253;
+   };
+
+   fimd@11c0 {
+   compatible = samsung,exynos-fimd;
+   reg = 0x11c0 0xa4;
+
+   samsung,vl-freq = 60;
+   samsung,vl-col = 720;
+   samsung,vl-row = 1280;
+   samsung,vl-width = 720;
+   samsung,vl-height = 1280;
+
+   samsung,vl-clkp = 0;
+   samsung,vl-oep = 0;
+   samsung,vl-hsp = 1;
+   samsung,vl-vsp = 1;
+   samsung,vl-dp = 1;
+   samsung,vl-bpix = 4;
+
+   samsung,vl-hspw = 5;
+   samsung,vl-hbpd = 10;
+   samsung,vl-hfpd = 10;
+   samsung,vl-vspw = 2;
+   samsung,vl-vbpd = 1;
+   samsung,vl-vfpd = 13;
+   samsung,vl-cmd-allow-len = 0xf;
+
+   samsung,winid = 3;
+   samsung,power-on-delay = 30;
+   samsung,interface-mode = 1;
+   samsung,mipi-enabled = 1;
+   samsung,dp-enabled;
+   samsung,dual-lcd-enabled;
+
+   samsung,logo-on = 1;
+   samsung,resolution = 0;
+   samsung,rgb-mode = 0;
+   };
+
+   mipidsi@11c8 {
+   compatible = samsung,exynos-mipi-dsi;
+   reg = 0x11c8 0x5c;
+
+   samsung,dsim-config-e_interface = 1;
+   samsung,dsim-config-e_virtual_ch = 0;
+   samsung,dsim-config-e_pixel_format = 7;
+   samsung,dsim-config-e_burst_mode = 1;
+   samsung,dsim-config-e_no_data_lane = 3;
+   samsung,dsim-config-e_byte_clk = 0;
+   samsung,dsim-config-hfp = 1;
+
+   samsung,dsim-config-p = 3;
+   samsung,dsim-config-m = 120;
+   samsung,dsim-config-s = 1;
+
+   samsung,dsim-config-pll_stable_time = 500;
+   samsung,dsim-config-esc_clk = 2000;
+   samsung,dsim-config-stop_holding_cnt = 0x7ff;
+   samsung,dsim-config-bta_timeout = 0xff;
+   samsung,dsim-config-rx_timeout = 0x;
+
+   samsung,dsim-device-id = 0x;
+   samsung,dsim-device-bus_id = 0;
+
+   samsung,dsim-device-reverse_panel = 1;
+   };
+
+   sdhci@1251 {
+   samsung,bus-width = 8;
+   samsung,timing = 1 3 3;
+   pwr-gpios = gpio 0x2008002 0;
+   };
+
+   sdhci@1252 {
+   status = disabled;
+   };
+
+   sdhci@1253 {
+   samsung,bus-width = 4;
+   samsung,timing = 1 2 3;
+   cd-gpios = gpio 0x20c6004 0;
+   };
+
+   sdhci@1254 {
+   status = disabled;
+   };
+};
\ No 

[U-Boot] [PATCH V3 09/12] board:origen: Enable device tree on Origen

2014-02-25 Thread Piotr Wilczek
This patch enables to run Origen board on device tree.

Uart, DRAM and MMC init functions are removed as their
generic replacements form the common board file are used.

The config file is modified to contain only board specific options.

Signed-off-by: Piotr Wilczek p.wilc...@samsung.com
Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
Cc: Chander Kashyap k.chan...@samsung.com
Cc: Minkyu Kang mk7.k...@samsung.com
---
Changes for v3:
 - dts file moved to arch/arm/dts

Changes for v2:
 - no changes

 arch/arm/dts/Makefile  |   2 +
 arch/arm/dts/exynos4210-origen.dts |  45 ++
 board/samsung/origen/origen.c  | 112 +++
 include/configs/origen.h   | 117 +
 4 files changed, 96 insertions(+), 180 deletions(-)
 create mode 100644 arch/arm/dts/exynos4210-origen.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 2658911..7abca75 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -1,3 +1,5 @@
+dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb
+
 dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \
exynos5250-snow.dtb \
exynos5250-smdk5250.dtb \
diff --git a/arch/arm/dts/exynos4210-origen.dts 
b/arch/arm/dts/exynos4210-origen.dts
new file mode 100644
index 000..5c9d2ae
--- /dev/null
+++ b/arch/arm/dts/exynos4210-origen.dts
@@ -0,0 +1,45 @@
+/*
+ * Samsung's Exynos4210 based Origen board device tree source
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+/dts-v1/;
+/include/ skeleton.dtsi
+/include/ exynos4.dtsi
+
+/ {
+   model = Insignal Origen evaluation board based on Exynos4210;
+   compatible = insignal,origen, samsung,exynos4210;
+
+   chosen {
+   bootargs =;
+   };
+
+   aliases {
+   serial0 = /serial@1380;
+   console = /serial@1382;
+   mmc2 = sdhci@1253;
+   };
+
+   sdhci@1251 {
+   status = disabled;
+   };
+
+   sdhci@1252 {
+   status = disabled;
+   };
+
+   sdhci@1253 {
+   samsung,bus-width = 4;
+   samsung,timing = 1 2 3;
+   cd-gpios = gpio 0x2008002 0;
+   };
+
+   sdhci@1254 {
+   status = disabled;
+   };
+};
\ No newline at end of file
diff --git a/board/samsung/origen/origen.c b/board/samsung/origen/origen.c
index 15f77ca..d502f02 100644
--- a/board/samsung/origen/origen.c
+++ b/board/samsung/origen/origen.c
@@ -11,129 +11,35 @@
 #include asm/arch/mmc.h
 #include asm/arch/periph.h
 #include asm/arch/pinmux.h
+#include usb.h
 
 DECLARE_GLOBAL_DATA_PTR;
-struct exynos4_gpio_part1 *gpio1;
-struct exynos4_gpio_part2 *gpio2;
 
-int board_init(void)
+u32 get_board_rev(void)
 {
-   gpio1 = (struct exynos4_gpio_part1 *) EXYNOS4_GPIO_PART1_BASE;
-   gpio2 = (struct exynos4_gpio_part2 *) EXYNOS4_GPIO_PART2_BASE;
-
-   gd-bd-bi_boot_params = (PHYS_SDRAM_1 + 0x100UL);
return 0;
 }
 
-static int board_uart_init(void)
+int exynos_init(void)
 {
-   int err;
-
-   err = exynos_pinmux_config(PERIPH_ID_UART0, PINMUX_FLAG_NONE);
-   if (err) {
-   debug(UART0 not configured\n);
-   return err;
-   }
-
-   err = exynos_pinmux_config(PERIPH_ID_UART1, PINMUX_FLAG_NONE);
-   if (err) {
-   debug(UART1 not configured\n);
-   return err;
-   }
-
-   err = exynos_pinmux_config(PERIPH_ID_UART2, PINMUX_FLAG_NONE);
-   if (err) {
-   debug(UART2 not configured\n);
-   return err;
-   }
-
-   err = exynos_pinmux_config(PERIPH_ID_UART3, PINMUX_FLAG_NONE);
-   if (err) {
-   debug(UART3 not configured\n);
-   return err;
-   }
-
return 0;
 }
 
-#ifdef CONFIG_BOARD_EARLY_INIT_F
-int board_early_init_f(void)
-{
-   int err;
-   err = board_uart_init();
-   if (err) {
-   debug(UART init failed\n);
-   return err;
-   }
-   return err;
-}
-#endif
-
-int dram_init(void)
+int board_usb_init(int index, enum usb_init_type init)
 {
-   gd-ram_size= get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE)
-   + get_ram_size((long *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE)
-   + get_ram_size((long *)PHYS_SDRAM_3, PHYS_SDRAM_3_SIZE)
-   + get_ram_size((long *)PHYS_SDRAM_4, PHYS_SDRAM_4_SIZE);
-
return 0;
 }
 
-void dram_init_banksize(void)
-{
-   gd-bd-bi_dram[0].start = PHYS_SDRAM_1;
-   gd-bd-bi_dram[0].size = get_ram_size((long *)PHYS_SDRAM_1, \
-   PHYS_SDRAM_1_SIZE);
-   gd-bd-bi_dram[1].start = PHYS_SDRAM_2;
-   gd-bd-bi_dram[1].size = get_ram_size((long *)PHYS_SDRAM_2, \
-   

[U-Boot] [PATCH V3 12/12] board:trats2: Enable device tree on Trats2

2014-02-25 Thread Piotr Wilczek
This patch enables to run Trats2 board on device tree.

Signed-off-by: Piotr Wilczek p.wilc...@samsung.com
Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
CC: Minkyu Kang mk7.k...@samsung.com
---
Changes for v3:
 - dts file moved to arch/arm/dts

Changes for v2:
 - fixed mmc2 address in DT

 arch/arm/dts/Makefile  |   3 +-
 arch/arm/dts/exynos4412-trats2.dts | 434 +
 board/samsung/trats2/trats2.c  | 233 +---
 include/configs/trats2.h   | 198 +++--
 4 files changed, 476 insertions(+), 392 deletions(-)
 create mode 100644 arch/arm/dts/exynos4412-trats2.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 20c081e..fa6f496 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -1,6 +1,7 @@
 dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \
exynos4210-universal_c210.dtb \
-   exynos4210-trats.dtb
+   exynos4210-trats.dtb \
+   exynos4412-trats2.dtb
 
 dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \
exynos5250-snow.dtb \
diff --git a/arch/arm/dts/exynos4412-trats2.dts 
b/arch/arm/dts/exynos4412-trats2.dts
new file mode 100644
index 000..d31e780
--- /dev/null
+++ b/arch/arm/dts/exynos4412-trats2.dts
@@ -0,0 +1,434 @@
+/*
+ * Samsung's Exynos4412 based Trats2 board device tree source
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+/dts-v1/;
+/include/ exynos4.dtsi
+
+/ {
+   model = Samsung Trats2 based on Exynos4412;
+   compatible = samsung,trats2, samsung,exynos4412;
+
+   config {
+   samsung,dsim-device-name = s6e8ax0;
+   };
+
+   aliases {
+   i2c0 = /i2c@1386;
+   i2c1 = /i2c@1387;
+   i2c2 = /i2c@1388;
+   i2c3 = /i2c@1389;
+   i2c4 = /i2c@138a;
+   i2c5 = /i2c@138b;
+   i2c6 = /i2c@138c;
+   i2c7 = /i2c@138d;
+   serial0 = /serial@1380;
+   console = /serial@1382;
+   mmc0 = sdhci@1251;
+   mmc2 = sdhci@1253;
+   };
+
+   i2c@138d {
+   samsung,i2c-sda-delay = 100;
+   samsung,i2c-slave-addr = 0x10;
+   samsung,i2c-max-bus-freq = 10;
+   status = okay;
+
+   max77686_pmic@09 {
+   compatible = maxim,max77686_pmic;
+   interrupts = 7 0;
+   reg = 0x09 0 0;
+   #clock-cells = 1;
+
+   voltage-regulators {
+   ldo1_reg: ldo1 {
+   regulator-compatible = LDO1;
+   regulator-name = VALIVE_1.0V_AP;
+   regulator-min-microvolt = 100;
+   regulator-max-microvolt = 100;
+   regulator-always-on;
+   regulator-mem-on;
+   };
+
+   ldo2_reg: ldo2 {
+   regulator-compatible = LDO2;
+   regulator-name = VM1M2_1.2V_AP;
+   regulator-min-microvolt = 120;
+   regulator-max-microvolt = 120;
+   regulator-always-on;
+   regulator-mem-on;
+   };
+
+   ldo3_reg: ldo3 {
+   regulator-compatible = LDO3;
+   regulator-name = VCC_1.8V_AP;
+   regulator-min-microvolt = 180;
+   regulator-max-microvolt = 180;
+   regulator-always-on;
+   regulator-mem-on;
+   };
+
+   ldo4_reg: ldo4 {
+   regulator-compatible = LDO4;
+   regulator-name = VCC_2.8V_AP;
+   regulator-min-microvolt = 280;
+   regulator-max-microvolt = 280;
+   regulator-always-on;
+   regulator-mem-on;
+   };
+
+   ldo5_reg: ldo5 {
+   regulator-compatible = LDO5;
+   regulator-name = VCC_1.8V_IO;
+   regulator-min-microvolt = 180;
+   

[U-Boot] [PATCH V3 10/12] board:universal: Enable device tree on Universal

2014-02-25 Thread Piotr Wilczek
This patch enables to run Universal board on device tree.

Signed-off-by: Piotr Wilczek p.wilc...@samsung.com
Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
Cc: Minkyu Kang mk7.k...@samsung.com

Acked-by: Przemyslaw Marczak p.marc...@samsung.com
---
Changes for v3:
 - dts file moved to arch/arm/dts

Changes for v2:
 - no changes

 arch/arm/dts/Makefile  |   3 +-
 arch/arm/dts/exynos4210-universal_c210.dts |  83 
 board/samsung/universal_c210/universal.c   | 204 -
 include/configs/s5pc210_universal.h| 145 ++--
 4 files changed, 178 insertions(+), 257 deletions(-)
 create mode 100644 arch/arm/dts/exynos4210-universal_c210.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 7abca75..d30954c 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -1,4 +1,5 @@
-dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb
+dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \
+   exynos4210-universal_c210.dtb
 
 dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \
exynos5250-snow.dtb \
diff --git a/arch/arm/dts/exynos4210-universal_c210.dts 
b/arch/arm/dts/exynos4210-universal_c210.dts
new file mode 100644
index 000..1cdd981
--- /dev/null
+++ b/arch/arm/dts/exynos4210-universal_c210.dts
@@ -0,0 +1,83 @@
+/*
+ * Samsung's Exynos4210 based Universal C210 board device tree source
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+/dts-v1/;
+/include/ exynos4.dtsi
+
+/ {
+   model = Samsung Universal C210 based on Exynos4210 rev0;
+   compatible = samsung,universal_c210, samsung,exynos4210;
+
+   aliases {
+   serial0 = /serial@1380;
+   console = /serial@1382;
+   mmc0 = sdhci@1251;
+   mmc2 = sdhci@1253;
+   };
+
+   sdhci@1251 {
+   samsung,bus-width = 8;
+   samsung,timing = 1 3 3;
+   pwr-gpios = gpio 0x2008002 0;
+   };
+
+   sdhci@1252 {
+   status = disabled;
+   };
+
+   sdhci@1253 {
+   samsung,bus-width = 4;
+   samsung,timing = 1 2 3;
+   cd-gpios = gpio 0x20c6004 0;
+   };
+
+   sdhci@1254 {
+   status = disabled;
+   };
+
+   fimd@11c0 {
+   compatible = samsung,exynos-fimd;
+   reg = 0x11c0 0xa4;
+
+   samsung,vl-freq = 60;
+   samsung,vl-col = 480;
+   samsung,vl-row = 800;
+   samsung,vl-width = 480;
+   samsung,vl-height = 800;
+
+   samsung,vl-clkp = 0;
+   samsung,vl-oep = 0;
+   samsung,vl-hsp = 1;
+   samsung,vl-vsp = 1;
+   samsung,vl-dp = 1;
+   samsung,vl-bpix = 4;
+
+   samsung,vl-hspw = 2;
+   samsung,vl-hbpd = 16;
+   samsung,vl-hfpd = 16;
+   samsung,vl-vspw = 2;
+   samsung,vl-vbpd = 8;
+   samsung,vl-vfpd = 8;
+   samsung,vl-cmd-allow-len = 0xf;
+
+   samsung,pclk_name = 1;
+   samsung,sclk_div = 1;
+
+   samsung,winid = 0;
+   samsung,power-on-delay = 1;
+   samsung,interface-mode = 1;
+   samsung,mipi-enabled = 0;
+   samsung,dp-enabled;
+   samsung,dual-lcd-enabled;
+
+   samsung,logo-on = 1;
+   samsung,resolution = 0;
+   samsung,rgb-mode = 0;
+   };
+};
diff --git a/board/samsung/universal_c210/universal.c 
b/board/samsung/universal_c210/universal.c
index 96da7e0..82249d3 100644
--- a/board/samsung/universal_c210/universal.c
+++ b/board/samsung/universal_c210/universal.c
@@ -13,16 +13,17 @@
 #include asm/gpio.h
 #include asm/arch/adc.h
 #include asm/arch/gpio.h
-#include asm/arch/mmc.h
 #include asm/arch/pinmux.h
 #include asm/arch/watchdog.h
-#include libtizen.h
 #include ld9040.h
 #include power/pmic.h
+#include usb.h
 #include usb/s3c_udc.h
 #include asm/arch/cpu.h
 #include power/max8998_pmic.h
+#include libtizen.h
 #include samsung/misc.h
+#include usb_mass_storage.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -42,7 +43,7 @@ static int get_hwrev(void)
 
 static void init_pmic_lcd(void);
 
-int power_init_board(void)
+int exynos_power_init(void)
 {
int ret;
 
@@ -59,22 +60,6 @@ int power_init_board(void)
return 0;
 }
 
-int dram_init(void)
-{
-   gd-ram_size = get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE) +
-   get_ram_size((long *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE);
-
-   return 0;
-}
-
-void dram_init_banksize(void)
-{
-   gd-bd-bi_dram[0].start = PHYS_SDRAM_1;
-   gd-bd-bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-   gd-bd-bi_dram[1].start = PHYS_SDRAM_2;
-   gd-bd-bi_dram[1].size = PHYS_SDRAM_2_SIZE;
-}
-
 static 

[U-Boot] [PATCH v3 2/2] arm: Switch to -mno-unaligned-access when supported by the compiler

2014-02-25 Thread Tom Rini
When we tell the compiler to optimize for ARMv7 (and ARMv6 for that
matter) it assumes a default of SCTRL.A being cleared and unaligned
accesses being allowed and fast at the hardware level.  We set this bit
and must pass along -mno-unaligned-access so that the compiler will
still breakdown accesses and not trigger a data abort.

To better help understand the requirements of the project with respect
to unaligned memory access, the
Documentation/unaligned-memory-access.txt file has been added as
doc/README.unaligned-memory-access.txt and is taken from the v3.14-rc1
tag of the kernel.

Cc: Albert ARIBAUD albert.u.b...@aribaud.net
Cc: Mans Rullgard m...@mansr.com
Signed-off-by: Tom Rini tr...@ti.com

---
Changes in v3:
- Rebase on v2014.04-rc1
- Add doc/README.unaligned-memory-access.txt based on kernel
  Documentation/unaligned-memory-access.txt
- Correct comment in arch/arm/cpu/armv7/config.mk about what bit is
  having what done with it.
- Put back a printf in do_data_abort

Changes in v2:
- Drop references to README.arm-unaligned-accesses from
  arch/arm/lib/interrupts.c and top-level README

Signed-off-by: Tom Rini tr...@ti.com
---
 README |2 +-
 arch/arm/cpu/armv7/config.mk   |7 +-
 arch/arm/cpu/armv8/config.mk   |5 +-
 arch/arm/lib/interrupts.c  |2 +-
 common/Makefile|2 -
 doc/README.arm-unaligned-accesses  |  122 
 doc/README.unaligned-memory-access.txt |  240 
 fs/ubifs/Makefile  |3 -
 lib/Makefile   |3 -
 9 files changed, 248 insertions(+), 138 deletions(-)
 delete mode 100644 doc/README.arm-unaligned-accesses
 create mode 100644 doc/README.unaligned-memory-access.txt

diff --git a/README b/README
index f51f17e..2a775aa 100644
--- a/README
+++ b/README
@@ -1741,7 +1741,7 @@ CBFS (Coreboot Filesystem) support
 
If this option is set, then U-Boot will prevent the environment
variable splashimage from being set to a problematic address
-   (see README.displaying-bmps and README.arm-unaligned-accesses).
+   (see README.displaying-bmps).
This option is useful for targets where, due to alignment
restrictions, an improperly aligned BMP image will cause a data
abort. If you think you will not have problems with unaligned
diff --git a/arch/arm/cpu/armv7/config.mk b/arch/arm/cpu/armv7/config.mk
index d01f3d9..c048531 100644
--- a/arch/arm/cpu/armv7/config.mk
+++ b/arch/arm/cpu/armv7/config.mk
@@ -10,9 +10,12 @@
 PF_CPPFLAGS_ARMV7 := $(call cc-option, -march=armv7-a, -march=armv5)
 PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_ARMV7)
 
-# SEE README.arm-unaligned-accesses
+# On supported platforms we set the bit which causes us to trap on unaligned
+# memory access.  This is the opposite of what the compiler expects to be
+# the default so we must pass in -mno-unaligned-access so that it is aware
+# of our decision.
 PF_NO_UNALIGNED := $(call cc-option, -mno-unaligned-access,)
-PLATFORM_NO_UNALIGNED := $(PF_NO_UNALIGNED)
+PLATFORM_CPPFLAGS += $(PF_NO_UNALIGNED)
 
 ifneq ($(CONFIG_IMX_CONFIG),)
 ifdef CONFIG_SPL
diff --git a/arch/arm/cpu/armv8/config.mk b/arch/arm/cpu/armv8/config.mk
index 027a68c..f5b9559 100644
--- a/arch/arm/cpu/armv8/config.mk
+++ b/arch/arm/cpu/armv8/config.mk
@@ -6,10 +6,7 @@
 #
 PLATFORM_RELFLAGS += -fno-common -ffixed-x18
 
-# SEE README.arm-unaligned-accesses
-PF_NO_UNALIGNED := $(call cc-option, -mstrict-align)
-PLATFORM_NO_UNALIGNED := $(PF_NO_UNALIGNED)
-
 PF_CPPFLAGS_ARMV8 := $(call cc-option, -march=armv8-a)
+PF_NO_UNALIGNED := $(call cc-option, -mstrict-align)
 PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_ARMV8)
 PLATFORM_CPPFLAGS += $(PF_NO_UNALIGNED)
diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c
index 603bf14..758b013 100644
--- a/arch/arm/lib/interrupts.c
+++ b/arch/arm/lib/interrupts.c
@@ -153,7 +153,7 @@ void do_prefetch_abort (struct pt_regs *pt_regs)
 
 void do_data_abort (struct pt_regs *pt_regs)
 {
-   printf (data abort\n\nMAYBE you should read 
doc/README.arm-unaligned-accesses\n\n);
+   printf (data abort\n);
show_regs (pt_regs);
bad_mode ();
 }
diff --git a/common/Makefile b/common/Makefile
index 6652ad4..ca9af13 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -238,5 +238,3 @@ obj-y += memsize.o
 obj-y += stdio.o
 
 CFLAGS_env_embedded.o := -Wa,--no-warn -DENV_CRC=$(shell tools/envcrc 
2/dev/null)
-CFLAGS_hush.o := $(PLATFORM_NO_UNALIGNED)
-CFLAGS_fdt_support.o := $(PLATFORM_NO_UNALIGNED)
diff --git a/doc/README.arm-unaligned-accesses 
b/doc/README.arm-unaligned-accesses
deleted file mode 100644
index c37d135..000
--- a/doc/README.arm-unaligned-accesses
+++ /dev/null
@@ -1,122 +0,0 @@
-If you are reading this because of a data abort: the following MIGHT
-be relevant to your abort, if it was caused by an alignment 

[U-Boot] [PATCH v3 1/2] checkpatch.pl: Add warning for new __packed additions

2014-02-25 Thread Tom Rini
While there are valid reasons to use __packed, often the answer is that
you should be doing something else here instead.

Signed-off-by: Tom Rini tr...@ti.com
---
 scripts/checkpatch.pl |5 +
 1 file changed, 5 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 88c5bc7..df0820c 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3331,6 +3331,11 @@ sub process {
WARN(PREFER_PACKED,
 __packed is preferred over 
__attribute__((packed))\n . $herecurr);
}
+# Check for new packed members, warn to use care
+   if ($line =~ 
/\b(__attribute__\s*\(\s*\(.*\bpacked|__packed)\b/) {
+   WARN(NEW_PACKED,
+Adding new packed members is to be done with 
care\n . $herecurr);
+   }
 
 # Check for __attribute__ aligned, prefer __aligned
if ($line =~ /\b__attribute__\s*\(\s*\(.*aligned/) {
-- 
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 v2 03/15] kbuild: move asm-offsets.h rules to ./Kbuild

2014-02-25 Thread Tom Rini
On Mon, Feb 24, 2014 at 06:36:07AM +0100, Wolfgang Denk wrote:
 Dear Masahiro,
 
 In message 1393207943-3725-4-git-send-email-yamad...@jp.panasonic.com you 
 wrote:
 
  +define cmd_generic-offsets
  +   (set -e; \
  +echo #ifndef __GENERIC_ASM_OFFSETS_H__; \
  +echo #define __GENERIC_ASM_OFFSETS_H__; \
  +echo /*; \
  +echo  * DO NOT MODIFY.; \
  +echo  *; \
  +echo  * This file was generated by Kbuild; \
  +echo  *; \
  +echo  */; \
  +echo ; \
  +sed -ne $(sed-y) $; \
  +echo ; \
  +echo #endif )  $@
  +endef
 
 Can we use here documents in cases like this, so the number of
 shell command executions could be greatly reduced?
 
 Does something like this work?
 
 define cmd_generic-offsets\
   cat _END_  $@\
 #ifndef __GENERIC_ASM_OFFSETS_H__ \
 #define __GENERIC_ASM_OFFSETS_H__ \
 /*\
  * DO NOT MODIFY  \
  *\
  * This file was generated by Kbuild  \
  */   \
 $$(sed -ne $(sed-y) $)   \
 #endif\

We can use printf(1) to split this up into 3 parts, but it honestly
reads worse:
diff --git a/Kbuild b/Kbuild
index 1d89761..b8d747f 100644
--- a/Kbuild
+++ b/Kbuild
@@ -15,15 +15,14 @@ targets := $(generic-offsets-file) lib/asm-offsets.s
 quiet_cmd_generic-offsets = GEN $@
 define cmd_generic-offsets
(set -e; \
-echo #ifndef __GENERIC_ASM_OFFSETS_H__; \
-echo #define __GENERIC_ASM_OFFSETS_H__; \
-echo /*; \
-echo  * DO NOT MODIFY.; \
-echo  *; \
-echo  * This file was generated by Kbuild; \
-echo  *; \
-echo  */; \
-echo ; \
+printf #ifndef __GENERIC_ASM_OFFSETS_H__\n\
+#define __GENERIC_ASM_OFFSETS_H__\n\
+/*\n\
+ * DO NOT MODIFY.\n\
+ *\n\
+ * This file was generated by Kbuild\n\
+ *\n\
+ */\n\n; \
 sed -ne $(sed-y) $; \
 echo ; \
 echo #endif )  $@

(And it doesn't quite look right in the file, but that's just a matter
of massaging things.  It also didn't seem to matter to overall build
time since it's a one-off generation, not a many-off generation.  I'm OK
with this as-is.

-- 
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][RFC v2] add pci 64 bit prefechable mem support

2014-02-25 Thread Matt Porter
On Fri, Feb 14, 2014 at 10:36:20AM +0800, FengHua wrote:
 
 
 
  -Original Messages-
  From: Wolfgang Denk w...@denx.de
  Sent Time: 2014-02-14 00:30:24 (Friday)
  To: feng...@phytium.com.cn
  Cc: u-boot@lists.denx.de, tr...@ti.com, albert.u.b...@aribaud.net
  Subject: Re: [PATCH][RFC v2] add pci 64 bit prefechable mem support
  
  Dear feng...@phytium.com.cn,
  
  In message 1392282108-56485-1-git-send-email-feng...@phytium.com.cn you 
  wrote:
   From: David Feng feng...@phytium.com.cn
   
   u-boot did not program the upper 32 bits of prefetchable base and limit
   in pci bridge config space. I think it's needed when 64 bit address space
   is used.
  
  You write I think it's needed - is it or not?
  
  Do you have a specific test case that fails without your patch, and
  works with it?
  
  Best regards,
  
  Wolfgang Denk. 
 There's no test case now (maybe a few days later I could make a test).
 PCI-to-PCI Bridge Architecture Specification require that the upper 32 bit 
 of prefetchable space
 must be initialized by configuration software. But usually the default value 
 is zero already.
 A board using 64 bit pci prefetchable memory space and a pci device with 64 
 bit prefetchable space
 are needed. I think u-boot did not encounter this situation before.

There's two things happening here.

1) You are adding support to explicitly program the upper32 prefetch
limit/base to zero (in the 64-bit prefetch memory 4GB case) which is
a completely theoretical fix. I can more or less confirm that this
doesn't cause a problem in practice for prefetch memory 4GB. When I
wrote the original code in-kernel, I had noticed this on the 21154
bridges and others when I was trying out WIP prefetch support (which
I never finished to upstream because we let the kernel subsystem fix
up prefetch later). If we look at the history of the prefetch support
added to the U-Boot version of pci_auto.c it's also proven on real h/w
that this is only a theoretical fix. To be fair, it is best to be safe,
but as Wolfgang points out it appears you are fixing something that's
not practically broken

2) 64-bit prefetch support for prefetch memory 4GB. It's up to the
maintainers, but given that this is untested code, I don't see a good
reason to merge it. I have reviewed it and the implementation looks
correct to me per spec. However, I believe that you should resubmit this
patch along with support for a platform that actually makes use of it as
you describe above. At that time, it would be appropriate to fix the
possible latent bug (for a not-yet-known p2p bridge that doesn't default
upper32 limit/base to 0) in the 4GB case just as part of handling the
4GB case.

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


Re: [U-Boot] [PATCH] ar8031/8033/phy:enable autonegotiation for ar8031/8033

2014-02-25 Thread York Sun
On 12/22/2013 11:51 PM, Zhao Qiang wrote:
 Function genphy_parse_link() used if (mii_reg  BMSR_ANEGCAPABLE) before
 while if (phydev-supported  SUPPORTED_Autoneg) now.
 So assign phydev-supported to phydev-drv-features for ar8031/8033
 to enable autonegotiation.
 
 Signed-off-by: Zhao Qiang b45...@freescale.com
 ---

Applied to u-boot-mpc85xx/master. Thanks.

York


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


[U-Boot] Please pull u-boot-mpc85xx.git master

2014-02-25 Thread York Sun
Tom,

The following changes since commit 22a240c32c1340183fce12867ae5f8736b92a638:

  serial/serial_arc - add driver for ARC UART (2014-02-07 12:55:07 -0500)

are available in the git repository at:

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

for you to fetch changes up to 91d7746df89f858548fe535137b4b185a6a76d59:

  fsl/usb: Limit phy_type comparison to first four characters (2014-02-24
15:23:57 -0800)


Haijun.Zhang (1):
  powerpc/mpc8536DS:Increase binary size for mpc8536DS board

Nikhil Badola (1):
  fsl/usb: Limit phy_type comparison to first four characters

Shengzhou Liu (2):
  powerpc/t208x: some update to support t2081
  powerpc/t2081qds: Add T2081 QDS board support

Ying Zhang (4):
  SPL: powerpc: expand SPL's length to 128K
  SPL: P2020RDB: fix the problem booting from spi flash
  SPL: P1022DS: fix the problem booting from spi flash
  powerpc: p1010rdb: Enable p1010rdb to start from NAND/SD/SPI flash with 
SPL

Zhao Qiang (1):
  ar8031/8033/phy:enable autonegotiation for ar8031/8033

 arch/powerpc/cpu/mpc85xx/speed.c   |3 +-
 arch/powerpc/cpu/mpc85xx/t2080_ids.c   |2 +
 arch/powerpc/cpu/mpc85xx/t2080_serdes.c|3 +-
 board/freescale/p1010rdb/Makefile  |4 +
 board/freescale/p1010rdb/spl.c |  108 ++
 board/freescale/p1010rdb/spl_minimal.c |   76 +--
 board/freescale/p1010rdb/tlb.c |   12 +-
 board/freescale/{t2080qds = t208xqds}/Makefile|6 +-
 board/freescale/{t2080qds = t208xqds}/ddr.c   |0
 board/freescale/{t2080qds = t208xqds}/ddr.h   |0
 .../eth_t2080qds.c = t208xqds/eth_t208xqds.c} |  219 
 board/freescale/{t2080qds = t208xqds}/law.c   |0
 board/freescale/{t2080qds = t208xqds}/pci.c   |0
 .../freescale/{t2080qds = t208xqds}/t2080_rcw.cfg |0
 board/freescale/t208xqds/t2081_rcw.cfg |8 +
 .../t2080_pbi.cfg = t208xqds/t208x_pbi.cfg}   |0
 .../{t2080qds/t2080qds.c = t208xqds/t208xqds.c}   |   89 +++-
 .../{t2080qds/t2080qds.h = t208xqds/t208xqds.h}   |0
 .../t2080qds_qixis.h = t208xqds/t208xqds_qixis.h} |8 +-
 board/freescale/{t2080qds = t208xqds}/tlb.c   |0
 boards.cfg |   15 +-
 common/env_sf.c|7 +-
 drivers/net/phy/atheros.c  |1 +
 drivers/usb/host/ehci-fsl.c|2 +-
 include/configs/MPC8536DS.h|   10 +-
 include/configs/P1010RDB.h |  156 +-
 include/configs/P1022DS.h  |   18 +-
 include/configs/{T2080QDS.h = T208xQDS.h} |   29 ++-
 include/configs/p1_p2_rdb_pc.h |   24 ++-
 29 files changed, 622 insertions(+), 178 deletions(-)
 create mode 100644 board/freescale/p1010rdb/spl.c
 rename board/freescale/{t2080qds = t208xqds}/Makefile (53%)
 rename board/freescale/{t2080qds = t208xqds}/ddr.c (100%)
 rename board/freescale/{t2080qds = t208xqds}/ddr.h (100%)
 rename board/freescale/{t2080qds/eth_t2080qds.c = t208xqds/eth_t208xqds.c} 
(66%)
 rename board/freescale/{t2080qds = t208xqds}/law.c (100%)
 rename board/freescale/{t2080qds = t208xqds}/pci.c (100%)
 rename board/freescale/{t2080qds = t208xqds}/t2080_rcw.cfg (100%)
 create mode 100644 board/freescale/t208xqds/t2081_rcw.cfg
 rename board/freescale/{t2080qds/t2080_pbi.cfg = t208xqds/t208x_pbi.cfg} 
(100%)
 rename board/freescale/{t2080qds/t2080qds.c = t208xqds/t208xqds.c} (80%)
 rename board/freescale/{t2080qds/t2080qds.h = t208xqds/t208xqds.h} (100%)
 rename board/freescale/{t2080qds/t2080qds_qixis.h = t208xqds/t208xqds_qixis.h}
(90%)
 rename board/freescale/{t2080qds = t208xqds}/tlb.c (100%)
 rename include/configs/{T2080QDS.h = T208xQDS.h} (97%)

Thanks,

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


[U-Boot] [PATCH] fix: trats: clock setup: enable all clocks in clk_gate_block.

2014-02-25 Thread Przemyslaw Marczak
This change fixes kernel boot issue on trats. Some drivers in kernel 3.10
expects that proper clocks are enabled, e.g. mfc driver clock.

Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com
cc: Lukasz Majewski l.majew...@samsung.com
cc: Minkyu Kang mk7.k...@samsung.com
cc: Tom Rini tr...@ti.com
---
 board/samsung/trats/setup.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/samsung/trats/setup.h b/board/samsung/trats/setup.h
index 2f5ccb1..efb392c 100644
--- a/board/samsung/trats/setup.h
+++ b/board/samsung/trats/setup.h
@@ -611,7 +611,7 @@
  | (CLK_EN  BIT_PERIL_CLK_SLIMBUS)))
 #define CLK_GATE_IP_PERIR_VAL  (CLK_GATE_IP_PERIR_ALL_DIS \
| ~((CLK_EN  BIT_PERIR_CLK_KEYIF)))
-#define CLK_GATE_BLOCK_VAL CLK_GATE_BLOCK_ALL_DIS
+#define CLK_GATE_BLOCK_VAL CLK_GATE_BLOCK_ALL_EN
 
 /* PS_HOLD: Data Hight, Output En */
 #define BIT_DAT8
-- 
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] fix: trats: clock setup: enable all clocks in clk_gate_block.

2014-02-25 Thread Tom Rini
On Tue, Feb 25, 2014 at 06:37:43PM +0100, Przemyslaw Marczak wrote:

 This change fixes kernel boot issue on trats. Some drivers in kernel 3.10
 expects that proper clocks are enabled, e.g. mfc driver clock.
 
 Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com
 cc: Lukasz Majewski l.majew...@samsung.com
 cc: Minkyu Kang mk7.k...@samsung.com
 cc: Tom Rini tr...@ti.com

My first inclination is NAK, the kernel is responsible for enabling
clocks that it needs and we spent a while in TI-land dealing with the
fallout in various ways of enabling everything in U-Boot (you run into
various types of PM-related fun).  If you have a vendor kernel you need
to support this on, you need a vendor U-Boot with this work-around until
the kernel is fixed.

-- 
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 REPOST] usb: create common header virtual root hub descriptors

2014-02-25 Thread Marek Vasut
On Friday, February 21, 2014 at 05:19:12 AM, Stephen Warren wrote:
 On 02/13/2014 09:15 PM, Stephen Warren wrote:
  Many USB host controller drivers contain almost identical copies of the
  same virtual root hub descriptors. Put these into a common file to avoid
  duplication.
  
  Note that there were some very minor differences between the descriptors
  in the various files, such as:
  
  - USB 1.0 vs. USB 1.1
  - Manufacturer/Device ID
  - Max packet size
  - String content
  
  I assume these aren't relevant.
 
 Marek, how long do you think we should wait for acks/naks from the CC'd
 people?

Well, I'm picking this up now.

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


Re: [U-Boot] [PATCH v2 00/13] ARMv7: add PSCI support to u-boot

2014-02-25 Thread Ezaul Zillmer
Hi Marc Zyngier

Where could obtain this repository with these alterations to be able to 
test 
virtualization with KVM on my cubieboard2'm using Kernel 3.14.rc4 

I appreciate if you help 

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


Re: [U-Boot] FAT filesystem support on SPI flash

2014-02-25 Thread Vasili Galka
Dear Jagan,

I'm not sure I fully understand your question.
SPI flash is just a medium that has sectors/pages/blocks (call it
however you want). You are free to store data with any structure you
like on it. So if you like - you can store FAT file-system on it.
That's true that maybe storing a FAT file-system that has frequent
write operations on SPI flash is not a good idea, both because of
speed and because of flash wear. But that is an entirely different
question. There are still many cases when the data does not change
frequently and FAT on SPI flash can be useful.

Best,
Vasili

On Sun, Feb 23, 2014 at 7:49 PM, Jagan Teki jagannadh.t...@gmail.com wrote:
 On Sun, Feb 23, 2014 at 7:07 PM, Vasili Galka vas...@visionmap.com wrote:
 Hi,

 On our system, we are interested in keeping all files, including the OS 
 image and U-Boot second stage on FAT filesystem residing on a SPI flash.

 I'm not a file-system expert, but I've a basic question like how
 does/well a SPI flash(mtd) device have
 FAT support on it. Generally flash file-systems were categories to do
 the job right?


 I have not found existing U-Boot support for such functionality. Have I 
 missed it?

 In any case, I'm willing to implement this, do you see it reasonable 
 incorporating such code into U-Boot? (if it passes review of course)

 I note about design: As our chip (TI's AM335x) does not support direct boot 
 from FAT stored on SPI, I plan reserving section at the beginning of SPI 
 flash for the first stage boot loader and having the filesystem after it.

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


Re: [U-Boot] [PATCH v2 00/13] ARMv7: add PSCI support to u-boot

2014-02-25 Thread Marc Zyngier

Hi,

On 2014-02-25 13:38, Ezaul Zillmer wrote:

Hi Marc Zyngier

Where could obtain this repository with these alterations to be able 
to

test
virtualization with KVM on my cubieboard2'm using Kernel 3.14.rc4

I appreciate if you help


You're looking at an older patch series. The new one can be found 
there:

http://permalink.gmane.org/gmane.comp.hardware.netbook.arm.sunxi/7151

I also have a repository with this code at:
git://git.kernel.org/pub/scm/linux/kernel/git/maz/u-boot.git wip/psci

Cheers,

M.
--
Who you jivin' with that Cosmik Debris?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] FAT filesystem support on SPI flash

2014-02-25 Thread Vasili Galka
Dear Wolfgang,

1. So, my understanding is that fatload/fatls/etc have only MMC/SATA
support now? No support for MTD?

2. Where can I find the description of device driver model you
mention? When is it planned to be adopted?

Best,
Vasili

On Sun, Feb 23, 2014 at 7:23 PM, Wolfgang Denk w...@denx.de wrote:
 Dear Vasili,

 In message d69e639dbb744e9ca4c7742f42c82...@ex13.visionmap.co.il you wrote:

 On our system, we are interested in keeping all files, including the OS 
 image and U-Boot second stage on FAT filesystem residing on a SPI flash.

 I have not found existing U-Boot support for such functionality. Have I 
 missed it?

 We do not have FAT suppot on flash devices yet.

 In any case, I'm willing to implement this, do you see it reasonable 
 incorporating such code into U-Boot? (if it passes review of course)

 I think the best way to implement this would require a two staged
 approach: in the first stage, U-Boot should adapte the device driver
 model we've been waiting for so long; in the second stage, the file
 system support would more or less fall into place on to of the then
 existing storage device drivers.

 Best regards,

 Wolfgang Denk

 --
 DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
 HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
 Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
 When some people discover the truth, they just can't  understand  why
 everybody isn't eager to hear it.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] u-boot.dtb vs. dts/dt.dtb output filename, also O= vs BUILD_DIR=

2014-02-25 Thread Stephen Warren
On 02/24/2014 05:38 PM, Masahiro Yamada wrote:
 Prior the to kbuild conversion...
...
 Related, I also found that pre-Kbuild, I could make BUILD_DIR=..., but
 now I have to make O= That's also an external change in behaviour.
 Was that intentional?
 
 make O=... are always supported before and after Kbuild.
 (I guess many peaple use it for less typing.)

OK, O= works fine; I'll switch our tool to that.

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


Re: [U-Boot] [PATCH] ar8031/8033/phy:enable autonegotiation for ar8031/8033

2014-02-25 Thread Joe Hershberger
On Mon, Feb 24, 2014 at 5:54 PM, York Sun york...@freescale.com wrote:

 On 12/22/2013 11:51 PM, Zhao Qiang wrote:
  Function genphy_parse_link() used if (mii_reg  BMSR_ANEGCAPABLE)
 before
  while if (phydev-supported  SUPPORTED_Autoneg) now.
  So assign phydev-supported to phydev-drv-features for ar8031/8033
  to enable autonegotiation.
 
  Signed-off-by: Zhao Qiang b45...@freescale.com
  ---
   drivers/net/phy/atheros.c | 1 +
   1 file changed, 1 insertion(+)
 
  diff --git a/drivers/net/phy/atheros.c b/drivers/net/phy/atheros.c
  index b20b4df..1ee2226 100644
  --- a/drivers/net/phy/atheros.c
  +++ b/drivers/net/phy/atheros.c
  @@ -13,6 +13,7 @@ static int ar8021_config(struct phy_device *phydev)
phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x05);
phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x3D47);
 
  + phydev-supported = phydev-drv-features;
return 0;
   }
 
 

 Joe,

 This patch has been floating for a while. If it is OK, I'd like to take it
 in
 with other 85xx patches.


Sorry for the delayed response... This change seems fine.

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


Re: [U-Boot] [U-Boot PATCH v2 00/12] Add support for keystone2 SoC and K2HK EVM

2014-02-25 Thread Tom Rini
On Thu, Feb 20, 2014 at 12:55:02PM -0500, Murali Karicheri wrote:

 This patch series add support for keystone2 SoC and K2HK EVM

In general, you ran checkpatch.pl right?  I see some '#definetab'
cases that need manual fixing up as well.  Further comments and acks
coming.

-- 
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] [U-Boot PATCH v2 02/12] tools: sort the entries in Makefile

2014-02-25 Thread Tom Rini
On Thu, Feb 20, 2014 at 12:55:04PM -0500, Murali Karicheri wrote:

 The NOPED_OBJ_FILES, dumpimage and mkimage object file
 entries are to be kept sorted. This patch fix this issue.
 
 Signed-off-by: Murali Karicheri m-kariche...@ti.com

Acked-by: Tom Rini tr...@ti.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] [U-Boot PATCH v2 01/12] fdt: call ft_board_setup_ex() at the end of image_setup_libfdt()

2014-02-25 Thread Tom Rini
On Thu, Feb 20, 2014 at 12:55:03PM -0500, Murali Karicheri wrote:

 From: Vitaly Andrianov vita...@ti.com
 
 The keystone2 SOC requires to fix all 32 bit aliased addresses
 to their 36 physical format. This has to happen after all fdt
 nodes are added or modified.
 
 Signed-off-by: Vitaly Andrianov vita...@ti.com

Acked-by: Tom Rini tr...@ti.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] [U-Boot PATCH v2 03/12] tools: mkimage: add support for gpimage format

2014-02-25 Thread Tom Rini
On Thu, Feb 20, 2014 at 12:55:05PM -0500, Murali Karicheri wrote:

 This patch add support for gpimage format as a preparatory
 patch for porting u-boot for keystone2 devices and is
 based on omapimage format. It re-uses gph header to store the
 size and loadaddr as done in omapimage.c
 
 Signed-off-by: Vitaly Andrianov vita...@ti.com
 Signed-off-by: Murali Karicheri m-kariche...@ti.com

Acked-by: Tom Rini tr...@ti.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] [U-Boot PATCH v2 04/12] arm: add support for arch timer

2014-02-25 Thread Tom Rini
On Thu, Feb 20, 2014 at 12:55:06PM -0500, Murali Karicheri wrote:

 From: Vitaly Andrianov vita...@ti.com
 
 This patch add basic support for the architecture timer found on recent
 ARMv7 based SoCs.
 
 Signed-off-by: Vitaly Andrianov vita...@ti.com
 Signed-off-by: Murali Karicheri m-kariche...@ti.com

Acked-by: Tom Rini tr...@ti.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] [U-Boot PATCH v2 08/12] k2hk: add support for k2hk SOC and EVM

2014-02-25 Thread Tom Rini
On Thu, Feb 20, 2014 at 12:55:10PM -0500, Murali Karicheri wrote:

 From: Vitaly Andrianov vita...@ti.com
 
 k2hk EVM is based on Texas Instruments Keystone2 Hawking/Kepler
 SoC. Keystone2 SoC has ARM v7 Cortex-A15 MPCore processor. Please
 refer the ti/k2hk_evm/README for details on the board, build and other
 information.
 
 This patch add support for keystone architecture and k2hk evm.
 
 Signed-off-by: Vitaly Andrianov vita...@ti.com
 Signed-off-by: Murali Karicheri m-kariche...@ti.com
 Signed-off-by: WingMan Kwok w-kw...@ti.com
 Signed-off-by: Sandeep Nair sandee...@ti.com
[snip]
 diff --git a/Makefile b/Makefile
 index 47a03e3..ea2a387 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -491,6 +491,23 @@ $(obj)u-boot.spr:$(obj)u-boot.img 
 $(obj)spl/u-boot-spl.bin
   --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff $@
   cat $(obj)u-boot.img  $@
  
 +$(obj)u-boot-spi.gph:$(obj)u-boot.img $(obj)spl/u-boot-spl.bin
 + $(obj)tools/mkimage -A $(ARCH) -T gpimage -C none \
 + -a $(CONFIG_SPL_TEXT_BASE) -e $(CONFIG_SPL_TEXT_BASE) \
 + -n SPL -d $(obj)spl/u-boot-spl.bin 
 $(obj)spl/u-boot-spl.gph
 + $(OBJCOPY) ${OBJCFLAGS} -I binary \
 + --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0 -O binary \
 + $(obj)spl/u-boot-spl.gph $(obj)spl/u-boot-spl-pad.gph
 + cat $(obj)spl/u-boot-spl-pad.gph $(obj)u-boot.img  $@
 +
 +$(obj)u-boot-nand.gph:   $(obj)u-boot.bin
 + $(obj)tools/mkimage -A $(ARCH) -T gpimage -C none \
 + -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) \
 + -n U-Boot -d $(obj)u-boot.bin $(obj)gph-u-boot.bin
 + @dd if=/dev/zero of=$(obj)zero.bin bs=8 count=1 2/dev/null
 + @cat $(obj)gph-u-boot.bin $(obj)zero.bin  $@
 + @rm $(obj)zero.bin

First, these need re-writing for Kbuild.  Second, we don't ever use
u-boot-nand.gph or talk about it in the README, do we?

[snip]
 +void init_pll(const struct pll_init_data *data)
 +{
 + u32 tmp, tmp_ctl, pllm, plld, pllod, bwadj;
 +
 + pllm = data-pll_m - 1;
 + plld = (data-pll_d - 1)  PLL_DIV_MASK;
 + pllod = (data-pll_od - 1)  PLL_CLKOD_MASK;
 +
 + if (data-pll == MAIN_PLL) {
 + sdelay(21);

Comments on the delay please.

 diff --git a/arch/arm/cpu/armv7/keystone/config.mk 
 b/arch/arm/cpu/armv7/keystone/config.mk
 new file mode 100644
 index 000..1c8769c
 --- /dev/null
 +++ b/arch/arm/cpu/armv7/keystone/config.mk
 @@ -0,0 +1,15 @@
 +# (C) Copyright 2012-2014
 +# Texas Instruments Incorporated, www.ti.com
 +# SPDX-License-Identifier: GPL-2.0+
 +#
 +
 +PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float

This is incorrect and not needed.

 +# =
 +#
 +# Supply options according to compiler version
 +#
 +# =
 +PF_CPPFLAGS_SLB +=$(call cc-option,-mshort-load-bytes,\
 + $(call cc-option,-malignment-traps,))
 +PLATFORM_RELFLAGS += $(PF_CPPFLAGS_SLB)

Also not needed.

 diff --git a/arch/arm/cpu/armv7/keystone/init.c 
 b/arch/arm/cpu/armv7/keystone/init.c
 new file mode 100644
 index 000..1b7e52a
 --- /dev/null
 +++ b/arch/arm/cpu/armv7/keystone/init.c
[snip]
 +void reset_cpu(ulong addr)
 +{
 + volatile u32 *rstctrl = (volatile u32 *)(CLOCK_BASE + 0xe8);
 + u32 tmp;
 +
 + tmp = *rstctrl  0x;
 + *rstctrl = tmp | 0x5a69;
 +
 + *rstctrl = 0xfffe;

Comments / define these please.

 +++ b/arch/arm/cpu/armv7/keystone/psc.c
[snip]
 +/*
 + * FUNCTION PURPOSE: Wait for end of transitional state
 + *
 + * DESCRIPTION: Polls pstat for the selected domain and waits for transitions
 + *  to be complete.
 + *
 + *  Since this is boot loader code it is *ASSUMED* that 
 interrupts
 + *  are disabled and no other core is mucking around with the psc
 + *  at the same time.
 + *
 + *  Returns 0 when the domain is free. Returns -1 if a timeout
 + *  occurred waiting for the completion.

Rewrap these lines please, and anywhere else things are too long.

 +++ b/arch/arm/cpu/armv7/keystone/spl.c
[snip]
 +u32 spl_boot_device(void)
 +{
 +#if defined(CONFIG_SPL_SPI_LOAD)
 + return BOOT_DEVICE_SPI;
 +#else
 + puts(Unknown boot device\n);
 + hang();
 +#endif

return -EINVAL (or define and use BOOT_DEVICE_UNKNOWN) and fall back to
the common hang() case please.

 + u32 __pad0;

General form is resvN.

[snip]
 +struct davinci_emif_regs {
 + u_int32_t   ercsr;

Generally we do uint32_t

[snip]
 +#define  REG(addr)   (*(volatile unsigned int *)(addr))
 +#define REG_P(addr)  ((volatile unsigned int *)(addr))
 +
 +typedef volatile unsigned intdv_reg;
 +typedef volatile unsigned int*dv_reg_p;

Where 

Re: [U-Boot] [U-Boot PATCH v2 06/12] i2c, davinci: move i2c_defs.h to the drivers/i2c directory

2014-02-25 Thread Tom Rini
On Thu, Feb 20, 2014 at 12:55:08PM -0500, Murali Karicheri wrote:

 This patch moves the davinci i2c_defs.h file to drivers.i2c directory.
 It will allow to reuse the davinci_i2c driver for TI Keystone2 SOCs.
 
 Not used git mv command to move the file because small part of
 it with definitions specific for Davinci SOCs has to remain in the
 arch/arm/include/asm/arch-davinci.
 
 Signed-off-by: Vitaly Andrianov vita...@ti.com

Acked-by: Tom Rini tr...@ti.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] [U-Boot PATCH v2 07/12] i2c, davinci: add support for multiple i2c buses

2014-02-25 Thread Tom Rini
On Thu, Feb 20, 2014 at 12:55:09PM -0500, Murali Karicheri wrote:

 From: Vitaly Andrianov vita...@ti.com
 
 Signed-off-by: Vitaly Andrianov vita...@ti.com
[snip]
 - * SPDX-License-Identifier:  GPL-2.0+
 + * SPDX-License-Identifier: GPL-2.0+

Don't change whitespace.

 +static struct i2c_regs __attribute__((section(.data))) *i2c_base =
 + (struct i2c_regs *)I2C_BASE;

So you're going to need the i2c driver in SPL?

[snip]
 - div = (CONFIG_SYS_HZ_CLOCK / ((psc + 1) * speed)) - 10; /* SCLL + SCLH 
 */
 - REG(I2C_PSC) = psc; /* 27MHz / (2 + 1) = 9MHz */
 - REG(I2C_SCLL) = (div * 50) / 100;   /* 50% Duty */
 - REG(I2C_SCLH) = div - REG(I2C_SCLL);
 + div = (CONFIG_SYS_HZ_CLOCK / ((psc + 1) * speed)) - 10;
 + REG((i2c_base-i2c_psc)) = psc;
 + REG((i2c_base-i2c_scll)) = (div * 50) / 100;
 + REG((i2c_base-i2c_sclh)) = div - REG((i2c_base-i2c_scll));

Code is equivalent but we lost the comments about what's being done,
please fix.  I think this is the only place but please double check,
thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot PATCH v2 05/12] NAND: DaVinci: allow forced disable of subpage writes

2014-02-25 Thread Tom Rini
On Thu, Feb 20, 2014 at 12:55:07PM -0500, Murali Karicheri wrote:

 This patch introduces a configurable mechanism to disable
 subpage writes in the DaVinci NAND driver.
 
 Signed-off-by: Vitaly Andrianov vita...@ti.com
 Signed-off-by: Murali Karicheri m-kariche...@ti.com

Acked-by: Tom Rini tr...@ti.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] [U-Boot PATCH v2 10/12] keystone2: net: add keystone ethernet driver

2014-02-25 Thread Tom Rini
On Thu, Feb 20, 2014 at 12:55:12PM -0500, Murali Karicheri wrote:

 From: Vitaly Andrianov vita...@ti.com
 
 Ethernet driver configures the CPSW, SGMI and Phy and uses
 the the Navigator APIs. The driver supports 4 Ethernet ports and
 can work with only one port at a time.

First, can we just use things in a dumb mode and use the existing CPSW
driver?  Or are there use cases we need to worry about here with a
bigger / more robust network driver?

 Port configurations are defined in board.c.
 
 Signed-off-by: Vitaly Andrianov vita...@ti.com
 Signed-off-by: Murali Karicheri m-kariche...@ti.com
 Signed-off-by: WingMan Kwok w-kw...@ti.com
[snip]
 +/*#define chipLmbd(x,y) _lmbd(x,y) */

Don't add unused code.

 +/* Marvell 88E PHY ID */
 +#define PHY_MARVELL_88E  (0x01410cc0)

More on this later.

 +/* EMAC MDIO Registers Structure */
 +struct mdio_regs {
 + dv_reg  VERSION;
 + dv_reg  CONTROL;

Why caps?

 +++ b/drivers/net/keystone_net.c

Generic problem, please use phylib.

 +#define debug_emac(fmt, args...) if (emac_dbg) printf(fmt, ##args)

We have debug() already.

 +#ifdef KEYSTONE2_EMAC_GIG_ENABLE
 +#define emac_gigabit_enable(x)   keystone2_eth_gigabit_enable(x)
 +#else
 +#define emac_gigabit_enable(x)   /* no gigabit to enable */
 +#endif

Do we need to do this?

 +static void chip_delay(u32 del)
 +{
 + volatile unsigned int i;
 +
 + for (i = 0; i  (del / 8); i++)
 + ;
 +}

Use one of the generic delays please.

 +/* PHY functions for a generic PHY */
 +static int __attribute__((unused)) gen_init_phy(int phy_addr)

Why are we adding tons of functions that we mark as unused?

 +#if CONFIG_GET_LINK_STATUS_ATTEMPTS  1
 + int j;
 +
 + for (j = 0; (j  CONFIG_GET_LINK_STATUS_ATTEMPTS)  (link_state == 0);
 +  j++) {
 +#endif

New config option, do we really need this as an option?

 +void sgmii_serdes_setup_156p25mhz()
 +{
 + unsigned int cnt;
 +
 + reg_rmw(0x0232a000, 0x0080, 0x);

Please comment on what we're doing here, and why we aren't using a
struct to describe whatever is at 0x0232a000 ?

 +void sgmii_serdes_shutdown()
 +{
 + reg_rmw(0x0232bfe0, 0, 3  29 | 3  13);

Same.

Thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot PATCH v2 12/12] k2hk-evm: add configuration for spi1 and spi2 support

2014-02-25 Thread Tom Rini
On Thu, Feb 20, 2014 at 12:55:14PM -0500, Murali Karicheri wrote:

 currently only spi0 is enabled on k2hk evm. This
 configuration update is needed to enable spi1 and spi2.
 
 Signed-off-by: Murali Karicheri m-kariche...@ti.com

Acked-by: Tom Rini tr...@ti.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] [U-Boot PATCH v2 09/12] keystone2: add keystone multicore navigator driver

2014-02-25 Thread Tom Rini
On Thu, Feb 20, 2014 at 12:55:11PM -0500, Murali Karicheri wrote:

 From: Vitaly Andrianov vita...@ti.com
 
 Multicore navigator consists of Network Coprocessor (NetCP) and
 Queue Manager sub system. More details on the hardware can
 be obtained from the following links:-
 
 Network Coprocessor: http://www.ti.com/lit/pdf/sprugz6
 Multicore Navigator: http://www.ti.com/lit/pdf/sprugr9
 
 Multicore navigator driver implements APIs to configure
 the Queue Manager and NetCP Pkt DMA.
 
 Signed-off-by: Vitaly Andrianov vita...@ti.com
 Signed-off-by: Murali Karicheri m-kariche...@ti.com
 Signed-off-by: WingMan Kwok w-kw...@ti.com

Acked-by: Tom Rini tr...@ti.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] [U-Boot PATCH v2 11/12] spi: davinci: add support for multiple bus and chip select

2014-02-25 Thread Tom Rini
On Thu, Feb 20, 2014 at 12:55:13PM -0500, Murali Karicheri wrote:

 From: Rex Chang rch...@ti.com
 
 Currently davinci spi driver supports only bus 0 cs 0.
 This patch allows driver to support bus 1 and bus 2 with
 configurable number of chip selects. Also defaults are
 selected in a way to avoid regression on other platforms
 that uses davinci spi driver and has only one spi bus.
 
 Signed-off-by: Rex Chang rch...@ti.com
 Signed-off-by: Murali Karicheri m-kariche...@ti.com
 ---
  drivers/spi/davinci_spi.c |   62 
 ++---
  drivers/spi/davinci_spi.h |   33 
  2 files changed, 91 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c
 index e3fb321..c708a04 100644
 --- a/drivers/spi/davinci_spi.c
 +++ b/drivers/spi/davinci_spi.c
 @@ -23,7 +23,7 @@ void spi_init()
  struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
   unsigned int max_hz, unsigned int mode)
  {
 - struct davinci_spi_slave*ds;
 + struct davinci_spi_slave*ds;

Drop this whitespace change please.   Then you can add:

Acked-by: Tom Rini tr...@ti.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] [U-Boot PATCH v2 00/12] Add support for keystone2 SoC and K2HK EVM

2014-02-25 Thread Karicheri, Muralidharan
-Original Message-
From: Karicheri, Muralidharan
Sent: Thursday, February 20, 2014 12:55 PM
To: u-boot@lists.denx.de; Rini, Tom
Cc: Karicheri, Muralidharan
Subject: [U-Boot PATCH v2 00/12] Add support for keystone2 SoC and K2HK EVM

This patch series add support for keystone2 SoC and K2HK EVM

Change history:
   v2
- Review comments incorporated. Following are major comments
  addressed
   - split network driver to navigator driver + ethernet
 driver
   - replaced register base + offset implemenation with struct
   based register access implementation
   - Added Readme for NAND no subpage write option
   - re-use code for davinci i2c driver on keystone2 with updates
   - clock-k2hk.c merged to clock.c
   - currently keeping board specific getclk() command. See the 
 thread
 for the rational.
- Added update to davinci spi driver to re-use on keystone

   v1
- added separate patch for sorting tools/Makefile entries
- reworked gpimage patch to allow more re-use across omapimage/gpimage
- dropped patch related to ubifs file size
- added keystone SoC and K2HK EVM support

   v0
- preparatory patch for keystone

Murali Karicheri (5):
  tools: sort the entries in Makefile
  tools: mkimage: add support for gpimage format
  NAND: DaVinci: allow forced disable of subpage writes
  i2c, davinci: move i2c_defs.h to the drivers/i2c directory
  k2hk-evm: add configuration for spi1 and spi2 support

Rex Chang (1):
  spi: davinci: add support for multiple bus and chip select

Vitaly Andrianov (6):
  fdt: call ft_board_setup_ex() at the end of image_setup_libfdt()
  arm: add support for arch timer
  i2c, davinci: add support for multiple i2c buses
  k2hk: add support for k2hk SOC and EVM
  keystone2: add keystone multicore navigator driver
  keystone2: net: add keystone ethernet driver

 Makefile   |   19 +
 README |5 +
 arch/arm/cpu/armv7/keystone/Makefile   |   18 +
 arch/arm/cpu/armv7/keystone/aemif.c|   71 ++
 arch/arm/cpu/armv7/keystone/clock.c|  313 +++
 arch/arm/cpu/armv7/keystone/cmd_clock.c|  124 +++
 arch/arm/cpu/armv7/keystone/cmd_mon.c  |  131 +++
 arch/arm/cpu/armv7/keystone/config.mk  |   15 +
 arch/arm/cpu/armv7/keystone/ddr3.c |   69 ++
 arch/arm/cpu/armv7/keystone/init.c |   56 ++
 arch/arm/cpu/armv7/keystone/keystone_nav.c |  376 +
 arch/arm/cpu/armv7/keystone/msmc.c |   68 ++
 arch/arm/cpu/armv7/keystone/psc.c  |  238 ++
 arch/arm/cpu/armv7/keystone/spl.c  |   45 +
 arch/arm/include/asm/arch-davinci/i2c_defs.h   |   71 +-
 arch/arm/include/asm/arch-keystone/clock-k2hk.h|  109 +++
 arch/arm/include/asm/arch-keystone/clock.h |   17 +
 arch/arm/include/asm/arch-keystone/clock_defs.h|  121 +++
 arch/arm/include/asm/arch-keystone/emac_defs.h |  250 ++
 arch/arm/include/asm/arch-keystone/emif_defs.h |   73 ++
 arch/arm/include/asm/arch-keystone/hardware-k2hk.h |  145 
 arch/arm/include/asm/arch-keystone/hardware.h  |  175 
 arch/arm/include/asm/arch-keystone/i2c_defs.h  |   17 +
 arch/arm/include/asm/arch-keystone/keystone_nav.h  |  193 +
 arch/arm/include/asm/arch-keystone/nand_defs.h |   25 +
 arch/arm/include/asm/arch-keystone/psc_defs.h  |   90 ++
 arch/arm/include/asm/arch-keystone/spl.h   |   12 +
 arch/arm/lib/Makefile  |1 +
 arch/arm/lib/arch_timer.c  |   58 ++
 board/ti/k2hk_evm/Makefile |9 +
 board/ti/k2hk_evm/README   |   56 ++
 board/ti/k2hk_evm/board.c  |  301 +++
 board/ti/k2hk_evm/ddr3.c   |  269 ++
 boards.cfg |1 +
 common/image-fdt.c |5 +
 common/image.c |1 +
 drivers/i2c/davinci_i2c.c  |  345 
 drivers/i2c/davinci_i2c.h  |   78 ++
 drivers/mtd/nand/davinci_nand.c|3 +
 drivers/net/Makefile   |1 +
 drivers/net/keystone_net.c |  859 
 drivers/serial/ns16550.c   |8 +
 drivers/spi/davinci_spi.c  |   62 +-
 drivers/spi/davinci_spi.h  |   33 +
 include/configs/k2hk_evm.h |  268 ++
 include/fdt_support.h  |1 +
 include/image.h|1 +
 tools/Makefile  

Re: [U-Boot] [U-Boot PATCH v2 00/12] Add support for keystone2 SoC and K2HK EVM

2014-02-25 Thread Tom Rini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 02/25/2014 05:49 PM, Karicheri, Muralidharan wrote:
 -Original Message- From: Karicheri, Muralidharan Sent:
 Thursday, February 20, 2014 12:55 PM To: u-boot@lists.denx.de;
 Rini, Tom Cc: Karicheri, Muralidharan Subject: [U-Boot PATCH v2
 00/12] Add support for keystone2 SoC and K2HK EVM
 
 This patch series add support for keystone2 SoC and K2HK EVM
 
 Change history: v2 - Review comments incorporated. Following are
 major comments addressed - split network driver to navigator
 driver + ethernet driver - replaced register base + offset
 implemenation with struct based register access implementation -
 Added Readme for NAND no subpage write option - re-use code for
 davinci i2c driver on keystone2 with updates - clock-k2hk.c
 merged to clock.c - currently keeping board specific getclk()
 command. See the thread for the rational. - Added update to
 davinci spi driver to re-use on keystone
 
 v1 - added separate patch for sorting tools/Makefile entries -
 reworked gpimage patch to allow more re-use across
 omapimage/gpimage - dropped patch related to ubifs file size -
 added keystone SoC and K2HK EVM support
 
 v0 - preparatory patch for keystone
 
 Murali Karicheri (5): tools: sort the entries in Makefile tools:
 mkimage: add support for gpimage format NAND: DaVinci: allow
 forced disable of subpage writes i2c, davinci: move i2c_defs.h to
 the drivers/i2c directory k2hk-evm: add configuration for spi1
 and spi2 support
 
 Rex Chang (1): spi: davinci: add support for multiple bus and
 chip select
 
 Vitaly Andrianov (6): fdt: call ft_board_setup_ex() at the end of
 image_setup_libfdt() arm: add support for arch timer i2c,
 davinci: add support for multiple i2c buses k2hk: add support for
 k2hk SOC and EVM keystone2: add keystone multicore navigator
 driver keystone2: net: add keystone ethernet driver
 
 Makefile   |   19 + 
 README |5 + 
 arch/arm/cpu/armv7/keystone/Makefile   |   18 + 
 arch/arm/cpu/armv7/keystone/aemif.c|   71 ++ 
 arch/arm/cpu/armv7/keystone/clock.c|  313
 +++ arch/arm/cpu/armv7/keystone/cmd_clock.c|  124
 +++ arch/arm/cpu/armv7/keystone/cmd_mon.c  |  131
 +++ arch/arm/cpu/armv7/keystone/config.mk  |   15 + 
 arch/arm/cpu/armv7/keystone/ddr3.c |   69 ++ 
 arch/arm/cpu/armv7/keystone/init.c |   56 ++ 
 arch/arm/cpu/armv7/keystone/keystone_nav.c |  376
 + arch/arm/cpu/armv7/keystone/msmc.c |
 68 ++ arch/arm/cpu/armv7/keystone/psc.c  |  238
 ++ arch/arm/cpu/armv7/keystone/spl.c  |   45
 + arch/arm/include/asm/arch-davinci/i2c_defs.h   |   71 +- 
 arch/arm/include/asm/arch-keystone/clock-k2hk.h|  109 +++ 
 arch/arm/include/asm/arch-keystone/clock.h |   17 + 
 arch/arm/include/asm/arch-keystone/clock_defs.h|  121 +++ 
 arch/arm/include/asm/arch-keystone/emac_defs.h |  250 ++ 
 arch/arm/include/asm/arch-keystone/emif_defs.h |   73 ++ 
 arch/arm/include/asm/arch-keystone/hardware-k2hk.h |  145  
 arch/arm/include/asm/arch-keystone/hardware.h  |  175  
 arch/arm/include/asm/arch-keystone/i2c_defs.h  |   17 + 
 arch/arm/include/asm/arch-keystone/keystone_nav.h  |  193 + 
 arch/arm/include/asm/arch-keystone/nand_defs.h |   25 + 
 arch/arm/include/asm/arch-keystone/psc_defs.h  |   90 ++ 
 arch/arm/include/asm/arch-keystone/spl.h   |   12 + 
 arch/arm/lib/Makefile  |1 + 
 arch/arm/lib/arch_timer.c  |   58 ++ 
 board/ti/k2hk_evm/Makefile |9 + 
 board/ti/k2hk_evm/README   |   56 ++ 
 board/ti/k2hk_evm/board.c  |  301
 +++ board/ti/k2hk_evm/ddr3.c   |  269
 ++ boards.cfg |1
 + common/image-fdt.c |5 + 
 common/image.c |1 + 
 drivers/i2c/davinci_i2c.c  |  345
  drivers/i2c/davinci_i2c.h  |
 78 ++ drivers/mtd/nand/davinci_nand.c|3
 + drivers/net/Makefile   |1 + 
 drivers/net/keystone_net.c |  859
  drivers/serial/ns16550.c
 |8 + drivers/spi/davinci_spi.c  |
 62 +- drivers/spi/davinci_spi.h  |   33
 + include/configs/k2hk_evm.h |  268
 ++ include/fdt_support.h  |1
 + include/image.h|1 + 
 tools/Makefile |   20 +- 
 tools/gpheader.h   |   40 + 
 tools/gpimage-common.c

Re: [U-Boot] FAT filesystem support on SPI flash

2014-02-25 Thread Tom Rini
On Sun, Feb 23, 2014 at 01:37:53PM +, Vasili Galka wrote:
 Hi,
   
 On our system, we are interested in keeping all files, including the
 OS image and U-Boot second stage on FAT filesystem residing on a SPI
 flash.
 
 I have not found existing U-Boot support for such functionality. Have
 I missed it?
 
 In any case, I'm willing to implement this, do you see it reasonable
 incorporating such code into U-Boot? (if it passes review of course)
 
 I note about design: As our chip (TI's AM335x) does not support direct
 boot from FAT stored on SPI, I plan reserving section at the beginning
 of SPI flash for the first stage boot loader and having the filesystem
 after it.

The high level suggestion is to review your design decision as this
seems rather questionable.  Today our FAT code doesn't work directly on
flash, but I imagine a day or two of hacking might allow it to work.
But FAT isn't designed to be on flash directly and you really want a
good reason to not be using a flash filesystem on SPI.

-- 
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 v2 0/15] Follow-up for Kbuild series: more misc targets and short logs

2014-02-25 Thread Tom Rini
On Mon, Feb 24, 2014 at 11:12:08AM +0900, Masahiro Yamada wrote:

 Kbuild series must be applied before this series.
 
 This series refactors a little, imports more Kbuild features
 and convert many rules to Kbuild style.
 
 I think most of rules will be displayed in short log format
 by applying this series.
 (But I know there are still some old style rules.
 I need more efforts...)
 
 
 Changes in v2:
   - Rebase on commit 1674df60
 
 Masahiro Yamada (15):
   kbuild: consolidate version and timestamp headers generation
   kbuild: abolish depend target
   kbuild: move asm-offsets.h rules to ./Kbuild
   kbuild: rename OBJCFLAGS to OBJCOPYFLAGS
   kbuild: Add $(Q) when descending into subdirectories
   kbuild: use shorten logs objcopy rules
   kbuild: use shorten logs for mkimage rules
   kbuild: use shorten logs for cat rules
   kbuild: use shorten logs for combined rules of mkimage, padding and
 cat
   kbuild: use shorten log for linking u-boot
   kbuild: use shorten logs for misc targets
   kbuild: use shorten logs for IMX images
   kbuild: refactor more IMX image rules
   kbuild: support building signle targets
   kbuild: add misc targets, help, ubootrelease, ubootversion
 
  Kbuild|  87 +
  Makefile  | 482 
 --
  arch/arm/config.mk|  14 +-
  arch/arm/cpu/arm1136/config.mk|  10 -
  arch/arm/cpu/arm926ejs/config.mk  |  10 -
  arch/arm/cpu/armv7/am33xx/config.mk   |   4 +-
  arch/arm/cpu/armv7/config.mk  |  10 -
  arch/arm/cpu/armv7/omap3/config.mk|   2 +-
  arch/arm/cpu/armv7/omap4/config.mk|   2 +-
  arch/arm/cpu/armv7/omap5/config.mk|   2 +-
  arch/arm/cpu/pxa/config.mk|   2 +-
  arch/arm/imx-common/Makefile  |  85 +++--
  arch/blackfin/cpu/Makefile|   6 +-
  arch/mips/config.mk   |   2 +-
  arch/sandbox/config.mk|   4 +
  board/hymod/config.mk |   2 +-
  config.mk |   2 +-
  doc/DocBook/Makefile  |   2 +-
  examples/api/Makefile |  46 +--
  examples/standalone/Makefile  |  35 +-
  nand_spl/board/amcc/acadia/Makefile   |   4 +-
  nand_spl/board/amcc/bamboo/Makefile   |   4 +-
  nand_spl/board/amcc/canyonlands/Makefile  |   4 +-
  nand_spl/board/amcc/kilauea/Makefile  |   4 +-
  nand_spl/board/amcc/sequoia/Makefile  |   4 +-
  nand_spl/board/freescale/mpc8315erdb/Makefile |   4 +-
  nand_spl/board/freescale/mpc8536ds/Makefile   |   4 +-
  nand_spl/board/freescale/mpc8569mds/Makefile  |   4 +-
  nand_spl/board/freescale/mpc8572ds/Makefile   |   4 +-
  nand_spl/board/freescale/p1023rds/Makefile|   4 +-
  nand_spl/board/freescale/p1_p2_rdb/Makefile   |   4 +-
  nand_spl/board/sheldon/simpc8313/Makefile |   4 +-
  scripts/kernel-doc|   4 +-
  spl/Makefile  |  41 ++-
  tools/scripts/make-asm-offsets|  27 --
  35 files changed, 562 insertions(+), 367 deletions(-)
  create mode 100644 Kbuild
  delete mode 100755 tools/scripts/make-asm-offsets

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] Please pull u-boot-mpc85xx.git master

2014-02-25 Thread Tom Rini
On Tue, Feb 25, 2014 at 09:34:53AM -0800, York Sun wrote:

 Tom,
 
 The following changes since commit 22a240c32c1340183fce12867ae5f8736b92a638:
 
   serial/serial_arc - add driver for ARC UART (2014-02-07 12:55:07 -0500)
 
 are available in the git repository at:
 
   git://git.denx.de/u-boot-mpc85xx.git master
 
 for you to fetch changes up to 91d7746df89f858548fe535137b4b185a6a76d59:
 
   fsl/usb: Limit phy_type comparison to first four characters (2014-02-24
 15:23:57 -0800)
 
 
 Haijun.Zhang (1):
   powerpc/mpc8536DS:Increase binary size for mpc8536DS board
 
 Nikhil Badola (1):
   fsl/usb: Limit phy_type comparison to first four characters
 
 Shengzhou Liu (2):
   powerpc/t208x: some update to support t2081
   powerpc/t2081qds: Add T2081 QDS board support
 
 Ying Zhang (4):
   SPL: powerpc: expand SPL's length to 128K
   SPL: P2020RDB: fix the problem booting from spi flash
   SPL: P1022DS: fix the problem booting from spi flash
   powerpc: p1010rdb: Enable p1010rdb to start from NAND/SD/SPI flash with 
 SPL
 
 Zhao Qiang (1):
   ar8031/8033/phy:enable autonegotiation for ar8031/8033
 
  arch/powerpc/cpu/mpc85xx/speed.c   |3 +-
  arch/powerpc/cpu/mpc85xx/t2080_ids.c   |2 +
  arch/powerpc/cpu/mpc85xx/t2080_serdes.c|3 +-
  board/freescale/p1010rdb/Makefile  |4 +
  board/freescale/p1010rdb/spl.c |  108 ++
  board/freescale/p1010rdb/spl_minimal.c |   76 +--
  board/freescale/p1010rdb/tlb.c |   12 +-
  board/freescale/{t2080qds = t208xqds}/Makefile|6 +-
  board/freescale/{t2080qds = t208xqds}/ddr.c   |0
  board/freescale/{t2080qds = t208xqds}/ddr.h   |0
  .../eth_t2080qds.c = t208xqds/eth_t208xqds.c} |  219 
 
  board/freescale/{t2080qds = t208xqds}/law.c   |0
  board/freescale/{t2080qds = t208xqds}/pci.c   |0
  .../freescale/{t2080qds = t208xqds}/t2080_rcw.cfg |0
  board/freescale/t208xqds/t2081_rcw.cfg |8 +
  .../t2080_pbi.cfg = t208xqds/t208x_pbi.cfg}   |0
  .../{t2080qds/t2080qds.c = t208xqds/t208xqds.c}   |   89 +++-
  .../{t2080qds/t2080qds.h = t208xqds/t208xqds.h}   |0
  .../t2080qds_qixis.h = t208xqds/t208xqds_qixis.h} |8 +-
  board/freescale/{t2080qds = t208xqds}/tlb.c   |0
  boards.cfg |   15 +-
  common/env_sf.c|7 +-
  drivers/net/phy/atheros.c  |1 +
  drivers/usb/host/ehci-fsl.c|2 +-
  include/configs/MPC8536DS.h|   10 +-
  include/configs/P1010RDB.h |  156 +-
  include/configs/P1022DS.h  |   18 +-
  include/configs/{T2080QDS.h = T208xQDS.h} |   29 ++-
  include/configs/p1_p2_rdb_pc.h |   24 ++-
  29 files changed, 622 insertions(+), 178 deletions(-)
  create mode 100644 board/freescale/p1010rdb/spl.c
  rename board/freescale/{t2080qds = t208xqds}/Makefile (53%)
  rename board/freescale/{t2080qds = t208xqds}/ddr.c (100%)
  rename board/freescale/{t2080qds = t208xqds}/ddr.h (100%)
  rename board/freescale/{t2080qds/eth_t2080qds.c = t208xqds/eth_t208xqds.c} 
 (66%)
  rename board/freescale/{t2080qds = t208xqds}/law.c (100%)
  rename board/freescale/{t2080qds = t208xqds}/pci.c (100%)
  rename board/freescale/{t2080qds = t208xqds}/t2080_rcw.cfg (100%)
  create mode 100644 board/freescale/t208xqds/t2081_rcw.cfg
  rename board/freescale/{t2080qds/t2080_pbi.cfg = t208xqds/t208x_pbi.cfg} 
 (100%)
  rename board/freescale/{t2080qds/t2080qds.c = t208xqds/t208xqds.c} (80%)
  rename board/freescale/{t2080qds/t2080qds.h = t208xqds/t208xqds.h} (100%)
  rename board/freescale/{t2080qds/t2080qds_qixis.h = 
 t208xqds/t208xqds_qixis.h}
 (90%)
  rename board/freescale/{t2080qds = t208xqds}/tlb.c (100%)
  rename include/configs/{T2080QDS.h = T208xQDS.h} (97%)

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH v2 0/2] Kbuild: Fix a false error of sanity check

2014-02-25 Thread Tom Rini
On Tue, Feb 25, 2014 at 07:26:46PM +0900, Masahiro Yamada wrote:

 
 Masahiro Yamada (2):
   kbuild: Fix a false error of generic board support
   kbuild: Move linker sciript check to prepare1
 
  Makefile | 24 
  include/configs/MPC8536DS.h  |  2 +-
  include/configs/MPC8569MDS.h |  2 +-
  include/configs/MPC8572DS.h  |  2 +-
  include/configs/P1023RDS.h   |  2 +-
  include/configs/P1_P2_RDB.h  |  2 +-
  6 files changed, 17 insertions(+), 17 deletions(-)

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] kbuild: get back DTB at the top directory

2014-02-25 Thread Tom Rini
On Fri, Feb 21, 2014 at 03:34:30PM +0900, Masahiro Yamada wrote:

 Commit 6ab6b2af deleted ./u-boot.dtb because it was a copy
 of dts/dt.dtb.
 
 But Simon suggested to keep u-boot.dtb at the top directory
 because it is a build output.
 
 After discussions, we agreed on revival of ./u-boot.dtb.
 
 Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
 Cc: Simon Glass s...@chromium.org
 Cc: Tom Rini tr...@ti.com
 Acked-by: Simon Glass s...@chromium.org

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] arm: omap: delete unincluded omap-common/config.mk

2014-02-25 Thread Tom Rini
On Tue, Feb 25, 2014 at 10:01:50AM +0900, Masahiro Yamada wrote:

 arch/arm/cpu/armv7/omap-common/config.mk is never included
 because omap-common is not SoC name.
 
 If we want to add OMAP-specific compiler flags,
 they must be added to omap3/config.mk, omap4/config.mk, omap5/config.mk.
 
 Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
 Cc: Tom Rini tr...@ti.com

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH v2 1/2] kbuild: Fix a false error of generic board support

2014-02-25 Thread Simon Glass
On 25 February 2014 03:26, Masahiro Yamada yamad...@jp.panasonic.com wrote:
 Before this commit, make terminated with an error
 where is shouldn't under some condition.

 This bug happened when we built a board unsupporting
 generic board right after building with generic board.

 For example, the following sequence failed.
 (harmony uses generic board but microblaze-generic does not
 support it)

   $ make harmony_config
   Configuring for harmony board...
   $ make CROSS_COMPILE=arm-linux-gnueabi-
 [ Build succeed ]
   $ make microblaze-generic_config
   Configuring for microblaze-generic board...
   $ make CROSS_COMPILE=microblaze-linux-
   Makefile:488: *** Your architecture does not support generic board.
   Please undefined CONFIG_SYS_GENERIC_BOARD in your board config file.  Stop.

 We had to do make clean before building the microblaze board.

 This commit fixes this unconvenience.

 Move generic board sanity check to prepare1 target,
 which is run after generation of include/autoconf.mk.

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

Acked-by: Simon Glass s...@chromium.org
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] kbuild: Move linker sciript check to prepare1

2014-02-25 Thread Simon Glass
On 24 February 2014 06:11, Masahiro Yamada yamad...@jp.panasonic.com wrote:
 Same as the previous commit.
 Move sanity check to prepare1 target to avoid nasty troubles.

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

Acked-by: Simon Glass s...@chromium.org
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 12/15] kbuild: use shorten logs for IMX images

2014-02-25 Thread Simon Glass
Hi Masahiro,

On 23 February 2014 18:58, Masahiro Yamada yamad...@jp.panasonic.com wrote:
 Hello Simon,

 Thanks for your close review.
 This is always appreciated.


  diff --git a/spl/Makefile b/spl/Makefile
  index 22d6323..e8c5938 100644
  --- a/spl/Makefile
  +++ b/spl/Makefile
  @@ -178,8 +178,8 @@ MKIMAGEFLAGS_MLO.byteswap = -T omapimage -n byteswap 
  -a $(CONFIG_SPL_TEXT_BASE)
   MLO MLO.byteswap: $(obj)/u-boot-spl.bin
  $(call if_changed,mkimage)
 
  -$(objtree)/SPL: $(obj)/u-boot-spl.bin
  -   $(Q)$(MAKE) $(build)=spl/arch/arm/imx-common $@
  +SPL: $(obj)/u-boot-spl.bin
  +   $(Q)$(MAKE) $(build)=arch/arm/imx-common $@

 This series looks good to me, but I would like to understand what is
 happening here. Are you changing it to pick up the source from the
 real arch/ directory instead of the spl copy?

 Two things are happening here:
  [1] drop $(objtree)/
  [2] modify $(build)=spl/arch/arm/imx-commot  to
 $(build)=arch/arm/imx-common

 Let me explain the reason of each one by one.

 [1]
 $(objtree) ( and $(OBJTREE)) points to the absolute path of the
 working directory.

 I want short log should be like:
 UIMAGE  SPL
 rather than
 UIMAGE  /home/yamada/workspace/SPL

 That's why  I dropped $(objtree)/ and $(OBJTREE)/  prefixes
 from all IMX related images.

 [2]
 I guess it's difficult to understand what's happening here.
 I hope the following explanation will be clear for you..

 At this commit,
 Both ./Makefile and spl/Makefile descend into arch/arm/imx-common.


 From the ./Makefile, here

 u-boot.imx: u-boot.bin
 $(Q)$(MAKE) $(build)=arch/arm/imx-common $@

 u-boot-with-spl.imx u-boot-with-nand-spl.imx: spl/u-boot-spl.bin u-boot.bin
 $(Q)$(MAKE) $(build)=arch/arm/imx-common $@


 And from spl/Makefile, here

 SPL: $(obj)/u-boot-spl.bin
 $(Q)$(MAKE) $(build)=arch/arm/imx-common $@


 I needed to specify $(build)=arch/arm/imx-common consistenty
 to include .*.cmd files correctly.

 I added
targets += $(addprefix ../../../,$(IMX_CONFIG) SPL u-boot.uim 
 spl/u-boot-nand-spl.imx)
 at the end of arch/arm/imx-common/Makefile.
 (It may look weird. )

 And it is prefixed (obj)/  at scripts/Makefile.lib  line 76
targets := $(addprefix $(obj)/,$(targets))

 If I had not changed $(build)=spl/arm/arm/imx-common,
 $(targets) would have pointed to spl/arch/arm/imx-common/../../../SPL),
 that is, spl/SPL.
 But .SPL.cmd is not in spl/ directory.



 Anyway, it is really complicated to descend into arch/arm/imx-common
 from two Makefiles, ./Makefile and spl/Makefile.

 So I moved the SPL rule from spl/Makefile to ./Makefile.

Sorry I didn't reply earlier when I first read this, it looks good.
Thanks for the detailed explanation.

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


Re: [U-Boot] [PATCH] x86: coreboot: delete unused coreboot/config.mk

2014-02-25 Thread Simon Glass
Hi Masahiro,

On 24 February 2014 05:36, Masahiro Yamada yamad...@jp.panasonic.com wrote:
 HOSTCFLAGS_autoconf.mk.dep was added by commit 422322f
 but it has never been used.

 Cc: Vadim Bendebury vben...@chromium.org
 Cc: Simon Glass s...@chromium.org
 Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
 ---

 Hello Vadim, Simon.

 I cannot understand what the hell this macro is used for.

 Why HOSTCFLAGS_...?
 Why not CFLAGS_... ?

 Can you explain?

No I can't. I don't think this makes any sense.

Acked-by: Simon Glass s...@chromium.org

Regards,
Simon



  board/chromebook-x86/coreboot/config.mk | 7 ---
  1 file changed, 7 deletions(-)
  delete mode 100644 board/chromebook-x86/coreboot/config.mk

 diff --git a/board/chromebook-x86/coreboot/config.mk 
 b/board/chromebook-x86/coreboot/config.mk
 deleted file mode 100644
 index 0c05dd0..000
 --- a/board/chromebook-x86/coreboot/config.mk
 +++ /dev/null
 @@ -1,7 +0,0 @@
 -#
 -# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
 -#
 -# SPDX-License-Identifier: GPL-2.0 BSD-3-Clause
 -#
 -
 -HOSTCFLAGS_autoconf.mk.dep = -Wno-variadic-macros
 --
 1.8.3.2

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


Re: [U-Boot] [PATCH] x86: coreboot: delete unused coreboot/config.mk

2014-02-25 Thread Vadim Bendebury
On Tue, Feb 25, 2014 at 3:43 PM, Simon Glass s...@chromium.org wrote:
 Hi Masahiro,

 On 24 February 2014 05:36, Masahiro Yamada yamad...@jp.panasonic.com wrote:
 HOSTCFLAGS_autoconf.mk.dep was added by commit 422322f
 but it has never been used.

 Cc: Vadim Bendebury vben...@chromium.org
 Cc: Simon Glass s...@chromium.org
 Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
 ---

 Hello Vadim, Simon.

 I cannot understand what the hell this macro is used for.

 Why HOSTCFLAGS_...?
 Why not CFLAGS_... ?

 Can you explain?

 No I can't. I don't think this makes any sense.


this all is ancient history by now, but I think this made sense at the
time, it was affecting compilation options for coreboot.

--vb

 Acked-by: Simon Glass s...@chromium.org

 Regards,
 Simon



  board/chromebook-x86/coreboot/config.mk | 7 ---
  1 file changed, 7 deletions(-)
  delete mode 100644 board/chromebook-x86/coreboot/config.mk

 diff --git a/board/chromebook-x86/coreboot/config.mk 
 b/board/chromebook-x86/coreboot/config.mk
 deleted file mode 100644
 index 0c05dd0..000
 --- a/board/chromebook-x86/coreboot/config.mk
 +++ /dev/null
 @@ -1,7 +0,0 @@
 -#
 -# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
 -#
 -# SPDX-License-Identifier: GPL-2.0 BSD-3-Clause
 -#
 -
 -HOSTCFLAGS_autoconf.mk.dep = -Wno-variadic-macros
 --
 1.8.3.2

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


[U-Boot] [PATCH v5] socfpga: Add socfpga preloader signing to mkimage

2014-02-25 Thread Charles Manning
Like many platforms, the Altera socfpga platform requires that the
preloader be signed in a certain way or the built-in boot ROM will
not boot the code.

This change automatically creates an appropriately signed preloader
from an SPL image.

The signed image includes a CRC which must, of course, be generated
with a CRC generator that the SoCFPGA boot ROM agrees with otherwise
the boot ROM will reject the image.

Unfortunately the CRC used in this boot ROM is not the same as the
Adler CRC in lib/crc32.c. Indeed the Adler code is not technically a
CRC but is more correctly described as a checksum.

Thus, the appropriate CRC generator is added to lib/ as crc32_alt.c.

Signed-off-by: Charles Manning cdhmann...@gmail.com
---

Changes for v3:
 - Fix some coding style issues.
 - Move from a standalone tool to the mkimgae framework.

Changes for v4:
 - Fix more coding style issues.
 - Fix typos in Makefile.
 - Rebase on master (previous version was not on master, but on a 
   working socfpga branch).

Changes for v5:
 - Fix more coding style issues.
 - Add some more comments.
 - Remove some unused defines.
 - Move the local CRC32 code into lib/crc32_alt.c.

Note: Building a SOCFPGA preloader will currently not produe a working
image if built in master, but that is due to issues in building SPL,
not in this signer.


 common/image.c   |1 +
 include/crc32_alt.h  |   17 
 include/image.h  |1 +
 lib/Makefile |1 +
 lib/crc32_alt.c  |   94 +
 spl/Makefile |5 +
 tools/Makefile   |2 +
 tools/crc32_alt.c|1 +
 tools/imagetool.c|2 +
 tools/imagetool.h|1 +
 tools/socfpgaimage.c |  276 ++
 11 files changed, 401 insertions(+)
 create mode 100644 include/crc32_alt.h
 create mode 100644 lib/crc32_alt.c
 create mode 100644 tools/crc32_alt.c
 create mode 100644 tools/socfpgaimage.c

diff --git a/common/image.c b/common/image.c
index 9c6bec5..e7dc8cc 100644
--- a/common/image.c
+++ b/common/image.c
@@ -135,6 +135,7 @@ static const table_entry_t uimage_type[] = {
{   IH_TYPE_PBLIMAGE,   pblimage,   Freescale PBL Boot Image,},
{   IH_TYPE_RAMDISK,ramdisk,RAMDisk Image,  },
{   IH_TYPE_SCRIPT, script, Script, },
+   {   IH_TYPE_SOCFPGAIMAGE,  socfpgaimage,  Altera SOCFPGA 
preloader,},
{   IH_TYPE_STANDALONE, standalone, Standalone Program, },
{   IH_TYPE_UBLIMAGE,   ublimage,   Davinci UBL image,},
{   IH_TYPE_MXSIMAGE,   mxsimage,   Freescale MXS Boot Image,},
diff --git a/include/crc32_alt.h b/include/crc32_alt.h
new file mode 100644
index 000..813d55d
--- /dev/null
+++ b/include/crc32_alt.h
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2014 Charles Manning cdhmann...@gmail.com
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ *
+ * Note that the CRC is **not** the zlib/Adler crc32 in crc32.c.
+ * It is the CRC-32 used in bzip2, ethernet and elsewhere.
+ */
+
+#ifndef __CRC32_ALT_H__
+#define __CRC32_ALT_H__
+
+#include stdint.h
+
+uint32_t crc32_alt(uint32_t crc, const void *_buf, int length);
+
+#endif
diff --git a/include/image.h b/include/image.h
index 6afd57b..bde31d9 100644
--- a/include/image.h
+++ b/include/image.h
@@ -215,6 +215,7 @@ struct lmb;
 #define IH_TYPE_KERNEL_NOLOAD  14  /* OS Kernel Image, can run from any 
load address */
 #define IH_TYPE_PBLIMAGE   15  /* Freescale PBL Boot Image */
 #define IH_TYPE_MXSIMAGE   16  /* Freescale MXSBoot Image  */
+#define IH_TYPE_SOCFPGAIMAGE   17  /* Altera SOCFPGA Preloader */
 
 /*
  * Compression Types
diff --git a/lib/Makefile b/lib/Makefile
index 8c483c9..7ee07a5 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -52,6 +52,7 @@ obj-y += errno.o
 obj-y += display_options.o
 obj-$(CONFIG_BCH) += bch.o
 obj-y += crc32.o
+obj-y += crc32_alt.o
 obj-y += ctype.o
 obj-y += div64.o
 obj-y += hang.o
diff --git a/lib/crc32_alt.c b/lib/crc32_alt.c
new file mode 100644
index 000..e0db335
--- /dev/null
+++ b/lib/crc32_alt.c
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2014 Charles Manning cdhmann...@gmail.com
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ *
+ * Note that the CRC is **not** the zlib/Adler crc32 in crc32.c.
+ * It is the CRC-32 used in bzip2, ethernet and elsewhere.
+ */
+
+#include crc32_alt.h
+#include stdint.h
+
+static uint32_t crc_table[256] = {
+   0x, 0x04c11db7, 0x09823b6e, 0x0d4326d9,
+   0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005,
+   0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
+   0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd,
+   0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9,
+   0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75,
+   0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011,
+   0x791d4014, 0x7ddc5da3, 0x709f7b7a, 0x745e66cd,
+   0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039,
+   0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 

[U-Boot] [PATCH] kbuild: post: fix dependency tracking correctly

2014-02-25 Thread Masahiro Yamada
$(call if_changed,...) must take FORCE as a prerequite.

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

 post/lib_powerpc/fpu/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/post/lib_powerpc/fpu/Makefile b/post/lib_powerpc/fpu/Makefile
index 556a833..5c2e804 100644
--- a/post/lib_powerpc/fpu/Makefile
+++ b/post/lib_powerpc/fpu/Makefile
@@ -19,5 +19,5 @@ ccflags-y := -mhard-float -fkeep-inline-functions
 obj-y := $(objs-before-objcopy:.o=_.o)
 
 OBJCOPYFLAGS := -R .gnu.attributes
-$(obj)/%_.o: $(obj)/%.o
+$(obj)/%_.o: $(obj)/%.o FORCE
$(call if_changed,objcopy)
-- 
1.8.3.2

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


Re: [U-Boot] [PATCH V3 09/12] board:origen: Enable device tree on Origen

2014-02-25 Thread Minkyu Kang
On 25/02/14 23:33, Piotr Wilczek wrote:
 This patch enables to run Origen board on device tree.
 
 Uart, DRAM and MMC init functions are removed as their
 generic replacements form the common board file are used.
 
 The config file is modified to contain only board specific options.
 
 Signed-off-by: Piotr Wilczek p.wilc...@samsung.com
 Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
 Cc: Chander Kashyap k.chan...@samsung.com
 Cc: Minkyu Kang mk7.k...@samsung.com
 ---
 Changes for v3:
  - dts file moved to arch/arm/dts
 
 Changes for v2:
  - no changes
 
  arch/arm/dts/Makefile  |   2 +
  arch/arm/dts/exynos4210-origen.dts |  45 ++
  board/samsung/origen/origen.c  | 112 +++
  include/configs/origen.h   | 117 
 +
  4 files changed, 96 insertions(+), 180 deletions(-)
  create mode 100644 arch/arm/dts/exynos4210-origen.dts
 
 diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
 index 2658911..7abca75 100644
 --- a/arch/arm/dts/Makefile
 +++ b/arch/arm/dts/Makefile
 @@ -1,3 +1,5 @@
 +dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb
 +
  dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \
   exynos5250-snow.dtb \
   exynos5250-smdk5250.dtb \
 diff --git a/arch/arm/dts/exynos4210-origen.dts 
 b/arch/arm/dts/exynos4210-origen.dts
 new file mode 100644
 index 000..5c9d2ae
 --- /dev/null
 +++ b/arch/arm/dts/exynos4210-origen.dts
 @@ -0,0 +1,45 @@
 +/*
 + * Samsung's Exynos4210 based Origen board device tree source
 + *
 + * Copyright (c) 2014 Samsung Electronics Co., Ltd.
 + *   http://www.samsung.com
 + *
 + * SPDX-License-Identifier:  GPL-2.0+
 + */
 +
 +/dts-v1/;
 +/include/ skeleton.dtsi
 +/include/ exynos4.dtsi
 +
 +/ {
 + model = Insignal Origen evaluation board based on Exynos4210;
 + compatible = insignal,origen, samsung,exynos4210;
 +
 + chosen {
 + bootargs =;
 + };
 +
 + aliases {
 + serial0 = /serial@1380;
 + console = /serial@1382;
 + mmc2 = sdhci@1253;
 + };
 +
 + sdhci@1251 {
 + status = disabled;
 + };
 +
 + sdhci@1252 {
 + status = disabled;
 + };
 +
 + sdhci@1253 {
 + samsung,bus-width = 4;
 + samsung,timing = 1 2 3;
 + cd-gpios = gpio 0x2008002 0;
 + };
 +
 + sdhci@1254 {
 + status = disabled;
 + };
 +};
 \ No newline at end of file
 diff --git a/board/samsung/origen/origen.c b/board/samsung/origen/origen.c
 index 15f77ca..d502f02 100644
 --- a/board/samsung/origen/origen.c
 +++ b/board/samsung/origen/origen.c
 @@ -11,129 +11,35 @@
  #include asm/arch/mmc.h
  #include asm/arch/periph.h
  #include asm/arch/pinmux.h
 +#include usb.h
  
  DECLARE_GLOBAL_DATA_PTR;
 -struct exynos4_gpio_part1 *gpio1;
 -struct exynos4_gpio_part2 *gpio2;
  
 -int board_init(void)
 +u32 get_board_rev(void)
  {
 - gpio1 = (struct exynos4_gpio_part1 *) EXYNOS4_GPIO_PART1_BASE;
 - gpio2 = (struct exynos4_gpio_part2 *) EXYNOS4_GPIO_PART2_BASE;
 -
 - gd-bd-bi_boot_params = (PHYS_SDRAM_1 + 0x100UL);
   return 0;
  }
  
 -static int board_uart_init(void)
 +int exynos_init(void)
  {
 - int err;
 -
 - err = exynos_pinmux_config(PERIPH_ID_UART0, PINMUX_FLAG_NONE);
 - if (err) {
 - debug(UART0 not configured\n);
 - return err;
 - }
 -
 - err = exynos_pinmux_config(PERIPH_ID_UART1, PINMUX_FLAG_NONE);
 - if (err) {
 - debug(UART1 not configured\n);
 - return err;
 - }
 -
 - err = exynos_pinmux_config(PERIPH_ID_UART2, PINMUX_FLAG_NONE);
 - if (err) {
 - debug(UART2 not configured\n);
 - return err;
 - }
 -
 - err = exynos_pinmux_config(PERIPH_ID_UART3, PINMUX_FLAG_NONE);
 - if (err) {
 - debug(UART3 not configured\n);
 - return err;
 - }
 -
   return 0;
  }
  
 -#ifdef CONFIG_BOARD_EARLY_INIT_F
 -int board_early_init_f(void)
 -{
 - int err;
 - err = board_uart_init();
 - if (err) {
 - debug(UART init failed\n);
 - return err;
 - }
 - return err;
 -}
 -#endif
 -
 -int dram_init(void)
 +int board_usb_init(int index, enum usb_init_type init)
  {
 - gd-ram_size= get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE)
 - + get_ram_size((long *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE)
 - + get_ram_size((long *)PHYS_SDRAM_3, PHYS_SDRAM_3_SIZE)
 - + get_ram_size((long *)PHYS_SDRAM_4, PHYS_SDRAM_4_SIZE);
 -
   return 0;
  }
  
 -void dram_init_banksize(void)
 -{
 - gd-bd-bi_dram[0].start = PHYS_SDRAM_1;
 - gd-bd-bi_dram[0].size = get_ram_size((long *)PHYS_SDRAM_1, \
 - PHYS_SDRAM_1_SIZE);
 - gd-bd-bi_dram[1].start = PHYS_SDRAM_2;
 - gd-bd-bi_dram[1].size = get_ram_size((long 

Re: [U-Boot] [U-Boot PATCH v2 05/12] NAND: DaVinci: allow forced disable of subpage writes

2014-02-25 Thread Scott Wood
On Thu, 2014-02-20 at 12:55 -0500, Murali Karicheri wrote:
 This patch introduces a configurable mechanism to disable
 subpage writes in the DaVinci NAND driver.
 
 Signed-off-by: Vitaly Andrianov vita...@ti.com
 Signed-off-by: Murali Karicheri m-kariche...@ti.com
 ---
  - Added README
  README  |5 +
  drivers/mtd/nand/davinci_nand.c |3 +++
  2 files changed, 8 insertions(+)
 
 diff --git a/README b/README
 index aea82be..caf60a2 100644
 --- a/README
 +++ b/README
 @@ -4427,6 +4427,11 @@ Low Level (hardware related) configuration options:
  - CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC:
   Enables the RTC32K OSC on AM33xx based plattforms
  
 +- CONFIG_SYS_NAND_NO_SUBPAGE_WRITE
 + Option to disable subpage write in NAND driver
 + Example driver that use this:
 + drivers/mtd/nand/davinci_nand.c

I'd rather this be a full list of drivers that use it, not an example.

-Scott


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


[U-Boot] [PATCH][v2] powerpc/t104xrdb: Update DDR initialization related settings

2014-02-25 Thread Priyanka Jain
Update following DDR related settings for T1040RDB, T1042RDB_PI
-Correct number of chip selects to two as t1040 supports
 two Chip selects.
-Update board_specific_parameters udimm structure with settings
 derived via calibration.
-Update ddr_raw_timing sructure corresponding to DIMM.
-Set ODT to off. Typically on FSL board, ODT is set to 75 ohm,
 but on T104xRDB, on setting this , DDR instability is observed.
 Board-level debugging is in progress.

Verified the updated settings to be working fine with dual-ranked
Micron, MT18KSF51272AZ-1G6 DIMM at data rate 1600MT/s.

Signed-off-by: Priyanka Jain priyanka.j...@freescale.com
Signed-off-by: York Sun york...@freescale.com
---
 Changes for v2:
Udpated description related to ODT off, Removed
cpo, write_data_delay, force_2t parameters as they
are not longer used.

 board/freescale/t104xrdb/ddr.c |   13 +++--
 board/freescale/t104xrdb/ddr.h |   38 --
 include/configs/T1040RDB.h |2 +-
 include/configs/T1042RDB_PI.h  |2 +-
 4 files changed, 25 insertions(+), 30 deletions(-)

diff --git a/board/freescale/t104xrdb/ddr.c b/board/freescale/t104xrdb/ddr.c
index 9009afa..57d0f9c 100644
--- a/board/freescale/t104xrdb/ddr.c
+++ b/board/freescale/t104xrdb/ddr.c
@@ -46,7 +46,7 @@ void fsl_ddr_board_options(memctl_options_t *popts,
 
pbsp = udimms[0];
 
-   /* Get clk_adjust, cpo, write_data_delay,2t, according to the board ddr
+   /* Get clk_adjust according to the board ddr
 * freqency and n_banks specified in board_specific_parameters table.
 */
ddr_freq = get_ddr_freq(0) / 100;
@@ -54,14 +54,10 @@ void fsl_ddr_board_options(memctl_options_t *popts,
if (pbsp-n_ranks == pdimm-n_ranks 
(pdimm-rank_density  30) = pbsp-rank_gb) {
if (ddr_freq = pbsp-datarate_mhz_high) {
-   popts-cpo_override = pbsp-cpo;
-   popts-write_data_delay =
-   pbsp-write_data_delay;
popts-clk_adjust = pbsp-clk_adjust;
popts-wrlvl_start = pbsp-wrlvl_start;
popts-wrlvl_ctl_2 = pbsp-wrlvl_ctl_2;
popts-wrlvl_ctl_3 = pbsp-wrlvl_ctl_3;
-   popts-twot_en = pbsp-force_2t;
goto found;
}
pbsp_highest = pbsp;
@@ -74,13 +70,10 @@ void fsl_ddr_board_options(memctl_options_t *popts,
printf(for data rate %lu MT/s\n, ddr_freq);
printf(Trying to use the highest speed (%u) parameters\n,
   pbsp_highest-datarate_mhz_high);
-   popts-cpo_override = pbsp_highest-cpo;
-   popts-write_data_delay = pbsp_highest-write_data_delay;
popts-clk_adjust = pbsp_highest-clk_adjust;
popts-wrlvl_start = pbsp_highest-wrlvl_start;
popts-wrlvl_ctl_2 = pbsp-wrlvl_ctl_2;
popts-wrlvl_ctl_3 = pbsp-wrlvl_ctl_3;
-   popts-twot_en = pbsp_highest-force_2t;
} else {
panic(DIMM is not supported by this board);
}
@@ -112,8 +105,8 @@ found:
popts-zq_en = 1;
 
/* DHC_EN =1, ODT = 75 Ohm */
-   popts-ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_75ohm);
-   popts-ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_75ohm);
+   popts-ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_OFF);
+   popts-ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_OFF);
 }
 
 phys_size_t initdram(int board_type)
diff --git a/board/freescale/t104xrdb/ddr.h b/board/freescale/t104xrdb/ddr.h
index 9276b59..09b30b9 100644
--- a/board/freescale/t104xrdb/ddr.h
+++ b/board/freescale/t104xrdb/ddr.h
@@ -6,7 +6,6 @@
 
 #ifndef __DDR_H__
 #define __DDR_H__
-
 dimm_params_t ddr_raw_timing = {
.n_ranks = 2,
.rank_density = 2147483648u,
@@ -14,22 +13,21 @@ dimm_params_t ddr_raw_timing = {
.primary_sdram_width = 64,
.ec_sdram_width = 8,
.registered_dimm = 0,
-   .mirrored_dimm = 1,
+   .mirrored_dimm = 0,
.n_row_addr = 15,
.n_col_addr = 10,
.n_banks_per_sdram_device = 8,
.edc_config = 2,/* ECC */
.burst_lengths_bitmask = 0x0c,
-
.tckmin_x_ps = 1071,
-   .caslat_x = 0x2fe  4, /* 5,6,7,8,9,10,11,13 */
-   .taa_ps = 13910,
+   .caslat_x = 0xfe  4,  /* 5,6,7,8,9,10,11 */
+   .taa_ps = 13125,
.twr_ps = 15000,
-   .trcd_ps = 13910,
+   .trcd_ps = 13125,
.trrd_ps = 6000,
-   .trp_ps = 13910,
+   .trp_ps = 13125,
.tras_ps = 34000,
-   .trc_ps = 48910,
+   .trc_ps = 48125,
.trfc_ps = 26,
.twtr_ps = 7500,
.trtp_ps = 7500,
@@ -45,9 +43,6 @@ struct board_specific_parameters {
u32 wrlvl_start;

[U-Boot] [PATCH 0/8] Kbuild: A collection of trivial refactoring

2014-02-25 Thread Masahiro Yamada



Masahiro Yamada (8):
  config.mk: Delete unused variable BCURDIR
  Makefile: delete unused variable LDSCRIPT_MAKEFILE_DIR
  nand_spl: simpc8313: move config.mk used only for nand_spl
  x86: Delete redundant compiler flags
  sh: Do not define -ffreestanding twice
  sh: merge compiler flag -ffixed-r13
  m68k: merge compile flags -ffixed-d7 -sep-data
  arm64: Do not double -mstrict-align option

 Makefile  | 4 
 arch/arm/cpu/armv8/config.mk  | 1 -
 arch/m68k/config.mk   | 3 ++-
 arch/m68k/cpu/mcf5227x/config.mk  | 1 -
 arch/m68k/cpu/mcf523x/config.mk   | 1 -
 arch/m68k/cpu/mcf52x2/config.mk   | 2 --
 arch/m68k/cpu/mcf532x/config.mk   | 2 --
 arch/m68k/cpu/mcf5445x/config.mk  | 2 --
 arch/m68k/cpu/mcf547x_8x/config.mk| 1 -
 arch/sh/config.mk | 1 +
 arch/sh/cpu/sh2/config.mk | 3 +--
 arch/sh/cpu/sh3/config.mk | 1 -
 arch/sh/cpu/sh4/config.mk | 1 -
 arch/x86/config.mk| 5 +
 config.mk | 2 --
 nand_spl/board/sheldon/simpc8313/Makefile | 2 ++
 {board = nand_spl/board}/sheldon/simpc8313/config.mk | 0
 17 files changed, 7 insertions(+), 25 deletions(-)
 rename {board = nand_spl/board}/sheldon/simpc8313/config.mk (100%)

-- 
1.8.3.2

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


[U-Boot] [PATCH 7/8] m68k: merge compile flags -ffixed-d7 -sep-data

2014-02-25 Thread Masahiro Yamada
All arch/m68k/cpu/*/config.mk define the same flags
  PLAGFORM_REFLFLAGS += -ffixed-d7 -msep-data
Move it to arch/m68k/config.mk

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
Cc: Jason Jin jason@freescale.com
---

 arch/m68k/config.mk| 3 ++-
 arch/m68k/cpu/mcf5227x/config.mk   | 1 -
 arch/m68k/cpu/mcf523x/config.mk| 1 -
 arch/m68k/cpu/mcf52x2/config.mk| 2 --
 arch/m68k/cpu/mcf532x/config.mk| 2 --
 arch/m68k/cpu/mcf5445x/config.mk   | 2 --
 arch/m68k/cpu/mcf547x_8x/config.mk | 1 -
 7 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/arch/m68k/config.mk b/arch/m68k/config.mk
index 9c3e24f..79ae298 100644
--- a/arch/m68k/config.mk
+++ b/arch/m68k/config.mk
@@ -11,5 +11,6 @@ CONFIG_STANDALONE_LOAD_ADDR ?= 0x2
 
 PLATFORM_CPPFLAGS += -DCONFIG_M68K -D__M68K__
 PLATFORM_LDFLAGS  += -n
-PLATFORM_RELFLAGS  += -ffunction-sections -fdata-sections
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
 LDFLAGS_FINAL  += --gc-sections
diff --git a/arch/m68k/cpu/mcf5227x/config.mk b/arch/m68k/cpu/mcf5227x/config.mk
index 2681171..b5c26e4 100644
--- a/arch/m68k/cpu/mcf5227x/config.mk
+++ b/arch/m68k/cpu/mcf5227x/config.mk
@@ -7,5 +7,4 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
 
-PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
 PLATFORM_CPPFLAGS += -mcpu=52277 -fPIC
diff --git a/arch/m68k/cpu/mcf523x/config.mk b/arch/m68k/cpu/mcf523x/config.mk
index 620769f..c9435ab 100644
--- a/arch/m68k/cpu/mcf523x/config.mk
+++ b/arch/m68k/cpu/mcf523x/config.mk
@@ -7,5 +7,4 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
 
-PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
 PLATFORM_CPPFLAGS += -mcpu=5235 -fPIC
diff --git a/arch/m68k/cpu/mcf52x2/config.mk b/arch/m68k/cpu/mcf52x2/config.mk
index d0be46f..25f98de 100644
--- a/arch/m68k/cpu/mcf52x2/config.mk
+++ b/arch/m68k/cpu/mcf52x2/config.mk
@@ -7,8 +7,6 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
 
-PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
-
 cfg=$(shell grep configs $(OBJTREE)/include/config.h | sed 
's/.*\(configs.*\)/\1/')
 is5208:=$(shell grep CONFIG_M5208 $(TOPDIR)/include/$(cfg))
 is5249:=$(shell grep CONFIG_M5249 $(TOPDIR)/include/$(cfg))
diff --git a/arch/m68k/cpu/mcf532x/config.mk b/arch/m68k/cpu/mcf532x/config.mk
index be12203..0604ab0 100644
--- a/arch/m68k/cpu/mcf532x/config.mk
+++ b/arch/m68k/cpu/mcf532x/config.mk
@@ -7,8 +7,6 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
 
-PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
-
 cfg=$(shell grep configs $(OBJTREE)/include/config.h | sed 
's/.*\(configs.*\)/\1/')
 is5301x:=$(shell grep CONFIG_MCF5301x $(TOPDIR)/include/$(cfg))
 is532x:=$(shell grep CONFIG_MCF532x $(TOPDIR)/include/$(cfg))
diff --git a/arch/m68k/cpu/mcf5445x/config.mk b/arch/m68k/cpu/mcf5445x/config.mk
index d546b22..6da08d5 100644
--- a/arch/m68k/cpu/mcf5445x/config.mk
+++ b/arch/m68k/cpu/mcf5445x/config.mk
@@ -9,8 +9,6 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
 
-PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
-
 cfg=$(shell grep configs $(OBJTREE)/include/config.h | sed 
's/.*\(configs.*\)/\1/')
 is5441x:=$(shell grep CONFIG_MCF5441x $(TOPDIR)/include/$(cfg))
 
diff --git a/arch/m68k/cpu/mcf547x_8x/config.mk 
b/arch/m68k/cpu/mcf547x_8x/config.mk
index 345f584..825f6cc 100644
--- a/arch/m68k/cpu/mcf547x_8x/config.mk
+++ b/arch/m68k/cpu/mcf547x_8x/config.mk
@@ -7,7 +7,6 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
 
-PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
 PLATFORM_CPPFLAGS += -mcpu=5485 -fPIC
 
 ifneq (,$(findstring -linux-,$(shell $(CC) --version)))
-- 
1.8.3.2

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


[U-Boot] [PATCH 2/8] Makefile: delete unused variable LDSCRIPT_MAKEFILE_DIR

2014-02-25 Thread Masahiro Yamada
LDSCRIPT_MAKEFILE_DIR is not referenced from anywhere. Remove.

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

 Makefile | 4 
 1 file changed, 4 deletions(-)

diff --git a/Makefile b/Makefile
index d3b0afb..fe9e144 100644
--- a/Makefile
+++ b/Makefile
@@ -489,8 +489,6 @@ endif
 # that (or fail if absent).  Otherwise, search for a linker script in a
 # standard location.
 
-LDSCRIPT_MAKEFILE_DIR = $(dir $(LDSCRIPT))
-
 ifndef LDSCRIPT
#LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug
ifdef CONFIG_SYS_LDSCRIPT
@@ -515,8 +513,6 @@ ifndef LDSCRIPT
endif
ifeq ($(wildcard $(LDSCRIPT)),)
LDSCRIPT := $(TOPDIR)/arch/$(ARCH)/cpu/u-boot.lds
-   # We don't expect a Makefile here
-   LDSCRIPT_MAKEFILE_DIR =
endif
 endif
 
-- 
1.8.3.2

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


[U-Boot] [PATCH 3/8] nand_spl: simpc8313: move config.mk used only for nand_spl

2014-02-25 Thread Masahiro Yamada
board/sheldon/simpc8313/config.mk is used only for nand_spl.
So it should go into nand_spl/board/sheldon/simpc8313/.

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

 nand_spl/board/sheldon/simpc8313/Makefile | 2 ++
 {board = nand_spl/board}/sheldon/simpc8313/config.mk | 0
 2 files changed, 2 insertions(+)
 rename {board = nand_spl/board}/sheldon/simpc8313/config.mk (100%)

diff --git a/nand_spl/board/sheldon/simpc8313/Makefile 
b/nand_spl/board/sheldon/simpc8313/Makefile
index 32afc27..8b29e97 100644
--- a/nand_spl/board/sheldon/simpc8313/Makefile
+++ b/nand_spl/board/sheldon/simpc8313/Makefile
@@ -7,6 +7,8 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
 
+include $(srctree)/$(src)/config.mk
+
 nandobj:= $(OBJTREE)/nand_spl/
 
 LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
diff --git a/board/sheldon/simpc8313/config.mk 
b/nand_spl/board/sheldon/simpc8313/config.mk
similarity index 100%
rename from board/sheldon/simpc8313/config.mk
rename to nand_spl/board/sheldon/simpc8313/config.mk
-- 
1.8.3.2

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


[U-Boot] [PATCH 5/8] sh: Do not define -ffreestanding twice

2014-02-25 Thread Masahiro Yamada
-ffreestanding is defined at the top Makefile for all architectures.
Do not define it twice for SH2A.

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
Cc: Nobuhiro Iwamatsu nobuhiro.iwamatsu...@renesas.com
---

 arch/sh/cpu/sh2/config.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sh/cpu/sh2/config.mk b/arch/sh/cpu/sh2/config.mk
index 69273b4..25abcdd 100644
--- a/arch/sh/cpu/sh2/config.mk
+++ b/arch/sh/cpu/sh2/config.mk
@@ -8,7 +8,7 @@
 ENDIANNESS += -EB
 
 ifdef CONFIG_SH2A
-PLATFORM_CPPFLAGS += -m2a -m2a-nofpu -mb -ffreestanding
+PLATFORM_CPPFLAGS += -m2a -m2a-nofpu -mb
 else # SH2
 PLATFORM_CPPFLAGS += -m3e -mb
 endif
-- 
1.8.3.2

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


[U-Boot] [PATCH 6/8] sh: merge compiler flag -ffixed-r13

2014-02-25 Thread Masahiro Yamada
-ffixed-r13 is defined commonly for sh2, sh3, sh4.
Move it to arch/sh/config.mk

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
Cc: Nobuhiro Iwamatsu nobuhiro.iwamatsu...@renesas.com
---

 arch/sh/config.mk | 1 +
 arch/sh/cpu/sh2/config.mk | 1 -
 arch/sh/cpu/sh3/config.mk | 1 -
 arch/sh/cpu/sh4/config.mk | 1 -
 4 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/sh/config.mk b/arch/sh/config.mk
index 758c070..eefcbcd 100644
--- a/arch/sh/config.mk
+++ b/arch/sh/config.mk
@@ -15,3 +15,4 @@ endif
 PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__
 PLATFORM_LDFLAGS += -e $(CONFIG_SYS_TEXT_BASE) --defsym 
reloc_dst=$(CONFIG_SYS_TEXT_BASE)
 LDFLAGS_FINAL = --gc-sections
+PLATFORM_RELFLAGS += -ffixed-r13
diff --git a/arch/sh/cpu/sh2/config.mk b/arch/sh/cpu/sh2/config.mk
index 25abcdd..4904d76 100644
--- a/arch/sh/cpu/sh2/config.mk
+++ b/arch/sh/cpu/sh2/config.mk
@@ -14,5 +14,4 @@ PLATFORM_CPPFLAGS += -m3e -mb
 endif
 PLATFORM_CPPFLAGS += -DCONFIG_SH2 $(call cc-option,-mno-fdpic)
 
-PLATFORM_RELFLAGS += -ffixed-r13
 PLATFORM_LDFLAGS += $(ENDIANNESS)
diff --git a/arch/sh/cpu/sh3/config.mk b/arch/sh/cpu/sh3/config.mk
index abd4b8d..24b5c47 100644
--- a/arch/sh/cpu/sh3/config.mk
+++ b/arch/sh/cpu/sh3/config.mk
@@ -12,4 +12,3 @@
 #
 #
 PLATFORM_CPPFLAGS += -DCONFIG_SH3 -m3
-PLATFORM_RELFLAGS += -ffixed-r13
diff --git a/arch/sh/cpu/sh4/config.mk b/arch/sh/cpu/sh4/config.mk
index 753580b..5773d4f 100644
--- a/arch/sh/cpu/sh4/config.mk
+++ b/arch/sh/cpu/sh4/config.mk
@@ -9,4 +9,3 @@
 #
 #
 PLATFORM_CPPFLAGS += -DCONFIG_SH4 -m4-nofpu
-PLATFORM_RELFLAGS += -ffixed-r13
-- 
1.8.3.2

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


[U-Boot] [PATCH 1/8] config.mk: Delete unused variable BCURDIR

2014-02-25 Thread Masahiro Yamada
This variable was abolished by Kbuild series.
I forgot to delete it.

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

 config.mk | 2 --
 1 file changed, 2 deletions(-)

diff --git a/config.mk b/config.mk
index 9897f20..e59697f 100644
--- a/config.mk
+++ b/config.mk
@@ -46,7 +46,5 @@ OBJCOPYFLAGS += --gap-fill=0xff
 CPPFLAGS = $(RELFLAGS)
 CPPFLAGS += -pipe $(PLATFORM_CPPFLAGS)
 
-BCURDIR = $(subst $(SRCTREE)/,,$(CURDIR:$(obj)%=%))
-
 LDFLAGS += $(PLATFORM_LDFLAGS)
 LDFLAGS_FINAL += -Bstatic
-- 
1.8.3.2

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


[U-Boot] [PATCH 4/8] x86: Delete redundant compiler flags

2014-02-25 Thread Masahiro Yamada
-Wstrict-prototypes, -ffreestanding, -fno-stack-protector
are defined at the top Makefile for all architectures.

Do not define them twice for x86.

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

 arch/x86/config.mk | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/x86/config.mk b/arch/x86/config.mk
index 4a4ad80..58dff14 100644
--- a/arch/x86/config.mk
+++ b/arch/x86/config.mk
@@ -8,13 +8,10 @@
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x4
 
 PLATFORM_CPPFLAGS += -fno-strict-aliasing
-PLATFORM_CPPFLAGS += -Wstrict-prototypes
 PLATFORM_CPPFLAGS += -mregparm=3
 PLATFORM_CPPFLAGS += -fomit-frame-pointer
-PF_CPPFLAGS_X86   := $(call cc-option, -ffreestanding) \
-$(call cc-option, -fno-toplevel-reorder, \
+PF_CPPFLAGS_X86   := $(call cc-option, -fno-toplevel-reorder, \
   $(call cc-option, -fno-unit-at-a-time)) \
-$(call cc-option, -fno-stack-protector) \
 $(call cc-option, -mpreferred-stack-boundary=2)
 PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_X86)
 PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm
-- 
1.8.3.2

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


[U-Boot] [PATCH 8/8] arm64: Do not double -mstrict-align option

2014-02-25 Thread Masahiro Yamada
Seeing arch/arm/cpu/armv8/config.mk, -mstrict-align option
was added to both PLATFORM_NO_UNALIGNED and PLATFORM_CPPFLAGS.

$(PLATFORM_CPPFLAGS) is given to all compiled objects.
Adding the same option to also PLATFORM_NO_UNALIGNED is
redundant.

For example, common/hush.o was compiled with double -mstrict-align.
You can comfirm it by checking common/.hush.o.cmd file.

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
Cc: David Feng feng...@phytium.com.cn
Cc: Albert ARIBAUD albert.u.b...@aribaud.net
Cc: Tom Rini tr...@ti.com
---

 arch/arm/cpu/armv8/config.mk | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/cpu/armv8/config.mk b/arch/arm/cpu/armv8/config.mk
index 027a68c..7e59b4d 100644
--- a/arch/arm/cpu/armv8/config.mk
+++ b/arch/arm/cpu/armv8/config.mk
@@ -8,7 +8,6 @@ PLATFORM_RELFLAGS += -fno-common -ffixed-x18
 
 # SEE README.arm-unaligned-accesses
 PF_NO_UNALIGNED := $(call cc-option, -mstrict-align)
-PLATFORM_NO_UNALIGNED := $(PF_NO_UNALIGNED)
 
 PF_CPPFLAGS_ARMV8 := $(call cc-option, -march=armv8-a)
 PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_ARMV8)
-- 
1.8.3.2

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


Re: [U-Boot] [U-Boot, 2/3] mpc85xx: Add deep sleep framework support

2014-02-25 Thread Tang Yuantian-B29983


On 2014/2/25 星期二 3:11, Scott Wood wrote:

On Mon, 2014-02-24 at 14:44 +0800, Tang Yuantian-B29983 wrote:

On 2014/2/18 星期二 3:18, Scott Wood wrote:

On Sun, 2014-02-16 at 21:35 -0600, Tang Yuantian-B29983 wrote:

-Original Message-
From: Wood Scott-B07421
To: Tang Yuantian-B29983
Cc: Sun York-R58495; Li Yang-Leo-R58472; u-boot@lists.denx.de; Kushwaha
Prabhakar-B32579; Jin Zhengxiong-R64188
Subject: Re: [U-Boot,2/3] mpc85xx: Add deep sleep framework support

On Thu, 2014-02-13 at 02:12 -0600, Tang Yuantian-B29983 wrote:

Use an I/O accessor.

In_be64?? No such function.

Why do you need in_be64() rather than two in_be32()s?


Avoid ECC error. Although, according to my test, in_be32() works too.

Why would you get an ECC error?

-Scott

DDR operation is always in 64bits. if writing a 32bits to memory, you
need to
read a 32bits first, and combine it to form a 64bits. when the new
64bits is written
to memory, ECC occurs.
I was required to do so by hardware team.

U-Boot on PPC is a 32-bit binary (even on 64-bit hardware), so the
compiler is already turning that into two 32-bit writes.

-Scott

I quote: (from Welker James A.-RA8497 )
3) You only need 8-byte (or multiple of 8-byte) transactions when 
initializing the memory.  Typically, we would simply use 2, 64-byte 
writes to DRAM. This is because a sub-doubleword transactions will 
result in a read-modify-write, which would encounter an ECC error (and 
then mask the write data).  After the first 128-bytes of memory have 
been re-initialized, you can issue any transactions to those locations 
again.


I think the transactions between CPU and DDRC are always in 64 bits 
physically because DDRC has 64 bits data bus.

But I am sure about this.
If you are sure about this, I will change as your suggestion.

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


Re: [U-Boot] [PATCH v5] socfpga: Add socfpga preloader signing to mkimage

2014-02-25 Thread Michal Simek
On 02/26/2014 02:17 AM, Charles Manning wrote:
 Like many platforms, the Altera socfpga platform requires that the
 preloader be signed in a certain way or the built-in boot ROM will
 not boot the code.
 
 This change automatically creates an appropriately signed preloader
 from an SPL image.
 
 The signed image includes a CRC which must, of course, be generated
 with a CRC generator that the SoCFPGA boot ROM agrees with otherwise
 the boot ROM will reject the image.
 
 Unfortunately the CRC used in this boot ROM is not the same as the
 Adler CRC in lib/crc32.c. Indeed the Adler code is not technically a
 CRC but is more correctly described as a checksum.
 
 Thus, the appropriate CRC generator is added to lib/ as crc32_alt.c.
 
 Signed-off-by: Charles Manning cdhmann...@gmail.com
 ---
 
 Changes for v3:
  - Fix some coding style issues.
  - Move from a standalone tool to the mkimgae framework.
 
 Changes for v4:
  - Fix more coding style issues.
  - Fix typos in Makefile.
  - Rebase on master (previous version was not on master, but on a 
working socfpga branch).
 
 Changes for v5:
  - Fix more coding style issues.
  - Add some more comments.
  - Remove some unused defines.
  - Move the local CRC32 code into lib/crc32_alt.c.
 
 Note: Building a SOCFPGA preloader will currently not produe a working
 image if built in master, but that is due to issues in building SPL,
 not in this signer.
 
 
  common/image.c   |1 +
  include/crc32_alt.h  |   17 
  include/image.h  |1 +
  lib/Makefile |1 +
  lib/crc32_alt.c  |   94 +
  spl/Makefile |5 +
  tools/Makefile   |2 +
  tools/crc32_alt.c|1 +
  tools/imagetool.c|2 +
  tools/imagetool.h|1 +
  tools/socfpgaimage.c |  276 
 ++
  11 files changed, 401 insertions(+)
  create mode 100644 include/crc32_alt.h
  create mode 100644 lib/crc32_alt.c
  create mode 100644 tools/crc32_alt.c
  create mode 100644 tools/socfpgaimage.c
 
 diff --git a/common/image.c b/common/image.c
 index 9c6bec5..e7dc8cc 100644
 --- a/common/image.c
 +++ b/common/image.c
 @@ -135,6 +135,7 @@ static const table_entry_t uimage_type[] = {
   {   IH_TYPE_PBLIMAGE,   pblimage,   Freescale PBL Boot Image,},
   {   IH_TYPE_RAMDISK,ramdisk,RAMDisk Image,  },
   {   IH_TYPE_SCRIPT, script, Script, },
 + {   IH_TYPE_SOCFPGAIMAGE,  socfpgaimage,  Altera SOCFPGA 
 preloader,},
   {   IH_TYPE_STANDALONE, standalone, Standalone Program, },
   {   IH_TYPE_UBLIMAGE,   ublimage,   Davinci UBL image,},
   {   IH_TYPE_MXSIMAGE,   mxsimage,   Freescale MXS Boot Image,},
 diff --git a/include/crc32_alt.h b/include/crc32_alt.h
 new file mode 100644
 index 000..813d55d
 --- /dev/null
 +++ b/include/crc32_alt.h
 @@ -0,0 +1,17 @@
 +/*
 + * Copyright (C) 2014 Charles Manning cdhmann...@gmail.com
 + *
 + * SPDX-License-Identifier:  GPL-2.0+
 + *
 + * Note that the CRC is **not** the zlib/Adler crc32 in crc32.c.
 + * It is the CRC-32 used in bzip2, ethernet and elsewhere.
 + */
 +
 +#ifndef __CRC32_ALT_H__
 +#define __CRC32_ALT_H__
 +
 +#include stdint.h
 +
 +uint32_t crc32_alt(uint32_t crc, const void *_buf, int length);
 +
 +#endif
 diff --git a/include/image.h b/include/image.h
 index 6afd57b..bde31d9 100644
 --- a/include/image.h
 +++ b/include/image.h
 @@ -215,6 +215,7 @@ struct lmb;
  #define IH_TYPE_KERNEL_NOLOAD14  /* OS Kernel Image, can run 
 from any load address */
  #define IH_TYPE_PBLIMAGE 15  /* Freescale PBL Boot Image */
  #define IH_TYPE_MXSIMAGE 16  /* Freescale MXSBoot Image  */
 +#define IH_TYPE_SOCFPGAIMAGE 17  /* Altera SOCFPGA Preloader */
  
  /*
   * Compression Types
 diff --git a/lib/Makefile b/lib/Makefile
 index 8c483c9..7ee07a5 100644
 --- a/lib/Makefile
 +++ b/lib/Makefile
 @@ -52,6 +52,7 @@ obj-y += errno.o
  obj-y += display_options.o
  obj-$(CONFIG_BCH) += bch.o
  obj-y += crc32.o
 +obj-y += crc32_alt.o
  obj-y += ctype.o
  obj-y += div64.o
  obj-y += hang.o
 diff --git a/lib/crc32_alt.c b/lib/crc32_alt.c
 new file mode 100644
 index 000..e0db335
 --- /dev/null
 +++ b/lib/crc32_alt.c
 @@ -0,0 +1,94 @@
 +/*
 + * Copyright (C) 2014 Charles Manning cdhmann...@gmail.com
 + *
 + * SPDX-License-Identifier:  GPL-2.0+
 + *
 + * Note that the CRC is **not** the zlib/Adler crc32 in crc32.c.
 + * It is the CRC-32 used in bzip2, ethernet and elsewhere.
 + */
 +
 +#include crc32_alt.h
 +#include stdint.h
 +
 +static uint32_t crc_table[256] = {
 + 0x, 0x04c11db7, 0x09823b6e, 0x0d4326d9,
 + 0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005,
 + 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
 + 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd,
 + 0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9,
 + 0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75,
 + 0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011,
 

Re: [U-Boot] [PATCH v5] socfpga: Add socfpga preloader signing to mkimage

2014-02-25 Thread Charles Manning
On Wednesday 26 February 2014 19:16:37 Michal Simek wrote:
 On 02/26/2014 02:17 AM, Charles Manning wrote:
  Like many platforms, the Altera socfpga platform requires that the
  preloader be signed in a certain way or the built-in boot ROM will
  not boot the code.
 
  This change automatically creates an appropriately signed preloader
  from an SPL image.
 
  The signed image includes a CRC which must, of course, be generated
  with a CRC generator that the SoCFPGA boot ROM agrees with otherwise
  the boot ROM will reject the image.
 
  Unfortunately the CRC used in this boot ROM is not the same as the
  Adler CRC in lib/crc32.c. Indeed the Adler code is not technically a
  CRC but is more correctly described as a checksum.
 
  Thus, the appropriate CRC generator is added to lib/ as crc32_alt.c.
 
  Signed-off-by: Charles Manning cdhmann...@gmail.com
  ---
 
  Changes for v3:
   - Fix some coding style issues.
   - Move from a standalone tool to the mkimgae framework.
 
  Changes for v4:
   - Fix more coding style issues.
   - Fix typos in Makefile.
   - Rebase on master (previous version was not on master, but on a
 working socfpga branch).
 
  Changes for v5:
   - Fix more coding style issues.
   - Add some more comments.
   - Remove some unused defines.
   - Move the local CRC32 code into lib/crc32_alt.c.
 
  Note: Building a SOCFPGA preloader will currently not produe a working
  image if built in master, but that is due to issues in building SPL,
  not in this signer.
 
 
   common/image.c   |1 +
   include/crc32_alt.h  |   17 
   include/image.h  |1 +
   lib/Makefile |1 +
   lib/crc32_alt.c  |   94 +
   spl/Makefile |5 +
   tools/Makefile   |2 +
   tools/crc32_alt.c|1 +
   tools/imagetool.c|2 +
   tools/imagetool.h|1 +
   tools/socfpgaimage.c |  276
  ++ 11 files changed, 401
  insertions(+)
   create mode 100644 include/crc32_alt.h
   create mode 100644 lib/crc32_alt.c
   create mode 100644 tools/crc32_alt.c
   create mode 100644 tools/socfpgaimage.c
 
  diff --git a/common/image.c b/common/image.c
  index 9c6bec5..e7dc8cc 100644
  --- a/common/image.c
  +++ b/common/image.c
  @@ -135,6 +135,7 @@ static const table_entry_t uimage_type[] = {
  {   IH_TYPE_PBLIMAGE,   pblimage,   Freescale PBL Boot Image,},
  {   IH_TYPE_RAMDISK,ramdisk,RAMDisk Image,  },
  {   IH_TYPE_SCRIPT, script, Script, },
  +   {   IH_TYPE_SOCFPGAIMAGE,  socfpgaimage,  Altera SOCFPGA 
  preloader,},
  {   IH_TYPE_STANDALONE, standalone, Standalone Program, },
  {   IH_TYPE_UBLIMAGE,   ublimage,   Davinci UBL image,},
  {   IH_TYPE_MXSIMAGE,   mxsimage,   Freescale MXS Boot Image,},
  diff --git a/include/crc32_alt.h b/include/crc32_alt.h
  new file mode 100644
  index 000..813d55d
  --- /dev/null
  +++ b/include/crc32_alt.h
  @@ -0,0 +1,17 @@
  +/*
  + * Copyright (C) 2014 Charles Manning cdhmann...@gmail.com
  + *
  + * SPDX-License-Identifier:GPL-2.0+
  + *
  + * Note that the CRC is **not** the zlib/Adler crc32 in crc32.c.
  + * It is the CRC-32 used in bzip2, ethernet and elsewhere.
  + */
  +
  +#ifndef __CRC32_ALT_H__
  +#define __CRC32_ALT_H__
  +
  +#include stdint.h
  +
  +uint32_t crc32_alt(uint32_t crc, const void *_buf, int length);
  +
  +#endif
  diff --git a/include/image.h b/include/image.h
  index 6afd57b..bde31d9 100644
  --- a/include/image.h
  +++ b/include/image.h
  @@ -215,6 +215,7 @@ struct lmb;
   #define IH_TYPE_KERNEL_NOLOAD  14  /* OS Kernel Image, can run 
  from any
  load address */ #define IH_TYPE_PBLIMAGE15  /* Freescale PBL Boot
  Image   */
   #define IH_TYPE_MXSIMAGE   16  /* Freescale MXSBoot Image  */
  +#define IH_TYPE_SOCFPGAIMAGE   17  /* Altera SOCFPGA Preloader 
  */
 
   /*
* Compression Types
  diff --git a/lib/Makefile b/lib/Makefile
  index 8c483c9..7ee07a5 100644
  --- a/lib/Makefile
  +++ b/lib/Makefile
  @@ -52,6 +52,7 @@ obj-y += errno.o
   obj-y += display_options.o
   obj-$(CONFIG_BCH) += bch.o
   obj-y += crc32.o
  +obj-y += crc32_alt.o
   obj-y += ctype.o
   obj-y += div64.o
   obj-y += hang.o
  diff --git a/lib/crc32_alt.c b/lib/crc32_alt.c
  new file mode 100644
  index 000..e0db335
  --- /dev/null
  +++ b/lib/crc32_alt.c
  @@ -0,0 +1,94 @@
  +/*
  + * Copyright (C) 2014 Charles Manning cdhmann...@gmail.com
  + *
  + * SPDX-License-Identifier:GPL-2.0+
  + *
  + * Note that the CRC is **not** the zlib/Adler crc32 in crc32.c.
  + * It is the CRC-32 used in bzip2, ethernet and elsewhere.
  + */
  +
  +#include crc32_alt.h
  +#include stdint.h
  +
  +static uint32_t crc_table[256] = {
  +   0x, 0x04c11db7, 0x09823b6e, 0x0d4326d9,
  +   0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005,
  +   0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
  +   0x350c9b64, 0x31cd86d3, 

[U-Boot] Question about Zynq SPL

2014-02-25 Thread Masahiro Yamada
Hello Michal,

Please let me confirm if I am correctly understanding
Zynq SPL added by commit d7e269c.


Before that commit, Zynq booted like follows
   [1] Boot ROM
   [2] First Stage Boot Loader (created by Xilinx SDK)
   [3] U-Boot

Now, SPL replaces FSBL. So, now Zynq boots like follows
   [1] Boot ROM
   [2] U-Boot SPL
   [3]  U-Boot


Is this correct?


Best Regards
Masahiro Yamada

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


Re: [U-Boot] [U-Boot, 2/3] mpc85xx: Add deep sleep framework support

2014-02-25 Thread Tang Yuantian-B29983


On 2014/2/25 星期二 3:11, Scott Wood wrote:

On Mon, 2014-02-24 at 15:47 +0800, Tang Yuantian-B29983 wrote:

On 2014/2/15 星期六 6:21, Scott Wood wrote:

On Thu, 2014-02-13 at 01:05 -0600, Tang Yuantian-B29983 wrote:

Thanks for your review. Please see the reply inline.

Thanks,
Yuantian


-Original Message-
From: Wood Scott-B07421
Sent: 2014年2月13日 星期四 8:44
To: Tang Yuantian-B29983
Cc: Sun York-R58495; Wood Scott-B07421; Li Yang-Leo-R58472;
t...@theia.denx.de; u-boot@lists.denx.de; Kushwaha Prabhakar-B32579; Jin
Zhengxiong-R64188
Subject: Re: [U-Boot,2/3] mpc85xx: Add deep sleep framework support

On Sun, Jan 26, 2014 at 02:00:40PM +0800, tang yuantian wrote:

From: Tang Yuantian yuantian.t...@freescale.com

When system wakes up from warm reset, control is passed to the primary
core that starts executing uboot. After re-initialized some IP blocks,
like DDRC, kernel will take responsibility to continue to restore
environment it leaves before.

Signed-off-by: Tang Yuantian yuantian.t...@freescale.com

Is this for some specific mpc85xx chip (e.g. T1040)?  I'm pretty sure
this isn't necessary for deep sleep on mpc8536, for example.


Currently, it is used by t1040. But we want it to be more general so that
It can be used by later new chips.

But the mechanism is not the same for all mpc85xx derivatives.  You'll
need a more specific name.

OK, will name it as t104x


+#ifdef CONFIG_DEEP_SLEEP

CONFIG symbols need to be documented in README...


Where should I add this README?

Under 85xx CPU Options in the top-level README.

Thanks.


+   /* disable the console if boot from warm reset */
+   if (in_be32(gur-scrtsr[0])  (1  3))
+   gd-flags |=
+   GD_FLG_SILENT | GD_FLG_WARM_BOOT |

GD_FLG_DISABLE_CONSOLE; #endif

...and it should probably be a more specific CONFIG_SYS symbol that
indicates the presence of this guts bit.

where should I put this CONFIG_SYS_'s definition?

Under 85xx CPU Options in the top-level README. :-)

I don't find other gut bit that defined in this README. Do I need to?
Just we are clear that you want me to add a CONFIG_SYS_'s definition for 
(1  3) bit in GUTS, right?



diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c
b/arch/powerpc/cpu/mpc85xx/fdt.c index 33bc900..b3b9250 100644
--- a/arch/powerpc/cpu/mpc85xx/fdt.c
+++ b/arch/powerpc/cpu/mpc85xx/fdt.c
@@ -24,6 +24,9 @@ DECLARE_GLOBAL_DATA_PTR;  extern void
ft_qe_setup(void *blob);  extern void ft_fixup_num_cores(void *blob);
extern void ft_srio_setup(void *blob);
+#ifdef CONFIG_DEEP_SLEEP
+extern ulong __bss_end;
+#endif

Don't ifdef declarations.


   #ifdef CONFIG_MP
   #include mp.h
@@ -35,6 +38,9 @@ void ft_fixup_cpu(void *blob, u64 memory_limit)
u32 bootpg = determine_mp_bootpg(NULL);
u32 id = get_my_id();
const char *enable_method;
+#ifdef CONFIG_DEEP_SLEEP
+   ulong len;
+#endif

off = fdt_node_offset_by_prop_value(blob, -1, device_type, cpu,

4);

while (off != -FDT_ERR_NOTFOUND) {
@@ -77,6 +83,25 @@ void ft_fixup_cpu(void *blob, u64 memory_limit)
device_type, cpu, 4);
}

+#ifdef CONFIG_DEEP_SLEEP
+   /*
+* reserve the memory space for warm reset.
+* This space will be re-used next time when boot from deep sleep.
+* The space includes bd_t, gd_t, stack and uboot image.
+* Reserve 1K for stack.
+*/
+   len = sizeof(bd_t) + sizeof(gd_t) + (1  10);
+   /* round up to 4K */
+   len = (len + (4096 - 1))  ~(4096 - 1);
+
+   off = fdt_add_mem_rsv(blob, gd-relocaddr - len,
+   len + ((ulong)__bss_end - gd-relocaddr));
+   if (off  0)
+   printf(Failed to reserve memory for warm reset: %s\n,
+   fdt_strerror(off));
+
+#endif

Why do you need to reserve memory for this?  We didn't need to for deep
sleep on MPC8313ERDB, which also goes through U-Boot on wake.  On
MPC8313ERDB we transfer control to the kernel before relocating, so U-
Boot never touches DDR.  bd_t, gd_t, and the stack should be in locked
L1 cache, and the u-boot image should be in flash (or locked CPC if this
is not a NOR flash boot).


In deep sleep many IP blocks are powered off like DDRC, LIODN, cpu. These IPs
are re-initialized after relocating.
So, we must jump to kernel after relocating.

The DDR controller is initialized before relocating -- and of course the
CPU is powered off on MPC8313ERDB deep sleep as well.

LIODNs are a new concern for deep sleep, but that doesn't mean we should
go through a bunch of unrelated code to get there.  Refactor the LIODN
code to be usable before relocation, and not be tied to fdt fixups.

There are other IP blocks that need to be re-initialized, like SerDes,
SMP, PCIe and
a lot of Errata. I don't want to refactor one by one.
Besides, coding in this way will not change the current execute flow.

Changing the execution flow is better than adding a bunch of special
cases to the current execution flow.