Re: [U-Boot] [PATCH 1/1] at91sam9/at91cap: fix CONFIG_SYS_HZ to 1000
Jean-Christophe PLAGNIOL-VILLARD a écrit : On 14:04 Mon 06 Apr , Eric BENARD wrote: Jean-Christophe PLAGNIOL-VILLARD a écrit : The timer has been rewrote with a precision at ~0,18% works fine on an 9260 and solves TFTP timeout problem. Thanks for the test btw: could you specify on wich boards? AT91SAM9260B based with NOR boot without bootstrap (like PM9261/P263). This board is not yet pushed to mainline. Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Please pull u-boot-ppc4xx
Hi Wolfgang, please pull a fix for ppc4xx: The following changes since commit f75a729b5c1434d5a5bbf453b1b699bf1c3ffbce: Wolfgang Denk (1): Merge branch 'master' of git://git.denx.de/u-boot-blackfin are available in the git repository at: git://www.denx.de/git/u-boot-ppc4xx.git master Stefan Roese (1): ppc4xx: Fixup chip-selects in dtb for NAND-booting Sequoia board/amcc/sequoia/sequoia.c | 58 - 1 files changed, 56 insertions(+), 2 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH u-boot git] CMD_UBI != MTD_PARTITIONS
On Monday 13 April 2009, David Brownell wrote: From: David Brownell dbrown...@users.sourceforge.net Fix dependency goofage: it should certainly be possible to have the partition support without bringing in UBI commands. Signed-off-by: David Brownell dbrown...@users.sourceforge.net Acked-by: Stefan Roese s...@denx.de Best regards, Stefan = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Ethernet receive issue in PPC440
On Friday 10 April 2009, prathika wrote: i am porting uboot in PowerPC 440. i tried using the ping command.i have connected my board to PC via cross cable. When i monitor on the PC side using Network Monitor, the PC receives the ARP request packet and the PC is replying with acknowledgement. I verified reading the receive status register in PPC, it shows there was FCS error and the EMAC rejects the received packet. Which 440 variant are you using? And which PHY (in which connection mode, MII, RGMII...)? Actually i enabled external loop back in PowerPC and made appropriate configuration in PPC and in the PHY chip.I have no issues in receiving the packet.things work absolutely fine. Are you doing an internal loopback test (using the loopback test mode of the EMAC, or such a test mode of the PHY) or are you using an real external loopback test, using an external RJ45 loopback connector? You might want to take a look at the 4xx POST ethernet driver and tests. It's possible to use internal and external loopback tests here (see CONFIG_SYS_POST_ETHER_EXT_LOOPBACK). but when it comes to peer to peer communication, i have problem.. should i doubt on my hardware?? Sure. If it's not working then it's always possible that such problems result from hardware issues. what can be the possibilities?? has anyone faced such an issue? I suggest you check your PHY and it's components. Sometimes a wrong resistor or capacitor can cause such or similar problems. Best regards, Stefan = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Question about M29W128G CFI QRY bug
Hi Richard, On Monday 13 April 2009, Richard Retanubun wrote: As a follow up, This hack seems to fix the issue. diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 631b969..d386143 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -1691,7 +1691,7 @@ static int __flash_detect_cfi (flash_info_t * info, struct cfi_qry *qry) the reset command in both Intel and AMD variants, in the hope that AMD flash roms ignore the Intel command. */ flash_write_cmd (info, 0, 0, AMD_CMD_RESET); - flash_write_cmd (info, 0, 0, FLASH_CMD_RESET); + //flash_write_cmd (info, 0, 0, FLASH_CMD_RESET); for (cfi_offset=0; cfi_offset sizeof(flash_offset_cfi) / sizeof(uint); I don't like it because removes support for the Intel command set, no? Looks like the hope is now dashed by the M29W128G. Let's quote the comment from the code above again for all users: /* We do not yet know what kind of commandset to use, so we issue the reset command in both Intel and AMD variants, in the hope that AMD flash roms ignore the Intel command. */ flash_write_cmd (info, 0, 0, AMD_CMD_RESET); flash_write_cmd (info, 0, 0, FLASH_CMD_RESET); Yes, you could be correct here. This 2nd RESET command seems to break M29W128G support. Any recommendation on how to proceed? How is this problem solved in the Linux MTD driver (referring to your first email and the link you posted there)? Did you take a look at the CONFIG_SYS_FLASH_CFI_AMD_RESET define? I suggest you give it a try and let me know if this helps. Best regards, Stefan = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH u-boot git] DaVinci now respects SKIP_LOWLEVEL_INIT
Dear David Brownell, In message 200904131617.55202.davi...@pacbell.net you wrote: COBJS= timer.o ether.o lxt972.o dp83848.o -SOBJS= lowlevel_init.o reset.o +SOBJS= reset.o + +ifndef CONFIG_SKIP_LOWLEVEL_INIT + SOBJS += lowlevel_init.o +endif Please don't do it like this. Please use the same style like everybody else. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Only a fool fights in a burning house. -- Kank the Klingon, Day of the Dove, stardate unknown ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Help!Some memory doesn't work on PPC405Ex based board!
Hi Sun, On Tuesday 14 April 2009, SunNeo wrote: My platform uses the MICRON MT47H256M8THN DDRII SDRAM and the DDRII SDRAM is soldered on the board. As I said, my board was similar with Kilauea evb, so I created my configuration header file from Kilauea's at U-Boot. In the configuration file, register value for the DDR SDRAM controller is defined. But I have removed DDR autocalibraton related configuration from the configuration file, do you think this will cause any issues? Yes, this could definitely cause some SDRAM related problems. But this is off-topic here. We should continue this discussion on the U-Boot mailing list instead (on CC). So please when you reply to this mail, remove the linuxppc-dev list from the recipients list. Best regards, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Zoom2 respin II
Soon I will be posting a rebase of omap3 zoom2 board with fixes and enhancements per comments. Tom Big changes. GPIO Interface Ported from gpio code from linux. Used in zoom2 debug_board and led code. Add documenation to doc/README.omap3 LED Interface Use existing status_led interface. Add blue led to color led's. Add documentation to doc/README.LED OMAP u-boot.lds Move this from board to cpu. Comments Dirk on 4/4 ... +static void zoom2_debug_board_detect (void) +{ +unsigned int val; +/* + * GPIO to query for debug board + * 158 db board query, bank 5, index 30 + */ +gpio_t *gpio5_base = (gpio_t *) OMAP34XX_GPIO5_BASE; + +val = __raw_readl (gpio5_base-datain); Is there any special reason why you use __raw_readl() instead of just readl() here? Looking at ARM's io.h, they seem to map to the same macro? Tom: New gpio interface is used, so this is hidden. BUT looking closely at interface and __raw_readl is still being used. This was kept because I wanted the keep code as close to kernel as possible. Dirk 4/4 I'm not sure if I overlooked it in one of the other patches, but if not: Do you like to update doc/README.omap3 Tom: Zoom2 information added to README.omap3 similar to other targets. Jean-Christophe Serial 4/2 COBJS:= zoom2.o \ -debug_board.o +debug_board.o \ +zoom2_serial.o it could be nice to disactivate it A : Suprising hard to do. Logic added to do this for LED. COBJS-${CONFIG_STATUS_LED} += led.o Doing something similar leaves the serial_* functions undefined. Defining a set of functions to be weak aliases for these functions does not work cleanly. +#include zoom2_serial.h + +int zoom2_debug_board_connected (void); please move to a header A : Moved to zoom2_serial.h +if (zoom2_debug_board_connected ()) { +NS16550_t com_port = (NS16550_t) base; +int baud_divisor = CONFIG_SYS_NS16550_CLK / 16 / +CONFIG_BAUDRATE; aligning it with CONFIG_SYS_NS16550_CLK could be nice please add an empty line A : Done +com_port-mcr = (MCR_DTR | MCR_RTS); +com_port-fcr = (FCR_FIFO_EN | FCR_RXSR | FCR_TXSR); +com_port-lcr = LCR_BKSE | LCR_8N1; +com_port-dll = baud_divisor 0xff; +com_port-dlm = (baud_divisor 8) 0xff; +com_port-lcr = LCR_8N1; clould you explain a fe more what you do here? A : Added a comment that this was generic setup code. +if (zoom2_debug_board_connected ()) { +NS16550_t port = (NS16550_t) base; + +if (c == '\n') +quad_putc_dev (base, '\r'); + +NS16550_putc (port, c); why not NS16550_putc ((NS16550_t) base, c); A : Done in all the port vs. base functions. void quad_setbrg_dev (unsigned long base) +{ +if (zoom2_debug_board_connected ()) { +NS16550_t port = (NS16550_t) base; + +int clock_divisor = CONFIG_SYS_NS16550_CLK / 16 / +CONFIG_BAUDRATE; + +NS16550_reinit (port, clock_divisor); why don't you use the same in in the imit? Tom: No good reason. I was using drivers/serial/serial.c as a guide and this is how it does it, with the clock_divisor function inlined. + +#define QUAD_BASE_0 SERIAL_TL16CP754C_BASE +#define QUAD_BASE_1 (SERIAL_TL16CP754C_BASE + 0x100) +#define QUAD_BASE_2 (SERIAL_TL16CP754C_BASE + 0x200) +#define QUAD_BASE_3 (SERIAL_TL16CP754C_BASE + 0x300) why not #define QUAD_BASE(x)(SERIAL_TL16CP754C_BASE + (x 8)) Tom: That would work too. I would prefer to keep it as is becuase the register base is less obscured. +#define QUAD_INIT(n) \ ^^^ white space please fix +int quad_init_##n(void) Tom: Done, converted +enable_gpmc_config(gpmc_config, + serial_cs_base, + SERIAL_TL16CP754C_BASE, + GPMC_SIZE_16M); +#endif it's board specific please move to board Tom: Done. -#ifdef CONFIG_OMAP +#if defined(CONFIG_OMAP) !defined(CONFIG_OMAP3_ZOOM2) a config could be better Tom: I do not use this code, the ifdef is because other omap's do. #define ONENAND_MAP0x2000/* OneNand addr */ /* (actual size small port) */ +#define SERIAL_TL16CP754C_BASE0x1000 /* Zoom2 Serial chip address */ it's not cpu specfic please move this to the serial driver Tom: Done, moved to zoom2_serial.h -#define CONFIG_CONS_INDEX3 -#define CONFIG_SYS_NS16550_COM3OMAP34XX_UART3 -#define CONFIG_SERIAL33/* UART3 */ is the removed serial will work on the zoom2? Tom: This, and the other UARTS, are internally
[U-Boot] [PATCH 01/10] ZOOM2 Add initial support for Zoom2
Zoom2 is a new board from Texas Instruments and LogicPD The logicpd web site is a good source for general information on this board. Please start looking here if the below links are broken. http://www.logicpd.com This is a pdf of the product http://www.logicpd.com/sites/default/files/1012659A_Zoom_OMAP34x-II_MDP_Brief.pdf This is the product description web page http://www.logicpd.com/products/development-kits/texas-instruments-zoom%E2%84%A2-omap34x-ii-mdp This patch provides a zoom2 base target by copying zoom1 and by making some obvious changes. To configure, run make omap3_zoom2_config Signed-off-by: Tom Rix tom@windriver.com --- MAINTAINERS |4 + MAKEALL |1 + Makefile |3 + board/omap3/common/Makefile |1 + board/omap3/zoom2/Makefile| 49 board/omap3/zoom2/config.mk | 33 ++ board/omap3/zoom2/u-boot.lds | 63 +++ board/omap3/zoom2/zoom2.c | 76 + board/omap3/zoom2/zoom2.h | 151 + doc/README.omap3 | 13 ++ include/configs/omap3_zoom2.h | 247 + 11 files changed, 641 insertions(+), 0 deletions(-) create mode 100644 board/omap3/zoom2/Makefile create mode 100644 board/omap3/zoom2/config.mk create mode 100644 board/omap3/zoom2/u-boot.lds create mode 100644 board/omap3/zoom2/zoom2.c create mode 100644 board/omap3/zoom2/zoom2.h create mode 100644 include/configs/omap3_zoom2.h diff --git a/MAINTAINERS b/MAINTAINERS index 03d59b9..c2a4e33 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -611,6 +611,10 @@ Stelian Pop stelian@leadtechdesign.com at91sam9263ek ARM926EJS (AT91SAM9263 SoC) at91sam9rlekARM926EJS (AT91SAM9RL SoC) +Tom Rix tom@windriver.com + + omap3_zoom2 ARM CORTEX-A8 (OMAP3xx SoC) + Stefan Roese s...@denx.de ixdpg425xscale diff --git a/MAKEALL b/MAKEALL index e4eb42b..c72e810 100755 --- a/MAKEALL +++ b/MAKEALL @@ -561,6 +561,7 @@ LIST_ARM_CORTEX_A8=\ omap3_evm \ omap3_pandora \ omap3_zoom1 \ + omap3_zoom2 \ # diff --git a/Makefile b/Makefile index e91c051..724ed51 100644 --- a/Makefile +++ b/Makefile @@ -2980,6 +2980,9 @@ omap3_pandora_config :unconfig omap3_zoom1_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 zoom1 omap3 omap3 +omap3_zoom2_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 zoom2 omap3 omap3 + # ## XScale Systems # diff --git a/board/omap3/common/Makefile b/board/omap3/common/Makefile index 7b892fa..b8a0b14 100644 --- a/board/omap3/common/Makefile +++ b/board/omap3/common/Makefile @@ -33,6 +33,7 @@ COBJS-$(CONFIG_OMAP3_BEAGLE) += power.o COBJS-$(CONFIG_OMAP3_OVERO) += power.o COBJS-$(CONFIG_OMAP3_PANDORA) += power.o COBJS-$(CONFIG_OMAP3_ZOOM1) += power.o +COBJS-$(CONFIG_OMAP3_ZOOM2) += power.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/board/omap3/zoom2/Makefile b/board/omap3/zoom2/Makefile new file mode 100644 index 000..088b8cb --- /dev/null +++ b/board/omap3/zoom2/Makefile @@ -0,0 +1,49 @@ +# +# (C) Copyright 2000, 2001, 2002 +# 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$(BOARD).a + +COBJS := zoom2.o + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB):$(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +clean: + rm -f $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/omap3/zoom2/config.mk b/board/omap3/zoom2/config.mk new
[U-Boot] [PATCH 02/10] OMAP3 Port kernel omap gpio interface.
Port the linux kernel's omap gpio interface to u-boot. The orignal source is in linux/arch/arm/plat-omap/gpio.c See doc/README.omap3 for instructions on use. Signed-off-by: Tom Rix tom@windriver.com --- cpu/arm_cortexa8/omap3/Makefile |2 +- cpu/arm_cortexa8/omap3/gpio.c | 177 + doc/README.omap3 | 32 +++ include/asm-arm/arch-omap3/gpio.h | 93 +++ 4 files changed, 303 insertions(+), 1 deletions(-) create mode 100644 cpu/arm_cortexa8/omap3/gpio.c create mode 100644 include/asm-arm/arch-omap3/gpio.h diff --git a/cpu/arm_cortexa8/omap3/Makefile b/cpu/arm_cortexa8/omap3/Makefile index b96b3dd..4fca556 100644 --- a/cpu/arm_cortexa8/omap3/Makefile +++ b/cpu/arm_cortexa8/omap3/Makefile @@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk LIB= $(obj)lib$(SOC).a SOBJS := lowlevel_init.o -COBJS := sys_info.o board.o clock.o interrupts.o mem.o syslib.o +COBJS := sys_info.o board.o clock.o gpio.o interrupts.o mem.o syslib.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) diff --git a/cpu/arm_cortexa8/omap3/gpio.c b/cpu/arm_cortexa8/omap3/gpio.c new file mode 100644 index 000..fefa1d7 --- /dev/null +++ b/cpu/arm_cortexa8/omap3/gpio.c @@ -0,0 +1,177 @@ +/* + * Copyright (c) 2009 Wind River Systems, Inc. + * Tom Rix tom@windriver.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 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 + * + * This work is derrived from the linux kernel source + * + * linux/arch/arm/plat-omap/gpio.c + * + * Support functions for OMAP GPIO + * + * Copyright (C) 2003-2005 Nokia Corporation + * Written by Juha Yrjölä juha.yrj...@nokia.com + */ +#include common.h +#include asm/arch/gpio.h +#include asm/io.h +#include asm/errno.h + +static struct gpio_bank gpio_bank_34xx[6] = { + { (void *)OMAP34XX_GPIO1_BASE, INT_34XX_GPIO_BANK1, IH_GPIO_BASE, METHOD_GPIO_24XX }, + { (void *)OMAP34XX_GPIO2_BASE, INT_34XX_GPIO_BANK2, IH_GPIO_BASE + 32, METHOD_GPIO_24XX }, + { (void *)OMAP34XX_GPIO3_BASE, INT_34XX_GPIO_BANK3, IH_GPIO_BASE + 64, METHOD_GPIO_24XX }, + { (void *)OMAP34XX_GPIO4_BASE, INT_34XX_GPIO_BANK4, IH_GPIO_BASE + 96, METHOD_GPIO_24XX }, + { (void *)OMAP34XX_GPIO5_BASE, INT_34XX_GPIO_BANK5, IH_GPIO_BASE + 128, METHOD_GPIO_24XX }, + { (void *)OMAP34XX_GPIO6_BASE, INT_34XX_GPIO_BANK6, IH_GPIO_BASE + 160, METHOD_GPIO_24XX }, +}; + +static struct gpio_bank *gpio_bank = gpio_bank_34xx[0]; + +static inline struct gpio_bank *get_gpio_bank(int gpio) +{ + return gpio_bank[gpio 5]; +} + +static inline int get_gpio_index(int gpio) +{ + return gpio 0x1f; +} + +static inline int gpio_valid(int gpio) +{ + if (gpio 0) + return -1; + if (gpio 192) + return 0; + return -1; +} + +static int check_gpio(int gpio) +{ + if (gpio_valid(gpio) 0) { + printf(ERROR : check_gpio: invalid GPIO %d\n, gpio); + return -1; + } + return 0; +} + +static void _set_gpio_direction(struct gpio_bank *bank, int gpio, int is_input) +{ + void *reg = bank-base; + u32 l; + + switch (bank-method) { + case METHOD_GPIO_24XX: + reg += OMAP24XX_GPIO_OE; + break; + default: + WARNON(1); + return; + } + l = __raw_readl(reg); + if (is_input) + l |= 1 gpio; + else + l = ~(1 gpio); + __raw_writel(l, reg); +} + +void omap_set_gpio_direction(int gpio, int is_input) +{ + struct gpio_bank *bank; + + if (check_gpio(gpio) 0) + return; + bank = get_gpio_bank(gpio); + _set_gpio_direction(bank, get_gpio_index(gpio), is_input); +} + +static void _set_gpio_dataout(struct gpio_bank *bank, int gpio, int enable) +{ + void *reg = bank-base; + u32 l = 0; + + switch (bank-method) { + case METHOD_GPIO_24XX: + if (enable) + reg += OMAP24XX_GPIO_SETDATAOUT; + else + reg += OMAP24XX_GPIO_CLEARDATAOUT; + l = 1 gpio; + break; + default: + printf(omap3-gpio unknown bank method %s %d\n, +
[U-Boot] [PATCH 03/10] ZOOM2 Add support for debug board detection.
The logicpd web site is a good source for general information on this board. Please start looking here if the below links are broken. http://www.logicpd.com This is a pdf of the product http://www.logicpd.com/sites/default/files/1012659A_Zoom_OMAP34x-II_MDP_Brief.pdf This is a pdf of the product quick start guide. The debug board is described here. http://support.logicpd.com/downloads/1165/ This is a wiki showing the debug board in use https://omapzoom.org/gf/project/omapzoom/wiki/?pagename=GettingStartedWithZoomII_AKA_OMAP34XII_MDP The zoom2 has an auxillary board that contains the serial, net, jtag and battery simulator. This change supports a runtime check if the debug board is connected. Signed-off-by: Tom Rix tom@windriver.com --- board/omap3/zoom2/Makefile |3 +- board/omap3/zoom2/debug_board.c | 58 +++ 2 files changed, 60 insertions(+), 1 deletions(-) create mode 100644 board/omap3/zoom2/debug_board.c diff --git a/board/omap3/zoom2/Makefile b/board/omap3/zoom2/Makefile index 088b8cb..b8fa5a7 100644 --- a/board/omap3/zoom2/Makefile +++ b/board/omap3/zoom2/Makefile @@ -25,7 +25,8 @@ include $(TOPDIR)/config.mk LIB= $(obj)lib$(BOARD).a -COBJS := zoom2.o +COBJS := zoom2.o \ + debug_board.o SRCS := $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) diff --git a/board/omap3/zoom2/debug_board.c b/board/omap3/zoom2/debug_board.c new file mode 100644 index 000..3c9 --- /dev/null +++ b/board/omap3/zoom2/debug_board.c @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2009 Wind River Systems, Inc. + * Tom Rix tom@windriver.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 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 common.h +#include asm/arch/cpu.h +#include asm/io.h +#include asm/arch/mux.h +#include asm/arch/gpio.h + +#define DEBUG_BOARD_CONNECTED 1 +#define DEBUG_BOARD_NOT_CONNECTED 0 + +static int debug_board_connected = DEBUG_BOARD_CONNECTED; + +static void zoom2_debug_board_detect (void) +{ + int val = 0; + if (!omap_request_gpio(158)) { + /* +* GPIO to query for debug board +* 158 db board query +*/ + omap_set_gpio_direction(158, 1); + val = omap_get_gpio_datain(158); + omap_free_gpio(158); + } + + if (!val) + debug_board_connected = DEBUG_BOARD_NOT_CONNECTED; +} + +int zoom2_debug_board_connected (void) +{ + static int first_time = 1; + + if (first_time) { + zoom2_debug_board_detect (); + first_time = 0; + } + return debug_board_connected; +} -- 1.6.0.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 04/10] ZOOM2 Add serial support.
Zoom2 serial is in general supplied by one of the 4 UARTS on the debug board. The default serial is from the USB connector on left side of the debug board. The USB connector will produce 2 of the 4 UARTS. On your host pick the first enumeration. The serial port set up is the same with Zoom1. Baud rate 115200, 8 bit data, no parity, 1 stop bit, no flow. The kernel bootargs are console=ttyS3,115200n8 Signed-off-by: Tom Rix tom@windriver.com --- board/omap3/zoom2/Makefile |3 +- board/omap3/zoom2/zoom2.c| 30 + board/omap3/zoom2/zoom2_serial.c | 130 ++ board/omap3/zoom2/zoom2_serial.h | 75 ++ common/serial.c |2 + drivers/serial/ns16550.c |4 +- include/configs/omap3_zoom2.h| 28 include/serial.h |7 ++ 8 files changed, 262 insertions(+), 17 deletions(-) create mode 100644 board/omap3/zoom2/zoom2_serial.c create mode 100644 board/omap3/zoom2/zoom2_serial.h diff --git a/board/omap3/zoom2/Makefile b/board/omap3/zoom2/Makefile index b8fa5a7..d27990c 100644 --- a/board/omap3/zoom2/Makefile +++ b/board/omap3/zoom2/Makefile @@ -26,7 +26,8 @@ include $(TOPDIR)/config.mk LIB= $(obj)lib$(BOARD).a COBJS := zoom2.o \ - debug_board.o + debug_board.o \ + zoom2_serial.o SRCS := $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) diff --git a/board/omap3/zoom2/zoom2.c b/board/omap3/zoom2/zoom2.c index 0700c56..a2a5b5a 100644 --- a/board/omap3/zoom2/zoom2.c +++ b/board/omap3/zoom2/zoom2.c @@ -30,10 +30,24 @@ */ #include common.h #include asm/io.h +#include asm/arch/mem.h #include asm/arch/mux.h #include asm/arch/sys_proto.h #include asm/mach-types.h #include zoom2.h +#include zoom2_serial.h + +extern void enable_gpmc_config(u32 *gpmc_config, gpmc_csx_t *gpmc_cs_base, + u32 base, u32 size); + +static u32 gpmc_serial_TL16CP754C[GPMC_MAX_REG] = { + 0x00011000, + 0x001F1F01, + 0x00080803, + 0x1D091D09, + 0x041D1F1F, + 0x1D0904C4, 0 +}; /* * Routine: board_init @@ -42,13 +56,29 @@ int board_init (void) { DECLARE_GLOBAL_DATA_PTR; + gpmc_csx_t *serial_cs_base; + u32 *gpmc_config; gpmc_init (); /* in SRAM or SDRAM, finish GPMC */ + + /* Configure console support on zoom2 */ + gpmc_config = gpmc_serial_TL16CP754C; + serial_cs_base = (gpmc_csx_t *) (GPMC_CONFIG_CS0_BASE + +(3 * GPMC_CONFIG_WIDTH)); + enable_gpmc_config(gpmc_config, + serial_cs_base, + SERIAL_TL16CP754C_BASE, + GPMC_SIZE_16M); + /* board id for Linux */ gd-bd-bi_arch_number = MACH_TYPE_OMAP_ZOOM2; /* boot param addr */ gd-bd-bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100); +#if defined(CONFIG_STATUS_LED) defined(STATUS_LED_BOOT) + status_led_set (STATUS_LED_BOOT, STATUS_LED_ON); +#endif + return 0; } diff --git a/board/omap3/zoom2/zoom2_serial.c b/board/omap3/zoom2/zoom2_serial.c new file mode 100644 index 000..5e24fe0 --- /dev/null +++ b/board/omap3/zoom2/zoom2_serial.c @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2009 Wind River Systems, Inc. + * Tom Rix tom@windriver.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 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 + * + * This file was adapted from cpu/mpc5xxx/serial.c + * + */ + +#include common.h +#include serial.h +#include ns16550.h +#include asm/arch/cpu.h +#include zoom2_serial.h + +int quad_init_dev (unsigned long base) +{ + /* +* The Quad UART is on the debug board. +* Check if the debug board is attached before using the UART +*/ + if (zoom2_debug_board_connected ()) { + NS16550_t com_port = (NS16550_t) base; + int baud_divisor = CONFIG_SYS_NS16550_CLK / 16 / + CONFIG_BAUDRATE; + + /* +* Zoom2 has a board specific initialization of its UART. +* This generic initialization has been copied from +* drivers/serial/ns16550.c. The macros have been expanded. +* +* Do the following instead of +
[U-Boot] [PATCH 06/10] LED Add documentation describing the status_led and colour led API.
This document describes the u-boot status LED API. This allows common u-boot commands to use a board's leds to provide status for activities like booting and downloading files. Signed-off-by: Tom Rix tom@windriver.com --- doc/README.LED | 78 1 files changed, 78 insertions(+), 0 deletions(-) create mode 100644 doc/README.LED diff --git a/doc/README.LED b/doc/README.LED new file mode 100644 index 000..1221177 --- /dev/null +++ b/doc/README.LED @@ -0,0 +1,78 @@ +Status LED + + +This README describes the status LED API. + +The API is defined by the include file include/status_led.h + +The first step is to define CONFIG_STATUS_LED in the board config file. + +If the LED support is only for a single board, define CONFIG_BOARD_SPECIFIC_LED +in the board config file. + +At a minimum, these macros must be defined at +STATUS_LED_BIT +STATUS_LED_STATE +STATUS_LED_PERIOD + +If there are multiple status LED's define +STATUS_LED_BITn +STATUS_LED_STATEn +STATUS_LED_PERIODn + +Where n can a integer 1 through 3. + +STATUS_LED_BIT is passed into the __led_* functions to identify which LED is +being acted on. As such, the value choose must be unique with with respect to +the other STATUS_LED_BIT's. Mapping the value to a physical LED is the +reponsiblity of the __led_* function. + +STATUS_LED_STATE is the initial state of the LED. It should be set to one of +these values: STATUS_LED_OFF or STATUS_LED_ON. + +STATUS_LED_PERIOD is how long is the LED blink period. This usually set to +(CONFIG_SYS_HZ / N) where N is the frequency of the blink. Typical values +range from 2 to 10. + +Some other LED macros + +STATUS_LED_BOOT is the LED to light when the board is booting. This must be a +valid STATUS_LED_BIT value. + +STATUS_LED_RED is the red LED. It is used signal errors. This must be a valid +STATUS_LED_BIT value. Other similar color LED's are STATUS_LED_YELLOW and +STATUS_LED_BLUE. + +These board must define these functions + +__led_init is called once to initialize the LED to STATUS_LED_STATE. One time +start up code should be placed here. + +__led_set is called to change the state of the LED. + +__led_toggle is called to toggle the current state of the LED. + +Colour LED + + +Colour LED's are at present only used by ARM. + +The functions names explain their purpose. + +coloured_LED_init +red_LED_on +red_LED_off +green_LED_on +green_LED_off +yellow_LED_on +yellow_LED_off +blue_LED_on +blue_LED_off + +These are weakly defined in lib_arm/board.c to noops. Where applicable, define +these functions in the board specific source. + +TBD : Describe older board dependent macros similar to what is done for +CONFIG_TQM8xxL. + +TBD : Describe general support via asm/status_led.h -- 1.6.0.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 05/10] ZOOM2: rename timer divisor
Divisor field is called PTV not PVT. This change is needed because of earlier OMAP commit 81472d893fa565c9d300928a40e504a689bde131 of the same name Signed-off-by: Tom Rix tom@windriver.com --- include/configs/omap3_zoom2.h |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/configs/omap3_zoom2.h b/include/configs/omap3_zoom2.h index 7c1bf65..8f09dd8 100644 --- a/include/configs/omap3_zoom2.h +++ b/include/configs/omap3_zoom2.h @@ -170,11 +170,9 @@ * 2430 has 12 GP timers, they can be driven by the SysClk (12/13/19.2) or by * 32KHz clk, or from external sig. This rate is divided by a local divisor. */ -#define V_PVT 7 - #define CONFIG_SYS_TIMERBASE (OMAP34XX_GPT2) -#define CONFIG_SYS_PVT V_PVT /* 2^(pvt+1) */ -#define CONFIG_SYS_HZ ((V_SCLK) / (2 CONFIG_SYS_PVT)) +#define CONFIG_SYS_PTV 7 /* 2^(PTV+1) */ +#define CONFIG_SYS_HZ ((V_SCLK) / (2 CONFIG_SYS_PTV)) /*--- * Stack sizes -- 1.6.0.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 07/10] ARM Add blue colour LED to status_led.
There is exiting support for red,yellow,green but no blue. The main LED on the zoom2 is a blue LED. Signed-off-by: Tom Rix tom@windriver.com --- include/status_led.h |4 lib_arm/board.c |4 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/include/status_led.h b/include/status_led.h index 175972a..9dbf01f 100644 --- a/include/status_led.h +++ b/include/status_led.h @@ -397,6 +397,8 @@ extern void green_LED_on(void); extern voidgreen_LED_off(void); extern voidyellow_LED_on(void); extern voidyellow_LED_off(void); +extern voidblue_LED_on(void); +extern voidblue_LED_off(void); #else .extern LED_init .extern red_LED_on @@ -405,6 +407,8 @@ extern void yellow_LED_off(void); .extern yellow_LED_off .extern green_LED_on .extern green_LED_off + .extern blue_LED_on + .extern blue_LED_off #endif #endif /* CONFIG_STATUS_LED*/ diff --git a/lib_arm/board.c b/lib_arm/board.c index 3dfaec0..9053697 100644 --- a/lib_arm/board.c +++ b/lib_arm/board.c @@ -136,6 +136,10 @@ void inline __yellow_LED_on(void) {} void inline yellow_LED_on(void)__attribute__((weak, alias(__yellow_LED_on))); void inline __yellow_LED_off(void) {} void inline yellow_LED_off(void)__attribute__((weak, alias(__yellow_LED_off))); +void inline __blue_LED_on(void) {} +void inline blue_LED_on(void)__attribute__((weak, alias(__blue_LED_on))); +void inline __blue_LED_off(void) {} +void inline blue_LED_off(void)__attribute__((weak, alias(__blue_LED_off))); / * Init Utilities * -- 1.6.0.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 08/10] ZOOM2 Add led support.
This patch controls the large LED on the top left of the zoom2. Signed-off-by: Tom Rix tom@windriver.com --- board/omap3/zoom2/Makefile|8 ++- board/omap3/zoom2/led.c | 125 + board/omap3/zoom2/zoom2.c |4 +- include/configs/omap3_zoom2.h | 16 + 4 files changed, 149 insertions(+), 4 deletions(-) create mode 100644 board/omap3/zoom2/led.c diff --git a/board/omap3/zoom2/Makefile b/board/omap3/zoom2/Makefile index d27990c..4a716da 100644 --- a/board/omap3/zoom2/Makefile +++ b/board/omap3/zoom2/Makefile @@ -25,10 +25,12 @@ include $(TOPDIR)/config.mk LIB= $(obj)lib$(BOARD).a -COBJS := zoom2.o \ - debug_board.o \ - zoom2_serial.o +COBJS-y := $(BOARD).o +COBJS-y += debug_board.o +COBJS-y += zoom2_serial.o +COBJS-${CONFIG_STATUS_LED} += led.o +COBJS := $(sort $(COBJS-y)) SRCS := $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) diff --git a/board/omap3/zoom2/led.c b/board/omap3/zoom2/led.c new file mode 100644 index 000..6f25eb7 --- /dev/null +++ b/board/omap3/zoom2/led.c @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2009 Wind River Systems, Inc. + * Tom Rix tom@windriver.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 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 common.h +#include status_led.h +#include asm/arch/cpu.h +#include asm/io.h +#include asm/arch/sys_proto.h +#include asm/arch/gpio.h + +static unsigned int saved_state[2] = {STATUS_LED_OFF, STATUS_LED_OFF}; + +/* + * GPIO LEDs + * 173 red + * 154 blue + * 61 blue2 + */ +void red_LED_off (void) +{ + /* red */ + if (!omap_request_gpio(173)) { + omap_set_gpio_direction(173, 0); + omap_set_gpio_dataout(173, 0); + } + saved_state[STATUS_LED_RED] = STATUS_LED_OFF; +} + +void blue_LED_off (void) +{ + /* blue */ + if (!omap_request_gpio(154)) { + omap_set_gpio_direction(154, 0); + omap_set_gpio_dataout(154, 0); + } + + /* blue 2 */ + if (!omap_request_gpio(61)) { + omap_set_gpio_direction(61, 0); + omap_set_gpio_dataout(64, 0); + } + saved_state[STATUS_LED_BLUE] = STATUS_LED_OFF; +} + +void red_LED_on (void) +{ + blue_LED_off (); + + /* red */ + if (!omap_request_gpio(173)) { + omap_set_gpio_direction(173, 0); + omap_set_gpio_dataout(173, 1); + } + saved_state[STATUS_LED_RED] = STATUS_LED_ON; +} + +void blue_LED_on (void) +{ + red_LED_off (); + + /* blue */ + if (!omap_request_gpio(154)) { + omap_set_gpio_direction(154, 0); + omap_set_gpio_dataout(154, 1); + } + + /* blue 2 */ + if (!omap_request_gpio(61)) { + omap_set_gpio_direction(61, 0); + omap_set_gpio_dataout(64, 1); + } + + saved_state[STATUS_LED_BLUE] = STATUS_LED_ON; +} + +void __led_init (led_id_t mask, int state) +{ + __led_set (mask, state); +} + +void __led_toggle (led_id_t mask) +{ + if (STATUS_LED_BLUE == mask) { + if (STATUS_LED_ON == saved_state[STATUS_LED_BLUE]) + blue_LED_off (); + else + blue_LED_on (); + } else if (STATUS_LED_RED == mask) { + if (STATUS_LED_ON == saved_state[STATUS_LED_RED]) + red_LED_off (); + else + red_LED_on (); + } +} + +void __led_set (led_id_t mask, int state) +{ + if (STATUS_LED_BLUE == mask) { + if (STATUS_LED_ON == state) + blue_LED_on (); + else + blue_LED_off (); + } else if (STATUS_LED_RED == mask) { + if (STATUS_LED_ON == state) + red_LED_on (); + else + red_LED_off (); + } +} diff --git a/board/omap3/zoom2/zoom2.c b/board/omap3/zoom2/zoom2.c index a2a5b5a..f58c8e6 100644 --- a/board/omap3/zoom2/zoom2.c +++ b/board/omap3/zoom2/zoom2.c @@ -29,6 +29,9 @@ * MA 02111-1307 USA */ #include common.h +#ifdef CONFIG_STATUS_LED +#include status_led.h +#endif #include asm/io.h #include asm/arch/mem.h #include asm/arch/mux.h @@ -78,7 +81,6 @@ int board_init (void) #if
[U-Boot] [PATCH 09/10] ZOOM1 Remove more legacy NAND defines.
These legacy NAND defines are no longer needed by this target. Signed-off-by: Tom Rix tom@windriver.com --- include/configs/omap3_zoom1.h | 13 - 1 files changed, 0 insertions(+), 13 deletions(-) diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h index 8e984b4..3d1ffbe 100644 --- a/include/configs/omap3_zoom1.h +++ b/include/configs/omap3_zoom1.h @@ -132,19 +132,6 @@ #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND */ /* devices */ -#define SECTORSIZE 512 - -#define NAND_ALLOW_ERASE_ALL -#define ADDR_COLUMN1 -#define ADDR_PAGE 2 -#define ADDR_COLUMN_PAGE 3 - -#define NAND_ChipID_UNKNOWN0x00 -#define NAND_MAX_FLOORS1 -#define NAND_MAX_CHIPS 1 -#define NAND_NO_RB 1 -#define CONFIG_SYS_NAND_WP - #define CONFIG_JFFS2_NAND /* nand device jffs2 lives on */ #define CONFIG_JFFS2_DEV nand0 -- 1.6.0.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 10/10] OMAP Consolidate common u-boot.lds to cpu layer.
The u-boot.lds file is common for all omap boards. Move a cleaned up version to the cpu layer and add makefile logic to use it. Signed-off-by: Tom Rix tom@windriver.com --- board/omap3/beagle/u-boot.lds | 63 - board/omap3/evm/u-boot.lds| 63 - board/omap3/overo/u-boot.lds | 63 - board/omap3/pandora/u-boot.lds| 63 - board/omap3/zoom1/u-boot.lds | 63 - board/omap3/zoom2/u-boot.lds | 63 - cpu/arm_cortexa8/omap3/config.mk |2 + cpu/arm_cortexa8/omap3/u-boot.lds | 58 ++ 8 files changed, 60 insertions(+), 378 deletions(-) delete mode 100644 board/omap3/beagle/u-boot.lds delete mode 100644 board/omap3/evm/u-boot.lds delete mode 100644 board/omap3/overo/u-boot.lds delete mode 100644 board/omap3/pandora/u-boot.lds delete mode 100644 board/omap3/zoom1/u-boot.lds delete mode 100644 board/omap3/zoom2/u-boot.lds create mode 100644 cpu/arm_cortexa8/omap3/u-boot.lds diff --git a/board/omap3/beagle/u-boot.lds b/board/omap3/beagle/u-boot.lds deleted file mode 100644 index 66a8925..000 --- a/board/omap3/beagle/u-boot.lds +++ /dev/null @@ -1,63 +0,0 @@ -/* - * January 2004 - Changed to support H4 device - * Copyright (c) 2004 Texas Instruments - * - * (C) Copyright 2002 - * Gary Jennejohn, DENX Software Engineering, g...@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 - */ - -OUTPUT_FORMAT(elf32-littlearm, elf32-littlearm, elf32-littlearm) -OUTPUT_ARCH(arm) -ENTRY(_start) -SECTIONS -{ - . = 0x; - - . = ALIGN(4); - .text : - { - cpu/arm_cortexa8/start.o(.text) - *(.text) - } - - . = ALIGN(4); - .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } - - .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } - __exidx_start = .; - .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } - __exidx_end = .; - - . = ALIGN(4); - .data : { *(.data) } - - . = ALIGN(4); - .got : { *(.got) } - - __u_boot_cmd_start = .; - .u_boot_cmd : { *(.u_boot_cmd) } - __u_boot_cmd_end = .; - - . = ALIGN(4); - __bss_start = .; - .bss : { *(.bss) } - _end = .; -} diff --git a/board/omap3/evm/u-boot.lds b/board/omap3/evm/u-boot.lds deleted file mode 100644 index 66a8925..000 --- a/board/omap3/evm/u-boot.lds +++ /dev/null @@ -1,63 +0,0 @@ -/* - * January 2004 - Changed to support H4 device - * Copyright (c) 2004 Texas Instruments - * - * (C) Copyright 2002 - * Gary Jennejohn, DENX Software Engineering, g...@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 - */ - -OUTPUT_FORMAT(elf32-littlearm, elf32-littlearm, elf32-littlearm) -OUTPUT_ARCH(arm) -ENTRY(_start) -SECTIONS -{ - . = 0x; - - . = ALIGN(4); - .text : - { - cpu/arm_cortexa8/start.o(.text) - *(.text) - } - - . = ALIGN(4); - .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } - - .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } - __exidx_start = .; - .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } - __exidx_end = .; - - .
Re: [U-Boot] [PATCH v3] Marvell MV88E61XX Switch Driver support
Dear Jean, Thanks for your comments Please see my inlined reply From: Jean-Christophe PLAGNIOL-VILLARD [plagn...@jcrosoft.com] Sent: Tuesday, April 14, 2009 3:49 AM To: Prafulla Wadaskar Cc: u-boot@lists.denx.de; Ashish Karkare; Ronen Shitrit Subject: Re: [U-Boot] [PATCH v3] Marvell MV88E61XX Switch Driver support On 22:31 Thu 09 Apr , Prafulla Wadaskar wrote: Chips supported:- 1. 88E6161 6 port gbe swtich with 5 integrated PHYs 2. 88E6165 6 port gbe swtich with 5 integrated PHYs 2. 88E6132 3 port gbe swtich with 2 integrated PHYs Note: This driver is supported and tested against kirkwood egiga interface Contributors: Yotam Admon yo...@marvell.com Michael Blostein michae...@marvell.com Reviewed by: Ronen Shitrit rshit...@marvell.com Signed-off-by: Prafulla Wadaskar prafu...@marvell.com --- Changelog:- v2: updated as per review comments for v1 removed other two drivers form earlier patch debug_prints removed driver moved to drivers/net/ v3: updated as per review comments for v2 miiphy interface used, platform specific dependency resolved Chip id detection and printing added common code forked out some cosmetic and magic number fixes drivers/net/Makefile|1 + drivers/net/mv88e61xx.c | 299 +++ the m88e61xx is a switch so have it in drivers/net/phy could make more sense Prafulla: This driver represents the mv88e61xx chips which uses miiphy interface provided externally so I think drivers/net/ it correct place for it. drivers/net/phy/ generally has phy read/write modules code like bitbang mii interface. 2 files changed, 300 insertions(+), 0 deletions(-) create mode 100644 drivers/net/mv88e61xx.c diff --git a/drivers/net/Makefile b/drivers/net/Makefile index f0c5654..9e8787c 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -47,6 +47,7 @@ COBJS-$(CONFIG_MACB) += macb.o COBJS-$(CONFIG_MCFFEC) += mcffec.o mcfmii.o COBJS-$(CONFIG_MPC5xxx_FEC) += mpc5xxx_fec.o COBJS-$(CONFIG_MPC512x_FEC) += mpc512x_fec.o +COBJS-$(CONFIG_MV88E61XX_SWITCH) += mv88e61xx.o COBJS-$(CONFIG_NATSEMI) += natsemi.o COBJS-$(CONFIG_DRIVER_NE2000) += ne2000.o ne2000_base.o COBJS-$(CONFIG_DRIVER_AX88796L) += ax88796.o ne2000_base.o diff --git a/drivers/net/mv88e61xx.c b/drivers/net/mv88e61xx.c new file mode 100644 index 000..31a6fa6 --- /dev/null +++ b/drivers/net/mv88e61xx.c @@ -0,0 +1,299 @@ +/* + * (C) Copyright 2009 + * Marvell Semiconductor www.marvell.com + * Prafulla Wadaskar prafu...@marvell.com + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +#include common.h +#include miiphy.h + +/* Enabled ports can be enabled in board header file */ +#if defined (CONFIG_MV88E61XX_ENABLED_PORTS) +#define MV88E61XX_ENABLED_PORTS CONFIG_MV88E61XX_ENABLED_PORTS +#else +#define MV88E61XX_ENABLED_PORTS (BIT0 | BIT1 | BIT2 | \ + BIT3 | BIT4 | BIT5) please avoid this BITx macrot Prafulla: OK, I will hardcode this value, but in my view it looks better (readable) using these macros provided those are available on other platforms, mostly it should be, how about renaming them as PORTx ? +#endif + +#define MV88E61XX_PHY_TIMEOUT10 +#define MV88E61XX_MAX_PORTS_NUM 0x6 + +/* CPU port can be configured in board header file */ +#if defined (CONFIG_MV88E61XX_CPU_PORT) +#define MV88E61XX_CPU_PORT CONFIG_MV88E61XX_CPU_PORT +#else +#define MV88E61XX_CPU_PORT 0x5 +#endif this cpu port is normally configured by latch resistor you may could detect it Prafulla: There are two ports on 6165/6161 and one port on 6123 which can be used for CPU interface, this is decided by board h/w. we offer this configuration to board header file, default value is port5 Prafulla: I could not find latch register in the switch documentation, can you pls explain this? + +#define MV88E61XX_PRT_STS_REG0x1 +#define MV88E61XX_PRT_CTRL_REG 0x4 +#define MV88E61XX_PRT_VMAP_REG 0x6 +#define MV88E61XX_PRT_VID_REG0x7 + +#define MV88E61XX_PRT_OFST
[U-Boot] Compiler error with BUILD_DIR
Hello, I'am getting an compiler error if I use a seperate BUILD_DIR: /home/gl/swserver/work/LINUX/ELINOS_PROJECTS/ELINOS_50/demoF302P/src/u-boot/build/tools/fdt.c:81: error: conflicting types for âfdt_offset_ptrâ /usr/include/../include/libfdt.h:125: error: previous declaration of âfdt_offset_ptrâ was here because I have installed a different version of the dtc. If I build u-boot without a seperate BUILD_DIR, I get no error. I'am using u-boot-2009.03. Thanks for any help Günter ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Compiler error with BUILD_DIR
Dear Günter, In message d0b748ccd5df144ca5c56a9d860a31341de...@men-exch1.intra.men.de you wrote: Hello, I'am getting an compiler error if I use a seperate BUILD_DIR: /home/gl/swserver/work/LINUX/ELINOS_PROJECTS/ELINOS_50/demoF302P/src/u-boot /build/tools/fdt.c:81: error: conflicting types for âfdt_offset_ptrâ /usr/include/../include/libfdt.h:125: error: previous declaration of âfdt _offset_ptrâ was here because I have installed a different version of the dtc. Which boared configuration is this? If I build u-boot without a seperate BUILD_DIR, I get no error. I'am using u-boot-2009.03. And what about the current top of tree? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Faith: not *wanting* to know what is true.- Friedrich Nietzsche ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] UBIFS: fix recovery bug
From: Adrian Hunter adrian.hun...@nokia.com UBIFS did not recovery in a situation in which it could have. The relevant function assumed there could not be more nodes in an eraseblock after a corrupted node, but in fact the last (NAND) page written might contain anything. The correct approach is to check for empty space (0xFF bytes) from then on. Signed-off-by: Adrian Hunter adrian.hun...@nokia.com Signed-off-by: Stefan Roese s...@denx.de --- fs/ubifs/recovery.c | 70 -- 1 files changed, 23 insertions(+), 47 deletions(-) diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c index fe3b364..7444650 100644 --- a/fs/ubifs/recovery.c +++ b/fs/ubifs/recovery.c @@ -418,59 +418,35 @@ static void clean_buf(const struct ubifs_info *c, void **buf, int lnum, * @lnum: LEB number of the LEB from which @buf was read * @offs: offset from which @buf was read * - * This function scans @buf for more nodes and returns %0 is a node is found and - * %1 if no more nodes are found. + * This function ensures that the corrupted node at @offs is the last thing + * written to a LEB. This function returns %1 if more data is not found and + * %0 if more data is found. */ static int no_more_nodes(const struct ubifs_info *c, void *buf, int len, int lnum, int offs) { - int skip, next_offs = 0; + struct ubifs_ch *ch = buf; + int skip, dlen = le32_to_cpu(ch-len); - if (len UBIFS_DATA_NODE_SZ) { - struct ubifs_ch *ch = buf; - int dlen = le32_to_cpu(ch-len); - - if (ch-node_type == UBIFS_DATA_NODE dlen = UBIFS_CH_SZ - dlen = UBIFS_MAX_DATA_NODE_SZ) - /* The corrupt node looks like a data node */ - next_offs = ALIGN(offs + dlen, 8); - } - - if (c-min_io_size == 1) - skip = 8; - else - skip = ALIGN(offs + 1, c-min_io_size) - offs; - - offs += skip; - buf += skip; - len -= skip; - while (len 8) { - struct ubifs_ch *ch = buf; - uint32_t magic = le32_to_cpu(ch-magic); - int ret; - - if (magic == UBIFS_NODE_MAGIC) { - ret = ubifs_scan_a_node(c, buf, len, lnum, offs, 1); - if (ret == SCANNED_A_NODE || ret 0) { - /* -* There is a small chance this is just data in -* a data node, so check that possibility. e.g. -* this is part of a file that itself contains -* a UBIFS image. -*/ - if (next_offs offs + le32_to_cpu(ch-len) = - next_offs) - continue; - dbg_rcvry(unexpected node at %d:%d, lnum, - offs); - return 0; - } - } - offs += 8; - buf += 8; - len -= 8; + /* Check for empty space after the corrupt node's common header */ + skip = ALIGN(offs + UBIFS_CH_SZ, c-min_io_size) - offs; + if (is_empty(buf + skip, len - skip)) + return 1; + /* +* The area after the common header size is not empty, so the common +* header must be intact. Check it. +*/ + if (ubifs_check_node(c, buf, lnum, offs, 1, 0) != -EUCLEAN) { + dbg_rcvry(unexpected bad common header at %d:%d, lnum, offs); + return 0; } - return 1; + /* Now we know the corrupt node's length we can skip over it */ + skip = ALIGN(offs + dlen, c-min_io_size) - offs; + /* After which there should be empty space */ + if (is_empty(buf + skip, len - skip)) + return 1; + dbg_rcvry(unexpected data at %d:%d, lnum, offs + skip); + return 0; } /** -- 1.6.2.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] UBIFS: Remove tnc_commit.c which is not used in the read-only version
I missed removing this file while implementing the UBIFS support. It's not referenced at all, so let's remove it. Thanks to Artem Bityutskiy for spotting. Signed-off-by: Stefan Roese s...@denx.de --- fs/ubifs/tnc_commit.c | 1102 - 1 files changed, 0 insertions(+), 1102 deletions(-) delete mode 100644 fs/ubifs/tnc_commit.c diff --git a/fs/ubifs/tnc_commit.c b/fs/ubifs/tnc_commit.c deleted file mode 100644 index 8ac76b1..000 --- a/fs/ubifs/tnc_commit.c +++ /dev/null @@ -1,1102 +0,0 @@ -/* - * This file is part of UBIFS. - * - * Copyright (C) 2006-2008 Nokia Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 as published by - * the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Authors: Adrian Hunter - * Artem Bityutskiy (ÐиÑÑÑкий ÐÑÑÑм) - */ - -/* This file implements TNC functions for committing */ - -#include ubifs.h - -/** - * make_idx_node - make an index node for fill-the-gaps method of TNC commit. - * @c: UBIFS file-system description object - * @idx: buffer in which to place new index node - * @znode: znode from which to make new index node - * @lnum: LEB number where new index node will be written - * @offs: offset where new index node will be written - * @len: length of new index node - */ -static int make_idx_node(struct ubifs_info *c, struct ubifs_idx_node *idx, -struct ubifs_znode *znode, int lnum, int offs, int len) -{ - struct ubifs_znode *zp; - int i, err; - - /* Make index node */ - idx-ch.node_type = UBIFS_IDX_NODE; - idx-child_cnt = cpu_to_le16(znode-child_cnt); - idx-level = cpu_to_le16(znode-level); - for (i = 0; i znode-child_cnt; i++) { - struct ubifs_branch *br = ubifs_idx_branch(c, idx, i); - struct ubifs_zbranch *zbr = znode-zbranch[i]; - - key_write_idx(c, zbr-key, br-key); - br-lnum = cpu_to_le32(zbr-lnum); - br-offs = cpu_to_le32(zbr-offs); - br-len = cpu_to_le32(zbr-len); - if (!zbr-lnum || !zbr-len) { - ubifs_err(bad ref in znode); - dbg_dump_znode(c, znode); - if (zbr-znode) - dbg_dump_znode(c, zbr-znode); - } - } - ubifs_prepare_node(c, idx, len, 0); - -#ifdef CONFIG_UBIFS_FS_DEBUG - znode-lnum = lnum; - znode-offs = offs; - znode-len = len; -#endif - - err = insert_old_idx_znode(c, znode); - - /* Update the parent */ - zp = znode-parent; - if (zp) { - struct ubifs_zbranch *zbr; - - zbr = zp-zbranch[znode-iip]; - zbr-lnum = lnum; - zbr-offs = offs; - zbr-len = len; - } else { - c-zroot.lnum = lnum; - c-zroot.offs = offs; - c-zroot.len = len; - } - c-calc_idx_sz += ALIGN(len, 8); - - atomic_long_dec(c-dirty_zn_cnt); - - ubifs_assert(ubifs_zn_dirty(znode)); - ubifs_assert(test_bit(COW_ZNODE, znode-flags)); - - __clear_bit(DIRTY_ZNODE, znode-flags); - __clear_bit(COW_ZNODE, znode-flags); - - return err; -} - -/** - * fill_gap - make index nodes in gaps in dirty index LEBs. - * @c: UBIFS file-system description object - * @lnum: LEB number that gap appears in - * @gap_start: offset of start of gap - * @gap_end: offset of end of gap - * @dirt: adds dirty space to this - * - * This function returns the number of index nodes written into the gap. - */ -static int fill_gap(struct ubifs_info *c, int lnum, int gap_start, int gap_end, - int *dirt) -{ - int len, gap_remains, gap_pos, written, pad_len; - - ubifs_assert((gap_start 7) == 0); - ubifs_assert((gap_end 7) == 0); - ubifs_assert(gap_end = gap_start); - - gap_remains = gap_end - gap_start; - if (!gap_remains) - return 0; - gap_pos = gap_start; - written = 0; - while (c-enext) { - len = ubifs_idx_node_sz(c, c-enext-child_cnt); - if (len gap_remains) { - struct ubifs_znode *znode = c-enext; - const int alen = ALIGN(len, 8); - int err; - - ubifs_assert(alen = gap_remains); - err = make_idx_node(c,
Re: [U-Boot] [PATCH u-boot git] DaVinci now respects SKIP_LOWLEVEL_INIT
On Tuesday 14 April 2009, Wolfgang Denk wrote: Please don't do it like this. Please use the same style like everybody else. Having to guess .. you mean don't indent? == CUT HERE From: David Brownell dbrown...@users.sourceforge.net Don't needlessly include lowlevel init code; that's only really needed with boot-from NOR (not boot-from-NAND). The 2nd stage loader (UBL) handles that before it loads U-Boot. Signed-off-by: David Brownell dbrown...@users.sourceforge.net --- cpu/arm926ejs/davinci/Makefile |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/cpu/arm926ejs/davinci/Makefile +++ b/cpu/arm926ejs/davinci/Makefile @@ -28,7 +28,11 @@ include $(TOPDIR)/config.mk LIB= $(obj)lib$(SOC).a COBJS = timer.o ether.o lxt972.o dp83848.o -SOBJS = lowlevel_init.o reset.o +SOBJS = reset.o + +ifndef CONFIG_SKIP_LOWLEVEL_INIT +SOBJS += lowlevel_init.o +endif SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH u-boot git] DaVinci now respects SKIP_LOWLEVEL_INIT
Hi 2009/4/14 David Brownell davi...@pacbell.net: On Tuesday 14 April 2009, Wolfgang Denk wrote: Please don't do it like this. Please use the same style like everybody else. Having to guess .. you mean don't indent? == CUT HERE From: David Brownell dbrown...@users.sourceforge.net Don't needlessly include lowlevel init code; that's only really needed with boot-from NOR (not boot-from-NAND). The 2nd stage loader (UBL) handles that before it loads U-Boot. Signed-off-by: David Brownell dbrown...@users.sourceforge.net --- cpu/arm926ejs/davinci/Makefile | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/cpu/arm926ejs/davinci/Makefile +++ b/cpu/arm926ejs/davinci/Makefile @@ -28,7 +28,11 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).a COBJS = timer.o ether.o lxt972.o dp83848.o -SOBJS = lowlevel_init.o reset.o +SOBJS = reset.o + +ifndef CONFIG_SKIP_LOWLEVEL_INIT +SOBJS += lowlevel_init.o +endif I was about to suggest that they were hinting at something like: SOBJS-$(CONFIG_SKIP_LOWLEVEL_INIT) += lowlevel_init.o But then I realized that lowlevel_init.o should be omitted if SKIP_LOWLEVEL.. is defined, and I don't know how to do that. Regards, Magnus ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] Marvell MV88F6281GTW_GE Board support
Hi all, This is much cleaner and smaller patch. Any comments or acceptance or flag to resend are welcomed. Regards.. Prafulla . . -Original Message- From: Prafulla Wadaskar [mailto:prafu...@marvell.com] Sent: Wednesday, April 08, 2009 9:48 PM To: u-boot@lists.denx.de Cc: Ronen Shitrit; Ashish Karkare; Prafulla Wadaskar Subject: [PATCH v2] Marvell MV88F6281GTW_GE Board support From: prafulla_wadaskar prafu...@marvell.com This is Marvell's 88F6281_A0 based custom board developed for wireless access point product This patch is tested for- 1. Boot from DRAM/SPI flash/NFS 2. File transfer using tftp and loadb 3. SPI flash read/write/erase 4. Booting Linux kernel and RFS from SPI flash Note: doImage utility needed to convert u-boot.bin to u-boot-spiflash.bin, DRAM configuration will be part of this utility Reviewed-by: Ronen Shitrit rshit...@marvell.com Signed-off-by: Prafulla Wadaskar prafu...@marvell.com --- Changelog v2: updated as per first review comments by Wolfgang Denk debug_prints updated to debug MAKEALL |1 + Makefile|3 + board/Marvell/mv88f6281gtw_ge/Makefile | 52 +++ board/Marvell/mv88f6281gtw_ge/config.mk | 25 +++ board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c | 118 ++ board/Marvell/mv88f6281gtw_ge/u-boot.lds| 53 +++ include/configs/mv88f6281gtw_ge.h | 185 +++ 7 files changed, 437 insertions(+), 0 deletions(-) create mode 100644 board/Marvell/mv88f6281gtw_ge/Makefile create mode 100644 board/Marvell/mv88f6281gtw_ge/config.mk create mode 100644 board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c create mode 100644 board/Marvell/mv88f6281gtw_ge/u-boot.lds create mode 100644 include/configs/mv88f6281gtw_ge.h diff --git a/MAKEALL b/MAKEALL index e4eb42b..1caf81d 100755 --- a/MAKEALL +++ b/MAKEALL @@ -504,6 +504,7 @@ LIST_ARM9= \ cp946es \ cp966 \ lpd7a400\ + mv88f6281gtw_ge \ mx1ads \ mx1fs2 \ netstar \ diff --git a/Makefile b/Makefile index d2c7c3f..709e4be 100644 --- a/Makefile +++ b/Makefile @@ -2792,6 +2792,9 @@ lpd7a400_config \ lpd7a404_config: unconfig @$(MKCONFIG) $(@:_config=) arm lh7a40x lpd7a40x +mv88f6281gtw_ge_config: unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs $(@:_config=) Marvell kirkwood + mx1ads_config: unconfig @$(MKCONFIG) $(@:_config=) arm arm920t mx1ads NULL imx diff --git a/board/Marvell/mv88f6281gtw_ge/Makefile b/board/Marvell/mv88f6281gtw_ge/Makefile new file mode 100644 index 000..1b8cc6f --- /dev/null +++ b/board/Marvell/mv88f6281gtw_ge/Makefile @@ -0,0 +1,52 @@ +# +# (C) Copyright 2009 +# Marvell Semiconductor www.marvell.com +# Prafulla Wadaskar prafu...@marvell.com +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).a + +COBJS:= mv88f6281gtw_ge.o +COBJS+= ../common/mv88e61xx.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS:= $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak .depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/Marvell/mv88f6281gtw_ge/config.mk b/board/Marvell/mv88f6281gtw_ge/config.mk new file mode 100644 index 000..fb29a1b --- /dev/null +++ b/board/Marvell/mv88f6281gtw_ge/config.mk @@ -0,0 +1,25 @@ +# +# (C) Copyright 2009 +# Marvell Semiconductor www.marvell.com +# Prafulla Wadaskar prafu...@marvell.com +# +# See file CREDITS for list of people who contributed to this
[U-Boot] [PATCH v2] OMAP3: Remove legacy NAND defines
Remove remaining legacy NAND defines for Beagle, EVM, Overo and Pandora. Signed-off-by: Dirk Behme dirk.be...@googlemail.com --- For Zoom1 it was already removed by http://lists.denx.de/pipermail/u-boot/2009-April/050150.html http://lists.denx.de/pipermail/u-boot/2009-April/050871.html Changes in v2: - Remove even more legacy NAND defines. Thanks to Tom Rix for the hint. This version v2 makes all previous versions of this patch obsolete. include/configs/omap3_beagle.h | 29 - include/configs/omap3_evm.h | 29 - include/configs/omap3_overo.h | 30 -- include/configs/omap3_pandora.h | 29 - 4 files changed, 117 deletions(-) Index: u-boot-main/include/configs/omap3_beagle.h === --- u-boot-main.orig/include/configs/omap3_beagle.h +++ u-boot-main/include/configs/omap3_beagle.h @@ -135,18 +135,6 @@ #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND */ /* devices */ -#define SECTORSIZE 512 - -#define NAND_ALLOW_ERASE_ALL -#define ADDR_COLUMN1 -#define ADDR_PAGE 2 -#define ADDR_COLUMN_PAGE 3 - -#define NAND_ChipID_UNKNOWN0x00 -#define NAND_MAX_FLOORS1 -#define NAND_MAX_CHIPS 1 -#define NAND_NO_RB 1 -#define CONFIG_SYS_NAND_WP #define CONFIG_JFFS2_NAND /* nand device jffs2 lives on */ @@ -306,21 +294,4 @@ extern unsigned int boot_flash_sec; extern unsigned int boot_flash_type; #endif - -#define WRITE_NAND_COMMAND(d, adr)\ - writel(d, nand_cs_base-nand_cmd) -#define WRITE_NAND_ADDRESS(d, adr)\ - writel(d, nand_cs_base-nand_adr) -#define WRITE_NAND(d, adr) writew(d, nand_cs_base-nand_dat) -#define READ_NAND(adr) readl(nand_cs_base-nand_dat) - -/* Other NAND Access APIs */ -#define NAND_WP_OFF() do {readl(gpmc_cfg_base-config) |= GPMC_CONFIG_WP; } \ - while (0) -#define NAND_WP_ON() do {readl(gpmc_cfg_base-config) = ~GPMC_CONFIG_WP; } \ - while (0) -#define NAND_DISABLE_CE(nand) -#define NAND_ENABLE_CE(nand) -#define NAND_WAIT_READY(nand) udelay(10) - #endif /* __CONFIG_H */ Index: u-boot-main/include/configs/omap3_evm.h === --- u-boot-main.orig/include/configs/omap3_evm.h +++ u-boot-main/include/configs/omap3_evm.h @@ -133,18 +133,6 @@ #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */ /* NAND devices */ -#define SECTORSIZE 512 - -#define NAND_ALLOW_ERASE_ALL -#define ADDR_COLUMN1 -#define ADDR_PAGE 2 -#define ADDR_COLUMN_PAGE 3 - -#define NAND_ChipID_UNKNOWN0x00 -#define NAND_MAX_FLOORS1 -#define NAND_MAX_CHIPS 1 -#define NAND_NO_RB 1 -#define CONFIG_SYS_NAND_WP #define CONFIG_JFFS2_NAND /* nand device jffs2 lives on */ @@ -299,23 +287,6 @@ extern unsigned int boot_flash_sec; extern unsigned int boot_flash_type; #endif - -#define WRITE_NAND_COMMAND(d, adr)\ - writel(d, nand_cs_base-nand_cmd) -#define WRITE_NAND_ADDRESS(d, adr)\ - writel(d, nand_cs_base-nand_adr) -#define WRITE_NAND(d, adr) writew(d, nand_cs_base-nand_dat) -#define READ_NAND(adr) readl(nand_cs_base-nand_dat) - -/* Other NAND Access APIs */ -#define NAND_WP_OFF() do {readl(gpmc_cfg_base-config) |= GPMC_CONFIG_WP; } \ - while (0) -#define NAND_WP_ON() do {readl(gpmc_cfg_base-config) = ~GPMC_CONFIG_WP; } \ - while (0) -#define NAND_DISABLE_CE(nand) -#define NAND_ENABLE_CE(nand) -#define NAND_WAIT_READY(nand) udelay(10) - /* * SMSC9115 Ethernet from SMSC9118 family * Index: u-boot-main/include/configs/omap3_overo.h === --- u-boot-main.orig/include/configs/omap3_overo.h +++ u-boot-main/include/configs/omap3_overo.h @@ -122,19 +122,6 @@ #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND */ /* devices */ -#define SECTORSIZE 512 - -#define NAND_ALLOW_ERASE_ALL -#define ADDR_COLUMN1 -#define ADDR_PAGE 2 -#define ADDR_COLUMN_PAGE 3 - -#define NAND_ChipID_UNKNOWN0x00 -#define NAND_MAX_FLOORS1 -#define NAND_MAX_CHIPS 1 -#define NAND_NO_RB
Re: [U-Boot] Uboot md crash on PDK
Thanks! But should a crash happen if i am trying to read a non-reserved memory which 0x10 is. Can you tell me how do you choose a address in CSDO RAM to be appropiate for loading uImage and execute it. -Alfred. On Mon, Apr 13, 2009 at 12:24 PM, Magnus Lilja lilja.mag...@gmail.com wrote: 2009/4/13 alfred steele alfred.jaq...@gmail.com: Hi Magnus, For that matter, I can dump memory between 0x and 0x0100 though. However memory dump at 0x10 also fails. Can you point out which pages in the Reference manual point to the same? Chapter 2-1 Memory map. in MCIMX31RM Reference Manual. Regards, Magnus ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Uboot md crash on PDK
2009/4/14 alfred steele alfred.jaq...@gmail.com: Thanks! But should a crash happen if i am trying to read a non-reserved memory which 0x10 is. That's up to the hardware (i.e. i.MX31), I don't know the details but crashing seems perfectly fine with me (or generating a data abort interrupt). Can you tell me how do you choose a address in CSDO RAM to be appropiate for loading uImage and execute it. Any address within the range of the mounted RAM is fine, as long as you don't load it to where U-boot is residing in RAM, also avoid loading it to where the kernel parameters are passed. And could you please stop top-posting. Best regards, Magnus -Alfred. On Mon, Apr 13, 2009 at 12:24 PM, Magnus Lilja lilja.mag...@gmail.com wrote: 2009/4/13 alfred steele alfred.jaq...@gmail.com: Hi Magnus, For that matter, I can dump memory between 0x and 0x0100 though. However memory dump at 0x10 also fails. Can you point out which pages in the Reference manual point to the same? Chapter 2-1 Memory map. in MCIMX31RM Reference Manual. Regards, Magnus ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Uboot md crash on PDK
Thanks. Apologies for top posting. -Alfred. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Add feature-removal-schedule.txt
+What:Individual I2C commands +When:April 2009 +Why: Per the U-Boot README, individual I2C commands such as imd, imm, + imw, etc are deprecated. The single i2c command which is + currently enabled via CONFIG_I2C_CMD_TREE contains the same + functionality as the individual I2C commands. The individual + I2C commands should be removed as well as any references to + CONFIG_I2C_CMD_TREE. +Who: Peter Tyser pty...@xes-inc.com Would people prefer there be a period of time where both the individual i2c commands as well the single i2c command are both supported for boards without CONFIG_I2C_CMD_TREE? If so, I'd add some deprecation messages to the individual commands. Its a little PITA to add a DEPRECATED message to all the old style commands as they are also called by the newer i2c command, so just wanted to check before submitting a patch. Thanks, Peter ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Question about M29W128G CFI QRY bug
Hi Stefan, Did you take a look at the CONFIG_SYS_FLASH_CFI_AMD_RESET define? I suggest you give it a try and let me know if this helps. This does help but for the wrong reason: #ifdef CONFIG_SYS_FLASH_CFI_AMD_RESET /* needed for STM_ID_29W320DB on UC100 */ # undef FLASH_CMD_RESET # define FLASH_CMD_RESETAMD_CMD_RESET /* use AMD-Reset instead */ #endif This just makes the reset code send two AMD_CMD_RESET. How is this problem solved in the Linux MTD driver (referring to your first email and the link you posted there)? The Linux way, it is addressed with this patch == http://lists.infradead.org/pipermail/linux-mtd/2008-August/022499.html Which does this: static int __xipram cfi_probe_chip(struct map_info *map, __u32 base, unsigned long *chip_map, struct cfi_private *cfi) @@ -116,11 +87,7 @@ static int __xipram cfi_probe_chip(struct map_info *map, __u32 base, } xip_disable(); This is the code that is similar to our cfi-flash code - cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi-device_type, NULL); - cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi-device_type, NULL); - cfi_send_gen_cmd(0x98, 0x55, base, map, cfi, cfi-device_type, NULL); - - if (!qry_present(map,base,cfi)) { + if (!qry_mode_on(base, map, cfi)) { xip_enable(base, map, cfi); return 0; } The new qry_mode_on function handles several odd flash cases (yeah, more of these... *sob*) The quick and dirty way 1. Swap the order: (suggested in http://lists.infradead.org/pipermail/linux-mtd/2008-July/022252.html ) flash_write_cmd (info, 0, 0, FLASH_CMD_RESET); flash_write_cmd (info, 0, 0, AMD_CMD_RESET); 2. Follow AMD_CMD_RESET with a FLASH_CMD_RESET: (Suggested by an e-mail from Numonyx) flash_write_cmd (info, 0, 0, AMD_CMD_RESET); flash_write_cmd (info, 0, 0, FLASH_CMD_RESET); flash_write_cmd (info, 0, 0, AMD_CMD_RESET); I tested both methods and they both work on Numonyx M29W128GH (AMD cmdset) and Numonyx PC28F320J3D75 (Intel cmdset) For our local development, I'm probably going to adopt method #1 or method #2. If either method #1 or #2 have a chance to be mainlined, I can submit a patch for them with explanations. Obviously, the Linux method is probably the better solution (until another odd part comes along), the porting of the linux method seems like it will require a lot of time and testing, more than I am capable of committing right now. Thanks for your time, Regards, - Richard Retanubun ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH/next v3 27/28] Add support for building native win32 tools
Hi Wolfgang, On Sat, 2009-04-04 at 01:20 +0200, Wolfgang Denk wrote: Dear Peter Tyser, In message 1236988492-21295-28-git-send-email-pty...@xes-inc.com you wrote: Add support for compiling the host tools in the tools directory using the MinGW toolchain. This produces executables which can be used on standard Windows computers without requiring cygwin. One must specify the MinGW compiler and strip utilities as if they were the host toolchain in order to build win32 executables, eg: make HOSTCC=i586-mingw32msvc-gcc HOSTSTRIP=i586-mingw32msvc-strip tools Signed-off-by: Peter Tyser pty...@xes-inc.com --- README| 10 ++ include/image.h |2 + include/libfdt_env.h | 12 +++ tools/Makefile| 23 ++ tools/mingw_support.c | 79 + tools/mingw_support.h | 51 +++ tools/mkimage.h |5 +++ tools/os_support.c| 24 +++ tools/os_support.h| 29 ++ tools/ubsha1.c|3 ++ 10 files changed, 231 insertions(+), 7 deletions(-) create mode 100644 tools/mingw_support.c create mode 100644 tools/mingw_support.h create mode 100644 tools/os_support.c create mode 100644 tools/os_support.h I'm not happy about this os_support thingy, especially since it will always be compiled, even if not needed in 99.99% of the cases. Maybe you have a better idea and can send a cleanup-patch? The 2 options that come to mind are: 1. Keep the current method of unconditionally compiling os_support.c, which will in turn include any os-specific files. 2. Move the logic of determining which os-specific files are compiled into the Makefile. Something like: ifneq (,$(findstring WIN32 ,$(shell $(HOSTCC) -E -dM -xc /dev/null))) SFX = .exe +OS_SUPPORT_FILES = mingw_support.c else SFX = +OS_SUPPORT_FILES = endif and then replace references of os_support.c with $(OS_SUPPORT_FILES). (Or something along those lines). #1 is ugly in that 99.99% of the time an empty os_support.c file is processed. #2 is ugly in that the Makefile method to determine a target OS is somewhat hokey and will only get hokier if/when additional OS targets are supported. I'd vote for #1 as I think the wasted time of processing os_support.c is a drop in the bucket and it seems a bit cleaner than hacking up the Makefile. If others have any clever ideas let me know. Best, Peter ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH/next v3 27/28] Add support for building native win32 tools
On Tuesday 14 April 2009 18:52:30 Peter Tyser wrote: On Sat, 2009-04-04 at 01:20 +0200, Wolfgang Denk wrote: In message Peter Tyser wrote: Add support for compiling the host tools in the tools directory using the MinGW toolchain. This produces executables which can be used on standard Windows computers without requiring cygwin. One must specify the MinGW compiler and strip utilities as if they were the host toolchain in order to build win32 executables, eg: make HOSTCC=i586-mingw32msvc-gcc HOSTSTRIP=i586-mingw32msvc-strip tools Signed-off-by: Peter Tyser pty...@xes-inc.com --- README| 10 ++ include/image.h |2 + include/libfdt_env.h | 12 +++ tools/Makefile| 23 ++ tools/mingw_support.c | 79 + tools/mingw_support.h | 51 +++ tools/mkimage.h |5 +++ tools/os_support.c| 24 +++ tools/os_support.h| 29 ++ tools/ubsha1.c|3 ++ 10 files changed, 231 insertions(+), 7 deletions(-) create mode 100644 tools/mingw_support.c create mode 100644 tools/mingw_support.h create mode 100644 tools/os_support.c create mode 100644 tools/os_support.h I'm not happy about this os_support thingy, especially since it will always be compiled, even if not needed in 99.99% of the cases. Maybe you have a better idea and can send a cleanup-patch? The 2 options that come to mind are: 1. Keep the current method of unconditionally compiling os_support.c, which will in turn include any os-specific files. 2. Move the logic of determining which os-specific files are compiled into the Makefile. Something like: ifneq (,$(findstring WIN32 ,$(shell $(HOSTCC) -E -dM -xc /dev/null))) SFX = .exe +OS_SUPPORT_FILES = mingw_support.c else SFX = +OS_SUPPORT_FILES = endif and then replace references of os_support.c with $(OS_SUPPORT_FILES). (Or something along those lines). #1 is ugly in that 99.99% of the time an empty os_support.c file is processed. #2 is ugly in that the Makefile method to determine a target OS is somewhat hokey and will only get hokier if/when additional OS targets are supported. I'd vote for #1 as I think the wasted time of processing os_support.c is a drop in the bucket and it seems a bit cleaner than hacking up the Makefile. If others have any clever ideas let me know. i prefer #1 as well ... you covered the reasons fairly well, thanks -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
[U-Boot] MMC driver for mx31
Hi, Is there an available driver for MMC/SD for the mx31 pdk board. If not, what would be the closest candidate for porting it over. Thanks. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Ethernet receive issue in PPC440
I am using PowerPC 440 EP. The PHY I am using is DP83848. I have enabled RMII mode. I am making sure that all the registers are configured for this mode only, by reading back the registers. First i tried enabling internal loopback in PowerPC by enabling the ILE bit in EMAC0_MR1 register. There was no issue. Then I wanted to test external loopback without RJ-45 cable. that is the data transmitted by Power PC is loop backed by the PHY. So i disabled the ILE bit and enabled FullDuplex FDE bit in EMAC0_MR1 register (As illustrated in the PowerPC User Manual). I also enabled Internal Loopback in PHY.I had no issues in this also. I was able to receive the looped back packets from the PHY. Also to make sure that PHY has no issue, there is a built in test facility avaiilable in the PHY. I also enabled that bit and cleared for the passing of the Built In Test of the PHY. But i never tried doing loop back with the RJ-45 cable. But when i cleared the loop back along the PHY path, should i also test looping back with the cable?? Thanks for your response. Thanks Regards, Prathika R Stefan Roese wrote: On Friday 10 April 2009, prathika wrote: i am porting uboot in PowerPC 440. i tried using the ping command.i have connected my board to PC via cross cable. When i monitor on the PC side using Network Monitor, the PC receives the ARP request packet and the PC is replying with acknowledgement. I verified reading the receive status register in PPC, it shows there was FCS error and the EMAC rejects the received packet. Which 440 variant are you using? And which PHY (in which connection mode, MII, RGMII...)? Actually i enabled external loop back in PowerPC and made appropriate configuration in PPC and in the PHY chip.I have no issues in receiving the packet.things work absolutely fine. Are you doing an internal loopback test (using the loopback test mode of the EMAC, or such a test mode of the PHY) or are you using an real external loopback test, using an external RJ45 loopback connector? You might want to take a look at the 4xx POST ethernet driver and tests. It's possible to use internal and external loopback tests here (see CONFIG_SYS_POST_ETHER_EXT_LOOPBACK). but when it comes to peer to peer communication, i have problem.. should i doubt on my hardware?? Sure. If it's not working then it's always possible that such problems result from hardware issues. what can be the possibilities?? has anyone faced such an issue? I suggest you check your PHY and it's components. Sometimes a wrong resistor or capacitor can cause such or similar problems. Best regards, Stefan = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot