[U-Boot] bootstopkey reason behind it

2013-08-02 Thread Paavaanan_T_N
Hi,

To stop autoboot we have 2 ifdef  (CONFIG_AUTOBOOT_STOP_ [STR2 || STR1] ). 
Which is very easy and straightforward to implement. Halting a boot with single 
Keystroke is having its own advantages to the user. But, why multiple key 
support is ignored say like [ctrl + anykey ] combination. Especially, BIOS 
vendors prefer at least simultaneous pressing of 2 or more keys to halt the 
boot. Any specific reasons to avoid this. Other than simplicity is there any 
specific reason to stick on this.

I mean why  simultaneous two key press support is avoided and implemented  a 
secondary bootstopkey to halt the boot say like CONFIG_AUTOBOOT_STOP_STR2.

Thanks,
Paavaanan.

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


[U-Boot] [PATCH v8 2/2] console: usb: kbd: To improve TFTP booting performance

2013-08-02 Thread Jim Lin
TFTP booting is slow when a USB keyboard is installed and
stdin has usbkbd added.
This fix is to change Ctrl-C polling for USB keyboard to every second
when NET transfer is running.

Signed-off-by: Jim Lin ji...@nvidia.com
---
Changes in v2:
 1. Change configuration name from CONFIG_CTRLC_POLL_MS to CONFIG_CTRLC_POLL_S.
 2. New code will be executed only when CONFIG_CTRLC_POLL_S is defined in
configuration header file.
 3. Add description in README.console.
Changes in v3:
 1. Move changes to common/usb_kbd.c and doc/README.usb
 2. Rename config setting to CONFIG_USBKB_TESTC_PERIOD.
 3. Remove slow response on USB-keyboard input when TFTP boot is not running.
Changes in v4:
 1. Remove changes in doc/README.usb, common/usb_kbd.c and
CONFIG_USBKB_TESTC_PERIOD 
 2. Modify net/net.c
Changes in v5:
 1. Change variable name to ctrlc_t_start.
 2. Use two calls of get_timer(0) to get time gap.
Changes in v6:
 1. In common/usb_kbd.c, check net_busy_flag to determine whether we poll
USB keyboard status.
 2. In include/usb.h, add external variable declaration net_busy_flag
Changes in v7:
 1. In common/usb_kbd.c and include/usb.h, add #ifdef CONFIG_CMD_NET.
 2. In common/usb_kbd.c, modify code to get correct time gap.
Changes in v8:
 1. Add __maybe_unused for variable kbd_testc_tms.

 common/usb_kbd.c |   13 +
 include/usb.h|2 +-
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index 3174b5e..4e7b304 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -121,6 +121,9 @@ struct usb_kbd_pdata {
uint8_t flags;
 };
 
+/* The period of time between two calls of usb_kbd_testc(). */
+static unsigned long __maybe_unused kbd_testc_tms;
+
 /* Generic keyboard event polling. */
 void usb_kbd_generic_poll(void)
 {
@@ -366,6 +369,16 @@ static int usb_kbd_testc(void)
struct usb_device *usb_kbd_dev;
struct usb_kbd_pdata *data;
 
+#ifdef CONFIG_CMD_NET
+   /*
+* If net_busy_flag is 1, NET transfer is running,
+* then we check key-pressed every second (first check may be
+* less than 1 second) to improve TFTP booting performance.
+*/
+   if (net_busy_flag  (get_timer(kbd_testc_tms)  CONFIG_SYS_HZ))
+   return 0;
+   kbd_testc_tms = get_timer(0);
+#endif
dev = stdio_get_by_name(DEVNAME);
usb_kbd_dev = (struct usb_device *)dev-priv;
data = usb_kbd_dev-privptr;
diff --git a/include/usb.h b/include/usb.h
index d7b082d..5c95bf5 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -206,7 +206,7 @@ int usb_host_eth_scan(int mode);
 
 int drv_usb_kbd_init(void);
 int usb_kbd_deregister(void);
-
+extern int __maybe_unused net_busy_flag;
 #endif
 /* routines */
 int usb_init(void); /* initialize the USB Controller */
-- 
1.7.7

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


[U-Boot] [PATCH v8 1/2] NET: Add net_busy_flag if CONFIG_USB_KEYBOARD is defined

2013-08-02 Thread Jim Lin
This flag is to make console aware that NET transfer is running or not.

Signed-off-by: Jim Lin ji...@nvidia.com
---
Changes in v2:
 1. Change configuration name from CONFIG_CTRLC_POLL_MS to CONFIG_CTRLC_POLL_S.
 2. New code will be executed only when CONFIG_CTRLC_POLL_S is defined in
configuration header file.
 3. Add description in README.console.
Changes in v3:
 1. Move changes to common/usb_kbd.c and doc/README.usb
 2. Rename config setting to CONFIG_USBKB_TESTC_PERIOD.
 3. Remove slow response on USB-keyboard input when TFTP boot is not running.
Changes in v4:
 1. Remove changes in doc/README.usb, common/usb_kbd.c and
CONFIG_USBKB_TESTC_PERIOD 
 2. Modify net/net.c
Changes in v5:
 1. Change variable name to ctrlc_t_start.
 2. Use two calls of get_timer(0) to get time gap.
Changes in v6:
 1. In common/usb_kbd.c, check net_busy_flag to determine whether we poll
USB keyboard status.
 2. In include/usb.h, add external variable declaration net_busy_flag
Changes in v7:
 1. Add CONFIG_USB_KEYBOARD
Changes in v8:
 1. net/net.c, add __maybe_unused for variable net_busy_flag.

 net/net.c |   11 +++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/net/net.c b/net/net.c
index df94789..65daaa0 100644
--- a/net/net.c
+++ b/net/net.c
@@ -207,6 +207,8 @@ static int net_check_prereq(enum proto_t protocol);
 
 static int NetTryCount;
 
+int __maybe_unused net_busy_flag;
+
 /**/
 
 static int on_bootfile(const char *name, const char *value, enum env_op op,
@@ -341,6 +343,9 @@ int NetLoop(enum proto_t protocol)
eth_init_state_only(bd);
 
 restart:
+#ifdef CONFIG_USB_KEYBOARD
+   net_busy_flag = 0;
+#endif
net_set_state(NETLOOP_CONTINUE);
 
/*
@@ -453,6 +458,9 @@ restart:
status_led_set(STATUS_LED_RED, STATUS_LED_ON);
 #endif /* CONFIG_SYS_FAULT_ECHO_LINK_DOWN, ... */
 #endif /* CONFIG_MII, ... */
+#ifdef CONFIG_USB_KEYBOARD
+   net_busy_flag = 1;
+#endif
 
/*
 *  Main packet reception loop.  Loop receiving packets until
@@ -558,6 +566,9 @@ restart:
}
 
 done:
+#ifdef CONFIG_USB_KEYBOARD
+   net_busy_flag = 0;
+#endif
 #ifdef CONFIG_CMD_TFTPPUT
/* Clear out the handlers */
net_set_udp_handler(NULL);
-- 
1.7.7

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


Re: [U-Boot] [PATCH] wandboard: add pxe support, set default boot command like highbank

2013-08-02 Thread Stefano Babic
Hi Rob, Dennis,

On 01/08/2013 19:19, Rob Herring wrote:
 You both are missing the point. This patch doesn't address the problem,
 but does highlight it.

I am aware of it - I have already pointed out that we get many patches
that have increased the default environment to something hard to
maintain. This patch makes it more obvious.

 The distros want to get out of having to know the
 u-boot environment details for every single board and need some level of
 standardization across platforms. The distros should only have to
 specify boot the kernel at path/name X on device Y. They should not
 need to know what address to load the kernel to, but only that
 $kernel_addr_r is already setup. Variables are the first step. The
 second step is standardizing the boot commands.

I understand the point - but is the way to hard code together with
u-boot the right way ? Do we have some other possibilities to do this ?

Maybe can be mkenvimage a solution (tools/mkenvimage) ? It creates an
environment image from a simple ASCII text. The resulting image could be
concatenated together with u-boot and in CONFIG_EXTRA_ENV_SETTINGS we
could have for all boards a way to load it. Only a first idea, but as we
recognize the issue, any idea to solve it ?

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] wandboard: add pxe support, set default boot command like highbank

2013-08-02 Thread Stefano Babic
Hi Dennis,

On 01/08/2013 19:06, Dennis Gilmore wrote:
 
 ultimately I want to have a standard way to boot any system that just
 works and does not need the installer to know or care what the target
 system is. using boot.scr and uEnv.txt does not work for my goals.
 

Let's go away from the concrete scripts u-boot.scr and env.txt. What I
find sick is that even the smallest change in a variable requires a new
u-boot image, while the environment itself is thought from the beginning
to be independent from the code.

 I know it's bikeshedding, but most boards can be converted to just:

 #define CONFIG_BOOTCOMMAND \
 mmc dev ${mmcdev}; \
 if mmc rescan; then  \
 echo SD/MMC found on device ${mmcdev}; \
 if run loadbootenv; then  \
 run importbootenv; \
 fi; \
 if test -n $uenvcmd; then  \
 echo Running uenvcmd ...; \
 run uenvcmd; \
 fi; \
 if run loadsomefailsafedefault; then  \
 run mmcboot; \
 fi; \
 fi;
 #endif
 
 ultimately for Fedora we do not want to use uEnv.txt or boot.scr at all
 we want to use a extlinux.conf file and sysboot provided by cmd_pxe the
 rest is to provide flexibility and options to users to choose different
 ways to boot. the above is not at all suitable. 
 

This is already an example where the dafult environment is perfectly
suitable for someone but not for everybody. And of course, there are a
wide range of storage device where scripts are stored: not all boards
have MMC. I am thinking if we can have in the CONFIG_EXTRA_ENV_SETTINGS
a general command to load the whole environment, letting the whole logic
with scripts outside of the code.

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V3 01/20] Add functions for use with i.mx6 otg udc

2013-08-02 Thread Marek Vasut
Dear Troy Kisky,

 Add  functions for use with mx6 soc
 void otg_enable(void);
 void reset_usb_phy1(void);
 
 Signed-off-by: Troy Kisky troy.ki...@boundarydevices.com
 ---
  arch/arm/cpu/armv7/mx6/soc.c  | 47
 +++ arch/arm/include/asm/arch-mx6/crm_regs.h 
 |  3 ++
  arch/arm/include/asm/arch-mx6/imx-regs.h  | 17 +++
  arch/arm/include/asm/arch-mx6/sys_proto.h |  4 +++
  4 files changed, 71 insertions(+)

[...]

 diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h
 b/arch/arm/include/asm/arch-mx6/imx-regs.h index 5d6bccb..3eed4d8 100644
 --- a/arch/arm/include/asm/arch-mx6/imx-regs.h
 +++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
 @@ -419,6 +419,23 @@ struct cspi_regs {
   ECSPI5_BASE_ADDR
  #endif
 
 +struct set_clr_tog {
 + u32 val;
 + u32 set;
 + u32 clr;
 + u32 tog;
 +};
 +
 +struct usbphy {
 + struct set_clr_tog  pwd;
 + struct set_clr_tog  tx;
 + struct set_clr_tog  rx;
 + struct set_clr_tog  ctrl;
 +};


Maybe you want to keep the naming here consistent with MX28 and MX6?

See arch/arm/include/asm/imx-common/regs-common.h

[...]

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 V3 06/20] usb: gadget: mv_udc: fix hardware udc address for i.MX6

2013-08-02 Thread Marek Vasut
Dear Troy Kisky,

 The hcor for i.MX6 is 02184340
 and the udc should be 02184140
 
 Signed-off-by: Troy Kisky troy.ki...@boundarydevices.com
 
 ---
 I don't know if this is a correct fix, please check carefully.
 ---
  drivers/usb/gadget/mv_udc.c | 28 +++-
  1 file changed, 19 insertions(+), 9 deletions(-)
 
 diff --git a/drivers/usb/gadget/mv_udc.c b/drivers/usb/gadget/mv_udc.c
 index 7574e31..359b8e1 100644
 --- a/drivers/usb/gadget/mv_udc.c
 +++ b/drivers/usb/gadget/mv_udc.c
 @@ -110,6 +110,16 @@ static struct mv_drv controller = {
   },
  };
 
 +struct mv_udc *get_mv_udc(void)
 +{
 +#ifdef CONFIG_MXC_USB_PORT
 + return (struct mv_udc *)((unsigned)controller.ctrl-hcor
 + - (0x200 * CONFIG_MXC_USB_PORT));
 +#else
 + return (struct mv_udc *)controller.ctrl-hcor;
 +#endif
 +}
 +

This in particular is something I wanted to avoid happening.

Can you instead call

usb_lowlevel_init(0, (void **)controller.ctrl);

for different number than 0 in usb_gadget_register_driver() instead ? THe 
effect 
will be the same, yet the patch will be smaller.

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 V3 07/20] usb: gadget: config: fix unaligned access issues

2013-08-02 Thread Marek Vasut
Dear Troy Kisky,

I don't understand what this patch does and why. It's not very clear from the 
(missing) commit message either.

 Signed-off-by: Troy Kisky troy.ki...@boundarydevices.com
 ---
  drivers/usb/gadget/config.c | 6 --
  1 file changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/usb/gadget/config.c b/drivers/usb/gadget/config.c
 index f563afe..014a679 100644
 --- a/drivers/usb/gadget/config.c
 +++ b/drivers/usb/gadget/config.c
 @@ -10,6 +10,7 @@
   */
 
  #include common.h
 +#include asm/unaligned.h
  #include asm/errno.h
  #include linux/list.h
  #include linux/string.h
 @@ -86,7 +87,8 @@ int usb_gadget_config_buf(
   /* config descriptor first */
   if (length  USB_DT_CONFIG_SIZE || !desc)
   return -EINVAL;
 - *cp = *config;
 + /* config need not be aligned */
 + memcpy(cp, config, sizeof(*cp));
 
   /* then interface/endpoint/class/vendor/... */
   len = usb_descriptor_fillbuf(USB_DT_CONFIG_SIZE + (u8 *)buf,
 @@ -100,7 +102,7 @@ int usb_gadget_config_buf(
   /* patch up the config descriptor */
   cp-bLength = USB_DT_CONFIG_SIZE;
   cp-bDescriptorType = USB_DT_CONFIG;
 - cp-wTotalLength = cpu_to_le16(len);
 + put_unaligned_le16(len, cp-wTotalLength);
   cp-bmAttributes |= USB_CONFIG_ATT_ONE;
   return len;
  }

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 V3 08/20] usb: gadget: mv_udc: add MX6Q specific reset

2013-08-02 Thread Marek Vasut
Dear Troy Kisky,

Why are you adding this? Any kind of explanation is missing.

 Signed-off-by: Troy Kisky troy.ki...@boundarydevices.com
 
 ---
   I don't know if this is needed, but it doesn't hurt.
 ---
  drivers/usb/gadget/mv_udc.c | 4 
  1 file changed, 4 insertions(+)
 
 diff --git a/drivers/usb/gadget/mv_udc.c b/drivers/usb/gadget/mv_udc.c
 index 359b8e1..26f193d 100644
 --- a/drivers/usb/gadget/mv_udc.c
 +++ b/drivers/usb/gadget/mv_udc.c
 @@ -13,6 +13,7 @@
  #include config.h
  #include net.h
  #include malloc.h
 +#include asm/arch/sys_proto.h
  #include asm/io.h
  #include linux/types.h
  #include usb/mv_udc.h
 @@ -569,6 +570,9 @@ static int mv_pullup(struct usb_gadget *gadget, int
 is_on) /* RESET */
   writel(USBCMD_ITC(MICRO_8FRAME) | USBCMD_RST, udc-usbcmd);
   udelay(200);
 +#if defined(CONFIG_MX6Q) || defined(CONFIG_MX6DL)
 + reset_usb_phy1();
 +#endif
 
   writel((unsigned)controller.epts, udc-epinitaddr);

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 V3 09/20] usb: gadget: ether set wMaxPacketSize

2013-08-02 Thread Marek Vasut
Dear Troy Kisky,

 set wMaxPacketSize for full speed descriptors

Why? Please elaborate more.
 
 Signed-off-by: Troy Kisky troy.ki...@boundarydevices.com
 ---
  drivers/usb/gadget/ether.c | 2 ++
  1 file changed, 2 insertions(+)
 
 diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
 index 579893c..f583c6e 100644
 --- a/drivers/usb/gadget/ether.c
 +++ b/drivers/usb/gadget/ether.c
 @@ -635,6 +635,7 @@ fs_source_desc = {
 
   .bEndpointAddress = USB_DIR_IN,
   .bmAttributes = USB_ENDPOINT_XFER_BULK,
 + .wMaxPacketSize =   __constant_cpu_to_le16(64),
  };
 
  static struct usb_endpoint_descriptor
 @@ -644,6 +645,7 @@ fs_sink_desc = {
 
   .bEndpointAddress = USB_DIR_OUT,
   .bmAttributes = USB_ENDPOINT_XFER_BULK,
 + .wMaxPacketSize =   __constant_cpu_to_le16(64),
  };
 
  static const struct usb_descriptor_header *fs_eth_function[11] = {

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 V3 10/20] usb: gadget: ether: return error from rx_submit if no request

2013-08-02 Thread Marek Vasut
Dear Troy Kisky,

 This prevents a crash if tftpboot is given a bad filename.

How is bad filename related to struct usb_request?

 Signed-off-by: Troy Kisky troy.ki...@boundarydevices.com
 ---
  drivers/usb/gadget/ether.c | 2 ++
  1 file changed, 2 insertions(+)
 
 diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
 index f583c6e..fe73c7b 100644
 --- a/drivers/usb/gadget/ether.c
 +++ b/drivers/usb/gadget/ether.c
 @@ -1535,6 +1535,8 @@ static int rx_submit(struct eth_dev *dev, struct
 usb_request *req, */
 
   debug(%s\n, __func__);
 + if (!req)
 + return -EINVAL;
 
   size = (ETHER_HDR_SIZE + dev-mtu + RX_EXTRA);
   size += dev-out_ep-maxpacket - 1;

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 V3 00/20] Make mv_udc work for i.mx6

2013-08-02 Thread Marek Vasut
Dear Troy Kisky,

 Hi Marek, Stefano
 
 
 This series is based on u-boot-usb/master branch.
 After this series, nitrogen6x works with tftpboot to transfer
 files over usb.
 
 V2 was dropped to my bad posting of it and should be ignored.
 
 This V3 is a rebase and most patches had to be changed slightly.
 I also ran a ./MAKEALL -a arm and fixed the errors that the V1
 series had.
 
 The most noticeable change is the addition of
 
 usb: gadget: mv_udc: fix hardware udc address for i.MX6
 
 Let me know if you want to go back to a udc variable
 to store the address instead of using hcor.
 
 
 Stefano, would you like to take patches 1-5 ?
 I'll likely need a V3, but maybe the early ones
 will be approved.
 
 Thanks

In general, cool stuff. I want this in, you just need to learn to write proper 
commit messages. I don't understand the middle part of your patchset very well, 
that's where I was rambling the most. Otherwise, it's almost OK, one or two 
more 
loop and you're in.

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 v4 2/4] apf27: add support for the armadeus APF27 board

2013-08-02 Thread Stefano Babic
Hi Philippe,

On 01/08/2013 19:12, trem wrote:
 Ok, this must be done in assembly - normally is part of lowelevel_init,
 while board_init_f() is already written in C.

 Really I was waiting that general code is called, that is
 spl_nand_load_image() and then the driver function. You are pushing a
 parallel way that is, at the end, still the old way to boot (nand_spl).
 
 This board boot from nand, so the SPL should be lower than 2KB.
 The SPL start from NFC (nand) buffer, and It has to :
 - initialize the ram
 - copy itself to another location (ram)
 - jump to this another location
 - copy u-boot from nand to ram
 - jump to ram
 
 We have tried to use SPL framework (with nand driver), but the result
 is a SPL bigger than 2 KB, so we can't use it.
 
 To have a SPL smaller than 2 KB, we have written everything in assembler.

Ok, sorry - I am now used with current i.MX where there is not this
constraint. I reread the boot part of i.MX27 manual and I got the point.
I understand there is no other way for the i.MX27.

I would like you add your useful explanation why you add an assembly
NAND driver (so what you have written here in the lines above) to the
commit message, so that is clear why you were forced to use this way
instead of the SPL framework.

 
 Are you agree with this solution for the SPL ?
 

I understand there is no other solution ;-)

Best regards,
Stefano

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] bootstopkey reason behind it

2013-08-02 Thread Stefano Babic
On 02/08/2013 07:58, paavaanan_...@dell.com wrote:
 Hi,
 
 To stop autoboot we have 2 ifdef  (CONFIG_AUTOBOOT_STOP_ [STR2 ||
 STR1] ). Which is very easy and straightforward to implement. Halting
 a boot with single Keystroke is having its own advantages to the
 user. But, why multiple key support is ignored say like [ctrl +
 anykey ] combination. Especially, BIOS vendors prefer at least
 simultaneous pressing of 2 or more keys to halt the boot. Any
 specific reasons to avoid this. Other than simplicity is there any
 specific reason to stick on this.
 
 I mean why  simultaneous two key press support is avoided and
 implemented  a secondary bootstopkey to halt the boot say like
 CONFIG_AUTOBOOT_STOP_STR2.

But does not the keyboard send a single key code ? Maybe it is enough
you put in CONFIG_AUTOBOOT_STOP_STR1 the keycode of your CTRL+key.

Best regards,
Stefano Babic



-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] bootstopkey reason behind it

2013-08-02 Thread Paavaanan_T_N
I want to configure bootstopkey to  [ctrl + B] combination, So in bootprompt I 
gave 
= setenv boostopkey ^B
= saveenv

Issuing printenv shows 
boostopkey=^B

But, after issuing reset the key combination didn't stopped the autoboot. 
Do my steps are right ? 


-Original Message-
From: Stefano Babic [mailto:sba...@denx.de] 
Sent: Friday, August 02, 2013 5:05 PM
To: N, Paavaanan T
Cc: u-boot@lists.denx.de
Subject: Re: [U-Boot] bootstopkey reason behind it

On 02/08/2013 07:58, paavaanan_...@dell.com wrote:
 Hi,
 
 To stop autoboot we have 2 ifdef  (CONFIG_AUTOBOOT_STOP_ [STR2 || 
 STR1] ). Which is very easy and straightforward to implement. Halting 
 a boot with single Keystroke is having its own advantages to the 
 user. But, why multiple key support is ignored say like [ctrl + anykey 
 ] combination. Especially, BIOS vendors prefer at least simultaneous 
 pressing of 2 or more keys to halt the boot. Any specific reasons to 
 avoid this. Other than simplicity is there any specific reason to 
 stick on this.
 
 I mean why  simultaneous two key press support is avoided and 
 implemented  a secondary bootstopkey to halt the boot say like 
 CONFIG_AUTOBOOT_STOP_STR2.

But does not the keyboard send a single key code ? Maybe it is enough you put 
in CONFIG_AUTOBOOT_STOP_STR1 the keycode of your CTRL+key.

Best regards,
Stefano Babic



--
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de 
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] bootstopkey reason behind it

2013-08-02 Thread Heiko Schocher

Hello paavaanan_...@dell.com

Am 02.08.2013 13:41, schrieb paavaanan_...@dell.com:

I want to configure bootstopkey to  [ctrl + B] combination, So in bootprompt I 
gave
=  setenv boostopkey ^B

^

Try bootstopkey ...

bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 2/4] apf27: add support for the armadeus APF27 board

2013-08-02 Thread Fabio Estevam
On Fri, Aug 2, 2013 at 8:12 AM, Stefano Babic sba...@denx.de wrote:

 I would like you add your useful explanation why you add an assembly
 NAND driver (so what you have written here in the lines above) to the
 commit message, so that is clear why you were forced to use this way
 instead of the SPL framework.


 Are you agree with this solution for the SPL ?


 I understand there is no other solution ;-)

mx31 also has the same 2kB limitation and we don't use the NAND driver
in assembly there, right?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 2/4] apf27: add support for the armadeus APF27 board

2013-08-02 Thread Stefano Babic
Hi Fabio,

On 02/08/2013 14:49, Fabio Estevam wrote:
 On Fri, Aug 2, 2013 at 8:12 AM, Stefano Babic sba...@denx.de wrote:
 
 I would like you add your useful explanation why you add an assembly
 NAND driver (so what you have written here in the lines above) to the
 commit message, so that is clear why you were forced to use this way
 instead of the SPL framework.


 Are you agree with this solution for the SPL ?


 I understand there is no other solution ;-)
 
 mx31 also has the same 2kB limitation and we don't use the NAND driver
 in assembly there, right?
 

You're absolutely right, thanks for pointing out ! And it uses the
generic framework.

Philippe, could you take a look at the mx31pdk implementation ? SPL is
less thn 2KB (and you can set CONFIG_SPL_MAX_SIZE in your config file):

   1756   0   01756 6dc ./spl/u-boot-spl

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Mac address warning

2013-08-02 Thread Stefano Babic
Hi Eric,

On 02/08/2013 01:28, Eric Nelson wrote:
 Hi all,
 
 While testing Troy's usbnet patches, I was reminded of
 this mysterious warning issued when the environment has
 no mac address stored, but the device provides one:
 
 printf(\nWarning: %s using MAC address from net device\n,
 dev-name);
 
 Why is this a warning? It's the out-of-the box default
 for new boards who haven't saved a mac address to the
 persistent environment.

Well, I have found it very useful in case I set explicitely the ethaddr
variable, so I know where the MAC address comes from. Do you find it
disturbing ? Maybe we could replace warning with info.

Best regards,
Stefano


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] bootstopkey reason behind it

2013-08-02 Thread Paavaanan_T_N
Heiko,

Thanks for the input. I configured with the help of bootstopkey only. I am 
sorry it's a typo error while I copied in the mail thread. I am not sure am I 
hijacking the list or not. But, let me just want to clear this. To stop 
autoboot, one option which I choose is bootstopkey. I enabled this in ifdef's 
in the code. Now, the issue is how to give Ctrl key as an input. Because, 
setenv bootstopkey b makes the boot halts. How to do this for [ctrl + b] 
combination. I tried  setenv bootstopkey ^B . It is saved successfully but it 
treat it separately as ^ and b not as Ctrl+b. So, this is the issue.. As 
per the design do this support this combination or do we don't care about this. 
I am not clear on this part.

-Original Message-
From: Heiko Schocher [mailto:h...@denx.de] 
Sent: Friday, August 02, 2013 5:20 PM
To: N, Paavaanan T
Cc: sba...@denx.de; u-boot@lists.denx.de
Subject: Re: [U-Boot] bootstopkey reason behind it

Hello paavaanan_...@dell.com

Am 02.08.2013 13:41, schrieb paavaanan_...@dell.com:
 I want to configure bootstopkey to  [ctrl + B] combination, So in 
 bootprompt I gave =  setenv boostopkey ^B
 ^

Try bootstopkey ...

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Mac address warning

2013-08-02 Thread Tom Rini
On Fri, Aug 02, 2013 at 03:08:36PM +0200, Stefano Babic wrote:
 Hi Eric,
 
 On 02/08/2013 01:28, Eric Nelson wrote:
  Hi all,
  
  While testing Troy's usbnet patches, I was reminded of
  this mysterious warning issued when the environment has
  no mac address stored, but the device provides one:
  
  printf(\nWarning: %s using MAC address from net device\n,
  dev-name);
  
  Why is this a warning? It's the out-of-the box default
  for new boards who haven't saved a mac address to the
  persistent environment.
 
 Well, I have found it very useful in case I set explicitely the ethaddr
 variable, so I know where the MAC address comes from. Do you find it
 disturbing ? Maybe we could replace warning with info.

On am335x the message we use is:
ethaddr not set. Validating first E-fuse MAC
And then validate it, and setenv.

-- 
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] mmc/dw_mmc: Fix DMA descriptor corruption

2013-08-02 Thread Jaehoon Chung
Hi, Mischa,
Looks good to me.

Acked-by: Jaehoon Chung jh80.ch...@samsung.com

Best Regards,
Jaehoon Chung

On 07/26/2013 09:08 PM, Mischa Jonker wrote:
 In dwmci_prepare_data, the descriptors are allocated for DMA transfer.
 These are allocated using the ALLOC_CACHE_ALIGN_BUFFER. This macro uses
 the stack to allocate these descriptors. This becomes a problem if the
 DMA transfer continues after the processor leaves the function in which
 the descriptors were allocated.
 
 Therefore, I have moved the allocated of the buffers up one level, to
 dwmci_send_cmd(). The DMA transfer should be complete when leaving this
 function.
 
 Signed-off-by: Mischa Jonker mjon...@synopsys.com
 Cc: Alexey Brodkin abrod...@synopsys.com
 Cc: Jaehoon Chung jh80.ch...@samsung.com
 Cc: Andy Fleming aflem...@gmail.com
 ---
  drivers/mmc/dw_mmc.c |7 ---
  1 file changed, 4 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
 index a82ee17..796a811 100644
 --- a/drivers/mmc/dw_mmc.c
 +++ b/drivers/mmc/dw_mmc.c
 @@ -41,12 +41,11 @@ static void dwmci_set_idma_desc(struct dwmci_idmac *idmac,
  }
  
  static void dwmci_prepare_data(struct dwmci_host *host,
 - struct mmc_data *data)
 + struct mmc_data *data, struct dwmci_idmac *cur_idmac)
  {
   unsigned long ctrl;
   unsigned int i = 0, flags, cnt, blk_cnt;
   ulong data_start, data_end, start_addr;
 - ALLOC_CACHE_ALIGN_BUFFER(struct dwmci_idmac, cur_idmac, data-blocks);
  
  
   blk_cnt = data-blocks;
 @@ -111,6 +110,8 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd 
 *cmd,
   struct mmc_data *data)
  {
   struct dwmci_host *host = (struct dwmci_host *)mmc-priv;
 + ALLOC_CACHE_ALIGN_BUFFER(struct dwmci_idmac, cur_idmac,
 +  data ? data-blocks : 0);
   int flags = 0, i;
   unsigned int timeout = 10;
   u32 retry = 1;
 @@ -127,7 +128,7 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd 
 *cmd,
   dwmci_writel(host, DWMCI_RINTSTS, DWMCI_INTMSK_ALL);
  
   if (data)
 - dwmci_prepare_data(host, data);
 + dwmci_prepare_data(host, data, cur_idmac);
  
   dwmci_writel(host, DWMCI_CMDARG, cmd-cmdarg);
  
 

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


Re: [U-Boot] Mac address warning

2013-08-02 Thread Stefano Babic
Hi Tom,

On 02/08/2013 16:16, Tom Rini wrote:
 Well, I have found it very useful in case I set explicitely the
 ethaddr variable, so I know where the MAC address comes from. Do
 you find it disturbing ? Maybe we could replace warning with
 info.
 
 On am335x the message we use is: ethaddr not set. Validating
 first E-fuse MAC And then validate it, and setenv.
 
..but the code is common as it is located in net/eth.c. The warning
does not depend on the SOC.

Regards,
Stefano

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Mac address warning

2013-08-02 Thread Eric Nelson

Thanks Tom,

On 08/02/2013 07:16 AM, Tom Rini wrote:

On Fri, Aug 02, 2013 at 03:08:36PM +0200, Stefano Babic wrote:

Hi Eric,

On 02/08/2013 01:28, Eric Nelson wrote:

Hi all,

While testing Troy's usbnet patches, I was reminded of
this mysterious warning issued when the environment has
no mac address stored, but the device provides one:

 printf(\nWarning: %s using MAC address from net device\n,
 dev-name);

Why is this a warning? It's the out-of-the box default
for new boards who haven't saved a mac address to the
persistent environment.


Well, I have found it very useful in case I set explicitely the ethaddr
variable, so I know where the MAC address comes from. Do you find it
disturbing ? Maybe we could replace warning with info.


On am335x the message we use is:
ethaddr not set. Validating first E-fuse MAC
And then validate it, and setenv.


I think this points out the issue. The fec_mxc driver isn't
setting a default ethaddr environment variable.

Stefano, we've had lots of questions from customers because
ethaddr is empty in the normal case (no environment saved).

I'll figure out where this goes and submit a patch.

Regards,


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


Re: [U-Boot] [PATCH V3 00/20] Make mv_udc work for i.mx6

2013-08-02 Thread Stefano Babic
Hi Troy,

On 02/08/2013 01:27, Troy Kisky wrote:
 Hi Marek, Stefano
 
 
 This series is based on u-boot-usb/master branch.
 After this series, nitrogen6x works with tftpboot to transfer
 files over usb.
 
 V2 was dropped to my bad posting of it and should be ignored.
 
 This V3 is a rebase and most patches had to be changed slightly.
 I also ran a ./MAKEALL -a arm and fixed the errors that the V1
 series had.
 
 The most noticeable change is the addition of
 
 usb: gadget: mv_udc: fix hardware udc address for i.MX6
 
 Let me know if you want to go back to a udc variable
 to store the address instead of using hcor.
 
 
 Stefano, would you like to take patches 1-5 ?
 I'll likely need a V3, but maybe the early ones
 will be approved.

Fine with me - I merge the first 5 patches.

Regards,
Stefano


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Mac address warning

2013-08-02 Thread Tom Rini
On Fri, Aug 02, 2013 at 04:36:23PM +0200, Stefano Babic wrote:
 Hi Tom,
 
 On 02/08/2013 16:16, Tom Rini wrote:
  Well, I have found it very useful in case I set explicitely the
  ethaddr variable, so I know where the MAC address comes from. Do
  you find it disturbing ? Maybe we could replace warning with
  info.
  
  On am335x the message we use is: ethaddr not set. Validating
  first E-fuse MAC And then validate it, and setenv.
  
 ..but the code is common as it is located in net/eth.c. The warning
 does not depend on the SOC.

Does it even belong there?  It looks like some generally unused and
dangling functionality, the write portion that is.  A number of
drivers do set write_hwaddr, but only usb_ether calls it, and not in an
update the HW fashion...

-- 
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] fec_mxc: set ethaddr if fuses burned and not previously set

2013-08-02 Thread Eric Nelson
Without this change, the following message is generated:
Warning: FEC using MAC address from net device

See doc/README.enetaddr for details.

Signed-off-by: Eric Nelson eric.nel...@boundarydevices.com
---
 drivers/net/fec_mxc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index e14a359..886be9c 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -980,6 +980,8 @@ static int fec_probe(bd_t *bd, int dev_id, uint32_t 
base_addr,
if (fec_get_hwaddr(edev, dev_id, ethaddr) == 0) {
debug(got MAC%d address from fuse: %pM\n, dev_id, ethaddr);
memcpy(edev-enetaddr, ethaddr, 6);
+   if (!getenv(ethaddr))
+   eth_setenv_enetaddr(ethaddr,mac);
}
return ret;
 err3:
-- 
1.8.1.2

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


Re: [U-Boot] [PATCH v3 8/9] tegra: i2c: Enable new CONFIG_SYS_I2C framework

2013-08-02 Thread Simon Glass
Hi Albert,

On Thu, Aug 1, 2013 at 2:16 PM, Albert ARIBAUD albert.u.b...@aribaud.netwrote:

 Hi Simon,

 On Thu, 1 Aug 2013 08:22:55 -0600, Simon Glass s...@chromium.org wrote:

  Hi,
 
  On Thu, Aug 1, 2013 at 2:38 AM, Heiko Schocher h...@denx.de wrote:
 
   Hello Albert,
  
   Am 01.08.2013 08:53, schrieb Albert ARIBAUD:
  
Hi Heiko,
  
   On Thu, 01 Aug 2013 08:02:42 +0200, Heiko Schocherh...@denx.de
  wrote:
  
I suppose you could. It seems conceptually /far/ simpler to just scan
   the DT once up-front rather than having to defer all this stuff
 until
  
  
   on the other hand we ring for every ms boot time ... and here we want
   to scan a complete dt with maybe a lot of nodes, we do not want to
   use?
  
  
   Scanning all of DT seems to imply it has no strict or standard
   ordering. Could we mandate, suggest, of make it so that all entries in
   the DT needed at _f time are put first, and even maybe place an end
 of
   _f custom marker in DT to delimit them? (I assume that, for the sake
 of
  
  
   I do not know, if this is possible, as I think the DT used in U-Boot
   should be the same as used in linux ... or?
  
  
Postel-ism, anything in DT which is not understandable is skipped, so
   other users of the DT than us would not even be annoyed by such a
   marker)
  
   This way, we'd avoid wasting time scanning most of the DT in this
 case.
  
  
   Hmm.. why should we introduce such things, instead of scanning the
   node only if we need it?
  
   We have only the problem, that we could not write to data at this
   moment ... but this problem should be solved in a seperate topic.
   I2C is usable before relocation, the problem is in conjunction with
   dt, that we can not save for example the base address of the
 controller,
   which we get from the DT ... If I understand it correct!
  
   So we need an option when using dt, that we have (small ram) in which
   we can write some parameters parsed from dt ...
  
   I think this problem have all subsystems used before relocation.
   (for example: environment on a spi flash?)
  
  
  I think using a small RAM is a good approach. At least it is better than
  pretending there is no RAM at all. We currently have no facility to
  allocate RAM before relocation, other than to use the .data section. We
 can
  use global_data but that won't scale well for many drivers adding their
 own
  stuff in there. Samsung's driver uses .data, I don't think it is a big
 deal.

 What about targets which do not have such a small RAM available?


Presumably such targets do not use SPL, and perhaps don't use FDT at
present?



  One option I should mention is to decode the I2C FDT nodes each time it
 is
  needed prior to relocation (i.e. to the stack), use it for the
 transaction,
  and throw it away. This is quite painful IMO this it involves putting
 calls
  in the driver to check if we are pre-reloc and have a stack space used
  every time. On tegra20 this would be 130 bytes or so. I mention it
 because
  console working this way for a while (decoding the console again on every
  byte).
 
  Options as I see it:
 
  - just fudge it for now and use .data (deal with it later with driver
 model)
  - change the meaning of board_init_f() such that memory may be available
  (e.g. if run from SPL)
  - decode the FDT nodes every time we need them (ick)
  - adjust the ordering so that I2C normally happens post reloc except for
  specific platforms with a CONFIG defined (Heiko, the difference as I
  understand it is that with your patch CONFIG_HARD_I2C or CONFIG_SOFT_I2C
  are now defined, and so I2C happens prior to reloc now)
 
 
  
   As Wolfgang said:
   Agreed - actually we're entering an area hear that smells pretty
   strong like device model reorganization :-)
  
   BTW: How is this problem solved with the device model approach?
 
 
  More that we need to solve it, probably with a limited malloc()
 pre-reloc.


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


Re: [U-Boot] [PATCH v3 8/9] tegra: i2c: Enable new CONFIG_SYS_I2C framework

2013-08-02 Thread Simon Glass
Hi Heiko,

On Thu, Aug 1, 2013 at 10:40 PM, Heiko Schocher h...@denx.de wrote:

 Hello Stephen,

 Am 01.08.2013 22:32, schrieb Stephen Warren:

  On 08/01/2013 12:02 AM, Heiko Schocher wrote:

 Am 01.08.2013 07:39, schrieb Stephen Warren:

 On 07/31/2013 10:32 PM, Heiko Schocher wrote:

 Am 31.07.2013 21:31, schrieb Stephen Warren:

 On 07/30/2013 11:46 PM, Heiko Schocher wrote:

 ...

 2) Actually initializing or using the I2C HW. That could certainly be
 part of the per-I2C-controller init() function you mention.


 For that purpose is the i2c_init function.

 And why we could not do step 1 when we do step 2? Why doing step 1
 for hw we later do not use?


 I suppose you could. It seems conceptually /far/ simpler to just scan
 the DT once up-front rather than having to defer all this stuff until


 on the other hand we ring for every ms boot time ... and here we want
 to scan a complete dt with maybe a lot of nodes, we do not want to
 use?

  you actually use an I2C bus. If you do that, how can you know how many
 I2C buses exist without trying to use every possible one and seeing


 Do I really need to know that?


 Well, with the recent patches, U-Boot prints out a list of valid I2C


 which patches? I am trying current U-Boot on some boards, I do
 not see such a list ... you mean on tegra based boards?


  adapters at boot. So, I suppose someone must have thought it a good idea!


 Ok, but then, printing this list should done after relocation.
 And the me known I2C:   ready print on U-Boot boot, comes from
 init_func_i2c() ... which is ancient code from powerpc times ...


  Perhaps the most relevant reason: why on earth wouldn't a user want to
 run e.g. i2c list or i2c dev and get back a list of valid I2C
 adapters, as opposed to poking around in the dark to see which exist?


 Didn't you need also a list of devices on each i2c bus, if you use
 this argument?

 But for this reason we have in the new framework the i2c bus
 command, which shows all busses. This could be adapted in the DT case,
 to look, which buses really exist and print them. No need to do this
 at boottime!

 Also, in an old version of the multibus/multiadapter approach
 I made a option to add dynamically new i2c buses for example
 from the environment or from the i2c bus command ... maybe
 it is worth to think about such an option in the DT case?

 see here:
 http://git.denx.de/?p=u-boot/**u-boot-i2c.git;a=commit;h=**
 ccb680c8cf9002232bc459e4003e3b**47db5e1bf4http://git.denx.de/?p=u-boot/u-boot-i2c.git;a=commit;h=ccb680c8cf9002232bc459e4003e3b47db5e1bf4

 Patches welcome ;-)


  which fail? Also, the mapping from I2C bus number to register address is


 Hmm.. there are max TEGRA_I2C_NUM_CONTROLLERS. If one gets used,
 it scans the dt ... if only 1 adapter is used, only one is activated
 through i2c_init ...

  only created by actually scanning the whole DT; there's no need to every
 I2C DT node to have a /aliases entry that dictates its U-Boot device ID,
 so you really do have to scan everything completely up-front before you
 can determine which registers to use.


 But the i2c bus number is coded static all over the u-boot code (Should
 be changed) in the code. Saying a board has an i2c eeprom on bus 2,
 it calls i2c_set_bus_number(2) ... this 2 must be somewhere in the dt
 or?


 Yes, the 2 must come from DT, or DT is pointless. We simply have to


 Ok, puuh...


  get rid of all the hard-coding. If we can't do that, then I'd strongly
 prefer to revert all the DT mess, and put the list of HW modules back
 into the source code. DT isn't adding anything at all unless we can
 actually use it exclusively.

 Given how long this discussion is going on, can we please just revert
 the commit so that the code works for everyone who's trying to use it,
 then fix the problem later?


 Yes, but not reverting the hole commit, please just remove the
 i2c_init_board() call in i2c_init_all() and test it, and send a
 new patch, thanks!

 diff --git a/drivers/i2c/i2c_core.c b/drivers/i2c/i2c_core.c
 index d1072e8..5f10eb3 100644
 --- a/drivers/i2c/i2c_core.c
 +++ b/drivers/i2c/i2c_core.c
 @@ -246,7 +246,6 @@ void i2c_init_board(void)
   */
  void i2c_init_all(void)
  {
 -   i2c_init_board();
 i2c_set_bus_num(CONFIG_SYS_**SPD_BUS_NUM);
 return;
  }

 Or we make the init_func_i2c() function weak, and as the
 first step it is a dummy function, and boards which really need
 it, currently fail and must code it in board code? I would prefer
 this way, as it is anyway the goal to get rid of this function
 if all boards are using the new framework ...)

 Can you or Simon try this?

 @Simon:
 Hmm... just looking in an older version of the new framework...
 i2c_init_board() was from the beginning in i2c_init_all()... why
 didn't this poped up when you tested the tegra patches? Are there
 some changes in the DT/tegra code in the meantime?


I don't remember it listing all the devices. It was a very long time ago,
but when I sent my patch 

Re: [U-Boot] [PATCH V3 01/20] Add functions for use with i.mx6 otg udc

2013-08-02 Thread Troy Kisky

On 8/2/2013 3:48 AM, Marek Vasut wrote:

Dear Troy Kisky,


Add  functions for use with mx6 soc
void otg_enable(void);
void reset_usb_phy1(void);

Signed-off-by: Troy Kisky troy.ki...@boundarydevices.com
---
  arch/arm/cpu/armv7/mx6/soc.c  | 47
+++ arch/arm/include/asm/arch-mx6/crm_regs.h
|  3 ++
  arch/arm/include/asm/arch-mx6/imx-regs.h  | 17 +++
  arch/arm/include/asm/arch-mx6/sys_proto.h |  4 +++
  4 files changed, 71 insertions(+)

[...]


diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h
b/arch/arm/include/asm/arch-mx6/imx-regs.h index 5d6bccb..3eed4d8 100644
--- a/arch/arm/include/asm/arch-mx6/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
@@ -419,6 +419,23 @@ struct cspi_regs {
ECSPI5_BASE_ADDR
  #endif

+struct set_clr_tog {
+   u32 val;
+   u32 set;
+   u32 clr;
+   u32 tog;
+};
+
+struct usbphy {
+   struct set_clr_tog  pwd;
+   struct set_clr_tog  tx;
+   struct set_clr_tog  rx;
+   struct set_clr_tog  ctrl;
+};


Maybe you want to keep the naming here consistent with MX28 and MX6?

See arch/arm/include/asm/imx-common/regs-common.h

[...]

Best regards,
Marek Vasut


Wow,  arch/arm/include/asm/imx-common/regs-common.h
is damn ugly. I personally hate unions even when there is a very good 
reason.


Would you like to see me attempt to clean it up or do you like it the 
way it is

since your commit started the unions ?

Troy

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


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

2013-08-02 Thread Tom Rini
This detail belongs in the arch header file, given how we are structured
today at least.

Signed-off-by: Tom Rini tr...@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_OSCK 2400  /* Clock output from T2 */
+#define V_SCLK (V_OSCK)
+
 /* MAIN PLL Fdll = 550 MHz, by default */
 #ifndef CONFIG_SYS_MPUCLK
 #define CONFIG_SYS_MPUCLK  550
diff --git a/include/configs/igep0033.h b/include/configs/igep0033.h
index 12f28f8..28c7ae9 100644
--- a/include/configs/igep0033.h
+++ b/include/configs/igep0033.h
@@ -23,10 +23,6 @@
 #define MACH_TYPE_IGEP0033 4521/* Until the next sync */
 #define CONFIG_MACH_TYPE   MACH_TYPE_IGEP0033
 
-/* Clock defines */
-#define V_OSCK 2400  /* Clock output from T2 */
-#define V_SCLK (V_OSCK)
-
 /* DMA defines */
 #define CONFIG_DMA_COHERENT
 #define CONFIG_DMA_COHERENT_SIZE   (1  20)
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_OSCK 2500  /* Clock output from T2 */
-#define V_SCLK (V_OSCK)
-
 #define CONFIG_CMD_ECHO
 
 /* max number of command args */
diff --git a/include/configs/ti814x_evm.h b/include/configs/ti814x_evm.h
index eac5ad0..ceee43b 100644
--- a/include/configs/ti814x_evm.h
+++ b/include/configs/ti814x_evm.h
@@ -100,10 +100,6 @@
fi; \
fi; \
 
-/* Clock Defines */
-#define V_OSCK 2400/* Clock output from T2 */
-#define V_SCLK (V_OSCK  1)
-
 #define CONFIG_CMD_ECHO
 
 /* max number of command args */
-- 
1.7.9.5

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


[U-Boot] [PATCH 00/10] Introduce common config file for TI ARMv7 platforms

2013-08-02 Thread Tom Rini
Hey all,

The following series cleans up am335x a bit, and then uses that to
introduce a common config file that can be used on all of the ARMv7
platforms from TI.  This series converts am335x_evm, omap5_uevm and
dra7xx_evm to use the new structure.  There is room for further cleanup
and consolidation but as they are invasive patches I don't want to hold
these for too long.  This is on top of u-boot-arm/master.

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


[U-Boot] [PATCH 03/10] am33xx: Stop using PHYS_DRAM_1 define

2013-08-02 Thread Tom Rini
We defined PHYS_DRAM_1 to 0x8000 (start of DRAM) and then used this
for CONFIG_SYS_SDRAM_BASE.  But then we kept on referencing PHYS_DRAM_1
in other places.  Change to directly setting CONFIG_SYS_DRAM_BASE and
then using that name in code.

Signed-off-by: Tom Rini tr...@ti.com
---
 board/isee/igep0033/board.c  |2 +-
 board/phytec/pcm051/board.c  |2 +-
 board/ti/am335x/board.c  |2 +-
 board/ti/ti814x/evm.c|2 +-
 include/configs/igep0033.h   |3 +--
 include/configs/pcm051.h |5 ++---
 include/configs/ti814x_evm.h |5 ++---
 7 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/board/isee/igep0033/board.c b/board/isee/igep0033/board.c
index c0f0c0d..7a66e33 100644
--- a/board/isee/igep0033/board.c
+++ b/board/isee/igep0033/board.c
@@ -119,7 +119,7 @@ void s_init(void)
  */
 int board_init(void)
 {
-   gd-bd-bi_boot_params = PHYS_DRAM_1 + 0x100;
+   gd-bd-bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
gpmc_init();
 
diff --git a/board/phytec/pcm051/board.c b/board/phytec/pcm051/board.c
index 6291d03..77202f7 100644
--- a/board/phytec/pcm051/board.c
+++ b/board/phytec/pcm051/board.c
@@ -135,7 +135,7 @@ int board_init(void)
 {
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
 
-   gd-bd-bi_boot_params = PHYS_DRAM_1 + 0x100;
+   gd-bd-bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
return 0;
 }
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 728afc2..88663ea 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -371,7 +371,7 @@ int board_init(void)
STNOR_GPMC_CONFIG5, STNOR_GPMC_CONFIG6, STNOR_GPMC_CONFIG7 };
 #endif
 
-   gd-bd-bi_boot_params = PHYS_DRAM_1 + 0x100;
+   gd-bd-bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
gpmc_init();
 
diff --git a/board/ti/ti814x/evm.c b/board/ti/ti814x/evm.c
index c469645..26d2f9b 100644
--- a/board/ti/ti814x/evm.c
+++ b/board/ti/ti814x/evm.c
@@ -161,7 +161,7 @@ void s_init(void)
  */
 int board_init(void)
 {
-   gd-bd-bi_boot_params = PHYS_DRAM_1 + 0x100;
+   gd-bd-bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
return 0;
 }
 
diff --git a/include/configs/igep0033.h b/include/configs/igep0033.h
index e318c74..f520ef8 100644
--- a/include/configs/igep0033.h
+++ b/include/configs/igep0033.h
@@ -127,10 +127,9 @@
 
 /* Physical Memory Map */
 #define CONFIG_NR_DRAM_BANKS   1   /*  1 bank of DRAM */
-#define PHYS_DRAM_10x8000  /* DRAM Bank #1 */
 #define CONFIG_MAX_RAM_BANK_SIZE   (1024  20)/* 1GB */
 
-#define CONFIG_SYS_SDRAM_BASE  PHYS_DRAM_1
+#define CONFIG_SYS_SDRAM_BASE  0x8000
 #define CONFIG_SYS_INIT_SP_ADDR (NON_SECURE_SRAM_END - \
GENERATED_GBL_DATA_SIZE)
 /* Platform/Board specific defs */
diff --git a/include/configs/pcm051.h b/include/configs/pcm051.h
index 62ffc67..b182d50 100644
--- a/include/configs/pcm051.h
+++ b/include/configs/pcm051.h
@@ -118,7 +118,7 @@
  * memtest works on 8 MB in DRAM after skipping 32MB from
  * start addr of ram disk
  */
-#define CONFIG_SYS_MEMTEST_START   (PHYS_DRAM_1 + (64 * 1024 * 1024))
+#define CONFIG_SYS_MEMTEST_START   (CONFIG_SYS_SDRAM_BASE + (64  20))
 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START \
+ (8 * 1024 * 1024))
 
@@ -142,10 +142,9 @@
 
  /* Physical Memory Map */
 #define CONFIG_NR_DRAM_BANKS   1   /*  1 bank of DRAM */
-#define PHYS_DRAM_10x8000  /* DRAM Bank #1 */
 #define CONFIG_MAX_RAM_BANK_SIZE   (1024  19)/* 512MiB */
 
-#define CONFIG_SYS_SDRAM_BASE  PHYS_DRAM_1
+#define CONFIG_SYS_SDRAM_BASE  0x8000
 #define CONFIG_SYS_INIT_SP_ADDR (NON_SECURE_SRAM_END - \
GENERATED_GBL_DATA_SIZE)
  /* Platform/Board specific defs */
diff --git a/include/configs/ti814x_evm.h b/include/configs/ti814x_evm.h
index 2428f9d..daad14c 100644
--- a/include/configs/ti814x_evm.h
+++ b/include/configs/ti814x_evm.h
@@ -112,7 +112,7 @@
 /* Boot Argument Buffer Size */
 #define CONFIG_SYS_BARGSIZECONFIG_SYS_CBSIZE
 
-#define CONFIG_SYS_MEMTEST_START   PHYS_DRAM_1
+#define CONFIG_SYS_MEMTEST_START   CONFIG_SYS_SDRAM_BASE
 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START \
+ PHYS_DRAM_1_SIZE - (8  12))
 
@@ -132,11 +132,10 @@
  * Physical Memory Map
  */
 #define CONFIG_NR_DRAM_BANKS   1   /* 1 banks of DRAM */
-#define PHYS_DRAM_10x8000  /* DRAM Bank #1 */
 #define PHYS_DRAM_1_SIZE   0x2000  /* 512MB */
 #define CONFIG_MAX_RAM_BANK_SIZE   (1024  20)/* 1024MB */
 
-#define CONFIG_SYS_SDRAM_BASE  PHYS_DRAM_1
+#define CONFIG_SYS_SDRAM_BASE  0x8000
 #define 

[U-Boot] [PATCH 02/10] am33xx: CONFIG_DMA_COHERENT defines are unused, remove

2013-08-02 Thread Tom Rini
Signed-off-by: Tom Rini tr...@ti.com
---
 include/configs/igep0033.h   |4 
 include/configs/pcm051.h |3 ---
 include/configs/ti814x_evm.h |3 ---
 3 files changed, 10 deletions(-)

diff --git a/include/configs/igep0033.h b/include/configs/igep0033.h
index 28c7ae9..e318c74 100644
--- a/include/configs/igep0033.h
+++ b/include/configs/igep0033.h
@@ -23,10 +23,6 @@
 #define MACH_TYPE_IGEP0033 4521/* Until the next sync */
 #define CONFIG_MACH_TYPE   MACH_TYPE_IGEP0033
 
-/* DMA defines */
-#define CONFIG_DMA_COHERENT
-#define CONFIG_DMA_COHERENT_SIZE   (1  20)
-
 #define CONFIG_ENV_SIZE(128  10) /* 128 KiB */
 #define CONFIG_SYS_MALLOC_LEN  (1024  10)
 #define CONFIG_SYS_LONGHELP/* undef to save memory */
diff --git a/include/configs/pcm051.h b/include/configs/pcm051.h
index 7073501..62ffc67 100644
--- a/include/configs/pcm051.h
+++ b/include/configs/pcm051.h
@@ -24,9 +24,6 @@
 
 #include asm/arch/omap.h
 
-#define CONFIG_DMA_COHERENT
-#define CONFIG_DMA_COHERENT_SIZE   (1  20)
-
 #define CONFIG_ENV_SIZE(128  10) /* 128 KiB */
 #define CONFIG_SYS_MALLOC_LEN  (1024  10)
 #define CONFIG_SYS_LONGHELP/* undef to save memory */
diff --git a/include/configs/ti814x_evm.h b/include/configs/ti814x_evm.h
index ceee43b..2428f9d 100644
--- a/include/configs/ti814x_evm.h
+++ b/include/configs/ti814x_evm.h
@@ -23,9 +23,6 @@
 
 #include asm/arch/omap.h
 
-#define CONFIG_DMA_COHERENT
-#define CONFIG_DMA_COHERENT_SIZE   (1  20)
-
 #define CONFIG_ENV_SIZE(128  10) /* 128 KiB */
 #define CONFIG_SYS_MALLOC_LEN  (1024  10)
 #define CONFIG_SYS_LONGHELP/* undef to save memory */
-- 
1.7.9.5

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


[U-Boot] [PATCH 04/10] am335x_evm: Use default baud rate table

2013-08-02 Thread Tom Rini
Signed-off-by: Tom Rini tr...@ti.com
---
 include/configs/am335x_evm.h |2 --
 1 file changed, 2 deletions(-)

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index e32066d..7d755f1 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -314,8 +314,6 @@
 #define CONFIG_OMAP_GPIO
 
 #define CONFIG_BAUDRATE115200
-#define CONFIG_SYS_BAUDRATE_TABLE  { 110, 300, 600, 1200, 2400, \
-4800, 9600, 14400, 19200, 28800, 38400, 56000, 57600, 115200 }
 
 /* CPU */
 #define CONFIG_ARCH_CPU_INIT
-- 
1.7.9.5

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


[U-Boot] [PATCH 07/10] TI:am33xx: Create common config files for TI ARMv7 platforms, and AM33xx

2013-08-02 Thread Tom Rini
We create two new files, include/configs/ti_armv7_common.h for all of
the common IP blocks and related features / commands we share in
virtually all of our platforms.  We then create
include/configs/ti_am335x_common.h for everything common to the am335x
SoC leaving just the board specific parts to
include/configs/ti_am335x_common.h.

Signed-off-by: Tom Rini tr...@ti.com
---
 include/configs/am335x_evm.h   |  233 +++---
 include/configs/ti_am335x_common.h |   57 +
 include/configs/ti_armv7_common.h  |  247 
 3 files changed, 319 insertions(+), 218 deletions(-)
 create mode 100644 include/configs/ti_am335x_common.h
 create mode 100644 include/configs/ti_armv7_common.h

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 85c4632..e8f48ba 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -16,43 +16,16 @@
 #ifndef __CONFIG_AM335X_EVM_H
 #define __CONFIG_AM335X_EVM_H
 
-#define CONFIG_AM33XX
-#define CONFIG_OMAP
+#include configs/ti_am335x_common.h
 
-#include asm/arch/omap.h
-
-#define CONFIG_DMA_COHERENT
-#define CONFIG_DMA_COHERENT_SIZE   (1  20)
-
-#define CONFIG_ENV_SIZE(128  10) /* 128 KiB */
-#define CONFIG_SYS_MALLOC_LEN  (1024  10)
-#define CONFIG_SYS_LONGHELP/* undef to save memory */
-#define CONFIG_SYS_HUSH_PARSER /* use hush command parser */
-#define CONFIG_SYS_PROMPT  U-Boot# 
-#define CONFIG_BOARD_LATE_INIT
-#define CONFIG_SYS_NO_FLASH
 #define MACH_TYPE_TIAM335EVM   3589/* Until the next sync */
 #define CONFIG_MACH_TYPE   MACH_TYPE_TIAM335EVM
 
-#define CONFIG_OF_LIBFDT
-#define CONFIG_CMD_BOOTZ
-#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
-#define CONFIG_CMDLINE_EDITING
-#define CONFIG_STACKSIZE   (128 * 1024)
-#define CONFIG_AUTO_COMPLETE
-#define CONFIG_SETUP_MEMORY_TAGS
-#define CONFIG_INITRD_TAG
-
 /* Custom script for NOR */
 #define CONFIG_SYS_LDSCRIPTboard/ti/am335x/u-boot.lds
 
-#define CONFIG_SYS_CACHELINE_SIZE   64
-
-/* commands to include */
-#include config_cmd_default.h
-
-#define CONFIG_CMD_ASKENV
-#define CONFIG_VERSION_VARIABLE
+/* Always 128 KiB env size */
+#define CONFIG_ENV_SIZE(128  10)
 
 #ifdef CONFIG_NAND
 #define NANDARGS \
@@ -75,10 +48,8 @@
 #define NANDARGS 
 #endif
 
-/* set to negative value for no autoboot */
-#define CONFIG_BOOTDELAY   1
-#define CONFIG_ENV_VARS_UBOOT_CONFIG
 #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
+
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_EXTRA_ENV_SETTINGS \
loadaddr=0x8020\0 \
@@ -196,60 +167,11 @@
run mmcboot; \
run nandboot;
 
-/* Clock Defines */
-#define V_OSCK 2400  /* Clock output from T2 */
-#define V_SCLK (V_OSCK)
-
-#define CONFIG_CMD_ECHO
-
-/* We set the max number of command args high to avoid HUSH bugs. */
-#define CONFIG_SYS_MAXARGS 64
-
-/* Console I/O Buffer Size */
-#define CONFIG_SYS_CBSIZE  512
-
-/* Print Buffer Size */
-#define CONFIG_SYS_PBSIZE  (CONFIG_SYS_CBSIZE \
-   + sizeof(CONFIG_SYS_PROMPT) + 16)
-
-/* Boot Argument Buffer Size */
-#define CONFIG_SYS_BARGSIZECONFIG_SYS_CBSIZE
-
-/*
- * memtest works on 8 MB in DRAM after skipping 32MB from
- * start addr of ram disk
- */
-#define CONFIG_SYS_MEMTEST_START   (PHYS_DRAM_1 + (64 * 1024 * 1024))
-#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START \
-   + (8 * 1024 * 1024))
-
-#define CONFIG_SYS_LOAD_ADDR   0x8100 /* Default load address */
-
-#define CONFIG_MMC
-#define CONFIG_GENERIC_MMC
-#define CONFIG_OMAP_HSMMC
-#define CONFIG_CMD_MMC
-#define CONFIG_DOS_PARTITION
-#define CONFIG_CMD_FAT
-#define CONFIG_FAT_WRITE
-#define CONFIG_CMD_EXT2
-#define CONFIG_CMD_EXT4
-#define CONFIG_CMD_FS_GENERIC
-
-#define CONFIG_SPI
-#define CONFIG_OMAP3_SPI
-#define CONFIG_MTD_DEVICE
-#define CONFIG_SPI_FLASH
-#define CONFIG_SPI_FLASH_WINBOND
-#define CONFIG_CMD_SF
-#define CONFIG_SF_DEFAULT_SPEED(2400)
-
 /* USB Composite download gadget - g_dnl */
 #define CONFIG_USB_GADGET
 #define CONFIG_USBDOWNLOAD_GADGET
 
 /* USB TI's IDs */
-#define CONFIG_USBD_HS
 #define CONFIG_G_DNL_VENDOR_NUM 0x0403
 #define CONFIG_G_DNL_PRODUCT_NUM 0xBD00
 #define CONFIG_G_DNL_MANUFACTURER Texas Instruments
@@ -283,109 +205,24 @@
rootfs part 0 9
 #endif
 
- /* Physical Memory Map */
-#define CONFIG_NR_DRAM_BANKS   1   /*  1 bank of DRAM */
-#define PHYS_DRAM_10x8000  /* DRAM Bank #1 */
-#define CONFIG_MAX_RAM_BANK_SIZE   (1024  20)/* 1GB */
-
-#define CONFIG_SYS_SDRAM_BASE  PHYS_DRAM_1
-#define CONFIG_SYS_INIT_SP_ADDR (NON_SECURE_SRAM_END - \
-

[U-Boot] [PATCH 06/10] am335x_evm: Bring in 'boot_fdt' logic from i.MX

2013-08-02 Thread Tom Rini
Bring in the 'boot_fdt' environment variable that i.MX boards use to try
and load a device tree when booting.

Signed-off-by: Tom Rini tr...@ti.com
---
 include/configs/am335x_evm.h |   21 -
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 7d755f1..85c4632 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -84,6 +84,7 @@
loadaddr=0x8020\0 \
fdtaddr=0x80F8\0 \
fdt_high=0x\0 \
+   boot_fdt=try\0 \
rdaddr=0x8100\0 \
bootdir=/boot\0 \
bootfile=uImage\0 \
@@ -131,6 +132,20 @@
loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0 \
loaduimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0 \
loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0 \
+   mmcloados=run mmcargs;  \
+   if test ${boot_fdt} = yes || test ${boot_fdt} = try; then  \
+   if run loadfdt; then  \
+   bootm ${loadaddr} - ${fdtaddr};  \
+   else  \
+   if test ${boot_fdt} = try; then  \
+   bootm;  \
+   else  \
+   echo WARN: Cannot load the DT;  \
+   fi;  \
+   fi;  \
+   else  \
+   bootm;  \
+   fi;\0 \
mmcboot=mmc dev ${mmcdev};  \
if mmc rescan; then  \
echo SD/MMC found on device ${mmcdev}; \
@@ -142,11 +157,7 @@
echo Running uenvcmd ...; \
run uenvcmd; \
fi; \
-   if run loaduimage; then  \
-   run loadfdt; \
-   run mmcargs;  \
-   bootm ${loadaddr} - ${fdtaddr}; \
-   fi; \
+   run mmcloados; \
fi;\0 \
spiboot=echo Booting from spi ...;  \
run spiargs;  \
-- 
1.7.9.5

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


[U-Boot] [PATCH 05/10] arm: spl: For Falcon Mode, set a default machid of ~0

2013-08-02 Thread Tom Rini
With device trees, boards do not always set CONFIG_MACH_TYPE now, so we
must not rely on this define being set.  The kernel uses ~0 to see if we
have a valid machine number or not, so set that as the default, invalid
machine, id and only fix if CONFIG_MACH_TYPE is set.

Cc: Albert ARIBAUD albert.u.b...@aribaud.net
Signed-off-by: Tom Rini tr...@ti.com
---
 arch/arm/lib/spl.c |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c
index 583bdb3..26d0be4 100644
--- a/arch/arm/lib/spl.c
+++ b/arch/arm/lib/spl.c
@@ -45,12 +45,17 @@ void __weak board_init_f(ulong dummy)
 #ifdef CONFIG_SPL_OS_BOOT
 void __noreturn jump_to_image_linux(void *arg)
 {
+   unsigned long machid = 0x;
+#ifdef CONFIG_MACH_TYPE
+   machid = CONFIG_MACH_TYPE;
+#endif
+
debug(Entering kernel arg pointer: 0x%p\n, arg);
typedef void (*image_entry_arg_t)(int, int, void *)
__attribute__ ((noreturn));
image_entry_arg_t image_entry =
(image_entry_arg_t) spl_image.entry_point;
cleanup_before_linux();
-   image_entry(0, CONFIG_MACH_TYPE, arg);
+   image_entry(0, machid, arg);
 }
 #endif
-- 
1.7.9.5

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


[U-Boot] [PATCH 10/10] TI:armv7: Enable CONFIG_CMD_GPIO

2013-08-02 Thread Tom Rini
Add the generic poke a GPIO command, with the GPIO related defines.

Signed-off-by: Tom Rini tr...@ti.com
---
 include/configs/ti_armv7_common.h |1 +
 1 file changed, 1 insertion(+)

diff --git a/include/configs/ti_armv7_common.h 
b/include/configs/ti_armv7_common.h
index 88ed85c..dc3ff7c 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -79,6 +79,7 @@
 
 /* GPIO block */
 #define CONFIG_OMAP_GPIO
+#define CONFIG_CMD_GPIO
 
 /*
  * GPMC NAND block.  We support 1 device and the physical address to
-- 
1.7.9.5

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


[U-Boot] [PATCH 08/10] TI:omap5: Convert to ti_armv7_common.h

2013-08-02 Thread Tom Rini
Update omap5_common.h to use ti_armv7_common.h, and in turn update
dra7xx_evm.h and omap5_uevm.h slightly.  The biggest changes here are
that IP blocks which exist on the platform, and had clocks enabled,
now have the drivers being built as well.

Signed-off-by: Tom Rini tr...@ti.com
---
 include/configs/dra7xx_evm.h   |   11 +--
 include/configs/omap5_common.h |  188 +---
 include/configs/omap5_uevm.h   |8 +-
 3 files changed, 31 insertions(+), 176 deletions(-)

diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index 51be73d..58786ff 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -12,21 +12,18 @@
 #ifndef __CONFIG_DRA7XX_EVM_H
 #define __CONFIG_DRA7XX_EVM_H
 
-/* High Level Configuration Options */
-#define CONFIG_DRA7XX  /* in a TI DRA7XX core */
-#define CONFIG_ENV_IS_NOWHERE  /* For now. */
-
-#include configs/omap5_common.h
+#define CONFIG_DRA7XX
 
-#define CONFIG_SYS_PROMPT  DRA752 EVM # 
+#define CONFIG_ENV_IS_NOWHERE  /* For now. */
 
+#define CONSOLEDEV ttyO0
 #define CONFIG_CONS_INDEX  1
 #define CONFIG_SYS_NS16550_COM1UART1_BASE
 #define CONFIG_BAUDRATE115200
 
 #define CONFIG_SYS_OMAP_ABE_SYSCK
 
-#define CONSOLEDEV ttyO0
+#include configs/omap5_common.h
 
 /* CPSW Ethernet */
 #define CONFIG_CMD_NET
diff --git a/include/configs/omap5_common.h b/include/configs/omap5_common.h
index 7dd56cf..469a081 100644
--- a/include/configs/omap5_common.h
+++ b/include/configs/omap5_common.h
@@ -14,106 +14,51 @@
 #ifndef __CONFIG_OMAP5_COMMON_H
 #define __CONFIG_OMAP5_COMMON_H
 
-/*
- * High Level Configuration Options
- */
-#define CONFIG_OMAP/* in a TI OMAP core */
-#define CONFIG_OMAP54XX/* which is a 54XX */
-#define CONFIG_OMAP_GPIO
-
-/* Get CPU defs */
-#include asm/arch/cpu.h
-#include asm/arch/omap.h
-
-/* Display CPU and Board Info */
+#define CONFIG_OMAP54XX
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO
-
 #define CONFIG_MISC_INIT_R
+#define CONFIG_ARCH_CPU_INIT
 
-#define CONFIG_OF_LIBFDT
-#define CONFIG_CMD_BOOTZ
+#define CONFIG_SYS_CACHELINE_SIZE  64
 
-#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
-#define CONFIG_SETUP_MEMORY_TAGS
-#define CONFIG_INITRD_TAG
+/* Use General purpose timer 1 */
+#define CONFIG_SYS_TIMERBASE   GPT2_BASE
+
+#define CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS
+
+/* Defines for SDRAM init */
+#ifndef CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS
+#define CONFIG_SYS_AUTOMATIC_SDRAM_DETECTION
+#define CONFIG_SYS_DEFAULT_LPDDR2_TIMINGS
+#endif
+
+#ifndef CONFIG_SPL_BUILD
+#define CONFIG_PALMAS_POWER
+#endif
+
+#include asm/arch/cpu.h
+#include asm/arch/omap.h
 
-/*
- * Size of malloc() pool
- * Total Size Environment - 128k
- * Malloc - add 256k
- */
 #define CONFIG_ENV_SIZE(128  10)
-#define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + (256  10))
-/* Vector Base */
-#define CONFIG_SYS_CA9_VECTOR_BASE SRAM_ROM_VECT_BASE
 
-/*
- * Hardware drivers
- */
+#include configs/ti_armv7_common.h
 
 /*
- * serial port - NS16550 compatible
+ * Hardware drivers
  */
-#define V_NS16550_CLK  4800
-
 #define CONFIG_SYS_NS16550
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE(-4)
-#define CONFIG_SYS_NS16550_CLK V_NS16550_CLK
-
-/* CPU */
-#define CONFIG_ARCH_CPU_INIT
-
-/* I2C  */
-#define CONFIG_HARD_I2C
-#define CONFIG_SYS_I2C_SPEED   10
-#define CONFIG_SYS_I2C_SLAVE   1
-#define CONFIG_DRIVER_OMAP34XX_I2C
-#define CONFIG_I2C_MULTI_BUS
-
-/* MMC */
-#define CONFIG_GENERIC_MMC
-#define CONFIG_MMC
-#define CONFIG_OMAP_HSMMC
-#define CONFIG_DOS_PARTITION
-
-#define CONFIG_SYS_CONSOLE_IS_IN_ENV
-
-/* Flash */
-#define CONFIG_SYS_NO_FLASH
-
-/* Cache */
-#define CONFIG_SYS_CACHELINE_SIZE  64
-#define CONFIG_SYS_CACHELINE_SHIFT 6
+#define CONFIG_SYS_NS16550_CLK 4800
 
-/* commands to include */
-#include config_cmd_default.h
-
-/* Enabled commands */
-#define CONFIG_CMD_EXT2/* EXT2 Support */
-#define CONFIG_CMD_FAT /* FAT support  */
-#define CONFIG_CMD_I2C /* I2C serial bus support   */
-#define CONFIG_CMD_MMC /* MMC support  */
-
-/* Disabled commands */
+/* Per-SoC commands */
 #undef CONFIG_CMD_NET
 #undef CONFIG_CMD_NFS
-#undef CONFIG_CMD_FPGA /* FPGA configuration Support   */
-#undef CONFIG_CMD_IMLS /* List all found images*/
 
 /*
  * Environment setup
  */
-
-#define CONFIG_BOOTDELAY   3
-#define CONFIG_ENV_VARS_UBOOT_CONFIG
-#define CONFIG_CMD_FS_GENERIC
-#define CONFIG_CMD_EXT2
-#define CONFIG_CMD_EXT4
-
-#define CONFIG_ENV_OVERWRITE
-
 #ifndef PARTS_DEFAULT
 #define PARTS_DEFAULT
 #endif
@@ -178,96 +123,11 @@
fi;  \
fi
 
-#define 

[U-Boot] [PATCH 09/10] TI:armv7: Enable CONFIG_CMD_SPI

2013-08-02 Thread Tom Rini
Add the generic poke the SPI bus command, with the SPI related
defines.

Signed-off-by: Tom Rini tr...@ti.com
---
 include/configs/ti_armv7_common.h |1 +
 1 file changed, 1 insertion(+)

diff --git a/include/configs/ti_armv7_common.h 
b/include/configs/ti_armv7_common.h
index 0734598..88ed85c 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -75,6 +75,7 @@
 /* McSPI IP block */
 #define CONFIG_SPI
 #define CONFIG_OMAP3_SPI
+#define CONFIG_CMD_SPI
 
 /* GPIO block */
 #define CONFIG_OMAP_GPIO
-- 
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 v3 8/9] tegra: i2c: Enable new CONFIG_SYS_I2C framework

2013-08-02 Thread Stephen Warren
On 08/01/2013 10:40 PM, Heiko Schocher wrote:
 Am 01.08.2013 22:32, schrieb Stephen Warren:
...
 Given how long this discussion is going on, can we please just revert
 the commit so that the code works for everyone who's trying to use it,
 then fix the problem later?
 
 Yes, but not reverting the hole commit, please just remove the
 i2c_init_board() call in i2c_init_all() and test it, and send a
 new patch, thanks!
 
 diff --git a/drivers/i2c/i2c_core.c b/drivers/i2c/i2c_core.c
 index d1072e8..5f10eb3 100644
 --- a/drivers/i2c/i2c_core.c
 +++ b/drivers/i2c/i2c_core.c
 @@ -246,7 +246,6 @@ void i2c_init_board(void)
   */
  void i2c_init_all(void)
  {
 -   i2c_init_board();
 i2c_set_bus_num(CONFIG_SYS_SPD_BUS_NUM);
 return;
  }

That change doesn't work. Instead of hanging immediately after printing
I2C:, it hangs after printing:

I2C:   Caller requested bad clock: periph=-49, parent=2

I guess now various data is simply uninitialized since DT parsing hasn't
been run at all?

This is exactly why I suggest a full revert of the problematic patch. If
we do that, it should immediately allow all Tegra boards to actually
work again. Right now, nobody can use or test u-boot.git/master is
completely blocked by this issue. This is dangerous, since it could
easily allow all manner of other problems to appear in other areas
without anyone being able to notice. It's my opinion we should
immediately unblock them by a revert, and then later work out how to
resolve the issues.

For the record, git revert 1f2ba722ac06393d6abe6d4734824d3b98ea9108
has one simple conflict in README, and certainly allows at least Beaver
to work without issue.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2 REPOST 1/9] Validate dtc is new enough

2013-08-02 Thread Stephen Warren
On 07/24/2013 11:09 AM, Stephen Warren wrote:
 From: Stephen Warren swar...@nvidia.com
 
 Subsequent patches assume that dtc supports various recent features.
 These are available in dtc 1.4.0. Validate that dtc is at least that
 version.

Tom, do these patches look good?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V3 01/20] Add functions for use with i.mx6 otg udc

2013-08-02 Thread Marek Vasut
Dear Troy Kisky,

 On 8/2/2013 3:48 AM, Marek Vasut wrote:
  Dear Troy Kisky,
  
  Add  functions for use with mx6 soc
  void otg_enable(void);
  void reset_usb_phy1(void);
  
  Signed-off-by: Troy Kisky troy.ki...@boundarydevices.com
  ---
  
arch/arm/cpu/armv7/mx6/soc.c  | 47
  
  +++ arch/arm/include/asm/arch-mx6/crm_regs.h
  
  |  3 ++

arch/arm/include/asm/arch-mx6/imx-regs.h  | 17 +++
arch/arm/include/asm/arch-mx6/sys_proto.h |  4 +++
4 files changed, 71 insertions(+)
  
  [...]
  
  diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h
  b/arch/arm/include/asm/arch-mx6/imx-regs.h index 5d6bccb..3eed4d8 100644
  --- a/arch/arm/include/asm/arch-mx6/imx-regs.h
  +++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
  @@ -419,6 +419,23 @@ struct cspi_regs {
  
 ECSPI5_BASE_ADDR

#endif
  
  +struct set_clr_tog {
  +  u32 val;
  +  u32 set;
  +  u32 clr;
  +  u32 tog;
  +};
  +
  +struct usbphy {
  +  struct set_clr_tog  pwd;
  +  struct set_clr_tog  tx;
  +  struct set_clr_tog  rx;
  +  struct set_clr_tog  ctrl;
  +};
  
  Maybe you want to keep the naming here consistent with MX28 and MX6?
  
  See arch/arm/include/asm/imx-common/regs-common.h
  
  [...]
  
  Best regards,
  Marek Vasut
 
 Wow,  arch/arm/include/asm/imx-common/regs-common.h
 is damn ugly. I personally hate unions even when there is a very good
 reason.
 
 Would you like to see me attempt to clean it up or do you like it the
 way it is
 since your commit started the unions ?

I think it works perfectly well and does exactly what it's supposed to do. 
What's your problem with the file?

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 V3 01/20] Add functions for use with i.mx6 otg udc

2013-08-02 Thread Troy Kisky

On 8/2/2013 3:10 PM, Marek Vasut wrote:

Dear Troy Kisky,


On 8/2/2013 3:48 AM, Marek Vasut wrote:

Dear Troy Kisky,


Add  functions for use with mx6 soc
void otg_enable(void);
void reset_usb_phy1(void);

Signed-off-by: Troy Kisky troy.ki...@boundarydevices.com
---

   arch/arm/cpu/armv7/mx6/soc.c  | 47

+++ arch/arm/include/asm/arch-mx6/crm_regs.h

|  3 ++
   
   arch/arm/include/asm/arch-mx6/imx-regs.h  | 17 +++

   arch/arm/include/asm/arch-mx6/sys_proto.h |  4 +++
   4 files changed, 71 insertions(+)

[...]


diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h
b/arch/arm/include/asm/arch-mx6/imx-regs.h index 5d6bccb..3eed4d8 100644
--- a/arch/arm/include/asm/arch-mx6/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
@@ -419,6 +419,23 @@ struct cspi_regs {

ECSPI5_BASE_ADDR
   
   #endif


+struct set_clr_tog {
+   u32 val;
+   u32 set;
+   u32 clr;
+   u32 tog;
+};
+
+struct usbphy {
+   struct set_clr_tog  pwd;
+   struct set_clr_tog  tx;
+   struct set_clr_tog  rx;
+   struct set_clr_tog  ctrl;
+};

Maybe you want to keep the naming here consistent with MX28 and MX6?

See arch/arm/include/asm/imx-common/regs-common.h

[...]

Best regards,
Marek Vasut

Wow,  arch/arm/include/asm/imx-common/regs-common.h
is damn ugly. I personally hate unions even when there is a very good
reason.

Would you like to see me attempt to clean it up or do you like it the
way it is
since your commit started the unions ?

I think it works perfectly well and does exactly what it's supposed to do.
What's your problem with the file?

Best regards,
Marek Vasut



Why is there a union ? It looks to me like you just want to access the 
same variable

with 2 naming strategies.

Troy

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


Re: [U-Boot] [PATCH V2 REPOST 1/9] Validate dtc is new enough

2013-08-02 Thread Tom Rini
On Fri, Aug 02, 2013 at 04:23:37PM -0600, Stephen Warren wrote:
 On 07/24/2013 11:09 AM, Stephen Warren wrote:
  From: Stephen Warren swar...@nvidia.com
  
  Subsequent patches assume that dtc supports various recent features.
  These are available in dtc 1.4.0. Validate that dtc is at least that
  version.
 
 Tom, do these patches look good?

So, Albert, Tom W, are we OK with some machines (say the 'tegra' SoCs
for example) not building on some distros, until / unless the developer
updates their dtc package?

-- 
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 V3 01/20] Add functions for use with i.mx6 otg udc

2013-08-02 Thread Marek Vasut
Dear Troy Kisky,

 On 8/2/2013 3:10 PM, Marek Vasut wrote:
  Dear Troy Kisky,
  
  On 8/2/2013 3:48 AM, Marek Vasut wrote:
  Dear Troy Kisky,
  
  Add  functions for use with mx6 soc
  void otg_enable(void);
  void reset_usb_phy1(void);
  
  Signed-off-by: Troy Kisky troy.ki...@boundarydevices.com
  ---
  
 arch/arm/cpu/armv7/mx6/soc.c  | 47
  
  +++
  arch/arm/include/asm/arch-mx6/crm_regs.h
  
  |  3 ++
  |  
 arch/arm/include/asm/arch-mx6/imx-regs.h  | 17 +++
 arch/arm/include/asm/arch-mx6/sys_proto.h |  4 +++
 4 files changed, 71 insertions(+)
  
  [...]
  
  diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h
  b/arch/arm/include/asm/arch-mx6/imx-regs.h index 5d6bccb..3eed4d8
  100644 --- a/arch/arm/include/asm/arch-mx6/imx-regs.h
  +++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
  @@ -419,6 +419,23 @@ struct cspi_regs {
  
   ECSPI5_BASE_ADDR
 
 #endif
  
  +struct set_clr_tog {
  +u32 val;
  +u32 set;
  +u32 clr;
  +u32 tog;
  +};
  +
  +struct usbphy {
  +struct set_clr_tog  pwd;
  +struct set_clr_tog  tx;
  +struct set_clr_tog  rx;
  +struct set_clr_tog  ctrl;
  +};
  
  Maybe you want to keep the naming here consistent with MX28 and MX6?
  
  See arch/arm/include/asm/imx-common/regs-common.h
  
  [...]
  
  Best regards,
  Marek Vasut
  
  Wow,  arch/arm/include/asm/imx-common/regs-common.h
  is damn ugly. I personally hate unions even when there is a very good
  reason.
  
  Would you like to see me attempt to clean it up or do you like it the
  way it is
  since your commit started the unions ?
  
  I think it works perfectly well and does exactly what it's supposed to
  do. What's your problem with the file?
  
  Best regards,
  Marek Vasut
 
 Why is there a union ? It looks to me like you just want to access the
 same variable
 with 2 naming strategies.

That is correct. I can either pass it further into functions as the struct 
mxs_register_32 name_reg or I can directly access it as name_set/_clr/_tog . 
Works just fine.

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 V3 01/20] Add functions for use with i.mx6 otg udc

2013-08-02 Thread Troy Kisky

On 8/2/2013 6:45 PM, Marek Vasut wrote:

Dear Troy Kisky,


On 8/2/2013 3:10 PM, Marek Vasut wrote:

Dear Troy Kisky,


On 8/2/2013 3:48 AM, Marek Vasut wrote:

Dear Troy Kisky,


Add  functions for use with mx6 soc
void otg_enable(void);
void reset_usb_phy1(void);

Signed-off-by: Troy Kisky troy.ki...@boundarydevices.com
---

arch/arm/cpu/armv7/mx6/soc.c  | 47

+++
arch/arm/include/asm/arch-mx6/crm_regs.h

|  3 ++
|
arch/arm/include/asm/arch-mx6/imx-regs.h  | 17 +++
arch/arm/include/asm/arch-mx6/sys_proto.h |  4 +++
4 files changed, 71 insertions(+)

[...]


diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h
b/arch/arm/include/asm/arch-mx6/imx-regs.h index 5d6bccb..3eed4d8
100644 --- a/arch/arm/include/asm/arch-mx6/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
@@ -419,6 +419,23 @@ struct cspi_regs {

ECSPI5_BASE_ADDR

#endif


+struct set_clr_tog {
+   u32 val;
+   u32 set;
+   u32 clr;
+   u32 tog;
+};
+
+struct usbphy {
+   struct set_clr_tog  pwd;
+   struct set_clr_tog  tx;
+   struct set_clr_tog  rx;
+   struct set_clr_tog  ctrl;
+};

Maybe you want to keep the naming here consistent with MX28 and MX6?

See arch/arm/include/asm/imx-common/regs-common.h

[...]

Best regards,
Marek Vasut

Wow,  arch/arm/include/asm/imx-common/regs-common.h
is damn ugly. I personally hate unions even when there is a very good
reason.

Would you like to see me attempt to clean it up or do you like it the
way it is
since your commit started the unions ?

I think it works perfectly well and does exactly what it's supposed to
do. What's your problem with the file?

Best regards,
Marek Vasut

Why is there a union ? It looks to me like you just want to access the
same variable
with 2 naming strategies.

That is correct. I can either pass it further into functions as the struct
mxs_register_32 name_reg or I can directly access it as name_set/_clr/_tog .
Works just fine.


I never said it didn't work, obviously it does.



Best regards,
Marek Vasut

There may be code that you can point at that would make this useful, but 
I have
a hard time envisioning it. The code I added, I know doesn't need a 
union, and I bet most
of the other variable accesses don't need a union. That's why I asked if 
you'd like
me to attempt to clean it up (always access thru struct, ie replace 
name_set with name.set).


I don't want to change the code I added to use this.
I can see a small advantage in consistency with the mx28.


Troy

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


Re: [U-Boot] [PATCH v3 8/9] tegra: i2c: Enable new CONFIG_SYS_I2C framework

2013-08-02 Thread Heiko Schocher

Hello Stephen,

Am 02.08.2013 23:43, schrieb Stephen Warren:

On 08/01/2013 10:40 PM, Heiko Schocher wrote:

Am 01.08.2013 22:32, schrieb Stephen Warren:

...

Given how long this discussion is going on, can we please just revert
the commit so that the code works for everyone who's trying to use it,
then fix the problem later?


Yes, but not reverting the hole commit, please just remove the
i2c_init_board() call in i2c_init_all() and test it, and send a
new patch, thanks!

diff --git a/drivers/i2c/i2c_core.c b/drivers/i2c/i2c_core.c
index d1072e8..5f10eb3 100644
--- a/drivers/i2c/i2c_core.c
+++ b/drivers/i2c/i2c_core.c
@@ -246,7 +246,6 @@ void i2c_init_board(void)
   */
  void i2c_init_all(void)
  {
-   i2c_init_board();
 i2c_set_bus_num(CONFIG_SYS_SPD_BUS_NUM);
 return;
  }


That change doesn't work. Instead of hanging immediately after printing
I2C:, it hangs after printing:

I2C:   Caller requested bad clock: periph=-49, parent=2

I guess now various data is simply uninitialized since DT parsing hasn't
been run at all?


I do not know this ... and what happen if you make init_func_i2c()
weak and default just dummy?


This is exactly why I suggest a full revert of the problematic patch. If
we do that, it should immediately allow all Tegra boards to actually
work again. Right now, nobody can use or test u-boot.git/master is


nobody = only tegra boards ... I am working fine with current mainline
on other arm targets ...


completely blocked by this issue. This is dangerous, since it could
easily allow all manner of other problems to appear in other areas
without anyone being able to notice. It's my opinion we should
immediately unblock them by a revert, and then later work out how to
resolve the issues.

For the record, git revert 1f2ba722ac06393d6abe6d4734824d3b98ea9108
has one simple conflict in README, and certainly allows at least Beaver
to work without issue.


Ah, you mean only the switch from the tegra i2c driver to the new
framework ... Hmm.. Ok, but I would prefer the way fixing the
current problem ... as I think, nobody want to do this work again ...

But it is alberts descicion on the end, and if nobody has currently
time for searching the real reason, the best way.

bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/2] fsl_i2c: generate nine pulses on SCL if the I2C bus is hung

2013-08-02 Thread Heiko Schocher

Hello Chunhe,

Am 01.08.2013 10:07, schrieb Chunhe Lan:

When the code detected that the bus is hung (e.g. SDA stuck low),
send 9 pulses on SCL to try to fixup the bus.

Signed-off-by: Zhao Chenhuichenhui.z...@freescale.com
Signed-off-by: Chunhe Lanchunhe@freescale.com
Cc: Scott Woodscottw...@freescale.com
---
  drivers/i2c/fsl_i2c.c |   58 +++-
  1 files changed, 56 insertions(+), 2 deletions(-)


Patch does not aplly clean to current mainline, please
resubmit. Thanks!

bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 2/2] fsl_i2c: add workaround for the erratum I2C A004447

2013-08-02 Thread Heiko Schocher

Hello  Chunhe,

Am 01.08.2013 10:07, schrieb Chunhe Lan:

This workaround is for the erratum I2C A004447. Device reference
manual provides a scheme that allows the I2C master controller
to generate nine SCL pulses, which enable an I2C slave device
that held SDA low to release SDA. However, due to this erratum,
this scheme no longer works. In addition, when I2C is used as
a source of the PBL, the state machine is not able to recover.

At the same time, delete the reduplicative definition of SVR_VER
and SVR_REV. The SVR_REV is the low 8 bits rather than the low 16
bits of svr. And we use the CONFIG_SYS_FSL_A004447_SVR_REV macro
instead of hard-code value 0x10, 0x11 and 0x20.

The CONFIG_SYS_FSL_A004447_SVR_REV = 0x00 represents that one
version of platform has this I2C errata. So enable this errata
by IS_SVR_REV(svr, maj, min) function.

Signed-off-by: Zhao Chenhuichenhui.z...@freescale.com
Signed-off-by: Chunhe Lanchunhe@freescale.com
Cc: Scott Woodscottw...@freescale.com
---
  arch/powerpc/cpu/mpc85xx/cmd_errata.c |5 +
  arch/powerpc/include/asm/config_mpc85xx.h |   16 
  arch/powerpc/include/asm/fsl_i2c.h|1 +
  arch/powerpc/include/asm/processor.h  |5 +
  drivers/i2c/fsl_i2c.c |   14 +++---
  5 files changed, 34 insertions(+), 7 deletions(-)


Patch does not aplly clean to current mainline, please
resubmit. Thanks!

bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] i2c: soft: Fix typo in CONFIG_SYS_I2C_SOFT_SPEED

2013-08-02 Thread Heiko Schocher

Hello Marek,

Am 01.08.2013 12:32, schrieb Marek Vasut:

In case only the CONFIG_SYS_I2C_SPEED is set in configuration file,
the CONFIG_SYS_I2C_SOFT_SPEED is defined as CONFIG_SYS_I2C_SPEED.
The CONFIG_SYS_I2C_SOFT_SPEED is then used throughout the driver.

Unfortunatelly, due to a typo in the driver, instead of defining
CONFIG_SYS_I2C_SOFT_SPEED, an CONFIG_SYS_SOFT_I2C_SPEED was defined
and therefore the driver failed to compile. The same applies for
CONFIG_SYS_I2C_SOFT_SLAVE , where the swap happens as well.

This patch fixes the issue.

Signed-off-by: Marek Vasutma...@denx.de
Cc: Heiko Schocherh...@denx.de
---
  drivers/i2c/soft_i2c.c   |8 
  include/configs/blackstamp.h |4 ++--
  2 files changed, 6 insertions(+), 6 deletions(-)

V2: Fix blackstamp board too


Thanks! Applied to u-boot-i2c master

bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [i2c] Pull request

2013-08-02 Thread Heiko Schocher

Hello Tom,

please pull from u-boot-i2c

The following changes since commit 245d65b6e503f3a159cffb3392ac3b2c25606d8e:

  Merge branch 'master' of git://git.denx.de/u-boot-usb (2013-08-01 09:19:28 
-0400)

are available in the git repository at:


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

for you to fetch changes up to 90f002a90f5ac9087737fbc9e781f3519e011f28:

  i2c: soft: Fix typo in CONFIG_SYS_I2C_SOFT_SPEED (2013-08-03 06:01:18 +0200)


Marek Vasut (1):
  i2c: soft: Fix typo in CONFIG_SYS_I2C_SOFT_SPEED

 drivers/i2c/soft_i2c.c   | 8 
 include/configs/blackstamp.h | 4 ++--
 2 Dateien geändert, 6 Zeilen hinzugefügt(+), 6 Zeilen entfernt(-)

Thanks.

bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2013-08-02 Thread Heiko Schocher

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_OSCK 2400  /* 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_MPUCLK 550

[...]

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_OSCK 2500  /* Clock output from T2 */
-#define V_SCLK (V_OSCK)
-


... this defines 2500 not 2400 for V_OSCK ...


  #define CONFIG_CMD_ECHO

  /* max number of command args */
diff --git a/include/configs/ti814x_evm.h b/include/configs/ti814x_evm.h
index eac5ad0..ceee43b 100644
--- a/include/configs/ti814x_evm.h
+++ b/include/configs/ti814x_evm.h
@@ -100,10 +100,6 @@
fi; \
fi; \

-/* Clock Defines */
-#define V_OSCK 2400/* Clock output from T2 */
-#define V_SCLK (V_OSCK  1)
-
  #define CONFIG_CMD_ECHO

  /* max number of command args */


bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 00/10] Introduce common config file for TI ARMv7 platforms

2013-08-02 Thread Heiko Schocher

Hello Tom,

Am 02.08.2013 22:26, schrieb Tom Rini:

Hey all,

The following series cleans up am335x a bit, and then uses that to
introduce a common config file that can be used on all of the ARMv7
platforms from TI.  This series converts am335x_evm, omap5_uevm and
dra7xx_evm to use the new structure.  There is room for further cleanup
and consolidation but as they are invasive patches I don't want to hold
these for too long.  This is on top of u-boot-arm/master.


I posted support for three am335x based boards from siemens, see here:

http://patchwork.ozlabs.org/patch/263211/

The adaptions you made in your patchset are missing there now ...
How to proceed?

bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/7] video, da8xx: move da8xx-fb.h to drivers/video

2013-08-02 Thread Heiko Schocher
the da8xx-fb driver works also on am335x boards. So move
the da8xx-fb.h file from arch/arm/include/asm/arch-davinci
to drivers/video, so this driver can used from am335x
based boards. Also add WVGA panel_type.

Signed-off-by: Heiko Schocher h...@denx.de
Cc: Stefano Babic sba...@denx.de
Cc: Anatolij Gustschin ag...@denx.de
Cc: Tom Rini tr...@ti.com
---
 board/davinci/ea20/ea20.c   | 2 +-
 drivers/video/da8xx-fb.c| 2 +-
 {arch/arm/include/asm/arch-davinci = drivers/video}/da8xx-fb.h | 3 ++-
 3 Dateien geändert, 4 Zeilen hinzugefügt(+), 3 Zeilen entfernt(-)
 rename {arch/arm/include/asm/arch-davinci = drivers/video}/da8xx-fb.h (99%)

diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c
index c786997..89ee079 100644
--- a/board/davinci/ea20/ea20.c
+++ b/board/davinci/ea20/ea20.c
@@ -24,7 +24,7 @@
 #include asm/io.h
 #include asm/arch/davinci_misc.h
 #include asm/gpio.h
-#include asm/arch/da8xx-fb.h
+#include ../../../drivers/video/da8xx-fb.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index 373991d..dd7ce36 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -24,7 +24,7 @@
 #include asm/arch/hardware.h
 
 #include videomodes.h
-#include asm/arch/da8xx-fb.h
+#include da8xx-fb.h
 
 #define DRIVER_NAME da8xx_lcdc
 
diff --git a/arch/arm/include/asm/arch-davinci/da8xx-fb.h 
b/drivers/video/da8xx-fb.h
similarity index 99%
rename from arch/arm/include/asm/arch-davinci/da8xx-fb.h
rename to drivers/video/da8xx-fb.h
index c115034..f48fdfd 100644
--- a/arch/arm/include/asm/arch-davinci/da8xx-fb.h
+++ b/drivers/video/da8xx-fb.h
@@ -17,7 +17,8 @@
 #define DA8XX_FB_H
 
 enum panel_type {
-   QVGA = 0
+   QVGA = 0,
+   WVGA
 };
 
 enum panel_shade {
-- 
1.7.11.7

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


[U-Boot] [PATCH 4/7] video, da8xx-fb: changes for am335x usage

2013-08-02 Thread Heiko Schocher
to use this driver also on am335x based boards, the following
changes are made:

- struct lcd_ctrl_config lcd_cfg is now configurable
  through board code

- controller base is configurable through define
  DA8XX_LCD_CNTL_BASE. To be compatible with older
  da8xx based boards: If this define is missing, the
  DAVINCI_LCD_CNTL_BASE is used

- Determine LCD IP Version, and make the driver
  working on lcd revision register values:
  Version 1:
  0x4C100102
  Version 2:
  0x4F200800
  0x4F201000

Signed-off-by: Heiko Schocher h...@denx.de
Cc: Stefano Babic sba...@denx.de
Cc: Anatolij Gustschin ag...@denx.de
Cc: Tom Rini tr...@ti.com
---
 board/davinci/ea20/ea20.c |  26 +++-
 drivers/video/da8xx-fb.c  | 335 ++
 drivers/video/da8xx-fb.h  |   4 +-
 3 Dateien geändert, 307 Zeilen hinzugefügt(+), 58 Zeilen entfernt(-)

diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c
index 89ee079..cc7 100644
--- a/board/davinci/ea20/ea20.c
+++ b/board/davinci/ea20/ea20.c
@@ -43,6 +43,30 @@ static const struct da8xx_panel lcd_panel = {
.invert_pxl_clk = 0,
 };
 
+static const struct display_panel disp_panel = {
+   QVGA,
+   16,
+   16,
+   COLOR_ACTIVE,
+};
+
+static const struct lcd_ctrl_config lcd_cfg = {
+   disp_panel,
+   .ac_bias= 255,
+   .ac_bias_intrpt = 0,
+   .dma_burst_sz   = 16,
+   .bpp= 16,
+   .fdd= 255,
+   .tft_alt_mode   = 0,
+   .stn_565_mode   = 0,
+   .mono_8bit_mode = 0,
+   .invert_line_clock  = 1,
+   .invert_frm_clock   = 1,
+   .sync_edge  = 0,
+   .sync_ctrl  = 1,
+   .raster_order   = 0,
+};
+
 /* SPI0 pin muxer settings */
 static const struct pinmux_config spi1_pins[] = {
{ pinmux(5), 1, 1 },
@@ -259,7 +283,7 @@ int board_init(void)
/* address of boot parameters */
gd-bd-bi_boot_params = LINUX_BOOT_PARAM_ADDR;
 
-   da8xx_video_init(lcd_panel, 16);
+   da8xx_video_init(lcd_panel, lcd_cfg, 16);
 
return 0;
 }
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index dd7ce36..b0bde2d 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -26,8 +26,15 @@
 #include videomodes.h
 #include da8xx-fb.h
 
+#if !defined(DA8XX_LCD_CNTL_BASE)
+#define DA8XX_LCD_CNTL_BASEDAVINCI_LCD_CNTL_BASE
+#endif
+
 #define DRIVER_NAME da8xx_lcdc
 
+#define LCD_VERSION_1  1
+#define LCD_VERSION_2  2
+
 /* LCD Status Register */
 #define LCD_END_OF_FRAME1  (1  9)
 #define LCD_END_OF_FRAME0  (1  8)
@@ -42,9 +49,14 @@
 #define LCD_DMA_BURST_40x2
 #define LCD_DMA_BURST_80x3
 #define LCD_DMA_BURST_16   0x4
-#define LCD_END_OF_FRAME_INT_ENA   (1  2)
+#define LCD_V1_END_OF_FRAME_INT_ENA(1  2)
+#define LCD_V2_END_OF_FRAME0_INT_ENA   (1  8)
+#define LCD_V2_END_OF_FRAME1_INT_ENA   (1  9)
 #define LCD_DUAL_FRAME_BUFFER_ENABLE   (1  0)
 
+#define LCD_V2_TFT_24BPP_MODE  (1  25)
+#define LCD_V2_TFT_24BPP_UNPACK(1  26)
+
 /* LCD Control Register */
 #define LCD_CLK_DIVISOR(x) ((x)  8)
 #define LCD_RASTER_MODE0x01
@@ -58,12 +70,20 @@
 #define LCD_MONO_8BIT_MODE (1  9)
 #define LCD_RASTER_ORDER   (1  8)
 #define LCD_TFT_MODE   (1  7)
-#define LCD_UNDERFLOW_INT_ENA  (1  6)
-#define LCD_PL_ENABLE  (1  4)
+#define LCD_V1_UNDERFLOW_INT_ENA   (1  6)
+#define LCD_V2_UNDERFLOW_INT_ENA   (1  5)
+#define LCD_V1_PL_INT_ENA  (1  4)
+#define LCD_V2_PL_INT_ENA  (1  6)
 #define LCD_MONOCHROME_MODE(1  1)
 #define LCD_RASTER_ENABLE  (1  0)
 #define LCD_TFT_ALT_ENABLE (1  23)
 #define LCD_STN_565_ENABLE (1  24)
+#define LCD_V2_DMA_CLK_EN  (1  2)
+#define LCD_V2_LIDD_CLK_EN (1  1)
+#define LCD_V2_CORE_CLK_EN (1  0)
+#define LCD_V2_LPP_B10 26
+#define LCD_V2_TFT_24BPP_MODE  (1  25)
+#define LCD_V2_TFT_24BPP_UNPACK(1  26)
 
 /* LCD Raster Timing 2 Register */
 #define LCD_AC_BIAS_TRANSITIONS_PER_INT(x) ((x)  16)
@@ -74,6 +94,8 @@
 #define LCD_INVERT_LINE_CLOCK  (1  21)
 #define LCD_INVERT_FRAME_CLOCK (1  20)
 
+/* Clock registers available only on Version 2 */
+#define  LCD_CLK_MAIN_RESET(1  3)
 /* LCD Block */
 struct da8xx_lcd_regs {
u32 revid;
@@ -97,6 +119,15 @@ struct da8xx_lcd_regs {
u32 dma_frm_buf_ceiling_addr_0;
u32 dma_frm_buf_base_addr_1;
u32 dma_frm_buf_ceiling_addr_1;
+   u32 resv1;
+   u32 raw_stat;
+   u32 masked_stat;
+   u32 int_ena_set;
+   u32 int_ena_clr;
+   u32 

[U-Boot] [PATCH 1/7] arm, am335x: add some missing registers and defines for lcd and epwm support

2013-08-02 Thread Heiko Schocher
- add missing register defines in struct cm_perpl
  epwmss0clkctrl
  epwmss2clkctrl
  lcdcclkstctrl
- add missing register defines in struct cm_dpll
  clklcdcpixelclk
- add struct pwmss_regs
- add struct pwmss_ecap_regs
- add LCD Controller base LCD_CNTL_BASE
- add PWM0 controller base PWMSS0_BASE

Signed-off-by: Heiko Schocher h...@denx.de
Cc: Tom Rini tr...@ti.com
---
 arch/arm/include/asm/arch-am33xx/cpu.h | 35 +-
 arch/arm/include/asm/arch-am33xx/hardware_am33xx.h |  7 +
 2 Dateien geändert, 41 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)

diff --git a/arch/arm/include/asm/arch-am33xx/cpu.h 
b/arch/arm/include/asm/arch-am33xx/cpu.h
index ce24080..daaf13c 100644
--- a/arch/arm/include/asm/arch-am33xx/cpu.h
+++ b/arch/arm/include/asm/arch-am33xx/cpu.h
@@ -219,7 +219,8 @@ struct cm_perpll {
unsigned int dcan1clkctrl;  /* offset 0xC4 */
unsigned int resv6[2];
unsigned int emiffwclkctrl; /* offset 0xD0 */
-   unsigned int resv7[2];
+   unsigned int epwmss0clkctrl;/* offset 0xD4 */
+   unsigned int epwmss2clkctrl;/* offset 0xD8 */
unsigned int l3instrclkctrl;/* offset 0xDC */
unsigned int l3clkctrl; /* Offset 0xE0 */
unsigned int resv8[4];
@@ -230,12 +231,15 @@ struct cm_perpll {
unsigned int l4hsclkctrl;   /* offset 0x120 */
unsigned int resv10[8];
unsigned int cpswclkstctrl; /* offset 0x144 */
+   unsigned int lcdcclkstctrl; /* offset 0x148 */
 };
 
 /* Encapsulating Display pll registers */
 struct cm_dpll {
unsigned int resv1[2];
unsigned int clktimer2clk;  /* offset 0x08 */
+   unsigned int resv2[10];
+   unsigned int clklcdcpixelclk;   /* offset 0x34 */
 };
 
 /* Control Module RTC registers */
@@ -377,6 +381,35 @@ struct ctrl_dev {
 #define RGMII_INT_DELAY(RGMII1_IDMODE | RGMII2_IDMODE)
 #define RMII_CHIPCKL_ENABLE (RMII1_IO_CLK_EN | RMII2_IO_CLK_EN)
 
+/* PWMSS */
+struct pwmss_regs {
+   unsigned int idver;
+   unsigned int sysconfig;
+   unsigned int clkconfig;
+   unsigned int clkstatus;
+};
+#define ECAP_CLK_ENBIT(0)
+#define ECAP_CLK_STOP_REQ  BIT(1)
+
+struct pwmss_ecap_regs {
+   unsigned int tsctr;
+   unsigned int ctrphs;
+   unsigned int cap1;
+   unsigned int cap2;
+   unsigned int cap3;
+   unsigned int cap4;
+   unsigned int reserved[4];
+   unsigned short ecctl1;
+   unsigned short ecctl2;
+};
+
+/* Capture Control register 2 */
+#define ECTRL2_SYNCOSEL_MASK   (0x03  6)
+#define ECTRL2_MDSL_ECAP   BIT(9)
+#define ECTRL2_CTRSTP_FREERUN  BIT(4)
+#define ECTRL2_PLSL_LOWBIT(10)
+#define ECTRL2_SYNC_EN BIT(5)
+
 #endif /* __ASSEMBLY__ */
 #endif /* __KERNEL_STRICT_NAMES */
 
diff --git a/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h 
b/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h
index 432f0c7..293ede2 100644
--- a/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h
+++ b/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h
@@ -43,4 +43,11 @@
 /* RTC base address */
 #define RTC_BASE   0x44E3E000
 
+/* LCD Controller */
+#defineLCD_CNTL_BASE   0x4830E000
+
+/* PWMSS */
+#define PWMSS0_BASE0x4830
+#define AM33XX_ECAP0_BASE  0x48300100
+
 #endif /* __AM33XX_HARDWARE_AM33XX_H */
-- 
1.7.11.7

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


[U-Boot] [PATCH 0/7] arm, am33xx, video: add video support for am33xx based boards

2013-08-02 Thread Heiko Schocher
This patchset prepare video support for am33xx based boards. This
driver is used on the siemens boards rut, dxr2 and pxm2, posted
without video support here:

http://patchwork.ozlabs.org/patch/263211/

Heiko Schocher (7):
  arm, am335x: add some missing registers and defines for lcd and epwm
support
  video, da8xx: move da8xx-fb.h to drivers/video
  arm, am33xx: add clk_get prototype
  video, da8xx-fb: changes for am335x usage
  video, da8xx-fb: show fb addr in bdinfo
  tools, bmp_logo: fix index from uint16_t to int to allow bigger logos
  video: add an option to skip cfb console init

 arch/arm/include/asm/arch-am33xx/cpu.h |  35 ++-
 arch/arm/include/asm/arch-am33xx/hardware.h|   1 +
 arch/arm/include/asm/arch-am33xx/hardware_am33xx.h |   7 +
 board/davinci/ea20/ea20.c  |  28 +-
 drivers/video/cfb_console.c|  18 ++
 drivers/video/da8xx-fb.c   | 338 +
 .../asm/arch-davinci = drivers/video}/da8xx-fb.h  |   7 +-
 tools/bmp_logo.c   |   2 +-
 8 Dateien geändert, 373 Zeilen hinzugefügt(+), 63 Zeilen entfernt(-)
 rename {arch/arm/include/asm/arch-davinci = drivers/video}/da8xx-fb.h (94%)

Cc: Stefano Babic sba...@denx.de
Cc: Anatolij Gustschin ag...@denx.de
Cc: Tom Rini tr...@ti.com
-- 
1.7.11.7

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


[U-Boot] [PATCH 3/7] arm, am33xx: add clk_get prototype

2013-08-02 Thread Heiko Schocher
the clk_get() function is needed for the da8xx-fb video driver,
which is used on the am3xx based siemens boards.

Signed-off-by: Heiko Schocher h...@denx.de
Cc: Tom Rini tr...@ti.com
---
 arch/arm/include/asm/arch-am33xx/hardware.h | 1 +
 1 Datei geändert, 1 Zeile hinzugefügt(+)

diff --git a/arch/arm/include/asm/arch-am33xx/hardware.h 
b/arch/arm/include/asm/arch-am33xx/hardware.h
index 02f5f8a..2dfcc2e 100644
--- a/arch/arm/include/asm/arch-am33xx/hardware.h
+++ b/arch/arm/include/asm/arch-am33xx/hardware.h
@@ -78,4 +78,5 @@
 #define USB0_OTG_BASE  0x47401000
 #define USB1_OTG_BASE  0x47401800
 
+int clk_get(int clk);
 #endif /* __AM33XX_HARDWARE_H */
-- 
1.7.11.7

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


[U-Boot] [PATCH 7/7] video: add an option to skip cfb console init

2013-08-02 Thread Heiko Schocher
This patch add an option to skip cfb console init for boards
who want to show a logo, but not use the cfb console. This is
needed for the siemens boards, which have a bmp bootlogo, but
do not need the cfb console.

Signed-off-by: Heiko Schocher h...@denx.de
Cc: Anatolij Gustschin ag...@denx.de
---
 drivers/video/cfb_console.c | 18 ++
 1 Datei geändert, 18 Zeilen hinzugefügt(+)

diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 96ef8f9..822ed28 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -431,6 +431,19 @@ static const int video_font_draw_table32[16][4] = {
{0x00ff, 0x00ff, 0x00ff, 0x00ff}
 };
 
+/*
+ * Implement a weak default function for boards that optionally
+ * need to skip the cfb initialization.
+ */
+int __board_cfb_skip(void)
+{
+   /* As default, don't skip cfb init */
+   return 0;
+}
+
+int board_cfb_skip(void)
+   __attribute__ ((weak, alias(__board_cfb_skip)));
+
 static void video_drawchars(int xx, int yy, unsigned char *s, int count)
 {
u8 *cdat, *dest, *dest0;
@@ -1996,6 +2009,8 @@ static void *video_logo(void)
return video_fb_address + video_logo_height * VIDEO_LINE_LEN;
}
 #endif
+   if (board_cfb_skip())
+   return 0;
 
sprintf(info,  %s, version_string);
 
@@ -2205,6 +2220,9 @@ int drv_video_init(void)
/* Init video chip - returns with framebuffer cleared */
skip_dev_init = (video_init() == -1);
 
+   if (board_cfb_skip())
+   return 0;
+
 #if !defined(CONFIG_VGA_AS_SINGLE_DEVICE)
debug(KBD: Keyboard init ...\n);
skip_dev_init |= (VIDEO_KBD_INIT_FCT == -1);
-- 
1.7.11.7

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


[U-Boot] [PATCH 5/7] video, da8xx-fb: show fb addr in bdinfo

2013-08-02 Thread Heiko Schocher
without this patch the bdinfo command shows:
U-Boot# bd
arch_number = 0x10DC
[...]
sp start= 0x8EF32F20
FB base = 0x

with this patch it shows the address where the framebuffer
for this video driver start:

arch_number = 0x10DC
[...]
sp start= 0x8EF32F20
FB base = 0x8EF3C788

Signed-off-by: Heiko Schocher h...@denx.de
Cc: Anatolij Gustschin ag...@denx.de
Cc: Tom Rini tr...@ti.com
---
 drivers/video/da8xx-fb.c | 1 +
 1 Datei geändert, 1 Zeile hinzugefügt(+)

diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index b0bde2d..3a5f325 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -959,6 +959,7 @@ void *video_hw_init(void)
printf(GLCD: malloc for frame buffer failed\n);
goto err_release_fb;
}
+   gd-fb_base = (int)par-vram_virt;
 
gpanel.frameAdrs = (unsigned int)par-vram_virt;
da8xx_fb_info-screen_base = (char *) par-vram_virt;
-- 
1.7.11.7

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


[U-Boot] [PATCH 6/7] tools, bmp_logo: fix index from uint16_t to int to allow bigger logos

2013-08-02 Thread Heiko Schocher
when generating the bmp_logo_bitmap, the index is casted
as an uint16_t. So bigger logos as 65535 bytes are converted wrong
Fix this.

Signed-off-by: Heiko Schocher h...@denx.de
Cc: Anatolij Gustschin ag...@denx.de
---
 tools/bmp_logo.c | 2 +-
 1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)

diff --git a/tools/bmp_logo.c b/tools/bmp_logo.c
index b2ad3d5..2247adc 100644
--- a/tools/bmp_logo.c
+++ b/tools/bmp_logo.c
@@ -179,7 +179,7 @@ int main (int argc, char *argv[])
printf(unsigned char bmp_logo_bitmap[] = {\n);
for (i=(b-height-1)*b-width; i=0; i-=b-width) {
for (x = 0; x  b-width; x++) {
-   b-data[(uint16_t) i + x] = (uint8_t) fgetc (fp) \
+   b-data[i + x] = (uint8_t) fgetc(fp)
+ DEFAULT_CMAP_SIZE;
}
}
-- 
1.7.11.7

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


[U-Boot] Fwd: [ANNOUNCE] ARM kernel summit 2013, Oct 22-23

2013-08-02 Thread Olof Johansson
-- Forwarded message --
From: Olof Johansson o...@lixom.net
Date: Mon, Jul 29, 2013 at 7:57 PM
Subject: [ANNOUNCE] ARM kernel summit 2013, Oct 22-23
To: linux-arm-ker...@lists.infradead.org
linux-arm-ker...@lists.infradead.org
Cc: linux-ker...@vger.kernel.org linux-ker...@vger.kernel.org,
Grant Likely grant.lik...@linaro.org, Arnd Bergmann a...@arndb.de,
Kevin Hilman khil...@linaro.org, Mark Brown broo...@kernel.org,
ksummit-2013-disc...@lists.linuxfoundation.org
ksummit-2013-disc...@lists.linuxfoundation.org


As previous years, we are planning on hosting a ARM Kernel Summit
attached to the main Kernel Summit, and we have graciously been given
space to host it for two days, Oct 22-23 (Oct 23 is the track day for
the main KS, so we're getting an extra day) in Edinburgh, UK.

To make sure we get the right set of people invited, we're looking for
people to propose topics they would like to see covered as part of the
two-day aganda, as well as general invite requests. To request an
invite or to propose a topic, please send an email to
ksummit-2013-disc...@lists.linuxfoundation.org, and cc LAKML/LKML as
appropriate. Please use the tag [ARM ATTEND] in the subject to
distinguish these from the general KS ATTEND threads.

It's pretty obvious that device trees and bindings are hot topics this
year, with plenty of overlap between ARM and regular kernel summit and
other subsystems. We are tentatively planning on dedicating Wednesday
afternoon to the topic, to fit the regular agenda of KS track day to
make sure as many interested parties as possible can attend. We'd
still be interested in hearing specific topic requests in that area
though.


The group of us organizing and coordinating this year is:

Arnd Bergmann
Mark Brown
Kevin Hilman
Olof Johansson
Grant Likely
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot