[U-Boot] [PATCH] serial: CONSOLE macro is not used

2012-08-10 Thread Michal Simek
Signed-off-by: Michal Simek 
---
 drivers/serial/serial.c |3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 0d6ad62..b10bab7 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -84,9 +84,6 @@ static NS16550_t serial_ports[4] = {
 };
 
 #define PORT   serial_ports[port-1]
-#if defined(CONFIG_CONS_INDEX)
-#define CONSOLE(serial_ports[CONFIG_CONS_INDEX-1])
-#endif
 
 #if defined(CONFIG_SERIAL_MULTI)
 
-- 
1.7.0.4

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


[U-Boot] [PATCH v3] arm: rmobile: Add basic support for Renesas R-Mobile

2012-08-10 Thread Nobuhiro Iwamatsu
This patch adds minimum support for R-Mobile. Only minimal support with timer.
This CPU can uses the peripheral of Renesas SuperH.

Signed-off-by: Nobuhiro Iwamatsu 
Signed-off-by: Nobuhiro Iwamatsu 
---
 v3: Remove white space.

 arch/arm/cpu/armv7/rmobile/Makefile |   48 +
 arch/arm/cpu/armv7/rmobile/cpu_info.c   |   74 
 arch/arm/cpu/armv7/rmobile/timer.c  |   97 +++
 arch/arm/include/asm/arch-rmobile/rmobile.h |8 +++
 4 files changed, 227 insertions(+)
 create mode 100644 arch/arm/cpu/armv7/rmobile/Makefile
 create mode 100644 arch/arm/cpu/armv7/rmobile/cpu_info.c
 create mode 100644 arch/arm/cpu/armv7/rmobile/timer.c
 create mode 100644 arch/arm/include/asm/arch-rmobile/rmobile.h

diff --git a/arch/arm/cpu/armv7/rmobile/Makefile 
b/arch/arm/cpu/armv7/rmobile/Makefile
new file mode 100644
index 000..e7eb90f
--- /dev/null
+++ b/arch/arm/cpu/armv7/rmobile/Makefile
@@ -0,0 +1,48 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(SOC).o
+
+COBJS += cpu_info.o
+COBJS += timer.o
+
+SRCS   := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS) $(COBJS-y))
+START  := $(addprefix $(obj),$(START))
+
+all:   $(obj).depend $(LIB)
+
+$(LIB):$(OBJS)
+   $(call cmd_link_o_target, $(OBJS))
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
+
diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info.c 
b/arch/arm/cpu/armv7/rmobile/cpu_info.c
new file mode 100644
index 000..789c2c3
--- /dev/null
+++ b/arch/arm/cpu/armv7/rmobile/cpu_info.c
@@ -0,0 +1,74 @@
+/*
+ * (C) Copyright 2012 Nobuhiro Iwamatsu 
+ * (C) Copyright 2012 Renesas Solutions Corp.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+#include 
+#include 
+#include 
+
+#ifdef CONFIG_ARCH_CPU_INIT
+int arch_cpu_init(void)
+{
+   icache_enable();
+   return 0;
+}
+#endif
+
+#ifndef CONFIG_SYS_DCACHE_OFF
+void enable_caches(void)
+{
+   dcache_enable();
+}
+#endif
+
+#ifdef CONFIG_DISPLAY_CPUINFO
+static u32 get_cpu_type(void)
+{
+   u32 id;
+   u32 type;
+
+   id = readl(CCCR);
+   type = (id >> 8) & 0xFF;
+
+   return type;
+}
+
+static u32 get_cpu_rev(void)
+{
+   u32 id;
+   u32 rev;
+
+   id = readl(CCCR);
+   rev = (id >> 4) & 0xF;
+
+   return rev;
+}
+
+int print_cpuinfo(void)
+{
+   switch (get_cpu_type()) {
+   default:
+   printf("CPU: Renesas Electronics CPU rev %d\n", get_cpu_rev());
+   break;
+   }
+   return 0;
+}
+#endif
diff --git a/arch/arm/cpu/armv7/rmobile/timer.c 
b/arch/arm/cpu/armv7/rmobile/timer.c
new file mode 100644
index 000..37522dc
--- /dev/null
+++ b/arch/arm/cpu/armv7/rmobile/timer.c
@@ -0,0 +1,97 @@
+/*
+ * (C) Copyright 2012 Nobuhiro Iwamatsu 
+ * (C) Copyright 2012 Renesas Solutions Corp.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at you

[U-Boot] [PATCH v2] arm: rmobile: Add support Renesas R8A7740

2012-08-10 Thread Nobuhiro Iwamatsu
Renesas R8A7740 is CPU with Cortex-A9.
This supports the basic register definition and GPIO.

Signed-off-by: Hideyuki Sano 
Signed-off-by: Nobuhiro Iwamatsu 
---
 v2: Set COBJS one object per line, and sort the list.

 arch/arm/cpu/armv7/rmobile/Makefile   |2 +
 arch/arm/cpu/armv7/rmobile/cpu_info-r8a7740.c |   50 +
 arch/arm/cpu/armv7/rmobile/cpu_info.c |6 +
 arch/arm/include/asm/arch-rmobile/irqs.h  |   18 ++
 arch/arm/include/asm/arch-rmobile/r8a7740.h   |  287 +
 arch/arm/include/asm/arch-rmobile/rmobile.h   |2 +
 6 files changed, 365 insertions(+)
 create mode 100644 arch/arm/cpu/armv7/rmobile/cpu_info-r8a7740.c
 create mode 100644 arch/arm/include/asm/arch-rmobile/irqs.h
 create mode 100644 arch/arm/include/asm/arch-rmobile/r8a7740.h

diff --git a/arch/arm/cpu/armv7/rmobile/Makefile 
b/arch/arm/cpu/armv7/rmobile/Makefile
index a5a1ced..ee148dd 100644
--- a/arch/arm/cpu/armv7/rmobile/Makefile
+++ b/arch/arm/cpu/armv7/rmobile/Makefile
@@ -29,6 +29,8 @@ SOBJS = lowlevel_init.o
 COBJS-y += board.o
 COBJS-y += cpu_info.o
 COBJS-$(CONFIG_GLOBAL_TIMER) += timer.o
+COBJS-$(CONFIG_R8A7740) += cpu_info-r8a7740.o
+COBJS-$(CONFIG_R8A7740) += pfc-r8a7740.o
 COBJS-$(CONFIG_SH73A0) += cpu_info-sh73a0.o
 COBJS-$(CONFIG_SH73A0) += pfc-sh73a0.o
 COBJS-$(CONFIG_TMU_TIMER) += timer_tmu.o
diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info-r8a7740.c 
b/arch/arm/cpu/armv7/rmobile/cpu_info-r8a7740.c
new file mode 100644
index 000..15d9557
--- /dev/null
+++ b/arch/arm/cpu/armv7/rmobile/cpu_info-r8a7740.c
@@ -0,0 +1,50 @@
+/*
+ * (C) Copyright 2012 Nobuhiro Iwamatsu 
+ * (C) Copyright 2012 Renesas Solutions Corp.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+#include 
+#include 
+
+#ifdef CONFIG_DISPLAY_CPUINFO
+u32 rmobile_get_cpu_type(void)
+{
+   u32 id;
+   u32 type;
+   struct r8a7740_hpb *hpb = (struct r8a7740_hpb *)HPB_BASE;
+
+   id = readl(hpb->cccr);
+   type = (id >> 8) & 0xFF;
+
+   return type;
+}
+
+u32 get_cpu_rev(void)
+{
+   u32 id;
+   u32 rev;
+   struct r8a7740_hpb *hpb = (struct r8a7740_hpb *)HPB_BASE;
+
+   id = readl(hpb->cccr);
+   rev = (id >> 4) & 0xF;
+
+   return rev;
+}
+#endif /* CONFIG_DISPLAY_CPUINFO */
diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info.c 
b/arch/arm/cpu/armv7/rmobile/cpu_info.c
index 87287ce..0e2b82e 100644
--- a/arch/arm/cpu/armv7/rmobile/cpu_info.c
+++ b/arch/arm/cpu/armv7/rmobile/cpu_info.c
@@ -68,6 +68,12 @@ int print_cpuinfo(void)
   rmobile_get_cpu_rev_integer(),
   rmobile_get_cpu_rev_fraction());
break;
+   case 0x40:
+   printf("CPU: Renesas Electronics R8A7740 rev %d.%d\n",
+  rmobile_get_cpu_rev_integer(),
+  rmobile_get_cpu_rev_fraction());
+   break;
+
default:
printf("CPU: Renesas Electronics CPU rev %d.%d\n",
   rmobile_get_cpu_rev_integer(),
diff --git a/arch/arm/include/asm/arch-rmobile/irqs.h 
b/arch/arm/include/asm/arch-rmobile/irqs.h
new file mode 100644
index 000..dcb714f
--- /dev/null
+++ b/arch/arm/include/asm/arch-rmobile/irqs.h
@@ -0,0 +1,18 @@
+#ifndef __ASM_MACH_IRQS_H
+#define __ASM_MACH_IRQS_H
+
+#define NR_IRQS 1024
+
+/* GIC */
+#define gic_spi(nr)((nr) + 32)
+
+/* INTCA */
+#define evt2irq(evt)   (((evt) >> 5) - 16)
+#define irq2evt(irq)   (((irq) + 16) << 5)
+
+/* INTCS */
+#define INTCS_VECT_BASE0x2200
+#define INTCS_VECT(n, vect)INTC_VECT((n), INTCS_VECT_BASE + (vect))
+#define intcs_evt2irq(evt) evt2irq(INTCS_VECT_BASE + (evt))
+
+#endif /* __ASM_MACH_IRQS_H */
diff --git a/arch/arm/include/asm/arch-rmobile/r8a7740.h 
b/arch/arm/include/asm/arch-rmobile/r8a7740.h
new file mode 100644
index 000..8f17950
--- /dev/null
+++ b/arch/arm/include/asm/arch-rmobile/r8a7740.h
@@ -0,0 +1,287 @@
+/*
+ * Copyright (C) 2012 Renesas Solutions Corp.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program is

[U-Boot] [PATCH v2] arm: rmobile: Add support Renesas SH73A0

2012-08-10 Thread Nobuhiro Iwamatsu
Renesas SH73A0 is CPU with Cortex-A9.
This supports the basic register definition and GPIO.

Signed-off-by: Nobuhiro Iwamatsu 
Signed-off-by: Nobuhiro Iwamatsu 
---
 v2: Set COBJS one object per line, and sort the list.
 Remove ICCICR and ICCPMR.
 Remove white space.

 arch/arm/cpu/armv7/rmobile/Makefile |   17 +-
 arch/arm/cpu/armv7/rmobile/board.c  |   33 ++
 arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c|   50 ++
 arch/arm/cpu/armv7/rmobile/cpu_info.c   |   36 +-
 arch/arm/cpu/armv7/rmobile/lowlevel_init.S  |   95 
 arch/arm/include/asm/arch-rmobile/rmobile.h |4 +
 arch/arm/include/asm/arch-rmobile/sh73a0-gpio.h |  553 +++
 arch/arm/include/asm/arch-rmobile/sh73a0.h  |  280 
 arch/arm/include/asm/arch-rmobile/sys_proto.h   |   29 ++
 9 files changed, 1073 insertions(+), 24 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/rmobile/board.c
 create mode 100644 arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c
 create mode 100644 arch/arm/cpu/armv7/rmobile/lowlevel_init.S
 create mode 100644 arch/arm/include/asm/arch-rmobile/sh73a0-gpio.h
 create mode 100644 arch/arm/include/asm/arch-rmobile/sh73a0.h
 create mode 100644 arch/arm/include/asm/arch-rmobile/sys_proto.h

diff --git a/arch/arm/cpu/armv7/rmobile/Makefile 
b/arch/arm/cpu/armv7/rmobile/Makefile
index e7eb90f..4becff3 100644
--- a/arch/arm/cpu/armv7/rmobile/Makefile
+++ b/arch/arm/cpu/armv7/rmobile/Makefile
@@ -25,11 +25,17 @@ include $(TOPDIR)/config.mk
 
 LIB= $(obj)lib$(SOC).o
 
-COBJS += cpu_info.o
-COBJS += timer.o
+SOBJS = lowlevel_init.o
+COBJS-y += board.o
+COBJS-y += cpu_info.o
+COBJS-y += timer.o
 
-SRCS   := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS   := $(addprefix $(obj),$(COBJS) $(COBJS-y))
+COBJS-$(CONFIG_SH73A0) += cpu_info-sh73a0.o
+
+COBJS  := $(COBJS-y)
+SRCS:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
 START  := $(addprefix $(obj),$(START))
 
 all:   $(obj).depend $(LIB)
@@ -37,6 +43,9 @@ all:  $(obj).depend $(LIB)
 $(LIB):$(OBJS)
$(call cmd_link_o_target, $(OBJS))
 
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
 #
 
 # defines $(obj).depend target
diff --git a/arch/arm/cpu/armv7/rmobile/board.c 
b/arch/arm/cpu/armv7/rmobile/board.c
new file mode 100644
index 000..55dc6be
--- /dev/null
+++ b/arch/arm/cpu/armv7/rmobile/board.c
@@ -0,0 +1,33 @@
+/*
+ * (C) Copyright 2012 Nobuhiro Iwamatsu 
+ * (C) Copyright 2012 Renesas Solutions Corp.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+#include 
+#include 
+#include 
+
+#ifdef CONFIG_DISPLAY_BOARDINFO
+int checkboard(void)
+{
+   printf("Board: %s\n", sysinfo.board_string);
+   return 0;
+}
+#endif /* CONFIG_DISPLAY_BOARDINFO */
diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c 
b/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c
new file mode 100644
index 000..f5273cf
--- /dev/null
+++ b/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c
@@ -0,0 +1,50 @@
+/*
+ * (C) Copyright 2012 Nobuhiro Iwamatsu 
+ * (C) Copyright 2012 Renesas Solutions Corp.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+#include 
+#include 
+
+#ifdef CONFIG_DISPLAY_CPUINFO
+u32 rmobile_get_cpu_type(void)
+{
+   u32 id;
+   u32 type;
+   struct sh73a0_hpb *hpb = (struct sh73a0_hpb *)HPB_BASE;
+
+   id = re

[U-Boot] [PATCH 25/37] arm: rmobile: Add support TMU base timer function

2012-08-10 Thread Nobuhiro Iwamatsu
Some rmobile SoC has TMU base timer function. This supports TMU.

Signed-off-by: Nobuhiro Iwamatsu 
---
 V2: Set COBJS one object per line, and sort the list.

 arch/arm/cpu/armv7/rmobile/Makefile   |4 +-
 arch/arm/cpu/armv7/rmobile/timer_tmu.c|  161 +
 arch/arm/include/asm/arch-rmobile/timer_tmu.h |   51 
 3 files changed, 214 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/rmobile/timer_tmu.c
 create mode 100644 arch/arm/include/asm/arch-rmobile/timer_tmu.h

diff --git a/arch/arm/cpu/armv7/rmobile/Makefile 
b/arch/arm/cpu/armv7/rmobile/Makefile
index 6f26a73..a5a1ced 100644
--- a/arch/arm/cpu/armv7/rmobile/Makefile
+++ b/arch/arm/cpu/armv7/rmobile/Makefile
@@ -28,10 +28,10 @@ LIB = $(obj)lib$(SOC).o
 SOBJS = lowlevel_init.o
 COBJS-y += board.o
 COBJS-y += cpu_info.o
-COBJS-y += timer.o
-
+COBJS-$(CONFIG_GLOBAL_TIMER) += timer.o
 COBJS-$(CONFIG_SH73A0) += cpu_info-sh73a0.o
 COBJS-$(CONFIG_SH73A0) += pfc-sh73a0.o
+COBJS-$(CONFIG_TMU_TIMER) += timer_tmu.o
 
 COBJS  := $(COBJS-y)
 SRCS:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
diff --git a/arch/arm/cpu/armv7/rmobile/timer_tmu.c 
b/arch/arm/cpu/armv7/rmobile/timer_tmu.c
new file mode 100644
index 000..78aee07
--- /dev/null
+++ b/arch/arm/cpu/armv7/rmobile/timer_tmu.c
@@ -0,0 +1,161 @@
+/*
+ * (C) Copyright 2012
+ * Renesas Solutions Corp.
+ *
+ * This code is based on arch/sh/lib/time.c:
+ *
+ * (C) Copyright 2009
+ * Jean-Christophe PLAGNIOL-VILLARD 
+ *
+ * (C) Copyright 2007-2010
+ * Nobobuhiro Iwamatsu 
+ *
+ * (C) Copyright 2003
+ * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+static struct tmu_regs *tmu = (struct tmu_regs *)TMU_BASE;
+
+static unsigned long last_tcnt;
+static unsigned long long overflow_ticks;
+static u16 bit;
+
+static inline unsigned long long tick_to_time(unsigned long long tick)
+{
+   ulong timer_freq;
+   timer_freq = get_tmu0_clk_rate() >> ((bit + 1) * 2);
+   tick *= CONFIG_SYS_HZ;
+   do_div(tick, timer_freq);
+
+   return tick;
+}
+
+static inline unsigned long long usec_to_tick(unsigned long long usec)
+{
+   ulong timer_freq;
+   timer_freq = get_tmu0_clk_rate() >> ((bit + 1) * 2);
+   usec *= timer_freq;
+   do_div(usec, 100);
+
+   return usec;
+}
+
+static void tmu_timer_start(unsigned int timer)
+{
+   if (timer > 2)
+   return;
+   writeb(readb(&tmu->tstr) | (1 << timer), &tmu->tstr);
+}
+
+static void tmu_timer_stop(unsigned int timer)
+{
+   if (timer > 2)
+   return;
+   writeb(readb(&tmu->tstr) & ~(1 << timer), &tmu->tstr);
+}
+
+int timer_init(void)
+{
+   /* Divide clock by CONFIG_SYS_TMU_CLK_DIV */
+   u16 bit = 0;
+
+   switch (CONFIG_SYS_TMU_CLK_DIV) {
+   case 1024:
+   bit = 4;
+   break;
+   case 256:
+   bit = 3;
+   break;
+   case 64:
+   bit = 2;
+   break;
+   case 16:
+   bit = 1;
+   break;
+   case 4:
+   default:
+   break;
+   }
+   writew(readw(&tmu->tcr0) | bit, &tmu->tcr0);
+
+   tmu_timer_stop(0);
+   tmu_timer_start(0);
+
+   last_tcnt = 0;
+   overflow_ticks = 0;
+
+   return 0;
+}
+
+unsigned long long get_ticks(void)
+{
+   unsigned long tcnt = 0 - readl(&tmu->tcnt0);
+   unsigned long ticks = tcnt;
+
+   if (last_tcnt > tcnt) { /* overflow */
+   overflow_ticks++;
+   ticks = (0x - last_tcnt) + tcnt;
+   }
+
+   last_tcnt = tcnt;
+
+   return (overflow_ticks << 32) | tcnt;
+}
+
+void __udelay(unsigned long usec)
+{
+   unsigned long long tmp;
+   ulong tmo;
+
+   tmo = usec_to_tick(usec);
+   tmp = get_ticks() + tmo;/* get current timestamp */
+
+   while (get_ticks() < tmp)   /* loop till event */
+/*NOP*/;
+}
+
+unsigned long get_timer(unsigned long base)
+{
+   /* return msec */
+   return tick_to_time(get_ticks()) - base;
+}
+
+void set_timer(unsigned long t)
+{
+   writel((0 - t), &tmu->tc

[U-Boot] [PATCH v2] sh: Add support pin function control using GPIO

2012-08-10 Thread Nobuhiro Iwamatsu
Renesas SH and R-Mobile set up device using PFC.
This provide the framework. Most codes were brought from linux kernel.

Signed-off-by: Nobuhiro Iwamatsu 
Signed-off-by: Nobuhiro Iwamatsu 
---
 v2: Remove remove dead code.
 Remove typedef. clean checkpatch.

 drivers/gpio/Makefile |1 +
 drivers/gpio/sh_pfc.c |  617 +
 include/sh_pfc.h  |  188 +++
 3 files changed, 806 insertions(+)
 create mode 100644 drivers/gpio/sh_pfc.c
 create mode 100644 include/sh_pfc.h

diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index 8958bb4..4b99b85 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -41,6 +41,7 @@ COBJS-$(CONFIG_DA8XX_GPIO)+= da8xx_gpio.o
 COBJS-$(CONFIG_ALTERA_PIO) += altera_pio.o
 COBJS-$(CONFIG_MPC83XX_GPIO)   += mpc83xx_gpio.o
 COBJS-$(CONFIG_OMAP_GPIO)  += omap_gpio.o
+COBJS-$(CONFIG_SH_GPIO_PFC)+= sh_pfc.o
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
diff --git a/drivers/gpio/sh_pfc.c b/drivers/gpio/sh_pfc.c
new file mode 100644
index 000..e555ec9
--- /dev/null
+++ b/drivers/gpio/sh_pfc.c
@@ -0,0 +1,617 @@
+/*
+ * Pinmuxed GPIO support for SuperH.
+ * Copy from linux kernel driver/sh/pfc.c
+ *
+ * Copyright (C) 2008 Magnus Damm
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+static struct pinmux_info *gpioc;
+
+#define pfc_phys_to_virt(p, a) ((void *)a)
+
+static int enum_in_range(unsigned short enum_id, struct pinmux_range *r)
+{
+   if (enum_id < r->begin)
+   return 0;
+
+   if (enum_id > r->end)
+   return 0;
+
+   return 1;
+}
+
+static unsigned long gpio_read_raw_reg(void *mapped_reg,
+  unsigned long reg_width)
+{
+   switch (reg_width) {
+
+   case 8:
+   return readb(mapped_reg);
+   case 16:
+   return readw(mapped_reg);
+   case 32:
+   return readl(mapped_reg);
+   }
+
+   BUG();
+   return 0;
+}
+
+static void gpio_write_raw_reg(void *mapped_reg,
+  unsigned long reg_width,
+  unsigned long data)
+{
+   switch (reg_width) {
+   case 8:
+   writeb(data, mapped_reg);
+   return;
+   case 16:
+   writew(data, mapped_reg);
+   return;
+   case 32:
+   writel(data, mapped_reg);
+   return;
+   }
+
+   BUG();
+}
+
+static int gpio_read_bit(struct pinmux_data_reg *dr,
+unsigned long in_pos)
+{
+   unsigned long pos;
+
+   pos = dr->reg_width - (in_pos + 1);
+
+   debug("read_bit: addr = %lx, pos = %ld, "
+"r_width = %ld\n", dr->reg, pos, dr->reg_width);
+
+   return (gpio_read_raw_reg(dr->mapped_reg, dr->reg_width) >> pos) & 1;
+}
+
+static void gpio_write_bit(struct pinmux_data_reg *dr,
+  unsigned long in_pos, unsigned long value)
+{
+   unsigned long pos;
+
+   pos = dr->reg_width - (in_pos + 1);
+
+   debug("write_bit addr = %lx, value = %d, pos = %ld, "
+"r_width = %ld\n",
+dr->reg, !!value, pos, dr->reg_width);
+
+   if (value)
+   __set_bit(pos, &dr->reg_shadow);
+   else
+   __clear_bit(pos, &dr->reg_shadow);
+
+   gpio_write_raw_reg(dr->mapped_reg, dr->reg_width, dr->reg_shadow);
+}
+
+static void config_reg_helper(struct pinmux_info *gpioc,
+ struct pinmux_cfg_reg *crp,
+ unsigned long in_pos,
+ void **mapped_regp,
+ unsigned long *maskp,
+ unsigned long *posp)
+{
+   int k;
+
+   *mapped_regp = pfc_phys_to_virt(gpioc, crp->reg);
+
+   if (crp->field_width) {
+   *maskp = (1 << crp->field_width) - 1;
+   *posp = crp->reg_width - ((in_pos + 1) * crp->field_width);
+   } else {
+   *maskp = (1 << crp->var_field_width[in_pos]) - 1;
+   *posp = crp->reg_width;
+   for (k = 0; k <= in_pos; k++)
+   *posp -= crp->var_field_width[k];
+   }
+}
+
+static int read_config_reg(struct pinmux_info *gpioc,
+  struct pinmux_cfg_reg *crp,
+  unsigned long field)
+{
+   void *mapped_reg;
+
+   unsigned long mask, pos;
+
+   config_reg_helper(gpioc, crp, field, &mapped_reg, &mask, &pos);
+
+   debug("read_reg: addr = %lx, field = %ld, "
+"r_width = %ld, f_width = %ld\n",
+crp->reg, field, crp->reg_width, crp->field_width);
+
+   return (gpio_read_raw_reg(mapped_reg, crp->reg_width) >> pos) & mask;
+}
+
+static void write_config_re

[U-Boot] [PATCH] microblaze: Call spi_init function

2012-08-10 Thread Michal Simek
Initialization spi.

Signed-off-by: Michal Simek 
---
 arch/microblaze/lib/board.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c
index 674b573..ef4bac4 100644
--- a/arch/microblaze/lib/board.c
+++ b/arch/microblaze/lib/board.c
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -166,6 +167,10 @@ void board_init_f(ulong not_used)
}
 #endif
 
+#ifdef CONFIG_SPI
+   spi_init();
+#endif
+
/* relocate environment function pointers etc. */
env_relocate ();
 
-- 
1.7.0.4

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


Re: [U-Boot] [PATCH v2 1/7] microblaze: Add support for device tree driven board configuration

2012-08-10 Thread Michal Simek

On 08/07/2012 10:10 PM, Stephan Linz wrote:

Am Montag, den 06.08.2012, 09:46 +0200 schrieb Michal Simek:

This is minimum code required to be able to use device-tree
for u-boot initialization.
Currently only for device driver initialization.

Linker script change ensures DTB to be aligned
for both options CONFIG_OF_EMBED and CONFIG_OF_SEPARATE.

Signed-off-by: Michal Simek 
CC: Simon Glass 



Acked-by: Stephan Linz 

Tested with AXI systems on Avnet S6LX150T and S6LX9 micro-evaluation.



Applied the whole series to microblaze custodian repo.

I have fixed small typo fault in 5/7 directly without sending v3 patch to 
mailing list.

Thanks,
Michal

--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] rmobile: Add README

2012-08-10 Thread Nobuhiro Iwamatsu
Hi,

On Fri, Aug 10, 2012 at 2:03 AM, Tom Rini  wrote:
> On Thu, Aug 09, 2012 at 11:30:24PM +0900, Nobuhiro Iwamatsu wrote:
>> This add README of Renesas RMOBILE.
>> Based doc/README.omap3.
>>
>> Signed-off-by: Nobuhiro Iwamatsu 
>> ---
>>  doc/README.rmobile |   46 ++
>>  1 file changed, 46 insertions(+)
>>  create mode 100644 doc/README.rmobile
>>
>> diff --git a/doc/README.rmobile b/doc/README.rmobile
>> new file mode 100644
>> index 000..b6acb28
>> --- /dev/null
>> +++ b/doc/README.rmobile
>> @@ -0,0 +1,46 @@
>> +Summary
>> +===
>> +
>> +This README is about U-Boot support for Renesas's ARM Cortex-A9 based 
>> RMOBILE[1]
>> +family of SoCs. Renesas's RMOBILE SoC family contains an ARM Cortex-A9.
>> +
>> +Currently the following boards are supported:
>> +
>> +* KMC KZM-A9-GT [2]
>> +
>> +* Atmark-Techno Armadillo-800-EVA [3]
>> +
>> +Toolchain
>> +=
>> +
>> +While ARM Cortex-A9 support ARM v7 instruction set (-march=armv7a) we 
>> compile
>> +with -march=armv5 to allow more compilers to work. For U-Boot code this has
>> +no performance impact.
>
> Is this really an issue today?  Between ELDK, Linaro and CodeSourcey
> (and many other options too) it's really easy to get a v7 toolchain.
>

You are right. I will fix this sentence.

Thanks,
  Nobuhiro


-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3] arm: rmobile: Add support Renesas SH73A0

2012-08-10 Thread Nobuhiro Iwamatsu
Renesas SH73A0 is CPU with Cortex-A9.
This supports the basic register definition and GPIO.

Signed-off-by: Nobuhiro Iwamatsu 
Signed-off-by: Nobuhiro Iwamatsu 
---
 V3: Revert ICCICR.

 arch/arm/cpu/armv7/rmobile/Makefile |   17 +-
 arch/arm/cpu/armv7/rmobile/board.c  |   33 ++
 arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c|   50 ++
 arch/arm/cpu/armv7/rmobile/cpu_info.c   |   36 +-
 arch/arm/cpu/armv7/rmobile/lowlevel_init.S  |   95 
 arch/arm/include/asm/arch-rmobile/rmobile.h |4 +
 arch/arm/include/asm/arch-rmobile/sh73a0-gpio.h |  553 +++
 arch/arm/include/asm/arch-rmobile/sh73a0.h  |  281 
 arch/arm/include/asm/arch-rmobile/sys_proto.h   |   29 ++
 9 files changed, 1074 insertions(+), 24 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/rmobile/board.c
 create mode 100644 arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c
 create mode 100644 arch/arm/cpu/armv7/rmobile/lowlevel_init.S
 create mode 100644 arch/arm/include/asm/arch-rmobile/sh73a0-gpio.h
 create mode 100644 arch/arm/include/asm/arch-rmobile/sh73a0.h
 create mode 100644 arch/arm/include/asm/arch-rmobile/sys_proto.h

diff --git a/arch/arm/cpu/armv7/rmobile/Makefile 
b/arch/arm/cpu/armv7/rmobile/Makefile
index e7eb90f..4becff3 100644
--- a/arch/arm/cpu/armv7/rmobile/Makefile
+++ b/arch/arm/cpu/armv7/rmobile/Makefile
@@ -25,11 +25,17 @@ include $(TOPDIR)/config.mk
 
 LIB= $(obj)lib$(SOC).o
 
-COBJS += cpu_info.o
-COBJS += timer.o
+SOBJS = lowlevel_init.o
+COBJS-y += board.o
+COBJS-y += cpu_info.o
+COBJS-y += timer.o
 
-SRCS   := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS   := $(addprefix $(obj),$(COBJS) $(COBJS-y))
+COBJS-$(CONFIG_SH73A0) += cpu_info-sh73a0.o
+
+COBJS  := $(COBJS-y)
+SRCS:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
 START  := $(addprefix $(obj),$(START))
 
 all:   $(obj).depend $(LIB)
@@ -37,6 +43,9 @@ all:  $(obj).depend $(LIB)
 $(LIB):$(OBJS)
$(call cmd_link_o_target, $(OBJS))
 
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
 #
 
 # defines $(obj).depend target
diff --git a/arch/arm/cpu/armv7/rmobile/board.c 
b/arch/arm/cpu/armv7/rmobile/board.c
new file mode 100644
index 000..55dc6be
--- /dev/null
+++ b/arch/arm/cpu/armv7/rmobile/board.c
@@ -0,0 +1,33 @@
+/*
+ * (C) Copyright 2012 Nobuhiro Iwamatsu 
+ * (C) Copyright 2012 Renesas Solutions Corp.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+#include 
+#include 
+#include 
+
+#ifdef CONFIG_DISPLAY_BOARDINFO
+int checkboard(void)
+{
+   printf("Board: %s\n", sysinfo.board_string);
+   return 0;
+}
+#endif /* CONFIG_DISPLAY_BOARDINFO */
diff --git a/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c 
b/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c
new file mode 100644
index 000..f5273cf
--- /dev/null
+++ b/arch/arm/cpu/armv7/rmobile/cpu_info-sh73a0.c
@@ -0,0 +1,50 @@
+/*
+ * (C) Copyright 2012 Nobuhiro Iwamatsu 
+ * (C) Copyright 2012 Renesas Solutions Corp.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+#include 
+#include 
+
+#ifdef CONFIG_DISPLAY_CPUINFO
+u32 rmobile_get_cpu_type(void)
+{
+   u32 id;
+   u32 type;
+   struct sh73a0_hpb *hpb = (struct sh73a0_hpb *)HPB_BASE;
+
+   id = readl(hpb->cccr);
+   type = (id >> 8) & 0xFF;
+
+   return type;
+}
+
+u32 get_cpu_rev(v

[U-Boot] [PATCH 1/6] davinci: ea20: reorganisation LCD startup

2012-08-10 Thread Bastian Ruppert
Signed-off-by: Bastian Ruppert 
CC: Tom Rini 
CC: Stefano Babic 
---
 board/davinci/ea20/ea20.c |   23 +++
 1 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c
index 7e00040..69307e4 100644
--- a/board/davinci/ea20/ea20.c
+++ b/board/davinci/ea20/ea20.c
@@ -176,6 +176,9 @@ int board_early_init_f(void)
if (davinci_configure_pin_mux(gpio_pins, ARRAY_SIZE(gpio_pins)) != 0)
return 1;
 
+   /* Set DISP_ON high to enable LCD output*/
+   gpio_direction_output(97, 1);
+
/* Set the RESETOUTn low */
gpio_direction_output(111, 0);
 
@@ -188,9 +191,6 @@ int board_early_init_f(void)
/* Set LCD_B_PWR low to power down LCD Backlight*/
gpio_direction_output(102, 0);
 
-   /* Set DISP_ON low to disable LCD output*/
-   gpio_direction_output(97, 0);
-
 #ifndef CONFIG_USE_IRQ
irq_init();
 #endif
@@ -250,11 +250,6 @@ int board_early_init_f(void)
writel(readl(&davinci_syscfg_regs->mstpri[2]) & 0x0fff,
   &davinci_syscfg_regs->mstpri[2]);
 
-   /* Set LCD_B_PWR low to power up LCD Backlight*/
-   gpio_set_value(102, 1);
-
-   /* Set DISP_ON low to disable LCD output*/
-   gpio_set_value(97, 1);
 
return 0;
 }
@@ -276,6 +271,9 @@ int board_init(void)
 
 int board_late_init(void)
 {
+   unsigned char buf[2];
+   int ret;
+
/* PinMux for HALTEN */
if (davinci_configure_pin_mux(halten_pin, ARRAY_SIZE(halten_pin)) != 0)
return 1;
@@ -285,6 +283,15 @@ int board_late_init(void)
 
setenv("stdout", "serial");
 
+   /* Set fixed contrast settings for LCD via I2C potentiometer */
+   buf[0] = 0x00;
+   buf[1] = 0xd7;
+   ret = i2c_write(0x2e, 6, 1, buf, 2);
+   if (ret)
+   puts("\nContrast Settings FAILED\n");
+
+   /* Set LCD_B_PWR high to power up LCD Backlight*/
+   gpio_set_value(102, 1);
return 0;
 }
 #endif /* CONFIG_BOARD_LATE_INIT */
-- 
1.7.0.4

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


[U-Boot] [PATCH 2/6] davinci: ea20: the console is always set to the serial line

2012-08-10 Thread Bastian Ruppert
Do not allow to overwrite it when video is enabled.

Signed-off-by: Bastian Ruppert 
CC: Tom Rini 
CC: Stefano Babic 
---
 board/davinci/ea20/ea20.c |   11 +--
 include/configs/ea20.h|2 ++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c
index 69307e4..0edd910 100644
--- a/board/davinci/ea20/ea20.c
+++ b/board/davinci/ea20/ea20.c
@@ -254,6 +254,15 @@ int board_early_init_f(void)
return 0;
 }
 
+/*
+ * Do not overwrite the console
+ * Use always serial for U-Boot console
+ */
+int overwrite_console(void)
+{
+   return 1;
+}
+
 int board_init(void)
 {
/* arch number of the board */
@@ -281,8 +290,6 @@ int board_late_init(void)
/* Set HALTEN to high */
gpio_direction_output(134, 1);
 
-   setenv("stdout", "serial");
-
/* Set fixed contrast settings for LCD via I2C potentiometer */
buf[0] = 0x00;
buf[1] = 0xd7;
diff --git a/include/configs/ea20.h b/include/configs/ea20.h
index a9caa81..f9a1462 100644
--- a/include/configs/ea20.h
+++ b/include/configs/ea20.h
@@ -125,6 +125,8 @@
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_CMD_BMP
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV
+#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
 #endif
 
 /*
-- 
1.7.0.4

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


[U-Boot] [PATCH 3/6] video: cfb_console: logo can be positioned via the splashpos variable

2012-08-10 Thread Bastian Ruppert
Signed-off-by: Bastian Ruppert 
CC: Anatolij Gustschin 
CC: Tom Rini 
CC: Stefano Babic 
---
 drivers/video/cfb_console.c |   61 ---
 1 files changed, 40 insertions(+), 21 deletions(-)

diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 19d061f..21b52bd 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -66,7 +66,11 @@
  * CONFIG_CONSOLE_TIME   - display time/date in upper right
  * corner, needs CONFIG_CMD_DATE and
  * CONFIG_CONSOLE_CURSOR
- * CONFIG_VIDEO_LOGO - display Linux Logo in upper left corner
+ * CONFIG_VIDEO_LOGO - display Linux Logo in upper left corner.
+ * Use CONFIG_SPLASH_SCREEN_ALIGN with
+ * environment variable "splashpos" to place
+ * the logo on other position. In this case
+ * no CONSOLE_EXTRA_INFO is possible.
  * CONFIG_VIDEO_BMP_LOGO  - use bmp_logo instead of linux_logo
  * CONFIG_CONSOLE_EXTRA_INFO  - display additional board information
  * strings that normaly goes to serial
@@ -369,6 +373,8 @@ static void *video_fb_address;  /* frame buffer address 
*/
 static void *video_console_address;/* console buffer start address */
 
 static int video_logo_height = VIDEO_LOGO_HEIGHT;
+static int video_logo_xpos;
+static int video_logo_ypos;
 
 static int __maybe_unused cursor_state;
 static int __maybe_unused old_col;
@@ -1594,40 +1600,53 @@ static void *video_logo(void)
__maybe_unused int y_off = 0;
 
 #ifdef CONFIG_SPLASH_SCREEN
-   char *s;
ulong addr;
-
-   s = getenv("splashimage");
+#endif
+#if defined(CONFIG_SPLASH_SCREEN) || defined(CONFIG_SPLASH_SCREEN_ALIGN)
+   char *s;
+#endif
+#ifdef CONFIG_SPLASH_SCREEN_ALIGN
+   s = getenv("splashpos");
if (s != NULL) {
-   int x = 0, y = 0;
+   if (s[0] == 'm')
+   video_logo_xpos = BMP_ALIGN_CENTER;
+   else
+   video_logo_xpos = simple_strtol(s, NULL, 0);
 
-   addr = simple_strtoul(s, NULL, 16);
-#ifdef CONFIG_SPLASH_SCREEN_ALIGN
-   s = getenv("splashpos");
+   s = strchr(s + 1, ',');
if (s != NULL) {
-   if (s[0] == 'm')
-   x = BMP_ALIGN_CENTER;
+   if (s[1] == 'm')
+   video_logo_ypos = BMP_ALIGN_CENTER;
else
-   x = simple_strtol(s, NULL, 0);
-
-   s = strchr(s + 1, ',');
-   if (s != NULL) {
-   if (s[1] == 'm')
-   y = BMP_ALIGN_CENTER;
-   else
-   y = simple_strtol(s + 1, NULL, 0);
-   }
+   video_logo_ypos = simple_strtol(s + 1, NULL, 0);
}
+   }
 #endif /* CONFIG_SPLASH_SCREEN_ALIGN */
+#ifdef CONFIG_SPLASH_SCREEN
+   s = getenv("splashimage");
+   if (s != NULL) {
+
+   addr = simple_strtoul(s, NULL, 16);
 
-   if (video_display_bitmap(addr, x, y) == 0) {
+
+   if (video_display_bitmap(addr,  \
+   video_logo_xpos,\
+   video_logo_ypos) == 0) {
video_logo_height = 0;
return ((void *) (video_fb_address));
}
}
 #endif /* CONFIG_SPLASH_SCREEN */
 
-   logo_plot(video_fb_address, VIDEO_COLS, 0, 0);
+   logo_plot(video_fb_address, \
+   VIDEO_COLS, \
+   video_logo_xpos,\
+   video_logo_ypos);
+
+#ifdef CONFIG_SPLASH_SCREEN_ALIGN
+   /* when using splashpos for video_logo, no console output */
+   return (video_fb_address + video_logo_height * VIDEO_LINE_LEN);
+#endif
 
sprintf(info, " %s", version_string);
 
-- 
1.7.0.4

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


[U-Boot] [PATCH 5/6] da850/omap-l138: davinci_emac: Suppress auto negotiation if needed

2012-08-10 Thread Bastian Ruppert
>From this commit id: b78375a806ed04eb22b963255cfdef8df702de47 auto
negotiation is enabled in RMII mode. Some boards based on da850 need
to suppress this procedure.

CC: Rajashekhara, Sudhakar 
CC: Lad, Prabhakar 
CC: Hadli, Manjunath 
CC: sba...@denx.de
CC: Tom Rini 
Signed-off-by: Bastian Ruppert 
---
 drivers/net/davinci_emac.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index b2516d1..fe988d7 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -897,7 +897,8 @@ int davinci_emac_initialize(void)
}
 
 #if defined(CONFIG_DRIVER_TI_EMAC_USE_RMII) && \
-   defined(CONFIG_MACH_DAVINCI_DA850_EVM)
+   defined(CONFIG_MACH_DAVINCI_DA850_EVM) && \
+   !defined(CONFIG_DRIVER_TI_EMAC_RMII_NONEG)
for (i = 0; i < num_phy; i++) {
if (phy[i].is_phy_connected(i))
phy[i].auto_negotiate(i);
-- 
1.7.0.4

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


[U-Boot] [PATCH 6/6] davinci: ea20: add some configs and default environmet variables

2012-08-10 Thread Bastian Ruppert
Signed-off-by: Bastian Ruppert 
CC: Tom Rini 
CC: Stefano Babic 
---
 include/configs/ea20.h |  106 ++--
 1 files changed, 66 insertions(+), 40 deletions(-)

diff --git a/include/configs/ea20.h b/include/configs/ea20.h
index f9a1462..373db74 100644
--- a/include/configs/ea20.h
+++ b/include/configs/ea20.h
@@ -30,6 +30,7 @@
 #define CONFIG_USE_SPIFLASH
 #defineCONFIG_SYS_USE_NAND
 #define CONFIG_DRIVER_TI_EMAC_USE_RMII
+#define CONFIG_DRIVER_TI_EMAC_RMII_NONEG
 #define CONFIG_BOARD_EARLY_INIT_F
 #define CONFIG_BOARD_LATE_INIT
 #define CONFIG_VIDEO
@@ -98,6 +99,7 @@
  * Network & Ethernet Configuration
  */
 #ifdef CONFIG_DRIVER_TI_EMAC
+#define CONFIG_EMAC_MDIO_PHY_NUM   0
 #define CONFIG_MII
 #define CONFIG_BOOTP_DEFAULT
 #define CONFIG_BOOTP_DNS
@@ -121,9 +123,11 @@
 #define CONFIG_VIDEO_DA8XX
 #define CONFIG_CFB_CONSOLE
 #define CONFIG_VGA_AS_SINGLE_DEVICE
-#define CONFIG_SPLASH_SCREEN
+#define CONFIG_SPLASH_SCREEN_ALIGN
 #define CONFIG_VIDEO_LOGO
+#define CONFIG_SYS_CONSOLE_INFO_QUIET
 #define CONFIG_VIDEO_BMP_RLE8
+#define CONFIG_VIDEO_BMP_LOGO
 #define CONFIG_CMD_BMP
 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
 #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
@@ -197,6 +201,7 @@
 
 #define CONFIG_NAND_DAVINCI
 #defineCONFIG_SYS_NAND_PAGE_2K
+#define CONFIG_SYS_NAND_NO_SUBPAGE
 #define CONFIG_SYS_NAND_CS 2
 #define CONFIG_SYS_NAND_BASE   DAVINCI_ASYNC_EMIF_DATA_CE2_BASE
 #undef CONFIG_SYS_NAND_HW_ECC
@@ -235,31 +240,39 @@
 #define xstr(s)str(s)
 #define str(s) #s
 
-
 #define CONFIG_HOSTNAME ea20
-#defineCONFIG_EXTRA_ENV_SETTINGS   
\
+#defineCONFIG_EXTRA_ENV_SETTINGS   \
"as=3\0"\
-   "netdev=eth0\0" \
+   "netdev=eth0\0" \
"nfsargs=setenv bootargs root=/dev/nfs rw " \
"nfsroot=${serverip}:${rootpath}\0" \
"rfsbargs=setenv bootargs root=/dev/nfs rw "\
"nfsroot=${serverip}:${rfsbpath}\0" \
-   "ramargs=setenv bootargs root=/dev/ram rw\0"\
-   "mtdids=nand0=davinci_nand.0\0" \
-   "mtdparts=mtdparts=davinci_nand.0:8m(Settings),8m(aKernel),"\
-   "8m(bKernel),76m(aRootfs),76m(bRootfs),-(MassSD)\0" \
+   "testrfsargs=setenv bootargs root=/dev/nfs rw " \
+   "nfsroot=${serverip}:${testrfspath}\0"  \
+   "ramargs=setenv bootargs root=/dev/ram rw initrd="  \
+   "0x${ramdisk_addr_r},4M\0"  \
+   "mtdids=nand0=davinci_nand.0\0" \
+   "serverip=192.168.5.249\0"  \
+   "ipaddr=192.168.5.248\0"\
+   "rootpath=/opt/eldk/arm\0"  \
+   "splashpos=230,180\0"   \
+   "testrfspath=/opt/eldk/test_arm\0"  \
+   "tempmac=setenv ethaddr 02:ea:20:ff:ff:ff\0"\
"nandargs=setenv bootargs rootfstype=ubifs ro chk_data_crc "\
"ubi.mtd=${as} root=ubi0:rootfs\0"  \
+   "nandrwargs=setenv bootargs rootfstype=ubifs rw chk_data_crc "  \
+   "ubi.mtd=${as} root=ubi0:rootfs\0"  \
"addip_sta=setenv bootargs ${bootargs} "\
"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"  \
":${hostname}:${netdev}:off panic=1\0"  \
"addip_dyn=setenv bootargs ${bootargs} ip=dhcp\0"   \
-   "addip=if test -n ${ipdyn};then run addip_dyn;" \
+   "addip=if test -n ${ipdyn};then run addip_dyn;" \
"else run addip_sta;fi\0"   \
"addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"  \
"addtty=setenv bootargs ${bootargs}"\
" console=${consoledev},${baudrate}n8\0"\
-   "addmisc=setenv bootargs ${bootargs} ${misc}\0" \
+   "addmisc=setenv bootargs ${bootargs} ${misc}\0" \
"addmem=setenv bootargs ${bootargs} mem=${memory}\0"\
"consoledev=ttyS0\0"\
"loadaddr=c014\0"   \
@@ -267,44 +280,57 @@
"kernel_addr_r=c070\0"  \
"hostname=" xstr(CONFIG_HOSTNAME) "\0"  \
"bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0" 

[U-Boot] [PATCH 4/6] video: cfb_console: add function to plot the logo area black

2012-08-10 Thread Bastian Ruppert
Signed-off-by: Bastian Ruppert 
CC: Anatolij Gustschin 
CC: Tom Rini 
CC: Stefano Babic 
---
 drivers/video/cfb_console.c |   46 +++---
 1 files changed, 42 insertions(+), 4 deletions(-)

diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 21b52bd..b5e8a00 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -1486,7 +1486,39 @@ int video_display_bitmap(ulong bmp_image, int x, int y)
 
 
 #ifdef CONFIG_VIDEO_LOGO
-void logo_plot(void *screen, int width, int x, int y)
+static void plot_logo_or_black(void *screen, int width, int x, int y,  \
+   int black);
+
+static void logo_plot(void *screen, int width, int x, int y)
+{
+   plot_logo_or_black(screen, width, x, y, 0);
+}
+
+static void logo_black(void)
+{
+   plot_logo_or_black(video_fb_address, \
+   VIDEO_COLS, \
+   video_logo_xpos, \
+   video_logo_ypos, \
+   1);
+}
+
+static int do_clrlogo(cmd_tbl_t *cmdtp, int flag, int argc, char * const 
argv[])
+{
+   if (argc != 1)
+   return cmd_usage(cmdtp);
+
+   logo_black();
+   return 0;
+}
+
+U_BOOT_CMD(
+  clrlogo, 1, 0, do_clrlogo,
+  "fill the boot logo area with black",
+  " "
+  );
+
+static void plot_logo_or_black(void *screen, int width, int x, int y, int 
black)
 {
 
int xcount, i;
@@ -1531,9 +1563,15 @@ void logo_plot(void *screen, int width, int x, int y)
 #endif
xcount = VIDEO_LOGO_WIDTH;
while (xcount--) {
-   r = logo_red[*source - VIDEO_LOGO_LUT_OFFSET];
-   g = logo_green[*source - VIDEO_LOGO_LUT_OFFSET];
-   b = logo_blue[*source - VIDEO_LOGO_LUT_OFFSET];
+   if (black) {
+   r = 0x00;
+   g = 0x00;
+   b = 0x00;
+   } else {
+   r = logo_red[*source - VIDEO_LOGO_LUT_OFFSET];
+   g = logo_green[*source - VIDEO_LOGO_LUT_OFFSET];
+   b = logo_blue[*source - VIDEO_LOGO_LUT_OFFSET];
+   }
 
switch (VIDEO_DATA_FORMAT) {
case GDF__8BIT_INDEX:
-- 
1.7.0.4

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


Re: [U-Boot] [PATCH v3 0/6] env: handle special variables and selective env default

2012-08-10 Thread Holger Brunck
Hi Wolfgang,

On 08/10/2012 12:26 AM, Wolfgang Denk wrote:
> In message <5024377a.8090...@keymile.com> you wrote:
>> So please step forward if there's any suggestion.
> 
> I don't have the time now for a real review, and I fear a bit we might
> break somthing.  I would suggest to proceed similar as with the ext4
> file system code: add your patches to a separate branch, so it can be
> tested easily, and if everybody feels confident with it we can merge
> it around the time when we will have a -rc1
> 

due to the fact that Gerlando is in his vacations and has therefore only little
time to do updates here I propose the following. I could prepare a branch as you
suggested based on current denx master with this changeset. But where and how
should I push it to git.denx.de? Or will you prepare this branch?

Afterwards we can see if it sufficient to go in for rc1. If not we have to wait
until Gerlando is back at end of august and shift the patch series to the next
merge window.

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


[U-Boot] [PATCH v2 1/1] USB: EHCI: Initialize multiple USB controllers at once

2012-08-10 Thread Jim Lin
Add support for command line "usb reset" or "usb start" to initialize
, "usb stop" to stop multiple USB controllers at once.
Other command like "usb tree" also supports multiple controllers.

New added definitions in header file are:
CONFIG_USB_MULTI
CONFIG_USB_MAX_CONTROLLER_COUNT

Signed-off-by: Jim Lin 
---
Changes in v2:
- Renaming from CONFIG_USB_INIT_MULTI to CONFIG_USB_MULTI
- Define CONFIG_USB_MAX_CONTROLLER_COUNT as 1 if not defined
- Remove volatile from structure ehci_ctrl of ehci-hcd.c for a checkpatch.pl 
warning

 common/cmd_usb.c|   10 +++
 common/usb.c|   98 +-
 common/usb_hub.c|4 +
 drivers/usb/host/ehci-hcd.c |  167 +++---
 drivers/usb/host/ehci.h |5 ++
 include/usb.h   |   12 +++
 6 files changed, 251 insertions(+), 45 deletions(-)

diff --git a/common/cmd_usb.c b/common/cmd_usb.c
index a8e3ae5..8d3093b 100644
--- a/common/cmd_usb.c
+++ b/common/cmd_usb.c
@@ -554,7 +554,17 @@ int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char * 
const argv[])
}
if (strncmp(argv[1], "tree", 4) == 0) {
printf("\nDevice Tree:\n");
+#ifdef CONFIG_USB_MULTI
+   for (i = 0; i < USB_MAX_DEVICE; i++) {
+   dev = usb_get_dev_index(i);
+   if (dev == NULL)
+   break;
+   if (dev->parent == NULL)
+   usb_show_tree(dev);
+   }
+#else
usb_show_tree(usb_get_dev_index(0));
+#endif
return 0;
}
if (strncmp(argv[1], "inf", 3) == 0) {
diff --git a/common/usb.c b/common/usb.c
index 1b40228..065c70c 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -77,6 +77,89 @@ static int asynch_allowed;
 
 char usb_started; /* flag for the started/stopped USB status */
 
+#ifdef CONFIG_USB_MULTI
+/***
+ * Init USB Device
+ */
+#ifndef CONFIG_USB_MAX_CONTROLLER_COUNT
+#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
+#endif
+
+int usb_init(void)
+{
+   void *ctrl;
+   int i;
+   struct usb_device *dev;
+
+   running = 0;
+   dev_index = 0;
+   asynch_allowed = 1;
+   usb_hub_reset();
+
+   /* first make all devices unknown */
+   for (i = 0; i < USB_MAX_DEVICE; i++) {
+   memset(&usb_dev[i], 0, sizeof(struct usb_device));
+   usb_dev[i].devnum = -1;
+   }
+
+   /* init low_level USB */
+   printf("USB:   ");
+   for (i = 0; i < CONFIG_USB_MAX_CONTROLLER_COUNT; i++) {
+   /* init low_level USB */
+   ctrl = usb_lowlevel_init(i);
+   /*
+* if lowlevel init is OK, scan the bus for devices
+* i.e. search HUBs and configure them
+*/
+   if (ctrl) {
+   running = 1;
+
+   printf("scanning bus for devices... ");
+   dev = usb_alloc_new_device(ctrl);
+   /*
+* device 0 is always present
+* (root hub, so let it analyze)
+*/
+   if (dev)
+   usb_new_device(dev);
+   }
+   }
+
+   if (running) {
+   if (!dev_index)
+   printf("No USB Device found\n");
+   else
+   printf("%d USB Device(s) found\n", dev_index);
+#ifdef CONFIG_USB_KEYBOARD
+   drv_usb_kbd_init();
+#endif
+   USB_PRINTF("scan end\n");
+   usb_started = 1;
+   return 0;
+   } else {
+   printf("Error, couldn't init Lowlevel part\n");
+   usb_started = 0;
+   return -1;
+   }
+}
+
+/**
+ * Stop USB this stops the LowLevel Part and deregisters USB devices.
+ */
+int usb_stop(void)
+{
+   int i;
+
+   if (usb_started) {
+   asynch_allowed = 1;
+   usb_started = 0;
+   usb_hub_reset();
+   for (i = 0; i < CONFIG_USB_MAX_CONTROLLER_COUNT; i++)
+   usb_lowlevel_stop(i);
+   }
+   return 0;
+}
+#else
 /**
  * some forward declerations...
  */
@@ -127,6 +210,7 @@ int usb_stop(void)
}
return res;
 }
+#endif
 
 /*
  * disables the asynch behaviour of the control message. This is used for data
@@ -750,11 +834,18 @@ struct usb_device *usb_get_dev_index(int index)
return &usb_dev[index];
 }
 
-
+#ifdef CONFIG_USB_MULTI
+/* Save input pointer 'controller' into device structure.
+ * returns a pointer of a new device structure or NULL, if
+ * no device struct is available
+ */
+struct usb_device *usb_alloc_new_device(void *

[U-Boot] [PATCH 1/1] tegra20: Initialize multiple USB controllers at once

2012-08-10 Thread Jim Lin
Add support for command line "usb reset" or "usb start" to initialize
, "usb stop" to stop multiple USB controllers at once.
Other commands like "usb tree" also support multiple controllers.

Example to add definitions in header file like include/configs/seaboard.h are:
define CONFIG_USB_MULTI
define CONFIG_USB_MAX_CONTROLLER_COUNT 3

Signed-off-by: Jim Lin 
---
 arch/arm/cpu/armv7/tegra20/usb.c|   15 +++
 arch/arm/include/asm/arch-tegra20/usb.h |4 
 drivers/usb/host/ehci-tegra.c   |   15 +++
 3 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/armv7/tegra20/usb.c b/arch/arm/cpu/armv7/tegra20/usb.c
index 178bb13..141d608 100644
--- a/arch/arm/cpu/armv7/tegra20/usb.c
+++ b/arch/arm/cpu/armv7/tegra20/usb.c
@@ -352,7 +352,11 @@ int tegrausb_start_port(unsigned portnum, u32 *hccr, u32 
*hcor)
 
if (portnum >= port_count)
return -1;
+#ifdef CONFIG_USB_MULTI
+   tegrausb_stop_port(portnum);
+#else
tegrausb_stop_port();
+#endif
set_host_mode(&port[portnum]);
 
usbctlr = port[portnum].reg;
@@ -362,6 +366,16 @@ int tegrausb_start_port(unsigned portnum, u32 *hccr, u32 
*hcor)
return 0;
 }
 
+#ifdef CONFIG_USB_MULTI
+int tegrausb_stop_port(unsigned portnum)
+{
+   struct usb_ctlr *usbctlr;
+
+   if (portnum >= port_count)
+   return -1;
+
+   usbctlr = port[portnum].reg;
+#else
 int tegrausb_stop_port(void)
 {
struct usb_ctlr *usbctlr;
@@ -370,6 +384,7 @@ int tegrausb_stop_port(void)
return -1;
 
usbctlr = port[port_current].reg;
+#endif
 
/* Stop controller */
writel(0, &usbctlr->usb_cmd);
diff --git a/arch/arm/include/asm/arch-tegra20/usb.h 
b/arch/arm/include/asm/arch-tegra20/usb.h
index 638033b..e7bc167 100644
--- a/arch/arm/include/asm/arch-tegra20/usb.h
+++ b/arch/arm/include/asm/arch-tegra20/usb.h
@@ -247,6 +247,10 @@ int tegrausb_start_port(unsigned portnum, u32 *hccr, u32 
*hcor);
  *
  * @return 0 if ok, -1 if no port was active
  */
+#ifdef CONFIG_USB_MULTI
+int tegrausb_stop_port(unsigned portnum);
+#else
 int tegrausb_stop_port(void);
+#endif
 
 #endif /* _TEGRA_USB_H_ */
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 4646b29..fa2e1b1 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -50,6 +50,12 @@ void ehci_powerup_fixup(uint32_t *status_reg, uint32_t *reg)
  * Create the appropriate control structures to manage
  * a new EHCI host controller.
  */
+#ifdef CONFIG_USB_MULTI
+int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor)
+{
+   return tegrausb_start_port(index, hccr, hcor);
+}
+#else
 int ehci_hcd_init(void)
 {
u32 our_hccr, our_hcor;
@@ -66,13 +72,22 @@ int ehci_hcd_init(void)
 
return 0;
 }
+#endif
 
 /*
  * Destroy the appropriate control structures corresponding
  * the the EHCI host controller.
  */
+#ifdef CONFIG_USB_MULTI
+int ehci_hcd_stop(int index)
+{
+   tegrausb_stop_port(index);
+   return 0;
+}
+#else
 int ehci_hcd_stop(void)
 {
tegrausb_stop_port();
return 0;
 }
+#endif
-- 
1.7.3


---
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
---
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 0/4] arm:samsung: Cleanup code for trats and universal boards

2012-08-10 Thread Piotr Wilczek
This patch fixes SDRAM configuration and size visibility for trats board.
Common code is set for trats and universal boards.
Low level initialisation in U-boot is eliminated for universal_c210 board.

Piotr Wilczek (4):
  arm:exynos4:trats: Correct SDRAM configuration for trats
  arm:exynos4:trats: Fix SDRAM size
  arm:exynos4:trats&universal_c210: Set common code for trats and
universal_c210 boards
  arm:exynos4:universal_c210: Eliminate low level initialisation

 board/samsung/exynos4_common/exynos4_common.c |  139 +
 board/samsung/trats/trats.c   |   98 +--
 board/samsung/universal_c210/Makefile |1 -
 board/samsung/universal_c210/lowlevel_init.S  |  395 -
 board/samsung/universal_c210/universal.c  |  105 +--
 include/configs/s5pc210_universal.h   |2 +
 include/configs/trats.h   |   17 +-
 7 files changed, 163 insertions(+), 594 deletions(-)
 create mode 100644 board/samsung/exynos4_common/exynos4_common.c
 delete mode 100644 board/samsung/universal_c210/lowlevel_init.S

-- 
1.7.5.4

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


[U-Boot] [PATCH 1/4] arm:exynos4:trats: Correct SDRAM configuration for trats

2012-08-10 Thread Piotr Wilczek
SDRAM setup alike to ORIGEN Dev board.

Signed-off-by: Piotr Wilczek 
Signed-off-by: Kyungmin Park 
CC: Minkyu Kang 
---
 include/configs/trats.h |   17 +++--
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/include/configs/trats.h b/include/configs/trats.h
index 185cb68..f391227 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -170,12 +170,17 @@
 /* Stack sizes */
 #define CONFIG_STACKSIZE   (256 << 10) /* regular stack 256KB */
 
-/* TRATS has 2 banks of DRAM */
-#define CONFIG_NR_DRAM_BANKS   2
-#define PHYS_SDRAM_1   CONFIG_SYS_SDRAM_BASE   /* LDDDR2 DMC 0 */
-#define PHYS_SDRAM_1_SIZE  (512 << 20) /* 512 MB in CS 0 */
-#define PHYS_SDRAM_2   0x5000  /* LPDDR2 DMC 1 */
-#define PHYS_SDRAM_2_SIZE  (512 << 20) /* 512 MB in CS 0 */
+/* TRATS has 4 banks of DRAM */
+#define CONFIG_NR_DRAM_BANKS   4
+#define SDRAM_BANK_SIZE(256UL << 20UL) /* 256 MB */
+#define PHYS_SDRAM_1   CONFIG_SYS_SDRAM_BASE
+#define PHYS_SDRAM_1_SIZE  SDRAM_BANK_SIZE
+#define PHYS_SDRAM_2   (CONFIG_SYS_SDRAM_BASE + SDRAM_BANK_SIZE)
+#define PHYS_SDRAM_2_SIZE  SDRAM_BANK_SIZE
+#define PHYS_SDRAM_3   (CONFIG_SYS_SDRAM_BASE + (2 * SDRAM_BANK_SIZE))
+#define PHYS_SDRAM_3_SIZE  SDRAM_BANK_SIZE
+#define PHYS_SDRAM_4   (CONFIG_SYS_SDRAM_BASE + (3 * SDRAM_BANK_SIZE))
+#define PHYS_SDRAM_4_SIZE  SDRAM_BANK_SIZE
 
 #define CONFIG_SYS_MEM_TOP_HIDE(1 << 20)   /* ram console 
*/
 
-- 
1.7.5.4

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


[U-Boot] [PATCH 2/4] arm:exynos4:trats: Fix SDRAM size

2012-08-10 Thread Piotr Wilczek
Now full 1GiB is visible

Signed-off-by: Piotr Wilczek 
Signed-off-by: Kyungmin Park 
CC: Minkyu Kang 
---
 board/samsung/trats/trats.c |8 +++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index a8b2b11..f5df56c 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -76,7 +76,9 @@ int board_init(void)
 int dram_init(void)
 {
gd->ram_size = get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE) +
-   get_ram_size((long *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE);
+   get_ram_size((long *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE) +
+   get_ram_size((long *)PHYS_SDRAM_3, PHYS_SDRAM_3_SIZE) +
+   get_ram_size((long *)PHYS_SDRAM_4, PHYS_SDRAM_4_SIZE);
 
return 0;
 }
@@ -87,6 +89,10 @@ void dram_init_banksize(void)
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
+   gd->bd->bi_dram[2].start = PHYS_SDRAM_3;
+   gd->bd->bi_dram[2].size = PHYS_SDRAM_3_SIZE;
+   gd->bd->bi_dram[3].start = PHYS_SDRAM_4;
+   gd->bd->bi_dram[3].size = PHYS_SDRAM_4_SIZE;
 }
 
 static unsigned int get_hw_revision(void)
-- 
1.7.5.4

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


[U-Boot] [PATCH 3/4] arm:exynos4: Set common code for trats and universal_c210 boards

2012-08-10 Thread Piotr Wilczek
Boards trats and universal are very similar resulting in some common code.
That common code is moved to exynos4_common/exynos4_common.c

Signed-off-by: Piotr Wilczek 
Signed-off-by: Kyungmin Park 
CC: Minkyu Kang 
---
 board/samsung/exynos4_common/exynos4_common.c |  139 +
 board/samsung/trats/trats.c   |  104 +--
 board/samsung/universal_c210/universal.c  |   98 +-
 3 files changed, 143 insertions(+), 198 deletions(-)
 create mode 100644 board/samsung/exynos4_common/exynos4_common.c

diff --git a/board/samsung/exynos4_common/exynos4_common.c 
b/board/samsung/exynos4_common/exynos4_common.c
new file mode 100644
index 000..f2413e5
--- /dev/null
+++ b/board/samsung/exynos4_common/exynos4_common.c
@@ -0,0 +1,139 @@
+/*
+ * Copyright (C) 2011 Samsung Electronics
+ * Heungjun Kim 
+ * Kyungmin Park 
+ * Donghwa Lee 
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifdef CONFIG_REVISION_TAG
+u32 get_board_rev(void)
+{
+   return board_rev;
+}
+#endif
+
+int dram_init(void)
+{
+   gd->ram_size= get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE)
+   + get_ram_size((long *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE);
+#if CONFIG_NR_DRAM_BANKS == 4
+   gd->ram_size+= get_ram_size((long *)PHYS_SDRAM_3, PHYS_SDRAM_3_SIZE)
+   + get_ram_size((long *)PHYS_SDRAM_4, PHYS_SDRAM_4_SIZE);
+#endif
+   return 0;
+}
+
+void dram_init_banksize(void)
+{
+   gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+   gd->bd->bi_dram[0].size = get_ram_size((long *)PHYS_SDRAM_1, \
+   PHYS_SDRAM_1_SIZE);
+   gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
+   gd->bd->bi_dram[1].size = get_ram_size((long *)PHYS_SDRAM_2, \
+   PHYS_SDRAM_2_SIZE);
+#if CONFIG_NR_DRAM_BANKS == 4
+   gd->bd->bi_dram[2].start = PHYS_SDRAM_3;
+   gd->bd->bi_dram[2].size = get_ram_size((long *)PHYS_SDRAM_3, \
+   PHYS_SDRAM_3_SIZE);
+   gd->bd->bi_dram[3].start = PHYS_SDRAM_4;
+   gd->bd->bi_dram[3].size = get_ram_size((long *)PHYS_SDRAM_4, \
+   PHYS_SDRAM_4_SIZE);
+#endif
+}
+
+int exynos4_mmc_init(struct exynos4_gpio_part2 *gpio2)
+{
+   int i, err;
+
+   /*
+* eMMC GPIO:
+* SDR 8-bit@48MHz at MMC0
+* GPK0[0]  SD_0_CLK(2)
+* GPK0[1]  SD_0_CMD(2)
+* GPK0[2]  SD_0_CDn-> Not used
+* GPK0[3:6]SD_0_DATA[0:3](2)
+* GPK1[3:6]SD_0_DATA[0:3](3)
+*
+* DDR 4-bit@26MHz at MMC4
+* GPK0[0]  SD_4_CLK(3)
+* GPK0[1]  SD_4_CMD(3)
+* GPK0[2]  SD_4_CDn-> Not used
+* GPK0[3:6]SD_4_DATA[0:3](3)
+* GPK1[3:6]SD_4_DATA[4:7](4)
+*/
+   for (i = 0; i < 7; i++) {
+   if (i == 2)
+   continue;
+   /* GPK0[0:6] special function 2 */
+   s5p_gpio_cfg_pin(&gpio2->k0, i, 0x2);
+   /* GPK0[0:6] pull disable */
+   s5p_gpio_set_pull(&gpio2->k0, i, GPIO_PULL_NONE);
+   /* GPK0[0:6] drv 4x */
+   s5p_gpio_set_drv(&gpio2->k0, i, GPIO_DRV_4X);
+   }
+
+   for (i = 3; i < 7; i++) {
+   /* GPK1[3:6] special function 3 */
+   s5p_gpio_cfg_pin(&gpio2->k1, i, 0x3);
+   /* GPK1[3:6] pull disable */
+   s5p_gpio_set_pull(&gpio2->k1, i, GPIO_PULL_NONE);
+   /* GPK1[3:6] drv 4x */
+   s5p_gpio_set_drv(&gpio2->k1, i, GPIO_DRV_4X);
+   }
+
+   /* T-flash detect */
+   s5p_gpio_cfg_pin(&gpio2->x3, 4, 0xf);
+   s5p_gpio_set_pull(&gpio2->x3, 4, GPIO_PULL_UP);
+
+   /*
+* MMC device init
+* mmc0  : eMMC (8-bit buswidth)
+* mmc2  : SD card (4-bit buswidth)
+*/
+   err = s5p_mmc_init(0, 8);
+
+   /*
+* Check the T-flash  detect pin
+* GPX3[4] T-flash detect pin
+*/
+   if (!s5p_gpio_get_value(&gpio2->x3, 4)) {
+   /*
+* SD ca

[U-Boot] [PATCH 4/4] arm:exynos4:universal_c210: Eliminate low level initialisation

2012-08-10 Thread Piotr Wilczek
The low level initialisation is not necessary in U-boot
since it is done by another bootloader.

Signed-off-by: Piotr Wilczek 
Signed-off-by: Kyungmin Park 
CC: Minkyu Kang 
---
 board/samsung/universal_c210/Makefile|1 -
 board/samsung/universal_c210/lowlevel_init.S |  395 --
 board/samsung/universal_c210/universal.c |7 +
 include/configs/s5pc210_universal.h  |2 +
 4 files changed, 9 insertions(+), 396 deletions(-)
 delete mode 100644 board/samsung/universal_c210/lowlevel_init.S

diff --git a/board/samsung/universal_c210/Makefile 
b/board/samsung/universal_c210/Makefile
index bfec08f..587cc1b 100644
--- a/board/samsung/universal_c210/Makefile
+++ b/board/samsung/universal_c210/Makefile
@@ -26,7 +26,6 @@ include $(TOPDIR)/config.mk
 LIB= $(obj)lib$(BOARD).o
 
 COBJS-y:= universal.o onenand.o
-SOBJS  := lowlevel_init.o
 
 SRCS:= $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS-y))
diff --git a/board/samsung/universal_c210/lowlevel_init.S 
b/board/samsung/universal_c210/lowlevel_init.S
deleted file mode 100644
index dc7f69e..000
--- a/board/samsung/universal_c210/lowlevel_init.S
+++ /dev/null
@@ -1,395 +0,0 @@
-/*
- * Lowlevel setup for universal board based on EXYNOS4210
- *
- * Copyright (C) 2010 Samsung Electronics
- * Kyungmin Park 
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include 
-#include 
-#include 
-#include 
-
-/*
- * Register usages:
- *
- * r5 has zero always
- * r7 has GPIO part1 base 0x1140
- * r6 has GPIO part2 base 0x1100
- */
-
-   .globl lowlevel_init
-lowlevel_init:
-   mov r11, lr
-
-   /* r5 has always zero */
-   mov r5, #0
-
-   ldr r7, =EXYNOS4_GPIO_PART1_BASE
-   ldr r6, =EXYNOS4_GPIO_PART2_BASE
-
-   /* System Timer */
-   ldr r0, =EXYNOS4_SYSTIMER_BASE
-   ldr r1, =0x5000
-   str r1, [r0, #0x0]
-   ldr r1, =0x
-   str r1, [r0, #0x8]
-   ldr r1, =0x49
-   str r1, [r0, #0x4]
-
-   /* PMIC manual reset */
-   /* nPOWER: XEINT_23: GPX2[7] */
-   add r0, r6, #0xC40  @ EXYNOS4_GPIO_X2_OFFSET
-   ldr r1, [r0, #0x0]
-   bic r1, r1, #(0xf << 28)@ 28 = 7 * 4-bit
-   orr r1, r1, #(0x1 << 28)@ Output
-   str r1, [r0, #0x0]
-
-   ldr r1, [r0, #0x4]
-   orr r1, r1, #(1 << 7)   @ 7 = 7 * 1-bit
-   str r1, [r0, #0x4]
-
-   /* init system clock */
-   bl  system_clock_init
-
-   /* Disable Watchdog */
-   ldr r0, =EXYNOS4_WATCHDOG_BASE  @0x1006
-   str r5, [r0]
-
-   /* UART */
-   bl  uart_asm_init
-
-   /* PMU init */
-   bl  system_power_init
-
-   bl  tzpc_init
-
-   mov lr, r11
-   mov pc, lr
-   nop
-   nop
-   nop
-
-/*
- * uart_asm_init: Initialize UART's pins
- */
-uart_asm_init:
-   /*
-* setup UART0-UART4 GPIOs (part1)
-* GPA1CON[3] = I2C_3_SCL (3)
-* GPA1CON[2] = I2C_3_SDA (3)
-*/
-   mov r0, r7
-   ldr r1, =0x
-   str r1, [r0, #0x00] @ EXYNOS4_GPIO_A0_OFFSET
-   ldr r1, =0x00223322
-   str r1, [r0, #0x20] @ EXYNOS4_GPIO_A1_OFFSET
-
-   /* UART_SEL GPY4[7] (part2) at EXYNOS4 */
-   add r0, r6, #0x1A0  @ EXYNOS4_GPIO_Y4_OFFSET
-   ldr r1, [r0, #0x0]
-   bic r1, r1, #(0xf << 28)@ 28 = 7 * 4-bit
-   orr r1, r1, #(0x1 << 28)
-   str r1, [r0, #0x0]
-
-   ldr r1, [r0, #0x8]
-   bic r1, r1, #(0x3 << 14)@ 14 = 7 * 2-bit
-   orr r1, r1, #(0x3 << 14)@ Pull-up enabled
-   str r1, [r0, #0x8]
-
-   ldr r1, [r0, #0x4]
-   orr r1, r1, #(1 << 7)   @ 7 = 7 * 1-bit
-   str r1, [r0, #0x4]
-
-   mov pc, lr
-   nop
-   nop
-   nop
-
-system_clock_init:
-   ldr r0, =EXYNOS4_CLOCK_BASE
-
-   /* APLL(1), MPLL(1), CORE(0), HPM(0) */
-   ldr r1, =0x0101
-   ldr r2, =0x14200

Re: [U-Boot] [PATCH 0/4] EXYNOS5: Add GPIO numbering feature

2012-08-10 Thread Minkyu Kang
Dear Rajeshwari Birje,

On 10 August 2012 14:22, Rajeshwari Birje  wrote:
> Hi All,
>
> Do let me know if you have comments on these patch set.
>
> Regards,
> Rajeshwari Shinde
>
> On Mon, Aug 6, 2012 at 6:35 PM, Rajeshwari Shinde
>  wrote:
>> This patchset adds GPIO numbering feature where pinmux setting
>> can be done just by seding the pin munber and we do not have to
>> remember which bank it belongs to.
>>

Hm, I don't know about the need of this patch.
You said "we do not have to remember which bank it belongs to".
but, what is the different "gpio1->a0" and "GPIO_A00"?

Also, new functions are almost same with current functions, do we
really need this patch?

Thanks.
Minkyu Kang.
-- 
from. prom.
www.promsoft.net
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v5 1/1] zfs: Add ZFS filesystem support

2012-08-10 Thread Jorgen Lundman


Applied, thanks.

Best regards,



That is the best news ever, thanks! Also thanks to Graeme for all the help.

Lund

--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] sf: stmicro: Add support for N25Q128A

2012-08-10 Thread Michal Simek
Add support for Numonyx N25Q128A SPI flash.

Signed-off-by: Michal Simek 
---
 drivers/mtd/spi/stmicro.c |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/spi/stmicro.c b/drivers/mtd/spi/stmicro.c
index 600e531..30b626a 100644
--- a/drivers/mtd/spi/stmicro.c
+++ b/drivers/mtd/spi/stmicro.c
@@ -99,6 +99,12 @@ static const struct stmicro_spi_flash_params 
stmicro_spi_flash_table[] = {
.name = "N25Q128",
},
{
+   .id = 0xbb18,
+   .pages_per_sector = 256,
+   .nr_sectors = 256,
+   .name = "N25Q128A",
+   },
+   {
.id = 0xba19,
.pages_per_sector = 256,
.nr_sectors = 512,
-- 
1.7.0.4

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


[U-Boot] [PATCH][v4] powerpc/CoreNet: add tool to support pbl image build.

2012-08-10 Thread Shaohui Xie
Provides a tool to build boot Image for PBL(Pre boot loader) which is
used on Freescale CoreNet SoCs, PBL can be used to load some instructions
and/or data for pre-initialization. The default output image is u-boot.pbl,
for more details please refer to doc/README.pblimage.

Signed-off-by: Shaohui Xie 
---
changes for v4:
1. provid default RCW config file for p3041, p4080, p5020.

changes for v3:
1. dump config.mk, aligned to comment of Wolfgang Denk;
2. split one configuration file to two, one is for RCW,
one is for PBI commands, add second entry in mkimage
for second configuration file, aligned to
comment of Wood Scott;
3. refined the README.pblimage;

 Makefile   |6 +
 board/freescale/corenet_ds/pbi.cfg |   51 +
 board/freescale/corenet_ds/rcw_p3041ds.cfg |   11 +
 board/freescale/corenet_ds/rcw_p4080ds.cfg |   11 +
 board/freescale/corenet_ds/rcw_p5020ds.cfg |   11 +
 common/image.c |1 +
 doc/README.pblimage|  114 ++
 include/configs/corenet_ds.h   |8 +
 include/image.h|1 +
 tools/Makefile |2 +
 tools/mkimage.c|   15 ++
 tools/mkimage.h|3 +
 tools/pblimage.c   |  331 
 tools/pblimage.h   |   36 +++
 14 files changed, 601 insertions(+), 0 deletions(-)
 create mode 100644 board/freescale/corenet_ds/pbi.cfg
 create mode 100644 board/freescale/corenet_ds/rcw_p3041ds.cfg
 create mode 100644 board/freescale/corenet_ds/rcw_p4080ds.cfg
 create mode 100644 board/freescale/corenet_ds/rcw_p5020ds.cfg
 create mode 100644 doc/README.pblimage
 create mode 100644 tools/pblimage.c
 create mode 100644 tools/pblimage.h

diff --git a/Makefile b/Makefile
index 73c8e39..d518588 100644
--- a/Makefile
+++ b/Makefile
@@ -427,6 +427,11 @@ $(obj)u-boot.kwb:   $(obj)u-boot.bin
$(obj)tools/mkimage -n $(CONFIG_SYS_KWD_CONFIG) -T kwbimage \
-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -d $< $@
 
+$(obj)u-boot.pbl:  $(obj)u-boot.bin
+   $(obj)tools/mkimage -n $(CONFIG_PBLRCW_CONFIG) \
+   -R $(CONFIG_PBLPBI_CONFIG) -T pblimage \
+   -d $< $@
+
 $(obj)u-boot.sha1: $(obj)u-boot.bin
$(obj)tools/ubsha1 $(obj)u-boot.bin
 
@@ -787,6 +792,7 @@ clobber:tidy
$(obj)cscope.* $(obj)*.*~
@rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL-y)
@rm -f $(obj)u-boot.kwb
+   @rm -f $(obj)u-boot.pbl
@rm -f $(obj)u-boot.imx
@rm -f $(obj)u-boot.ubl
@rm -f $(obj)u-boot.ais
diff --git a/board/freescale/corenet_ds/pbi.cfg 
b/board/freescale/corenet_ds/pbi.cfg
new file mode 100644
index 000..50806ca
--- /dev/null
+++ b/board/freescale/corenet_ds/pbi.cfg
@@ -0,0 +1,51 @@
+#
+# Copyright 2012 Freescale Semiconductor, Inc.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301 USA
+#
+# Refer docs/README.pblimage for more details about how-to configure
+# and create PBL boot image
+#
+
+#PBI commands
+#Initialize CPC1 as 1MB SRAM
+0901 00200400
+09138000 
+091380c0 0100
+09010100 
+09010104 fffb
+09010f00 0800
+0901 8000
+#Configure LAW for CPC1
+09000d00 
+09000d04 fff0
+09000d08 8113
+0910 
+0914 ff00
+0918 8100
+#Initialize eSPI controller, default configuration is slow for eSPI to
+#load data, this configuration comes from u-boot eSPI driver.
+0911 8403
+09110020 2d170008
+09110024 0018
+09110028 0018
+0911002c 0018
+#Flush PBL data
+09138000 
+091380c0 
diff --git a/board/freescale/corenet_ds/rcw_p3041ds.cfg 
b/board/freescale/corenet_ds/rcw_p3041ds.cfg
new file mode 100644
index 000..8813156
--- /dev/null
+++ b/board/freescale/corenet_ds/rcw_p3041ds.cfg
@@ -0,0 +1,11 @@
+#
+# Default RCW for P3041DS.
+#
+
+#PBL preamble and RCW header
+aa55aa55 010e0100
+#64 bytes RCW data
+1260  241C 
+D8984A01 03002000 5800 4100
+   1007
+   

[U-Boot] Change console output from DUART to APPUART

2012-08-10 Thread mad mad
Hi,

I'm new to this list and don't know whether this is the right place to ask
this question.

I have a board nearly equal to the mx28evk, excepting that I need to use
AUART3 instead of DUART for the console output.

My idea was to simply to change CONFIG_PL01x_PORTS in the board
configuration from MXS_UARTDBG_BASE to MXS_UARTAPP3_BASE and keep the
CONFIG_CONS_INDEX at 0. But this isn't working.

Now, i have no idea how to continue.

I searched the documentation, the source code and the internet for days,
but I can't find any useful solution. Maybe someone can give me a clue how
to solve this issue.

Thanks!

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


Re: [U-Boot] [PATCH] part_mac: dcache: allocate cacheline-aligned buffers

2012-08-10 Thread Benoît Thébaudeau
On Sat, Aug 4, 2012 at 01:05:03 AM, Benoît Thébaudeau wrote:
> On Fri, Jul 13, 2012 at 09:31:03 PM, Benoît Thébaudeau wrote:
> > This patch forces the correct alignment for DMA operations of
> > buffers
> > used by
> > part_mac.c.
> > 
> > Signed-off-by: Benoît Thébaudeau 
> > Cc: Wolfgang Denk 
> > ---
> >  {u-boot.orig => u-boot}/disk/part_mac.c |   68
> >  +++
> >  1 file changed, 34 insertions(+), 34 deletions(-)
> > 
> > diff --git u-boot.orig/disk/part_mac.c u-boot/disk/part_mac.c
> > index c1afc8c..cb443ac 100644
> > --- u-boot.orig/disk/part_mac.c
> > +++ u-boot/disk/part_mac.c
> > @@ -60,23 +60,23 @@ static int part_mac_read_pdb (block_dev_desc_t
> > *dev_desc, int part, mac_partitio
> >   */
> >  int test_part_mac (block_dev_desc_t *dev_desc)
> >  {
> > -   mac_driver_desc_t   ddesc;
> > -   mac_partition_t mpart;
> > +   ALLOC_CACHE_ALIGN_BUFFER(mac_driver_desc_t, ddesc, 1);
> > +   ALLOC_CACHE_ALIGN_BUFFER(mac_partition_t, mpart, 1);
> > ulong i, n;
> >  
> > -   if (part_mac_read_ddb (dev_desc, &ddesc)) {
> > +   if (part_mac_read_ddb (dev_desc, ddesc)) {
> > /* error reading Driver Desriptor Block, or no valid Signature
> > */
> > return (-1);
> > }
> >  
> > n = 1;  /* assuming at least one partition */
> > for (i=1; i<=n; ++i) {
> > -   if ((dev_desc->block_read(dev_desc->dev, i, 1, (ulong *)&mpart)
> > !=
> > 1) ||
> > -   (mpart.signature != MAC_PARTITION_MAGIC) ) {
> > +   if ((dev_desc->block_read(dev_desc->dev, i, 1, (ulong *)mpart)
> > !=
> > 1) ||
> > +   (mpart->signature != MAC_PARTITION_MAGIC) ) {
> > return (-1);
> > }
> > /* update partition count */
> > -   n = mpart.map_count;
> > +   n = mpart->map_count;
> > }
> > return (0);
> >  }
> > @@ -85,20 +85,20 @@ int test_part_mac (block_dev_desc_t *dev_desc)
> >  void print_part_mac (block_dev_desc_t *dev_desc)
> >  {
> > ulong i, n;
> > -   mac_driver_desc_t   ddesc;
> > -   mac_partition_t mpart;
> > +   ALLOC_CACHE_ALIGN_BUFFER(mac_driver_desc_t, ddesc, 1);
> > +   ALLOC_CACHE_ALIGN_BUFFER(mac_partition_t, mpart, 1);
> > ldiv_t mb, gb;
> >  
> > -   if (part_mac_read_ddb (dev_desc, &ddesc)) {
> > +   if (part_mac_read_ddb (dev_desc, ddesc)) {
> > /* error reading Driver Desriptor Block, or no valid Signature
> > */
> > return;
> > }
> >  
> > -   n  = ddesc.blk_count;
> > +   n  = ddesc->blk_count;
> >  
> > -   mb = ldiv(n, ((1024 * 1024) / ddesc.blk_size)); /* MB */
> > +   mb = ldiv(n, ((1024 * 1024) / ddesc->blk_size)); /* MB */
> > /* round to 1 digit */
> > -   mb.rem *= 10 * ddesc.blk_size;
> > +   mb.rem *= 10 * ddesc->blk_size;
> > mb.rem += 512 * 1024;
> > mb.rem /= 1024 * 1024;
> >  
> > @@ -112,10 +112,10 @@ void print_part_mac (block_dev_desc_t
> > *dev_desc)
> > "DeviceType=0x%x, DeviceId=0x%x\n\n"
> > "   #: type name"
> > "   length   base   (size)\n",
> > -   ddesc.blk_size,
> > -   ddesc.blk_count,
> > +   ddesc->blk_size,
> > +   ddesc->blk_count,
> > mb.quot, mb.rem, gb.quot, gb.rem,
> > -   ddesc.dev_type, ddesc.dev_id
> > +   ddesc->dev_type, ddesc->dev_id
> > );
> >  
> > n = 1;  /* assuming at least one partition */
> > @@ -124,25 +124,25 @@ void print_part_mac (block_dev_desc_t
> > *dev_desc)
> > char c;
> >  
> > printf ("%4ld: ", i);
> > -   if (dev_desc->block_read (dev_desc->dev, i, 1, (ulong *)&mpart)
> > !=
> > 1) {
> > +   if (dev_desc->block_read (dev_desc->dev, i, 1, (ulong *)mpart)
> > !=
> > 1) {
> > printf ("** Can't read Partition Map on %d:%ld **\n",
> > dev_desc->dev, i);
> > return;
> > }
> >  
> > -   if (mpart.signature != MAC_PARTITION_MAGIC) {
> > +   if (mpart->signature != MAC_PARTITION_MAGIC) {
> > printf ("** Bad Signature on %d:%ld - "
> > "expected 0x%04x, got 0x%04x\n",
> > -   dev_desc->dev, i, MAC_PARTITION_MAGIC, 
> > mpart.signature);
> > +   dev_desc->dev, i, MAC_PARTITION_MAGIC, 
> > mpart->signature);
> > return;
> > }
> >  
> > /* update partition count */
> > -   n = mpart.map_count;
> > +   n = mpart->map_count;
> >  
> > c  = 'k';
> > -   bytes  = mpart.block_count;
> > -   bytes /= (1024 / ddesc.blk_size);  /* kB; assumes blk_size ==
> > 512
> > */
> > +   bytes  = mpart->block_count;
> > +   bytes /= (1024 / ddesc->blk_size);  /* kB; assumes blk_size ==
> > 512
> > */
> > if (bytes >= 1024) {
> >   

Re: [U-Boot] [PATCH] rtc: pcf8563: Make century compatible with Linux

2012-08-10 Thread Benoît Thébaudeau
On Sat, Aug 4, 2012 at 01:06:16 AM, Benoît Thébaudeau wrote:
> On Fri, Jul 20, 2012 at 04:05:36 PM, Benoît Thébaudeau wrote:
> > This driver uses the century bit of this RTC in the opposite way
> > Linux does.
> > From Linux's rtc-pcf8563.c:
> > /*
> >  * The meaning of MO_C bit varies by the chip type.
> >  * From PCF8563 datasheet: this bit is toggled when the years
> >  * register overflows from 99 to 00
> >  *   0 indicates the century is 20xx
> >  *   1 indicates the century is 19xx
> >  * From RTC8564 datasheet: this bit indicates change of
> >  * century. When the year digit data overflows from 99 to 00,
> >  * this bit is set. By presetting it to 0 while still in the
> >  * 20th century, it will be set in year 2000, ...
> >  * There seems no reliable way to know how the system use this
> >  * bit.  So let's do it heuristically, assuming we are live in
> >  * 1970...2069.
> >  */
> > 
> > As U-Boot's PCF8563 driver does not say it is supposed to support
> > the
> > RTC8564,
> > make this driver compatible with Linux's by giving the opposite
> > meaning to the
> > century bit.
> > 
> > Signed-off-by: Benoît Thébaudeau 
> > Cc: Wolfgang Denk 
> > ---
> >  .../drivers/rtc/pcf8563.c  |4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git u-boot-66714b1.orig/drivers/rtc/pcf8563.c
> > u-boot-66714b1/drivers/rtc/pcf8563.c
> > index 339e5f6..a028533 100644
> > --- u-boot-66714b1.orig/drivers/rtc/pcf8563.c
> > +++ u-boot-66714b1/drivers/rtc/pcf8563.c
> > @@ -72,7 +72,7 @@ int rtc_get (struct rtc_time *tmp)
> > tmp->tm_hour = bcd2bin (hour & 0x3F);
> > tmp->tm_mday = bcd2bin (mday & 0x3F);
> > tmp->tm_mon  = bcd2bin (mon_cent & 0x1F);
> > -   tmp->tm_year = bcd2bin (year) + ((mon_cent & 0x80) ? 2000 :
> > 1900);
> > +   tmp->tm_year = bcd2bin (year) + ((mon_cent & 0x80) ? 1900 :
> > 2000);
> > tmp->tm_wday = bcd2bin (wday & 0x07);
> > tmp->tm_yday = 0;
> > tmp->tm_isdst= 0;
> > @@ -94,7 +94,7 @@ int rtc_set (struct rtc_time *tmp)
> >  
> > rtc_write (0x08, bin2bcd(tmp->tm_year % 100));
> >  
> > -   century = (tmp->tm_year >= 2000) ? 0x80 : 0;
> > +   century = (tmp->tm_year >= 2000) ? 0 : 0x80;
> > rtc_write (0x07, bin2bcd(tmp->tm_mon) | century);
> >  
> > rtc_write (0x06, bin2bcd(tmp->tm_wday));
> > 
> 
> Ping?

Can someone answer, please?

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


Re: [U-Boot] [PATCH] md5: Export step-by-step API

2012-08-10 Thread Benoît Thébaudeau
On Sat, Aug 4, 2012 at 01:09:02 AM, Benoît Thébaudeau wrote:
> Dear Wolfgang Denk,
> 
> On Fri, Jul 20, 2012 at 04:44:03 PM, Mike Frysinger wrote:
> > Acked-by: Mike Frysinger 
> > -mike
> 
> Can you apply it now that the merge window is open?
> 
> Thanks in advance.

Can someone answer, please?

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


Re: [U-Boot] [PATCH v2 1/9] FAT: cosmetic: Remove extra spaces

2012-08-10 Thread Benoît Thébaudeau
On Sat, Aug 4, 2012 at 01:11:16 AM, Benoît Thébaudeau wrote:
> Dear Wolfgang Denk,
> 
> On Fri, Jul 27, 2012 at 04:29:41 PM, Wolfgang Denk wrote:
> > Dear =?utf-8?Q?Beno=C3=AEt_Th=C3=A9baudeau?=,
> > 
> > In message
> > <845266616.705298.1343398892482.javamail.r...@advansee.com> you
> > wrote:
> > > 
> > > On Sat, Jul 21, 2012 at 07:23:57 PM, Mike Frysinger wrote:
> > > > Acked-by: Mike Frysinger 
> > > 
> > > If it's ack'ed, why does nobody apply it? What is the normal life
> > > cycle of
> > > patches like these that don't have a custodian?
> > 
> > They end on my table, and probably get merged when the next merge
> > window opens.  See http://www.denx.de/wiki/U-Boot/ReleaseCycle
> 
> Can you apply it now that the merge window is open?
> 
> Thanks in advance.

Can someone answer, please?

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


Re: [U-Boot] [PATCH 2/2] rmobile: Add README

2012-08-10 Thread Tom Rini
On 08/10/2012 12:19 AM, Nobuhiro Iwamatsu wrote:
> Hi,
> 
> On Fri, Aug 10, 2012 at 2:03 AM, Tom Rini  wrote:
>> On Thu, Aug 09, 2012 at 11:30:24PM +0900, Nobuhiro Iwamatsu wrote:
>>> This add README of Renesas RMOBILE.
>>> Based doc/README.omap3.
>>>
>>> Signed-off-by: Nobuhiro Iwamatsu 
>>> ---
>>>  doc/README.rmobile |   46 ++
>>>  1 file changed, 46 insertions(+)
>>>  create mode 100644 doc/README.rmobile
>>>
>>> diff --git a/doc/README.rmobile b/doc/README.rmobile
>>> new file mode 100644
>>> index 000..b6acb28
>>> --- /dev/null
>>> +++ b/doc/README.rmobile
>>> @@ -0,0 +1,46 @@
>>> +Summary
>>> +===
>>> +
>>> +This README is about U-Boot support for Renesas's ARM Cortex-A9 based 
>>> RMOBILE[1]
>>> +family of SoCs. Renesas's RMOBILE SoC family contains an ARM Cortex-A9.
>>> +
>>> +Currently the following boards are supported:
>>> +
>>> +* KMC KZM-A9-GT [2]
>>> +
>>> +* Atmark-Techno Armadillo-800-EVA [3]
>>> +
>>> +Toolchain
>>> +=
>>> +
>>> +While ARM Cortex-A9 support ARM v7 instruction set (-march=armv7a) we 
>>> compile
>>> +with -march=armv5 to allow more compilers to work. For U-Boot code this has
>>> +no performance impact.
>>
>> Is this really an issue today?  Between ELDK, Linaro and CodeSourcey
>> (and many other options too) it's really easy to get a v7 toolchain.
>>
> 
> You are right. I will fix this sentence.

Was the doc wrong or do you mean you'll change the Makefile as well? :)
 Thanks!

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


Re: [U-Boot] [PATCH] sf: stmicro: Add support for N25Q128A

2012-08-10 Thread Mike Frysinger
On Friday 10 August 2012 08:21:46 Michal Simek wrote:
> Add support for Numonyx N25Q128A SPI flash.

thanks, merged into my sf branch
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3] arm: rmobile: Add support Renesas SH73A0

2012-08-10 Thread Mike Frysinger
On Friday 10 August 2012 03:41:17 Nobuhiro Iwamatsu wrote:
> --- a/arch/arm/cpu/armv7/rmobile/Makefile
> +++ b/arch/arm/cpu/armv7/rmobile/Makefile
> 
> +clean:
> + rm -f $(SOBJS) $(OBJS)
> +

dead code -> delete
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] serial: CONSOLE macro is not used

2012-08-10 Thread Mike Frysinger
Acked-by: Mike Frysinger 
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Why no cache flushing in do_go_exec()

2012-08-10 Thread Mike Frysinger
On Thursday 09 August 2012 22:38:09 Charles Manning wrote:
> I'm helping to work through an issue where some code is loaded into RAM

this is generally where cache is supposed to be flushed.  you didn't describe 
how exactly the code is being loaded into RAM though.

> and "go xxx" is issued to then launch the code.
> 
> Sometimes this works and sometimes it does not, which makes me suspect that
> there might be a cache flushing issue.
> 
> I looked at do_exec_go() and it does not flush caches before jumping to the
> entry point.
> 
> Is there a good reason for this or is it an oversight?

the caches should generally be in sync before you get a chance to execute 
`go`, so the current behavior is "as designed".

> Would it help to add a call to cleanup_before_linux() to do_go_exec() to
> make sure the right thing is happening?

you cannot assume "go" is being used to execute Linux, so that would obviously 
be wrong.  the assumption on the list is that "go" is really only used for u-
boot standalone applications.
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] powerpc/mpc85xx/p1_p2_rdb: add all LAWs during SPL

2012-08-10 Thread Scott Wood
On 08/10/2012 01:54 AM, Huang Changming-R66093 wrote:
> This maybe cause the overlap error:
>
> powerpc-linux-gnu-ld: section .resetvec loaded at
> [ff800ffc,ff800fff] overlaps section .data loaded at
> [ff800ec8,ff80102f]

What tree and toolchain are you using?  Did you apply patch 1/2 as well?
 Did it build OK for you before these two patches?

> maybe we can think about to remove or modify Kumar's patch:
> 
> commit 7639675131673e8f1582d760203a9af34fba9e79
> Author: Kumar Gala 
> Date:   Thu Feb 3 09:02:13 2011 -0600
> 
> powerpc/8xxx: Fix LAW init to respect pre-initialized entries
> 
> If some pre-boot or earlier stage bootloader (NAND SPL) has setup LAW
> entries consider them good and mark them used.
> 
> In the NAND SPL case we skip re-initializing based on the law_table
> since the SPL phase already did that.
> 
> Signed-off-by: Kumar Gala 

Kumar, was this patch to fix a bug (e.g. was one of the LAWs actually in
use at the time?) or just seemed nice?

-Scott


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


Re: [U-Boot] [PATCH V4 1/4] README: fix references to config_cmd_default.h

2012-08-10 Thread Tom Rini
On Sun, Aug 05, 2012 at 08:07:19PM -0600, Stephen Warren wrote:

> All usage of config_cmd_default.h uses <> for the include statement.
> Update the README to do the same, rather than using "".
> 
> Signed-off-by: Stephen Warren 

I've applied the whole series to u-boot-staging/tr...@ti.com, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH v2 1/1] USB: EHCI: Initialize multiple USB controllers at once

2012-08-10 Thread Stephen Warren
On 08/10/2012 03:36 AM, Jim Lin wrote:
> Add support for command line "usb reset" or "usb start" to initialize
> , "usb stop" to stop multiple USB controllers at once.
> Other command like "usb tree" also supports multiple controllers.

I assume these were reposted because you rebased on the latest
u-boot-tegra/master branch. It's usual to includes details of why you're
reposting.

I applied these two patches, without changing the Seaboard config file,
and built. I got the following warnings:

ehci-hcd.c: In function 'ehci_submit_async':
ehci-hcd.c:250:6: warning: assignment from incompatible pointer type
ehci-hcd.c: In function 'usb_lowlevel_multi_init':
ehci-hcd.c:800:20: warning: assignment discards qualifiers from pointer
target type

I tested the patches in this case and found no regressions on a regular
Seaboard.

I get slightly different warnings if I do enable the feature in the
Seaboard config file:

ehci-hcd.c: In function 'ehci_submit_async':
ehci-hcd.c:250:6: warning: assignment from incompatible pointer type
ehci-hcd.c: In function 'usb_lowlevel_multi_init':
ehci-hcd.c:800:20: warning: assignment discards qualifiers from pointer
target type
ehci-tegra.c: In function 'ehci_hcd_init':
ehci-tegra.c:56:2: warning: passing argument 2 of 'tegrausb_start_port'
from incompatible pointer type
/home/swarren/shared/git_wa/u-boot/include/asm/arch/usb.h:243:5: note:
expected 'u32 *' but argument is of type 'struct ehci_hccr **'
ehci-tegra.c:56:2: warning: passing argument 3 of 'tegrausb_start_port'
from incompatible pointer type
/home/swarren/shared/git_wa/u-boot/include/asm/arch/usb.h:243:5: note:
expected 'u32 *' but argument is of type 'struct ehci_hcor **'

I tested the patches on a regular Seaboard, and found that both USB
ports now work (great!).

However, this patch breaks the "enterrcm" command if "usb start" has
been run, I assume since the VBUS GPIO is asserted to USB port 1. Can we
add some hook into that command to shut down the USB1 VBUS GPIO? I can
live with this patch being applied before that's fixed though.

I also tested Springbank, and found that this also enables the USB port
there, but strangely "enterrcm" following "usb start" does still seem to
work on that board!

So overall, once the warnings are fixed, I'm OK with these patches,
assuming some followup work on "enterrcm" will happen.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 07/11] u8500: Moving processor-specific functions to cpu area.

2012-08-10 Thread Tom Rini
On Tue, Jul 31, 2012 at 12:59:29PM -0600, mathieu.poir...@linaro.org wrote:
> From: "Mathieu J. Poirier" 
> 
> Functions such as providing power to the MMC device and reading
> the processor version register should be in the cpu area for
> access by multiple u8500-based boards.
> 
> Signed-off-by: Mathieu Poirier 
> Signed-off-by: John Rigby 
[snip]
> +static int cpu_is_u8500v2(void)
> +{
> + return read_cpuid() == CPUID_DB8500V2;
> +}

This isn't used yet, so causes a new warning.  I'm moving this (and the
define) to the next patch, where they are used.  With that change and my
Signed-off-by, applied to u-boot-staging/tr...@ti.com

-- 
Tom


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


Re: [U-Boot] [PATCH 08/11] u8500: Enabling power to MMC device on AB8500 V2

2012-08-10 Thread Tom Rini
On Tue, Jul 31, 2012 at 12:59:30PM -0600, mathieu.poir...@linaro.org wrote:

> From: "Mathieu J. Poirier" 
> 
> Register mapping has changed on power control chip between
> the first and second revision.
> 
> Signed-off-by: Mathieu Poirier 
> Signed-off-by: John Rigby 

I've added in the cpu_is_u8500v2 from the previous patch in the series
here, added my Signed-off-by and merged to u-boot-staging/tr...@ti.com,
thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH 09/11] u8500: Separating mmc config parameters from driver

2012-08-10 Thread Tom Rini
On Tue, Jul 31, 2012 at 12:59:31PM -0600, mathieu.poir...@linaro.org wrote:

> From: John Rigby 
> 
> Configuration in vexpress and u8500.v1 is different from what
> is needed in u8500.v2.  As such, card configuration specifics need
> to reside in the board file rather than the driver.
> 
> Signed-off-by: John Rigby 
> Signed-off-by: Mathieu Poirier 
[snip]
> diff --git a/board/st-ericsson/snowball/snowball.c 
> b/board/st-ericsson/snowball/snowball.c
> index 32c343f..7a52de6 100644
> --- a/board/st-ericsson/snowball/snowball.c
> +++ b/board/st-ericsson/snowball/snowball.c
[snip]
> @@ -80,7 +76,8 @@ static int do_command(struct mmc *dev, struct mmc_cmd *cmd)
>  {
>   int result;
>   u32 sdi_cmd = 0;
> - struct mmc_host *host = dev->priv;
> + struct pl180_mmc_host *host = dev->priv;
> + u32 lap = 0;

lap is unused.  Removing.

This patch has been applied to u-boot-staging/tr...@ti.com with the
above change and a Signed-off-by from me.

-- 
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 00/11] Support for ST-Ericsson snowball board

2012-08-10 Thread Tom Rini
On Tue, Jul 31, 2012 at 12:59:22PM -0600, mathieu.poir...@linaro.org wrote:

> From: "Mathieu J. Poirier" 
> 
> This set adds support for the ST-Ericsson u8500 based
> snowball board.  Doing so it moves u8500-href code around
> to allow for code reuse between boards.
> 
> It was sent out during the 12.07 cycle but never received
> an official ACK.
> 
> John Rigby (1):
>   u8500: Separating mmc config parameters from driver
> 
> Mathieu J. Poirier (10):
>   snowball: Add support for ux500 based snowball board
>   u8500: Moving prcmu to cpu directory
>   snowball: Adding architecture dependent initialisation
>   snowball: Adding CPU clock initialisation
>   snowball: Moving to ux500.v2 addess scheme for PRCMU access
>   snowball: applying power to LAN and GBF controllers
>   u8500: Moving processor-specific functions to cpu area.
>   u8500: Enabling power to MMC device on AB8500 V2
>   armv7: Adding cpu specific cache managmenent
>   snowball: Adding board specific cache cleanup routine
> 
>  MAINTAINERS |4 +
>  arch/arm/cpu/armv7/cpu.c|8 +
>  arch/arm/cpu/armv7/u8500/Makefile   |2 +-
>  arch/arm/cpu/armv7/u8500/clock.c|   34 +
>  arch/arm/cpu/armv7/u8500/cpu.c  |  192 ++
>  arch/arm/cpu/armv7/u8500/prcmu.c|  229 +++
>  arch/arm/include/asm/arch-u8500/clock.h |5 +-
>  arch/arm/include/asm/arch-u8500/db8500_gpio.h   |   42 ++
>  arch/arm/include/asm/arch-u8500/db8500_pincfg.h |  170 +
>  arch/arm/include/asm/arch-u8500/hardware.h  |   33 +-
>  arch/arm/include/asm/arch-u8500/prcmu.h |   76 +++
>  arch/arm/include/asm/arch-u8500/sys_proto.h |1 +
>  board/armltd/vexpress/ca9x4_ct_vxp.c|   21 +-
>  board/st-ericsson/snowball/Makefile |   51 ++
>  board/st-ericsson/snowball/db8500_pins.h|  745 
> +++
>  board/st-ericsson/snowball/snowball.c   |  367 +++
>  board/st-ericsson/u8500/Makefile|2 +-
>  board/st-ericsson/u8500/prcmu-fw.h  |   55 --
>  board/st-ericsson/u8500/prcmu.c |  165 -
>  board/st-ericsson/u8500/u8500_href.c|   99 +---
>  boards.cfg  |1 +
>  drivers/gpio/Makefile   |1 +
>  drivers/gpio/db8500_gpio.c  |  225 +++
>  drivers/mmc/arm_pl180_mmci.c|  132 ++---
>  drivers/mmc/arm_pl180_mmci.h|   27 +-
>  drivers/serial/serial_pl01x.c   |2 +
>  include/configs/snowball.h  |  268 
>  27 files changed, 2566 insertions(+), 391 deletions(-)
>  create mode 100644 arch/arm/cpu/armv7/u8500/cpu.c
>  create mode 100644 arch/arm/cpu/armv7/u8500/prcmu.c
>  create mode 100644 arch/arm/include/asm/arch-u8500/db8500_gpio.h
>  create mode 100644 arch/arm/include/asm/arch-u8500/db8500_pincfg.h
>  create mode 100644 arch/arm/include/asm/arch-u8500/prcmu.h
>  create mode 100644 board/st-ericsson/snowball/Makefile
>  create mode 100644 board/st-ericsson/snowball/db8500_pins.h
>  create mode 100644 board/st-ericsson/snowball/snowball.c
>  delete mode 100644 board/st-ericsson/u8500/prcmu-fw.h
>  delete mode 100644 board/st-ericsson/u8500/prcmu.c
>  create mode 100644 drivers/gpio/db8500_gpio.c
>  create mode 100644 include/configs/snowball.h

With a few very minor changes that I've sent to the list, I've applied
this to u-boot-staging/tr...@ti.com, thanks for your patience!

-- 
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 01/11 v2] snowball: Add support for ux500 based snowball board

2012-08-10 Thread Tom Rini
On Fri, Aug 03, 2012 at 03:05:12PM -0600, mathieu.poir...@linaro.org wrote:

> From: "Mathieu J. Poirier" 
> 
> Signed-off-by: Mathieu Poirier 
> Signed-off-by: John Rigby 
[snip]
> diff --git a/MAINTAINERS b/MAINTAINERS
> index fd0c65c..8a16b12 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -959,6 +959,10 @@ Vladimir Zapolskiy 
>  
>   devkit3250  lpc32xx
>  
> +Mathieu Poirier 
> +
> + snowballARM ARMV7 (u8500 SoC)

This list is supposed to be sorted by name.  I've sorted it and applied
to u-boot-staging/tr...@ti.com, thanks!

-- 
Tom


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


[U-Boot] Please pull u-boot-staging/tr...@ti.com

2012-08-10 Thread Tom Rini
Hello Albert and Wolfgang,

To try and ease the backlog of ARM changes, I've taken the liberty of
grabbing the Snowball and Raspberry Pi model B board support patches and
putting them into the staging tree.  Both of these series have been
posted for some time and been reviewed.  Wolfgang, if you would like to
wait for Albert to pick up this request, that's fine.  I just wanted to
make sure the submitters weren't left waiting.  Thanks!

The following changes since commit 4d3c95f5ea7c737a21cd6b9c59435ee693b3f127:

  zfs: Add ZFS filesystem support (2012-08-09 23:42:20 +0200)

are available in the git repository at:

  git://git.denx.de/u-boot-staging tr...@ti.com

for you to fetch changes up to bcf2c9ef2877440033e3032fbd597be32728020c:

  ARM: add Raspberry Pi model B board, using BCM2835 SoC (2012-08-10 08:57:29 
-0700)


John Rigby (1):
  u8500: Separating mmc config parameters from driver

Mathieu J. Poirier (10):
  snowball: Add support for ux500 based snowball board
  u8500: Moving prcmu to cpu directory
  snowball: Adding architecture dependent initialisation
  snowball: Adding CPU clock initialisation
  snowball: Moving to ux500.v2 addess scheme for PRCMU access
  snowball: applying power to LAN and GBF controllers
  u8500: Moving processor-specific functions to cpu area.
  u8500: Enabling power to MMC device on AB8500 V2
  armv7: Adding cpu specific cache managmenent
  snowball: Adding board specific cache cleanup routine

Stephen Warren (4):
  README: fix references to config_cmd_default.h
  ARM: arm1176: enable instruction cache in arch_cpu_init()
  ARM: add basic support for the Broadcom BCM2835 SoC
  ARM: add Raspberry Pi model B board, using BCM2835 SoC

 MAINTAINERS|8 +
 README |4 +-
 arch/arm/cpu/arm1176/bcm2835/Makefile  |   37 +
 arch/arm/cpu/arm1176/bcm2835/config.mk |   19 +
 arch/arm/cpu/arm1176/bcm2835/lowlevel_init.S   |   19 +
 arch/arm/cpu/arm1176/bcm2835/reset.c   |   35 +
 arch/arm/cpu/arm1176/bcm2835/timer.c   |   55 ++
 arch/arm/cpu/arm1176/cpu.c |7 +
 arch/arm/cpu/armv7/cpu.c   |8 +
 arch/arm/cpu/armv7/u8500/Makefile  |2 +-
 arch/arm/cpu/armv7/u8500/clock.c   |   34 +
 arch/arm/cpu/armv7/u8500/cpu.c |  192 +
 .../arm/cpu/armv7}/u8500/prcmu.c   |  128 +++-
 arch/arm/include/asm/arch-bcm2835/gpio.h   |   66 ++
 arch/arm/include/asm/arch-bcm2835/timer.h  |   37 +
 arch/arm/include/asm/arch-bcm2835/wdog.h   |   36 +
 arch/arm/include/asm/arch-u8500/clock.h|5 +-
 arch/arm/include/asm/arch-u8500/db8500_gpio.h  |   42 ++
 arch/arm/include/asm/arch-u8500/db8500_pincfg.h|  170 +
 arch/arm/include/asm/arch-u8500/hardware.h |   33 +-
 .../arm/include/asm/arch-u8500/prcmu.h |   35 +-
 arch/arm/include/asm/arch-u8500/sys_proto.h|1 +
 board/armltd/vexpress/ca9x4_ct_vxp.c   |   21 +-
 board/raspberrypi/rpi_b/Makefile   |   34 +
 board/raspberrypi/rpi_b/rpi_b.c|   34 +
 board/st-ericsson/snowball/Makefile|   49 ++
 board/st-ericsson/snowball/db8500_pins.h   |  745 
 board/st-ericsson/snowball/snowball.c  |  348 +
 board/st-ericsson/u8500/Makefile   |2 +-
 board/st-ericsson/u8500/u8500_href.c   |   99 +--
 boards.cfg |2 +
 drivers/gpio/Makefile  |2 +
 drivers/gpio/bcm2835_gpio.c|   89 +++
 drivers/gpio/db8500_gpio.c |  221 ++
 drivers/mmc/arm_pl180_mmci.c   |  131 ++--
 drivers/mmc/arm_pl180_mmci.h   |   27 +-
 drivers/serial/serial_pl01x.c  |2 +
 include/configs/rpi_b.h|  104 +++
 include/configs/snowball.h |  266 +++
 39 files changed, 2937 insertions(+), 212 deletions(-)
 create mode 100644 arch/arm/cpu/arm1176/bcm2835/Makefile
 create mode 100644 arch/arm/cpu/arm1176/bcm2835/config.mk
 create mode 100644 arch/arm/cpu/arm1176/bcm2835/lowlevel_init.S
 create mode 100644 arch/arm/cpu/arm1176/bcm2835/reset.c
 create mode 100644 arch/arm/cpu/arm1176/bcm2835/timer.c
 create mode 100644 arch/arm/cpu/armv7/u8500/cpu.c
 rename {board/st-ericsson => arch/arm/cpu/armv7}/u8500/prcmu.c (58%)
 create mode 100644 arch/arm/include/asm/arch-bcm2835/gpio.h
 create mode 100644 arch/arm/include/asm/arch-bcm2835/timer.h
 create mode 100644 arch/arm/include/asm/arch-bcm2835/wdog.h
 create mode 100644 arch/arm/include/asm/arch-u8500/db8500_gpio.h
 create m

[U-Boot] [PATCH v4 0/7] ehci: Improve performance

2012-08-10 Thread Benoît Thébaudeau
Hi all,

This series aims at improving EHCI performance. There is also some code cleanup
BTW.

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


Re: [U-Boot] [PATCH] microblaze: Call spi_init function

2012-08-10 Thread Stephan Linz
Am Freitag, den 10.08.2012, 09:09 +0200 schrieb Michal Simek: 
> Initialization spi.
> 
> Signed-off-by: Michal Simek 

Acked-by: Stephan Linz 

> ---
>  arch/microblaze/lib/board.c |5 +
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c
> index 674b573..ef4bac4 100644
> --- a/arch/microblaze/lib/board.c
> +++ b/arch/microblaze/lib/board.c
> @@ -32,6 +32,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -166,6 +167,10 @@ void board_init_f(ulong not_used)
>   }
>  #endif
>  
> +#ifdef CONFIG_SPI
> + spi_init();
> +#endif
> +
>   /* relocate environment function pointers etc. */
>   env_relocate ();
>  

-- 
Viele Grüße,
Stephan Linz
__
MB-Ref: http://www.li-pro.de/xilinx_mb:mbref:start
OpenDCC: http://www.li-pro.net/opendcc.phtml
PC/M: http://www.li-pro.net/pcm.phtml
Sourceforge: http://sourceforge.net/users/slz
Gitorious: https://gitorious.org/~slz

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


[U-Boot] [PATCH v4 1/7] ehci: cosmetic: Define used constants

2012-08-10 Thread Benoît Thébaudeau
Make some light cosmetic code cleanup by the way.

Signed-off-by: Benoît Thébaudeau 
Cc: Marek Vasut 
Cc: Ilya Yanok 
Cc: Stefan Herbrechtsmeier 
---
Changes for v2: N/A.
Changes for v3:
 - New patch.
Changes for v4:
 - Use accessor macros rather than offsets and masks.
 - More code cleanup.

 .../drivers/usb/host/ehci-hcd.c|  138 ++--
 .../drivers/usb/host/ehci.h|   49 ++-
 2 files changed, 118 insertions(+), 69 deletions(-)

diff --git u-boot-usb-4f8254e.orig/drivers/usb/host/ehci-hcd.c 
u-boot-usb-4f8254e/drivers/usb/host/ehci-hcd.c
index 2a00389..00a155b 100644
--- u-boot-usb-4f8254e.orig/drivers/usb/host/ehci-hcd.c
+++ u-boot-usb-4f8254e/drivers/usb/host/ehci-hcd.c
@@ -163,7 +163,7 @@ static int ehci_reset(void)
 
 #ifdef CONFIG_USB_EHCI_TXFIFO_THRESH
cmd = ehci_readl(&hcor->or_txfilltuning);
-   cmd &= ~TXFIFO_THRESH(0x3f);
+   cmd &= ~TXFIFO_THRESH_MASK;
cmd |= TXFIFO_THRESH(CONFIG_USB_EHCI_TXFIFO_THRESH);
ehci_writel(&hcor->or_txfilltuning, cmd);
 #endif
@@ -186,7 +186,7 @@ static int ehci_td_buffer(struct qTD *td, void *buf, size_t 
sz)
while (idx < QT_BUFFER_CNT) {
td->qt_buffer[idx] = cpu_to_hc32(addr);
td->qt_buffer_hi[idx] = 0;
-   next = (addr + 4096) & ~4095;
+   next = (addr + EHCI_PAGE_SIZE) & ~(EHCI_PAGE_SIZE - 1);
delta = next - addr;
if (delta >= sz)
break;
@@ -208,7 +208,8 @@ ehci_submit_async(struct usb_device *dev, unsigned long 
pipe, void *buffer,
   int length, struct devrequest *req)
 {
ALLOC_ALIGN_BUFFER(struct QH, qh, 1, USB_DMA_MINALIGN);
-   ALLOC_ALIGN_BUFFER(struct qTD, qtd, 3, USB_DMA_MINALIGN);
+#define QTD_COUNT  3
+   ALLOC_ALIGN_BUFFER(struct qTD, qtd, QTD_COUNT, USB_DMA_MINALIGN);
int qtd_counter = 0;
 
volatile struct qTD *vtd;
@@ -230,7 +231,7 @@ ehci_submit_async(struct usb_device *dev, unsigned long 
pipe, void *buffer,
  le16_to_cpu(req->index));
 
memset(qh, 0, sizeof(struct QH));
-   memset(qtd, 0, 3 * sizeof(*qtd));
+   memset(qtd, 0, QTD_COUNT * sizeof(*qtd));
 
toggle = usb_gettoggle(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe));
 
@@ -245,20 +246,17 @@ ehci_submit_async(struct usb_device *dev, unsigned long 
pipe, void *buffer,
 * - qh_overlay.qt_altnext
 */
qh->qh_link = cpu_to_hc32((uint32_t)qh_list | QH_LINK_TYPE_QH);
-   c = (usb_pipespeed(pipe) != USB_SPEED_HIGH &&
-usb_pipeendpoint(pipe) == 0) ? 1 : 0;
-   endpt = (8 << 28) |
-   (c << 27) |
-   (usb_maxpacket(dev, pipe) << 16) |
-   (0 << 15) |
-   (1 << 14) |
-   (usb_pipespeed(pipe) << 12) |
-   (usb_pipeendpoint(pipe) << 8) |
-   (0 << 7) | (usb_pipedevice(pipe) << 0);
+   c = usb_pipespeed(pipe) != USB_SPEED_HIGH && !usb_pipeendpoint(pipe);
+   endpt = QH_ENDPT1_RL(8) | QH_ENDPT1_C(c) |
+   QH_ENDPT1_MAXPKTLEN(usb_maxpacket(dev, pipe)) | QH_ENDPT1_H(0) |
+   QH_ENDPT1_DTC(QH_ENDPT1_DTC_DT_FROM_QTD) |
+   QH_ENDPT1_EPS(usb_pipespeed(pipe)) |
+   QH_ENDPT1_ENDPT(usb_pipeendpoint(pipe)) | QH_ENDPT1_I(0) |
+   QH_ENDPT1_DEVADDR(usb_pipedevice(pipe));
qh->qh_endpt1 = cpu_to_hc32(endpt);
-   endpt = (1 << 30) |
-   (dev->portnr << 23) |
-   (dev->parent->devnum << 16) | (0 << 8) | (0 << 0);
+   endpt = QH_ENDPT2_MULT(1) | QH_ENDPT2_PORTNUM(dev->portnr) |
+   QH_ENDPT2_HUBADDR(dev->parent->devnum) |
+   QH_ENDPT2_UFCMASK(0) | QH_ENDPT2_UFSMASK(0);
qh->qh_endpt2 = cpu_to_hc32(endpt);
qh->qh_overlay.qt_next = cpu_to_hc32(QT_NEXT_TERMINATE);
 
@@ -276,12 +274,13 @@ ehci_submit_async(struct usb_device *dev, unsigned long 
pipe, void *buffer,
 */
qtd[qtd_counter].qt_next = cpu_to_hc32(QT_NEXT_TERMINATE);
qtd[qtd_counter].qt_altnext = cpu_to_hc32(QT_NEXT_TERMINATE);
-   token = (0 << 31) |
-   (sizeof(*req) << 16) |
-   (0 << 15) | (0 << 12) | (3 << 10) | (2 << 8) | (0x80 << 0);
+   token = QT_TOKEN_DT(0) | QT_TOKEN_TOTALBYTES(sizeof(*req)) |
+   QT_TOKEN_IOC(0) | QT_TOKEN_CPAGE(0) | QT_TOKEN_CERR(3) |
+   QT_TOKEN_PID(QT_TOKEN_PID_SETUP) |
+   QT_TOKEN_STATUS(QT_TOKEN_STATUS_ACTIVE);
qtd[qtd_counter].qt_token = cpu_to_hc32(token);
-   if (ehci_td_buffer(&qtd[qtd_counter], req, sizeof(*req)) != 0) {
-   printf("unable construct SETUP td\n");
+   if (ehci_td_buffer(&qtd[qtd_counter], req, sizeof(*req))) {
+   printf("unable to construct SETUP TD\n");
goto fail;
}
/* Update

[U-Boot] [PATCH v4 2/7] ehci-hcd: Boost transfer speed

2012-08-10 Thread Benoît Thébaudeau
This patch takes advantage of the hardware EHCI qTD queuing mechanism to avoid
software and transfer splitting overhead so as to make transfers as fast as
possible.

The only drawback is a call to memalign. However, this is fast compared to the
transfer timings, and the heap size to allocate is small, e.g. 128 kiB in the
worst case for a transfer length of 65535 packets of 512 bytes.

Tested on i.MX25, i.MX35 and i.MX51. In my test conditions, the speed gain was
very significant (several times faster), which is really appreciable when
accessing large files.

Signed-off-by: Benoît Thébaudeau 
Cc: Marek Vasut 
Cc: Ilya Yanok 
Cc: Stefan Herbrechtsmeier 
---
Changes for v2:
 - Use DIV_ROUND_UP to make code more readable.
Changes for v3:
 - Remove extra unalignment term in the computation of qtd_count.
 - Fix ZLP support.
 - Add #warning if CONFIG_SYS_MALLOC_LEN is likely to be too small.
 - Make code more readable.
 - Add comments.
Changes for v4: None.

 .../drivers/usb/host/ehci-hcd.c|  167 
 1 file changed, 138 insertions(+), 29 deletions(-)

diff --git u-boot-usb-4f8254e.orig/drivers/usb/host/ehci-hcd.c 
u-boot-usb-4f8254e/drivers/usb/host/ehci-hcd.c
index 00a155b..a0ef5db 100644
--- u-boot-usb-4f8254e.orig/drivers/usb/host/ehci-hcd.c
+++ u-boot-usb-4f8254e/drivers/usb/host/ehci-hcd.c
@@ -208,8 +208,8 @@ ehci_submit_async(struct usb_device *dev, unsigned long 
pipe, void *buffer,
   int length, struct devrequest *req)
 {
ALLOC_ALIGN_BUFFER(struct QH, qh, 1, USB_DMA_MINALIGN);
-#define QTD_COUNT  3
-   ALLOC_ALIGN_BUFFER(struct qTD, qtd, QTD_COUNT, USB_DMA_MINALIGN);
+   struct qTD *qtd;
+   int qtd_count = 0;
int qtd_counter = 0;
 
volatile struct qTD *vtd;
@@ -230,8 +230,74 @@ ehci_submit_async(struct usb_device *dev, unsigned long 
pipe, void *buffer,
  le16_to_cpu(req->value), le16_to_cpu(req->value),
  le16_to_cpu(req->index));
 
+   /*
+* The USB transfer is split into qTD transfers. Eeach qTD transfer is
+* described by a transfer descriptor (the qTD). The qTDs form a linked
+* list with a queue head (QH).
+*
+* Each qTD transfer starts with a new USB packet, i.e. a packet cannot
+* have its beginning in a qTD transfer and its end in the following
+* one, so the qTD transfer lengths have to be chosen accordingly.
+*
+* Each qTD transfer uses up to QT_BUFFER_CNT data buffers, mapped to
+* single pages. The first data buffer can start at any offset within a
+* page (not considering the cache-line alignment issues), while the
+* following buffers must be page-aligned. There is no alignment
+* constraint on the size of a qTD transfer.
+*/
+   if (req != NULL)
+   /* 1 qTD will be needed for SETUP, and 1 for ACK. */
+   qtd_count += 1 + 1;
+   if (length > 0 || req == NULL) {
+   /*
+* Determine the qTD transfer size that will be used for the
+* data payload (not considering the final qTD transfer, which
+* may be shorter).
+*
+* In order to keep each packet within a qTD transfer, the qTD
+* transfer size is aligned to EHCI_PAGE_SIZE, which is a
+* multiple of wMaxPacketSize (except in some cases for
+* interrupt transfers, see comment in submit_int_msg()).
+*
+* By default, i.e. if the input buffer is page-aligned,
+* QT_BUFFER_CNT full pages will be used.
+*/
+   int xfr_sz = QT_BUFFER_CNT;
+   /*
+* However, if the input buffer is not page-aligned, the qTD
+* transfer size will be one page shorter, and the first qTD
+* data buffer of each transfer will be page-unaligned.
+*/
+   if ((uint32_t)buffer & (EHCI_PAGE_SIZE - 1))
+   xfr_sz--;
+   /* Convert the qTD transfer size to bytes. */
+   xfr_sz *= EHCI_PAGE_SIZE;
+   /*
+* Determine the number of qTDs that will be required for the
+* data payload. This value has to be rounded up since the final
+* qTD transfer may be shorter than the regular qTD transfer
+* size that has just been computed.
+*/
+   qtd_count += DIV_ROUND_UP(length, xfr_sz);
+   /* ZLPs also need a qTD. */
+   if (!qtd_count)
+   qtd_count++;
+   }
+/*
+ * Threshold value based on the worst-case total size of the qTDs to allocate
+ * for a mass-storage transfer of 65535 blocks of 512 bytes.
+ */
+#if CONFIG_SYS_MALLOC_LEN <= 128 * 1024
+#warning CONFIG_SYS_MALLOC_LEN may be too small for EHCI
+#endif
+   qtd = 

Re: [U-Boot] [PATCH v4 0/7] ehci: Improve performance

2012-08-10 Thread Benoît Thébaudeau


Benoît Thébaudeau
Application Engineer
benoit.thebaud...@advansee.com
+33 2 40 50 21 73
ADVANSEE SARL
9, rue Alfred Kastler
CS 30750
44307 Nantes CEDEX 3
France

- Original Message -
> From: "Benoît Thébaudeau" 
> To: u-boot@lists.denx.de
> Cc: "Marek Vasut" , "Ilya Yanok" 
> , "Stefan Herbrechtsmeier"
> 
> Sent: Friday, August 10, 2012 6:21:37 PM
> Subject: [PATCH v4 0/7] ehci: Improve performance
> 
> Hi all,
> 
> This series aims at improving EHCI performance. There is also some
> code cleanup
> BTW.
> 
> Best regards,
> Benoît
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 4/7] usb_storage: Remove EHCI constraints

2012-08-10 Thread Benoît Thébaudeau
Now that the EHCI driver allocates its qTDs from the heap, the MSC driver is
only limited by the SCSI commands it uses.

Signed-off-by: Benoît Thébaudeau 
Cc: Marek Vasut 
Cc: Ilya Yanok 
Cc: Stefan Herbrechtsmeier 
---
Changes for v2: None.
Changes for v3:
 - Patch swapped with the currently preceding one.
Changes for v4: None.

 .../common/usb_storage.c   |   33 +---
 1 file changed, 15 insertions(+), 18 deletions(-)

diff --git u-boot-usb-4f8254e.orig/common/usb_storage.c 
u-boot-usb-4f8254e/common/usb_storage.c
index 0cd6399..822bd64 100644
--- u-boot-usb-4f8254e.orig/common/usb_storage.c
+++ u-boot-usb-4f8254e/common/usb_storage.c
@@ -157,12 +157,13 @@ struct us_data {
 
 #ifdef CONFIG_USB_EHCI
 /*
- * The U-Boot EHCI driver cannot handle more than 5 page aligned buffers
- * of 4096 bytes in a transfer without running itself out of qt_buffers
+ * The U-Boot EHCI driver can handle any transfer length as long as there is
+ * enough free heap space left, but the SCSI READ(10) and WRITE(10) commands 
are
+ * limited to 65535 bytes.
  */
-#define USB_MAX_XFER_BLK(start, blksz) (((4096 * 5) - (start % 4096)) / blksz)
+#define USB_MAX_XFER_BLK   65535
 #else
-#define USB_MAX_XFER_BLK(start, blksz) 20
+#define USB_MAX_XFER_BLK   20
 #endif
 
 static struct us_data usb_stor[USB_MAX_STOR_DEV];
@@ -1050,7 +1051,7 @@ static void usb_bin_fixup(struct usb_device_descriptor 
descriptor,
 unsigned long usb_stor_read(int device, unsigned long blknr,
unsigned long blkcnt, void *buffer)
 {
-   unsigned long start, blks, buf_addr, max_xfer_blk;
+   unsigned long start, blks, buf_addr;
unsigned short smallblks;
struct usb_device *dev;
struct us_data *ss;
@@ -1092,14 +1093,12 @@ unsigned long usb_stor_read(int device, unsigned long 
blknr,
/* XXX need some comment here */
retry = 2;
srb->pdata = (unsigned char *)buf_addr;
-   max_xfer_blk = USB_MAX_XFER_BLK(buf_addr,
-   usb_dev_desc[device].blksz);
-   if (blks > max_xfer_blk)
-   smallblks = (unsigned short) max_xfer_blk;
+   if (blks > USB_MAX_XFER_BLK)
+   smallblks = USB_MAX_XFER_BLK;
else
smallblks = (unsigned short) blks;
 retry_it:
-   if (smallblks == max_xfer_blk)
+   if (smallblks == USB_MAX_XFER_BLK)
usb_show_progress();
srb->datalen = usb_dev_desc[device].blksz * smallblks;
srb->pdata = (unsigned char *)buf_addr;
@@ -1120,7 +1119,7 @@ retry_it:
start, smallblks, buf_addr);
 
usb_disable_asynch(0); /* asynch transfer allowed */
-   if (blkcnt >= max_xfer_blk)
+   if (blkcnt >= USB_MAX_XFER_BLK)
debug("\n");
return blkcnt;
 }
@@ -1128,7 +1127,7 @@ retry_it:
 unsigned long usb_stor_write(int device, unsigned long blknr,
unsigned long blkcnt, const void *buffer)
 {
-   unsigned long start, blks, buf_addr, max_xfer_blk;
+   unsigned long start, blks, buf_addr;
unsigned short smallblks;
struct usb_device *dev;
struct us_data *ss;
@@ -1173,14 +1172,12 @@ unsigned long usb_stor_write(int device, unsigned long 
blknr,
 */
retry = 2;
srb->pdata = (unsigned char *)buf_addr;
-   max_xfer_blk = USB_MAX_XFER_BLK(buf_addr,
-   usb_dev_desc[device].blksz);
-   if (blks > max_xfer_blk)
-   smallblks = (unsigned short) max_xfer_blk;
+   if (blks > USB_MAX_XFER_BLK)
+   smallblks = USB_MAX_XFER_BLK;
else
smallblks = (unsigned short) blks;
 retry_it:
-   if (smallblks == max_xfer_blk)
+   if (smallblks == USB_MAX_XFER_BLK)
usb_show_progress();
srb->datalen = usb_dev_desc[device].blksz * smallblks;
srb->pdata = (unsigned char *)buf_addr;
@@ -1201,7 +1198,7 @@ retry_it:
start, smallblks, buf_addr);
 
usb_disable_asynch(0); /* asynch transfer allowed */
-   if (blkcnt >= max_xfer_blk)
+   if (blkcnt >= USB_MAX_XFER_BLK)
debug("\n");
return blkcnt;
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 5/7] usb_storage: Adjust time-outs

2012-08-10 Thread Benoît Thébaudeau
Adjust time-out value for the new EHCI mechanism.

Signed-off-by: Benoît Thébaudeau 
Cc: Marek Vasut 
Cc: Ilya Yanok 
Cc: Stefan Herbrechtsmeier 
---
Changes for v2: None.
Changes for v3: None.
Changes for v4: None.

 .../common/usb_storage.c   |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git u-boot-usb-4f8254e.orig/common/usb_storage.c 
u-boot-usb-4f8254e/common/usb_storage.c
index 822bd64..f0798b2 100644
--- u-boot-usb-4f8254e.orig/common/usb_storage.c
+++ u-boot-usb-4f8254e/common/usb_storage.c
@@ -712,7 +712,7 @@ int usb_stor_BBB_transport(ccb *srb, struct us_data *us)
else
pipe = pipeout;
result = usb_bulk_msg(us->pusb_dev, pipe, srb->pdata, srb->datalen,
- &data_actlen, USB_CNTL_TIMEOUT * 5);
+ &data_actlen, USB_CNTL_TIMEOUT * 100);
/* special handling of STALL in DATA phase */
if ((result < 0) && (us->pusb_dev->status & USB_ST_STALLED)) {
USB_STOR_PRINTF("DATA:stall\n");
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 3/7] usb_storage: Restore non-EHCI support

2012-08-10 Thread Benoît Thébaudeau
The commit 5dd95cf made the MSC driver EHCI-specific. This patch restores a
basic support of non-EHCI HCDs, like before that commit.

The fallback transfer size is certainly not optimal, but at least it should work
like before.

Signed-off-by: Benoît Thébaudeau 
Cc: Marek Vasut 
Cc: Ilya Yanok 
Cc: Stefan Herbrechtsmeier 
---
Changes for v2: None.
Changes for v3:
 - Patch swapped with the currently following one.
Changes for v4: None.

 .../common/usb_storage.c   |4 
 1 file changed, 4 insertions(+)

diff --git u-boot-usb-4f8254e.orig/common/usb_storage.c 
u-boot-usb-4f8254e/common/usb_storage.c
index bdc306f..0cd6399 100644
--- u-boot-usb-4f8254e.orig/common/usb_storage.c
+++ u-boot-usb-4f8254e/common/usb_storage.c
@@ -155,11 +155,15 @@ struct us_data {
trans_cmnd  transport;  /* transport routine */
 };
 
+#ifdef CONFIG_USB_EHCI
 /*
  * The U-Boot EHCI driver cannot handle more than 5 page aligned buffers
  * of 4096 bytes in a transfer without running itself out of qt_buffers
  */
 #define USB_MAX_XFER_BLK(start, blksz) (((4096 * 5) - (start % 4096)) / blksz)
+#else
+#define USB_MAX_XFER_BLK(start, blksz) 20
+#endif
 
 static struct us_data usb_stor[USB_MAX_STOR_DEV];
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 6/7] usb_stor_BBB_transport: Do not delay when not required

2012-08-10 Thread Benoît Thébaudeau
There is a 5-ms delay in usb_stor_BBB_transport, which occurs every 10 kiB of
data for fragmented fatload usb, i.e. roughly 500 ms of delay per MiB. This adds
up to quite a bit of delay if you're loading a large ramdisk.

The purpose of this delay should be to debounce the 5-V/100-mA USB power up.
This patch skips the delay if the device has already been queried as ready.

Signed-off-by: Jim Shimer 

Rework following the review:
 - Rebase against the latest u-boot-usb master.
 - Replace typedef with #define.
 - Use the existing flags struct field instead of adding a new field.
 - Remove the setter function.
 - Remove the typecasts.
Signed-off-by: Benoît Thébaudeau 

Cc: Marek Vasut 
Cc: Ilya Yanok 
Cc: Stefan Herbrechtsmeier 
Cc: Jim Shimer 
---
Changes for v2: N/A.
Changes for v3:
 - New patch.
Changes for v4: None.

 .../common/usb_storage.c   |   11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git u-boot-usb-4f8254e.orig/common/usb_storage.c 
u-boot-usb-4f8254e/common/usb_storage.c
index f0798b2..b000f09 100644
--- u-boot-usb-4f8254e.orig/common/usb_storage.c
+++ u-boot-usb-4f8254e/common/usb_storage.c
@@ -136,6 +136,7 @@ struct us_data {
struct usb_device *pusb_dev; /* this usb_device */
 
unsigned intflags;  /* from filter initially */
+#  define USB_READY(1 << 0)
unsigned char   ifnum;  /* interface number */
unsigned char   ep_in;  /* in endpoint */
unsigned char   ep_out; /* out ... */
@@ -698,7 +699,8 @@ int usb_stor_BBB_transport(ccb *srb, struct us_data *us)
usb_stor_BBB_reset(us);
return USB_STOR_TRANSPORT_FAILED;
}
-   mdelay(5);
+   if (!(us->flags & USB_READY))
+   mdelay(5);
pipein = usb_rcvbulkpipe(us->pusb_dev, us->ep_in);
pipeout = usb_sndbulkpipe(us->pusb_dev, us->ep_out);
/* DATA phase + error handling */
@@ -963,8 +965,10 @@ static int usb_test_unit_ready(ccb *srb, struct us_data 
*ss)
srb->cmd[1] = srb->lun << 5;
srb->datalen = 0;
srb->cmdlen = 12;
-   if (ss->transport(srb, ss) == USB_STOR_TRANSPORT_GOOD)
+   if (ss->transport(srb, ss) == USB_STOR_TRANSPORT_GOOD) {
+   ss->flags |= USB_READY;
return 0;
+   }
usb_request_sense(srb, ss);
mdelay(100);
} while (retries--);
@@ -1114,6 +1118,7 @@ retry_it:
blks -= smallblks;
buf_addr += srb->datalen;
} while (blks != 0);
+   ss->flags &= ~USB_READY;
 
USB_STOR_PRINTF("usb_read: end startblk %lx, blccnt %x buffer %lx\n",
start, smallblks, buf_addr);
@@ -1193,6 +1198,7 @@ retry_it:
blks -= smallblks;
buf_addr += srb->datalen;
} while (blks != 0);
+   ss->flags &= ~USB_READY;
 
USB_STOR_PRINTF("usb_write: end startblk %lx, blccnt %x buffer %lx\n",
start, smallblks, buf_addr);
@@ -1404,6 +1410,7 @@ int usb_stor_get_info(struct usb_device *dev, struct 
us_data *ss,
cap[0] = 2880;
cap[1] = 0x200;
}
+   ss->flags &= ~USB_READY;
USB_STOR_PRINTF("Read Capacity returns: 0x%lx, 0x%lx\n", cap[0],
cap[1]);
 #if 0
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 7/7] ehci: Optimize qTD allocations

2012-08-10 Thread Benoît Thébaudeau
Relax the qTD transfer alignment constraints in order to need less qTDs for
buffers that are aligned to 512 bytes but not to pages.

Signed-off-by: Benoît Thébaudeau 
Cc: Marek Vasut 
Cc: Ilya Yanok 
Cc: Stefan Herbrechtsmeier 
---
Changes for v2: N/A.
Changes for v3:
 - New patch.
Changes for v4:
 - Optimize away the qtd_toggle variable.

 .../drivers/usb/host/ehci-hcd.c|   67 +++-
 1 file changed, 37 insertions(+), 30 deletions(-)

diff --git u-boot-usb-4f8254e.orig/drivers/usb/host/ehci-hcd.c 
u-boot-usb-4f8254e/drivers/usb/host/ehci-hcd.c
index a0ef5db..18b4bc6 100644
--- u-boot-usb-4f8254e.orig/drivers/usb/host/ehci-hcd.c
+++ u-boot-usb-4f8254e/drivers/usb/host/ehci-hcd.c
@@ -215,7 +215,7 @@ ehci_submit_async(struct usb_device *dev, unsigned long 
pipe, void *buffer,
volatile struct qTD *vtd;
unsigned long ts;
uint32_t *tdp;
-   uint32_t endpt, token, usbsts;
+   uint32_t endpt, maxpacket, token, usbsts;
uint32_t c, toggle;
uint32_t cmd;
int timeout;
@@ -230,6 +230,7 @@ ehci_submit_async(struct usb_device *dev, unsigned long 
pipe, void *buffer,
  le16_to_cpu(req->value), le16_to_cpu(req->value),
  le16_to_cpu(req->index));
 
+#define PKT_ALIGN  512
/*
 * The USB transfer is split into qTD transfers. Eeach qTD transfer is
 * described by a transfer descriptor (the qTD). The qTDs form a linked
@@ -251,43 +252,41 @@ ehci_submit_async(struct usb_device *dev, unsigned long 
pipe, void *buffer,
if (length > 0 || req == NULL) {
/*
 * Determine the qTD transfer size that will be used for the
-* data payload (not considering the final qTD transfer, which
-* may be shorter).
+* data payload (not considering the first qTD transfer, which
+* may be longer or shorter, and the final one, which may be
+* shorter).
 *
 * In order to keep each packet within a qTD transfer, the qTD
-* transfer size is aligned to EHCI_PAGE_SIZE, which is a
-* multiple of wMaxPacketSize (except in some cases for
-* interrupt transfers, see comment in submit_int_msg()).
+* transfer size is aligned to PKT_ALIGN, which is a multiple of
+* wMaxPacketSize (except in some cases for interrupt transfers,
+* see comment in submit_int_msg()).
 *
-* By default, i.e. if the input buffer is page-aligned,
+* By default, i.e. if the input buffer is aligned to PKT_ALIGN,
 * QT_BUFFER_CNT full pages will be used.
 */
int xfr_sz = QT_BUFFER_CNT;
/*
-* However, if the input buffer is not page-aligned, the qTD
-* transfer size will be one page shorter, and the first qTD
+* However, if the input buffer is not aligned to PKT_ALIGN, the
+* qTD transfer size will be one page shorter, and the first qTD
 * data buffer of each transfer will be page-unaligned.
 */
-   if ((uint32_t)buffer & (EHCI_PAGE_SIZE - 1))
+   if ((uint32_t)buffer & (PKT_ALIGN - 1))
xfr_sz--;
/* Convert the qTD transfer size to bytes. */
xfr_sz *= EHCI_PAGE_SIZE;
/*
-* Determine the number of qTDs that will be required for the
-* data payload. This value has to be rounded up since the final
-* qTD transfer may be shorter than the regular qTD transfer
-* size that has just been computed.
+* Approximate by excess the number of qTDs that will be
+* required for the data payload. The exact formula is way more
+* complicated and saves at most 2 qTDs, i.e. a total of 128
+* bytes.
 */
-   qtd_count += DIV_ROUND_UP(length, xfr_sz);
-   /* ZLPs also need a qTD. */
-   if (!qtd_count)
-   qtd_count++;
+   qtd_count += 2 + length / xfr_sz;
}
 /*
- * Threshold value based on the worst-case total size of the qTDs to allocate
- * for a mass-storage transfer of 65535 blocks of 512 bytes.
+ * Threshold value based on the worst-case total size of the allocated qTDs for
+ * a mass-storage transfer of 65535 blocks of 512 bytes.
  */
-#if CONFIG_SYS_MALLOC_LEN <= 128 * 1024
+#if CONFIG_SYS_MALLOC_LEN <= 64 + 128 * 1024
 #warning CONFIG_SYS_MALLOC_LEN may be too small for EHCI
 #endif
qtd = memalign(USB_DMA_MINALIGN, qtd_count * sizeof(struct qTD));
@@ -313,8 +312,9 @@ ehci_submit_async(struct usb_device *dev, unsigned long 
pipe, void *buffer,
 */
qh->qh_link = cpu_to_hc32

Re: [U-Boot] [PATCH v2] net: Improve the speed of netconsole

2012-08-10 Thread Stefano Babic
On 03/08/2012 22:59, Joe Hershberger wrote:
> Previously u-boot would initialize the network interface for every
> network operation and then shut it down again.  This makes sense for
> most operations where the network in not known to be needed soon after
> the operation is complete.  In the case of netconsole, it will use the
> network for every interaction with the shell or every printf.  This
> means that the network is being reinitialized very often.  On many
> devices, this intialization is very slow.
> 
> This patch checks for consecutive netconsole actions and leaves the
> ethernet hardware initialized between them.  It will still behave the
> same old way for all other network operations and any time another
> network operation happens between netconsole operations.
> 

Hi Joe,

> Signed-off-by: Joe Hershberger 
> Cc: Stefano Babic 
> ---
>  common/cmd_bootm.c   |   17 +
>  drivers/net/netconsole.c |   22 ++
>  include/net.h|   42 +-
>  net/eth.c|8 ++--
>  net/net.c|   26 --
>  5 files changed, 98 insertions(+), 17 deletions(-)
> 
> diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
> index 45e726a..83fa5d7 100644
> --- a/common/cmd_bootm.c
> +++ b/common/cmd_bootm.c
> @@ -564,6 +564,13 @@ int do_bootm_subcommand(cmd_tbl_t *cmdtp, int flag, int 
> argc,
>   break;
>   case BOOTM_STATE_OS_GO:
>   disable_interrupts();
> +#ifdef CONFIG_NETCONSOLE
> + /*
> +  * Stop the ethernet stack if NetConsole could have
> +  * left it up
> +  */
> + eth_halt();
> +#endif
>   arch_preboot_os();
>   boot_fn(BOOTM_STATE_OS_GO, argc, argv, &images);
>   break;
> @@ -622,6 +629,11 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char 
> * const argv[])
>*/
>   iflag = disable_interrupts();
>  
> +#ifdef CONFIG_NETCONSOLE
> + /* Stop the ethernet stack if NetConsole could have left it up */
> + eth_halt();
> +#endif
> +
>  #if defined(CONFIG_CMD_USB)
>   /*
>* turn off USB to prevent the host controller from writing to the
> @@ -1599,6 +1611,11 @@ static int do_bootz(cmd_tbl_t *cmdtp, int flag, int 
> argc, char * const argv[])
>*/
>   disable_interrupts();
>  
> +#ifdef CONFIG_NETCONSOLE
> + /* Stop the ethernet stack if NetConsole could have left it up */
> + eth_halt();
> +#endif
> +
>  #if defined(CONFIG_CMD_USB)
>   /*
>* turn off USB to prevent the host controller from writing to the
> diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
> index 14243b8..069ad87 100644
> --- a/drivers/net/netconsole.c
> +++ b/drivers/net/netconsole.c
> @@ -39,6 +39,11 @@ static IPaddr_t nc_ip; /* server ip */
>  static short nc_port; /* source/target port */
>  static const char *output_packet; /* used by first send udp */
>  static int output_packet_len;
> +/*
> + * Start with a default last protocol.
> + * We are only interested in NETCONS or not.
> + */
> +enum proto_t net_loop_last_protocol = BOOTP;
>  
>  static void nc_wait_arp_handler(uchar *pkt, unsigned dest,
>IPaddr_t sip, unsigned src,
> @@ -131,8 +136,13 @@ static void nc_send_packet(const char *buf, int len)
>   }
>  
>   if (eth->state != ETH_STATE_ACTIVE) {
> - if (eth_init(gd->bd) < 0)
> - return;
> + if (eth_is_on_demand_init()) {
> + if (eth_init(gd->bd) < 0)
> + return;
> + eth_set_last_protocol(NETCONS);
> + } else
> + eth_init_state_only(gd->bd);
> +
>   inited = 1;
>   }
>   pkt = (uchar *)NetTxPacket + NetEthHdrSize() + IP_UDP_HDR_SIZE;
> @@ -141,8 +151,12 @@ static void nc_send_packet(const char *buf, int len)
>   ip = nc_ip;
>   NetSendUDPPacket(ether, ip, nc_port, nc_port, len);
>  
> - if (inited)
> - eth_halt();
> + if (inited) {
> + if (eth_is_on_demand_init())
> + eth_halt();
> + else
> + eth_halt_state_only();
> + }
>  }
>  
>  static int nc_start(void)
> diff --git a/include/net.h b/include/net.h
> index 6d2d6cd..e193b7b 100644
> --- a/include/net.h
> +++ b/include/net.h
> @@ -102,7 +102,14 @@ extern int eth_register(struct eth_device* dev);/* 
> Register network device */
>  extern int eth_unregister(struct eth_device *dev);/* Remove network device */
>  extern void eth_try_another(int first_restart);  /* Change the device */
>  extern void eth_set_current(void);   /* set nterface to ethcur var */
> -extern struct eth_device *eth_get_dev(void); /* get the current device MAC */
> +/* get the curren

Re: [U-Boot] [PATCH 1/3] nds32: drop bi_enetaddr from global data

2012-08-10 Thread Macpaul Lin
Hi Mike,

2012/8/7 Mike Frysinger :
> Nothing is using this, so punt it from the gd.  Seems to just be a copy
> & paste wart from the initial port.
>
> Signed-off-by: Mike Frysinger 
> ---
>  arch/nds32/include/asm/u-boot.h |1 -
>  1 file changed, 1 deletion(-)

Applied to u-boot-nds32.git/master
Thanks.

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


Re: [U-Boot] [PATCH 2/3] nds32: delete unused local variable

2012-08-10 Thread Macpaul Lin
Hi Mike,

2012/8/7 Mike Frysinger :
> Fixes the build-time warning:
> board.c: In function 'board_init_r':
> board.c:304: warning: unused variable 's'
>
> Signed-off-by: Mike Frysinger 

Applied to u-boot-nds32.git/master
Thanks.

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


Re: [U-Boot] [PATCH 3/3] nds32: fix unused pmu_init warning

2012-08-10 Thread Macpaul Lin
Hi Mike,

2012/8/7 Mike Frysinger :
> Fixes the build-time warning:
> board.c: At top level:
> board.c:106: warning: 'pmu_init' defined but not used
>
> This makes the ifdef logic at the call site match the logic at the
> function definition.
>
> Signed-off-by: Mike Frysinger 

Applied to u-boot-nds32.git/master
Thanks.

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


[U-Boot] Pull request: u-boot-nds32

2012-08-10 Thread Macpaul Lin
Dear Wolfgang,

Please pull the following 3 patches from u-boot-nds32 into your tree.

Thanks!
Macpaul Lin.

The following changes since commit 4d3c95f5ea7c737a21cd6b9c59435ee693b3f127:

  zfs: Add ZFS filesystem support (2012-08-09 23:42:20 +0200)

are available in the git repository at:

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

for you to fetch changes up to 11a05fbde76765e4b256b86aa3b82ea3184e3c08:

  nds32: fix unused pmu_init warning (2012-08-11 00:43:28 +0800)


Mike Frysinger (3):
  nds32: drop bi_enetaddr from global data
  nds32: delete unused local variable
  nds32: fix unused pmu_init warning

 arch/nds32/include/asm/u-boot.h | 1 -
 arch/nds32/lib/board.c  | 3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 0/5] Cleanup and extend env vars

2012-08-10 Thread Benoît Thébaudeau
Hi all,

This series does some cleanup regarding env vars, and it adds a new env var for
the board revision.

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


[U-Boot] [PATCH 1/5] fw_env: Add env vars describing U-Boot target board

2012-08-10 Thread Benoît Thébaudeau
Commit 5e724ca did the same thing for env_common and env_embedded, but forgot
fw_env.

Signed-off-by: Benoît Thébaudeau 
Cc: Wolfgang Denk 
---
 .../tools/env/fw_env.c |   11 +++
 1 file changed, 11 insertions(+)

diff --git u-boot-4d3c95f.orig/tools/env/fw_env.c 
u-boot-4d3c95f/tools/env/fw_env.c
index e292d2b..1a2c227 100644
--- u-boot-4d3c95f.orig/tools/env/fw_env.c
+++ u-boot-4d3c95f/tools/env/fw_env.c
@@ -203,6 +203,17 @@ static char default_environment[] = {
 #if defined(CONFIG_PCI_BOOTDELAY) && (CONFIG_PCI_BOOTDELAY > 0)
"pcidelay=" MK_STR (CONFIG_PCI_BOOTDELAY) "\0"
 #endif
+#ifdef CONFIG_ENV_VARS_UBOOT_CONFIG
+   "arch=" CONFIG_SYS_ARCH "\0"
+   "cpu=" CONFIG_SYS_CPU "\0"
+   "board=" CONFIG_SYS_BOARD "\0"
+#ifdef CONFIG_SYS_VENDOR
+   "vendor=" CONFIG_SYS_VENDOR "\0"
+#endif
+#ifdef CONFIG_SYS_SOC
+   "soc=" CONFIG_SYS_SOC "\0"
+#endif
+#endif
 #ifdef  CONFIG_EXTRA_ENV_SETTINGS
CONFIG_EXTRA_ENV_SETTINGS
 #endif
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/5] env_common: Add missing ethprime

2012-08-10 Thread Benoît Thébaudeau
The ethprime env var was missing from env_common.

Signed-off-by: Benoît Thébaudeau 
Cc: Wolfgang Denk 
---
 .../common/env_common.c|3 +++
 1 file changed, 3 insertions(+)

diff --git u-boot-4d3c95f.orig/common/env_common.c 
u-boot-4d3c95f/common/env_common.c
index d9e990d..911a6af 100644
--- u-boot-4d3c95f.orig/common/env_common.c
+++ u-boot-4d3c95f/common/env_common.c
@@ -80,6 +80,9 @@ const uchar default_environment[] = {
 #ifdef CONFIG_ETH5ADDR
"eth5addr=" MK_STR(CONFIG_ETH5ADDR) "\0"
 #endif
+#ifdef CONFIG_ETHPRIME
+   "ethprime=" CONFIG_ETHPRIME "\0"
+#endif
 #ifdef CONFIG_IPADDR
"ipaddr="   MK_STR(CONFIG_IPADDR)   "\0"
 #endif
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 3/5] env import/export: Remove from help if disabled

2012-08-10 Thread Benoît Thébaudeau
Signed-off-by: Benoît Thébaudeau 
Cc: Wolfgang Denk 
---
 .../common/cmd_nvedit.c|4 
 1 file changed, 4 insertions(+)

diff --git u-boot-4d3c95f.orig/common/cmd_nvedit.c 
u-boot-4d3c95f/common/cmd_nvedit.c
index fd05e72..0f320cc 100644
--- u-boot-4d3c95f.orig/common/cmd_nvedit.c
+++ u-boot-4d3c95f/common/cmd_nvedit.c
@@ -954,11 +954,15 @@ U_BOOT_CMD(
 #if defined(CONFIG_CMD_EDITENV)
"env edit name - edit environment variable\n"
 #endif
+#if defined(CONFIG_CMD_EXPORTENV)
"env export [-t | -b | -c] [-s size] addr [var ...] - export 
environment\n"
+#endif
 #if defined(CONFIG_CMD_GREPENV)
"env grep string [...] - search environment\n"
 #endif
+#if defined(CONFIG_CMD_IMPORTENV)
"env import [-d] [-t | -b | -c] addr [size] - import environment\n"
+#endif
"env print [name ...] - print environment\n"
 #if defined(CONFIG_CMD_RUN)
"env run var [...] - run commands in an environment variable\n"
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 4/5] README: The ver env var is not read-only

2012-08-10 Thread Benoît Thébaudeau
Signed-off-by: Benoît Thébaudeau 
Cc: Wolfgang Denk 
---
 {u-boot-4d3c95f.orig => u-boot-4d3c95f}/README |1 -
 1 file changed, 1 deletion(-)

diff --git u-boot-4d3c95f.orig/README u-boot-4d3c95f/README
index fb9d904..369ea9c 100644
--- u-boot-4d3c95f.orig/README
+++ u-boot-4d3c95f/README
@@ -907,7 +907,6 @@ The following options need to be configured:
If this variable is defined, an environment variable
named "ver" is created by U-Boot showing the U-Boot
version as printed by the "version" command.
-   This variable is readonly.
 
 - Real-Time Clock:
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 5/5] Add env var giving the board revision

2012-08-10 Thread Benoît Thébaudeau
The board revision can be a useful env var, like its serial number.

Signed-off-by: Benoît Thébaudeau 
Cc: Wolfgang Denk 
---
 {u-boot-4d3c95f.orig => u-boot-4d3c95f}/README |   21 ++--
 .../common/cmd_nvedit.c|5 +++--
 .../tools/env/fw_env.c |5 +++--
 3 files changed, 17 insertions(+), 14 deletions(-)

diff --git u-boot-4d3c95f.orig/README u-boot-4d3c95f/README
index 369ea9c..2ea48cf 100644
--- u-boot-4d3c95f.orig/README
+++ u-boot-4d3c95f/README
@@ -2073,13 +2073,13 @@ The following options need to be configured:
 - Vendor Parameter Protection:
 
U-Boot considers the values of the environment
-   variables "serial#" (Board Serial Number) and
-   "ethaddr" (Ethernet Address) to be parameters that
-   are set once by the board vendor / manufacturer, and
-   protects these variables from casual modification by
-   the user. Once set, these variables are read-only,
-   and write or delete attempts are rejected. You can
-   change this behaviour:
+   variables "serial#" (Board Serial Number), "rev"
+   (Board Revision) and "ethaddr" (Ethernet Address)
+   to be parameters that are set once by the board
+   vendor / manufacturer, and protects these variables
+   from casual modification by the user. Once set,
+   these variables are read-only, and write or delete
+   attempts are rejected. You can change this behaviour:
 
If CONFIG_ENV_OVERWRITE is #defined in your config
file, the write protection for vendor parameters is
@@ -2090,8 +2090,8 @@ The following options need to be configured:
_and_ CONFIG_OVERWRITE_ETHADDR_ONCE, a default
Ethernet address is installed in the environment,
which can be changed exactly ONCE by the user. [The
-   serial# is unaffected by this, i. e. it remains
-   read-only.]
+   serial# and rev are unaffected by this, i. e. they
+   remain read-only.]
 
 - Protected RAM:
CONFIG_PRAM
@@ -3968,10 +3968,11 @@ depending the information provided by your boot server:
   serverip - see above
 
 
-There are two special Environment Variables:
+There are three special Environment Variables:
 
   serial#  - contains hardware identification information such
  as type string and/or serial number
+  rev  - hardware revision
   ethaddr  - Ethernet address
 
 These variables can be set only once (usually during manufacturing of
diff --git u-boot-4d3c95f.orig/common/cmd_nvedit.c 
u-boot-4d3c95f/common/cmd_nvedit.c
index 0f320cc..d16aeb6 100644
--- u-boot-4d3c95f.orig/common/cmd_nvedit.c
+++ u-boot-4d3c95f/common/cmd_nvedit.c
@@ -255,12 +255,13 @@ int _do_env_set(int flag, int argc, char * const argv[])
}
 
/*
-* Some variables like "ethaddr" and "serial#" can be set only
-* once and cannot be deleted; also, "ver" is readonly.
+* Some variables like "ethaddr", "serial#" and "rev" can be set only
+* once and cannot be deleted.
 */
if (ep) {   /* variable exists */
 #ifndef CONFIG_ENV_OVERWRITE
if (strcmp(name, "serial#") == 0 ||
+   strcmp(name, "rev") == 0 ||
(strcmp(name, "ethaddr") == 0
 #if defined(CONFIG_OVERWRITE_ETHADDR_ONCE) && defined(CONFIG_ETHADDR)
 && strcmp(ep->data, MK_STR(CONFIG_ETHADDR)) != 0
diff --git u-boot-4d3c95f.orig/tools/env/fw_env.c 
u-boot-4d3c95f/tools/env/fw_env.c
index 1a2c227..b5aa3aa 100644
--- u-boot-4d3c95f.orig/tools/env/fw_env.c
+++ u-boot-4d3c95f/tools/env/fw_env.c
@@ -405,10 +405,11 @@ int fw_env_write(char *name, char *value)
if (oldval) {
 #ifndef CONFIG_ENV_OVERWRITE
/*
-* Ethernet Address and serial# can be set only once
+* Ethernet Address, serial# and rev can be set only once
 */
if (
(strcmp(name, "serial#") == 0) ||
+   (strcmp (name, "rev") == 0) ||
((strcmp(name, "ethaddr") == 0)
 #if defined(CONFIG_OVERWRITE_ETHADDR_ONCE) && defined(CONFIG_ETHADDR)
&& (strcmp(oldval, MK_STR(CONFIG_ETHADDR)) != 0)
@@ -474,7 +475,7 @@ int fw_env_write(char *name, char *value)
  * Deletes or sets environment variables. Returns -1 and sets errno error 
codes:
  * 0 - OK
  * EINVAL - need at least 1 argument
- * EROFS  - certain variables ("ethaddr", "serial#") cannot be
+ * EROFS  - certain variables ("ethaddr", "serial#", "rev") cannot be
  * modified or deleted
  *
  */
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] eth_write_hwaddr: Return error for invalid MACs

2012-08-10 Thread Benoît Thébaudeau
If dev->enetaddr was supposed to be set with dev->write_hwaddr() but the MAC
address was not valid, return an error.

Signed-off-by: Benoît Thébaudeau 
Cc: Joe Hershberger 
---
 {u-boot-4d3c95f.orig => u-boot-4d3c95f}/net/eth.c |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git u-boot-4d3c95f.orig/net/eth.c u-boot-4d3c95f/net/eth.c
index 1a11ce1..174361f 100644
--- u-boot-4d3c95f.orig/net/eth.c
+++ u-boot-4d3c95f/net/eth.c
@@ -222,9 +222,12 @@ int eth_write_hwaddr(struct eth_device *dev, const char 
*base_name,
}
 
if (dev->write_hwaddr &&
-   !eth_mac_skip(eth_number) &&
-   is_valid_ether_addr(dev->enetaddr))
+   !eth_mac_skip(eth_number)) {
+   if (!is_valid_ether_addr(dev->enetaddr))
+   return -1;
+
ret = dev->write_hwaddr(dev);
+   }
 
return ret;
 }
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC PATCH 0/5] Port of MUSB gadget driver from Linux

2012-08-10 Thread Ilya Yanok
Dear Marek, Wolfgang,

On Thu, Aug 9, 2012 at 11:23 PM, Wolfgang Denk  wrote:

>
> > I hate to say it ... but given that this will cause duplication of code,
> I'm
> > somehow inclined to push you to do a complete replacement of the old
> musb code,
> > remove it and add this.
>
>
> Agreed, we should avoid such duplication.
>

I agree with you generally. But I fear I won't have enough time now to port
the host part too. Also please note that usbtty works only with the old API
now.

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


Re: [U-Boot] [PATCH v4 1/5] net/bootp: add VCI support for BOOTP also

2012-08-10 Thread Ilya Yanok
Hi Joe,

On Mon, Aug 6, 2012 at 1:21 AM, Ilya Yanok wrote:

> Vendor Class Identifier option is common to BOOTP and DHCP and
> can be useful without PXE. So send VCI in both BOOTP and DHCP
> requests if CONFIG_BOOTP_VCI_STRING is defined.
>
> Signed-off-by: Ilya Yanok 
>
> ---
> Changes in v4:
>  - moved vci_strlen var inside macro
>  - used strlen instead of sizeof
>
>
Is it ok now? What about the rest of the series?

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


Re: [U-Boot] [PATCH v4 5/7] usb_storage: Adjust time-outs

2012-08-10 Thread Ilya Yanok
Hi Benoit,

On Fri, Aug 10, 2012 at 8:23 PM, Benoît Thébaudeau <
benoit.thebaud...@advansee.com> wrote:

> Adjust time-out value for the new EHCI mechanism.
>

Could you please be a bit more specific? ;)

How this timeout is related to the new mechanism? Is it really EHCI
specific? If it is, that's hardcoding of lower layer details again, I think
that's undesirable...

But generally this series looks really good. Thanks a lot!

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


Re: [U-Boot] [PATCH v3 0/6] env: handle special variables and selective env default

2012-08-10 Thread Wolfgang Denk
Dear Holger,

In message <5024cc15.8010...@keymile.com> you wrote:
> 
> due to the fact that Gerlando is in his vacations and has therefore only 
> little
> time to do updates here I propose the following. I could prepare a branch as 
> you
> suggested based on current denx master with this changeset. But where and how
> should I push it to git.denx.de? Or will you prepare this branch?

I already did.

I guess we will not have -rc1 before end of week 36, if not even
later, so this should work out nicely.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
There are two ways to write error-free programs. Only the  third  one
works.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v5 1/1] zfs: Add ZFS filesystem support

2012-08-10 Thread Wolfgang Denk
Dear Jorgen Lundman,

In message <5024f981.2040...@lundman.net> you wrote:
>
> That is the best news ever, thanks! Also thanks to Graeme for all the help.

Thanks for your hard work, it's highly appreciated (even though it
sometimes doesn't look like that - it really is).

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Advice is seldom welcome; and those who want it the most always like
it the least. -- Philip Earl of Chesterfield
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 5/7] usb_storage: Adjust time-outs

2012-08-10 Thread Benoît Thébaudeau
Hi Ilya,

On Fri, Aug 10, 2012 at 8:03:12 PM, Ilya Yanok wrote:
> Hi Benoit,

> On Fri, Aug 10, 2012 at 8:23 PM, Benoît Thébaudeau <
> benoit.thebaud...@advansee.com > wrote:

> > Adjust time-out value for the new EHCI mechanism.
> 

> Could you please be a bit more specific? ;)

> How this timeout is related to the new mechanism? Is it really EHCI
> specific? If it is, that's hardcoding of lower layer details again,
> I think that's undesirable...

Well, I did this specific patch a very long time ago, and I don't remember the
details. I know that things did not work without it in my test conditions at
that time. I've just run again all my tests with the current code on all my
platforms without this patch, and everything works fine. So it was perhaps a
device-related issue rather than an EHCI-related one. Since the rationale for
this patch is no longer clear and things work fine without it, we can probably
drop it. I let you and Marek decide.

> But generally this series looks really good. Thanks a lot!

Great. You're welcome.

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


Re: [U-Boot] [PATCH v4 4/7] usb_storage: Remove EHCI constraints

2012-08-10 Thread Ilya Yanok
Hi Benoit,

On Fri, Aug 10, 2012 at 8:23 PM, Benoît Thébaudeau <
benoit.thebaud...@advansee.com> wrote:

> diff --git u-boot-usb-4f8254e.orig/common/usb_storage.c
> u-boot-usb-4f8254e/common/usb_storage.c
> index 0cd6399..822bd64 100644
> --- u-boot-usb-4f8254e.orig/common/usb_storage.c
> +++ u-boot-usb-4f8254e/common/usb_storage.c
> @@ -157,12 +157,13 @@ struct us_data {
>
>  #ifdef CONFIG_USB_EHCI
>  /*
> - * The U-Boot EHCI driver cannot handle more than 5 page aligned buffers
> - * of 4096 bytes in a transfer without running itself out of qt_buffers
> + * The U-Boot EHCI driver can handle any transfer length as long as there
> is
> + * enough free heap space left, but the SCSI READ(10) and WRITE(10)
> commands are
> + * limited to 65535 bytes.
>

bytes?


>   */
> -#define USB_MAX_XFER_BLK(start, blksz) (((4096 * 5) - (start % 4096)) /
> blksz)
> +#define USB_MAX_XFER_BLK   65535
>

But here you limit it to 65535 _blocks_, right? One of the two should be
wrong ;)

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


Re: [U-Boot] [PATCH v4 4/7] usb_storage: Remove EHCI constraints

2012-08-10 Thread Benoît Thébaudeau
Hi Ilya,

On Fri, Aug 10, 2012 at 8:34:14 PM, Ilya Yanok wrote:
> Hi Benoit,

> On Fri, Aug 10, 2012 at 8:23 PM, Benoît Thébaudeau <
> benoit.thebaud...@advansee.com > wrote:

> > diff --git u-boot-usb-4f8254e.orig/common/usb_storage.c
> > u-boot-usb-4f8254e/common/usb_storage.c
> 
> > index 0cd6399..822bd64 100644
> 
> > --- u-boot-usb-4f8254e.orig/common/usb_storage.c
> 
> > +++ u-boot-usb-4f8254e/common/usb_storage.c
> 
> > @@ -157,12 +157,13 @@ struct us_data {
> 

> > #ifdef CONFIG_USB_EHCI
> 
> > /*
> 
> > - * The U-Boot EHCI driver cannot handle more than 5 page aligned
> > buffers
> 
> > - * of 4096 bytes in a transfer without running itself out of
> > qt_buffers
> 
> > + * The U-Boot EHCI driver can handle any transfer length as long
> > as
> > there is
> 
> > + * enough free heap space left, but the SCSI READ(10) and
> > WRITE(10)
> > commands are
> 
> > + * limited to 65535 bytes.
> 

> bytes?

> > */
> 
> > -#define USB_MAX_XFER_BLK(start, blksz) (((4096 * 5) - (start %
> > 4096)) / blksz)
> 
> > +#define USB_MAX_XFER_BLK 65535
> 

> But here you limit it to 65535 _blocks_, right? One of the two should
> be wrong ;)

Argh, it was a typo in the comment. Thanks for catching this. I meant "blocks"
of course. Marek, can you fix this comment on-the-fly when applying?

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


[U-Boot] [PATCH] mxc_spi: Round up clock divider

2012-08-10 Thread Benoît Thébaudeau
Since the input frequency of the API is a maximum that should not be exceeded in
order for the devices to operate properly, the SPI clock divider should be
rounded up, not truncated.

Signed-off-by: Benoît Thébaudeau 
Cc: Wolfgang Denk 
Cc: Stefano Babic 
---
 .../drivers/spi/mxc_spi.c  |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git u-boot-4d3c95f.orig/drivers/spi/mxc_spi.c 
u-boot-4d3c95f/drivers/spi/mxc_spi.c
index 2e15318..cf1462f 100644
--- u-boot-4d3c95f.orig/drivers/spi/mxc_spi.c
+++ u-boot-4d3c95f/drivers/spi/mxc_spi.c
@@ -96,7 +96,7 @@ static s32 spi_cfg_mxc(struct mxc_spi_slave *mxcs, unsigned 
int cs,
 
clk_src = mxc_get_clock(MXC_CSPI_CLK);
 
-   div = clk_src / max_hz;
+   div = DIV_ROUND_UP(clk_src, max_hz);
div = get_cspi_div(div);
 
debug("clk %d Hz, div %d, real clk %d Hz\n",
@@ -147,7 +147,7 @@ static s32 spi_cfg_mxc(struct mxc_spi_slave *mxcs, unsigned 
int cs,
 * The following computation is taken directly from Freescale's code.
 */
if (clk_src > max_hz) {
-   pre_div = clk_src / max_hz;
+   pre_div = DIV_ROUND_UP(clk_src, max_hz);
if (pre_div > 16) {
post_div = pre_div / 16;
pre_div = 15;
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] mmc_get_dev: Return error if mmc_init fails

2012-08-10 Thread Benoît Thébaudeau
Signed-off-by: Benoît Thébaudeau 
Cc: Andy Fleming 
---
 .../drivers/mmc/mmc.c  |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git u-boot-4d3c95f.orig/drivers/mmc/mmc.c 
u-boot-4d3c95f/drivers/mmc/mmc.c
index c1c2862..c0b969c 100644
--- u-boot-4d3c95f.orig/drivers/mmc/mmc.c
+++ u-boot-4d3c95f/drivers/mmc/mmc.c
@@ -1311,10 +1311,9 @@ int mmc_register(struct mmc *mmc)
 block_dev_desc_t *mmc_get_dev(int dev)
 {
struct mmc *mmc = find_mmc_device(dev);
-   if (!mmc)
+   if (!mmc || mmc_init(mmc))
return NULL;
 
-   mmc_init(mmc);
return &mmc->block_dev;
 }
 #endif
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Fail to compile a DEBUG version of u-boot.bin for Freescale MPC8536DS

2012-08-10 Thread Yuming Chen
Hi,
   I tried to build a u-boot.bin for Freescale MPC8526DS with original
version 2010.12 source code, it succeeds if I do not define DEBUG in
the MPC8536DS.h file.  But after I added #define DEBUG in
include/configs/MPC8536DS.h to turn on many printf, the build of the
uboot fails as follows,

/eldk/eldk-4.1/usr/bin/ppc_85xx-ld: section .bootpg [e000 ->
e22f] overlaps section .data [efffec1c -> f0006caf]
/eldk/eldk-4.1/usr/bin/ppc_85xx-ld: section .resetvec [effc ->
efff] overlaps section .data [efffec1c -> f0006caf]
/eldk/eldk-4.1/usr/bin/ppc_85xx-ld: u-boot: section .bootpg lma
0xe000 overlaps previous sections
/eldk/eldk-4.1/usr/bin/ppc_85xx-ld: u-boot: section .resetvec lma
0xeffc overlaps previous sections
/eldk/eldk-4.1/usr/bin/ppc_85xx-ld: u-boot: section .u_boot_cmd lma
0xf0006cb0 overlaps previous sections
make: *** [u-boot] Error 1

Is there an easy solution?  How can I adjust the space usage to build
a debug version of u-boot.bin?

Thanks.






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


Re: [U-Boot] [RFC PATCH 0/5] Port of MUSB gadget driver from Linux

2012-08-10 Thread Ilya Yanok
Marek, Wolfgang,

On Fri, Aug 10, 2012 at 9:56 PM, Ilya Yanok
wrote:

> Dear Marek, Wolfgang,
>
> On Thu, Aug 9, 2012 at 11:23 PM, Wolfgang Denk  wrote:
>
>>
>> > I hate to say it ... but given that this will cause duplication of
>> code, I'm
>> > somehow inclined to push you to do a complete replacement of the old
>> musb code,
>> > remove it and add this.
>>
>>
>> Agreed, we should avoid such duplication.
>>
>
> I agree with you generally. But I fear I won't have enough time now to
> port the host part too. Also please note that usbtty works only with the
> old API now.
>

Also current MUSB code supports a number of systems, I could add support
for all these to the new code (I just don't have the hardware). So I think
it's better to allow the two versions coexist for some time.

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


Re: [U-Boot] [RFC PATCH 0/5] Port of MUSB gadget driver from Linux

2012-08-10 Thread Ilya Yanok
Argh, sorry. could = could not.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] mmcinfo: Fix help message

2012-08-10 Thread Benoît Thébaudeau
Signed-off-by: Benoît Thébaudeau 
Cc: Andy Fleming 
---
 .../common/cmd_mmc.c   |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git u-boot-4d3c95f.orig/common/cmd_mmc.c u-boot-4d3c95f/common/cmd_mmc.c
index 750509d..79a1088 100644
--- u-boot-4d3c95f.orig/common/cmd_mmc.c
+++ u-boot-4d3c95f/common/cmd_mmc.c
@@ -144,8 +144,7 @@ int do_mmcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char 
* const argv[])
 U_BOOT_CMD(
mmcinfo, 1, 0, do_mmcinfo,
"display MMC info",
-   "- device number of the device to dislay info of\n"
-   ""
+   "- dislay info of the current MMC device"
 );
 
 int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] net: Improve the speed of netconsole

2012-08-10 Thread Joe Hershberger
Hi Mike,

On Fri, Aug 3, 2012 at 3:59 PM, Joe Hershberger  wrote:
> Previously u-boot would initialize the network interface for every
> network operation and then shut it down again.  This makes sense for
> most operations where the network in not known to be needed soon after
> the operation is complete.  In the case of netconsole, it will use the
> network for every interaction with the shell or every printf.  This
> means that the network is being reinitialized very often.  On many
> devices, this intialization is very slow.
>
> This patch checks for consecutive netconsole actions and leaves the
> ethernet hardware initialized between them.  It will still behave the
> same old way for all other network operations and any time another
> network operation happens between netconsole operations.
>
> Signed-off-by: Joe Hershberger 
> Cc: Stefano Babic 

Sorry I forgot to Cc you on the update... I also forgot the revision notes...

Changes since v1:
 - Halt Ethernet stack before booting Linux
 - Clean up CPP guard noise
 - Reduce overhead of no-re-init case

> ---
>  common/cmd_bootm.c   |   17 +
>  drivers/net/netconsole.c |   22 ++
>  include/net.h|   42 +-
>  net/eth.c|8 ++--
>  net/net.c|   26 --
>  5 files changed, 98 insertions(+), 17 deletions(-)
>
> diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
> index 45e726a..83fa5d7 100644
> --- a/common/cmd_bootm.c
> +++ b/common/cmd_bootm.c
> @@ -564,6 +564,13 @@ int do_bootm_subcommand(cmd_tbl_t *cmdtp, int flag, int 
> argc,
> break;
> case BOOTM_STATE_OS_GO:
> disable_interrupts();
> +#ifdef CONFIG_NETCONSOLE
> +   /*
> +* Stop the ethernet stack if NetConsole could have
> +* left it up
> +*/
> +   eth_halt();
> +#endif
> arch_preboot_os();
> boot_fn(BOOTM_STATE_OS_GO, argc, argv, &images);
> break;
> @@ -622,6 +629,11 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char 
> * const argv[])
>  */
> iflag = disable_interrupts();
>
> +#ifdef CONFIG_NETCONSOLE
> +   /* Stop the ethernet stack if NetConsole could have left it up */
> +   eth_halt();
> +#endif
> +
>  #if defined(CONFIG_CMD_USB)
> /*
>  * turn off USB to prevent the host controller from writing to the
> @@ -1599,6 +1611,11 @@ static int do_bootz(cmd_tbl_t *cmdtp, int flag, int 
> argc, char * const argv[])
>  */
> disable_interrupts();
>
> +#ifdef CONFIG_NETCONSOLE
> +   /* Stop the ethernet stack if NetConsole could have left it up */
> +   eth_halt();
> +#endif
> +
>  #if defined(CONFIG_CMD_USB)
> /*
>  * turn off USB to prevent the host controller from writing to the
> diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
> index 14243b8..069ad87 100644
> --- a/drivers/net/netconsole.c
> +++ b/drivers/net/netconsole.c
> @@ -39,6 +39,11 @@ static IPaddr_t nc_ip; /* server ip */
>  static short nc_port; /* source/target port */
>  static const char *output_packet; /* used by first send udp */
>  static int output_packet_len;
> +/*
> + * Start with a default last protocol.
> + * We are only interested in NETCONS or not.
> + */
> +enum proto_t net_loop_last_protocol = BOOTP;
>
>  static void nc_wait_arp_handler(uchar *pkt, unsigned dest,
>  IPaddr_t sip, unsigned src,
> @@ -131,8 +136,13 @@ static void nc_send_packet(const char *buf, int len)
> }
>
> if (eth->state != ETH_STATE_ACTIVE) {
> -   if (eth_init(gd->bd) < 0)
> -   return;
> +   if (eth_is_on_demand_init()) {
> +   if (eth_init(gd->bd) < 0)
> +   return;
> +   eth_set_last_protocol(NETCONS);
> +   } else
> +   eth_init_state_only(gd->bd);
> +
> inited = 1;
> }
> pkt = (uchar *)NetTxPacket + NetEthHdrSize() + IP_UDP_HDR_SIZE;
> @@ -141,8 +151,12 @@ static void nc_send_packet(const char *buf, int len)
> ip = nc_ip;
> NetSendUDPPacket(ether, ip, nc_port, nc_port, len);
>
> -   if (inited)
> -   eth_halt();
> +   if (inited) {
> +   if (eth_is_on_demand_init())
> +   eth_halt();
> +   else
> +   eth_halt_state_only();
> +   }
>  }
>
>  static int nc_start(void)
> diff --git a/include/net.h b/include/net.h
> index 6d2d6cd..e193b7b 100644
> --- a/include/net.h
> +++ b/include/net.h
> @@ -102,7 +102,14 @@ extern int eth_register(struct eth_device* dev);/* 
> Register network device */
>  extern int eth_unregister(struct eth_dev

[U-Boot] [PATCH] mtest: Disable dcache during test

2012-08-10 Thread Benoît Thébaudeau
mtest is supposed to test many types of memory accesses in many different
conditions. If dcache is enabled, memory accesses are likely bursts, and some
memory accesses are simply skipped. Hence, dcache should be disabled during
mtest operation so that what mtest actually tests is not masked by dcache.

Signed-off-by: Benoît Thébaudeau 
Cc: Wolfgang Denk 
---
 .../common/cmd_mem.c   |   39 ++--
 1 file changed, 27 insertions(+), 12 deletions(-)

diff --git u-boot-4d3c95f.orig/common/cmd_mem.c u-boot-4d3c95f/common/cmd_mem.c
index 18f0a3f..5d2b735 100644
--- u-boot-4d3c95f.orig/common/cmd_mem.c
+++ u-boot-4d3c95f/common/cmd_mem.c
@@ -600,6 +600,8 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
ulong   errs = 0;
int iterations = 1;
int iteration_limit;
+   int dcache;
+   int ret = 1;
 
 #if defined(CONFIG_SYS_ALT_MEMTEST)
vu_long len;
@@ -651,6 +653,13 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
else
iteration_limit = 0;
 
+   /* Perform tests on the underlying memory rather than on the D-cache. */
+   dcache = dcache_status();
+   if (dcache) {
+   dcache_disable();
+   invalidate_dcache_all();
+   }
+
 #if defined(CONFIG_SYS_ALT_MEMTEST)
printf ("Testing %08x ... %08x:\n", (uint)start, (uint)end);
debug("%s:%d: start 0x%p end 0x%p\n",
@@ -659,14 +668,15 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
for (;;) {
if (ctrlc()) {
putc ('\n');
-   return 1;
+   goto end;
}
 
 
if (iteration_limit && iterations > iteration_limit) {
printf("Tested %d iteration(s) with %lu errors.\n",
iterations-1, errs);
-   return errs != 0;
+   ret = errs != 0;
+   goto end;
}
 
printf("Iteration: %6d\r", iterations);
@@ -704,7 +714,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
errs++;
if (ctrlc()) {
putc ('\n');
-   return 1;
+   goto end;
}
}
*addr  = ~val;
@@ -717,7 +727,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
errs++;
if (ctrlc()) {
putc ('\n');
-   return 1;
+   goto end;
}
}
}
@@ -787,7 +797,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
errs++;
if (ctrlc()) {
putc ('\n');
-   return 1;
+   goto end;
}
}
}
@@ -809,7 +819,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
errs++;
if (ctrlc()) {
putc ('\n');
-   return 1;
+   goto end;
}
}
}
@@ -851,7 +861,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
errs++;
if (ctrlc()) {
putc ('\n');
-   return 1;
+   goto end;
}
}
 
@@ -873,7 +883,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
errs++;
if (ctrlc()) {
putc ('\n');
-   return 1;
+   goto end;
}
}
start[offset] = 0;
@@ -885,13 +895,14 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
for (;;) {
if (ctrlc()) {
putc ('\n');
-   return 1;
+   goto end;
}
 
if (iteration_limit && iterations > iteration_limit) {
printf("Tested %d iteration(s) with %lu errors.\n",
iterations-1, errs);
-   return errs != 0;
+   ret = errs != 0;
+   goto end;
}

Re: [U-Boot] [PATCH v4 4/7] usb_storage: Remove EHCI constraints

2012-08-10 Thread Marek Vasut
Dear Benoît Thébaudeau,

> Hi Ilya,
> 
> On Fri, Aug 10, 2012 at 8:34:14 PM, Ilya Yanok wrote:
> > Hi Benoit,
> > 
> > On Fri, Aug 10, 2012 at 8:23 PM, Benoît Thébaudeau <
> > 
> > benoit.thebaud...@advansee.com > wrote:
> > > diff --git u-boot-usb-4f8254e.orig/common/usb_storage.c
> > > u-boot-usb-4f8254e/common/usb_storage.c
> > > 
> > > index 0cd6399..822bd64 100644
> > > 
> > > --- u-boot-usb-4f8254e.orig/common/usb_storage.c
> > > 
> > > +++ u-boot-usb-4f8254e/common/usb_storage.c
> > > 
> > > @@ -157,12 +157,13 @@ struct us_data {
> > > 
> > > 
> > > #ifdef CONFIG_USB_EHCI
> > > 
> > > /*
> > > 
> > > - * The U-Boot EHCI driver cannot handle more than 5 page aligned
> > > buffers
> > > 
> > > - * of 4096 bytes in a transfer without running itself out of
> > > qt_buffers
> > > 
> > > + * The U-Boot EHCI driver can handle any transfer length as long
> > > as
> > > there is
> > > 
> > > + * enough free heap space left, but the SCSI READ(10) and
> > > WRITE(10)
> > > commands are
> > > 
> > > + * limited to 65535 bytes.
> > 
> > bytes?
> > 
> > > */
> > > 
> > > -#define USB_MAX_XFER_BLK(start, blksz) (((4096 * 5) - (start %
> > > 4096)) / blksz)
> > > 
> > > +#define USB_MAX_XFER_BLK 65535
> > 
> > But here you limit it to 65535 _blocks_, right? One of the two should
> > be wrong ;)
> 
> Argh, it was a typo in the comment. Thanks for catching this. I meant
> "blocks" of course. Marek, can you fix this comment on-the-fly when
> applying?

Roger, will do!

> Best regards,
> Benoît

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] serial: CONSOLE macro is not used

2012-08-10 Thread Anatolij Gustschin
Hi,

On Fri, 10 Aug 2012 09:04:28 +0200
Michal Simek  wrote:

> Signed-off-by: Michal Simek 
> ---
>  drivers/serial/serial.c |3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)

Applied to my staging branch, thanks!

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


[U-Boot] [PATCH] avr32: Remove redundant LDSCRIPT definition

2012-08-10 Thread Benoît Thébaudeau
AVR32's LD script uses a standard location that is now automatically detected by
the main Makefile, so its definition in AVR32's config.mk is now obsolete and
redundant.

Signed-off-by: Benoît Thébaudeau 
Cc: Andreas Bießmann 
---
 .../arch/avr32/config.mk   |2 --
 1 file changed, 2 deletions(-)

diff --git u-boot-4d3c95f.orig/arch/avr32/config.mk 
u-boot-4d3c95f/arch/avr32/config.mk
index d8e7ebb..a751a3d 100644
--- u-boot-4d3c95f.orig/arch/avr32/config.mk
+++ u-boot-4d3c95f/arch/avr32/config.mk
@@ -29,5 +29,3 @@ PLATFORM_RELFLAGS += -ffixed-r5 -fPIC -mno-init-got 
-mrelax
 PLATFORM_RELFLAGS  += -ffunction-sections -fdata-sections
 
 LDFLAGS_u-boot = --gc-sections --relax
-
-LDSCRIPT   = $(SRCTREE)/$(CPUDIR)/u-boot.lds
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] fdt: Include arch specific gpio.h instead of asm-generic/gpio.h

2012-08-10 Thread Anatolij Gustschin
Hi,

On Wed, 11 Jul 2012 14:26:38 +0200
Michal Simek  wrote:

> Include arch specific gpio.h instead of asm-generic/gpio.h
> because several architectures (Microblaze, Blackfin, Nios2, OpenRISC)
> define gpio functions in header file.
> asm-generic/gpio.h can be included in arch specific gpio.h
> (For example: ARM)
> 
> Signed-off-by: Michal Simek 
> CC: Simon Glass 
> 
> ---
> v2: Use only arch specific gpio.h
> Remove commentary
> ---
>  lib/fdtdec.c |3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)

applied to my staging branch, thanks!

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


Re: [U-Boot] Please pull u-boot-staging/tr...@ti.com

2012-08-10 Thread Wolfgang Denk
Dear Tom,

In message <20120810161021.GG3306@bill-the-cat> you wrote:
> 
> To try and ease the backlog of ARM changes, I've taken the liberty of
> grabbing the Snowball and Raspberry Pi model B board support patches and
> putting them into the staging tree.  Both of these series have been
> posted for some time and been reviewed.  Wolfgang, if you would like to
> wait for Albert to pick up this request, that's fine.  I just wanted to
> make sure the submitters weren't left waiting.  Thanks!

Thanks, highly appreciated.

As this contains a lot of ARM, indeed I would like to wait for
Albert's ACK or pulling (whichever he prefers).

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Politics:  A  strife  of  interests  masquerading  as  a  contest  of
principles. The conduct of public affairs for private advantage.
- Ambrose Bierce
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 0/7] ehci: Improve performance

2012-08-10 Thread Marek Vasut
Dear Benoît Thébaudeau,

> Hi all,
> 
> This series aims at improving EHCI performance. There is also some code
> cleanup BTW.
> 
> Best regards,
> Benoît

Applied all but 5/7 and pushed. Since we all have vacations etc etc, this will 
appear in the mainline around start of september.

Thanks a lot for this awesome patchset! _Great_ work guys!

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] tools: add kwboot binary to .gitignore file

2012-08-10 Thread Anatolij Gustschin
Hi,

On Sun, 15 Jul 2012 18:29:38 +0200
Luka Perkov  wrote:

> 
> Signed-off-by: Luka Perkov 
> ---
> 
>  tools/.gitignore |1 +
>  1 file changed, 1 insertion(+)

applied to my staging branch, thanks!

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


[U-Boot] arm: omap: Fix switching back to nandecc sw.

2012-08-10 Thread Jeroen Hofstee

Switching back to nandecc sw fails to write correctly. A fix for this is
already mentioned in the thread below, lets fix it.

mentioned in http://lists.denx.de/pipermail/u-boot/2012-February/119002.html

Signed-off-by: Jeroen Hofstee 
---
 drivers/mtd/nand/omap_gpmc.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand/omap_gpmc.c
index ca868ef..71aec1a 100644
--- a/drivers/mtd/nand/omap_gpmc.c
+++ b/drivers/mtd/nand/omap_gpmc.c
@@ -280,6 +280,7 @@ void omap_nand_switch_ecc(int32_t hardware)
 omap_hwecc_init(nand);
 printf("HW ECC selected\n");
 } else {
+nand->ecc.size = 0;
 nand->ecc.mode = NAND_ECC_SOFT;
 /* Use mtd default settings */
 nand->ecc.layout = NULL;
--
1.7.9.5

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


Re: [U-Boot] Pull request: u-boot-nds32

2012-08-10 Thread Wolfgang Denk
Dear Macpaul Lin,

In message  
you wrote:
> Dear Wolfgang,
> 
> Please pull the following 3 patches from u-boot-nds32 into your tree.
> 
> Thanks!
> Macpaul Lin.
> 
> The following changes since commit 4d3c95f5ea7c737a21cd6b9c59435ee693b3f127:
> 
>   zfs: Add ZFS filesystem support (2012-08-09 23:42:20 +0200)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-nds32.git master
> 
> for you to fetch changes up to 11a05fbde76765e4b256b86aa3b82ea3184e3c08:
> 
>   nds32: fix unused pmu_init warning (2012-08-11 00:43:28 +0800)
> 
> 
> Mike Frysinger (3):
>   nds32: drop bi_enetaddr from global data
>   nds32: delete unused local variable
>   nds32: fix unused pmu_init warning
> 
>  arch/nds32/include/asm/u-boot.h | 1 -
>  arch/nds32/lib/board.c  | 3 ++-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
We fight only when there is no other choice. We prefer  the  ways  of
peaceful contact.
-- Kirk, "Spectre of the Gun", stardate 4385.3
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function

2012-08-10 Thread Anatolij Gustschin
Hi,

On Wed,  8 Aug 2012 12:52:17 +0200
Marek Vasut  wrote:

> This function converts static number to string in preprocessor.
> This is useful as it allows higher usage of puts() in favour of printf()
> 
> Signed-off-by: Marek Vasut 
> Cc: Wolfgang Denk 
> ---
>  include/common.h  |1 +
>  include/linux/stringify.h |   12 
>  2 files changed, 13 insertions(+)
>  create mode 100644 include/linux/stringify.h

applied to my staging branch, thanks!

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


Re: [U-Boot] [PATCH 2/3] COMMON: Use __stringify() instead of xstr()

2012-08-10 Thread Anatolij Gustschin
Hi,

On Wed,  8 Aug 2012 12:52:18 +0200
Marek Vasut  wrote:

> Kill multiple occurances and redeclaration of xstr in favor of __stringify().
> 
> Signed-off-by: Marek Vasut 
> Cc: Wolfgang Denk 
> ---
>  include/configs/MPC8308RDB.h|9 +++--
>  include/configs/amcc-common.h   |   25 +++-
>  include/configs/at91sam9263ek.h |5 +
>  include/configs/cam_enc_4xx.h   |   36 
> +--
>  include/configs/ea20.h  |   11 ---
>  include/configs/enbw_cmc.h  |   19 --
>  include/configs/flea3.h |   14 ++
>  include/configs/ima3-mx53.h |   10 --
>  include/configs/imx27lite-common.h  |   15 ++-
>  include/configs/km/keymile-common.h |   13 +
>  include/configs/km/km-powerpc.h |   12 ++--
>  include/configs/km/km_arm.h |   14 +++---
>  include/configs/manroland/common.h  |   21 +---
>  include/configs/mpc8308_p1m.h   |9 +++--
>  include/configs/mx35pdk.h   |   14 ++
>  include/configs/qong.h  |9 +++--
>  include/configs/tam3517-common.h|   11 ---
>  include/configs/tx25.h  |5 +
>  18 files changed, 104 insertions(+), 148 deletions(-)

applied, thanks!

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


Re: [U-Boot] [PATCH 3/3] COMMON: Use __stringify() instead of MK_STR()

2012-08-10 Thread Anatolij Gustschin
Hi,

On Wed,  8 Aug 2012 12:52:19 +0200
Marek Vasut  wrote:

> Kill multiple occurances and redeclaration of MK_STR
> in favor of __stringify().
> 
> Signed-off-by: Marek Vasut 
> Cc: Wolfgang Denk 
> ---
>  arch/blackfin/include/asm/config-pre.h |2 -
>  arch/blackfin/lib/board.c  |2 +-
>  board/w7o/w7o.c|9 +---
>  common/cmd_nvedit.c|5 +-
>  common/env_common.c|   34 ++--
>  common/env_embedded.c  |   39 ++
>  include/configs/M52277EVB.h|   18 +++
>  include/configs/M5253DEMO.h|2 +-
>  include/configs/M5373EVB.h |2 +-
>  include/configs/M54451EVB.h|   10 ++--
>  include/configs/M54455EVB.h|   16 +++---
>  include/configs/MERGERBOX.h|   24 -
>  include/configs/MPC8260ADS.h   |   22 
>  include/configs/MPC8313ERDB.h  |   21 
>  include/configs/MPC8323ERDB.h  |   21 
>  include/configs/MPC8349ITX.h   |   33 ++--
>  include/configs/MPC837XERDB.h  |   21 
>  include/configs/MPC8536DS.h|   35 ++--
>  include/configs/MPC8544DS.h|   33 +++-
>  include/configs/MPC8548CDS.h   |   17 +++---
>  include/configs/MPC8572DS.h|   35 ++--
>  include/configs/MPC8610HPCD.h  |   93 
> +---
>  include/configs/MPC8641HPCN.h  |   17 +++---
>  include/configs/MVBC_P.h   |   38 ++---
>  include/configs/MVBLM7.h   |   26 -
>  include/configs/MVSMR.h|   30 +--
>  include/configs/P1010RDB.h |4 +-
>  include/configs/P1022DS.h  |4 +-
>  include/configs/P1_P2_RDB.h|   19 ---
>  include/configs/P2020DS.h  |   36 ++---
>  include/configs/P2041RDB.h |6 +--
>  include/configs/SIMPC8313.h|   21 
>  include/configs/TQM85xx.h  |   12 +++--
>  include/configs/bf537-minotaur.h   |2 +-
>  include/configs/bf537-srv1.h   |2 +-
>  include/configs/bfin_adi_common.h  |   13 ++---
>  include/configs/blackstamp.h   |   10 ++--
>  include/configs/blackvme.h |6 +--
>  include/configs/corenet_ds.h   |6 +--
>  include/configs/linkstation.h  |9 ++--
>  include/configs/lsxl.h |4 +-
>  include/configs/mcc200.h   |9 +---
>  include/configs/p1_p2_rdb_pc.h |   22 
>  include/configs/sbc8548.h  |   26 -
>  include/configs/ve8313.h   |   21 +++-
>  include/configs/xpedite1000.h  |6 +--
>  include/configs/xpedite517x.h  |   12 ++---
>  include/configs/xpedite520x.h  |   12 ++---
>  include/configs/xpedite537x.h  |   12 ++---
>  include/configs/xpedite550x.h  |   12 ++---
>  tools/env/fw_env.c |   37 ++---
>  51 files changed, 453 insertions(+), 475 deletions(-)

applied to my staging branch, thanks!

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


Re: [U-Boot] [PATCH v3] Consolidate bootcount code into drivers/bootcount

2012-08-10 Thread Wolfgang Denk
Dear Stefan Roese,

In message <1338878275-1918-1-git-send-email...@denx.de> you wrote:
> This patch moves all bootcount implementations into a common
> directory: drivers/bootcount. The generic bootcount driver
> is now usable not only by powerpc platforms, but others as well.
> 
> Signed-off-by: Stefan Roese 
> Cc: Heiko Schocher 
> Cc: Valentin Longchamp 
> Cc: Christian Riesch 
> Cc: Manfred Rudigier 
> Cc: Mike Frysinger 
> Cc: Rob Herring 
> Cc: Reinhard Meyer 
> Tested-by: Valentin Longchamp 
> Tested-by: Christian Riesch 

Sorry, this does not apply any more:

Applying patch #163024 to current directory
Description: [U-Boot,v3] Consolidate bootcount code into
drivers/bootcount
Applying: Consolidate bootcount code into drivers/bootcount
fatal: sha1 information is lacking or useless (Makefile).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Consolidate bootcount code into drivers/bootcount


Can you please rebase?  Thanks!

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
I perceive a possibility of an immediate  chronological  sequence  of
events which includes a violence.
- Terry Pratchett, _The Dark Side of the Sun_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function

2012-08-10 Thread Wolfgang Denk
Dear Anatolij Gustschin,

In message <20120810222104.1e6c4afc@wker> you wrote:
> Hi,
> 
> On Wed,  8 Aug 2012 12:52:17 +0200
> Marek Vasut  wrote:
> 
> > This function converts static number to string in preprocessor.
> > This is useful as it allows higher usage of puts() in favour of printf()
> > 
> > Signed-off-by: Marek Vasut 
> > Cc: Wolfgang Denk 
> > ---
> >  include/common.h  |1 +
> >  include/linux/stringify.h |   12 
> >  2 files changed, 13 insertions(+)
> >  create mode 100644 include/linux/stringify.h
> 
> applied to my staging branch, thanks!

Please undo.  This patch does not meet formal requirements.  It
contains code copied from Linux without sufficient attribution.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Even if you can deceive people about  a  product  through  misleading
statements, sooner or later the product will speak for itself.
- Hajime Karatsu
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] config: Always use GNU ld

2012-08-10 Thread Anatolij Gustschin
Hi,

On Thu,  2 Aug 2012 13:19:34 -0300
Otavio Salvador  wrote:

> From: Khem Raj 
> 
> This patch makes sure that we always use the GNU ld. U-Boot uses certain
> construct e.g. OVERLAY which are not implemented in gold therefore it
> always needs GNU ld for linking.
> 
> It works well if default linker in toolchain is GNU ld but in some
> cases we can have gold to be the default linker and also ship GNU ld
> but not as default in such cases its called $(PREFIX)ld.bfd, with this
> patch we make sure that if $(PREFIX)ld.bfd exists than we use that for
> our ld.
> 
> This way it does not matter what the default ld is.
> 
> Signed-off-by: Otavio Salvador 
> Signed-off-by: Khem Raj 
> ---
>  config.mk |6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)

applied to my staging branch, thanks!

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


  1   2   >