Re: [U-Boot] Intermediate ARM status
Dear 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/ > [...] Yaffs is borked indeed, I submitted similar patch that Charles did, but his is better indeed. Maybe we can ask Detlev to apply some of the pulls ? Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Blackfin BF54x Silicon revision 0.4 and uClinux
Hi Mike, Thank you for this information. Dimitar - Original Message - From: "Mike Frysinger" To: ; "Dimitar Penev" Sent: Sunday, August 26, 2012 4:27 AM Subject: Re: [U-Boot] Blackfin BF54x Silicon revision 0.4 and uClinux ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [Patch V3 1/4] [MIPS] Add support for MIPS64 cpus
> > > 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 > > Ok, I have done what you ask for. But I didn't find where does CONFIG_SYS_LITTLE_ENDIAN or CONFIG_SYS_BIG_ENDIAN define. Could you tell where should I put them? It seem that putting it in qemu-mips64.h doesn't affect building flags. > > currently we cannot use interrupts or setup any interrupt handlers in > u-boot-mips. > Please leave those functions empty. > > > calling a C function is not supposed to work here because no stack > pointer has been setup yet. > I checked with Sourcery 2011.09 and 2012.03. The stack is always > utilized in cache_probe. > Either you rewrite the cache_probe function in assembler or you use > the existing config options > and you could drop the cache probing. > > I'm afraid I don't say clearly just now. I mean could I call cache_probe in checkboard()? -- Regards, Zhizhou Zhang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [Patch V3 4/4] [MIPS] Disable standalone while building MIPS64
On Fri, Aug 24, 2012 at 8:23 AM, Daniel Schwierzeck < daniel.schwierz...@gmail.com> wrote: > 2012/8/20 Zhizhou Zhang : > > I think copy mips.lds to mips64.lds with only one line changed is not > > good. So I disable it in top Makefile. > > Signed-off-by: Zhizhou Zhang > > --- > > Makefile |2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/Makefile b/Makefile > > index 5ce5cc3..626d888 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -155,8 +155,10 @@ sinclude $(obj)include/autoconf.mk.dep > > sinclude $(obj)include/autoconf.mk > > > > ifndef CONFIG_SANDBOX > > +ifndef CONFIG_MIPS64 > > SUBDIRS += $(SUBDIR_EXAMPLES) > > endif > > +endif > > > > # load ARCH, BOARD, and CPU configuration > > include $(obj)include/config.mk > > -- > > 1.7.9.5 > > > > NAK. > > Please do what you have done in v1 of your patch series. This is possible > now > if you use current master of git://git.denx.de/u-boot-mips.git. > > -- > Best regards, > Daniel > when I add below in examples/standalone/mips.lds, #ifdef CONFIG_64BIT OUTPUT_FORMAT("elf64-tradbigmips", "elf64-tradbigmips", "elf64-tradlittlemips") #else OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradlittlemips") #endif I will get a error: /home/zhangzz/work/clfs/sys_root/cross-tools/bin/mips64el-unknown-linux-gnu-ld:mips.lds:27: ignoring invalid character `#' in expression /home/zhangzz/work/clfs/sys_root/cross-tools/bin/mips64el-unknown-linux-gnu-ld:mips.lds:27: syntax error So I find these in top Makefile: $(obj)u-boot.lds: $(LDSCRIPT) $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ It seems that I can't make mips.lds configurable without a lot modifications in example/standalone/Makefile. So could you give a tip? -- Regards, Zhizhou Zhang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [Patch V3 4/4] [MIPS] Disable standalone while building MIPS64
2012/8/26 Zhi-zhou Zhang : > > > On Fri, Aug 24, 2012 at 8:23 AM, Daniel Schwierzeck > wrote: >> >> 2012/8/20 Zhizhou Zhang : >> > I think copy mips.lds to mips64.lds with only one line changed is not >> > good. So I disable it in top Makefile. >> > Signed-off-by: Zhizhou Zhang >> > --- >> > Makefile |2 ++ >> > 1 file changed, 2 insertions(+) >> > >> > diff --git a/Makefile b/Makefile >> > index 5ce5cc3..626d888 100644 >> > --- a/Makefile >> > +++ b/Makefile >> > @@ -155,8 +155,10 @@ sinclude $(obj)include/autoconf.mk.dep >> > sinclude $(obj)include/autoconf.mk >> > >> > ifndef CONFIG_SANDBOX >> > +ifndef CONFIG_MIPS64 >> > SUBDIRS += $(SUBDIR_EXAMPLES) >> > endif >> > +endif >> > >> > # load ARCH, BOARD, and CPU configuration >> > include $(obj)include/config.mk >> > -- >> > 1.7.9.5 >> > >> >> NAK. >> >> Please do what you have done in v1 of your patch series. This is possible >> now >> if you use current master of git://git.denx.de/u-boot-mips.git. >> >> -- >> Best regards, >> Daniel > > > when I add below in examples/standalone/mips.lds, > #ifdef CONFIG_64BIT > OUTPUT_FORMAT("elf64-tradbigmips", "elf64-tradbigmips", > "elf64-tradlittlemips") > #else > OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", > "elf32-tradlittlemips") > #endif > I will get a error: > /home/zhangzz/work/clfs/sys_root/cross-tools/bin/mips64el-unknown-linux-gnu-ld:mips.lds:27: > ignoring invalid character `#' in expression > /home/zhangzz/work/clfs/sys_root/cross-tools/bin/mips64el-unknown-linux-gnu-ld:mips.lds:27: > syntax error > > So I find these in top Makefile: > $(obj)u-boot.lds: $(LDSCRIPT) > $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - > <$^ >$@ > It seems that I can't make mips.lds configurable without a lot modifications > in example/standalone/Makefile. > So could you give a tip? yes, in my previous comment I thought that mips.lds is also preprocessed like u-boot.lds. But sadly that is not the case. You have added a mips64.lds in your first patch series. I guess that was already the correct solution without changing standalone/Makefile. -- Best regards, Daniel ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [Patch V3 1/4] [MIPS] Add support for MIPS64 cpus
2012/8/26 Zhi-zhou Zhang : >> >> 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 >> > Ok, I have done what you ask for. But I didn't find where does > CONFIG_SYS_LITTLE_ENDIAN or CONFIG_SYS_BIG_ENDIAN define. > Could you tell where should I put them? > It seem that putting it in qemu-mips64.h doesn't affect building flags. have a look at commit http://git.denx.de/?p=u-boot/u-boot-mips.git;a=commitdiff;h=748fd4a621a870d378e4e4f54df76a38fd5d3cba CONFIG_SYS_LITTLE_ENDIAN or CONFIG_SYS_BIG_ENDIAN could be set in the board config header file or in boards.cfg. Usually the header file should be preferred. But for qemu we want to use the same header file for both endianess types. Thus we can use the possibilty to put config options in boards.cfg like I did in my commit. Adding these lines to boards.cfg should work: qemu_mips64mipsmips64 qemu-mips - - qemu-mips64:SYS_BIG_ENDIAN qemu_mips64el mipsmips64 qemu-mips - - qemu-mips64:SYS_LITTLE_ENDIAN >> >> >> currently we cannot use interrupts or setup any interrupt handlers in >> u-boot-mips. >> Please leave those functions empty. >> > >> >> calling a C function is not supposed to work here because no stack >> >> pointer has been setup yet. >> I checked with Sourcery 2011.09 and 2012.03. The stack is always >> utilized in cache_probe. >> Either you rewrite the cache_probe function in assembler or you use >> the existing config options >> and you could drop the cache probing. >> > I'm afraid I don't say clearly just now. I mean could I call cache_probe in > checkboard()? no that is too late. The functions called by mips_cache_reset need to know the cache sizes. Currently we are configuring that with the options CONFIG_SYS_DCACHE_SIZE, CONFIG_SYS_ICACHE_SIZE and CONFIG_SYS_CACHELINE_SIZE. I suggest you do the same for MIPS64. We can add a runtime cache probing later. But this has to be done in assembler code. I already have this on my todo list. -- Best regards, Daniel ___ 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 (v4)
On 25/08/2012 17:30, Philippe Reynes wrote: > 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_B
Re: [U-Boot] [PATCH 2/2] imx27lite: update with gpio api change (v4)
On 25/08/2012 17:30, Philippe Reynes wrote: > 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 > Acked-by: Stefano Babic Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] FEC: Do not pass unaligned buffer to network stack
Do not pass unaligned RX buffer to the upper layers. The upper layer, especially in the ARP case, recycles the buffer and passes it back into the FEC, into it's TX path. With caches enabled, the FEC hangs on this from time to time. Signed-off-by: Marek Vasut Cc: Benoit Thebaudeau Cc: Eric Nelson Cc: Fabio Estevam Cc: Joe Hershberger --- drivers/net/fec_mxc.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index fbfc842..7b6a997 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -31,6 +31,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -791,7 +792,7 @@ static int fec_recv(struct eth_device *dev) uint16_t bd_status; uint32_t addr, size; int i; - uchar buff[FEC_MAX_PKT_SIZE]; + uchar buff[FEC_MAX_PKT_SIZE] __aligned(ARCH_DMA_MINALIGN); /* * Check if any critical events have happened -- 1.7.10.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] FEC: Properly align address over the buffers for cache ops
Align the address that's to be invalidated/flushed properly. Signed-off-by: Marek Vasut Cc: Benoit Thebaudeau Cc: Eric Nelson Cc: Fabio Estevam Cc: Joe Hershberger --- drivers/net/fec_mxc.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 7b6a997..bc44d38 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -695,7 +695,7 @@ static void fec_halt(struct eth_device *dev) static int fec_send(struct eth_device *dev, void *packet, int length) { unsigned int status; - uint32_t size; + uint32_t size, end; uint32_t addr; /* @@ -722,8 +722,9 @@ static int fec_send(struct eth_device *dev, void *packet, int length) #endif addr = (uint32_t)packet; - size = roundup(length, ARCH_DMA_MINALIGN); - flush_dcache_range(addr, addr + size); + end = roundup(addr + length, ARCH_DMA_MINALIGN); + addr &= ~(ARCH_DMA_MINALIGN - 1); + flush_dcache_range(addr, end); writew(length, &fec->tbd_base[fec->tbd_index].data_length); writel(addr, &fec->tbd_base[fec->tbd_index].data_pointer); @@ -790,7 +791,7 @@ static int fec_recv(struct eth_device *dev) int frame_length, len = 0; struct nbuf *frame; uint16_t bd_status; - uint32_t addr, size; + uint32_t addr, size, end; int i; uchar buff[FEC_MAX_PKT_SIZE] __aligned(ARCH_DMA_MINALIGN); @@ -854,8 +855,9 @@ static int fec_recv(struct eth_device *dev) * Invalidate data cache over the buffer */ addr = (uint32_t)frame; - size = roundup(frame_length, ARCH_DMA_MINALIGN); - invalidate_dcache_range(addr, addr + size); + end = roundup(addr + frame_length, ARCH_DMA_MINALIGN); + addr &= ~(ARCH_DMA_MINALIGN - 1); + invalidate_dcache_range(addr, end); /* * Fill the buffer and pass it to upper layers -- 1.7.10.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/4] MMC: MXS: Convert MXS MMC driver to generic bounce buffer
Implement necessary code to use the generic bounce buffer routines inside this driver. This replaces the MMC bounce buffer, which is to be removed. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Andy Fleming --- drivers/mmc/mxsmmc.c | 36 +++- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/drivers/mmc/mxsmmc.c b/drivers/mmc/mxsmmc.c index 9a98c6b..a3d8661 100644 --- a/drivers/mmc/mxsmmc.c +++ b/drivers/mmc/mxsmmc.c @@ -42,6 +42,7 @@ #include #include #include +#include struct mxsmmc_priv { int id; @@ -95,28 +96,33 @@ static int mxsmmc_send_cmd_pio(struct mxsmmc_priv *priv, struct mmc_data *data) static int mxsmmc_send_cmd_dma(struct mxsmmc_priv *priv, struct mmc_data *data) { uint32_t data_count = data->blocksize * data->blocks; - uint32_t cache_data_count; + uint32_t cache_data_count = roundup(data_count, ARCH_DMA_MINALIGN); int dmach; struct mxs_dma_desc *desc = priv->desc; + void *addr, *backup; + uint8_t flags; memset(desc, 0, sizeof(struct mxs_dma_desc)); desc->address = (dma_addr_t)desc; - if (data_count % ARCH_DMA_MINALIGN) - cache_data_count = roundup(data_count, ARCH_DMA_MINALIGN); - else - cache_data_count = data_count; - if (data->flags & MMC_DATA_READ) { priv->desc->cmd.data = MXS_DMA_DESC_COMMAND_DMA_WRITE; - priv->desc->cmd.address = (dma_addr_t)data->dest; + addr = data->dest; + flags = GEN_BB_WRITE; } else { priv->desc->cmd.data = MXS_DMA_DESC_COMMAND_DMA_READ; - priv->desc->cmd.address = (dma_addr_t)data->src; + addr = (void *)data->src; + flags = GEN_BB_READ; + } + + bounce_buffer_start(&addr, data_count, &backup, flags); + priv->desc->cmd.address = (dma_addr_t)addr; + + if (data->flags & MMC_DATA_WRITE) { /* Flush data to DRAM so DMA can pick them up */ - flush_dcache_range((uint32_t)priv->desc->cmd.address, - (uint32_t)(priv->desc->cmd.address + cache_data_count)); + flush_dcache_range((uint32_t)addr, + (uint32_t)(addr) + cache_data_count); } priv->desc->cmd.data |= MXS_DMA_DESC_IRQ | MXS_DMA_DESC_DEC_SEM | @@ -124,15 +130,19 @@ static int mxsmmc_send_cmd_dma(struct mxsmmc_priv *priv, struct mmc_data *data) dmach = MXS_DMA_CHANNEL_AHB_APBH_SSP0 + priv->id; mxs_dma_desc_append(dmach, priv->desc); - if (mxs_dma_go(dmach)) + if (mxs_dma_go(dmach)) { + bounce_buffer_stop(&addr, data_count, &backup, flags); return COMM_ERR; + } /* The data arrived into DRAM, invalidate cache over them */ if (data->flags & MMC_DATA_READ) { - invalidate_dcache_range((uint32_t)priv->desc->cmd.address, - (uint32_t)(priv->desc->cmd.address + cache_data_count)); + invalidate_dcache_range((uint32_t)addr, + (uint32_t)(addr) + cache_data_count); } + bounce_buffer_stop(&addr, data_count, &backup, flags); + return 0; } -- 1.7.10.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/4] COMMON: Implement common bounce buffer
Implement common bounce buffer to be used on a less capable hardware. That includes hardware that can not do DMA from any address or such. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Andy Fleming --- common/Makefile |1 + common/bouncebuf.c | 92 +++ include/bouncebuf.h | 87 3 files changed, 180 insertions(+) create mode 100644 common/bouncebuf.c create mode 100644 include/bouncebuf.h diff --git a/common/Makefile b/common/Makefile index 483eb4d..63f3523 100644 --- a/common/Makefile +++ b/common/Makefile @@ -188,6 +188,7 @@ endif ifdef CONFIG_SPL_BUILD COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o endif +COBJS-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o COBJS-y += console.o COBJS-y += dlmalloc.o COBJS-y += image.o diff --git a/common/bouncebuf.c b/common/bouncebuf.c new file mode 100644 index 000..4f827f8 --- /dev/null +++ b/common/bouncebuf.c @@ -0,0 +1,92 @@ +/* + * Generic bounce buffer implementation + * + * Copyright (C) 2012 Marek Vasut + * + * 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 int addr_aligned(void *data, size_t len) +{ + const ulong align_mask = ARCH_DMA_MINALIGN - 1; + + /* Check if start is aligned */ + if ((ulong)data & align_mask) { + debug("Unaligned start address %p\n", data); + return 0; + } + + data += len; + + /* Check if end is aligned */ + if ((ulong)data & align_mask) { + debug("Unaligned end address %p\n", data); + return 0; + } + + /* Aligned */ + return 1; +} + +int bounce_buffer_start(void **data, size_t len, void **backup, uint8_t flags) +{ + void *tmp; + size_t alen; + + if (addr_aligned(*data, len)) { + *backup = NULL; + return 0; + } + + alen = roundup(len, ARCH_DMA_MINALIGN); + tmp = memalign(ARCH_DMA_MINALIGN, alen); + + if (!tmp) + return -ENOMEM; + + if (flags & GEN_BB_READ) + memcpy(tmp, *data, len); + + *backup = *data; + *data = tmp; + + return 0; +} + +int bounce_buffer_stop(void **data, size_t len, void **backup, uint8_t flags) +{ + void *tmp = *data; + + /* The buffer was already aligned, since "backup" is NULL. */ + if (!*backup) + return 0; + + if (flags & GEN_BB_WRITE) + memcpy(*backup, *data, len); + + *data = *backup; + free(tmp); + + return 0; +} diff --git a/include/bouncebuf.h b/include/bouncebuf.h new file mode 100644 index 000..31021c5 --- /dev/null +++ b/include/bouncebuf.h @@ -0,0 +1,87 @@ +/* + * Generic bounce buffer implementation + * + * Copyright (C) 2012 Marek Vasut + * + * 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 __INCLUDE_BOUNCEBUF_H__ +#define __INCLUDE_BOUNCEBUF_H__ + +/* + * GEN_BB_READ -- Data are read from the buffer eg. by DMA hardware. + * The source buffer is copied into the bounce buffer (if unaligned, otherwise + * the source buffer is used directly) upon start() call, then the operation + * requiring the aligned transfer happens, then the bounce buffer is lost upon + * stop() call. + */ +#define GEN_BB_READ(1 << 0) +/* + * GEN_BB_WRITE -- Data are written into the buffer eg. by DMA hardware. + * The source buffer star
[U-Boot] [PATCH 3/4] MMC: MXS: Toggle the generic bounce buffer on the boards
Flip the boards to use the generic bounce buffer instead of the MMC one. Signed-off-by: Marek Vasut Cc: Andy Fleming Cc: Fabio Estevam --- include/configs/apx4devkit.h |2 +- include/configs/m28evk.h |2 +- include/configs/mx28evk.h|2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/configs/apx4devkit.h b/include/configs/apx4devkit.h index b5ae44f..cd19c92 100644 --- a/include/configs/apx4devkit.h +++ b/include/configs/apx4devkit.h @@ -132,7 +132,7 @@ #ifdef CONFIG_CMD_MMC #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_MMC_BOUNCE_BUFFER +#define CONFIG_BOUNCE_BUFFER #define CONFIG_MXS_MMC #endif diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h index 4e9758f..6306f09 100644 --- a/include/configs/m28evk.h +++ b/include/configs/m28evk.h @@ -136,7 +136,7 @@ */ #ifdef CONFIG_CMD_MMC #defineCONFIG_MMC -#defineCONFIG_MMC_BOUNCE_BUFFER +#defineCONFIG_BOUNCE_BUFFER #defineCONFIG_GENERIC_MMC #defineCONFIG_MXS_MMC #endif diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h index b677e51..18fc9f1 100644 --- a/include/configs/mx28evk.h +++ b/include/configs/mx28evk.h @@ -141,7 +141,7 @@ #ifdef CONFIG_CMD_MMC #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_MMC_BOUNCE_BUFFER +#define CONFIG_BOUNCE_BUFFER #define CONFIG_MXS_MMC #endif -- 1.7.10.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/4] MMC: Remove the MMC bounce buffer
Signed-off-by: Marek Vasut Cc: Andy Fleming Cc: Fabio Estevam --- drivers/mmc/mmc.c | 92 - 1 file changed, 92 deletions(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index c1c2862..73584bc 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -47,93 +47,6 @@ int __board_mmc_getcd(struct mmc *mmc) { int board_mmc_getcd(struct mmc *mmc)__attribute__((weak, alias("__board_mmc_getcd"))); -#ifdef CONFIG_MMC_BOUNCE_BUFFER -static int mmc_bounce_need_bounce(struct mmc_data *orig) -{ - ulong addr, len; - - if (orig->flags & MMC_DATA_READ) - addr = (ulong)orig->dest; - else - addr = (ulong)orig->src; - - if (addr % ARCH_DMA_MINALIGN) { - debug("MMC: Unaligned data destination address %08lx!\n", addr); - return 1; - } - - len = (ulong)(orig->blocksize * orig->blocks); - if (len % ARCH_DMA_MINALIGN) { - debug("MMC: Unaligned data destination length %08lx!\n", len); - return 1; - } - - return 0; -} - -static int mmc_bounce_buffer_start(struct mmc_data *backup, - struct mmc_data *orig) -{ - ulong origlen, len; - void *buffer; - - if (!orig) - return 0; - - if (!mmc_bounce_need_bounce(orig)) - return 0; - - memcpy(backup, orig, sizeof(struct mmc_data)); - - origlen = orig->blocksize * orig->blocks; - len = roundup(origlen, ARCH_DMA_MINALIGN); - buffer = memalign(ARCH_DMA_MINALIGN, len); - if (!buffer) { - puts("MMC: Error allocating MMC bounce buffer!\n"); - return 1; - } - - if (orig->flags & MMC_DATA_READ) { - orig->dest = buffer; - } else { - memcpy(buffer, orig->src, origlen); - orig->src = buffer; - } - - return 0; -} - -static void mmc_bounce_buffer_stop(struct mmc_data *backup, - struct mmc_data *orig) -{ - ulong len; - - if (!orig) - return; - - if (!mmc_bounce_need_bounce(backup)) - return; - - if (backup->flags & MMC_DATA_READ) { - len = backup->blocksize * backup->blocks; - memcpy(backup->dest, orig->dest, len); - free(orig->dest); - orig->dest = backup->dest; - } else { - free((void *)orig->src); - orig->src = backup->src; - } - - return; - -} -#else -static inline int mmc_bounce_buffer_start(struct mmc_data *backup, - struct mmc_data *orig) { return 0; } -static inline void mmc_bounce_buffer_stop(struct mmc_data *backup, - struct mmc_data *orig) { } -#endif - int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data) { struct mmc_data backup; @@ -141,10 +54,6 @@ int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data) memset(&backup, 0, sizeof(backup)); - ret = mmc_bounce_buffer_start(&backup, data); - if (ret) - return ret; - #ifdef CONFIG_MMC_TRACE int i; u8 *ptr; @@ -197,7 +106,6 @@ int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data) #else ret = mmc->send_cmd(mmc, cmd, data); #endif - mmc_bounce_buffer_stop(&backup, data); return ret; } -- 1.7.10.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] please pull u-boot-samsung master
Dear Albert ARIBAUD, The following changes since commit 5f50310588e87f2ff501992564d1b05df71419f4: davinci, c6x: Always use C version of reset code (2012-08-25 13:40:03 +0200) are available in the git repository at: git://git.denx.de/u-boot-samsung master for you to fetch changes up to 76f60ac2246d433c6995041d1aaf9f5d4e59b941: arm:cache:trats: Enable PL310 L2 Cache Controller at TRATS Samsung board (2012-08-27 12:25:09 +0900) Donghwa Lee (9): video: support exynos fimd driver for various exynos series EXYNOS5: support exynos5 lcd clock control EXYNOS5: support display system register control EXYNOS5: support display port phy control function EXYNOS5: add display port base address video: support exynos display port drivers video: add dp_enabled variable in vidinfo structure video: exynos fb driver supports display port feature video: support exynos pwm backlight driver Jaehoon Chung (1): ARM: EXYNOS: fixed compiler warning message Rajeshwari Shinde (10): ARCH: SPL: Add parametric board initializer SMDK5250: SPL: Define parametric board initializer SMDK5250: Add smdk5250-uboot-spl.lds EXYNOS5: CLOCK: define additional clock registers for Exynos5250 Rev 1.0 EXYNOS5: CLOCK: Add clock support for Exynos5250 Rev 1.0 Exynos5: DDR3: Add DDR3 memory setup for Exynos5250 Rev 1.0 EXYNOS5: CLOCK: Modify MPLL clock out for Exynos5250 Rev 1.0 EXYNOS5: CLOCK: Add BPLL support EXYNOS5 : Modify pinnumx settings as per Exynos5250 Rev 1.0 Zhong Hongbo (1): arm/s5pxx: Fix get_timer_masked to get the time. Łukasz Majewski (3): arm:trats: loaduimage environment variable defied for TRATS target arm:exynos: Enable data cache at exynos based processors. arm:cache:trats: Enable PL310 L2 Cache Controller at TRATS Samsung board arch/arm/cpu/armv7/exynos/clock.c| 139 ++- arch/arm/cpu/armv7/exynos/pinmux.c | 22 +- arch/arm/cpu/armv7/exynos/power.c| 21 + arch/arm/cpu/armv7/exynos/soc.c |8 + arch/arm/cpu/armv7/exynos/system.c | 18 + arch/arm/cpu/armv7/s5p-common/pwm.c |2 +- arch/arm/cpu/armv7/s5p-common/timer.c| 20 +- arch/arm/include/asm/arch-exynos/clk.h |1 + arch/arm/include/asm/arch-exynos/clock.h | 237 ++-- arch/arm/include/asm/arch-exynos/cpu.h |3 + arch/arm/include/asm/arch-exynos/dmc.h | 65 ++ arch/arm/include/asm/arch-exynos/dp.h| 751 + arch/arm/include/asm/arch-exynos/dp_info.h | 214 arch/arm/include/asm/arch-exynos/fb.h| 27 +- arch/arm/include/asm/arch-exynos/gpio.h |7 +- arch/arm/include/asm/arch-exynos/power.h |5 + arch/arm/include/asm/arch-exynos/pwm_backlight.h | 34 + arch/arm/include/asm/arch-exynos/spl.h | 97 ++ board/samsung/smdk5250/Makefile |3 +- board/samsung/smdk5250/clock_init.c | 714 +--- board/samsung/smdk5250/clock_init.h | 149 +++ board/samsung/smdk5250/dmc_common.c | 199 board/samsung/smdk5250/dmc_init.c| 462 board/samsung/smdk5250/dmc_init_ddr3.c | 228 board/samsung/smdk5250/setup.h | 763 +++-- board/samsung/smdk5250/smdk5250-uboot-spl.lds| 66 ++ board/samsung/smdk5250/smdk5250.c|6 +- board/samsung/smdk5250/smdk5250_spl.c| 68 ++ drivers/video/Makefile |2 + drivers/video/exynos_dp.c| 925 drivers/video/exynos_dp_lowlevel.c | 1291 ++ drivers/video/exynos_dp_lowlevel.h | 80 ++ drivers/video/exynos_fb.c|5 +- drivers/video/exynos_fimd.c | 91 +- drivers/video/exynos_pwm_bl.c| 57 + include/configs/smdk5250.h |7 +- include/configs/trats.h |7 +- include/lcd.h|1 + 38 files changed, 5730 insertions(+), 1065 deletions(-) create mode 100644 arch/arm/include/asm/arch-exynos/dp.h create mode 100644 arch/arm/include/asm/arch-exynos/dp_info.h create mode 100644 arch/arm/include/asm/arch-exynos/pwm_backlight.h create mode 100644 arch/arm/include/asm/arch-exynos/spl.h create mode 100644 board/samsung/smdk5250/clock_init.h create mode 100644 board/samsung/smdk5250/dmc_common.c delete mode 100644 board/samsung/smdk5250/dmc_init.c create mode 100644 board/samsung/smdk5250/dmc_init_ddr3.c create mode 100644 board/samsung/smdk5250/smdk5250-uboot-spl.lds create mode 100644 board/samsung/smdk5250/smdk5250_spl.c create mode 100644 drivers/video/exynos_dp
Re: [U-Boot] [PATCH 1/3] mxs: Replace i.MX233 by i.MX23 on copyright header
On 19/08/2012 16:58, Otavio Salvador wrote: > All other header are going to use i.MX23 so we change this for > consistency. > > Signed-off-by: Otavio Salvador > --- > arch/arm/include/asm/arch-mxs/sys_proto.h |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/include/asm/arch-mxs/sys_proto.h > b/arch/arm/include/asm/arch-mxs/sys_proto.h > index 4610363..9e4a4c9 100644 > --- a/arch/arm/include/asm/arch-mxs/sys_proto.h > +++ b/arch/arm/include/asm/arch-mxs/sys_proto.h > @@ -1,5 +1,5 @@ > /* > - * Freescale i.MX233/i.MX28 specific functions > + * Freescale i.MX23/i.MX28 specific functions > * > * Copyright (C) 2011 Marek Vasut > * on behalf of DENX Software Engineering GmbH > Applied (whole series) to u-boot-imx, thanks. Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] mx5: add iomux-mx51.h include
On 22/08/2012 21:24, Matt Sealey wrote: > Allow usage of the imx-common/iomux-v3.h framework by including pad settings > for the i.MX51. The content of the file is taken from Linux kernel at > commit 5d23b39 plus the required changes to make it work in U-Boot. > > The contained pad settings are the minimum required to make an Efika MX boot > and get all the currently-implemented peripherals working in U-Boot. > > It is recommended that this file not be just a dumping ground for pins but > only contain the settings required for all the boards using it. > > Changes for v2: > * reference commit id from Linux kernel > * additionally roll in the USB pads > * removed GPIO_NUMBER define > > Signed-off-by: Matt Sealey > --- Applied to u-boot-imx, thanks. Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] imx27lite: update with gpio api change (v4)
On 25/08/2012 17:30, Philippe Reynes wrote: > Signed-off-by: Philippe Reynes > --- > board/logicpd/imx27lite/imx27lite.c |5 ++--- > include/configs/imx27lite-common.h |5 + > 2 files changed, 7 insertions(+), 3 deletions(-) > Applied to u-boot-imx, thanks. Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] gpio: add gpio api support to mx27 (v4)
On 25/08/2012 17:30, Philippe Reynes wrote: > The gpio api has been tested on an armadeus apf27. > > Signed-off-by: Philippe Reynes > --- Applied to u-boot-imx, thanks. Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 4/5] at91: 9x5: change SMC config timing that both works for PMECC & non-PMECC.
Hi Josh, On 8/23/2012 18:05, Josh Wu wrote: Signed-off-by: Josh Wu --- board/atmel/at91sam9x5ek/at91sam9x5ek.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/board/atmel/at91sam9x5ek/at91sam9x5ek.c b/board/atmel/at91sam9x5ek/at91sam9x5ek.c index 88b3478..ae408bc 100644 --- a/board/atmel/at91sam9x5ek/at91sam9x5ek.c +++ b/board/atmel/at91sam9x5ek/at91sam9x5ek.c @@ -65,13 +65,13 @@ static void at91sam9x5ek_nand_hw_init(void) writel(csa, &matrix->ebicsa); /* Configure SMC CS3 for NAND/SmartMedia */ - writel(AT91_SMC_SETUP_NWE(2) | AT91_SMC_SETUP_NCS_WR(0) | - AT91_SMC_SETUP_NRD(2) | AT91_SMC_SETUP_NCS_RD(0), + writel(AT91_SMC_SETUP_NWE(1) | AT91_SMC_SETUP_NCS_WR(0) | + AT91_SMC_SETUP_NRD(1) | AT91_SMC_SETUP_NCS_RD(0), &smc->cs[3].setup); - writel(AT91_SMC_PULSE_NWE(4) | AT91_SMC_PULSE_NCS_WR(4) | - AT91_SMC_PULSE_NRD(4) | AT91_SMC_PULSE_NCS_RD(4), + writel(AT91_SMC_PULSE_NWE(3) | AT91_SMC_PULSE_NCS_WR(5) | + AT91_SMC_PULSE_NRD(4) | AT91_SMC_PULSE_NCS_RD(6), &smc->cs[3].pulse); - writel(AT91_SMC_CYCLE_NWE(7) | AT91_SMC_CYCLE_NRD(7), + writel(AT91_SMC_CYCLE_NWE(5) | AT91_SMC_CYCLE_NRD(6), &smc->cs[3].cycle); writel(AT91_SMC_MODE_RM_NRD | AT91_SMC_MODE_WM_NWE | AT91_SMC_MODE_EXNW_DISABLE | @@ -80,7 +80,7 @@ static void at91sam9x5ek_nand_hw_init(void) #else /* CONFIG_SYS_NAND_DBW_8 */ AT91_SMC_MODE_DBW_8 | #endif - AT91_SMC_MODE_TDF_CYCLE(3), + AT91_SMC_MODE_TDF_CYCLE(1), &smc->cs[3].mode); Test these parameters for NAND using software ECC. It works well. Tested-by: voice.s...@atmel.com writel(1 << ATMEL_ID_PIOCD, &pmc->pcer); ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mx5:Use IMX_GPIO_NR macro
On 23/08/2012 18:43, Ashok wrote: > From 9f76cd6a79c6595fc058e9103d9d4eebd138a2af Mon Sep 17 00:00:00 2001 > From: Ashok Kumar Reddy > Date: Thu, 23 Aug 2012 21:24:53 +0530 > Subject: [PATCH] mx5:Use IMX_GPIO_NR macro > > Signed-off-by: Ashok Kumar Reddy > --- > board/freescale/mx51evk/mx51evk.c | 12 ++-- > board/freescale/mx53ard/mx53ard.c |8 > board/freescale/mx53evk/mx53evk.c |8 > board/freescale/mx53loco/mx53loco.c |8 > board/freescale/mx53smd/mx53smd.c |4 ++-- > 5 files changed, 20 insertions(+), 20 deletions(-) > > diff --git a/board/freescale/mx51evk/mx51evk.c > b/board/freescale/mx51evk/mx51evk.c > index 514a7ac..55cdbed 100644 > --- a/board/freescale/mx51evk/mx51evk.c > +++ b/board/freescale/mx51evk/mx51evk.c > @@ -319,11 +319,11 @@ static void power_init(void) > pmic_reg_write(p, REG_MODE_1, val); > > mxc_request_iomux(MX51_PIN_EIM_A20, IOMUX_CONFIG_ALT1); > -gpio_direction_output(46, 0); > +gpio_direction_output(IMX_GPIO_NR(2,14), 0); ^---space missing checkpatch reports errors. Can you fix them globally and resubmit ? Thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] omap4 i2c: add support for i2c bus 4
Hi, -- a/arch/arm/include/asm/arch-omap4/cpu.h > +++ b/arch/arm/include/asm/arch-omap4/cpu.h > @@ -138,6 +138,7 @@ struct watchdog { > #define I2C_BASE1 (OMAP44XX_L4_PER_BASE + 0x7) > #define I2C_BASE2 (OMAP44XX_L4_PER_BASE + 0x72000) > #define I2C_BASE3 (OMAP44XX_L4_PER_BASE + 0x6) > +#define I2C_BASE4 (OMAP44XX_L4_PER_BASE + 0x35) > > /* MUSB base */ > #define MUSB_BASE (OMAP44XX_L4_CORE_BASE + 0xAB000) > diff --git a/arch/arm/include/asm/arch-omap4/i2c.h > b/arch/arm/include/asm/arch-omap4/i2c.h > index a91b4c2..02ee2f8 100644 > --- a/arch/arm/include/asm/arch-omap4/i2c.h > +++ b/arch/arm/include/asm/arch-omap4/i2c.h > @@ -23,7 +23,7 @@ > #ifndef _OMAP4_I2C_H_ > #define _OMAP4_I2C_H_ > > -#define I2C_BUS_MAX3 > +#define I2C_BUS_MAX4 > #define I2C_DEFAULT_BASE I2C_BASE1 > > struct i2c { > diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c > index 81193b0..df8ab92 100644 > --- a/drivers/i2c/omap24xx_i2c.c > +++ b/drivers/i2c/omap24xx_i2c.c > @@ -448,6 +448,14 @@ int i2c_set_bus_num(unsigned int bus) > return -1; > } > > +#if I2C_BUS_MAX == 4 > + if (bus == 3) > + i2c_base = (struct i2c *)I2C_BASE4; > + else > + if (bus == 2) > + i2c_base = (struct i2c *)I2C_BASE3; > + else > +#endif How about having a const array of bases and directly index from that than having #ifdefs and if checks ?? Thanks, Sricharan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/5] MX28: DMA: Align the struct mxs_dma_desc
On 22/08/2012 04:17, Marek Vasut wrote: > Align this structure to DMA alignment size. > > Signed-off-by: Marek Vasut > Cc: Fabio Estevam > Cc: Otavio Salvador > Cc: Stefano Babic > --- > arch/arm/include/asm/arch-mxs/dma.h |3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/include/asm/arch-mxs/dma.h > b/arch/arm/include/asm/arch-mxs/dma.h > index 4a1820b..a0a0ea5 100644 > --- a/arch/arm/include/asm/arch-mxs/dma.h > +++ b/arch/arm/include/asm/arch-mxs/dma.h > @@ -27,6 +27,7 @@ > #define __DMA_H__ > > #include > +#include > > #ifndef CONFIG_ARCH_DMA_PIO_WORDS > #define DMA_PIO_WORDS 15 > @@ -109,7 +110,7 @@ struct mxs_dma_desc { > dma_addr_t address; > void*buffer; > struct list_headnode; > -}; > +} __aligned(MXS_DMA_ALIGNMENT); > > /** > * MXS DMA channel > Applied (whole series) to u-boot-imx, thanks. Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4] efikamx: update to Efika MX Smarttop and Smartbook boards
On 22/08/2012 21:25, Matt Sealey wrote: > This is a rework of a previously submitted patchset and bundles the > main board support and USB support into a single commit. > > It requires the patch "mx5: add iomux-mx51.h include" > > * Use iomux-mx51.h include to simplify board configuration. > * Simplify LED support (remove efikamx_toggle_led, change lit LEDs). > * Simplify MMC support for CD and WP pin differences. > * Fix broken CPU voltage setting - comment said 1.1V but the code set to > 1.2V. It should never have been set to 1.2V even on i.MX51 TO2 and > all available Linux kernels would drop the voltage to 1.1V anyway and > work reliably. This should lower power consumption during the boot > process. > * Function renames for readability. > * Some board identification string changes to match actual product names. > > Signed-off-by: Matt Sealey > --- Hi Matt, checkpatch reports several errors on this patch. Can you fix and resubmit (only this patch, I can apply the frst 3 patches) ? Regards, Stefano -- = DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/4] efikamx: remove drive strength function and roll its functionality into the DCD
On 22/08/2012 21:25, Matt Sealey wrote: > Efika MX boards configure their DDR pad settings twice, one in the DCD > generated > from imximage_*.cfg and again in init_drive_strength called before relocation. > > Rather than doing this, roll the changes it makes into the DCD so DDR is set > up > before a single line of code in U-Boot is run. > > The settings are identical with this DCD block which is shorter (by 7 entries) > than the old one, and after the output of init_drive_strength since a lot of > the > functionality in the existing DCD and init_drive_strength function was just > setting the POR defaults. This goes to explain some now-missing entries. > > Several hundred rounds of mtest have been run to test the settings before and > after to confirm DDR is stable and no ill-effects have been found. > > Signed-off-by: Matt Sealey > --- > board/genesi/mx51_efikamx/efikamx.c | 77 > - > board/genesi/mx51_efikamx/imximage_mx.cfg | 42 +++- > 2 files changed, 18 insertions(+), 101 deletions(-) > Applied to u-boot-imx, thanks. Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/4] efikamx: configure Smarttop PCBID and LED pads in DCD for convenience
On 22/08/2012 21:25, Matt Sealey wrote: > PCBID pads seem to need time to settle due to external pulldowns, otherwise > we are reading floating GPIO pins with implicit pad pullups and get the wrong > data. However we can't "wait" at the time we need them before relocation, > since timers are not available. The time taken to get from DCD to the code > requiring the pads set seems to be more than long enough (even with caches > enabled). > > We have space in the DCD due to the DDR settings changes to configure all > the pad settings we need for this, plus the LED pad settings too which > reduces the amount of code required later on. > > Signed-off-by: Matt Sealey > --- Applied to u-boot-imx, thanks. Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/4] efikamx: move and rename Efika MX directories and config files to prepare for new boards
On 22/08/2012 21:25, Matt Sealey wrote: > * Move Efika MX Smarttop and Smartbook boards into a "genesi" vendor directory > * Rename efikamx -> mx51_efikamx since there is an mx53_efikamx and > mx6_efikamx to come > > Signed-off-by: Matt Sealey > --- > board/{efikamx => genesi/mx51_efikamx}/Makefile|0 > .../{efikamx => genesi/mx51_efikamx}/efikamx-usb.c |2 +- > board/{efikamx => genesi/mx51_efikamx}/efikamx.c |0 > .../mx51_efikamx}/imximage_mx.cfg |0 > .../mx51_efikamx}/imximage_sb.cfg |0 > boards.cfg |4 ++-- > include/configs/{efikamx.h => mx51_efikamx.h} |0 > 7 files changed, 3 insertions(+), 3 deletions(-) > rename board/{efikamx => genesi/mx51_efikamx}/Makefile (100%) > rename board/{efikamx => genesi/mx51_efikamx}/efikamx-usb.c (99%) > rename board/{efikamx => genesi/mx51_efikamx}/efikamx.c (100%) > rename board/{efikamx => genesi/mx51_efikamx}/imximage_mx.cfg (100%) > rename board/{efikamx => genesi/mx51_efikamx}/imximage_sb.cfg (100%) > rename include/configs/{efikamx.h => mx51_efikamx.h} (100%) Applied to u-boot-imx, thanks. Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mxs: Convert timeout parameter to 'unsigned int'
On 22/08/2012 22:10, Fabio Estevam wrote: > From: Fabio Estevam > > > For representing a timeout value, it makes more sense to pass it as > 'unsigned int'. > > Signed-off-by: Fabio Estevam > --- > arch/arm/cpu/arm926ejs/mxs/mxs.c |6 -- > arch/arm/include/asm/arch-mxs/sys_proto.h |4 ++-- > 2 files changed, 6 insertions(+), 4 deletions(-) > > diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c > b/arch/arm/cpu/arm926ejs/mxs/mxs.c > index c028e5e..19c79f2 100644 > --- a/arch/arm/cpu/arm926ejs/mxs/mxs.c > +++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c > @@ -81,7 +81,8 @@ void enable_caches(void) > #endif > } > > -int mxs_wait_mask_set(struct mxs_register_32 *reg, uint32_t mask, int > timeout) > +int mxs_wait_mask_set(struct mxs_register_32 *reg, uint32_t mask, unsigned > + int timeout) > { > while (--timeout) { > if ((readl(®->reg) & mask) == mask) > @@ -92,7 +93,8 @@ int mxs_wait_mask_set(struct mxs_register_32 *reg, uint32_t > mask, int timeout) > return !timeout; > } > > -int mxs_wait_mask_clr(struct mxs_register_32 *reg, uint32_t mask, int > timeout) > +int mxs_wait_mask_clr(struct mxs_register_32 *reg, uint32_t mask, unsigned > + int timeout) > { > while (--timeout) { > if ((readl(®->reg) & mask) == 0) > diff --git a/arch/arm/include/asm/arch-mxs/sys_proto.h > b/arch/arm/include/asm/arch-mxs/sys_proto.h > index 4610363..983b888 100644 > --- a/arch/arm/include/asm/arch-mxs/sys_proto.h > +++ b/arch/arm/include/asm/arch-mxs/sys_proto.h > @@ -26,10 +26,10 @@ > int mxs_reset_block(struct mxs_register_32 *reg); > int mxs_wait_mask_set(struct mxs_register_32 *reg, > uint32_t mask, > -int timeout); > +unsigned int timeout); > int mxs_wait_mask_clr(struct mxs_register_32 *reg, > uint32_t mask, > -int timeout); > +unsigned int timeout); > > int mxsmmc_initialize(bd_t *bis, int id, int (*wp)(int)); > > Applied to u-boot-imx, thanks. Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/2] mx35: Define default SoC input clock frequencies
On 21/08/2012 23:07, Benoît Thébaudeau wrote: > Define default SoC input clock frequencies for i.MX35 in order to get rid of > duplicated definitions. > > Signed-off-by: Benoît Thébaudeau > Cc: Stefano Babic > --- > This patch depends on http://patchwork.ozlabs.org/patch/177437/ . > Hi Benoît, I cannot apply this series. Can you take a look, please ? Best regards, Stefano -- = DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [GIT PULL] Pull request: u-boot-imx
Hi Albert, please pull from u-boot-imx, thanks. The following changes since commit 5f50310588e87f2ff501992564d1b05df71419f4: davinci, c6x: Always use C version of reset code (2012-08-25 13:40:03 +0200) are available in the git repository at: git://www.denx.de/git/u-boot-imx.git master for you to fetch changes up to ff1728c902587c2dc76869a30a32013ef005b84a: mxs: Convert timeout parameter to 'unsigned int' (2012-08-27 08:28:01 +0200) Ashok Kumar Reddy (1): mx6qarm2:Use IMX_GPIO_NR macro Benoît Thébaudeau (17): mxc_spi: Round up clock divider mx25: Enable dcache mx5: Enable dcache mx35: Fix typo on EDIO mx3: Fix typo on IPU_CONF_CSI_EN mx5/6 timer: Round up tick_to_time() value mx5: cosmetic: Clean up lowlevel_init mx35: Remove duplicate GPIO3_BASE_ADDR mx5/6: Fix cpu_mmc_init() return value mx35: Add cpu_mmc_init() mx5: Undeclare imx_decode_pll() mx35 iomux: Remove unused macro mx35: Fix broken pin definitions mx35: Remove declaration of non-existing function mx35: Move clock enums to clock.h mx35: Remove declaration of non-existing function mxc: Make gpio_get_value() use PSR Fabio Estevam (7): m28evk: Turn on caches apx4devkit: Turn on caches mx28evk: Remove unneeded 'undef' mxs: Use correct function name to initialize dram mx53loco: Use IMX_GPIO_NR macro mx51evk: Use IMX_GPIO_NR macro mx53ard: Use IMX_GPIO_NR macro Marek Vasut (7): MX28: Drop the cp15 reconfiguration from SPL MX28: Shuffle around the power management code MX28: DMA: Align the struct mxs_dma_desc MX28: DMA: Prolong the DMA timeout MX28: SPI: Supercharge the SPI driver MX28: m28evk: Align SSP clock speed MX28: m28evk: Enable SPI DMA Matt Sealey (7): spi: fix mxc_spi_slave structure allocation to clear memory spi: fix mxs_spi_slave structure allocation to clear memory mx5: add iomux-mx51.h include efikamx: move and rename Efika MX directories and config files to prepare for new boards efikamx: remove drive strength function and roll its functionality into the DCD efikamx: configure Smarttop PCBID and LED pads in DCD for convenience efikamx: update MAINTAINERS for Genesi Efika MX systems Otavio Salvador (9): mxs: Remove not required explicit iomux-mx28.h include mxs: Remove not required include of iomux-mx28.h mxs: rename regs-clkctrl.h to regs-clkctrl-mx28.h mxs: Convert sys_proto.h prefixes to 'mxs' MX28: config: Allow different target generation in elftosb call MX28: Move "regs-base.h" include after SoC type configuration mxs: Replace i.MX233 by i.MX23 on copyright header mxs: Only build internal Ethernet controller for i.MX28 mxs: Rename 'mx28_dram_init' to 'mxs_dram_init' Stefano Babic (1): MX: Set a common gpio.h for all i.MX Troy Kisky (4): iomux: move IOMUX_GPR13_xxx defines imx-common/cmd_bmode.c: add imx bmode (bootmode) command mx6qsabrelite: add boot_mode support mx53evk: add boot_mode support Vikram Narayanan (1): tx25: Use generic gpio_* calls fabio.este...@freescale.com (1): mxs: Convert timeout parameter to 'unsigned int' trem (3): rtc: add support of mx27 rtc gpio: add gpio api support to mx27 (v4) imx27lite: update with gpio api change (v4) MAINTAINERS|7 +- Makefile |5 +- arch/arm/cpu/arm1136/mx35/generic.c| 19 ++- arch/arm/cpu/arm1136/mx35/iomux.c |2 - arch/arm/cpu/arm926ejs/mx25/generic.c |8 + arch/arm/cpu/arm926ejs/mx27/generic.c | 11 +- arch/arm/cpu/arm926ejs/mxs/mxs.c | 40 ++--- arch/arm/cpu/arm926ejs/mxs/spl_boot.c |7 +- arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c |1 - arch/arm/cpu/arm926ejs/mxs/spl_power_init.c|9 +- arch/arm/cpu/arm926ejs/mxs/start.S | 42 - arch/arm/cpu/arm926ejs/mxs/timer.c |2 +- .../arm926ejs/mxs/{u-boot.bd => u-boot-imx28.bd} |0 arch/arm/cpu/armv7/imx-common/Makefile |1 + arch/arm/cpu/armv7/imx-common/cmd_bmode.c | 119 ++ arch/arm/cpu/armv7/imx-common/cpu.c|6 +- arch/arm/cpu/armv7/imx-common/timer.c |2 +- arch/arm/cpu/armv7/mx5/lowlevel_init.S | 46 +++--- arch/arm/cpu/armv7/mx5/soc.c | 39 + arch/arm/cpu/armv7/mx6/soc.c | 36 + arch/arm/include/asm/arch-mx25/gpio.h | 17 +- arch/arm/include/asm/arch-mx27/gpio.h | 55 +++ arch/arm/include/asm/arch-mx27/imx-regs.h | 33 ++-- arch/arm/include/asm/arch-mx