Re: [PATCH v2 20/23] phytec: Drop pcm051

2020-05-27 Thread Lars Poeschel
On Wed, May 27, 2020 at 06:26:34PM +0530, Jagan Teki wrote:
> OF_CONTROL, DM_SPI and other driver model migration deadlines
> are expired for this board.
> 
> Drop it.

Acked-by: Lars Poeschel 

> 
> Cc: Lars Poeschel 
> Signed-off-by: Jagan Teki 
> ---
> Changes for v2:
> - new patch
> 
>  arch/arm/Kconfig   |   1 -
>  arch/arm/mach-omap2/am33xx/Kconfig |   7 -
>  board/phytec/pcm051/Kconfig|  15 --
>  board/phytec/pcm051/MAINTAINERS|   7 -
>  board/phytec/pcm051/Makefile   |  11 --
>  board/phytec/pcm051/board.c| 258 -
>  board/phytec/pcm051/board.h|  24 ---
>  board/phytec/pcm051/mux.c  | 127 --
>  configs/pcm051_rev1_defconfig  |  60 ---
>  configs/pcm051_rev3_defconfig  |  60 ---
>  include/configs/pcm051.h   | 128 --
>  11 files changed, 698 deletions(-)
>  delete mode 100644 board/phytec/pcm051/Kconfig
>  delete mode 100644 board/phytec/pcm051/MAINTAINERS
>  delete mode 100644 board/phytec/pcm051/Makefile
>  delete mode 100644 board/phytec/pcm051/board.c
>  delete mode 100644 board/phytec/pcm051/board.h
>  delete mode 100644 board/phytec/pcm051/mux.c
>  delete mode 100644 configs/pcm051_rev1_defconfig
>  delete mode 100644 configs/pcm051_rev3_defconfig
>  delete mode 100644 include/configs/pcm051.h
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 9d3f00120f..7f328e6afe 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1904,7 +1904,6 @@ source "board/hisilicon/hikey/Kconfig"
>  source "board/hisilicon/hikey960/Kconfig"
>  source "board/hisilicon/poplar/Kconfig"
>  source "board/isee/igep003x/Kconfig"
> -source "board/phytec/pcm051/Kconfig"
>  source "board/silica/pengwyn/Kconfig"
>  source "board/spear/spear300/Kconfig"
>  source "board/spear/spear310/Kconfig"
> diff --git a/arch/arm/mach-omap2/am33xx/Kconfig 
> b/arch/arm/mach-omap2/am33xx/Kconfig
> index bb8959e7a7..60e5ec5684 100644
> --- a/arch/arm/mach-omap2/am33xx/Kconfig
> +++ b/arch/arm/mach-omap2/am33xx/Kconfig
> @@ -146,13 +146,6 @@ config TARGET_ETAMIN
>   select DM_SERIAL
>   imply CMD_DM
>  
> -config TARGET_PCM051
> - bool "Support pcm051"
> - select DM
> - select DM_GPIO
> - select DM_SERIAL
> - imply CMD_DM
> -
>  config TARGET_PENGWYN
>   bool "Support pengwyn"
>   select DM
> diff --git a/board/phytec/pcm051/Kconfig b/board/phytec/pcm051/Kconfig
> deleted file mode 100644
> index 2cc0d8872d..00
> --- a/board/phytec/pcm051/Kconfig
> +++ /dev/null
> @@ -1,15 +0,0 @@
> -if TARGET_PCM051
> -
> -config SYS_BOARD
> - default "pcm051"
> -
> -config SYS_VENDOR
> - default "phytec"
> -
> -config SYS_SOC
> - default "am33xx"
> -
> -config SYS_CONFIG_NAME
> - default "pcm051"
> -
> -endif
> diff --git a/board/phytec/pcm051/MAINTAINERS b/board/phytec/pcm051/MAINTAINERS
> deleted file mode 100644
> index 18ea636a83..00
> --- a/board/phytec/pcm051/MAINTAINERS
> +++ /dev/null
> @@ -1,7 +0,0 @@
> -PCM051 BOARD
> -M:   Lars Poeschel 
> -S:   Maintained
> -F:   board/phytec/pcm051/
> -F:   include/configs/pcm051.h
> -F:   configs/pcm051_rev1_defconfig
> -F:   configs/pcm051_rev3_defconfig
> diff --git a/board/phytec/pcm051/Makefile b/board/phytec/pcm051/Makefile
> deleted file mode 100644
> index ff6f8b4221..00
> --- a/board/phytec/pcm051/Makefile
> +++ /dev/null
> @@ -1,11 +0,0 @@
> -# SPDX-License-Identifier: GPL-2.0+
> -#
> -# Makefile
> -#
> -# Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
> -
> -ifdef CONFIG_SPL_BUILD
> -obj-y+= mux.o
> -endif
> -
> -obj-y+= board.o
> diff --git a/board/phytec/pcm051/board.c b/board/phytec/pcm051/board.c
> deleted file mode 100644
> index 6f1ada82c4..00
> --- a/board/phytec/pcm051/board.c
> +++ /dev/null
> @@ -1,258 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0+
> -/*
> - * board.c
> - *
> - * Board functions for Phytec phyCORE-AM335x (pcm051) based boards
> - *
> - * Copyright (C) 2013 Lemonage Software GmbH
> - * Author Lars Poeschel 
> - */
> -
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include "board.h"
>

[U-Boot] [PATCH] Remove unused symbol CONGIG_CMD_STORAGE from board configs

2017-02-06 Thread Lars Poeschel
Albeit it's a typo, neither CONGIG_CMD_STORAGE nor CONFIG_CMD_STORAGE
are used anywhere, so remove the define from the board configs.

Signed-off-by: Lars Poeschel <poesc...@lemonage.de>
---
 include/configs/am3517_crane.h | 2 --
 include/configs/am3517_evm.h   | 2 --
 include/configs/omap3_evm.h| 2 --
 include/configs/tao3530.h  | 1 -
 4 files changed, 7 deletions(-)

diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h
index 5d568604a6..f1b82df456 100644
--- a/include/configs/am3517_crane.h
+++ b/include/configs/am3517_crane.h
@@ -88,8 +88,6 @@
 
 #ifdef CONFIG_USB_MUSB_HCD
 
-#define CONGIG_CMD_STORAGE
-
 #ifdef CONFIG_USB_KEYBOARD
 #define CONFIG_SYS_USB_EVENT_POLL
 #define CONFIG_PREBOOT "usb start"
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index 13de819245..1062e20f6d 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -88,8 +88,6 @@
 
 #ifdef CONFIG_USB_MUSB_HOST
 
-#define CONGIG_CMD_STORAGE
-
 #ifdef CONFIG_USB_KEYBOARD
 #define CONFIG_SYS_USB_EVENT_POLL
 #define CONFIG_PREBOOT "usb start"
diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h
index 8846aa6607..8ed5602bc9 100644
--- a/include/configs/omap3_evm.h
+++ b/include/configs/omap3_evm.h
@@ -217,8 +217,6 @@
 
 #ifdef CONFIG_USB_MUSB_HCD
 
-#define CONGIG_CMD_STORAGE
-
 #ifdef CONFIG_USB_KEYBOARD
 #define CONFIG_SYS_USB_EVENT_POLL
 #define CONFIG_PREBOOT "usb start"
diff --git a/include/configs/tao3530.h b/include/configs/tao3530.h
index dafb05fa07..32a4b27870 100644
--- a/include/configs/tao3530.h
+++ b/include/configs/tao3530.h
@@ -263,7 +263,6 @@
 
 #define CONFIG_USB_ETHER
 #define CONFIG_USB_ETHER_RNDIS
-#define CONGIG_CMD_STORAGE
 
 /* Defines for SPL */
 #define CONFIG_SPL_FRAMEWORK
-- 
2.11.0

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


[U-Boot] [PATCH] AM3517 CraneBoard: Fix typo on CONFIG_CMD_STORAGE

2017-02-03 Thread Lars Poeschel
This trivial patch fixes a typo in the board config of the AM3517
CraneBoard: CONGIG_CMD_STORAGE -> CONFIG_CMD_STORAGE

Signed-off-by: Lars Poeschel <poesc...@lemonage.de>
---
 include/configs/am3517_crane.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h
index 5d568604a6..31a28aa7bf 100644
--- a/include/configs/am3517_crane.h
+++ b/include/configs/am3517_crane.h
@@ -88,7 +88,7 @@
 
 #ifdef CONFIG_USB_MUSB_HCD
 
-#define CONGIG_CMD_STORAGE
+#define CONFIG_CMD_STORAGE
 
 #ifdef CONFIG_USB_KEYBOARD
 #define CONFIG_SYS_USB_EVENT_POLL
-- 
2.11.0

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


Re: [U-Boot] AM335x SPI boot not working

2016-01-18 Thread Lars Poeschel
Am Donnerstag, 14. Januar 2016, 16:01:00 schrieben Sie:
> On Wed, Dec 16, 2015 at 03:34:24PM +0100, Lars Poeschel wrote:
> > Hi!
> > 
> > I played a bit with spi boot on my am3359. It is currently not working
> > with u- boot at least with the machine I work here. Has anyone else
> > problems with spi boot on am335x ?
> > 
> > On boot SPL reads a value from a processor register to determine from
> > which
> > device it was booting and it uses that value to continue booting process
> > from that same device.
> > I found, that in my case the processor register contained a 0x0b and SPL
> > could not match that to a hardware device. BOOT_DEVICE_SPI is defined as
> > 0x15 in arch/arm/include/asm/arch-am33xx/spl.h. SPL does not find a
> > mathch for 0x0b, decides this is an unknown value and stalls. So far so
> > good.
> > 
> > I looked up in the technical reference manual if the value 0x15 is
> > correct. I had TRM rev. F on my harddrive and found the value in
> > 26.1.10.2, on page 4295 and it is indeed 0x15 as in u-boot.
> > I looked on TI website for a new version of the TRM and they currently
> > have
> > rev. L. There I found in 26.1.10.2 on page 4960 that SPI boot has 0x0b!
> > 
> > My question is now how to best cope with this issue and if anybody has
> > more
> > information on what happend.
> > I don't know if they only made a mistake in the TRM and fixed that or if
> > they have new silicone revisions that really have another boot device
> > value for spi boot.
> > What can we do ?
> 
> Sorry for the late reply.  It sounds like at some point post PG2.1 TI
> changed at least the value used for SPI boot.  I have in the past
> validated SPI boot on my AM335x GP EVM with PG2.1 silicon.  SPI boot on
> this hardware is not supported officially due to I believe hardware
> design issues.  Did you make any further progress here?  Did making the
> value U-Boot checks by 0x0b make things suddenly work?  Thanks!

I am not sure what you mean by "PG 2.1". Is that TI silicone revision ? 
According to the Sitara AM335x silicon errata the lasted revision they have 
out now is revision 2.1 which is the one I have tested on. So they must have 
changed the SPI boot value BEFORE revision 2.1.
Yeah, the thing I did was just to change the SPI boot value in the u-boot 
source and then SPI boot worked fine frome that on.
I would propose to let u-boot simply accept both values. They do not interfere 
with some other boot value. That should work for all revisions. What do you 
think ?

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


[U-Boot] AM335x SPI boot not working

2015-12-16 Thread Lars Poeschel
Hi!

I played a bit with spi boot on my am3359. It is currently not working with u-
boot at least with the machine I work here. Has anyone else problems with spi 
boot on am335x ?

On boot SPL reads a value from a processor register to determine from which 
device it was booting and it uses that value to continue booting process from 
that same device.
I found, that in my case the processor register contained a 0x0b and SPL could 
not match that to a hardware device. BOOT_DEVICE_SPI is defined as 0x15 in 
arch/arm/include/asm/arch-am33xx/spl.h. SPL does not find a mathch for 0x0b, 
decides this is an unknown value and stalls. So far so good.

I looked up in the technical reference manual if the value 0x15 is correct. I 
had TRM rev. F on my harddrive and found the value in 26.1.10.2, on page 4295 
and it is indeed 0x15 as in u-boot.
I looked on TI website for a new version of the TRM and they currently have 
rev. L. There I found in 26.1.10.2 on page 4960 that SPI boot has 0x0b!

My question is now how to best cope with this issue and if anybody has more 
information on what happend.
I don't know if they only made a mistake in the TRM and fixed that or if they 
have new silicone revisions that really have another boot device value for spi 
boot.
What can we do ?

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


Re: [U-Boot] [PATCH 1/5] Make RBTREE selectable by Kconfig

2015-12-16 Thread Lars Poeschel
Am Dienstag, 15. Dezember 2015, 16:54:45 schrieb Joe Hershberger:
> Hi Lars,
> 
> On Tue, Dec 15, 2015 at 8:44 AM, Lars Poeschel <poesc...@lemonage.de> wrote:
> > Am Dienstag, 18. August 2015, 14:32:13 schrieb Joe Hershberger:
> >> On Tue, Aug 18, 2015 at 2:27 PM, Tom Rini <tr...@konsulko.com> wrote:
> >> > On Tue, Aug 18, 2015 at 01:47:20PM -0500, Joe Hershberger wrote:
> >> >> Hi Lars,
> >> >> 
> >> >> On Tue, Aug 11, 2015 at 2:29 PM, Joe Hershberger
> >> >> 
> >> >> <joe.hershber...@gmail.com> wrote:
> >> >> > Hi Lars,
> >> >> > 
> >> >> > On Tue, Jul 28, 2015 at 11:01 AM, Joe Hershberger
> >> >> > 
> >> >> > <joe.hershber...@gmail.com> wrote:
> >> >> >> Hi Lars,
> >> >> >> 
> >> >> >> On Tue, Jul 28, 2015 at 3:25 AM, Lars Poeschel
> >> >> >> <poesc...@lemonage.de>
> > 
> > wrote:
> >> >> >>> Hi Joe,
> >> >> >>> 
> >> >> >>> On Wed, Jun 10, 2015 at 11:03:59AM -0500, Joe Hershberger wrote:
> >> >> >>>> >> I beat you to it:
> >> >> >>>> >> http://lists.denx.de/pipermail/u-boot/2015-May/214261.html>>
> >> >> >>>> >> >>>>
> >> >> >>>> > 
> >> >> >>>> > Well, ... ok. You won ;-) Your patchset is by far more
> >> >> >>>> > comprehensive than
> >> >> >>>> > mine.
> >> >> >>>> > If I see this right in the archives, you did not receive any
> >> >> >>>> > comments
> >> >> >>>> > since nearly a month.
> >> >> >>>> 
> >> >> >>>> That is true. I really would like a little feedback on it... or
> >> >> >>>> maybe
> >> >> >>>> I can just drop the controversial one and only include these
> >> >> >>>> things...
> >> >> >>>> they seem to be mostly straightforward.
> >> >> >>>> 
> >> >> >>>> > This was RFC will you resend this as a "real" PATCH ?
> >> >> >>>> 
> >> >> >>>> Yes.
> >> >> >>>> 
> >> >> >>>> > Could you then include two of the dependencies from my patches:
> >> >> >>>> > I think CMD_UBI has to depend on MTD_PARTITIONS and obivously
> >> >> >>>> > CMD_UBIFS
> >> >> 
> >> >> I noticed when adding MTD_PARTITIONS that MTD_DEVICE is not moved over
> >> >> yet. Do you know what the dependency relationship is there? If not
> >> >> I'll dig into it a bit.
> >> >> 
> >> >> >>>> > has to depend on CMD_UBI.
> >> >> >>>> 
> >> >> >>>> Will do.
> >> >> >>> 
> >> >> >>> I saw no action from you on this one. Can I help out - at least
> >> >> >>> for
> >> >> >>> the
> >> >> >>> decompression / ubi / ubifs part ?
> >> >> >> 
> >> >> >> Sorry about that... the end of last release got a little crazy.
> >> >> >> 
> >> >> >>> I think the setexpr / env location parts from your patchset can
> >> >> >>> then
> >> >> >>> go
> >> >> >>> in as seperate patches.
> >> >> >> 
> >> >> >> I agree. I'll split them apart and send these out.
> >> >> > 
> >> >> > I haven't forgotten about this... I plan to get this sent out this
> >> >> > week.
> >> >> 
> >> >> I had this ready to go, but conflicts with
> >> >> https://patchwork.ozlabs.org/patch/508134/, so I'm gonna have to
> >> >> regenerate the moves after that goes in.
> >> > 
> >> > Note that since it's part of the E1000 series I gave it to you in
> >> > patchwork :)
> >> 
> >> Sure, I expect to take it in once all feedback is addressed on that
> >> series.
> >> 
> >> :)
> > 
> > Joe,
> > a gentle ping on this.
> > I don't see RBTREE, MTD_PARTIONS and UBIFS in Kconfig yet.
> 
> Argh! I forgot that I had this sitting in a branch that still had a
> few targets not building cleanly. This moving configs stuff is a pain
> when so many boards use them and in odd / slightly different ways.
> 
> Now all the work has to be regenerated and reanalyzed for build
> failures. Maybe I'll just start with one dependency... get that in,
> then focus on the next, etc. There are so many boards that conflict
> readily if you have to spend any amount of time resolving issues.

I had another idea: Is it reasonable to put the parameters into Kconfig and 
only change the non-problematic board configs and leave the rest as they are ? 
That shouldn't harm ?
But I think you are right. It is propably the best if you do it step by step 
and bring one patch after the other in.

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


Re: [U-Boot] [PATCH 1/5] Make RBTREE selectable by Kconfig

2015-12-15 Thread Lars Poeschel
Am Dienstag, 18. August 2015, 14:32:13 schrieb Joe Hershberger:
> On Tue, Aug 18, 2015 at 2:27 PM, Tom Rini <tr...@konsulko.com> wrote:
> > On Tue, Aug 18, 2015 at 01:47:20PM -0500, Joe Hershberger wrote:
> >> Hi Lars,
> >> 
> >> On Tue, Aug 11, 2015 at 2:29 PM, Joe Hershberger
> >> 
> >> <joe.hershber...@gmail.com> wrote:
> >> > Hi Lars,
> >> > 
> >> > On Tue, Jul 28, 2015 at 11:01 AM, Joe Hershberger
> >> > 
> >> > <joe.hershber...@gmail.com> wrote:
> >> >> Hi Lars,
> >> >> 
> >> >> On Tue, Jul 28, 2015 at 3:25 AM, Lars Poeschel <poesc...@lemonage.de> 
wrote:
> >> >>> Hi Joe,
> >> >>> 
> >> >>> On Wed, Jun 10, 2015 at 11:03:59AM -0500, Joe Hershberger wrote:
> >> >>>> >> I beat you to it:
> >> >>>> >> http://lists.denx.de/pipermail/u-boot/2015-May/214261.html>> >>>> 
> 
> >> >>>> > Well, ... ok. You won ;-) Your patchset is by far more
> >> >>>> > comprehensive than
> >> >>>> > mine.
> >> >>>> > If I see this right in the archives, you did not receive any
> >> >>>> > comments
> >> >>>> > since nearly a month.
> >> >>>> 
> >> >>>> That is true. I really would like a little feedback on it... or
> >> >>>> maybe
> >> >>>> I can just drop the controversial one and only include these
> >> >>>> things...
> >> >>>> they seem to be mostly straightforward.
> >> >>>> 
> >> >>>> > This was RFC will you resend this as a "real" PATCH ?
> >> >>>> 
> >> >>>> Yes.
> >> >>>> 
> >> >>>> > Could you then include two of the dependencies from my patches:
> >> >>>> > I think CMD_UBI has to depend on MTD_PARTITIONS and obivously
> >> >>>> > CMD_UBIFS
> >> 
> >> I noticed when adding MTD_PARTITIONS that MTD_DEVICE is not moved over
> >> yet. Do you know what the dependency relationship is there? If not
> >> I'll dig into it a bit.
> >> 
> >> >>>> > has to depend on CMD_UBI.
> >> >>>> 
> >> >>>> Will do.
> >> >>> 
> >> >>> I saw no action from you on this one. Can I help out - at least for
> >> >>> the
> >> >>> decompression / ubi / ubifs part ?
> >> >> 
> >> >> Sorry about that... the end of last release got a little crazy.
> >> >> 
> >> >>> I think the setexpr / env location parts from your patchset can then
> >> >>> go
> >> >>> in as seperate patches.
> >> >> 
> >> >> I agree. I'll split them apart and send these out.
> >> > 
> >> > I haven't forgotten about this... I plan to get this sent out this
> >> > week.
> >> 
> >> I had this ready to go, but conflicts with
> >> https://patchwork.ozlabs.org/patch/508134/, so I'm gonna have to
> >> regenerate the moves after that goes in.
> > 
> > Note that since it's part of the E1000 series I gave it to you in
> > patchwork :)
> 
> Sure, I expect to take it in once all feedback is addressed on that series.
> :)

Joe,
a gentle ping on this.
I don't see RBTREE, MTD_PARTIONS and UBIFS in Kconfig yet.

Regards,
Lars

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


Re: [U-Boot] [PATCH 1/5] Make RBTREE selectable by Kconfig

2015-08-24 Thread Lars Poeschel
Am Dienstag, 18. August 2015, 13:47:20 schrieb Joe Hershberger:
 Hi Lars,
 
 On Tue, Aug 11, 2015 at 2:29 PM, Joe Hershberger
 
 joe.hershber...@gmail.com wrote:
  Hi Lars,
  
  On Tue, Jul 28, 2015 at 11:01 AM, Joe Hershberger
  
  joe.hershber...@gmail.com wrote:
  Hi Lars,
  
  On Tue, Jul 28, 2015 at 3:25 AM, Lars Poeschel poesc...@lemonage.de 
wrote:
  Hi Joe,
  
  On Wed, Jun 10, 2015 at 11:03:59AM -0500, Joe Hershberger wrote:
   I beat you to it:
   http://lists.denx.de/pipermail/u-boot/2015-May/214261.html  
   Well, ... ok. You won ;-) Your patchset is by far more comprehensive
   than
   mine.
   If I see this right in the archives, you did not receive any comments
   since nearly a month.
  
  That is true. I really would like a little feedback on it... or maybe
  I can just drop the controversial one and only include these things...
  they seem to be mostly straightforward.
  
   This was RFC will you resend this as a real PATCH ?
  
  Yes.
  
   Could you then include two of the dependencies from my patches:
   I think CMD_UBI has to depend on MTD_PARTITIONS and obivously
   CMD_UBIFS
 
 I noticed when adding MTD_PARTITIONS that MTD_DEVICE is not moved over
 yet. Do you know what the dependency relationship is there? If not
 I'll dig into it a bit.

Sorry, I am really not sure about this.
I think in my configuration MTD_PARTITIONS worked even without MTD_DEVICE. But 
maybe looking into drivers/mtd/Makefile:8 helps here. It seems that 
MTD_PARTITIONS needs either MTD_DEVICE, CMD_NAND, CMD_ONENAND or CMD_SF.

Lars

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


Re: [U-Boot] [PATCH 1/5] Make RBTREE selectable by Kconfig

2015-07-28 Thread Lars Poeschel
Hi Joe,

On Wed, Jun 10, 2015 at 11:03:59AM -0500, Joe Hershberger wrote:
  I beat you to it: 
  http://lists.denx.de/pipermail/u-boot/2015-May/214261.html
 
  Well, ... ok. You won ;-) Your patchset is by far more comprehensive than
  mine.
  If I see this right in the archives, you did not receive any comments
  since nearly a month.
 
 That is true. I really would like a little feedback on it... or maybe
 I can just drop the controversial one and only include these things...
 they seem to be mostly straightforward.
 
  This was RFC will you resend this as a real PATCH ?
 
 Yes.
 
  Could you then include two of the dependencies from my patches:
  I think CMD_UBI has to depend on MTD_PARTITIONS and obivously CMD_UBIFS
  has to depend on CMD_UBI.
 
 Will do.

I saw no action from you on this one. Can I help out - at least for the
decompression / ubi / ubifs part ?

I think the setexpr / env location parts from your patchset can then go
in as seperate patches.

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


[U-Boot] [PATCH 1/5] Make RBTREE selectable by Kconfig

2015-06-10 Thread Lars Poeschel
Users who want to use RBTREE can now select it by Kconfig.
Selecting it by board config include is still possible.

Signed-off-by: Lars Poeschel poesc...@lemonage.de
---
 lib/Kconfig | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/lib/Kconfig b/lib/Kconfig
index 3c8de86..fc2be56 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -47,6 +47,13 @@ config REGEX
 config LIB_RAND
bool
 
+config RBTREE
+   bool Red-black Trees (rbtree)
+   help
+ Red-black trees are a type of self-balancing binary search
+ tree, used for storing sortable key/value data pairs.
+ This is currently used in u-boot for ubi and ubifs.
+
 source lib/rsa/Kconfig
 
 menu Hashing Support
-- 
2.1.4

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


[U-Boot] [PATCH 5/5] Make ubifs selectable by Kconfig

2015-06-10 Thread Lars Poeschel
Users who want to use ubifs can now select it by Kconfig.
Selecting it by board config include is still possible.

Signed-off-by: Lars Poeschel poesc...@lemonage.de
---
 fs/ubifs/Kconfig | 8 
 1 file changed, 8 insertions(+)

diff --git a/fs/ubifs/Kconfig b/fs/ubifs/Kconfig
index e69de29..c5f9714 100644
--- a/fs/ubifs/Kconfig
+++ b/fs/ubifs/Kconfig
@@ -0,0 +1,8 @@
+config CMD_UBIFS
+   bool ubifs
+   depends on CMD_UBI
+   select LZO
+   help
+ UBIFS is a file system for flash devices which works on top of UBI.
+ Please, consult the MTD web site for more details
+ (www.linux-mtd.infradead.org)
-- 
2.1.4

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


[U-Boot] [PATCH 4/5] Make lzo decompression selectable by Kconfig

2015-06-10 Thread Lars Poeschel
Users who want to use lzo decompression can now select it by Kconfig.
Selecting it by board config include is still possible.

Signed-off-by: Lars Poeschel poesc...@lemonage.de
---
 lib/Kconfig | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/lib/Kconfig b/lib/Kconfig
index fc2be56..0fe4932 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -54,6 +54,12 @@ config RBTREE
  tree, used for storing sortable key/value data pairs.
  This is currently used in u-boot for ubi and ubifs.
 
+config LZO
+   bool lzo decompression support
+   help
+ This adds a library for lzo decrompression.
+ This is currently used in u-boot for ubifs.
+
 source lib/rsa/Kconfig
 
 menu Hashing Support
-- 
2.1.4

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


[U-Boot] [PATCH 2/5] Make MTD_PARTITIONS selectable by Kconfig

2015-06-10 Thread Lars Poeschel
Users who want to use MTD_PARTITIONS can now select it by Kconfig.
Selecting it by board config include is still possible.

Signed-off-by: Lars Poeschel poesc...@lemonage.de
---
 drivers/mtd/Kconfig | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index 59278d1..787b1cd 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -1,3 +1,12 @@
-source drivers/mtd/nand/Kconfig
+menu Memory Technology Device (MTD) support
+
+config MTD_PARTITIONS
+   bool mtd partitions support
+   help
+ Adds the MTD partitioning infrastructure from the Linux
+ kernel. Needed for UBI support.
 
+endmenu
+
+source drivers/mtd/nand/Kconfig
 source drivers/mtd/spi/Kconfig
-- 
2.1.4

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


[U-Boot] [PATCH 3/5] Make ubi selectable by Kconfig

2015-06-10 Thread Lars Poeschel
Users who want to use ubi can now select it by Kconfig.
Selecting it by board config include is still possible.

Signed-off-by: Lars Poeschel poesc...@lemonage.de
---
 common/Kconfig | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/common/Kconfig b/common/Kconfig
index f6478fa..bc2836a 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -310,6 +310,16 @@ config CMD_FPGA
help
  FPGA support.
 
+config CMD_UBI
+   bool ubi
+   select RBTREE
+   depends on MTD_PARTITIONS
+   help
+ UBI is a software layer above MTD layer which admits of LVM-like
+ logical volumes on top of MTD devices, hides some complexities of
+ flash chips like wear and bad blocks and provides some other useful
+ capabilities. Please, consult the MTD web site for more details
+ (www.linux-mtd.infradead.org).
 endmenu
 
 
-- 
2.1.4

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


Re: [U-Boot] [PATCH 1/5] Make RBTREE selectable by Kconfig

2015-06-10 Thread Lars Poeschel
On Wed, Jun 10, 2015 at 08:49:28AM -0500, Joe Hershberger wrote:
 Hi Lars,
 
 On Wed, Jun 10, 2015 at 3:40 AM, Lars Poeschel poesc...@lemonage.de wrote:
  Users who want to use RBTREE can now select it by Kconfig.
  Selecting it by board config include is still possible.
 
  Signed-off-by: Lars Poeschel poesc...@lemonage.de
  ---
 
 I beat you to it: http://lists.denx.de/pipermail/u-boot/2015-May/214261.html

Well, ... ok. You won ;-) Your patchset is by far more comprehensive than
mine.
If I see this right in the archives, you did not receive any comments
since nearly a month. This was RFC will you resend this as a real
PATCH ? Could you then include two of the dependencies from my patches:
I think CMD_UBI has to depend on MTD_PARTITIONS and obivously CMD_UBIFS
has to depend on CMD_UBI.

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


Re: [U-Boot] [PATCH] ARM: phytec: pcm051: select board revision by Kconfig

2015-06-04 Thread Lars Poeschel
On Wed, Jun 03, 2015 at 11:20:25AM -0400, Tom Rini wrote:
 On Wed, Jun 03, 2015 at 04:36:06PM +0200, Lars Poeschel wrote:
  On Tue, Jun 02, 2015 at 10:34:34AM -0400, Tom Rini wrote:
   On Mon, Jun 01, 2015 at 05:09:11PM +0200, poesc...@lemonage.de wrote:
   
From: Lars Poeschel poesc...@lemonage.de

This add a Kconfig entry that allows to set the board revision in
menuconfig. So the deprecated CONFIG_SYS_EXTRA_OPTIONS is no longer
needed for this boad.

Signed-off-by: Lars Poeschel poesc...@lemonage.de
   
   I like the concept but CONFIG_REVx is way too generic.  Can we maybe
   re-work things as CONFIG_TARGET_PCM051_REV1 / CONFIG_TARGET_PCM051_REV3
   (and those select CONFIG_TARGET_PCM051) ?  Masahiro?  Thanks!
  
  Agree: CONFIG_REVx is too generic. I will send a version 2 of the patch,
  but I don't understand why you want CONFIG_TARGET_PCM051_REV1 /
  CONFIG_TARGET_PCM051_REV3 to select CONFIG_TARGET_PCM051. The
  CONFIG_TARGET_PCM051_REVx's are inside an
  
  if TARGET_PCM051
  ...
  endif
  
  That means, that CONFIG_TARGET_PCM051 must already be selected to make
  the *_REVx's visible and selectable.
 
 Right.  I mean since we must select one of these boards at build-time,
 why not just ask about them up-front in arch/arm/Kconfig as rev1/rev3,

I wanted the initial list you choose your board from not to grow too
big. The (unsorted) list you scroll in menuconfig is already huge! I
like the aproach Atmel AT91 takes more, and I'd propably even go
one step further an select a manufacturer as a first step and then
in a second step select a specific board from this manufacturer.
But if you prefer the other way - no problem. I tried that:

 and then have the main symbol be a hidden one, ie roughly:
 
 config TARGET_PCM051
   bool
 
 config TARGET_PCM051_REV1
   bool Enable pcm051 rev1
   select TARGET_PCM051
   help
 ...
 
 config TARGET_PCM051_REV3
   bool Enable pcm051 rev3
   select TARGET_PCM051
   help
 ...

I could not get this approach to work. It seems Kconfig does not support
hidden config options. I took a slightly different approach. I'll send a
PATCH V2 in a second. Please have a look, if that is what what you mean.

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


Re: [U-Boot] [PATCH] ARM: phytec: pcm051: select board revision by Kconfig

2015-06-03 Thread Lars Poeschel
On Tue, Jun 02, 2015 at 10:34:34AM -0400, Tom Rini wrote:
 On Mon, Jun 01, 2015 at 05:09:11PM +0200, poesc...@lemonage.de wrote:
 
  From: Lars Poeschel poesc...@lemonage.de
  
  This add a Kconfig entry that allows to set the board revision in
  menuconfig. So the deprecated CONFIG_SYS_EXTRA_OPTIONS is no longer
  needed for this boad.
  
  Signed-off-by: Lars Poeschel poesc...@lemonage.de
 
 I like the concept but CONFIG_REVx is way too generic.  Can we maybe
 re-work things as CONFIG_TARGET_PCM051_REV1 / CONFIG_TARGET_PCM051_REV3
 (and those select CONFIG_TARGET_PCM051) ?  Masahiro?  Thanks!

Agree: CONFIG_REVx is too generic. I will send a version 2 of the patch,
but I don't understand why you want CONFIG_TARGET_PCM051_REV1 /
CONFIG_TARGET_PCM051_REV3 to select CONFIG_TARGET_PCM051. The
CONFIG_TARGET_PCM051_REVx's are inside an

if TARGET_PCM051
...
endif

That means, that CONFIG_TARGET_PCM051 must already be selected to make
the *_REVx's visible and selectable.

  ---
   board/phytec/pcm051/Kconfig   | 19 +++
   configs/pcm051_rev1_defconfig |  2 +-
   configs/pcm051_rev3_defconfig |  2 +-
   3 files changed, 21 insertions(+), 2 deletions(-)
  
  diff --git a/board/phytec/pcm051/Kconfig b/board/phytec/pcm051/Kconfig
  index 2cc0d88..c1071c6 100644
  --- a/board/phytec/pcm051/Kconfig
  +++ b/board/phytec/pcm051/Kconfig
  @@ -12,4 +12,23 @@ config SYS_SOC
   config SYS_CONFIG_NAME
  default pcm051
   
  +choice
  +prompt pcm051 revision select
  +default REV3
  +
  +config REV1
  +   bool pcm051 revision 1 or 2
  +   help
  + If you have 1358.1 written on the pcb of your pcm051, you
  + have a revision 1 board. Likewise if you have 1358.2 on your
  + board, it is a revision 2 board and this entry is for you.
  +
  +config REV3
  +   bool pcm051 revision 3
  +   help
  + If you have 1358.3 written on the pcb of your pcm051, you
  + have a revision 3 board and you have to select this entry.
  +
  +endchoice
  +
   endif
  diff --git a/configs/pcm051_rev1_defconfig b/configs/pcm051_rev1_defconfig
  index af02b2f..0a28195 100644
  --- a/configs/pcm051_rev1_defconfig
  +++ b/configs/pcm051_rev1_defconfig
  @@ -1,4 +1,4 @@
   CONFIG_ARM=y
   CONFIG_TARGET_PCM051=y
   CONFIG_SPL=y
  -CONFIG_SYS_EXTRA_OPTIONS=REV1
  +CONFIG_REV1=y
  diff --git a/configs/pcm051_rev3_defconfig b/configs/pcm051_rev3_defconfig
  index 2a907d7..4ad49df 100644
  --- a/configs/pcm051_rev3_defconfig
  +++ b/configs/pcm051_rev3_defconfig
  @@ -1,4 +1,4 @@
   CONFIG_ARM=y
   CONFIG_TARGET_PCM051=y
   CONFIG_SPL=y
  -CONFIG_SYS_EXTRA_OPTIONS=REV3
  +CONFIG_REV3=y
  -- 
  2.1.4
  
  ___
  U-Boot mailing list
  U-Boot@lists.denx.de
  http://lists.denx.de/mailman/listinfo/u-boot
 
 -- 
 Tom

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


Re: [U-Boot] [PATCH] ARM: phytec: pcm051: drop unused CONFIG_NET_MULTI

2015-06-02 Thread Lars Poeschel
On Mon, Jun 01, 2015 at 01:34:12PM -0500, Joe Hershberger wrote:
 Hi Lars,
 
 On Mon, Jun 1, 2015 at 9:59 AM,  poesc...@lemonage.de wrote:
  From: Lars Poeschel poesc...@lemonage.de
 
  Drop unused CONFIG_NET_MULTI.
  Also drop CONFIG_USE_IRQ, that is not used either.
 
  Signed-off-by: Lars Poeschel poesc...@lemonage.de
  ---
   include/configs/pcm051.h | 4 +---
   1 file changed, 1 insertion(+), 3 deletions(-)
 
  diff --git a/include/configs/pcm051.h b/include/configs/pcm051.h
  index c0bb227..eef3269 100644
  --- a/include/configs/pcm051.h
  +++ b/include/configs/pcm051.h
  @@ -163,10 +163,8 @@
   #define CONFIG_USB_ETH_RNDIS
   #endif /* CONFIG_MUSB_GADGET */
 
  -/* Unsupported features */
  -#undef CONFIG_USE_IRQ
 
 These are unrelated changes. They should be two separate patches.
 
 Also, you say this is unused, but you are editing an ARM board and it
 seems that the arch/arm/lib/ source does refer to this. Are you sure
 it is unused? If so, Please make a separate patch with more
 explanation instead of adding it into another patch as a me-too.

Well, I am quite shure this not needed anymore. This is an undef and
CONFIG_USE_IRQ is not defined in the include path before. I just tested
it and with or without the undef the same code is compiled.
But your are right: These changes are not related. I will make two
seperate patches.

  -#define CONFIG_NET_MULTI
 
 Since this is not used anywhere, can you remove it from all of the
 configs that still define it all in the same patch?

Yes, I will do that.

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


Re: [U-Boot] [PATCH] pcm051: Support for revision 3

2013-11-21 Thread Lars Poeschel
Am Dienstag, 19. November 2013, 15:08:27 schrieb Tom Rini:
 On Tue, Nov 19, 2013 at 11:22:18AM +0100, Lars Poeschel wrote:
  From: Lars Poeschel poesc...@lemonage.de
  
  Phytec sells revision or version 3 of pcm051. It is labeled 1358.3 on
  the board. The difference for u-boot is that is has other DDR3 RAM on it:
  1 x MT41K256M16HA125E instead of 2 x MT41J256M8HX15E on revisions 1 and
  2. Both configurations are 512 MiB.
  Configure your u-boot build with pcm051_rev3 for the new RAM and
  pcm051_rev1 for the old RAM configuration. Board revision 2 has to use
  pcm051_rev1 also.
  
  Signed-off-by: Lars Poeschel poesc...@lemonage.de
 
 Is there no run-time way to tell if we're on rev1/2/3?

Unfortunately I am not aware of a 100% bullet proof one.
One way would be to read the AM3359 silicon ID. I have two boards here: rev1 
and rev3. The phytec rev3 board has a newer silicon on it. I don't know about 
rev2's silicon ID. And I am not sure if the rev3 silicon change directly 
corresponds to the DDR RAM change and if all rev3 boards have the new silicon. 
What I know for sure is that the RAM change was with rev3.
Nevertheless phytec itself supplies a patched barebox as bootloader. And they 
have a compile time config option for different RAM configurations of the 
board. 
And they even seem to have more RAM configurations than the two I have seen 
yet.

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


[U-Boot] [PATCH] pcm051: Support for revision 3

2013-11-19 Thread Lars Poeschel
From: Lars Poeschel poesc...@lemonage.de

Phytec sells revision or version 3 of pcm051. It is labeled 1358.3 on
the board. The difference for u-boot is that is has other DDR3 RAM on it:
1 x MT41K256M16HA125E instead of 2 x MT41J256M8HX15E on revisions 1 and
2. Both configurations are 512 MiB.
Configure your u-boot build with pcm051_rev3 for the new RAM and
pcm051_rev1 for the old RAM configuration. Board revision 2 has to use
pcm051_rev1 also.

Signed-off-by: Lars Poeschel poesc...@lemonage.de
---
 board/phytec/pcm051/board.c | 53 -
 boards.cfg  |  3 ++-
 2 files changed, 49 insertions(+), 7 deletions(-)

diff --git a/board/phytec/pcm051/board.c b/board/phytec/pcm051/board.c
index e40b0bd..629bc52 100644
--- a/board/phytec/pcm051/board.c
+++ b/board/phytec/pcm051/board.c
@@ -49,6 +49,7 @@ const struct dpll_params *get_dpll_ddr_params(void)
return dpll_ddr;
 }
 
+#ifdef CONFIG_REV1
 static const struct ddr_data ddr3_data = {
.datardsratio0 = MT41J256M8HX15E_RD_DQS,
.datawdsratio0 = MT41J256M8HX15E_WR_DQS,
@@ -82,6 +83,52 @@ static struct emif_regs ddr3_emif_reg_data = {
PHY_EN_DYN_PWRDN,
 };
 
+void sdram_init(void)
+{
+   config_ddr(DDR_CLK_MHZ, MT41J256M8HX15E_IOCTRL_VALUE, ddr3_data,
+  ddr3_cmd_ctrl_data, ddr3_emif_reg_data, 0);
+}
+#else
+static const struct ddr_data ddr3_data = {
+   .datardsratio0 = MT41K256M16HA125E_RD_DQS,
+   .datawdsratio0 = MT41K256M16HA125E_WR_DQS,
+   .datafwsratio0 = MT41K256M16HA125E_PHY_FIFO_WE,
+   .datawrsratio0 = MT41K256M16HA125E_PHY_WR_DATA,
+   .datadldiff0 = PHY_DLL_LOCK_DIFF,
+};
+
+static const struct cmd_control ddr3_cmd_ctrl_data = {
+   .cmd0csratio = MT41K256M16HA125E_RATIO,
+   .cmd0dldiff = MT41K256M16HA125E_DLL_LOCK_DIFF,
+   .cmd0iclkout = MT41K256M16HA125E_INVERT_CLKOUT,
+
+   .cmd1csratio = MT41K256M16HA125E_RATIO,
+   .cmd1dldiff = MT41K256M16HA125E_DLL_LOCK_DIFF,
+   .cmd1iclkout = MT41K256M16HA125E_INVERT_CLKOUT,
+
+   .cmd2csratio = MT41K256M16HA125E_RATIO,
+   .cmd2dldiff = MT41K256M16HA125E_DLL_LOCK_DIFF,
+   .cmd2iclkout = MT41K256M16HA125E_INVERT_CLKOUT,
+};
+
+static struct emif_regs ddr3_emif_reg_data = {
+   .sdram_config = MT41K256M16HA125E_EMIF_SDCFG,
+   .ref_ctrl = MT41K256M16HA125E_EMIF_SDREF,
+   .sdram_tim1 = MT41K256M16HA125E_EMIF_TIM1,
+   .sdram_tim2 = MT41K256M16HA125E_EMIF_TIM2,
+   .sdram_tim3 = MT41K256M16HA125E_EMIF_TIM3,
+   .zq_config = MT41K256M16HA125E_ZQ_CFG,
+   .emif_ddr_phy_ctlr_1 = MT41K256M16HA125E_EMIF_READ_LATENCY |
+   PHY_EN_DYN_PWRDN,
+};
+
+void sdram_init(void)
+{
+   config_ddr(DDR_CLK_MHZ, MT41K256M16HA125E_IOCTRL_VALUE, ddr3_data,
+  ddr3_cmd_ctrl_data, ddr3_emif_reg_data, 0);
+}
+#endif
+
 void set_uart_mux_conf(void)
 {
enable_uart0_pin_mux();
@@ -95,12 +142,6 @@ void set_mux_conf_regs(void)
 
enable_board_pin_mux();
 }
-
-void sdram_init(void)
-{
-   config_ddr(DDR_CLK_MHZ, MT41J256M8HX15E_IOCTRL_VALUE, ddr3_data,
-   ddr3_cmd_ctrl_data, ddr3_emif_reg_data, 0);
-}
 #endif
 
 /*
diff --git a/boards.cfg b/boards.cfg
index 9fc77fb..c2e24d6 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -244,7 +244,8 @@ Active  arm armv7  -   armltd   
   vexpress
 Active  arm armv7  -   armltd  vexpress
vexpress_ca5x2   -  

   Matt Waddel matt.wad...@linaro.org
 Active  arm armv7  -   armltd  vexpress
vexpress_ca9x4   -  

   Matt Waddel matt.wad...@linaro.org
 Active  arm armv7  am33xx  iseeigep0033
igep0033 -  

   Enric Balletbo i Serra eballe...@iseebcn.com
-Active  arm armv7  am33xx  phytec  pcm051  
pcm051   pcm051 

   Lars Poeschel poesc...@lemonage.de
+Active  arm armv7  am33xx  phytec  pcm051  
pcm051_rev1  pcm051:REV1

   Lars Poeschel poesc...@lemonage.de
+Active  arm armv7  am33xx  phytec  pcm051  
pcm051_rev3

[U-Boot] Setting board revision and serial with device tree

2013-10-21 Thread Lars Poeschel
Hello!

I want to set the board serial number and revision for linux /proc/cpuinfo . 
On an arm board it seems arch/arm/lib/bootm.c function boot_prep_linux() is 
responsible. On a non fdt booting board I can enable CONFIG_REVISION_TAG and 
CONFIG_SERIAL_TAG in the board config and implement get_board_rev() and 
get_board_serial() in the board files. The information is then passed to the 
linux kernel using ATAGS structure. This does not work, if the board boots 
with device tree.
How can a similar thing be done with device tree booting arm board ? I don't 
find information about this. Can somebody please point me to some documentation 
or relevant locations in code, where this is done ?

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


[U-Boot] [PATCH v2 0/1] Fix ethernet regression on pcm051 and igep0033

2013-09-30 Thread Lars Poeschel
From: Lars Poeschel poesc...@lemonage.de

I compiled and tried v2013.10-rc2 on pcm051 and it fails booting over
tftp. I could bisect 2bf36ac638ab2db9f0295aa47064976eeebf80c1 as the
cause of the problem. It moves bd_ram_ofs from the cpsw driver to the
board files. Adding the bd_ram_ofs to the board file of pcm051 fixes
the problem.
A quick grep revealed, that igep0033 is also be affected. The
igep0033 maintainer confirmed it, so this patch does supply the old
bd_ram_ofs value in the board file also.
As the patch is simple and obivous and fixes a regression I'd like to
get this in before the v2013.10 release.

Thanks

Changes v2:

- supply the bd_ram_ofs for igep0033 board also

Lars Poeschel (1):
  pcm051/igep0033: Supply bd_ram_ofs for cpsw driver

 board/isee/igep0033/board.c | 1 +
 board/phytec/pcm051/board.c | 1 +
 2 files changed, 2 insertions(+)

-- 
1.8.4.rc3

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


[U-Boot] [PATCH v2 1/1] pcm051/igep0033: Supply bd_ram_ofs for cpsw driver

2013-09-30 Thread Lars Poeschel
From: Lars Poeschel poesc...@lemonage.de

Since 2bf36ac638ab2db9f0295aa47064976eeebf80c1 the BD ram address is
not hardcoded inside cpsw driver any more. Platforms have to supply
their bd_ram_ofs in the platform data to the driver. This commit does
this for pcm051 and igep0033 boards.

Tested-by: Enric Balletbo i Serra eballe...@iseebcn.com
Acked-by: Mugunthan V N mugunthan...@ti.com
Signed-off-by: Lars Poeschel poesc...@lemonage.de
---
 board/isee/igep0033/board.c | 1 +
 board/phytec/pcm051/board.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/board/isee/igep0033/board.c b/board/isee/igep0033/board.c
index 9e91f68..d2aa1f9 100644
--- a/board/isee/igep0033/board.c
+++ b/board/isee/igep0033/board.c
@@ -129,6 +129,7 @@ static struct cpsw_platform_data cpsw_data = {
.ale_entries= 1024,
.host_port_reg_ofs  = 0x108,
.hw_stats_reg_ofs   = 0x900,
+   .bd_ram_ofs = 0x2000,
.mac_control= (1  5),
.control= cpsw_control,
.host_port_num  = 0,
diff --git a/board/phytec/pcm051/board.c b/board/phytec/pcm051/board.c
index e40b0bd..dafb1eb 100644
--- a/board/phytec/pcm051/board.c
+++ b/board/phytec/pcm051/board.c
@@ -150,6 +150,7 @@ static struct cpsw_platform_data cpsw_data = {
.ale_entries= 1024,
.host_port_reg_ofs  = 0x108,
.hw_stats_reg_ofs   = 0x900,
+   .bd_ram_ofs = 0x2000,
.mac_control= (1  5),
.control= cpsw_control,
.host_port_num  = 0,
-- 
1.8.4.rc3

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


Re: [U-Boot] BOOTM_STATE_OS_CMDLINE: corrupt arm bootm?

2013-09-27 Thread Lars Poeschel
Am Freitag, 27. September 2013, 18:02:52 schrieb FengHua:
 hi albert,
 
   do_bootm_linux() of arm architecture mdoes not support
 BOOTM_STATE_OS_CMDLINE so bootm
 
 command failed with not supported subcommand warning.
   Please review it.

I also had this issue. It seems that Tom already took care of that.[1]
It should appear on master with the next push.

Regards,
Lars

[1] http://marc.info/?l=u-bootm=137996126028374w=2
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/1] pcm051: Supply a bd_ram_ofs for the cpsw driver

2013-09-25 Thread Lars Poeschel
From: Lars Poeschel poesc...@lemonage.de

Since 2bf36ac638ab2db9f0295aa47064976eeebf80c1 the BD ram address is
not hardcoded inside cpsw driver any more. Platforms have to supply
their bd_ram_ofs in the platform data to the driver. With this
commit pcm051 does this.

Signed-off-by: Lars Poeschel poesc...@lemonage.de
---
 board/phytec/pcm051/board.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/board/phytec/pcm051/board.c b/board/phytec/pcm051/board.c
index e40b0bd..dafb1eb 100644
--- a/board/phytec/pcm051/board.c
+++ b/board/phytec/pcm051/board.c
@@ -150,6 +150,7 @@ static struct cpsw_platform_data cpsw_data = {
.ale_entries= 1024,
.host_port_reg_ofs  = 0x108,
.hw_stats_reg_ofs   = 0x900,
+   .bd_ram_ofs = 0x2000,
.mac_control= (1  5),
.control= cpsw_control,
.host_port_num  = 0,
-- 
1.8.4.rc3

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


[U-Boot] [PATCH 0/1] Fix ethernet regression on pcm051

2013-09-25 Thread Lars Poeschel
From: Lars Poeschel poesc...@lemonage.de

I compiled and tried v2013.10-rc2 on pcm051 and it fails booting over
tftp. I could bisect 2bf36ac638ab2db9f0295aa47064976eeebf80c1 as the
cause of the problem. It moves bd_ram_ofs from the cpsw driver to the
board files. Adding the bd_ram_ofs to the board file of pcm051 fixes
the problem. That is what the patch does.
A quick grep reveals, that igep0033 MAY also be affected.
As the patch is simple and obivous and fixes a regression I'd like to
get this in before the v2013.10 release.

Thanks

Lars Poeschel (1):
  pcm051: Supply a bd_ram_ofs for the cpsw driver

 board/phytec/pcm051/board.c | 1 +
 1 file changed, 1 insertion(+)

-- 
1.8.4.rc3

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


Re: [U-Boot] [PATCH 01/10] am33xx: Move V_OSCK/V_SCLK to asm/arch-am33xx/clocks_am33xx.h

2013-08-05 Thread Lars Poeschel
Am Montag, 5. August 2013, 17:17:32 schrieb Tom Rini:
 On Sat, Aug 03, 2013 at 06:41:32AM +0200, Heiko Schocher wrote:
  Hello Tom,
  
  Am 02.08.2013 22:26, schrieb Tom Rini:
  This detail belongs in the arch header file, given how we are
  structured today at least.
  
  Signed-off-by: Tom Rinitr...@ti.com
  ---
  
arch/arm/include/asm/arch-am33xx/clocks_am33xx.h |4 
include/configs/igep0033.h   |4 
include/configs/pcm051.h |4 
include/configs/ti814x_evm.h |4 
4 files changed, 4 insertions(+), 12 deletions(-)
  
  diff --git a/arch/arm/include/asm/arch-am33xx/clocks_am33xx.h
  b/arch/arm/include/asm/arch-am33xx/clocks_am33xx.h index
  80e1899..3becb98 100644
  --- a/arch/arm/include/asm/arch-am33xx/clocks_am33xx.h
  +++ b/arch/arm/include/asm/arch-am33xx/clocks_am33xx.h
  @@ -11,6 +11,10 @@
  
#ifndef _CLOCKS_AM33XX_H_
#define _CLOCKS_AM33XX_H_
  
  +/* Clock Defines */
  +#define V_OSCK2400  /* Clock output from 
  T2 */
  +#define V_SCLK(V_OSCK)
  +
  
  Hmm.. look at the chunk for the pcm051 board ...
  
/* MAIN PLL Fdll = 550 MHz, by default */
#ifndef CONFIG_SYS_MPUCLK
#define CONFIG_SYS_MPUCLK550
  
  [...]
  
  diff --git a/include/configs/pcm051.h b/include/configs/pcm051.h
  index 9b16c47..7073501 100644
  --- a/include/configs/pcm051.h
  +++ b/include/configs/pcm051.h
  @@ -102,10 +102,6 @@
  
 fi; \
 
 fi; \
  
  -/* Clock Defines */
  -#define V_OSCK2500  /* Clock output from 
  T2 */
  -#define V_SCLK(V_OSCK)
  -
  
  ... this defines 2500 not 2400 for V_OSCK ...
 
 Oh hell, Lars, is that right and you guys have a different clock
 frequency than the reference platforms?

Sorry, but yes, thats right. pcm051 is delivered with 2500hz crystal. 
Main reason was to be able to boot from ethernet right from the ROM 
bootloader.

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


[U-Boot] [PATCH] pcm051: Enable DDR PHY dynamic power down bit

2013-04-03 Thread Lars Poeschel
From: Lars Poeschel poesc...@lemonage.de

This is done already for am335x in
59dcf970d11ebff5d9f4bbbde79fda584e9e7ad4 and also applies for pcm051.

It powers down the IO receiver when not performing read which helps
reducing the overall power consuption in low power states
(suspend/standby).

Signed-off-by: Lars Poeschel poesc...@lemonage.de
---
 board/phytec/pcm051/board.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/board/phytec/pcm051/board.c b/board/phytec/pcm051/board.c
index 1708ac2..43d7b6e 100644
--- a/board/phytec/pcm051/board.c
+++ b/board/phytec/pcm051/board.c
@@ -104,7 +104,8 @@ static struct emif_regs ddr3_emif_reg_data = {
.sdram_tim2 = MT41J256M8HX15E_EMIF_TIM2,
.sdram_tim3 = MT41J256M8HX15E_EMIF_TIM3,
.zq_config = MT41J256M8HX15E_ZQ_CFG,
-   .emif_ddr_phy_ctlr_1 = MT41J256M8HX15E_EMIF_READ_LATENCY,
+   .emif_ddr_phy_ctlr_1 = MT41J256M8HX15E_EMIF_READ_LATENCY |
+   PHY_EN_DYN_PWRDN,
 };
 #endif
 
-- 
1.7.10.4

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


Re: [U-Boot] [PATCH] am335x: Enable DDR PHY dynamic power down bit for DDR3 boards

2013-03-15 Thread Lars Poeschel
On Friday 15 March 2013 at 16:05:24, Tom Rini wrote:
 On Fri, Mar 15, 2013 at 12:41:16PM +0530, Vaibhav Hiremath wrote:
  Enable DDR PHY dynamic power down bit, which enables
  powering down the IO receiver when not performing read.
  
  This also helps in reducing overall power consumption in
  low power states (suspend/standby).
  
  Signed-off-by: Vaibhav Hiremath hvaib...@ti.com
  Signed-off-by: Satyanarayana, Sandhya sandhya.satyanaray...@ti.com
  Cc: Tom Rini tr...@ti.com
  ---
  
   arch/arm/include/asm/arch-am33xx/ddr_defs.h |1 +
   board/ti/am335x/board.c |6 --
   2 files changed, 5 insertions(+), 2 deletions(-)
  
  diff --git a/arch/arm/include/asm/arch-am33xx/ddr_defs.h
  b/arch/arm/include/asm/arch-am33xx/ddr_defs.h index ae43ef8..7ab3baf
  100644
  --- a/arch/arm/include/asm/arch-am33xx/ddr_defs.h
  +++ b/arch/arm/include/asm/arch-am33xx/ddr_defs.h
  @@ -28,6 +28,7 @@
  
   #define VTP_CTRL_START_EN  (0x1)
   #define PHY_DLL_LOCK_DIFF  0x0
   #define DDR_CKE_CTRL_NORMAL0x1
  
  +#define PHY_EN_DYN_PWRDN   (0x1  20)
  
   /* Micron MT47H128M16RT-25E */
   #define MT47H128M16RT25E_EMIF_READ_LATENCY 0x15
  
  diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
  index 48e6896..22d7b25 100644
  --- a/board/ti/am335x/board.c
  +++ b/board/ti/am335x/board.c
  @@ -251,7 +251,8 @@ static struct emif_regs ddr3_emif_reg_data = {
  
  .sdram_tim2 = MT41J128MJT125_EMIF_TIM2,
  .sdram_tim3 = MT41J128MJT125_EMIF_TIM3,
  .zq_config = MT41J128MJT125_ZQ_CFG,
  
  -   .emif_ddr_phy_ctlr_1 = MT41J128MJT125_EMIF_READ_LATENCY,
  +   .emif_ddr_phy_ctlr_1 = MT41J128MJT125_EMIF_READ_LATENCY |
  +   PHY_EN_DYN_PWRDN,
  
   };
   
   static struct emif_regs ddr3_evm_emif_reg_data = {
  
  @@ -261,7 +262,8 @@ static struct emif_regs ddr3_evm_emif_reg_data = {
  
  .sdram_tim2 = MT41J512M8RH125_EMIF_TIM2,
  .sdram_tim3 = MT41J512M8RH125_EMIF_TIM3,
  .zq_config = MT41J512M8RH125_ZQ_CFG,
  
  -   .emif_ddr_phy_ctlr_1 = MT41J512M8RH125_EMIF_READ_LATENCY,
  +   .emif_ddr_phy_ctlr_1 = MT41J512M8RH125_EMIF_READ_LATENCY |
  +   PHY_EN_DYN_PWRDN,
  
   };
   #endif
 
 Reviewed-by: Tom Rini tr...@ti.com
 
 Lars, I suspect pcm051 also could use a change like this.

Many thanks for the hint! Yes, I think this could also be of use for pcm051. 
I can care about it and make a patch for pcm051 after my two weeks holiday :)

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


Re: [U-Boot] [PATCH] am33xx: Drop gpio0_7_pin_mux from phytec pcm051

2013-02-05 Thread Lars Poeschel
On Monday 04 February 2013 at 18:23:02, Tom Rini wrote:
 This mux is not currently used and appears to be a carry-over from the
 am335x evm code.

This is absolutely right,so my

Acked-by: Lars Poeschel poesc...@lemonage.de

 Cc: Lars Poeschel poesc...@lemonage.de
 Signed-off-by: Tom Rini tr...@ti.com
 ---
  board/phytec/pcm051/mux.c |5 -
  1 file changed, 5 deletions(-)
 
 diff --git a/board/phytec/pcm051/mux.c b/board/phytec/pcm051/mux.c
 index 2cda331..4d3a1d5 100644
 --- a/board/phytec/pcm051/mux.c
 +++ b/board/phytec/pcm051/mux.c
 @@ -63,11 +63,6 @@ static struct module_pin_mux spi0_pin_mux[] = {
  };
  #endif
 
 -static struct module_pin_mux gpio0_7_pin_mux[] = {
 - {OFFSET(ecap0_in_pwm0_out), (MODE(7) | PULLUDEN)},  /* GPIO0_7 */
 - {-1},
 -};
 -
  static struct module_pin_mux rmii1_pin_mux[] = {
   {OFFSET(mii1_crs), MODE(1) | RXACTIVE}, /* RMII1_CRS */
   {OFFSET(mii1_rxerr), MODE(1) | RXACTIVE},   /* RMII1_RXERR */

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


[U-Boot] [PATCH] am33xx: pcm051: Remove wp pin mux for sd-card

2013-02-05 Thread Lars Poeschel
From: Lars Poeschel poesc...@lemonage.de

The pcm051 does not have the wp pin connected to the sd-card socket.
Therefore remove the pinmux for the pin. The was a carry-over from
the am335x evm code.

Signed-off-by: Lars Poeschel poesc...@lemonage.de
---
 board/phytec/pcm051/mux.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/board/phytec/pcm051/mux.c b/board/phytec/pcm051/mux.c
index 2cda331..74a873e 100644
--- a/board/phytec/pcm051/mux.c
+++ b/board/phytec/pcm051/mux.c
@@ -35,7 +35,6 @@ static struct module_pin_mux mmc0_pin_mux[] = {
{OFFSET(mmc0_dat0), (MODE(0) | RXACTIVE | PULLUP_EN)},  /* MMC0_DAT0 */
{OFFSET(mmc0_clk), (MODE(0) | RXACTIVE | PULLUP_EN)},   /* MMC0_CLK */
{OFFSET(mmc0_cmd), (MODE(0) | RXACTIVE | PULLUP_EN)},   /* MMC0_CMD */
-   {OFFSET(mcasp0_aclkr), (MODE(4) | RXACTIVE)},   /* MMC0_WP */
{OFFSET(spi0_cs1), (MODE(5) | RXACTIVE | PULLUP_EN)},   /* MMC0_CD */
{-1},
 };
-- 
1.7.10.4

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


[U-Boot] [PATCH v2 1/3] am33xx: add a pulldown macro to pinmux config

2013-01-11 Thread Lars Poeschel
From: Lars Poeschel poesc...@lemonage.de

Signed-off-by: Lars Poeschel poesc...@lemonage.de
---
 arch/arm/include/asm/arch-am33xx/mux.h |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/include/asm/arch-am33xx/mux.h 
b/arch/arm/include/asm/arch-am33xx/mux.h
index aed6b00..460ac1c 100644
--- a/arch/arm/include/asm/arch-am33xx/mux.h
+++ b/arch/arm/include/asm/arch-am33xx/mux.h
@@ -25,7 +25,8 @@
 /* PAD Control Fields */
 #define SLEWCTRL   (0x1  6)
 #define RXACTIVE   (0x1  5)
-#define PULLUP_EN  (0x1  4) /* Pull UP Selection */
+#define PULLDOWN_EN(0x0  4) /* Pull Down Selection */
+#define PULLUP_EN  (0x1  4) /* Pull Up Selection */
 #define PULLUDEN   (0x0  3) /* Pull up enabled */
 #define PULLUDDIS  (0x1  3) /* Pull up disabled */
 #define MODE(val)  val /* used for Readability */
-- 
1.7.10.4

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


[U-Boot] [PATCH v2 2/3] pcm051: Add support for Phytec phyCORE-AM335x

2013-01-11 Thread Lars Poeschel
From: Lars Poeschel poesc...@lemonage.de

The board is named pcm051 and has this hardware:
SOC: TI AM3359
DDR3-RAM: 2x MT41J256M8HX-15EIT:D 512MiB
ETH 1: LAN8710AI
SPI-Flash: W25Q64BVSSIG
RTC: RV-4162-C7
I2C-EEPROM: CAT32WC32
NAND: MT29F4G08_VFPGA63
PMIC: TPS65910A3
LCD

Supported:
UART 1
MMC/SD
ETH 1
USB
I2C
SPI

Not yet supported:
NAND
RTC
LCD

Signed-off-by: Lars Poeschel poesc...@lemonage.de
---
 MAINTAINERS |3 +
 arch/arm/include/asm/arch-am33xx/ddr_defs.h |   18 ++
 board/phytec/pcm051/Makefile|   46 
 board/phytec/pcm051/board.c |  266 
 board/phytec/pcm051/board.h |   33 +++
 board/phytec/pcm051/mux.c   |  133 
 boards.cfg  |1 +
 include/configs/pcm051.h|  300 +++
 8 files changed, 800 insertions(+)
 create mode 100644 board/phytec/pcm051/Makefile
 create mode 100644 board/phytec/pcm051/board.c
 create mode 100644 board/phytec/pcm051/board.h
 create mode 100644 board/phytec/pcm051/mux.c
 create mode 100644 include/configs/pcm051.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 28c052d..9718e08 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -815,6 +815,9 @@ Dave Peverley dpever...@mpc-data.co.uk
 
omap730p2   ARM926EJS
 
+Lars Poeschel poesc...@lemonage.de
+   pcm051  ARM ARMV7 (AM33xx Soc)
+
 Mathieu Poirier mathieu.poir...@linaro.org
 
snowballARM ARMV7 (u8500 SoC)
diff --git a/arch/arm/include/asm/arch-am33xx/ddr_defs.h 
b/arch/arm/include/asm/arch-am33xx/ddr_defs.h
index 8e69fb6..f95b332 100644
--- a/arch/arm/include/asm/arch-am33xx/ddr_defs.h
+++ b/arch/arm/include/asm/arch-am33xx/ddr_defs.h
@@ -65,6 +65,24 @@
 #define MT41J128MJT125_PHY_FIFO_WE 0x100
 #define MT41J128MJT125_IOCTRL_VALUE0x18B
 
+/* Micron MT41J256M8HX-15E */
+#define MT41J256M8HX15E_EMIF_READ_LATENCY  0x06
+#define MT41J256M8HX15E_EMIF_TIM1  0x0888A39B
+#define MT41J256M8HX15E_EMIF_TIM2  0x26337FDA
+#define MT41J256M8HX15E_EMIF_TIM3  0x501F830F
+#define MT41J256M8HX15E_EMIF_SDCFG 0x61C04B32
+#define MT41J256M8HX15E_EMIF_SDREF 0x093B
+#define MT41J256M8HX15E_ZQ_CFG 0x50074BE4
+#define MT41J256M8HX15E_DLL_LOCK_DIFF  0x1
+#define MT41J256M8HX15E_RATIO  0x40
+#define MT41J256M8HX15E_INVERT_CLKOUT  0x1
+#define MT41J256M8HX15E_RD_DQS 0x3B
+#define MT41J256M8HX15E_WR_DQS 0x85
+#define MT41J256M8HX15E_PHY_WR_DATA0xC1
+#define MT41J256M8HX15E_PHY_FIFO_WE0x100
+#define MT41J256M8HX15E_IOCTRL_VALUE   0x18B
+
+
 /**
  * Configure SDRAM
  */
diff --git a/board/phytec/pcm051/Makefile b/board/phytec/pcm051/Makefile
new file mode 100644
index 000..67a87a1
--- /dev/null
+++ b/board/phytec/pcm051/Makefile
@@ -0,0 +1,46 @@
+#
+# Makefile
+#
+# Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed as is WITHOUT ANY WARRANTY of any
+# kind, whether express or implied; without even the implied warranty
+# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+ifdef CONFIG_SPL_BUILD
+COBJS  := mux.o
+endif
+
+COBJS  += board.o
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/phytec/pcm051/board.c b/board/phytec/pcm051/board.c
new file mode 100644
index 000..55bc018
--- /dev/null
+++ b/board/phytec/pcm051/board.c
@@ -0,0 +1,266 @@
+/*
+ * board.c
+ *
+ * Board functions for Phytec phyCORE-AM335x (pcm051) based boards
+ *
+ * Copyright (C) 2013 Lemonage Software GmbH
+ * Author Lars Poeschel poesc...@lemonage.de
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope

[U-Boot] [PATCH v2 3/3] am335x: display msg when reading MAC from efuse

2013-01-11 Thread Lars Poeschel
From: Lars Poeschel poesc...@lemonage.de

When ethaddr is not set in environment the MAC address is read
from efuse. The message was only printed in debug case, but this
message could be of interest for the ordinary user, so printf it.

Signed-off-by: Lars Poeschel poesc...@lemonage.de
---
 board/ti/am335x/board.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index f0eca54..ac3c999 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -391,7 +391,7 @@ int board_eth_init(bd_t *bis)
uint32_t mac_hi, mac_lo;
 
if (!eth_getenv_enetaddr(ethaddr, mac_addr)) {
-   debug(ethaddr not set. Reading from E-fuse\n);
+   printf(ethaddr not set. Reading from E-fuse\n);
/* try reading mac address from efuse */
mac_lo = readl(cdev-macid0l);
mac_hi = readl(cdev-macid0h);
-- 
1.7.10.4

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


Re: [U-Boot] [PATCH 2/2] pcm051: Add support for Phytec phyCORE-AM335x

2013-01-09 Thread Lars Poeschel
Hello Wolfgang,

thank you for your fast review!

On Tuesday 08 January 2013 at 19:58:37, Wolfgang Denk wrote:

  +/* DDR RAM defines */
  +#define DDR_CLK_MHZ303
 
 Is this really correct?  303 ??

I am quite sure, I read this in a datasheet, but I can not find it anymore. I 
set this to 333 now. mtest still works.

...

 Do you plan to use this?  Otherwise please just omit such dead code.
 
  +#ifdef CONFIG_DRIVER_TI_CPSW
  +static void cpsw_control(int enabled)
  +{
  +   /* VTP can be added here */
  +
  +   return;
  +}
 
 Ditto...

The cpsw driver needs a control function, otherwise the board crashes when 
network initializes. On my board this is empty like on am335x_evm.
 
  +#define CONFIG_ENV_OVERWRITE   1
 
 Please do not define values for logical variables like this one;
 please fix globally.

Fix globally ? Do you mean, I have to fix that for EVERY board that is in u-
boot, that defines CONFIG_ENV_OVERWRITE with a value to get my patch in? 
There are a number of boards doing this wrong!

  +#define CONFIG_ENV_IS_NOWHERE
 
 Really?

Uuhm. Yes. At the moment I use this uEnv.txt file on sd-card, as I am not 
able to use the NAND yet. The env should go to nand later.

Thanks for the other hints you gave. I will address this and send a version 2 
soon.

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


Re: [U-Boot] [PATCH 2/2] pcm051: Add support for Phytec phyCORE-AM335x

2013-01-09 Thread Lars Poeschel
Hi Wolfgang, hi Tom,

as I almost have the changes requested by Wolfgang in place, you two can 
choose, which version I should resubmit. ;)

Am 09.01.2013 um 20:34 schrieb Tom Rini:

 +static void rtc32k_enable(void)
 +{
 +   struct rtc_regs *rtc = (struct rtc_regs *)AM335X_RTC_BASE;
 +
 +   /*
 +* Unlock the RTC's registers.  For more details please see the
 +* RTC_SS section of the TRM.  In order to unlock we need to
 +* write these specific values (keys) in this order.
 +*/
 +   writel(0x83e70b13, rtc-kick0r);
 +   writel(0x95a4f1e0, rtc-kick1r);
 
 These magic numbers should probbly be moved to some header file ?
 
 This is a copy/paste from the am335x board.c file.  I specifically did a
 long comment to explain what / where these values come from because that
 (to me) is more helpful than
 #define AM33X_RTC_KICK0R_KEY 0x...
 #define AM33X_RTC_KICK1R_KEY 0x...

davinci does it this way. I would prefer Tom's variant having the values right 
in place.

 +   if (!eth_getenv_enetaddr(ethaddr, mac_addr)) {
 +   debug(ethaddr not set. Reading from E-fuse\n);
 
 This should be a printf().  Any such automatic changes are always
 worth to be told explicitly.
 
 This is the normal case of asking the hardware what MAC it shipped with.
 Why do we want to tell the user the expected has happened?

Here I'd prefer the printf variant, because for a common user it is not 
obivous, that it is reading the MAC from efuse. So this message is helpful.

 +   goto try_usbether;
 ...
 +#endif
 +try_usbether:
 
 Did you ever try building without CONFIG_DRIVER_TI_CPSW set?  I bet
 this causes a few compiler warnings. [Hint: You define a label, but
 don't use it anywhere.]
 
 It's a valid question if this board uses the CPSW eth or not, yes.

Yes, the board uses CPSW, but here I would prefer having the try_usbether label 
inside the ifdef.

 +#define CONFIG_ENV_IS_NOWHERE
 
 Really?
 
 Until they add NAND (which just now hit mainline), yes.

This is a very valuable information, thanks! 

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


[U-Boot] [PATCH 1/2] am33xx: add a pulldown macro to pinmux config

2013-01-08 Thread Lars Poeschel
From: Lars Poeschel poesc...@lemonage.de

Signed-off-by: Lars Poeschel poesc...@lemonage.de
---
 arch/arm/include/asm/arch-am33xx/mux.h |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/include/asm/arch-am33xx/mux.h 
b/arch/arm/include/asm/arch-am33xx/mux.h
index aed6b00..460ac1c 100644
--- a/arch/arm/include/asm/arch-am33xx/mux.h
+++ b/arch/arm/include/asm/arch-am33xx/mux.h
@@ -25,7 +25,8 @@
 /* PAD Control Fields */
 #define SLEWCTRL   (0x1  6)
 #define RXACTIVE   (0x1  5)
-#define PULLUP_EN  (0x1  4) /* Pull UP Selection */
+#define PULLDOWN_EN(0x0  4) /* Pull Down Selection */
+#define PULLUP_EN  (0x1  4) /* Pull Up Selection */
 #define PULLUDEN   (0x0  3) /* Pull up enabled */
 #define PULLUDDIS  (0x1  3) /* Pull up disabled */
 #define MODE(val)  val /* used for Readability */
-- 
1.7.10.4

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


[U-Boot] [PATCH 2/2] pcm051: Add support for Phytec phyCORE-AM335x

2013-01-08 Thread Lars Poeschel
From: Lars Poeschel poesc...@lemonage.de

The board is named pcm051 and has this hardware:
SOC: TI AM3359
DDR3-RAM: 2x MT41J256M8HX-15EIT:D 512MiB
ETH 1: LAN8710AI
SPI-Flash: W25Q64BVSSIG
RTC: RV-4162-C7
I2C-EEPROM: CAT32WC32
NAND: MT29F4G08_VFPGA63
PMIC: TPS65910A3
LCD

Supported:
UART 1
MMC/SD
ETH 1
USB
I2C
SPI

Not yet supported:
NAND
RTC
LCD

Signed-off-by: Lars Poeschel poesc...@lemonage.de
---
 arch/arm/include/asm/arch-am33xx/ddr_defs.h |   18 ++
 board/phytec/pcm051/Makefile|   46 
 board/phytec/pcm051/board.c |  271 +++
 board/phytec/pcm051/board.h |   33 +++
 board/phytec/pcm051/mux.c   |  133 
 boards.cfg  |1 +
 include/configs/pcm051.h|  308 +++
 7 files changed, 810 insertions(+)
 create mode 100644 board/phytec/pcm051/Makefile
 create mode 100644 board/phytec/pcm051/board.c
 create mode 100644 board/phytec/pcm051/board.h
 create mode 100644 board/phytec/pcm051/mux.c
 create mode 100644 include/configs/pcm051.h

diff --git a/arch/arm/include/asm/arch-am33xx/ddr_defs.h 
b/arch/arm/include/asm/arch-am33xx/ddr_defs.h
index 8e69fb6..f95b332 100644
--- a/arch/arm/include/asm/arch-am33xx/ddr_defs.h
+++ b/arch/arm/include/asm/arch-am33xx/ddr_defs.h
@@ -65,6 +65,24 @@
 #define MT41J128MJT125_PHY_FIFO_WE 0x100
 #define MT41J128MJT125_IOCTRL_VALUE0x18B
 
+/* Micron MT41J256M8HX-15E */
+#define MT41J256M8HX15E_EMIF_READ_LATENCY  0x06
+#define MT41J256M8HX15E_EMIF_TIM1  0x0888A39B
+#define MT41J256M8HX15E_EMIF_TIM2  0x26337FDA
+#define MT41J256M8HX15E_EMIF_TIM3  0x501F830F
+#define MT41J256M8HX15E_EMIF_SDCFG 0x61C04B32
+#define MT41J256M8HX15E_EMIF_SDREF 0x093B
+#define MT41J256M8HX15E_ZQ_CFG 0x50074BE4
+#define MT41J256M8HX15E_DLL_LOCK_DIFF  0x1
+#define MT41J256M8HX15E_RATIO  0x40
+#define MT41J256M8HX15E_INVERT_CLKOUT  0x1
+#define MT41J256M8HX15E_RD_DQS 0x3B
+#define MT41J256M8HX15E_WR_DQS 0x85
+#define MT41J256M8HX15E_PHY_WR_DATA0xC1
+#define MT41J256M8HX15E_PHY_FIFO_WE0x100
+#define MT41J256M8HX15E_IOCTRL_VALUE   0x18B
+
+
 /**
  * Configure SDRAM
  */
diff --git a/board/phytec/pcm051/Makefile b/board/phytec/pcm051/Makefile
new file mode 100644
index 000..67a87a1
--- /dev/null
+++ b/board/phytec/pcm051/Makefile
@@ -0,0 +1,46 @@
+#
+# Makefile
+#
+# Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed as is WITHOUT ANY WARRANTY of any
+# kind, whether express or implied; without even the implied warranty
+# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+ifdef CONFIG_SPL_BUILD
+COBJS  := mux.o
+endif
+
+COBJS  += board.o
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/phytec/pcm051/board.c b/board/phytec/pcm051/board.c
new file mode 100644
index 000..d2fb60d
--- /dev/null
+++ b/board/phytec/pcm051/board.c
@@ -0,0 +1,271 @@
+/*
+ * board.c
+ *
+ * Board functions for Phytec phyCORE-AM335x (pcm051) based boards
+ *
+ * Copyright (C) 2013 Lemonage Software GmbH
+ * Author Lars Poeschel poesc...@lemonage.de
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR /PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include common.h
+#include errno.h
+#include spl.h
+#include asm/arch/cpu.h
+#include asm/arch/hardware.h
+#include asm/arch/omap.h
+#include asm/arch/ddr_defs.h
+#include asm/arch/clock.h
+#include asm/arch/gpio.h
+#include asm/arch