Re: [U-Boot] U-Boot-x86 / coreboot Integration
Dear Graeme Russ, In message BANLkTi=P=h+3u+03+zyvfoukznfc2ep...@mail.gmail.com you wrote: - Is it worth playing around with segment registers to 'relocate' U-Boot That's a U-Boot question, right? Let's solve this independently. Not really - If we want coreboot to place U-Boot at top-of-RAM then coreboot would have to figure this out. But I think this is now a moot point (see my other email) I think we should start simple, like we do for example with NAND booting systems. Here we agree on a fixed load address for U-Boot, too, so we can certainly do the same for Coreboot. At least initially. If somebody finds time and ressources this could be added as an optimization later. - What hardware should be initialised in coreboot and what should be initialised in U-Boot? (political question ;) No, that's a very practical; question. Coreboot should do as many of the x86 specific stuff as it can, and as it already does to load and start other payloads. And probably not more, at least not for now. Yes - As I mentioned in my other post, coreboot should do as much as it needs to (and not more) to load (arbitrary) payloads. The rest should be up to U-Boot using the U-Boot principle of initialising only what needs to be initialised. Yes, but we also should try to avoid duplication of code - if coreboot already includes code to initialize things that need to be initialized, we should use this, and not duplicate the function in U-Boot without need. We are not re-inventing the wheel here. We have many similar situations where some ROM boot loader or xload or nand_spl code or onenand_ipl code is loading an U-Boot image into a halfway initialized system, and U-Boot starts there. I see no need to make coreboot use a different method. Except the coreboot can load ELF images and if we can avoid a memcpy by having coreboot do the relocation, we eek out that little bit more boot speed ;) Keep things simple first, and add optimization later, when we have everything running. Early optimization is... Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de God runs electromagnetics by wave theory on Monday, Wednesday, and Friday, and the Devil runs them by quantum theory on Tuesday, Thurs- day, and Saturday. -- William Bragg ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [coreboot] U-Boot-x86 / coreboot Integration
Dear Kevin O'Connor, In message 20110511035148.GA14339@morn.localdomain you wrote: And what about all those Linux drivers in drivers/video - Would porting them (to U-Boot) elliminate the need for BIOS/Option ROMs I'm not really sure - I'd guess it will vary significantly from card to card and driver to driver. Indeed. I'm pretty sure you need to run the VGA option ROM if you want the legacy text console mode. However, some of the Linux/X11 drivers will likely be able to get the card into graphics mode without running the option ROM. Usually you have to run the ROM init code; on many cards this is needed for example to initialize the video RAM (well known problem, isn't it?). Guess why the code in drivers/bios_emulator is needed in U-Boot ? 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 The human mind ordinarily operates at only ten percent of its capaci- ty - the rest is overhead for the operating system. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 7/8] km/common: simplify default environment
Hello, On 05/10/2011 11:24 PM, Wolfgang Denk wrote: Dear Holger Brunck, In message 0bbf514662e171fe0a8ef9b53a4819c7839e187e.1304508448.git.holger.bru...@keymile.com you wrote: This is a first step to simplify the default environment. Move all the environment variables which are only needed for debugging purpose to textfiles in the scripts directory. In case of debugging these files can be loaded via tftp into RAM and set via the env import command. Other variables are identified as obsolete and were removed. Signed-off-by: Holger Brunck holger.bru...@keymile.com Signed-off-by: Valentin Longchamp valentin.longch...@keymile.com Acked-by: Heiko Schocher h...@denx.de cc: Wolfgang Denk w...@denx.de cc: Detlev Zundel d...@denx.de --- Changes for v2: - split up first large patch serie to three independent smaller patch series - no change in the content of this patch board/keymile/scripts/README | 23 + board/keymile/scripts/debug-arm-env.txt|2 + board/keymile/scripts/debug-common-env.txt |9 ++ board/keymile/scripts/debug-ppc-env.txt|2 + include/configs/km/keymile-common.h| 128 +++- include/configs/km/km-powerpc.h| 12 +-- include/configs/km/km_arm.h|5 +- 7 files changed, 55 insertions(+), 126 deletions(-) create mode 100644 board/keymile/scripts/README create mode 100644 board/keymile/scripts/debug-arm-env.txt create mode 100644 board/keymile/scripts/debug-common-env.txt create mode 100644 board/keymile/scripts/debug-ppc-env.txt This does not apply cleanly: pplying patch #94008 to current directory Description: [U-Boot,v2,7/8] km/common: simplify default environment Applying: km/common: simplify default environment fatal: sha1 information is lacking or useless (include/configs/km/keymile-common.h). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 km/common: simplify default environment Stopping here. Please resubmit 4/8, 7/8 and 8/8. Yes there are some dependencies if 4/8 is missing. I fix this an resubmit the missing pieces. I assume that I should only resubmit a patch serie with this three patches and not the whole serie? Thanks! Best regards Holger ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 1/1] mx5: board: code clean up for checkboard code
Hi, Stefano, 2011/4/22 Jason Liu jason@linaro.org: The boot cause code has been factor out to soc common code,we need drop the part from the board support code This patch also remove the redundant cpu version print Signed-off-by: Jason Liu jason@linaro.org --- changes since v1 -include more clean up by remove the redundant cpu version print --- board/efikamx/efikamx.c | 42 + board/freescale/mx51evk/mx51evk.c | 36 +-- board/freescale/mx53evk/mx53evk.c | 21 +- board/ttcontrol/vision2/vision2.c | 42 + 4 files changed, 4 insertions(+), 137 deletions(-) Ping, any comments about this patch? Jason ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 7/8] km/common: simplify default environment
Dear Holger Brunck, In message 4dca3393.5060...@keymile.com you wrote: Yes there are some dependencies if 4/8 is missing. I fix this an resubmit the missing pieces. I assume that I should only resubmit a patch serie with this three patches and not the whole serie? Correct. Thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de HANDLE WITH EXTREME CARE: This Product Contains Minute Electrically Charged Particles Moving at Velocities in Excess of Five Hundred Million Miles Per Hour. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V7 3/3] MX53: support for freescale MX53LOCO board
This patch add initial support for freescale MX53LOCO board. Network(FEC),SD/MMC,UART have been supported by this patch The patch also config CPU:1GHZ,DDR:400MHZ for better peformance Signed-off-by: Jason Liu jason@linaro.org --- Changes since v5: - merge the Add power init support patch changes since v4: - remove the boot reset cause from board support changes since v3: - include other two small patch into this commit, mx53loco: set mmc env to MMC slot1 MX5: Enable flat-device-tree support on mx53 loco board changes since V2: -factor out the boot cause function to common code, -fix gd-ram_size with full memory size -remove the '1' from all #defines that just enable features -correct memory test end address value --- MAINTAINERS |1 + arch/arm/cpu/armv7/mx5/soc.c |2 +- arch/arm/include/asm/arch-mx5/sys_proto.h |2 + board/freescale/mx53loco/Makefile | 47 board/freescale/mx53loco/imximage.cfg | 96 +++ board/freescale/mx53loco/mx53loco.c | 395 + boards.cfg|1 + include/configs/mx53loco.h| 199 +++ 8 files changed, 742 insertions(+), 1 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index e2a4ba9..42c5048 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -574,6 +574,7 @@ Stefano Babic sba...@denx.de Jason Liu r64...@freescale.com mx53evk i.MX53 + mx53locoi.MX53 Enric Balletbo i Serra eballe...@iseebcn.com diff --git a/arch/arm/cpu/armv7/mx5/soc.c b/arch/arm/cpu/armv7/mx5/soc.c index 6f4e8db..9c03474 100644 --- a/arch/arm/cpu/armv7/mx5/soc.c +++ b/arch/arm/cpu/armv7/mx5/soc.c @@ -116,7 +116,7 @@ int print_cpuinfo(void) (cpurev 0x000F0) 4, (cpurev 0xF) 0, mxc_get_clock(MXC_ARM_CLK) / 100); - printf(Reset cause: %s\n, get_reset_cause()); + printf(Reset cause: %s\n, get_reset_cause()); return 0; } #endif diff --git a/arch/arm/include/asm/arch-mx5/sys_proto.h b/arch/arm/include/asm/arch-mx5/sys_proto.h index f687503..2d7e9ed 100644 --- a/arch/arm/include/asm/arch-mx5/sys_proto.h +++ b/arch/arm/include/asm/arch-mx5/sys_proto.h @@ -27,5 +27,7 @@ u32 get_cpu_rev(void); #define is_soc_rev(rev)((get_cpu_rev() 0xFF) - rev) void sdelay(unsigned long); +void pmic_reg_write(u32 reg, u32 value); +u32 pmic_reg_read(u32 reg); #endif diff --git a/board/freescale/mx53loco/Makefile b/board/freescale/mx53loco/Makefile new file mode 100644 index 000..2088a48 --- /dev/null +++ b/board/freescale/mx53loco/Makefile @@ -0,0 +1,47 @@ +# +# (C) Copyright 2011 Freescale Semiconductor, Inc. +# Jason Liu r64...@freescale.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 $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +COBJS := mx53loco.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(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/freescale/mx53loco/imximage.cfg b/board/freescale/mx53loco/imximage.cfg new file mode 100644 index 000..ce9c8fc --- /dev/null +++ b/board/freescale/mx53loco/imximage.cfg @@ -0,0 +1,96 @@ +# Copyright (C) 2011 Freescale Semiconductor, Inc. +# Jason Liu r64...@freescale.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
[U-Boot] [PATCH V7 2/3] PMIC: Add dialog pmic support
This patch add dialog pmic(DA9053) driver with I2C interface support In order to not duplicate code and according to the discussion on the mail-list, change fsl_pmic.c to spi_i2c_pmic.c.Actaully,spi_i2c_pmic.c is just a wrapper for PMIC communication when SPI or I2C is used. Signed-off-by: Jason Liu jason@linaro.org Cc: sba...@denx.de sba...@denx.de Cc: Detlev Zundel d...@denx.de --- change since v1: - use one file to support fsl pmic and dialog pmic - rename fsl_pmic.c to spi_i2c_pmic.c --- drivers/misc/Makefile |3 +- drivers/misc/{fsl_pmic.c = spi_i2c_pmic.c} | 72 +-- include/da9053.h| 186 +++ 3 files changed, 248 insertions(+), 13 deletions(-) diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index b152486..b2e150e 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -26,9 +26,10 @@ include $(TOPDIR)/config.mk LIB:= $(obj)libmisc.o COBJS-$(CONFIG_ALI152X) += ali512x.o +COBJS-$(CONFIG_DIALOG_PMIC) += spi_i2c_pmic.o COBJS-$(CONFIG_DS4510) += ds4510.o COBJS-$(CONFIG_FSL_LAW) += fsl_law.o -COBJS-$(CONFIG_FSL_PMIC) += fsl_pmic.o +COBJS-$(CONFIG_FSL_PMIC) += spi_i2c_pmic.o COBJS-$(CONFIG_GPIO_LED) += gpio_led.o COBJS-$(CONFIG_FSL_MC9SDZ60) += mc9sdz60.o COBJS-$(CONFIG_NS87308) += ns87308.o diff --git a/drivers/misc/fsl_pmic.c b/drivers/misc/spi_i2c_pmic.c similarity index 76% rename from drivers/misc/fsl_pmic.c rename to drivers/misc/spi_i2c_pmic.c index ef80ad9..5fbfb40 100644 --- a/drivers/misc/fsl_pmic.c +++ b/drivers/misc/spi_i2c_pmic.c @@ -22,13 +22,16 @@ #include config.h #include common.h +#include i2c.h #include asm/errno.h #include linux/types.h +#if defined(CONFIG_FSL_PMIC) #include fsl_pmic.h +#endif -static int check_param(u32 reg, u32 write) +static int check_param(u32 reg, u32 write, u32 max_reg) { - if (reg 63 || write 1) { + if (reg max_reg || write 1) { printf(reg num = %d is invalid. Should be less then 63\n, reg); return -1; @@ -37,15 +40,13 @@ static int check_param(u32 reg, u32 write) return 0; } -#ifdef CONFIG_FSL_PMIC_I2C -#include i2c.h - -u32 pmic_reg(u32 reg, u32 val, u32 write) +#if defined(CONFIG_FSL_PMIC_I2C) +u32 fsl_pmic_reg(u32 reg, u32 val, u32 write) { - unsigned char buf[4] = { 0 }; u32 ret_val = 0; + unsigned char buf[4] = { 0 }; - if (check_param(reg, write)) + if (check_param(reg, write, 63)) return -1; if (write) { @@ -62,7 +63,44 @@ u32 pmic_reg(u32 reg, u32 val, u32 write) return ret_val; } -#else /* SPI interface */ +#endif + +#if defined(CONFIG_DIALOG_PMIC_I2C) +u32 dlg_pmic_reg(u32 reg, u32 val, u32 write) +{ + u32 ret_val = 0; + unsigned char buf[1] = { 0 }; + + if (check_param(reg, write, 142)) + return -1; + + if (write) { + buf[0] = (val) 0xff; + if (i2c_write(CONFIG_SYS_DIALOG_PMIC_I2C_ADDR, reg, 1, buf, 1)) + return -1; + } else { + if (i2c_read(CONFIG_SYS_DIALOG_PMIC_I2C_ADDR, reg, 1, buf, 1)) + return -1; + ret_val = buf[0]; + } + + return ret_val; +} +#endif + +#if defined(CONFIG_FSL_PMIC_I2C) || defined(CONFIG_DIALOG_PMIC_I2C) +#include i2c.h +u32 pmic_reg(u32 reg, u32 val, u32 write) +{ +#if defined(CONFIG_FSL_PMIC_I2C) + return fsl_pmic_reg(reg, val, write); +#endif + +#if defined(CONFIG_DIALOG_PMIC_I2C) + return dlg_pmic_reg(reg, val, write); +#endif +} +#elif defined(CONFIG_FSL_PMIC) /* SPI interface */ #include spi.h static struct spi_slave *slave; @@ -92,7 +130,7 @@ u32 pmic_reg(u32 reg, u32 val, u32 write) return -1; } - if (check_param(reg, write)) + if (check_param(reg, write, 63)) return -1; if (spi_claim_bus(slave)) @@ -135,6 +173,7 @@ u32 pmic_reg_read(u32 reg) void pmic_show_pmic_info(void) { +#if defined(CONFIG_FSL_PMIC) u32 rev_id; rev_id = pmic_reg_read(REG_IDENTIFICATION); @@ -178,6 +217,7 @@ void pmic_show_pmic_info(void) break; } puts(]\n); +#endif } static void pmic_dump(int numregs) @@ -189,7 +229,7 @@ static void pmic_dump(int numregs) for (i = 0; i numregs; i++) { val = pmic_reg_read(i); if (!(i % 8)) - printf (\n0x%02x: , i); + printf(\n0x%02x: , i); printf(%08x , val); } puts(\n); @@ -227,9 +267,17 @@ int do_pmic(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 1; } +#if defined(CONFIG_FSL_PMIC) +#define PMIC_NAME Freescale PMIC (Atlas) +#elif defined(CONFIG_DIALOG_PMIC) +#define PMIC_NAME Dialog PMIC (DA905x) +#else +#error Unkown PMIC name +#endif + U_BOOT_CMD( pmic,
[U-Boot] [PATCH V7 1/3] MX5: clock: Add clock config interface
Add clock config interface support, so that we can configure CPU or DDR clock in the later init Signed-off-by: Jason Liu jason@linaro.org --- arch/arm/cpu/armv7/mx5/clock.c | 551 +- arch/arm/include/asm/arch-mx5/clock.h|4 + arch/arm/include/asm/arch-mx5/crm_regs.h |6 + arch/arm/include/asm/arch-mx5/imx-regs.h |1 + 4 files changed, 559 insertions(+), 3 deletions(-) diff --git a/arch/arm/cpu/armv7/mx5/clock.c b/arch/arm/cpu/armv7/mx5/clock.c index 0b04a88..04d9f71 100644 --- a/arch/arm/cpu/armv7/mx5/clock.c +++ b/arch/arm/cpu/armv7/mx5/clock.c @@ -24,6 +24,7 @@ */ #include common.h +#include div64.h #include asm/io.h #include asm/errno.h #include asm/arch/imx-regs.h @@ -34,6 +35,7 @@ enum pll_clocks { PLL1_CLOCK = 0, PLL2_CLOCK, PLL3_CLOCK, + PLL4_CLOCK, PLL_CLOCKS, }; @@ -41,8 +43,42 @@ struct mxc_pll_reg *mxc_plls[PLL_CLOCKS] = { [PLL1_CLOCK] = (struct mxc_pll_reg *)PLL1_BASE_ADDR, [PLL2_CLOCK] = (struct mxc_pll_reg *)PLL2_BASE_ADDR, [PLL3_CLOCK] = (struct mxc_pll_reg *)PLL3_BASE_ADDR, + [PLL4_CLOCK] = (struct mxc_pll_reg *)PLL4_BASE_ADDR, }; +#define AHB_CLK_ROOT1 +#define SZ_DEC_1M 100 +#define PLL_PD_MAX 16 /* Actual pd+1 */ +#define PLL_MFI_MAX 15 +#define PLL_MFI_MIN 5 +#define ARM_DIV_MAX 8 +#define IPG_DIV_MAX 4 +#define AHB_DIV_MAX 8 +#define EMI_DIV_MAX 8 +#define NFC_DIV_MAX 8 + +struct fixed_pll_mfd { + u32 ref_clk_hz; + u32 mfd; +}; + +const struct fixed_pll_mfd fixed_mfd[] = { + {CONFIG_SYS_MX5_HCLK, 24 * 16}, +}; + +struct pll_param { + u32 pd; + u32 mfi; + u32 mfn; + u32 mfd; +}; + +#define PLL_FREQ_MAX(ref_clk) (4 * (ref_clk) * PLL_MFI_MAX) +#define PLL_FREQ_MIN(ref_clk) \ + ((2 * (ref_clk) * (PLL_MFI_MIN - 1)) / PLL_PD_MAX) +#define MAX_DDR_CLK 42000 +#define NFC_CLK_MAX 3400 + struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)MXC_CCM_BASE; /* @@ -175,7 +211,7 @@ static u32 get_uart_clk(void) /* * This function returns the low power audio clock. */ -u32 get_lp_apm(void) +static u32 get_lp_apm(void) { u32 ret_val = 0; u32 ccsr = __raw_readl(mxc_ccm-ccsr); @@ -191,7 +227,7 @@ u32 get_lp_apm(void) /* * get cspi clock rate. */ -u32 imx_get_cspiclk(void) +static u32 get_cspi_clk(void) { u32 ret_val = 0, pdf, pre_pdf, clk_sel; u32 cscmr1 = __raw_readl(mxc_ccm-cscmr1); @@ -228,6 +264,94 @@ u32 imx_get_cspiclk(void) return ret_val; } +static u32 get_axi_a_clk(void) +{ + u32 cbcdr = __raw_readl(mxc_ccm-cbcdr); + u32 pdf = (cbcdr MXC_CCM_CBCDR_AXI_A_PODF_MASK) \ +MXC_CCM_CBCDR_AXI_A_PODF_OFFSET; + + return get_periph_clk() / (pdf + 1); +} + +static u32 get_axi_b_clk(void) +{ + u32 cbcdr = __raw_readl(mxc_ccm-cbcdr); + u32 pdf = (cbcdr MXC_CCM_CBCDR_AXI_B_PODF_MASK) \ +MXC_CCM_CBCDR_AXI_B_PODF_OFFSET; + + return get_periph_clk() / (pdf + 1); +} + +static u32 get_ahb_clk(void) +{ + u32 cbcdr = __raw_readl(mxc_ccm-cbcdr); + u32 pdf = (cbcdr MXC_CCM_CBCDR_AHB_PODF_MASK) \ +MXC_CCM_CBCDR_AHB_PODF_OFFSET; + + return get_periph_clk() / (pdf + 1); +} + +static u32 get_emi_slow_clk(void) +{ + u32 cbcdr = __raw_readl(mxc_ccm-cbcdr); + u32 emi_clk_sel = cbcdr MXC_CCM_CBCDR_EMI_CLK_SEL; + u32 pdf = (cbcdr MXC_CCM_CBCDR_EMI_PODF_MASK) \ +MXC_CCM_CBCDR_EMI_PODF_OFFSET; + + if (emi_clk_sel) + return get_ahb_clk() / (pdf + 1); + + return get_periph_clk() / (pdf + 1); +} + +static u32 get_nfc_clk(void) +{ + u32 cbcdr = __raw_readl(mxc_ccm-cbcdr); + u32 pdf = (cbcdr MXC_CCM_CBCDR_NFC_PODF_MASK) \ +MXC_CCM_CBCDR_NFC_PODF_OFFSET; + + return get_emi_slow_clk() / (pdf + 1); +} + +static u32 get_ddr_clk(void) +{ + u32 ret_val = 0; + u32 cbcmr = __raw_readl(mxc_ccm-cbcmr); + u32 ddr_clk_sel = (cbcmr MXC_CCM_CBCMR_DDR_CLK_SEL_MASK) \ +MXC_CCM_CBCMR_DDR_CLK_SEL_OFFSET; +#ifdef CONFIG_MX51 + u32 cbcdr = __raw_readl(mxc_ccm-cbcdr); + if (cbcdr MXC_CCM_CBCDR_DDR_HIFREQ_SEL) { + u32 ddr_clk_podf = (cbcdr MXC_CCM_CBCDR_DDR_PODF_MASK) \ + MXC_CCM_CBCDR_DDR_PODF_OFFSET; + + ret_val = decode_pll(mxc_plls[PLL1_CLOCK], CONFIG_SYS_MX5_HCLK); + ret_val /= ddr_clk_podf + 1; + + return ret_val; + } +#endif + switch (ddr_clk_sel) { + case 0: + ret_val = get_axi_a_clk(); + break; + case 1: + ret_val = get_axi_b_clk(); + break; + case 2: + ret_val = get_emi_slow_clk(); + break; + case
[U-Boot] hi.
nbsp;Hi this is an good website, there are many apple iphone, conon camera,latops,tv and so on, the price is much lower. very amazing. Web :nbsp;nbsp; eorol.com 15:50:43nbsp; ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] ACER n310 NAND write protection issue
Hey everyone, I've got an ACER n310 (n300 series). It features a s3c2440 running at 300 MHz, 64 MB SDRAM and 128 MB NAND ROM (it's Samsung k9f1g08). It's not equipped with any NOR-Flash. Apart from that it's got quite a similar configuration as FriendlyARM's Mini2440. I downloaded the sources of u-boot and configured it according to my PDA's hardware. So far, u-boot is running and I'm able to read the whole NAND-Flash. But when I'm trying to unlock the NAND-Flash, I get the following error message: n310 # nand unlock device 0 whole chip nand_unlock: start: , length: 134217728! nand_unlock: Device is write protected! Error unlocking NAND flash, write and erase will probably fail What I conclude from that is: the (NOT)WP-Pin is set to ground. The Mini2440 is not effected by this kind of issue as (according to the schematics) the (NOT)WP-Pin is connected to VCC. However there must be a way to toggle this pin, as the original ACER-bootloader and WM5 respectively are able to write to the flash. Any ideas how to cancel the write protection or how to figure out what pin is connected to WP (schematics are not available)? Thanks in advance and best regards Daniel -- View this message in context: http://old.nabble.com/ACER-n310-NAND-write-protection-issue-tp31592314p31592314.html Sent from the Uboot - Users mailing list archive at Nabble.com. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] ACER n310 NAND write protection issue
Hey everyone, I've got an ACER n310 (n300 series). It features a s3c2440 running at 300 MHz, 64 MB SDRAM and 128 MB NAND ROM (it's Samsung k9f1g08). It's not equipped with any NOR-Flash. Apart from that it's got quite a similar configuration as FriendlyARM's Mini2440. I downloaded the sources of u-boot and configured it according to my PDA's hardware. So far, u-boot is running and I'm able to read the whole NAND-Flash. But when I'm trying to unlock the NAND-Flash, I get the following error message: n310 # nand unlock device 0 whole chip nand_unlock: start: , length: 134217728! nand_unlock: Device is write protected! Error unlocking NAND flash, write and erase will probably fail What I conclude from that is: the (NOT)WP-Pin is set to ground. The Mini2440 is not effected by this kind of issue as (according to the schematics) the (NOT)WP-Pin is connected to VCC. However there must be a way to toggle this pin, as the original ACER-bootloader and WM5 respectively are able to write to the flash. Any ideas how to cancel the write protection or how to figure out what pin is connected to WP (schematics are not available)? Thanks in advance and best regards Daniel ___ Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die Toolbar eingebaut! http://produkte.web.de/go/toolbar ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 0/3] km/common mainlining remaining parts
This patch serie comprehends the missing parts of the mostly already committed patch serie v2 km/common mainlining. See: http://lists.denx.de/pipermail/u-boot/2011-May/092323.html The serie relies on the patch lib, vsprintf: introduce strict_strtoul which is already posted (http://lists.denx.de/pipermail/u-boot/2011-May/091972.html) but currently not committed, and should therefore retained until this patch was pulled. Holger Brunck (2): km/common: simplify default environment km/common: add pnvramsize to default environment Thomas Herzmann (1): km/common: implement boardId HWkey checks as u-boot cmd board/keymile/common/common.c | 155 +++ board/keymile/scripts/README | 23 board/keymile/scripts/debug-arm-env.txt|2 + board/keymile/scripts/debug-common-env.txt |9 ++ board/keymile/scripts/debug-ppc-env.txt|2 + include/configs/km/keymile-common.h| 159 +++- include/configs/km/km-powerpc.h| 12 +-- include/configs/km/km_arm.h|5 +- 8 files changed, 212 insertions(+), 155 deletions(-) create mode 100644 board/keymile/scripts/README create mode 100644 board/keymile/scripts/debug-arm-env.txt create mode 100644 board/keymile/scripts/debug-common-env.txt create mode 100644 board/keymile/scripts/debug-ppc-env.txt ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 1/3] km/common: implement boardId HWkey checks as u-boot cmd
From: Thomas Herzmann thomas.herzm...@keymile.com BoardId and HWKey are used to identify the HW class of a given board. The correct values are stored in the inventory eeprom. During creation time of a boot package the boardId and HWkey for the SW is stored in the default environment and burned into the flash. During boottime the values in the inventory and in the environment are compared to avoid starting of a SW which is not authorized for this board. Some bootpackages are allowed to run on a set of different boardId hwKey. In this case the environment variable boardIdListHex was added to the default environment. In this case the command iterates over the pair values and compares them with the values read from the inventory eeprom. The syntax of such a boardIdListHex value is e.g.: 158_1 159_1 159_2 Signed-off-by: Thomas Herzmann thomas.herzm...@keymile.com Signed-off-by: Holger Brunck holger.bru...@keymile.com Signed-off-by: Valentin Longchamp valentin.longch...@keymile.com Acked-by: Heiko Schocher h...@denx.de cc: Wolfgang Denk w...@denx.de cc: Detlev Zundel d...@denx.de --- Changes for v3: - add further error handling - rework the patch with inputs from W.Denk: - introduce empty line after varaiable declaration - fix one checkpatch warning - add comment why we use simple_strtoul Changes for v2: - split up first large patch series to three independent smaller patch series - give the cmd a more precise name - rework the patch with inputs from W.Denk: - adapt and enhance commit msg - comment the code - add error handling board/keymile/common/common.c | 155 +++ include/configs/km/keymile-common.h | 30 +--- 2 files changed, 156 insertions(+), 29 deletions(-) diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c index 9adfefa..f562732 100644 --- a/board/keymile/common/common.c +++ b/board/keymile/common/common.c @@ -32,6 +32,7 @@ #include net.h #include netdev.h #include asm/io.h +#include linux/ctype.h #if defined(CONFIG_OF_BOARD_SETUP) defined(CONFIG_OF_LIBFDT) #include libfdt.h @@ -716,3 +717,157 @@ static int do_setboardid(cmd_tbl_t *cmdtp, int flag, int argc, U_BOOT_CMD(km_setboardid, 1, 0, do_setboardid, setboardid, read out bid and hwkey from IVM and set in environment); + +/* + * command km_checkbidhwk + * if boardid and hwkey are not already set in the environment, do: + * if a boardIdListHex exists in the environment: + * - read ivm data for boardid and hwkey + * - compare each entry of the boardIdListHex with the + * IVM data: + * if match: + * set environment variables boardid, boardId, + * hwkey, hwKey to the found values + * both (boardid and boardId) are set because + * they might be used differently in the + * application and in the init scripts (?) + * return 0 in case of match, 1 if not match or error + */ +int do_checkboardidhwk(cmd_tbl_t *cmdtp, int flag, int argc, + char *const argv[]) +{ + unsigned long ivmbid = 0, ivmhwkey = 0; + unsigned long envbid = 0, envhwkey = 0; + char *p; + int verbose = argc 1 *argv[1] == 'v'; + int rc = 0; + + /* +* first read out the real inventory values, these values are +* already stored in the local hush variables +*/ + p = get_local_var(IVM_BoardId); + if (p == NULL) { + printf(can't get the IVM_Boardid\n); + return 1; + } + rc = strict_strtoul(p, 16, ivmbid); + + p = get_local_var(IVM_HWKey); + if (p == NULL) { + printf(can't get the IVM_HWKey\n); + return 1; + } + rc = strict_strtoul(p, 16, ivmhwkey); + + if (!ivmbid || !ivmhwkey) { + printf(Error: IVM_BoardId and/or IVM_HWKey not set!\n); + return rc; + } + + /* now try to read values from environment if available */ + p = getenv(boardid); + if (p != NULL) + rc = strict_strtoul(p, 16, envbid); + p = getenv(hwkey); + if (p != NULL) + rc = strict_strtoul(p, 16, envhwkey); + + if (rc != 0) { + printf(strict_strtoul returns error: %d, rc); + return rc; + } + + if (!envbid || !envhwkey) { + /* +* BoardId/HWkey not available in the environment, so try the +* environment variable for BoardId/HWkey list +*/ + char *bidhwklist = getenv(boardIdListHex); + + if (bidhwklist) { + int found = 0; + char *rest = bidhwklist; +
[U-Boot] [PATCH v3 3/3] km/common: add pnvramsize to default environment
The pnvram size was used later from start scripts in linux. Therefore it was added to the default environment. Signed-off-by: Holger Brunck holger.bru...@keymile.com Signed-off-by: Valentin Longchamp valentin.longch...@keymile.com Acked-by: Heiko Schocher h...@denx.de cc: Wolfgang Denk w...@denx.de cc: Detlev Zundel d...@denx.de --- Changes for v3: - no change in the content of the patch Changes for v2: - split up first large patch serie to three independent smaller patch series - rework the patch with inputs from W.Denk: - move variable from c-code to default env to be present in any case when linux starts include/configs/km/keymile-common.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h index 9ad2e5b..757d23a 100644 --- a/include/configs/km/keymile-common.h +++ b/include/configs/km/keymile-common.h @@ -293,6 +293,7 @@ setenv default 'run newenv; reset' \ run release saveenv; reset\0 \ checkboardid=km_checkbidhwk\0 \ + pnvramsize=0x xstr(CONFIG_KM_PNVRAM) \0 \ #ifndef CONFIG_KM_DEF_ENV -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 2/3] km/common: simplify default environment
This is a first step to simplify the default environment. Move all the environment variables which are only needed for debugging purpose to textfiles in the scripts directory. In case of debugging these files can be loaded via tftp into RAM and set via the env import command. Other variables are identified as obsolete and were removed. Signed-off-by: Holger Brunck holger.bru...@keymile.com Signed-off-by: Valentin Longchamp valentin.longch...@keymile.com Acked-by: Heiko Schocher h...@denx.de cc: Wolfgang Denk w...@denx.de cc: Detlev Zundel d...@denx.de --- Changes for v3: - no change in the content of the patch Changes for v2: - split up first large patch serie to three independent smaller patch series - no change in the content of this patch board/keymile/scripts/README | 23 + board/keymile/scripts/debug-arm-env.txt|2 + board/keymile/scripts/debug-common-env.txt |9 ++ board/keymile/scripts/debug-ppc-env.txt|2 + include/configs/km/keymile-common.h| 128 +++- include/configs/km/km-powerpc.h| 12 +-- include/configs/km/km_arm.h|5 +- 7 files changed, 55 insertions(+), 126 deletions(-) create mode 100644 board/keymile/scripts/README create mode 100644 board/keymile/scripts/debug-arm-env.txt create mode 100644 board/keymile/scripts/debug-common-env.txt create mode 100644 board/keymile/scripts/debug-ppc-env.txt diff --git a/board/keymile/scripts/README b/board/keymile/scripts/README new file mode 100644 index 000..86c2b5a --- /dev/null +++ b/board/keymile/scripts/README @@ -0,0 +1,23 @@ +debug-common-env.txt + +This file defines environment variables which are valid for powerpc boards +and for arm boards. + +addramfs: add phram device for the rootfilesysten in ram +develop: for development, laod kernel via tftp and mount rootfs via NFS +nfsargs: default arguments for nfs boot +ramfs: load rootfilesystem in RAM kernel +rootfsfile: loacation of the rootfs file for ramfs +setramfspram: compute PRAM size for ramfs target +setrootfsaddr: compute rootfilesystem address for phram +tftpkernel: load a kernel with tftp into ram +tftpramfs: load rootfs with tftp into ram + +debug-ppc-env.txt + +fdt_file: location of the dtb file on the tftp server +tftpfdt: load dtb file and set fdt address + +debug-arm-env.txt + +tftpfdt: for arm only a dummy variable, because we have no fdt on arm diff --git a/board/keymile/scripts/debug-arm-env.txt b/board/keymile/scripts/debug-arm-env.txt new file mode 100644 index 000..84498af --- /dev/null +++ b/board/keymile/scripts/debug-arm-env.txt @@ -0,0 +1,2 @@ +debug_env_common=tftpboot 0x20 scripts/debug-common-env.txt env import -t 0x20 ${filesize} +tftpfdt=true diff --git a/board/keymile/scripts/debug-common-env.txt b/board/keymile/scripts/debug-common-env.txt new file mode 100644 index 000..1fd4b0c --- /dev/null +++ b/board/keymile/scripts/debug-common-env.txt @@ -0,0 +1,9 @@ +addramfs=setenv bootargs ${bootargs} phram.phram=rootfs${boot_bank},${rootfsaddr},${rootfssize} +develop=setenv subbootcmds tftpfdt tftpkernel nfsargs ${commonargs} boot setenv bootcmd 'run bootrunner' setenv altbootcmd 'run bootcmd' km_setboardid saveenv reset +nfsargs=setenv bootargs ubi.mtd=ubi0 root=/dev/nfs rw nfsroot=${serverip}:${rootpath} +ramfs=setenv actual_bank -1 setenv subbootcmds tftpfdt tftpkernel setrootfsaddr tftpramfs flashargs ${commonargs} addpanic addramfs boot setenv bootcmd 'run bootrunner' setenv altbootcmd 'run bootcmd' run setboardid run setramfspram run setpnvramaddr saveenv reset +rootfsfile=${hostname}/rootfsImage +setramfspram=setexpr value 0 + ${reservedpram} setexpr value 0x${value} + ${rootfssize} setexpr value 0x${value} + ${varsize} setexpr value 0x${value} + ${pnvramsize} setexpr value 0x${value} / 0x400 setenv pram 0x${value} +tftpkernel=tftpboot ${kernel_addr_r} ${hostname}/uImage setenv actual_kernel_addr ${kernel_addr_r} +tftpramfs=tftpboot ${rootfsaddr} ${hostname}/rootfsImage setenv loadaddr +setrootfsaddr=setexpr value ${pnvramsize} - ${rootfssize} setenv rootfsaddr 0x${value} diff --git a/board/keymile/scripts/debug-ppc-env.txt b/board/keymile/scripts/debug-ppc-env.txt new file mode 100644 index 000..3c06ff1 --- /dev/null +++ b/board/keymile/scripts/debug-ppc-env.txt @@ -0,0 +1,2 @@ +debug_env_common=tftpboot 0x20 scripts/debug-common-env.txt env import -t 0x20 ${filesize} +tftpfdt=tftpboot ${fdt_addr_r} ${hostname}/${hostname}.dtb setenv actual_fdt_addr ${fdt_addr_r} diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h index 6a5ecc6..9ad2e5b 100644 --- a/include/configs/km/keymile-common.h +++ b/include/configs/km/keymile-common.h @@ -169,13 +169,8 @@ break=0; \ for
[U-Boot] Issues in U-BOOT for OMAPL137
Hi , When i am trying to compile u-boot for omapL137 by issuing the following command make da830_omapl137_evm_config CROSS_COMPILE=arm-none-linux-gnueabi- Our goal is to get USB up on the uboot . We are trying to boot OMAPL137 Evm using USB mass storage device(Pen drive) I have added the following macros in the /include/configs/da830_evm.h (followed the instructions from CHANGELOG file) #define CONFIG_CMD_USB 1 #define CONFIG_USB_STORAGE 1 #define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_IXP4XX 1 #define CONFIG_EHCI_IS_TDI 1 #define CONFIG_EHCI_DESC_BIG_ENDIAN 1 #define CONFIG_EHCI_MMIO_BIG_ENDIAN 1 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 1 #define CONFIG_LEGACY_USB_INIT_SEQ 1 This is the error i am seeing consistently. make[1]: Leaving directory `/home/dataway/linux_bkup/kalyan/omapl137/DaVinci-PSP-SDK-03.20.00.08/src/u-boot/uboot-03.20.00.08/drivers/usb/musb' make -C drivers/usb/host/ make[1]: Entering directory `/home/dataway/linux_bkup/kalyan/omapl137/DaVinci-PSP-SDK-03.20.00.08/src/u-boot/uboot-03.20.00.08/drivers/usb/host' make[1]: *** No rule to make target `.depend', needed by `libusb_host.a'. Stop. make[1]: Leaving directory `/home/dataway/linux_bkup/kalyan/omapl137/DaVinci-PSP-SDK-03.20.00.08/src/u-boot/uboot-03.20.00.08/drivers/usb/host' make: *** [drivers/usb/host/libusb_host.a] Error 2 Please help us solving this issue as this is very critical for our development, ' thanks Shilpa ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] 你是英语达人吗?
你是英语达人吗? Dear u-boot@lists.denx.de, 看上去似乎您的e-mail软件不支持HTML。 请访问下面的网页使您能够在网页浏览其中阅读这条信息: http://emarketing-china.dmdelivery.com/x/?S7Y1NPqfa2tuavC.CMg0MDYwMrL8n2NraWAJAAz04___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] header intact.
-- Forwarded message -- From: shilpa jadav shilpaj...@gmail.com Date: Wed, May 11, 2011 at 3:10 PM Subject: Re: confirm 7081661284d94002aae247250689fa2b2d9cf490 To: u-boot-requ...@lists.denx.de Interact On Tue, May 10, 2011 at 8:02 PM, u-boot-requ...@lists.denx.de wrote: Mailing list subscription confirmation notice for mailing list U-Boot We have received a request from 122.166.114.126 for subscription of your email address, shilpaj...@gmail.com, to the u-boot@lists.denx.de mailing list. To confirm that you want to be added to this mailing list, simply reply to this message, keeping the Subject: header intact. Or visit this web page: http://lists.denx.de/mailman/confirm/u-boot/7081661284d94002aae247250689fa2b2d9cf490 Or include the following line -- and only the following line -- in a message to u-boot-requ...@lists.denx.de: confirm 7081661284d94002aae247250689fa2b2d9cf490 Note that simply sending a `reply' to this message should work from most mail readers, since that usually leaves the Subject: line in the right form (additional Re: text in the Subject: is okay). If you do not wish to be subscribed to this list, please simply disregard this message. If you think you are being maliciously subscribed to the list, or have any other questions, send them to u-boot-ow...@lists.denx.de. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Reminder- USB detection issues on OMAPL137
-- Forwarded message -- From: shilpa jadav shilpaj...@gmail.com Date: Tue, May 10, 2011 at 10:40 PM Subject: USB detection issues on OMAPL137 To: u-boot@lists.denx.de Hi, I am using OMAPL137EVM, using DaVinci-PSP-SDK-03.20.00.14 package and trying to boot from USB on u-boot. While configuring u-boot for USB support we have enabled macro's CONFIG_USB_DA8XX and CONFIG_USB_STORAGE in include/configs/da8xx_evm.h following below link : http://processors.wiki.ti.com/index.php/Configuring/Building_U-Boot_for_OMAP-L137 I am using following environment variables bootcmd=usb start; fatload usb 0:1 0xC070 uImage; bootm 0xc070 bootargs=console=ttyS2,115200n8 noinitrd rw ip=off root=/dev/sda2 rootfstype=ext2 mem=32M I am facing following issues at U-BOOT prompt U-Boot usb start (Re)start USB... USB: scanning bus for devices... No USB Device found scanning bus for storage devices... 0 Storage Device(s) found Please can anyone suggest for solving issue Thanks Shilpa Jadhav ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] [v5] powerpc/85xx: fix compatible property for the L2 cache node
On Apr 29, 2011, at 6:08 PM, Timur Tabi wrote: The compatible property for the L2 cache node (on 85xx systems that don't have a CPC) was using a value for the property length that did not match the actual length of the property. Signed-off-by: Timur Tabi ti...@freescale.com --- arch/powerpc/cpu/mpc85xx/fdt.c | 29 +++-- 1 files changed, 19 insertions(+), 10 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [Patch v2] powerpc/mpc8xxx: reword max tCKmin message
On May 5, 2011, at 6:14 PM, York Sun wrote: Reword The DIMM max tCKmin is ... to The DDR clock is faster than the slowest DIMM(s) can support. Fixed interger type in printf as well. Signed-off-by: York Sun york...@freescale.com --- .../cpu/mpc8xxx/ddr/lc_common_dimm_params.c|6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ehci-pci: Fix PCI EHCI driver for 36-bit
ping?? - k On Apr 29, 2011, at 10:41 AM, Kumar Gala wrote: On Apr 18, 2011, at 9:47 PM, Zhao Chenhui wrote: Convert the PCI base address into a virtual address. Signed-off-by: Zhao Chenhui b35...@freescale.com Signed-off-by: Li Yang le...@freescale.com --- drivers/usb/host/ehci-pci.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Remy, any comments or acceptance of this patch? - k diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index a038b6c..e400aee 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c @@ -43,7 +43,6 @@ static struct pci_device_id ehci_pci_ids[] = { int ehci_hcd_init(void) { pci_dev_t pdev; -uint32_t addr; pdev = pci_find_devices(ehci_pci_ids, CONFIG_PCI_EHCI_DEVICE); if (pdev == -1) { @@ -51,8 +50,8 @@ int ehci_hcd_init(void) return -1; } -pci_read_config_dword(pdev, PCI_BASE_ADDRESS_0, addr); -hccr = (struct ehci_hccr *)addr; +hccr = (struct ehci_hccr *)pci_map_bar(pdev, +PCI_BASE_ADDRESS_0, PCI_REGION_MEM); hcor = (struct ehci_hcor *)((uint32_t) hccr + HC_LENGTH(ehci_readl(hccr-cr_capbase))); -- 1.6.4.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] post: add gpio hotkey support
Hello. On 10-05-2011 21:01, Mike Frysinger wrote: Now that we have the generic GPIO layer, we can easily provide a common implementation for the post_hotkeys_pressed() function based on it. Signed-off-by: Mike Frysingervap...@gentoo.org --- post/post.c | 21 + 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/post/post.c b/post/post.c index 1b7f2aa..ecea1e1 100644 --- a/post/post.c +++ b/post/post.c [...] @@ -68,6 +72,23 @@ int post_init_f (void) */ int __post_hotkeys_pressed(void) { +#ifdef CONFIG_SYS_POST_HOTKEYS_GPIO + int ret; + unsigned gpio = CONFIG_SYS_POST_HOTKEYS_GPIO; + + ret = gpio_request(gpio, hotkeys); + if (ret) { + printf(POST: gpio hotkey request failed\n); + return 0; + } + + gpio_direction_input(gpio); + ret = gpio_get_value(gpio); + gpio_free(gpio); + + return ret; +#endif You surely meant #else here? + return 0; /* No hotkeys supported */ } int post_hotkeys_pressed(void) WBR, Sergei ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Pull request u-boot-marvell.git
Hi Albert Please kindly pull The following changes since commit 33e4e15695f7e502fc414984f67d6636f03854fa: Ben Gardiner (1): da850evm: fix NAND WSTROBE and TA timings are available in the git repository at: u-boot-marvell.git master branch. Clint Adams (4): Rename openrd_base files to openrd Add definitions for OpenRD-Client and OpenRD-Ultimate Initialize second PHY on OpenRD-Client and OpenRD-Ultimate Enable multiple fs options for Marvell SoC family on OpenRD boards Simon Guinot (2): Kirkwood: allow to override CONFIG_SYS_TCLK mv-common.h: fix DRAM banks configuration MAKEALL|2 + arch/arm/include/asm/arch-kirkwood/kw88f6281.h |8 +++-- board/Marvell/{openrd_base = openrd}/Makefile |2 +- board/Marvell/{openrd_base = openrd}/kwbimage.cfg |0 .../{openrd_base/openrd_base.c = openrd/openrd.c} | 33 +--- .../{openrd_base/openrd_base.h = openrd/openrd.h} |0 boards.cfg |4 ++- include/configs/mv-common.h|8 ++-- include/configs/{openrd_base.h = openrd.h}| 33 +--- 9 files changed, 71 insertions(+), 19 deletions(-) rename board/Marvell/{openrd_base = openrd}/Makefile (98%) rename board/Marvell/{openrd_base = openrd}/kwbimage.cfg (100%) rename board/Marvell/{openrd_base/openrd_base.c = openrd/openrd.c} (80%) rename board/Marvell/{openrd_base/openrd_base.h = openrd/openrd.h} (100%) rename include/configs/{openrd_base.h = openrd.h} (81%) Regards.. Prafulla . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V7 3/3] MX53: support for freescale MX53LOCO board
Hi Jason, --- On Wed, 5/11/11, Jason Liu jason@linaro.org wrote: ... diff --git a/arch/arm/cpu/armv7/mx5/soc.c b/arch/arm/cpu/armv7/mx5/soc.c index 6f4e8db..9c03474 100644 --- a/arch/arm/cpu/armv7/mx5/soc.c +++ b/arch/arm/cpu/armv7/mx5/soc.c ... This file is not MX53Loco specific, so it should be part of another patch. mxc_get_clock(MXC_ARM_CLK) / 100); - printf(Reset cause: %s\n, get_reset_cause()); + printf(Reset cause: %s\n, get_reset_cause()); return 0; What is the purpose of this change? index f687503..2d7e9ed 100644 --- a/arch/arm/include/asm/arch-mx5/sys_proto.h +++ b/arch/arm/include/asm/arch-mx5/sys_proto.h This file is not MX53Loco specific, so it should be part of another patch. Regards, Fabio Estevam ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V7 3/3] MX53: support for freescale MX53LOCO board
On 05/11/2011 10:03 AM, Jason Liu wrote: This patch add initial support for freescale MX53LOCO board. Network(FEC),SD/MMC,UART have been supported by this patch The patch also config CPU:1GHZ,DDR:400MHZ for better peformance Signed-off-by: Jason Liu jason@linaro.org Hi Jason, diff --git a/arch/arm/cpu/armv7/mx5/soc.c b/arch/arm/cpu/armv7/mx5/soc.c index 6f4e8db..9c03474 100644 --- a/arch/arm/cpu/armv7/mx5/soc.c +++ b/arch/arm/cpu/armv7/mx5/soc.c @@ -116,7 +116,7 @@ int print_cpuinfo(void) (cpurev 0x000F0) 4, (cpurev 0xF) 0, mxc_get_clock(MXC_ARM_CLK) / 100); - printf(Reset cause: %s\n, get_reset_cause()); + printf(Reset cause: %s\n, get_reset_cause()); return 0; It seems to me this file slips into your patch, but it was not supposed to be. } #endif diff --git a/arch/arm/include/asm/arch-mx5/sys_proto.h b/arch/arm/include/asm/arch-mx5/sys_proto.h index f687503..2d7e9ed 100644 --- a/arch/arm/include/asm/arch-mx5/sys_proto.h +++ b/arch/arm/include/asm/arch-mx5/sys_proto.h @@ -27,5 +27,7 @@ u32 get_cpu_rev(void); #define is_soc_rev(rev) ((get_cpu_rev() 0xFF) - rev) void sdelay(unsigned long); +void pmic_reg_write(u32 reg, u32 value); +u32 pmic_reg_read(u32 reg); The pmic_ prototypes have nothing to do with the Soc prototype, as they are specific for a driver. You should move them in the dialog header. +int board_init(void) +{ + gd-bd-bi_arch_number = MACH_TYPE_MX53_LOCO; + gd-bd-bi_boot_params = PHYS_SDRAM_1 + 0x100; + +#ifdef CONFIG_I2C_MXC + setup_i2c(0); + power_init(); + clock_init(); +#endif Probably it does not make a lot of sense to build this board without I2C support. If this is the case, you should drop the #ifdef, as your board must always be compiled with I2C. 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-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
[U-Boot] [PATCH] Add missing i.MX boards to MAKEALL
Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- MAKEALL |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/MAKEALL b/MAKEALL index c3df657..a8ff962 100755 --- a/MAKEALL +++ b/MAKEALL @@ -373,6 +373,7 @@ LIST_ARM9= \ spear600\ suen3 \ trab\ + tx25\ VCMA9 \ versatile \ versatileab \ @@ -426,6 +427,7 @@ LIST_ARMV7=\ igep0020\ igep0030\ mx51evk \ + mx53evk \ omap3_beagle\ omap3_overo \ omap3_evm \ @@ -437,6 +439,7 @@ LIST_ARMV7=\ omap4_sdp4430 \ s5p_goni\ smdkc100\ + vision2 \ # -- 1.6.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 0/8] net/net.c: cleanups for checkpatch compliance
Hi, this is an update to the net/net.c cleanup, incorporating Mike's suggestions to patches 1 and 2. Thanks Mike. net/net.c currently raises a lot of checkpatch issues: 76 errors, 197 warnings. This patchset fixes most of them, leaving 0 errors and 27 warnings. Since the changes are quite massive I split them in separate patches, one per each category of errors/warning. The warnings that are still present are of the following types: - WARNING: consider using kstrto* in preference to simple_strtoul which is Linux-specific; - WARNING: externs should be avoided in .c files these are due to loop-dependencies between net/net.c and other files; - WARNING: line over 80 characters described in the commit message for patch 1; - WARNING: Use of volatile is usually wrong [...] I've had a quick look at these, but I don't know in detail how the networking code and Ethernet drivers (and maybe DMA?) interact, so I cannot remove them being sure that things will continue working. Luca Luca Ceresoli (8): net/net.c: cosmetic: fix lines over 80 characters net/net.c: cosmetic: variable initializations net/net.c: cosmetic: fix whitespace issues net/net.c: cosmetic: fix brace issues net/net.c: cosmetic: fix pointer syntax issues net/net.c: cosmetic: parentheses not required for return net/net.c: cosmetic: fix indentation net/net.c: cosmetic: do not use assignment in if condition net/net.c | 593 ++--- 1 files changed, 328 insertions(+), 265 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 1/8] net/net.c: cosmetic: fix lines over 80 characters
This removes the following checkpatch warning: - WARNING: line over 80 characters There are three such warnings left. The first is hard to fix with cosmetic-only changes without compromising code readability, so I'm leaving it as it is for now: WARNING: line over 80 characters #1537: FILE: net.c:1537: + [4 tabs] memcpy(((Ethernet_t *)NetArpWaitTxPacket)-et_dest, ... The other two cannot be fixed without splitting string literals, so it is preferred to keep them longer than 80 characters. Signed-off-by: Luca Ceresoli luca.ceres...@comelit.it Cc: Wolfgang Denk w...@denx.de Cc: Ben Warren biggerbadder...@gmail.com Cc: Mike Frysinger vap...@gentoo.org --- Changes since v1: - do not split string literals (even though this means leaving the line longer than 80 characters). net/net.c | 231 + 1 files changed, 155 insertions(+), 76 deletions(-) diff --git a/net/net.c b/net/net.c index e50bdf1..6e3af5b 100644 --- a/net/net.c +++ b/net/net.c @@ -101,7 +101,8 @@ DECLARE_GLOBAL_DATA_PTR; #ifndefCONFIG_ARP_TIMEOUT -# define ARP_TIMEOUT 5000UL /* Milliseconds before trying ARP again */ +/* Milliseconds before trying ARP again */ +# define ARP_TIMEOUT 5000UL #else # define ARP_TIMEOUT CONFIG_ARP_TIMEOUT #endif @@ -115,16 +116,24 @@ DECLARE_GLOBAL_DATA_PTR; /** BOOTP EXTENTIONS **/ -IPaddr_t NetOurSubnetMask=0; /* Our subnet mask (0=unknown) */ -IPaddr_t NetOurGatewayIP=0; /* Our gateways IP address */ -IPaddr_t NetOurDNSIP=0; /* Our DNS IP address */ +/* Our subnet mask (0=unknown) */ +IPaddr_t NetOurSubnetMask=0; +/* Our gateways IP address */ +IPaddr_t NetOurGatewayIP=0; +/* Our DNS IP address */ +IPaddr_t NetOurDNSIP=0; #if defined(CONFIG_BOOTP_DNS2) -IPaddr_t NetOurDNS2IP=0; /* Our 2nd DNS IP address */ -#endif -char NetOurNISDomain[32]={0,}; /* Our NIS domain */ -char NetOurHostName[32]={0,};/* Our hostname */ -char NetOurRootPath[64]={0,};/* Our bootpath */ -ushort NetBootFileSize=0; /* Our bootfile size in blocks */ +/* Our 2nd DNS IP address */ +IPaddr_t NetOurDNS2IP=0; +#endif +/* Our NIS domain */ +char NetOurNISDomain[32]={0,}; +/* Our hostname */ +char NetOurHostName[32]={0,}; +/* Our bootpath */ +char NetOurRootPath[64]={0,}; +/* Our bootfile size in blocks */ +ushort NetBootFileSize=0; #ifdef CONFIG_MCAST_TFTP /* Multicast TFTP */ IPaddr_t Mcast_addr; @@ -132,16 +141,25 @@ IPaddr_t Mcast_addr; /** END OF BOOTP EXTENTIONS **/ -ulong NetBootFileXferSize;/* The actual transferred size of the bootfile (in bytes) */ -uchar NetOurEther[6]; /* Our ethernet address */ -uchar NetServerEther[6] = /* Boot server enet address */ +/* The actual transferred size of the bootfile (in bytes) */ +ulong NetBootFileXferSize; +/* Our ethernet address */ +uchar NetOurEther[6]; +/* Boot server enet address */ +uchar NetServerEther[6] = { 0, 0, 0, 0, 0, 0 }; -IPaddr_t NetOurIP; /* Our IP addr (0 = unknown) */ -IPaddr_t NetServerIP;/* Server IP addr (0 = unknown) */ -volatile uchar *NetRxPacket; /* Current receive packet */ -intNetRxPacketLen; /* Current rx packet length */ -unsigned NetIPID;/* IP packet ID */ -uchar NetBcastAddr[6] = /* Ethernet bcast address */ +/* Our IP addr (0 = unknown) */ +IPaddr_t NetOurIP; +/* Server IP addr (0 = unknown) */ +IPaddr_t NetServerIP; +/* Current receive packet */ +volatile uchar *NetRxPacket; +/* Current rx packet length */ +intNetRxPacketLen; +/* IP packet ID */ +unsigned NetIPID; +/* Ethernet bcast address */ +uchar NetBcastAddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; uchar NetEtherNullAddr[6] = { 0, 0, 0, 0, 0, 0 }; @@ -149,24 +167,33 @@ uchar NetEtherNullAddr[6] = void (*push_packet)(volatile void *, int len) = 0; #endif #if defined(CONFIG_CMD_CDP) -uchar NetCDPAddr[6] = /* Ethernet bcast address */ +/* Ethernet bcast address */ +uchar NetCDPAddr[6] = { 0x01, 0x00, 0x0c, 0xcc, 0xcc, 0xcc }; #endif -intNetState; /* Network loop state */ +/* Network loop state */ +intNetState; #ifdef CONFIG_NET_MULTI -intNetRestartWrap = 0; /* Tried all network devices */ -static int
[U-Boot] [PATCH v2 2/8] net/net.c: cosmetic: variable initializations
This removes the following checkpatch errors: - ERROR: do not initialise globals to 0 or NULL - ERROR: spaces required around that '=' (ctx:VxV) - ERROR: that open brace { should be on the previous line Signed-off-by: Luca Ceresoli luca.ceres...@comelit.it Cc: Wolfgang Denk w...@denx.de Cc: Ben Warren biggerbadder...@gmail.com Cc: Mike Frysinger vap...@gentoo.org --- Changes since v1: - re-fix array initializations (the fix in v1 was worse than the original). net/net.c | 40 ++-- 1 files changed, 18 insertions(+), 22 deletions(-) diff --git a/net/net.c b/net/net.c index 6e3af5b..4715699 100644 --- a/net/net.c +++ b/net/net.c @@ -117,23 +117,23 @@ DECLARE_GLOBAL_DATA_PTR; /** BOOTP EXTENTIONS **/ /* Our subnet mask (0=unknown) */ -IPaddr_t NetOurSubnetMask=0; +IPaddr_t NetOurSubnetMask; /* Our gateways IP address */ -IPaddr_t NetOurGatewayIP=0; +IPaddr_t NetOurGatewayIP; /* Our DNS IP address */ -IPaddr_t NetOurDNSIP=0; +IPaddr_t NetOurDNSIP; #if defined(CONFIG_BOOTP_DNS2) /* Our 2nd DNS IP address */ -IPaddr_t NetOurDNS2IP=0; +IPaddr_t NetOurDNS2IP; #endif /* Our NIS domain */ -char NetOurNISDomain[32]={0,}; +char NetOurNISDomain[32] = {0,}; /* Our hostname */ -char NetOurHostName[32]={0,}; +char NetOurHostName[32] = {0,}; /* Our bootpath */ -char NetOurRootPath[64]={0,}; +char NetOurRootPath[64] = {0,}; /* Our bootfile size in blocks */ -ushort NetBootFileSize=0; +ushort NetBootFileSize; #ifdef CONFIG_MCAST_TFTP /* Multicast TFTP */ IPaddr_t Mcast_addr; @@ -146,8 +146,7 @@ ulong NetBootFileXferSize; /* Our ethernet address */ uchar NetOurEther[6]; /* Boot server enet address */ -uchar NetServerEther[6] = - { 0, 0, 0, 0, 0, 0 }; +uchar NetServerEther[6]; /* Our IP addr (0 = unknown) */ IPaddr_t NetOurIP; /* Server IP addr (0 = unknown) */ @@ -159,27 +158,24 @@ int NetRxPacketLen; /* IP packet ID */ unsigned NetIPID; /* Ethernet bcast address */ -uchar NetBcastAddr[6] = - { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; -uchar NetEtherNullAddr[6] = - { 0, 0, 0, 0, 0, 0 }; +uchar NetBcastAddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; +uchar NetEtherNullAddr[6]; #ifdef CONFIG_API void (*push_packet)(volatile void *, int len) = 0; #endif #if defined(CONFIG_CMD_CDP) /* Ethernet bcast address */ -uchar NetCDPAddr[6] = - { 0x01, 0x00, 0x0c, 0xcc, 0xcc, 0xcc }; +uchar NetCDPAddr[6] = { 0x01, 0x00, 0x0c, 0xcc, 0xcc, 0xcc }; #endif /* Network loop state */ intNetState; #ifdef CONFIG_NET_MULTI /* Tried all network devices */ -intNetRestartWrap = 0; +intNetRestartWrap; /* Network loop restarted */ -static int NetRestarted = 0; +static int NetRestarted; /* At least one device configured */ -static int NetDevExists = 0; +static int NetDevExists; #endif /* XXX in both little big endian machines 0x == ntohs(-1) */ @@ -206,7 +202,7 @@ static void CDPStart(void); /* NTP server IP address */ IPaddr_t NetNtpServerIP; /* offset time from UTC */ -intNetTimeOffset=0; +intNetTimeOffset; #endif #ifdef CONFIG_NETCONSOLE @@ -228,7 +224,7 @@ static ulongtimeStart; /* Current timeout value */ static ulong timeDelta; /* THE transmit packet */ -volatile uchar *NetTxPacket = 0; +volatile uchar *NetTxPacket; static int net_check_prereq (proto_t protocol); @@ -319,7 +315,7 @@ void ArpTimeoutCheck(void) static void NetInitLoop(proto_t protocol) { - static int env_changed_id = 0; + static int env_changed_id; bd_t *bd = gd-bd; int env_id = get_env_id (); -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 4/8] net/net.c: cosmetic: fix brace issues
This removes the following checkpatch issues: - WARNING: braces {} are not necessary for single statement blocks - WARNING: braces {} are not necessary for any arm of this statement Signed-off-by: Luca Ceresoli luca.ceres...@comelit.it Cc: Wolfgang Denk w...@denx.de Cc: Ben Warren biggerbadder...@gmail.com Cc: Mike Frysinger vap...@gentoo.org --- Changes since v1: none. net/net.c | 38 +- 1 files changed, 13 insertions(+), 25 deletions(-) diff --git a/net/net.c b/net/net.c index 172f4d5..c22da5f 100644 --- a/net/net.c +++ b/net/net.c @@ -367,9 +367,8 @@ NetLoop(proto_t protocol) */ NetTxPacket = PktBuf[0] + (PKTALIGN - 1); NetTxPacket -= (ulong)NetTxPacket % PKTALIGN; - for (i = 0; i PKTBUFSRX; i++) { + for (i = 0; i PKTBUFSRX; i++) NetRxPackets[i] = NetTxPacket + (i+1)*PKTSIZE_ALIGN; - } } if (!NetArpWaitTxPacket) { @@ -491,11 +490,10 @@ restart: /* * Echo the inverted link state to the fault LED. */ - if (miiphy_link(eth_get_dev()-name, CONFIG_SYS_FAULT_MII_ADDR)) { + if (miiphy_link(eth_get_dev()-name, CONFIG_SYS_FAULT_MII_ADDR)) status_led_set(STATUS_LED_RED, STATUS_LED_OFF); - } else { + else status_led_set(STATUS_LED_RED, STATUS_LED_ON); - } #endif /* CONFIG_SYS_FAULT_ECHO_LINK_DOWN, ... */ #endif /* CONFIG_MII, ... */ @@ -1096,9 +1094,8 @@ CDPHandler(const uchar * pkt, unsigned len) ss = (const ushort *)pkt; type = ntohs(ss[0]); tlen = ntohs(ss[1]); - if (tlen len) { + if (tlen len) goto pkt_short; - } pkt += tlen; len -= tlen; @@ -1477,26 +1474,20 @@ NetReceive(volatile uchar * inpkt, int len) printf(bad length %d %d\n, len, ARP_HDR_SIZE); return; } - if (ntohs(arp-ar_hrd) != ARP_ETHER) { + if (ntohs(arp-ar_hrd) != ARP_ETHER) return; - } - if (ntohs(arp-ar_pro) != PROT_IP) { + if (ntohs(arp-ar_pro) != PROT_IP) return; - } - if (arp-ar_hln != 6) { + if (arp-ar_hln != 6) return; - } - if (arp-ar_pln != 4) { + if (arp-ar_pln != 4) return; - } - if (NetOurIP == 0) { + if (NetOurIP == 0) return; - } - if (NetReadIP(arp-ar_data[16]) != NetOurIP) { + if (NetReadIP(arp-ar_data[16]) != NetOurIP) return; - } switch (ntohs(arp-ar_op)) { case ARPOP_REQUEST: @@ -1601,13 +1592,11 @@ NetReceive(volatile uchar * inpkt, int len) debug(len=%d, v=%02x\n, len, ip-ip_hl_v 0xff); /* Can't deal with anything except IPv4 */ - if ((ip-ip_hl_v 0xf0) != 0x40) { + if ((ip-ip_hl_v 0xf0) != 0x40) return; - } /* Can't deal with IP options (headers != 20 bytes) */ - if ((ip-ip_hl_v 0x0f) 0x05) { + if ((ip-ip_hl_v 0x0f) 0x05) return; - } /* Check the Checksum of the header */ if (!NetCksumOk((uchar *)ip, IP_HDR_SIZE_NO_UDP / 2)) { puts(checksum bad\n); @@ -1946,9 +1935,8 @@ void copy_filename(char *dst, const char *src, int size) --size; } - while ((--size 0) *src (*src != '')) { + while ((--size 0) *src (*src != '')) *dst++ = *src++; - } *dst = '\0'; } -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 3/8] net/net.c: cosmetic: fix whitespace issues
This removes the following checkpatch issues: - ERROR: space prohibited after that open parenthesis '(' - ERROR: space prohibited before that close parenthesis ')' - ERROR: space prohibited after that open square bracket '[' - ERROR: space prohibited after that '' (ctx:WxW) - ERROR: spaces required around that '=' (ctx:VxW) - ERROR: space required before the open parenthesis '(' - ERROR: space required after that ',' (ctx:VxV) - ERROR: need consistent spacing around '+' (ctx:WxV) - WARNING: unnecessary whitespace before a quoted newline - WARNING: please, no spaces at the start of a line - WARNING: space prohibited between function name and open parenthesis '(' Signed-off-by: Luca Ceresoli luca.ceres...@comelit.it Cc: Wolfgang Denk w...@denx.de Cc: Ben Warren biggerbadder...@gmail.com Cc: Mike Frysinger vap...@gentoo.org --- Changes since v1: none. net/net.c | 192 ++-- 1 files changed, 96 insertions(+), 96 deletions(-) diff --git a/net/net.c b/net/net.c index 4715699..172f4d5 100644 --- a/net/net.c +++ b/net/net.c @@ -226,7 +226,7 @@ static ulongtimeDelta; /* THE transmit packet */ volatile uchar *NetTxPacket; -static int net_check_prereq (proto_t protocol); +static int net_check_prereq(proto_t protocol); static int NetTryCount; @@ -243,7 +243,7 @@ uchar NetArpWaitPacketBuf[PKTSIZE_ALIGN + PKTALIGN]; ulong NetArpWaitTimerStart; intNetArpWaitTry; -void ArpRequest (void) +void ArpRequest(void) { int i; volatile uchar *pkt; @@ -253,20 +253,20 @@ void ArpRequest (void) pkt = NetTxPacket; - pkt += NetSetEther (pkt, NetBcastAddr, PROT_ARP); + pkt += NetSetEther(pkt, NetBcastAddr, PROT_ARP); arp = (ARP_t *) pkt; - arp-ar_hrd = htons (ARP_ETHER); - arp-ar_pro = htons (PROT_IP); + arp-ar_hrd = htons(ARP_ETHER); + arp-ar_pro = htons(PROT_IP); arp-ar_hln = 6; arp-ar_pln = 4; - arp-ar_op = htons (ARPOP_REQUEST); + arp-ar_op = htons(ARPOP_REQUEST); /* source ET addr */ - memcpy (arp-ar_data[0], NetOurEther, 6); + memcpy(arp-ar_data[0], NetOurEther, 6); /* source IP addr */ - NetWriteIP ((uchar *) arp-ar_data[6], NetOurIP); + NetWriteIP((uchar *) arp-ar_data[6], NetOurIP); for (i = 10; i 16; ++i) { /* dest ET addr = 0 */ arp-ar_data[i] = 0; @@ -275,7 +275,7 @@ void ArpRequest (void) if ((NetArpWaitPacketIP NetOurSubnetMask) != (NetOurIP NetOurSubnetMask)) { if (NetOurGatewayIP == 0) { - puts (## Warning: gatewayip needed but not set\n); + puts(## Warning: gatewayip needed but not set\n); NetArpWaitReplyIP = NetArpWaitPacketIP; } else { NetArpWaitReplyIP = NetOurGatewayIP; @@ -284,8 +284,8 @@ void ArpRequest (void) NetArpWaitReplyIP = NetArpWaitPacketIP; } - NetWriteIP ((uchar *) arp-ar_data[16], NetArpWaitReplyIP); - (void) eth_send (NetTxPacket, (pkt - NetTxPacket) + ARP_HDR_SIZE); + NetWriteIP((uchar *) arp-ar_data[16], NetArpWaitReplyIP); + (void) eth_send(NetTxPacket, (pkt - NetTxPacket) + ARP_HDR_SIZE); } void ArpTimeoutCheck(void) @@ -302,7 +302,7 @@ void ArpTimeoutCheck(void) NetArpWaitTry++; if (NetArpWaitTry = ARP_TIMEOUT_COUNT) { - puts (\nARP Retry count exceeded; starting again\n); + puts(\nARP Retry count exceeded; starting again\n); NetArpWaitTry = 0; NetStartAgain(); } else { @@ -317,14 +317,14 @@ NetInitLoop(proto_t protocol) { static int env_changed_id; bd_t *bd = gd-bd; - int env_id = get_env_id (); + int env_id = get_env_id(); /* update only when the environment has changed */ if (env_changed_id != env_id) { NetCopyIP(NetOurIP, bd-bi_ip_addr); - NetOurGatewayIP = getenv_IPaddr (gatewayip); - NetOurSubnetMask= getenv_IPaddr (netmask); - NetServerIP = getenv_IPaddr (serverip); + NetOurGatewayIP = getenv_IPaddr(gatewayip); + NetOurSubnetMask = getenv_IPaddr(netmask); + NetServerIP = getenv_IPaddr(serverip); NetOurNativeVLAN = getenv_VLAN(nvlan); NetOurVLAN = getenv_VLAN(vlan); #if defined(CONFIG_CMD_DNS) @@ -389,7 +389,7 @@ NetLoop(proto_t protocol) restart: #ifdef CONFIG_NET_MULTI - memcpy (NetOurEther, eth_get_dev()-enetaddr, 6); + memcpy(NetOurEther, eth_get_dev()-enetaddr, 6); #else eth_getenv_enetaddr(ethaddr, NetOurEther); #endif @@ -403,7 +403,7 @@ restart: */ NetInitLoop(protocol); - switch (net_check_prereq
[U-Boot] [PATCH v2 5/8] net/net.c: cosmetic: fix pointer syntax issues
This removes the following checkpatch issues: - ERROR: foo * bar should be foo *bar - ERROR: (foo*) should be (foo *) Signed-off-by: Luca Ceresoli luca.ceres...@comelit.it Cc: Wolfgang Denk w...@denx.de Cc: Ben Warren biggerbadder...@gmail.com Cc: Mike Frysinger vap...@gentoo.org --- Changes since v1: none. net/net.c | 36 ++-- 1 files changed, 18 insertions(+), 18 deletions(-) diff --git a/net/net.c b/net/net.c index c22da5f..f8c852d 100644 --- a/net/net.c +++ b/net/net.c @@ -592,7 +592,7 @@ startAgainTimeout(void) } static void -startAgainHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len) +startAgainHandler(uchar *pkt, unsigned dest, unsigned src, unsigned len) { /* Totally ignore the packet */ } @@ -653,14 +653,14 @@ void NetStartAgain(void) */ void -NetSetHandler(rxhand_f * f) +NetSetHandler(rxhand_f *f) { packetHandler = f; } void -NetSetTimeout(ulong iv, thand_f * f) +NetSetTimeout(ulong iv, thand_f *f) { if (iv == 0) { timeHandler = (thand_f *)0; @@ -673,7 +673,7 @@ NetSetTimeout(ulong iv, thand_f * f) void -NetSendPacket(volatile uchar * pkt, int len) +NetSendPacket(volatile uchar *pkt, int len) { (void) eth_send(pkt, len); } @@ -768,9 +768,9 @@ int PingSend(void) ip-ip_p = 0x01;/* ICMP */ ip-ip_sum = 0; /* already in network byte order */ - NetCopyIP((void*)ip-ip_src, NetOurIP); + NetCopyIP((void *)ip-ip_src, NetOurIP); /* - - */ - NetCopyIP((void*)ip-ip_dst, NetPingIP); + NetCopyIP((void *)ip-ip_dst, NetPingIP); ip-ip_sum = ~NetCksum((uchar *)ip, IP_HDR_SIZE_NO_UDP / 2); s = ip-udp_src; /* XXX ICMP starts here */ @@ -799,7 +799,7 @@ PingTimeout(void) } static void -PingHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len) +PingHandler(uchar *pkt, unsigned dest, unsigned src, unsigned len) { IPaddr_t tmp; volatile IP_t *ip = (volatile IP_t *)pkt; @@ -1042,13 +1042,13 @@ CDPTimeout(void) } static void -CDPDummyHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len) +CDPDummyHandler(uchar *pkt, unsigned dest, unsigned src, unsigned len) { /* nothing */ } static void -CDPHandler(const uchar * pkt, unsigned len) +CDPHandler(const uchar *pkt, unsigned len) { const uchar *t; const ushort *ss; @@ -1354,7 +1354,7 @@ static inline IP_t *NetDefragment(IP_t *ip, int *lenp) #endif void -NetReceive(volatile uchar * inpkt, int len) +NetReceive(volatile uchar *inpkt, int len) { Ethernet_t *et; IP_t*ip; @@ -1662,8 +1662,8 @@ NetReceive(volatile uchar * inpkt, int len) ip-ip_sum = 0; ip-ip_off = 0; - NetCopyIP((void*)ip-ip_dst, ip-ip_src); - NetCopyIP((void*)ip-ip_src, NetOurIP); + NetCopyIP((void *)ip-ip_dst, ip-ip_src); + NetCopyIP((void *)ip-ip_src, NetOurIP); ip-ip_sum = ~NetCksum((uchar *)ip, IP_HDR_SIZE_NO_UDP 1); @@ -1833,14 +1833,14 @@ static int net_check_prereq(proto_t protocol) /**/ int -NetCksumOk(uchar * ptr, int len) +NetCksumOk(uchar *ptr, int len) { return !((NetCksum(ptr, len) + 1) 0xfffe); } unsigned -NetCksum(uchar * ptr, int len) +NetCksum(uchar *ptr, int len) { ulong xsum; ushort *p = (ushort *)ptr; @@ -1867,7 +1867,7 @@ NetEthHdrSize(void) } int -NetSetEther(volatile uchar * xet, uchar * addr, uint prot) +NetSetEther(volatile uchar *xet, uchar * addr, uint prot) { Ethernet_t *et = (Ethernet_t *)xet; ushort myvlanid; @@ -1892,7 +1892,7 @@ NetSetEther(volatile uchar * xet, uchar * addr, uint prot) } void -NetSetIP(volatile uchar * xip, IPaddr_t dest, int dport, int sport, int len) +NetSetIP(volatile uchar *xip, IPaddr_t dest, int dport, int sport, int len) { IP_t *ip = (IP_t *)xip; @@ -1918,9 +1918,9 @@ NetSetIP(volatile uchar * xip, IPaddr_t dest, int dport, int sport, int len) ip-ip_p = 17; /* UDP */ ip-ip_sum = 0; /* already in network byte order */ - NetCopyIP((void*)ip-ip_src, NetOurIP); + NetCopyIP((void *)ip-ip_src, NetOurIP); /* - - */ - NetCopyIP((void*)ip-ip_dst, dest); + NetCopyIP((void *)ip-ip_dst, dest); ip-udp_src = htons(sport); ip-udp_dst = htons(dport); ip-udp_len = htons(8 + len); -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 7/8] net/net.c: cosmetic: fix indentation
This removes the following checkpatch issues: - ERROR: switch and case should be at the same indent - WARNING: suspect code indent for conditional statements - WARNING: labels should not be indented Signed-off-by: Luca Ceresoli luca.ceres...@comelit.it Cc: Wolfgang Denk w...@denx.de Cc: Ben Warren biggerbadder...@gmail.com Cc: Mike Frysinger vap...@gentoo.org --- Changes since v1: none. net/net.c | 85 ++--- 1 files changed, 42 insertions(+), 43 deletions(-) diff --git a/net/net.c b/net/net.c index 63fc60a..8b4d28e 100644 --- a/net/net.c +++ b/net/net.c @@ -1104,51 +1104,50 @@ CDPHandler(const uchar *pkt, unsigned len) tlen -= 4; switch (type) { - case CDP_DEVICE_ID_TLV: - break; - case CDP_ADDRESS_TLV: - break; - case CDP_PORT_ID_TLV: - break; - case CDP_CAPABILITIES_TLV: - break; - case CDP_VERSION_TLV: - break; - case CDP_PLATFORM_TLV: - break; - case CDP_NATIVE_VLAN_TLV: - nvlan = *ss; - break; - case CDP_APPLIANCE_VLAN_TLV: - t = (const uchar *)ss; - while (tlen 0) { - if (tlen 3) - goto pkt_short; + case CDP_DEVICE_ID_TLV: + break; + case CDP_ADDRESS_TLV: + break; + case CDP_PORT_ID_TLV: + break; + case CDP_CAPABILITIES_TLV: + break; + case CDP_VERSION_TLV: + break; + case CDP_PLATFORM_TLV: + break; + case CDP_NATIVE_VLAN_TLV: + nvlan = *ss; + break; + case CDP_APPLIANCE_VLAN_TLV: + t = (const uchar *)ss; + while (tlen 0) { + if (tlen 3) + goto pkt_short; - applid = t[0]; - ss = (const ushort *)(t + 1); + applid = t[0]; + ss = (const ushort *)(t + 1); #ifdef CONFIG_CDP_APPLIANCE_VLAN_TYPE - if (applid == - CONFIG_CDP_APPLIANCE_VLAN_TYPE) - vlan = *ss; + if (applid == CONFIG_CDP_APPLIANCE_VLAN_TYPE) + vlan = *ss; #else - /* XXX will this work; dunno */ - vlan = ntohs(*ss); + /* XXX will this work; dunno */ + vlan = ntohs(*ss); #endif - t += 3; tlen -= 3; - } - break; - case CDP_TRIGGER_TLV: - break; - case CDP_POWER_CONSUMPTION_TLV: - break; - case CDP_SYSNAME_TLV: - break; - case CDP_SYSOBJECT_TLV: - break; - case CDP_MANAGEMENT_ADDRESS_TLV: - break; + t += 3; tlen -= 3; + } + break; + case CDP_TRIGGER_TLV: + break; + case CDP_POWER_CONSUMPTION_TLV: + break; + case CDP_SYSNAME_TLV: + break; + case CDP_SYSOBJECT_TLV: + break; + case CDP_MANAGEMENT_ADDRESS_TLV: + break; } } @@ -1608,7 +1607,7 @@ NetReceive(volatile uchar *inpkt, int len) #ifdef CONFIG_MCAST_TFTP if (Mcast_addr != tmp) #endif - return; + return; } /* * The function returns the unchanged packet if it's not @@ -1784,7 +1783,7 @@ static int net_check_prereq(proto_t protocol) } #ifdefined(CONFIG_CMD_PING) || defined(CONFIG_CMD_SNTP) || \ defined(CONFIG_CMD_DNS) -common: +common: #endif if (NetOurIP == 0) { @@ -1879,7 +1878,7 @@
[U-Boot] [PATCH v2 6/8] net/net.c: cosmetic: parentheses not required for return
This removes the following checkpatch issue: - ERROR: return is not a function, parentheses are not required Signed-off-by: Luca Ceresoli luca.ceres...@comelit.it Cc: Wolfgang Denk w...@denx.de Cc: Ben Warren biggerbadder...@gmail.com Cc: Mike Frysinger vap...@gentoo.org --- Changes since v1: none. net/net.c | 30 +++--- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/net/net.c b/net/net.c index f8c852d..63fc60a 100644 --- a/net/net.c +++ b/net/net.c @@ -383,7 +383,7 @@ NetLoop(proto_t protocol) #endif if (eth_init(bd) 0) { eth_halt(); - return(-1); + return -1; } restart: @@ -406,7 +406,7 @@ restart: case 1: /* network not configured */ eth_halt(); - return (-1); + return -1; #ifdef CONFIG_NET_MULTI case 2: @@ -521,7 +521,7 @@ restart: if (ctrlc()) { eth_halt(); puts(\nAbort\n); - return (-1); + return -1; } ArpTimeoutCheck(); @@ -578,7 +578,7 @@ restart: return NetBootFileXferSize; case NETLOOP_FAIL: - return (-1); + return -1; } } } @@ -1753,7 +1753,7 @@ static int net_check_prereq(proto_t protocol) case PING: if (NetPingIP == 0) { puts(*** ERROR: ping address not given\n); - return (1); + return 1; } goto common; #endif @@ -1761,7 +1761,7 @@ static int net_check_prereq(proto_t protocol) case SNTP: if (NetNtpServerIP == 0) { puts(*** ERROR: NTP server address not given\n); - return (1); + return 1; } goto common; #endif @@ -1780,7 +1780,7 @@ static int net_check_prereq(proto_t protocol) case TFTP: if (NetServerIP == 0) { puts(*** ERROR: `serverip' not set\n); - return (1); + return 1; } #ifdefined(CONFIG_CMD_PING) || defined(CONFIG_CMD_SNTP) || \ defined(CONFIG_CMD_DNS) @@ -1789,7 +1789,7 @@ static int net_check_prereq(proto_t protocol) if (NetOurIP == 0) { puts(*** ERROR: `ipaddr' not set\n); - return (1); + return 1; } /* Fall through */ @@ -1807,7 +1807,7 @@ static int net_check_prereq(proto_t protocol) switch (num) { case -1: puts(*** ERROR: No ethernet found.\n); - return (1); + return 1; case 0: puts(*** ERROR: `ethaddr' not set\n); break; @@ -1818,17 +1818,17 @@ static int net_check_prereq(proto_t protocol) } NetStartAgain(); - return (2); + return 2; #else puts(*** ERROR: `ethaddr' not set\n); - return (1); + return 1; #endif } /* Fall through */ default: - return (0); + return 0; } - return (0); /* OK */ + return 0; /* OK */ } /**/ @@ -1850,7 +1850,7 @@ NetCksum(uchar *ptr, int len) xsum += *p++; xsum = (xsum 0x) + (xsum 16); xsum = (xsum 0x) + (xsum 16); - return (xsum 0x); + return xsum 0x; } int @@ -1994,5 +1994,5 @@ ushort string_to_VLAN(const char *s) ushort getenv_VLAN(char *var) { - return (string_to_VLAN(getenv(var))); + return string_to_VLAN(getenv(var)); } -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 8/8] net/net.c: cosmetic: do not use assignment in if condition
This removes the following checkpatch issue: - ERROR: do not use assignment in if condition Signed-off-by: Luca Ceresoli luca.ceres...@comelit.it Cc: Wolfgang Denk w...@denx.de Cc: Ben Warren biggerbadder...@gmail.com Cc: Mike Frysinger vap...@gentoo.org --- Changes since v1: none. net/net.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/net/net.c b/net/net.c index 8b4d28e..1c4c982 100644 --- a/net/net.c +++ b/net/net.c @@ -1614,7 +1614,8 @@ NetReceive(volatile uchar *inpkt, int len) * a fragment, and either the complete packet or NULL if * it is a fragment (if !CONFIG_IP_DEFRAG, it returns NULL) */ - if (!(ip = NetDefragment(ip, len))) + ip = NetDefragment(ip, len); + if (!ip) return; /* * watch for ICMP host redirects -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Add missing i.MX boards to MAKEALL
On 05/11/2011 03:58 PM, Fabio Estevam wrote: Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- MAKEALL |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) Hi Fabio, diff --git a/MAKEALL b/MAKEALL index c3df657..a8ff962 100755 --- a/MAKEALL +++ b/MAKEALL @@ -373,6 +373,7 @@ LIST_ARM9= \ spear600\ suen3 \ trab\ + tx25\ Boards are not added anymore to MAKEALL, because the script picks up the boards from boards.cfg. Am I missing something ? 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-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
[U-Boot] [PATCH] MX53: mx53evk: Remove duplicate define
Fix the following warning: ../include/configs/mx53evk.h:195: warning: CONFIG_OF_LIBFDT redefined ../include/configs/mx53evk.h:41: note: this is the location of the previous definition Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- include/configs/mx53evk.h |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/include/configs/mx53evk.h b/include/configs/mx53evk.h index 5749a08..6ac910b 100644 --- a/include/configs/mx53evk.h +++ b/include/configs/mx53evk.h @@ -38,8 +38,6 @@ #define CONFIG_SETUP_MEMORY_TAGS 1 #define CONFIG_INITRD_TAG 1 -#define CONFIG_OF_LIBFDT 1 - /* Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024) -- 1.6.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] MX53: mx53evk: Remove duplicate define
On 05/11/2011 04:16 PM, Fabio Estevam wrote: Fix the following warning: ../include/configs/mx53evk.h:195: warning: CONFIG_OF_LIBFDT redefined ../include/configs/mx53evk.h:41: note: this is the location of the previous definition Hi Fabio, Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- include/configs/mx53evk.h |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/include/configs/mx53evk.h b/include/configs/mx53evk.h index 5749a08..6ac910b 100644 --- a/include/configs/mx53evk.h +++ b/include/configs/mx53evk.h @@ -38,8 +38,6 @@ #define CONFIG_SETUP_MEMORY_TAGS 1 #define CONFIG_INITRD_TAG1 -#define CONFIG_OF_LIBFDT 1 - /* Size of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN(CONFIG_ENV_SIZE + 2 * 1024 * 1024) There is already a patch for this: http://patchwork.ozlabs.org/patch/93978/ 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-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] post: add gpio hotkey support
On Wednesday, May 11, 2011 07:42:09 Sergei Shtylyov wrote: On 10-05-2011 21:01, Mike Frysinger wrote: @@ -68,6 +72,23 @@ int post_init_f (void) int __post_hotkeys_pressed(void) { +#ifdef CONFIG_SYS_POST_HOTKEYS_GPIO + int ret; + unsigned gpio = CONFIG_SYS_POST_HOTKEYS_GPIO; + + ret = gpio_request(gpio, hotkeys); + if (ret) { + printf(POST: gpio hotkey request failed\n); + return 0; + } + + gpio_direction_input(gpio); + ret = gpio_get_value(gpio); + gpio_free(gpio); + + return ret; +#endif You surely meant #else here? + return 0; /* No hotkeys supported */ not really what i was going for. it's fine either way though. -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 0/8] keymile arm boards update, part 2
Hi Prafulla, Valentin Longchamp wrote: This series is the second effort of merging the Keymile boards support back into mainline. This series is a subset of the first patch series: http://lists.denx.de/pipermail/u-boot/2011-April/090013.html The first large series was split up to three independent series, which are easier to review and apply for the custodians. This series adds the km_arm specific parts of the series. All its changes concern our marvell based boards and that's why it should go through the u-boot-marvell git tree. Changes for v3: taken Prafulla's comments into account I have posted those one week ago, and I was wondering if you would be able to review/take them in you tree soon ? Best Regards Valentin Holger Brunck (2): arm/km: add second serial interface for kirkwood arm/km: update mgcoge3un board support Valentin Longchamp (6): arm/km: remove CONFIG_SYS_KWD_CONFIG from keymile-common.h arm/km: move CONFIG_EXTRA_ENV_SETTINGS from board to km_arm file arm/km: introduce bootcount env variable and clean km_arm arm/km: disable ls (through jffs2 support) arm/km: rename mgcoge2un to mgcoge3un mvgbe: enable configurability of PORT_SERIAL_CONTROL_VALUE MAINTAINERS |6 +- board/keymile/km_arm/km_arm.c| 108 +++ board/keymile/km_arm/kwbimage-memphis.cfg| 197 ++ boards.cfg |2 +- drivers/net/mvgbe.h |2 + include/configs/keymile-common.h |9 -- include/configs/km_arm.h | 25 include/configs/{mgcoge2un.h = mgcoge3un.h} | 49 --- include/configs/suen3.h | 15 -- include/configs/suen8.h | 15 -- 10 files changed, 340 insertions(+), 88 deletions(-) create mode 100644 board/keymile/km_arm/kwbimage-memphis.cfg rename include/configs/{mgcoge2un.h = mgcoge3un.h} (56%) -- Valentin Longchamp Embedded Software Engineer Hardware and Chip Integration __ KEYMILE AG Schwarzenburgstr. 73 CH-3097 Liebefeld Phone +41 31 377 1318 Fax +41 31 377 1212 valentin.longch...@keymile.com www.keymile.com __ KEYMILE: A Specialist as a Partner ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [GIT PULL] Pull request: u-boot-imx
Hi Stefano, Le 11/05/2011 07:50, Stefano Babic a écrit : Sorry, my fault. I have already added a further patch to the master branch, instead of using my next as I am used to until you merge my master into u-boot-arm. It shoould be OK now. It is, thanks. Best regards, Stefano Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [GIT PULL] Pull request: u-boot-imx
Hi Stefano, Le 09/05/2011 13:49, Stefano Babic a écrit : Hi Albert, please pull from u-boot-imx. The following changes since commit 96d04c3150ae9284500aef48803d7d132968f2b2: IDE: fix compiler warnings (2011-04-30 23:29:55 +0200) are available in the git repository at: git://www.denx.de/git/u-boot-imx.git master Fabio Estevam (2): MX31: mx31pdk: Add watchdog support gpio: imx: Fix return value on error Stefano Babic (2): MX31: removed warning due to missing prototype MX31: change return value of get_cpu_rev arch/arm/cpu/arm1136/mx31/generic.c | 31 arch/arm/include/asm/arch-mx31/clock.h|1 + arch/arm/include/asm/arch-mx31/imx-regs.h |2 +- board/freescale/mx31pdk/mx31pdk.c | 16 +++ drivers/gpio/mxc_gpio.c |5 ++- include/configs/mx31pdk.h |3 ++ 6 files changed, 42 insertions(+), 16 deletions(-) Applied, thanks. Best regards, Stefano Babic Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request u-boot-marvell.git
Hi Prafulla, Le 11/05/2011 13:51, Prafulla Wadaskar a écrit : Hi Albert Please kindly pull The following changes since commit 33e4e15695f7e502fc414984f67d6636f03854fa: Ben Gardiner (1): da850evm: fix NAND WSTROBE and TA timings are available in the git repository at: u-boot-marvell.git master branch. Clint Adams (4): Rename openrd_base files to openrd Add definitions for OpenRD-Client and OpenRD-Ultimate Initialize second PHY on OpenRD-Client and OpenRD-Ultimate Enable multiple fs options for Marvell SoC family on OpenRD boards Simon Guinot (2): Kirkwood: allow to override CONFIG_SYS_TCLK mv-common.h: fix DRAM banks configuration MAKEALL|2 + arch/arm/include/asm/arch-kirkwood/kw88f6281.h |8 +++-- board/Marvell/{openrd_base = openrd}/Makefile |2 +- board/Marvell/{openrd_base = openrd}/kwbimage.cfg |0 .../{openrd_base/openrd_base.c = openrd/openrd.c} | 33 +--- .../{openrd_base/openrd_base.h = openrd/openrd.h} |0 boards.cfg |4 ++- include/configs/mv-common.h|8 ++-- include/configs/{openrd_base.h = openrd.h}| 33 +--- 9 files changed, 71 insertions(+), 19 deletions(-) rename board/Marvell/{openrd_base = openrd}/Makefile (98%) rename board/Marvell/{openrd_base = openrd}/kwbimage.cfg (100%) rename board/Marvell/{openrd_base/openrd_base.c = openrd/openrd.c} (80%) rename board/Marvell/{openrd_base/openrd_base.h = openrd/openrd.h} (100%) rename include/configs/{openrd_base.h = openrd.h} (81%) Applied, thanks. Regards.. Prafulla . . Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/5] introduce nand write.ubi, and drop ffs for jffs2 too
Hi Detlev, Artem, I'm very sorry that I haven't been back to reply in over a week. Please accept my apologies. On Fri, Apr 29, 2011 at 7:58 AM, Detlev Zundel d...@denx.de wrote: Hi Ben, It was found that on da850evm, where the NAND ECC used does not map all 0xff data to 0xff ECC, that flashing UBI and JFFS2 image from U-boot with nand write[.e] command resulted in alot of ECC errors... for UBI the result was an unmountable filesystem on second attach from linux. For JFFS2 the result was a multitude of ECC errors printed on the cosole on the second mount in Linux -- the filesystem remains mountable for awhile but eventually collapses. I am not sure that I can follow you here so I have to ask you to clarify the problem for me. I understand that a page of 0xffs does _not_ have an ECC of all 0xffs. Actually I would be surprised if there was any ECC having this property, so I doubt that this is da850 specific, correct? Thanks for the review, Detlev. I don't have enough experience with NAND devices or controllers to say whether this property is unique or not. I trust that yours is sufficient to say so. I think I will remove this note from the cover letter in v2. On Fri, Apr 29, 2011 at 9:59 AM, Artem Bityutskiy dedeki...@gmail.com wrote: [...] Can you please enlighten me? I do not know why I'm in CC, but I see that the code to skip all 0xFFs looks like it was copied from UBI. The reason why UBI and UBI user-space tools skip NAND pages with all 0xFFs when writing is described here: http://www.linux-mtd.infradead.org/doc/ubi.html#L_flasher_algo Artem, thank you for picking up my slack and answering Detlev's questions. Yes, the drop_ffs() implementation is copied from ubiformat utility. I'll try to make this clearer in the commit messages and cover letters for v2. On Mon, May 2, 2011 at 9:14 AM, Detlev Zundel d...@denx.de wrote: [...] Can you please enlighten me? [...] If it is too long to read, in short: 1. if we write to flash, we always write to an erased eraseblock, obviously :-) Yes - I simply wasn't sure if the software layers below (in U-Boot) would do an erase on demand before writing. Reading the code, this isn't the case (I should have known this), so the skipping should really be safe. 2. erased erase block contains all 0xFFs, so skipping 0xFF NAND pages is harmless. 3. writing 0xFF pages has side-effects - the ECC bytes in OOB will be used 4. If we are flashing an UBIFS image, UBIFS will use the half-filled eraseblocks, and if the free pages were written with 0xFFs, they'll become unusable. So we skip 0xFF pages at the end. Not all, only the last ones. E.g., if your eraseblock consists of 4 pages, and you write data, 0xFFs, data, 0xFFs, then we'll only write data, 0xFFs, data, so that the last NAND page can be used later. Sorry for my poor English, and I'm writing in a hurry - have to have to a pub to farewell several colleagues who are leaving the company :) Thanks for your input. So I still fail to see where the ECC errors come from. The closes thing that makes sense for me, is that Bens problem very likely wasn't ECC connected at all but the result of the not capable to write twice. I.e. his NAND flashes cannot be written to twice. When he flashed the images in U-Boot, there were trailing empty blocks that got programmed and UBIFS assumed that it _could_ write to them so it tried and failed and somehow got tripped up over this. If this is the case then we should change the commit message to point to the real problem that this patch fixes. I am planning to respin v2 next week; I will 1) remove mention of the ECC mapping 0xff 2) add a link to the faq entry provided by Artem and 3) make clear the origin of the drop_ffs function. I will also rename to nand write.trimffs, thanks for suggestion. How do you feel about making the write.jffs2 function use trimffs as in the last patch of the series? Best Regards, Ben Gardiner --- Nanometrics Inc. http://www.nanometrics.ca ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Pull request: u-boot-arm/master
Hi Wolfgang, The following changes since commit 264eaa0ea967bac32214b87d60cfc86c8b22cac6: keymile boards: move keymile specific header in subdir (2011-05-10 23:22:49 +0200) are available in the git repository at: git://git.denx.de/u-boot-arm master Ben Gardiner (1): da850evm: fix NAND WSTROBE and TA timings Clint Adams (4): Rename openrd_base files to openrd Add definitions for OpenRD-Client and OpenRD-Ultimate Initialize second PHY on OpenRD-Client and OpenRD-Ultimate Enable multiple fs options for Marvell SoC family on OpenRD boards Fabio Estevam (2): MX31: mx31pdk: Add watchdog support gpio: imx: Fix return value on error Simon Guinot (2): Kirkwood: allow to override CONFIG_SYS_TCLK mv-common.h: fix DRAM banks configuration Stefano Babic (2): MX31: removed warning due to missing prototype MX31: change return value of get_cpu_rev MAKEALL|2 + arch/arm/cpu/arm1136/mx31/generic.c| 31 +++ arch/arm/include/asm/arch-kirkwood/kw88f6281.h |8 +++-- arch/arm/include/asm/arch-mx31/clock.h |1 + arch/arm/include/asm/arch-mx31/imx-regs.h |2 +- board/Marvell/{openrd_base = openrd}/Makefile |2 +- board/Marvell/{openrd_base = openrd}/kwbimage.cfg |0 .../{openrd_base/openrd_base.c = openrd/openrd.c} | 33 +--- .../{openrd_base/openrd_base.h = openrd/openrd.h} |0 board/davinci/da8xxevm/da850evm.c |4 +- board/freescale/mx31pdk/mx31pdk.c | 16 + boards.cfg |4 ++- drivers/gpio/mxc_gpio.c|5 ++- include/configs/mv-common.h|8 ++-- include/configs/mx31pdk.h |3 ++ include/configs/{openrd_base.h = openrd.h}| 33 +--- 16 files changed, 115 insertions(+), 37 deletions(-) rename board/Marvell/{openrd_base = openrd}/Makefile (98%) rename board/Marvell/{openrd_base = openrd}/kwbimage.cfg (100%) rename board/Marvell/{openrd_base/openrd_base.c = openrd/openrd.c} (80%) rename board/Marvell/{openrd_base/openrd_base.h = openrd/openrd.h} (100%) rename include/configs/{openrd_base.h = openrd.h} (81%) Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request: u-boot-arm/master
On 2011/05/11 11:07 PM, Albert ARIBAUD wrote: Simon Guinot (2): mv-common.h: fix DRAM banks configuration I think Prafulla already accepted my own change to fix this. Not sure which one is considered better. I had not actually intended mine for merging (no sign off), and had simply posted the patch as part of my DNS323 series. However, Prafulla saw it and merged it some time ago. Regards, Rogan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] mvsata: issue hard reset on initialization
Before the actual initialization do a hard reset of the SATA port and the connected device. changes v1-v2: - add comment for udelay Signed-off-by: Michael Walle mich...@walle.cc Cc: Prafulla Wadaskar prafu...@marvell.com Cc: Albert Aribaud albert.u.b...@aribaud.net --- drivers/block/mvsata_ide.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/drivers/block/mvsata_ide.c b/drivers/block/mvsata_ide.c index 3d6993a..83574ed 100644 --- a/drivers/block/mvsata_ide.c +++ b/drivers/block/mvsata_ide.c @@ -33,7 +33,9 @@ /* SATA port registers */ struct mvsata_port_registers { - u32 reserved1[192]; + u32 reserved0[10]; + u32 edma_cmd; + u32 reserved1[181]; /* offset 0x300 : ATA Interface registers */ u32 sstatus; u32 serror; @@ -76,6 +78,7 @@ struct mvsata_port_registers { * and for SStatus DETection. */ +#define MVSATA_EDMA_CMD_ATA_RST0x0004 #define MVSATA_SCONTROL_DET_MASK 0x000F #define MVSATA_SCONTROL_DET_NONE 0x #define MVSATA_SCONTROL_DET_INIT 0x0001 @@ -115,6 +118,11 @@ static int mvsata_ide_initialize_port(struct mvsata_port_registers *port) u32 status; u32 timeleft = 1; /* wait at most 10 ms for SATA reset to complete */ + /* Hard reset */ + writel(MVSATA_EDMA_CMD_ATA_RST, port-edma_cmd); + udelay(25); /* taken from original marvell port */ + writel(0, port-edma_cmd); + /* Set control IPM to 3 (no low power) and DET to 1 (initialize) */ control = readl(port-scontrol); control = (control ~MVSATA_SCONTROL_MASK) | MVSATA_PORT_INIT; -- 1.7.2.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 1/2] cmd_mmc: eliminate device num in the mmc command
On Mon, May 2, 2011 at 9:27 PM, Lei Wen adrian.w...@gmail.com wrote: I have submit another round of patch, please review it whether it meet your expectation. This is just a quick note to say I haven't forgotten about these or other patches in my queue. I'm just buried in other work at the moment. I intend to get these looked at this week. Andy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 0/2] Add support for LaCie NAS Network Space v2
Hi Albert, Please, consider applying this two patches. Thanks in advance, Simon On Sat, May 07, 2011 at 05:12:50PM +0200, Simon Guinot wrote: This patch series adds support for Network Space v2 board and parents. Changes for v2: - netconsole: restore NetOurIP check - add entries to MAINTAINERS file - move boards from root Makefile to boards.cfg - move MACH_TYPE definition into netspace_v2.h - remove CONFIG_SYS_HZ redefinition - turn PHY initialization message into debug() Changes for v3: - drop patch for Macronix MX25L4005A - rewrite patch sf: disable write protection for Macronix flash, using the common spi flash code - fix Definitions typo in mv-common.h - netconsole: add a /* Fall through */ comment before the NETCONS case label Changes for v4: - sf macronix: use spi_flash_cmd_write_enable() - enhance commit message for patch Add support for Network Space v2 Changes for v5: - add a changelog per patch Changes for v6: - drop accepted patches - enable device tree support for netspace_v2 - clean some #define in netspace_v2.h - enhance commit message for patch Add support for Network Space v2: provide description URL and mention SoC family - rebase patch Add support for Network Space v2 against u-boot-{arm,marvell}/master branches - enhance commit message for patch netconsole: remove `serverip' check Simon Guinot (2): netconsole: remove `serverip' check Add support for Network Space v2 MAINTAINERS |6 + board/LaCie/netspace_v2/Makefile | 49 ++ board/LaCie/netspace_v2/kwbimage.cfg | 162 + board/LaCie/netspace_v2/netspace_v2.c | 144 + board/LaCie/netspace_v2/netspace_v2.h | 39 boards.cfg|3 + include/configs/netspace_v2.h | 153 +++ net/net.c |3 +- 8 files changed, 558 insertions(+), 1 deletions(-) create mode 100644 board/LaCie/netspace_v2/Makefile create mode 100644 board/LaCie/netspace_v2/kwbimage.cfg create mode 100644 board/LaCie/netspace_v2/netspace_v2.c create mode 100644 board/LaCie/netspace_v2/netspace_v2.h create mode 100644 include/configs/netspace_v2.h signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Problem with Porting U-boot on 8308
Hi All, I am new to Uboot, I am trying to port Uboot on 8308, on single steeping the uboot gets stuck at _start_of_vectors_ Machine check exception. Could anyone please explain what STD_EXCEPTION mean in start.S code and why it happens ? Following are some logs BDI8308_ELAN06ti Target CPU: MPC83xx (e300c3) Target state : debug mode Debug entry cause : instruction address breakpoint Current PC: 0xfff0017c Current CR: 0x2000 Current MSR : 0x3072 Current LR: 0xfff00168 BDI8308_ELAN06ti Target CPU: MPC83xx (e300c3) Target state : debug mode Debug entry cause : COP halt Current PC: 0xfff00220 Current CR: 0xe6000efc Current MSR : 0xe6000efc Current LR: 0xe6000efc # Step timeout detected The address 0xfff00220 corresponds to Machine check exception in System.map of u-boot code. Thanks Sharath ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Problem with Porting U-boot on 8308
Dear Sharath Kurudi, In message BANLkTi=U57=pm8somrmhgontba9vqeo...@mail.gmail.com you wrote: I am new to Uboot, I am trying to port Uboot on 8308, on single steeping the uboot gets stuck at _start_of_vectors_ Machine check exception. Could Please read the documentation what a machine check is and why it happens. anyone please explain what STD_EXCEPTION mean in start.S code and why it happens ? STD_EXCEPTION is a macro that is used to instatiate the code for the standard exception handlers. # Step timeout detected The address 0xfff00220 corresponds to Machine check exception in System.map of u-boot code. Did you try reading the BDI FAQs? IIRC there are some referring to debugging of exception handlers. 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 Conscious is when you are aware of something, and conscience is when you wish you weren't. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V7 3/3] MX53: support for freescale MX53LOCO board
Hi, Fabio, On Wed, May 11, 2011 at 8:03 PM, Fabio Estevam fabioeste...@yahoo.com wrote: Hi Jason, --- On Wed, 5/11/11, Jason Liu jason@linaro.org wrote: ... diff --git a/arch/arm/cpu/armv7/mx5/soc.c b/arch/arm/cpu/armv7/mx5/soc.c index 6f4e8db..9c03474 100644 --- a/arch/arm/cpu/armv7/mx5/soc.c +++ b/arch/arm/cpu/armv7/mx5/soc.c ... This file is not MX53Loco specific, so it should be part of another patch. mxc_get_clock(MXC_ARM_CLK) / 100); - printf(Reset cause: %s\n, get_reset_cause()); + printf(Reset cause: %s\n, get_reset_cause()); return 0; What is the purpose of this change? Just make the print looks good. Nothing else. I can remove it. index f687503..2d7e9ed 100644 --- a/arch/arm/include/asm/arch-mx5/sys_proto.h +++ b/arch/arm/include/asm/arch-mx5/sys_proto.h This file is not MX53Loco specific, so it should be part of another patch. Will move to another file as Stefano suggest. Jason Regards, Fabio Estevam ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V7 3/3] MX53: support for freescale MX53LOCO board
Hi, Stefano, On Wed, May 11, 2011 at 8:37 PM, Stefano Babic sba...@denx.de wrote: On 05/11/2011 10:03 AM, Jason Liu wrote: This patch add initial support for freescale MX53LOCO board. Network(FEC),SD/MMC,UART have been supported by this patch The patch also config CPU:1GHZ,DDR:400MHZ for better peformance Signed-off-by: Jason Liu jason@linaro.org Hi Jason, diff --git a/arch/arm/cpu/armv7/mx5/soc.c b/arch/arm/cpu/armv7/mx5/soc.c index 6f4e8db..9c03474 100644 --- a/arch/arm/cpu/armv7/mx5/soc.c +++ b/arch/arm/cpu/armv7/mx5/soc.c @@ -116,7 +116,7 @@ int print_cpuinfo(void) (cpurev 0x000F0) 4, (cpurev 0xF) 0, mxc_get_clock(MXC_ARM_CLK) / 100); - printf(Reset cause: %s\n, get_reset_cause()); + printf(Reset cause: %s\n, get_reset_cause()); return 0; It seems to me this file slips into your patch, but it was not supposed to be. Yes, I will remove it. } #endif diff --git a/arch/arm/include/asm/arch-mx5/sys_proto.h b/arch/arm/include/asm/arch-mx5/sys_proto.h index f687503..2d7e9ed 100644 --- a/arch/arm/include/asm/arch-mx5/sys_proto.h +++ b/arch/arm/include/asm/arch-mx5/sys_proto.h @@ -27,5 +27,7 @@ u32 get_cpu_rev(void); #define is_soc_rev(rev) ((get_cpu_rev() 0xFF) - rev) void sdelay(unsigned long); +void pmic_reg_write(u32 reg, u32 value); +u32 pmic_reg_read(u32 reg); The pmic_ prototypes have nothing to do with the Soc prototype, as they are specific for a driver. You should move them in the dialog header. OK, +int board_init(void) +{ + gd-bd-bi_arch_number = MACH_TYPE_MX53_LOCO; + gd-bd-bi_boot_params = PHYS_SDRAM_1 + 0x100; + +#ifdef CONFIG_I2C_MXC + setup_i2c(0); + power_init(); + clock_init(); +#endif Probably it does not make a lot of sense to build this board without I2C support. If this is the case, you should drop the #ifdef, as your board must always be compiled with I2C. OK, Jason 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-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] Pull request: u-boot-arm/master
Hi Rogan, Le 12/05/2011 00:11, Rogan Dawes a écrit : On 2011/05/11 11:07 PM, Albert ARIBAUD wrote: Simon Guinot (2): mv-common.h: fix DRAM banks configuration I think Prafulla already accepted my own change to fix this. Not sure which one is considered better. Both your and Simon's changes would come from Prafulla's Marvell tree actually. Prafulla, can you comment? Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot