Re: [U-Boot] [Patch V3 1/4] [MIPS] Add support for MIPS64 cpus

2012-08-25 Thread Zhi-zhou Zhang
On Fri, Aug 24, 2012 at 8:22 AM, Daniel Schwierzeck <
daniel.schwierz...@gmail.com> wrote:

> 2012/8/20 Zhizhou Zhang :
> > These files are derived from arch/mips/cpu/mips32/*. Howerver some
> > Changes are made:
> >   *.S: changes ABI o32 to n64
> >   config.mk: add mips64 building cflags
> >   cpu.c: add cache size probe
> >   interrupts.c: implement enable_interrupts and disable_interrupts
> >
> > Signed-off-by: Zhizhou Zhang 
> > ---
> >  arch/mips/cpu/mips64/Makefile |   47 +++
> >  arch/mips/cpu/mips64/config.mk|   39 ++
> >  arch/mips/cpu/mips64/cpu.c|  124 ++
> >  arch/mips/cpu/mips64/interrupts.c |   39 ++
> >  arch/mips/cpu/mips64/start.S  |  256
> +
> >  arch/mips/cpu/mips64/time.c   |   86 +
> >  6 files changed, 591 insertions(+)
> >  create mode 100644 arch/mips/cpu/mips64/Makefile
> >  create mode 100644 arch/mips/cpu/mips64/config.mk
> >  create mode 100644 arch/mips/cpu/mips64/cpu.c
> >  create mode 100644 arch/mips/cpu/mips64/interrupts.c
> >  create mode 100644 arch/mips/cpu/mips64/start.S
> >  create mode 100644 arch/mips/cpu/mips64/time.c
> >
> > diff --git a/arch/mips/cpu/mips64/Makefile
> b/arch/mips/cpu/mips64/Makefile
> > new file mode 100644
> > index 000..335fe88
> > --- /dev/null
> > +++ b/arch/mips/cpu/mips64/Makefile
> > @@ -0,0 +1,47 @@
> > +#
> > +# (C) Copyright 2003-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$(CPU).o
> > +
> > +START  = start.o
> > +COBJS-y= cpu.o interrupts.o time.o
> > +
> > +SRCS   := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
> > +OBJS   := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
> > +START  := $(addprefix $(obj),$(START))
> > +
> > +all:   $(obj).depend $(START) $(LIB)
> > +
> > +$(LIB):$(OBJS)
> > +   $(call cmd_link_o_target, $(OBJS))
> > +
> >
> +#
> > +
> > +# defines $(obj).depend target
> > +include $(SRCTREE)/rules.mk
> > +
> > +sinclude $(obj).depend
> > +
> >
> +#
> > diff --git a/arch/mips/cpu/mips64/config.mk b/arch/mips/cpu/mips64/
> config.mk
> > new file mode 100644
> > index 000..26f79e6
> > --- /dev/null
> > +++ b/arch/mips/cpu/mips64/config.mk
> > @@ -0,0 +1,39 @@
> > +#
> > +# (C) Copyright 2003
> > +# Wolfgang Denk, DENX Software Engineering, 
> > +#
> > +# 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
> > +#
> > +
> > +#
> > +# Default optimization level for MIPS64
> > +#
> > +# Note: Toolchains with binutils prior to v2.16
> > +# are no longer supported by U-Boot MIPS tree!
> > +#
> > +MIPSFLAGS = -march=mips64
> > +
> > +ENDIANNESS = -EL
> > +
> > +MIPSFLAGS += $(ENDIANNESS)
>
> with current master branch in git://git.denx.de/u-boot-mips.git you can
> drop the
> endianess flags which are now handled in arch/mips/config.mk
>
> > +
> > +PLATFORM_CPPFLAGS += $(MIPSFLAGS)
> > +PLATFORM_CPPFLAGS += -mabi=64 -DCONFIG_64BIT
> > +PLATFORM_LDFLAGS  += -m elf64ltsmip
> > +
> > diff --git a/arch/mips/cpu/mips64/cpu.c b/arch/mips/cpu/mips64/cpu.c
> > new file mode 100644
> > index 000..348ccfe
> > --- /dev/null
> > +++ b/ar

Re: [U-Boot] Blackfin BF54x Silicon revision 0.4 and uClinux

2012-08-25 Thread Mike Frysinger
On Friday 24 August 2012 10:09:37 Dimitar Penev wrote:
> My question is not directly applicable with u-boot but I think here I may
> find the answer
> which I still don't get from the Analog Device forum.

well, they'd be the people to pester

> Does anyone got working hardware based on Blackfin BF54x rev 0.4 (the
> current silicon revision) and uClinux
> http://blackfin.uclinux.org/gf/project/uclinux-dist ?
> I know about BF548 EZKIT Lite but it uses BF548 Rev 0.2.

the bf548-ezkit has had every rev of silicon.  i've personally booted u-boot 
and linux on bf54x processors revs 0.0, 0.1, 0.2, 0.3, and 0.4.
-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 1/3] MIPS: factor out endianess flag handling to arch config.mk

2012-08-25 Thread Mike Frysinger
On Thursday 23 August 2012 18:50:47 daniel.schwierz...@gmail.com wrote:
> From: Daniel Schwierzeck 
> 
> This is CPU independent and should be configured architecture-wide.

nice
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] Intermediate ARM status

2012-08-25 Thread Albert ARIBAUD
Hi Anatolij,

On Sat, 25 Aug 2012 17:47:57 +0200, Anatolij Gustschin 
wrote:

> Hi Albert,
> 
> On Sat, 25 Aug 2012 14:22:26 +0200
> Albert ARIBAUD  wrote:
> ...
> > ydirectenv.h:69:0: warning: "vfree" redefined [enabled by default]
> > /home/uboot/src/u-boot-arm/include/linux/compat.h:24:0: note: this
> > is the location of the previous definition
> > In file included from yportenv.h:80:0,
> > 
> > I believe the errors / warnings have nothing to do with the arm
> > sub-tree ARM commits per se.
> 
> Yes, these appear with the current master branch, too. A patch fixing
> them is already pending, http://patchwork.ozlabs.org/patch/177537/

It does fix some, but not all warnings:

===
uboot@lilith:~/src/u-boot-arm$ time LANG=C BUILD_NBUILDS=7
BUILD_NCPUS=1 ./MAKEALL VCMA9 smdk2410
Configuring for VCMA9 board...
Configuring for smdk2410 board...
   textdata bss dec
hex filename
 482924   10292  287516  780732
be9bc   ./build/smdk2410/u-boot
yaffs_guts.c: In function 'yaffs_check_chunk_erased':
yaffs_guts.c:324:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_verify_chunk_written':
yaffs_guts.c:352:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_grab_chunk_cache':
yaffs_guts.c:1488:6: warning: variable 'pushout' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_check_obj_details_loaded':
yaffs_guts.c:3180:6: warning: variable 'alloc_failed' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c:3179:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_update_oh':
yaffs_guts.c:3288:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_get_obj_name':
yaffs_guts.c:4447:7: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_summary.c: In function 'yaffs_summary_read':
yaffs_summary.c:194:6: warning: variable 'sum_tags_bytes' set but not
used [-Wunused-but-set-variable]
yaffs_verify.c: In function 'yaffs_verify_file':
yaffs_verify.c:227:6: warning: variable 'actual_depth' set but not used
[-Wunused-but-set-variable]
yaffs_yaffs1.c: In function 'yaffs1_scan':
yaffs_yaffs1.c:26:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_yaffs2.c: In function 'yaffs2_scan_chunk':
yaffs_yaffs2.c:949:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_yaffs2.c: In function 'yaffs2_scan_backwards':
yaffs_yaffs2.c:1352:6: warning: variable 'deleted' set but not used
[-Wunused-but-set-variable]
   textdata bss dec
hex filename
 508063   10688  287580  806331
c4dbb   ./build/VCMA9/u-boot
yaffs_guts.c: In function 'yaffs_check_chunk_erased':
yaffs_guts.c:324:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_verify_chunk_written':
yaffs_guts.c:352:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_grab_chunk_cache':
yaffs_guts.c:1488:6: warning: variable 'pushout' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_check_obj_details_loaded':
yaffs_guts.c:3180:6: warning: variable 'alloc_failed' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c:3179:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_update_oh':
yaffs_guts.c:3288:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_get_obj_name':
yaffs_guts.c:4447:7: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_summary.c: In function 'yaffs_summary_read':
yaffs_summary.c:194:6: warning: variable 'sum_tags_bytes' set but not
used [-Wunused-but-set-variable]
yaffs_verify.c: In function 'yaffs_verify_file':
yaffs_verify.c:227:6: warning: variable 'actual_depth' set but not used
[-Wunused-but-set-variable]
yaffs_yaffs1.c: In function 'yaffs1_scan':
yaffs_yaffs1.c:26:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_yaffs2.c: In function 'yaffs2_scan_chunk':
yaffs_yaffs2.c:949:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_yaffs2.c: In function 'yaffs2_scan_backwards':
yaffs_yaffs2.c:1352:6: warning: variable 'deleted' set but not used
[-Wunused-but-set-variable]

- SUMMARY 
Boards compiled: 2
Boards with warnings but no errors: 2 ( VCMA9 smdk2410 )
--

real0m29.001s
user0m40.947s
sys 0m6.328s
===

Although, it may be my toolchain being more sensitive than others.

> Thanks,
> 
> Anatolij

Amicalement,
-- 
Albert.
___

[U-Boot] [PATCH 2/2] imx27lite: update with gpio api change (v4)

2012-08-25 Thread Philippe Reynes
Signed-off-by: Philippe Reynes 
---
 board/logicpd/imx27lite/imx27lite.c |5 ++---
 include/configs/imx27lite-common.h  |5 +
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/board/logicpd/imx27lite/imx27lite.c 
b/board/logicpd/imx27lite/imx27lite.c
index 8a5015c..b38e5ab 100644
--- a/board/logicpd/imx27lite/imx27lite.c
+++ b/board/logicpd/imx27lite/imx27lite.c
@@ -23,12 +23,12 @@
 #include 
 #include 
 #include 
+#include 
 
 DECLARE_GLOBAL_DATA_PTR;
 
 int board_init(void)
 {
-   struct gpio_regs *regs = (struct gpio_regs *)IMX_GPIO_BASE;
 #if defined(CONFIG_SYS_NAND_LARGEPAGE)
struct system_control_regs *sc_regs =
(struct system_control_regs *)IMX_SYSTEM_CTL_BASE;
@@ -43,8 +43,7 @@ int board_init(void)
 #ifdef CONFIG_FEC_MXC
mx27_fec_init_pins();
imx_gpio_mode((GPIO_PORTC | GPIO_OUT | GPIO_PUEN | GPIO_GPIO | 31));
-   writel(readl(®s->port[PORTC].dr) | (1 << 31),
-   ®s->port[PORTC].dr);
+   gpio_set_value(GPIO_PORTC | 31, 1);
 #endif
 #ifdef CONFIG_MXC_MMC
 #if defined(CONFIG_MAGNESIUM)
diff --git a/include/configs/imx27lite-common.h 
b/include/configs/imx27lite-common.h
index 7d2876b..2e79a9e 100644
--- a/include/configs/imx27lite-common.h
+++ b/include/configs/imx27lite-common.h
@@ -162,6 +162,11 @@
 #define CONFIG_DOS_PARTITION
 
 /*
+ * GPIO
+ */
+#define CONFIG_MXC_GPIO
+
+/*
  * MTD partitions
  */
 #define CONFIG_CMD_MTDPARTS
-- 
1.7.4.4

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


[U-Boot] [PATCH 1/2] gpio: add gpio api support to mx27 (v4)

2012-08-25 Thread Philippe Reynes
The gpio api has been tested on an armadeus apf27.

Signed-off-by: Philippe Reynes 
---
 arch/arm/cpu/arm926ejs/mx27/generic.c |   11 +++---
 arch/arm/include/asm/arch-mx27/gpio.h |   55 +
 arch/arm/include/asm/arch-mx27/imx-regs.h |   30 
 drivers/gpio/mxc_gpio.c   |8 +++--
 4 files changed, 73 insertions(+), 31 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-mx27/gpio.h

diff --git a/arch/arm/cpu/arm926ejs/mx27/generic.c 
b/arch/arm/cpu/arm926ejs/mx27/generic.c
index 65c4813..41bb84b 100644
--- a/arch/arm/cpu/arm926ejs/mx27/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx27/generic.c
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #ifdef CONFIG_MXC_MMC
 #include 
 #endif
@@ -209,7 +210,7 @@ int cpu_mmc_init(bd_t *bis)
 
 void imx_gpio_mode(int gpio_mode)
 {
-   struct gpio_regs *regs = (struct gpio_regs *)IMX_GPIO_BASE;
+   struct gpio_port_regs *regs = (struct gpio_port_regs *)IMX_GPIO_BASE;
unsigned int pin = gpio_mode & GPIO_PIN_MASK;
unsigned int port = (gpio_mode & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT;
unsigned int ocr = (gpio_mode & GPIO_OCR_MASK) >> GPIO_OCR_SHIFT;
@@ -228,11 +229,11 @@ void imx_gpio_mode(int gpio_mode)
 
/* Data direction */
if (gpio_mode & GPIO_OUT) {
-   writel(readl(®s->port[port].ddir) | 1 << pin,
-   ®s->port[port].ddir);
+   writel(readl(®s->port[port].gpio_dir) | 1 << pin,
+   ®s->port[port].gpio_dir);
} else {
-   writel(readl(®s->port[port].ddir) & ~(1 << pin),
-   ®s->port[port].ddir);
+   writel(readl(®s->port[port].gpio_dir) & ~(1 << pin),
+   ®s->port[port].gpio_dir);
}
 
/* Primary / alternate function */
diff --git a/arch/arm/include/asm/arch-mx27/gpio.h 
b/arch/arm/include/asm/arch-mx27/gpio.h
new file mode 100644
index 000..4b4eb0d
--- /dev/null
+++ b/arch/arm/include/asm/arch-mx27/gpio.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2012
+ * Philippe Reynes 
+ *
+ * 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
+ */
+
+
+#ifndef __ASM_ARCH_MX27_GPIO_H
+#define __ASM_ARCH_MX27_GPIO_H
+
+/* GPIO registers */
+struct gpio_regs {
+   u32 gpio_dir; /* DDIR */
+   u32 ocr1;
+   u32 ocr2;
+   u32 iconfa1;
+   u32 iconfa2;
+   u32 iconfb1;
+   u32 iconfb2;
+   u32 gpio_dr; /* DR */
+   u32 gius;
+   u32 gpio_psr; /* SSR */
+   u32 icr1;
+   u32 icr2;
+   u32 imr;
+   u32 isr;
+   u32 gpr;
+   u32 swr;
+   u32 puen;
+   u32 res[0x2f];
+};
+
+/* This structure is used by the function imx_gpio_mode */
+struct gpio_port_regs {
+   struct gpio_regs port[6];
+};
+
+#endif
diff --git a/arch/arm/include/asm/arch-mx27/imx-regs.h 
b/arch/arm/include/asm/arch-mx27/imx-regs.h
index f7cf85b..f78d5f2 100644
--- a/arch/arm/include/asm/arch-mx27/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx27/imx-regs.h
@@ -164,29 +164,6 @@ struct gpt_regs {
 #define PORTE 4
 #define PORTF 5
 
-struct gpio_regs {
-   struct {
-   u32 ddir;
-   u32 ocr1;
-   u32 ocr2;
-   u32 iconfa1;
-   u32 iconfa2;
-   u32 iconfb1;
-   u32 iconfb2;
-   u32 dr;
-   u32 gius;
-   u32 ssr;
-   u32 icr1;
-   u32 icr2;
-   u32 imr;
-   u32 isr;
-   u32 gpr;
-   u32 swr;
-   u32 puen;
-   u32 res[0x2f];
-   } port[6];
-};
-
 /* IIM Control Registers */
 struct iim_regs {
u32 iim_stat;
@@ -474,6 +451,13 @@ struct fuse_bank0_regs {
 #define TSTAT_CAPT (1 << 1)/* Capture event */
 #define TSTAT_COMP 1   /* Compare event */
 
+#define GPIO1_BASE_ADDR 0x10015000
+#define GPIO2_BASE_ADDR 0x10015100
+#define GPIO3_BASE_ADDR 0x10015200
+#define GPIO4_BASE_ADDR 0x10015300
+#define GPIO5_BASE_ADDR 0x10015400
+#define GPIO6_BASE_ADDR 0x10015500
+
 #define GPIO_PIN_MASK  0x1f
 
 #define GPIO_PORT_SHIFT5
diff --git a/drivers/gpio/mxc_gpio.c b

[U-Boot] [PATCH 0/2] Add gio api support to mx27 (v4)

2012-08-25 Thread Philippe Reynes
Change in v4:
- rename ssr to gpio_psr in struct gpio_regs
- remove useless change in mxc_gpio.c

Change in v3:
- rebase on u-boot-imx (instead of u-boot)
- fix conflit with "mxc: Make gpio_get_value() use PSR"

Philippe Reynes (2):
  gpio: add gpio api support to mx27 (v4)
  imx27lite: update with gpio api change (v4)

 arch/arm/cpu/arm926ejs/mx27/generic.c |   11 +++---
 arch/arm/include/asm/arch-mx27/gpio.h |   55 +
 arch/arm/include/asm/arch-mx27/imx-regs.h |   30 
 board/logicpd/imx27lite/imx27lite.c   |5 +--
 drivers/gpio/mxc_gpio.c   |8 +++--
 include/configs/imx27lite-common.h|5 +++
 6 files changed, 80 insertions(+), 34 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-mx27/gpio.h

-- 
1.7.4.4

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


Re: [U-Boot] [PATCH 1/2] gpio: add gpio api support to mx27 (v3)

2012-08-25 Thread Philippe Reynes
Hi Stefano,


> +    u32 gpio_dr; /* DR */
> +    u32 gius;
> +    u32 ssr;

What about my proposal to change this into gpio_psr ? I mean, if
Freescale calls some times the register "Sample Status Register" and on
other SOCs "Pad Status Register", but anyway the register does the same,
it is not a good reason to follow it.


I think you're right, sorry, I read your feedback too fast and missed this one.
I update my patch and send a v4.



> +#ifndef CONFIG_MX27
>      val = (readl(®s->gpio_psr) >> gpio) & 0x01;
> +#else
> +    val = (readl(®s->ssr) >> gpio) & 0x01;
> +#endif

Not required if ssr becomes gpio_psr

I agree too.


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


Re: [U-Boot] [PATCH 1/2] gpio: add gpio api support to mx27 (v3)

2012-08-25 Thread Stefano Babic
On 24/08/2012 22:36, Philippe Reynes wrote:
> There is a little change on gpio_get_value because
> on mx27 the register to read is ssr and not dr.
> 
> Signed-off-by: Philippe Reynes 
> ---

Hi Philippe,

>  arch/arm/cpu/arm926ejs/mx27/generic.c |   11 +++---
>  arch/arm/include/asm/arch-mx27/gpio.h |   55 
> +
>  arch/arm/include/asm/arch-mx27/imx-regs.h |   30 
>  drivers/gpio/mxc_gpio.c   |   12 +--
>  4 files changed, 77 insertions(+), 31 deletions(-)
>  create mode 100644 arch/arm/include/asm/arch-mx27/gpio.h
> 
> diff --git a/arch/arm/cpu/arm926ejs/mx27/generic.c 
> b/arch/arm/cpu/arm926ejs/mx27/generic.c
> index 65c4813..41bb84b 100644
> --- a/arch/arm/cpu/arm926ejs/mx27/generic.c
> +++ b/arch/arm/cpu/arm926ejs/mx27/generic.c
> @@ -24,6 +24,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #ifdef CONFIG_MXC_MMC
>  #include 
>  #endif
> @@ -209,7 +210,7 @@ int cpu_mmc_init(bd_t *bis)
>  
>  void imx_gpio_mode(int gpio_mode)
>  {
> - struct gpio_regs *regs = (struct gpio_regs *)IMX_GPIO_BASE;
> + struct gpio_port_regs *regs = (struct gpio_port_regs *)IMX_GPIO_BASE;
>   unsigned int pin = gpio_mode & GPIO_PIN_MASK;
>   unsigned int port = (gpio_mode & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT;
>   unsigned int ocr = (gpio_mode & GPIO_OCR_MASK) >> GPIO_OCR_SHIFT;
> @@ -228,11 +229,11 @@ void imx_gpio_mode(int gpio_mode)
>  
>   /* Data direction */
>   if (gpio_mode & GPIO_OUT) {
> - writel(readl(®s->port[port].ddir) | 1 << pin,
> - ®s->port[port].ddir);
> + writel(readl(®s->port[port].gpio_dir) | 1 << pin,
> + ®s->port[port].gpio_dir);
>   } else {
> - writel(readl(®s->port[port].ddir) & ~(1 << pin),
> - ®s->port[port].ddir);
> + writel(readl(®s->port[port].gpio_dir) & ~(1 << pin),
> + ®s->port[port].gpio_dir);
>   }
>  
>   /* Primary / alternate function */
> diff --git a/arch/arm/include/asm/arch-mx27/gpio.h 
> b/arch/arm/include/asm/arch-mx27/gpio.h
> new file mode 100644
> index 000..965b584
> --- /dev/null
> +++ b/arch/arm/include/asm/arch-mx27/gpio.h
> @@ -0,0 +1,55 @@
> +/*
> + * Copyright (C) 2012
> + * Philippe Reynes 
> + *
> + * 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
> + */
> +
> +
> +#ifndef __ASM_ARCH_MX27_GPIO_H
> +#define __ASM_ARCH_MX27_GPIO_H
> +
> +/* GPIO registers */
> +struct gpio_regs {
> + u32 gpio_dir; /* DDIR */
> + u32 ocr1;
> + u32 ocr2;
> + u32 iconfa1;
> + u32 iconfa2;
> + u32 iconfb1;
> + u32 iconfb2;
> + u32 gpio_dr; /* DR */
> + u32 gius;
> + u32 ssr;

What about my proposal to change this into gpio_psr ? I mean, if
Freescale calls some times the register "Sample Status Register" and on
other SOCs "Pad Status Register", but anyway the register does the same,
it is not a good reason to follow it.

> + u32 icr1;
> + u32 icr2;
> + u32 imr;
> + u32 isr;
> + u32 gpr;
> + u32 swr;
> + u32 puen;
> + u32 res[0x2f];
> +};
> +
> +/* This structure is used by the function imx_gpio_mode */
> +struct gpio_port_regs {
> + struct gpio_regs port[6];
> +};
> +
> +#endif
> diff --git a/arch/arm/include/asm/arch-mx27/imx-regs.h 
> b/arch/arm/include/asm/arch-mx27/imx-regs.h
> index f7cf85b..f78d5f2 100644
> --- a/arch/arm/include/asm/arch-mx27/imx-regs.h
> +++ b/arch/arm/include/asm/arch-mx27/imx-regs.h
> @@ -164,29 +164,6 @@ struct gpt_regs {
>  #define PORTE 4
>  #define PORTF 5
>  
> -struct gpio_regs {
> - struct {
> - u32 ddir;
> - u32 ocr1;
> - u32 ocr2;
> - u32 iconfa1;
> - u32 iconfa2;
> - u32 iconfb1;
> - u32 iconfb2;
> - u32 dr;
> - u32 gius;
> - u32 ssr;
> - u32 icr1;
> - u32 icr2;
> - u32 imr;
> - u32 isr;
> - u32 gpr;
> - u32 swr;
> - u32 puen;
> - u32 res[0x2f];
> - } port[6];
> -};
> -
>  /* IIM Control Registers */
>  stru

[U-Boot] Intermediate ARM status

2012-08-25 Thread Albert ARIBAUD
All,

I have merged Tom Rini's ti/master branch, but not the tegra or
stagin/tr...@ti.com ones yet.

At this point 314 boards were built, 9 failing due to dtc not being
available.

But when I rebase onto u-boot/master, I get:

- SUMMARY 
Boards compiled: 314
Boards with errors: 9 ( trimslice tec ventana seaboard plutux harmony
medcom whistler paz00 )
Boards with warnings but no errors: 2 ( VCMA9 smdk2410 )
--

These two boards actually already build with warnings on u-boot/master:

- multiple instances of:

ydirectenv.h:31:0: warning: "BUG" redefined [enabled by default]
/home/uboot/src/u-boot-arm/include/common.h:160:0: note: this is the
location of the previous definition
ydirectenv.h:50:0: warning: "hweight8" redefined [enabled by default]
/home/uboot/src/u-boot-arm/build/smdk2410/include2/asm/bitops.h:139:0:
note: this is the location of the previous definition
ydirectenv.h:51:0: warning: "hweight32" redefined [enabled by default]
/home/uboot/src/u-boot-arm/build/smdk2410/include2/asm/bitops.h:137:0:
note: this is the location of the previous definition

One instance of:

yaffs_guts.c: In function 'yaffs_check_chunk_erased':
yaffs_guts.c:324:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_verify_chunk_written':
yaffs_guts.c:352:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_grab_chunk_cache':
yaffs_guts.c:1488:6: warning: variable 'pushout' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_check_obj_details_loaded':
yaffs_guts.c:3180:6: warning: variable 'alloc_failed' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c:3179:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_update_oh':
yaffs_guts.c:3288:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_get_obj_name':
yaffs_guts.c:4447:7: warning: variable 'result' set but not used
[-Wunused-but-set-variable]

Multiples instances of:

ydirectenv.h:66:0: warning: "kmalloc" redefined [enabled by default]
/home/uboot/src/u-boot-arm/include/linux/compat.h:20:0: note: this is
the location of the previous definition
ydirectenv.h:67:0: warning: "kfree" redefined [enabled by default]
/home/uboot/src/u-boot-arm/include/linux/compat.h:23:0: note: this is
the location of the previous definition
ydirectenv.h:68:0: warning: "vmalloc" redefined [enabled by default]
/home/uboot/src/u-boot-arm/include/linux/compat.h:22:0: note: this is
the location of the previous definition
ydirectenv.h:69:0: warning: "vfree" redefined [enabled by default]
/home/uboot/src/u-boot-arm/include/linux/compat.h:24:0: note: this is
the location of the previous definition
In file included from yportenv.h:80:0,

I believe the errors / warnings have nothing to do with the arm
sub-tree ARM commits per se.

Therefore I have pushed the rebased u-bot-arm/master and next.

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


Re: [U-Boot] [PATCHv1] ARM: Add Altera SOCFPGA Cyclone5

2012-08-25 Thread Pavel Machek
Hi!

> [snip]
> >> It's the omap-common/spl.c code with the bits for IH_OS_LINUX taken out
> >> :)  Can you please re-do your series on top of the SPL series I just
> >> posted that provides a common SPL framework?  Thanks!
> > 
> > I'll take a look. OTOH, ammount of code duplication here is quite low,
> > and redoing it on top of SPL series will mean delaying merge, right?
> 
> My hope is that since I got the SPL patches posted in time we can get
> them in for v2012.10 so no, this will only help your chances :)

Ok, this is promissed patch for comments. socfpga spl.c now got
reasonably smaller. It is on top of 

http://github.com/trini/u-boot WIP/spl-improvements

Now... can I leave spl_ram_load_image() where it is? Probably add some
#ifdef?

Dinh, does this look acceptable to you? Could we switch to absolute
addresses for stack/heap in the SPL?

Thanks,

Pavel

diff --git a/MAINTAINERS b/MAINTAINERS
index c5a6f2f..df48dea 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -765,6 +765,11 @@ Nagendra T S  
 
am3517_craneARM ARMV7 (AM35x SoC)
 
+Dinh Nguyen 
+Chin Liang See 
+
+   socfpga socfpga_cyclone5
+
 Kyungmin Park 
 
apollon ARM1136EJS
diff --git a/arch/arm/cpu/armv7/socfpga/Makefile 
b/arch/arm/cpu/armv7/socfpga/Makefile
new file mode 100644
index 000..376a4bd
--- /dev/null
+++ b/arch/arm/cpu/armv7/socfpga/Makefile
@@ -0,0 +1,51 @@
+#
+# (C) Copyright 2000-2003
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# Copyright (C) 2012 Altera Corporation 
+#
+# 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
+
+SOBJS  := lowlevel_init.o
+COBJS-y:= misc.o timer.o
+COBJS-$(CONFIG_SPL_BUILD) += spl.o
+
+COBJS  := $(COBJS-y)
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS) $(SOBJS))
+
+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/socfpga/config.mk 
b/arch/arm/cpu/armv7/socfpga/config.mk
new file mode 100644
index 000..b72ed1e
--- /dev/null
+++ b/arch/arm/cpu/armv7/socfpga/config.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed "as is" WITHOUT ANY WARRANTY of any
+# kind, whether express or implied; without even the implied warranty
+# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+ifndef CONFIG_SPL_BUILD
+ALL-y  += $(obj)u-boot.img
+endif
diff --git a/arch/arm/cpu/armv7/socfpga/lowlevel_init.S 
b/arch/arm/cpu/armv7/socfpga/lowlevel_init.S
new file mode 100644
index 000..815073e
--- /dev/null
+++ b/arch/arm/cpu/armv7/socfpga/lowlevel_init.S
@@ -0,0 +1,79 @@
+/*
+ *  Copyright (C) 2012 Altera Corporation 
+ *
+ * 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, see .
+ */
+
+#include 
+#include 
+
+/* Save the parameter pass in by previous boot loader */
+.global save_boot_params
+save_boot_params:
+   /* save the parameter here */
+
+   /*
+ 

Re: [U-Boot] [PATCHv1] ARM: Add Altera SOCFPGA Cyclone5

2012-08-25 Thread Pavel Machek
Hi!

> [snip]
> >> It's the omap-common/spl.c code with the bits for IH_OS_LINUX taken out
> >> :)  Can you please re-do your series on top of the SPL series I just
> >> posted that provides a common SPL framework?  Thanks!
> > 
> > I'll take a look. OTOH, ammount of code duplication here is quite low,
> > and redoing it on top of SPL series will mean delaying merge, right?
> 
> My hope is that since I got the SPL patches posted in time we can get
> them in for v2012.10 so no, this will only help your chances :)

Hopefully.

Some observations:

Not sure what to do with CONFIG_SPL_STACK: altera was just using
symbol from linker script. Is there way to keep it like that? I'd hate
to invent magic constant.

Same issue with CONFIG_SYS_SPL_MALLOC_START... I was doing:

/* setup MALLOC after clocks going faster */
mem_malloc_init((ulong) &__malloc_start,
(&__malloc_end -
&__malloc_start));

I guess defines allow me to keep my definition. Good.

spl_parse_image_header(): We have "modern" system, we'd prefer not to
do
/* Signature not found - assume u-boot.bin */
...but to hang in that case, in order not to jump to random code.

Ok, I should have something publishable, soon ;-).
Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Please pull u-boot-ti/master

2012-08-25 Thread Albert ARIBAUD
Hi Tom,

On Fri, 24 Aug 2012 16:40:09 -0700, Tom Rini  wrote:

> Hello,
> 
> The following changes since commit
> a1cd53c6b6e2e7fbf4ffa20d3548646e4c94efe5:
> 
>   sc_sps_1: Adjust board config to use 'mxs' SoC code (2012-08-14
> 00:36:30 +0200)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-ti.git master
> 
> for you to fetch changes up to
> 56540ed12d86a998ebd8f9ec8d55828c30ab1f14:
> 
>   davinci, c6x: Always use C version of reset code (2012-08-24
> 15:50:35 -0700)
> 
> 
> Heiko Schocher (1):
>   davinci: enbw_cmc: change switch init behaviour
> 
> Jeroen Hofstee (1):
>   arm: omap: Fix switching back to nandecc sw.
> 
> Satyanarayana, Sandhya (1):
>   am33xx evm: Update secure_emif_sdram_config during ddr init
> 
> Sughosh Ganu (1):
>   da8xx/hawkboard: Add support for ohci host controller
> 
> Tom Rini (8):
>   am335x evm: Initial support for AM335x GP EVM Profiles
>   am33xx: Correct MMC1, remove MMC2 support
>   am335x evm: Enable MMC1 pinmux
>   am33xx: Add support, update omap3 McSPI driver
>   am335x evm: Enable support for spi0
>   omap4/5/am33xx: Make lowlevel_init available to all armv7
> platforms armv7: Make lowlevel_init.S's lowlevel_init do ABI
> compatible stack davinci, c6x: Always use C version of reset code
> 
>  arch/arm/cpu/arm926ejs/davinci/Makefile|4 +-
>  arch/arm/cpu/arm926ejs/davinci/psc.c   |5 +
>  arch/arm/cpu/arm926ejs/davinci/reset.S |   81
>  arch/arm/cpu/arm926ejs/davinci/reset.c
> |   33 +++ arch/arm/cpu/armv7/Makefile
> |6 +- arch/arm/cpu/armv7/am33xx/board.c  |8 +-
>  arch/arm/cpu/armv7/am33xx/clock.c  |5 +
>  arch/arm/cpu/armv7/am33xx/ddr.c|5 +-
>  arch/arm/cpu/armv7/lowlevel_init.S |   51 ++
>  arch/arm/cpu/armv7/omap-common/lowlevel_init.S |   18 
>  arch/arm/include/asm/arch-am33xx/cpu.h |2 +
>  arch/arm/include/asm/arch-am33xx/hardware.h|3 +-
>  arch/arm/include/asm/arch-am33xx/mmc_host_def.h|3 +-
>  arch/arm/include/asm/arch-am33xx/omap.h|1 -
>  arch/arm/include/asm/arch-am33xx/sys_proto.h   |1 +
>  .../arm/include/asm/arch-davinci/da8xx-usb.h   |7 +-
>  arch/arm/include/asm/arch-davinci/hardware.h   |1 +
>  arch/arm/include/asm/arch-omap4/omap.h |1 -
>  arch/arm/include/asm/arch-omap5/omap.h |2 -
>  arch/arm/include/asm/omap_common.h |2 +-
>  board/davinci/da8xxevm/hawkboard.c |   41 
>  board/enbw/enbw_cmc/enbw_cmc.c |  102
> +---
> board/ti/am335x/mux.c  |   73
> +- drivers/mtd/nand/omap_gpmc.c
> |1 + drivers/spi/omap3_spi.c|   16
> +++ drivers/spi/omap3_spi.h|5 +
> drivers/usb/host/Makefile  |1 +
> drivers/usb/host/ohci-da8xx.c  |   48 +
> drivers/usb/musb/da8xx.c   |3 +-
> include/configs/am335x_evm.h   |   13 ++-
> include/configs/hawkboard.h|   14 ++-
> include/configs/omap4_common.h |7 +-
> include/configs/omap5_evm.h|7 +- 33 files
> changed, 404 insertions(+), 166 deletions(-) delete mode 100644
> arch/arm/cpu/arm926ejs/davinci/reset.S create mode 100644
> arch/arm/cpu/arm926ejs/davinci/reset.c create mode 100644
> arch/arm/cpu/armv7/lowlevel_init.S rename drivers/usb/musb/da8xx.h =>
> arch/arm/include/asm/arch-davinci/da8xx-usb.h (96%) create mode
> 100644 drivers/usb/host/ohci-da8xx.c
> 

Applied to u-boot-arm/master, thanks!

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


Re: [U-Boot] [PATCHv1] ARM: Add Altera SOCFPGA Cyclone5

2012-08-25 Thread Pavel Machek
On Fri 2012-08-24 12:18:27, Tom Rini wrote:
> On 08/23/2012 03:43 AM, Pavel Machek wrote:
> 
> [snip]
> >> It's the omap-common/spl.c code with the bits for IH_OS_LINUX taken out
> >> :)  Can you please re-do your series on top of the SPL series I just
> >> posted that provides a common SPL framework?  Thanks!
> > 
> > I'll take a look. OTOH, ammount of code duplication here is quite low,
> > and redoing it on top of SPL series will mean delaying merge, right?
> 
> My hope is that since I got the SPL patches posted in time we can get
> them in for v2012.10 so no, this will only help your chances :)

Got it. I pulled Stefan's version -- he seems to have your changes as
a git tree. I merged altera code into that, and with these quick hacks
on top of that, it boots. Good sign :-).

diff --git a/arch/arm/cpu/armv7/socfpga/spl.c b/arch/arm/cpu/armv7/socfpga/spl.c
index 7bd1e2f..74ac8e6 100644
--- a/arch/arm/cpu/armv7/socfpga/spl.c
+++ b/arch/arm/cpu/armv7/socfpga/spl.c
@@ -33,7 +33,7 @@ static struct spl_image_info spl_image;
 extern void __malloc_start, __malloc_end, __stack_start;
 
 /* Define global data structure pointer to it */
-static gd_t gdata __attribute__ ((section(".data")));
+gd_t gdata __attribute__ ((section(".data")));
 
 /*
  * Error action
@@ -134,27 +134,6 @@ static void spl_console_init(void)
 }
 
 /*
- * Board initialization prior bss clearance
- * Do note below concerns when inserting your function here.
- * Please refer to README for more details.
-
- * Initialized global data (data segment) is read-only. Do not attempt
-   to write it.
-
- * Do not use any uninitialized global data (or implicitely initialized
-   as zero data - BSS segment) at all - this is undefined, initiali-
-   zation is performed later (when relocating to RAM).
-
- * Stack space is very limited. Avoid big data buffers or things like
-   that.
- */
-void board_init_f(ulong dummy)
-{
-   /* Will clear bss then jump back to function board_init_r */
-   relocate_code((ulong) &__stack_start, &gdata, CONFIG_SPL_TEXT_BASE);
-}
-
-/*
  * Board initialization after bss clearance
  */
 void board_init_r(gd_t *id, ulong dummy)
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index c892f82..9db93d8 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -45,7 +45,7 @@ COBJS-y   += reset.o
 SOBJS-$(CONFIG_USE_ARCH_MEMSET) += memset.o
 SOBJS-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o
 else
-COBJS-$(CONFIG_SPL_FRAMEWORK) += spl.o
+COBJS-y += spl.o
 endif
 
 COBJS-y+= cache.o
diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c
index 2d1f47a..8c8806e 100644
--- a/arch/arm/lib/spl.c
+++ b/arch/arm/lib/spl.c
@@ -41,8 +41,9 @@ extern char __bss_start[], __bss_end__[];
  */
 void __weak board_init_f(ulong dummy)
 {
+  extern void __stack_start;
/* Set the stack pointer. */
-   asm volatile("mov sp, %0\n" : : "r"(CONFIG_SPL_STACK));
+   asm volatile("mov sp, %0\n" : : "r"(&__stack_start));
 
/* Clear the BSS. */
memset(__bss_start, 0, __bss_end__ - __bss_start);
diff --git a/include/configs/socfpga_cyclone5.h 
b/include/configs/socfpga_cyclone5.h
index 29aa9da..ac52e57 100644
--- a/include/configs/socfpga_cyclone5.h
+++ b/include/configs/socfpga_cyclone5.h
@@ -109,6 +109,7 @@
 #define CONFIG_DOS_PARTITION1
 
 #ifdef CONFIG_SPL_BUILD
+#define CONFIG_SPL_FRAMEWORK
 #undef CONFIG_PARTITIONS
 #endif
 


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCHv1] ARM: Add Altera SOCFPGA Cyclone5

2012-08-25 Thread Pavel Machek
Hi!

> [snip]
> >> It's the omap-common/spl.c code with the bits for IH_OS_LINUX taken out
> >> :)  Can you please re-do your series on top of the SPL series I just
> >> posted that provides a common SPL framework?  Thanks!
> > 
> > I'll take a look. OTOH, ammount of code duplication here is quite low,
> > and redoing it on top of SPL series will mean delaying merge, right?
> 
> My hope is that since I got the SPL patches posted in time we can get
> them in for v2012.10 so no, this will only help your chances :)

Ok, but how do I get them applied?

I tried applying them over:

commit e66443fdb5355e68cfdbbdd37248c4b7eb4968f5
Author: Scott Wood 
Date:   Tue Aug 14 01:44:29 2012 +

Makefile: fix HAVE_VENDOR_COMMON_LIB

Commit 8b5a02640adf77301f943e8754992c50df004e8a ("Makefile:
cosmetic:
optimize usage of LIBS-y") broke the build of boards that have a
board
vendor "common" directory, by introducing a space between "LIBS-"
and
"y".

Signed-off-by: Scott Wood 
Signed-off-by: Daniel Schwierzeck 
Acked-by: Kim Phillips 

and am getting errors:

|index b314ed7..d8ade27 100644
|--- a/common/spl/spl.c
|+++ b/common/spl/spl.c
--
File to patch: ^C

Is there git to pull? One big patch for easier application?

Thanks,

Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/6] SPL: Port SPL framework to powerpc

2012-08-25 Thread Stefan Roese
On 08/24/2012 09:15 PM, Tom Rini wrote:
>>> I still would like to move to my suggestion to not copy the header and
>>> use the mkimage header values ih_load and ih_ep directly. Right now I
>>> don't see any showstopper for doing it this way. I'll send a patch to
>>> change this shortly (if everything works out).
>>
>> Hmmm. As it seems some SPL loading drivers (block like mmc, streaming
>> like ymodem) are not that easily converted to skipping the header. So
>> I'm not so sure if we should go this way after all...
> 
> Maybe I'm missing something, but maybe we just need to mimic the
> behavior full U-Boot does and if we haven't been loaded where we need to
> execute, shift bits around?

Of course its possible. The main problem is speed here. With the
"problematic" drivers like mmc, you would need to copy the image a 2nd
time, once from MMC to a temp. SDRAM location, and then to its final
(load_addr) destination. With the current approach, the image is only
copied once from MMC to SDRAM. The 2nd copy shouldn't take that long
though. Its SDRAM to SDRAM after all.

I really do like Daniel's approach, with the decompression support:

http://dev.phrozen.org/gitweb/?p=uboot-upstream.git;a=commitdiff;h=39165fa145b2d959f1eaa6faa3ab3053823bb985

We should try to merge this into the current SPL framework. I'll try to
look into this next week.

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