[U-Boot] (no subject)
how to reset or re program this part item s29gl064n90tf103.. can you please help me thanks vic ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 07/11] MX5: mx53evk: use new pmic driver
Hi, Stefano, On Sat, Oct 8, 2011 at 6:07 PM, Stefano Babic sba...@denx.de wrote: Switch to new pmic generic driver. Signed-off-by: Stefano Babic sba...@denx.de CC: Jason Liu jason@linaro.org --- board/freescale/mx53evk/mx53evk.c | 15 +-- include/configs/mx53evk.h | 5 +++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/board/freescale/mx53evk/mx53evk.c b/board/freescale/mx53evk/mx53evk.c index fd821c0..af0948f 100644 --- a/board/freescale/mx53evk/mx53evk.c +++ b/board/freescale/mx53evk/mx53evk.c @@ -32,6 +32,7 @@ #include i2c.h #include mmc.h #include fsl_esdhc.h +#include pmic.h #include fsl_pmic.h #include asm/gpio.h #include mc13892.h @@ -124,12 +125,13 @@ static void setup_i2c(unsigned int port_number) void power_init(void) { unsigned int val; + struct pmic *p = get_pmic(); /* Set VDDA to 1.25V */ - val = pmic_reg_read(REG_SW_2); + pmic_reg_read(p, REG_SW_2, val); val = ~SWX_OUT_MASK; val |= SWX_OUT_1_25; - pmic_reg_write(REG_SW_2, val); + pmic_reg_write(p, REG_SW_2, val); /* * Need increase VCC and VDDA to 1.3V @@ -137,16 +139,16 @@ void power_init(void) */ if (is_soc_rev(CHIP_REV_2_0) == 0) { /* Set VCC to 1.3V for TO2 */ - val = pmic_reg_read(REG_SW_1); + pmic_reg_read(p, REG_SW_1, val); val = ~SWX_OUT_MASK; val |= SWX_OUT_1_30; - pmic_reg_write(REG_SW_1, val); + pmic_reg_write(p, REG_SW_1, val); /* Set VDDA to 1.3V for TO2 */ - val = pmic_reg_read(REG_SW_2); + pmic_reg_read(p, REG_SW_2, val); val = ~SWX_OUT_MASK; val |= SWX_OUT_1_30; - pmic_reg_write(REG_SW_2, val); + pmic_reg_write(p, REG_SW_2, val); } } @@ -364,6 +366,7 @@ int board_init(void) int board_late_init(void) { setup_i2c(1); + pmic_init(); power_init(); return 0; diff --git a/include/configs/mx53evk.h b/include/configs/mx53evk.h index b127b06..dfe07bf 100644 --- a/include/configs/mx53evk.h +++ b/include/configs/mx53evk.h @@ -59,8 +59,9 @@ #define CONFIG_SYS_I2C_SLAVE 0xfe /* PMIC Configs */ -#define CONFIG_FSL_PMIC -#define CONFIG_FSL_PMIC_I2C +#define CONFIG_PMIC +#define CONFIG_PMIC_I2C +#define CONFIG_PMIC_FSL #define CONFIG_SYS_FSL_PMIC_I2C_ADDR 8 /* MMC Configs */ Acked-by: Jason Liu jason@linaro.org -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] USB: Rework USB keyboard driver
Hi Marek, it's hard to evaluate each piece by itself when it's just one patch smooshing it all together Well how would you rework crap code piece by piece? - fix style - abstract out stuff Not like there was so much abstraction it couldn't be squashed into this one. - add new generic key support True, this could be separated out. Well, Remy ... what do you think? A patch that fixes style issues should _only_ fix style issues. It should not contain any functional change. This makes it all easier to review. Not only for me, but for everyone else as well. Kind regards, Remy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/2]: OMAP3 SPL updates
On 10/07/11 02:28, Tom Rini wrote: On Tue, Oct 4, 2011 at 7:59 AM, Tom Rini tr...@ti.com wrote: Hey all, The following short series does two things. First, it re-works where we do memory initalization in SPL for OMAP3 to be board-specific. This is needed since in many cases (beagleboard, omap3evm) what timings we set depend on what hardware we detect ourself to be running on. Second, along those same lines what omap_rev_string tells us is doing to be board specific as well so provide a weak version in the common omap SPL code and lets it be replaced as needed. Please disregard this version, I need to do a full v3 with the right set of board_early_sdrc_init, sorry for the noise. While I was looking at the series, I've got similar thoughts. May be this should be facilitated by providing kind of framework for the board file only to set the right settings and not duplicate the board_early_sdrc_init() function (with changed values)? -- Regards, Igor. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] omap4_panda: Build in cmd_gpio support on panda
Hi Joe, On 10/06/11 23:50, Joe Hershberger wrote: Enable the gpio command Signed-off-by: Joe Hershberger joe.hershber...@ni.com Cc: Joe Hershberger joe.hershber...@gmail.com Cc: Sandeep Paulraj s-paul...@ti.com --- Changes for v2: - Correct a bad merge... sorry. board/ti/panda/panda_mux_data.h |2 +- include/configs/omap4_panda.h |3 +++ 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/board/ti/panda/panda_mux_data.h b/board/ti/panda/panda_mux_data.h index 63448b6..c692c7b 100644 --- a/board/ti/panda/panda_mux_data.h +++ b/board/ti/panda/panda_mux_data.h @@ -212,7 +212,7 @@ const struct pad_conf_entry wkup_padconf_array_non_essential[] = { {PAD0_FREF_SLICER_IN, (M0)},/* fref_slicer_in */ {PAD1_FREF_CLK_IOREQ, (M0)},/* fref_clk_ioreq */ {PAD0_FREF_CLK0_OUT, (M2)}, /* sys_drm_msecure */ - {PAD1_FREF_CLK3_REQ, M7}, /* safe mode */ + {PAD1_FREF_CLK3_REQ, M7}, /* safe mode */ {PAD0_FREF_CLK3_OUT, (M0)}, /* fref_clk3_out */ {PAD1_FREF_CLK4_REQ, (PTU | M3)}, /* led status_1 */ {PAD0_FREF_CLK4_OUT, (PTU | M3)}, /* led status_2 */ diff --git a/include/configs/omap4_panda.h b/include/configs/omap4_panda.h index 67da70e..b88e5ad 100644 --- a/include/configs/omap4_panda.h +++ b/include/configs/omap4_panda.h @@ -35,6 +35,9 @@ #include configs/omap4_common.h +/* GPIO */ +#define CONFIG_CMD_GPIO 1 Boolean defines should not have a value. -- Regards, Igor. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/6] davinci_emac: fix for running with dcache enabled
Hi Mike, On 07.10.2011 21:34, Mike Frysinger wrote: +#ifdef DAVINCI_EMAC_DCACHE +static inline void davinci_flush(void *addr, int size) +{ +flush_dcache_range((unsigned long)addr, +(unsigned long)addr + size); +} + +static inline void davinci_invalidate(void *addr, int size) +{ +invalidate_dcache_range((unsigned long)addr, +(unsigned long)addr + size); +} +#else +#define davinci_flush(addr, size) do {} while (0) +#define davinci_invalidate(addr, size) do {} while (0) +#endif does it really make sense to have this be conditional ? arm926ejs doesn't have {invalidate,flush}_dcache_range(), so we have to add this not to break the driver on DaVinci boards (maybe we need to add empty cache functions on arm926ejs instead?) Regards, Ilya. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] USB: Rework USB keyboard driver
On Sunday, October 09, 2011 11:01:36 AM Remy Bohmer wrote: Hi Marek, it's hard to evaluate each piece by itself when it's just one patch smooshing it all together Well how would you rework crap code piece by piece? - fix style - abstract out stuff Not like there was so much abstraction it couldn't be squashed into this one. - add new generic key support True, this could be separated out. Well, Remy ... what do you think? A patch that fixes style issues should _only_ fix style issues. It should not contain any functional change. This makes it all easier to review. Not only for me, but for everyone else as well. That I understand, but I started the rework with properly passing the keyboard data in mind. That got me to a point where I had to change most of the code, including fixing some of the usb host drivers (because they used that extern new;). And from that point, it was pointless to try keeping it separate. btw Mike, I was wrong, the generic key support can't be separated out, it must be there because you can't access the extern new anymore. Cheers Kind regards, Remy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/6] davinci_emac: fix for running with dcache enabled
On Sun, Oct 09, 2011 at 02:41:47PM +0400, Ilya Yanok wrote: arm926ejs doesn't have {invalidate,flush}_dcache_range(), so we have to add this not to break the driver on DaVinci boards (maybe we need to add empty cache functions on arm926ejs instead?) Even better would be working cache functions, so that DA8xx boards (and presumably other DaVinci processors) can run with Ethernet and cache enabled. There have been a few proposals floating around to do this, but I'm not sure whether they've stalled or are continuing quietly along. Bye for now, -- Laurence Withers, lwith...@guralp.comhttp://www.guralp.com/ Direct tel:+447753988197 or tel:+44408643 Software Engineer General support queries: supp...@guralp.com CMG-DCM CMG-EAM CMG-NAM ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/6] davinci_emac: fix for running with dcache enabled
On Sunday 09 October 2011 06:41:47 Ilya Yanok wrote: On 07.10.2011 21:34, Mike Frysinger wrote: +#ifdef DAVINCI_EMAC_DCACHE +static inline void davinci_flush(void *addr, int size) +{ + flush_dcache_range((unsigned long)addr, + (unsigned long)addr + size); +} + +static inline void davinci_invalidate(void *addr, int size) +{ + invalidate_dcache_range((unsigned long)addr, + (unsigned long)addr + size); +} +#else +#define davinci_flush(addr, size) do {} while (0) +#define davinci_invalidate(addr, size)do {} while (0) +#endif does it really make sense to have this be conditional ? arm926ejs doesn't have {invalidate,flush}_dcache_range(), so we have to add this not to break the driver on DaVinci boards (maybe we need to add empty cache functions on arm926ejs instead?) if the prototype is in include/common.h, then code may assume it exists. if it doesn't exist for a particular cpu, then that cpu is broken and common code (which is what drivers/ is) should not be adding hacks to workaround broken cpus. please add stubs to the cpu you're referring to and drop the DAVINCI_EMAC_DCACHE define. or let whoever cares about that cpu add the defines, but still drop DAVINCI_EMAC_DCACHE. -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 03/15] Nokia RX-51 aka N900 support
On Saturday 08 October 2011 20:20:47 Pali Rohár wrote: On Thursday 01 September 2011 09:57:13 you wrote: On Thursday, September 01, 2011 07:34:29 Pali Rohár wrote: --- /dev/null +++ b/board/nokia/rx51/rx51.c +GraphicDevice gdev; no camel case GraphicDevice is defined in include/video_fb.h ok, nothing you can do about that --- /dev/null +++ b/board/nokia/rx51/rx51.h +const omap3_sysinfo sysinfo = { you should not be defining variable storage in header files this code was derivated from board/ti/beagle/beagle.h and beagle.h still has this code beagle.h is broken too. please don't copy their brokenness :). +/* + * IEN - Input Enable + * IDIS - Input Disable + * PTD - Pull type Down + * PTU - Pull type Up + * DIS - Pull type selection is inactive + * EN - Pull type selection is active + * M0 - Mode 0 + * The commented string gives the final mux configuration for that pin + */ this looks like SoC info and not board specific. should this be in an SoC header somewhere instead ? all boards in board/ti/ has this code dumb behavior shouldn't be encouraged :). that indicates even more strongly that this should be in a SoC header somewhere. -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 04/15] Only delay boot if keyboard open
On Saturday 08 October 2011 19:29:27 Pali Rohár wrote: On Thursday 01 September 2011 09:58:06 you wrote: On Thursday, September 01, 2011 07:34:30 Pali Rohár wrote: board/nokia/rx51/rx51.c |7 +++ include/configs/nokia_rx51.h |1 + this is a new board port. why not squash all your fixes into one instead of sending out an incomplete/buggy board port which needs patches to fixup ? I wrote that my patch series was not complete and not correct. In next (complete) series I will mix board files into one patch. OK please keep replies on the list and don't seen them to specific people -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 6/9] powerpc/mpc8548cds: Update config file
Dear Kumar Gala, In message 9c8cc940-a952-4323-8a48-bd6fb389a...@kernel.crashing.org you wrote: total: 0 errors, 1 warnings, 50 lines checked I don't agree with this checkpatch warning. The extra space adds to = readability so leaving this alone. Indentation must be done by TABs. Single spaces are not allowed. Please fix. 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 Cleverness and Style have no place in getting a project completed. -- Tom Christiansen ___ 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-85xx.git
Dear Kumar Gala, In message alpine.lfd.2.00.1110071105270.5...@right.am.freescale.net you wrote: The following changes since commit 08e4f700ac450ddc5d4819e23df5bc46eb767464: Marek Vasut (1): SPL: Make path to start.S configurable are available in the git repository at: git://git.denx.de/u-boot-mpc85xx master Andy Fleming (1): phylib: Work around bug in Teranetics PHY Becky Bruce (2): powerpc/mpc8641hpcn: fix SRIO BAT config powerpc/mpc86xx: Disable translation for BAT setup Fanzc (1): powerpc/mpc8536ds: Add USB support for MPC8536DS Tang Yuantian (1): fsl_sata: Fix compile error when CONFIG_LBA48 is not defined Timur Tabi (2): powerpc/85xx: CONFIG_ENABLE_36BIT_PHYS does not depend on CONFIG_PHYS_64BIT powerpc/85xx: fix null pointer dereference when init the SGMII TBI PHY Xie Xiaobo (3): powerpc/mpc8536ds: Add eSPI support for MPC8536DS powerpc/mpc8536ds: Invert SDHC_WP pin polarity powerpc/mpc8536ds: Save the env variables to SDcard and SPI flash York Sun (2): powerpc/8xxx: Add support for interactive DDR programming interface powerpc/mpc8xxx: Merge entries in DDR speed table chenhui zhao (1): powerpc/mpc8548cds: Update config file This commit was rejected. I will not pull that. 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 White Rabbit put on his spectacles. Where shall I begin, please your Majesty ? he asked. Begin at the beginning,, the King said, very gravely, and go on till you come to the end: then stop.-- Lewis Carroll ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] image: Implement IH_TYPE_KERNEL_REL
Dear Stephen Warren, In message 74cdbe0f657a3d45afbb94109fb122ff173b23b...@hqmail01.nvidia.com you wrote: But please define first bank - does it mena the firs one initialized, or the lowest start address, or the lowest chip select, or ... ? It's the following currently: gd-bd-bi_dram[0].start * How would you describe this; the first DRAM bank registered with U-Boot? I would even add above explanation to the commen, i. e. something like: first DRAM bank registered with U-Boot (i. e. bd-bi_dram[0].start). * Is this a good value to use, or should getenv_bootm_low() search through all banks to find the one with lowest address or something? I would expect that this works on most (all?) of the existing boards; if a board maps higher addresses first we will probably have to discuss if this is not a bug. Hm... this appears to add some additional code. How much does the size grow? At least when building for Tegra, this adds 576 bytes text, and 136 bytes rodata. That's about a 0.4% size increase to each section. 0.4% of the total image size, not of the code size of this source file, right? I guess it's possible. It'll mean a heck of a lot of ifdef's in the middle of all those multi-test if statements that work on a variety of image types though. Are the size increases above as large as you feared; is it worth making it optional? 0.5 KiB of code is actually quite a lot on some small systems - and most of them will never need this feature. This is actually only needed for ARM so far, so for a _large_ number of boards this is just overhead. 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 Data is a lot like humans: It is born. Matures. Gets married to other data, divorced. Gets old. One thing that it doesn't do is die. It has to be killed. - Arthur Miller ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 1/4] USB: move ehci.h and ehci-core.h into /include/usb/
On Sunday, September 25, 2011 07:25:07 PM Jana Rapava wrote: Signed-off-by: Jana Rapava ferma...@gmail.com Cc: Marek Vasut marek.va...@gmail.com Cc: Remy Bohmer li...@bohmer.net Cc: Fabio Estevam feste...@gmail.com --- Changes for v2: - changed to proper patch Changes for v3: - merged other USB patches from u-boot-pxa/efikasb - offset-based access changed to struct-based access - use {clrset,clr,set}bits_le32() calls - CodingStyle and naming cleanup Changes for v4: - split into patchset - move ehci.h and ehci-core.h into /include/usb/ Uh, I have totally no idea which is the last set of patches here now anymore. Anyway, is there any update or is this plain stuck ? Cheers ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] USB: Rework USB keyboard driver
Dear Marek Vasut, In message 1317990657-17214-2-git-send-email-marek.va...@gmail.com you wrote: Also, fix usb drivers which use extern new. Signed-off-by: Marek Vasut marek.va...@gmail.com Cc: Ajay Kumar Gupta ajay.gu...@ti.com Cc: Bryan Wu bryan...@analog.com Cc: Cliff Cai cliff@analog.com Cc: Mike Frysinger vap...@gentoo.org Cc: Remy Bohmer li...@bohmer.net Cc: Wolfgang Denk w...@denx.de --- common/usb_kbd.c| 644 --- drivers/usb/host/ehci-hcd.c | 20 +-- drivers/usb/musb/musb_hcd.c | 19 +-- include/usb.h |1 + 4 files changed, 369 insertions(+), 315 deletions(-) NOTE: Tested on EfikaSB device, but please test on some more hardware first! diff --git a/common/usb_kbd.c b/common/usb_kbd.c index 503d175..d19551b 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -25,402 +25,490 @@ * */ #include common.h +#include malloc.h #include stdio_dev.h #include asm/byteorder.h #include usb.h -#undef USB_KBD_DEBUG +/* USB Keyboard Debug */ +#undef USB_KBD_DEBUG Please do not undef what is not defined [or what a user might want to define on the command line]. +/* Keyboard sampling rate */ +#define REPEAT_RATE (40 / 4)/* 40msec - 25cps */ +#define REPEAT_DELAY10 /* 10 x REAPEAT_RATE = 400msec */ Please fix the typo while you are at it. And please split code changes and pure cosmetic ones into separate commits. Thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de I'm what passes for a Unix guru in my office. This is a frightening concept. - Lee Ann Goldstein, in 3k55ba$c...@butch.lmsc.lockheed.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Can I boot at image from a jffs2 filesystem
Dear Owain, In message 0e168e936a32d3409718ad71277afe210988085...@mchp057a.global-ad.net you wrote: I am trying to squeeze new features onto a uboot based system where we have run out of flash. In tandum with general optimisation of apps, removal of redundant code etc I wanted to rework our boot schema to reclaim some free space in other part itions. Please trim your line length to some 70 characters or so. 1) Reduce size of kernel partition and increase that of root partition. 2) modify boot to boot kernel from jffs2 root partition. I favour option 2 as this means we maximise flash utilisation; all free spa ce lands in root partition. But can uboot boot a kernel from a JFFS2 partition? Yes, it can. But you usually do not want to do that. Mounting (large) JFFS2 file systems takes considerable time, and you don't really want to have this delay twice - both in U-Boot and in Linux. Such a boot schema does not seem to be documented anywhere? No. Why should it be specifically documnted? Loading a file from a file system is not exactly rocket science... BTW: you might consider moving from JFFS2 to UBIFS... 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 In the bathtub of history the truth is harder to hold than the soap, and much more difficult to find ... - Terry Pratchett, _Sourcery_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] README: fix documentation of CONFIG_SHOW_BOOT_PROGRESS
Dear Michael Jones, In message 4e8ed1ef.8020...@matrix-vision.de you wrote: SOme previous changes added code right in the middle of the typo- double capitalization Thanks for pointing out. + bytes are output before the console is initialised, the two spaces between 'is' and 'initialised' It's actually a TAB. I will submit a separate patch for this and your other comments. + + Please see board_init_f function. + + If you want this config option then, + please define it at your board config file Do we need to say that if you want this option, you need to set it in your board config file? Is there someplace else one would set this option if they wanted it? Not really, indeed. Thanks, patch following. 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 Shakespeare's Law of Prototyping: (Hamlet III, iv, 156-160) O, throw away the worser part of it, And live the purer with the other half. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] README: fix typos and such.
Reported-by: Michael Jones michael.jo...@matrix-vision.de Signed-off-by: Wolfgang Denk w...@denx.de --- README | 13 + 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/README b/README index e0a4d53..c5cfb13 100644 --- a/README +++ b/README @@ -627,7 +627,7 @@ The following options need to be configured: initialised to a buffer of size CONFIG_PRE_CON_BUF_SZ bytes located at CONFIG_PRE_CON_BUF_ADDR. The buffer is a circular buffer, so if more than CONFIG_PRE_CON_BUF_SZ - bytes are output before the console is initialised, the + bytes are output before the console is initialised, the earlier bytes are discarded. 'Sane' compilers will generate smaller code if @@ -2264,9 +2264,9 @@ FIT uImage format: - Standalone program support: CONFIG_STANDALONE_LOAD_ADDR - This option allows to define board specific values - for the address where standalone program gets loaded, - thus overwriting the architecutre dependent default + This option defines a board specific value for the + address where standalone program gets loaded, thus + overwriting the architecture dependent default settings. - Frame Buffer Address: @@ -2276,13 +2276,10 @@ FIT uImage format: address for frame buffer. Then system will reserve the frame buffer address to defined address instead of lcd_setmem (this function - grab the memory for frame buffer by panel's size). + grabs the memory for frame buffer by panel's size). Please see board_init_f function. - If you want this config option then, - please define it at your board config file - - Automatic software updates via TFTP server CONFIG_UPDATE_TFTP CONFIG_UPDATE_TFTP_CNT_MAX -- 1.7.6.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] ppc: Include asm/cache.h in common.h
Dear Anton Staaf, In message CAF6FioV3YFk02Sgp0AasYGQJSNKv=cb-sszcqr8f3s2esya...@mail.gmail.com you wrote: This is needed for the patch cache: add default setting for CONFIG_SYS_CACHELINE_SIZE from Anton Staaf. As cache.h defines CONFIG_SYS_CACHELINE_SIZE for PPC targets. This will remove the following warnings/errors: include/common.h:819:2: warning: #warning CONFIG_SYS_CACHELINE_SIZE not d= efined, using __BIGGEST_ALIGNMENT__ cache.c:33: error: '__BIGGEST_ALIGNMENT__' undeclared (first use in this = function) ... It would be great if this could be enabled for all configs, not just PPC. Would it make sense to remove this check and add #ifndef __ASSEMBLY__ to the other cache.h files? The list is not too long (m68k, sparc, sh, nios2, and arm). I'd be happy to look into that if you'd rather get this in first. Agreed. But please let's do this in a second step (feel free to submit a patch :-) I suggest to just add this under #ifndef __ASSEMBLY__ 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 Never put off until tomorrow what you can put off indefinitely. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] USB: Rework USB keyboard driver
On Sunday, October 09, 2011 08:54:07 PM Wolfgang Denk wrote: Dear Marek Vasut, In message 1317990657-17214-2-git-send-email-marek.va...@gmail.com you wrote: Also, fix usb drivers which use extern new. Signed-off-by: Marek Vasut marek.va...@gmail.com Cc: Ajay Kumar Gupta ajay.gu...@ti.com Cc: Bryan Wu bryan...@analog.com Cc: Cliff Cai cliff@analog.com Cc: Mike Frysinger vap...@gentoo.org Cc: Remy Bohmer li...@bohmer.net Cc: Wolfgang Denk w...@denx.de --- common/usb_kbd.c| 644 --- drivers/usb/host/ehci-hcd.c | 20 +-- drivers/usb/musb/musb_hcd.c | 19 +-- include/usb.h |1 + 4 files changed, 369 insertions(+), 315 deletions(-) NOTE: Tested on EfikaSB device, but please test on some more hardware first! diff --git a/common/usb_kbd.c b/common/usb_kbd.c index 503d175..d19551b 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -25,402 +25,490 @@ * */ #include common.h +#include malloc.h #include stdio_dev.h #include asm/byteorder.h #include usb.h -#undef USB_KBD_DEBUG +/* USB Keyboard Debug */ +#undef USB_KBD_DEBUG Please do not undef what is not defined [or what a user might want to define on the command line]. Command line ? This is a placeholder in case the user wants to debug this piece of code. +/* Keyboard sampling rate */ +#defineREPEAT_RATE (40 / 4)/* 40msec - 25cps */ +#defineREPEAT_DELAY10 /* 10 x REAPEAT_RATE = 400msec */ Please fix the typo while you are at it. True. And please split code changes and pure cosmetic ones into separate commits. Thanks. Well that means I can do all this work one more time :-( I'll get to it sometimes ... later. Cheers Best regards, Wolfgang Denk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] checkpatch compliance
Dear Joe Hershberger, In message CANr=Z=y+q6aoj-+gkc+ydeapgclsaqkpczamhjcrnwts9jx...@mail.gmail.com you wrote: I'm attempting to make the files I touched in several recent patch-series chechkpatch.pl compliant. I've hit several cases which fail and probably shouldn't. For each of these cases, should the warning / error just be ignored or reported to checkpatch maintainers or altered some other way? Please see this message / thread: http://thread.gmane.org/gmane.linux.kernel/1130494/focus=1172475 It would be best if we 1) copied the current checkpatch.pl from Linux to tools/checkpatch.pl (which would also make it easier for all to use the same version) and 2) provide a customized U-Boot specific .config file that takes care about things like the ones you list. ERROR: need consistent spacing around '/' (ctx:WxV) +#define CONFIG_ROOTPATH/nfs/root/path Actually this is IMO wrong. Should it not be /nfs/root/path instead? ERROR: Macros with complex values should be enclosed in parenthesis +#define CONFIG_UBOOTPATH u-boot.bin Ditto here. ERROR: Macros with complex values should be enclosed in parenthesis #218: FILE: include/configs/MPC8313ERDB.h:274: +#define CONFIG_SYS_NAND_BR_PRELIM (CONFIG_SYS_NAND_BASE \ | (2BR_DECC_SHIFT)/* Use HW ECC */ \ - | BR_PS_8 /* Port Size = 8 bit */ \ + | BR_PS_8 /* 8 bit port */ \ | BR_MS_FCM /* MSEL = FCM */ \ - | BR_V )/* valid */ -#define CONFIG_SYS_NAND_OR_PRELIM ( 0x8000/* length 32K */ \ + | BR_V) /* valid */ I think this one should actually be reported. 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 What is wanted is not the will to believe, but the will to find out, which is the exact opposite. -- Bertrand Russell, Skeptical Essays, 1928 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5 01/20] sandbox: Add architecture header files
Dear Simon Glass, In message 1318031631-13643-2-git-send-email-...@chromium.org you wrote: This adds required header files for the sandbox architecture, and a basic description of what sandbox is (README.sandbox). This commit generates a list of 44 checkpatch warnings: This should go to the comment section. I don't want to see this as part of the commit message. 0 errors, 44 warnings for 0001-sandbox-Add-architecture-header-files.patch: warning: arch/sandbox/include/asm/bitops.h,30: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,32: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,34: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,36: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,44: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,54: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,66: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,76: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,88: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,90: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt (These are the bitops and seem to have volatile in all the other archs also.) Existence of bad code examples is no excuse for submitting new bad code. ... +/* + * Function prototypes to keep gcc -Wall happy. + */ +extern void set_bit(int nr, volatile void *addr); + +extern void clear_bit(int nr, volatile void *addr); + +extern void change_bit(int nr, volatile void *addr); I see no reason to accept these voplatiles here. +static inline void __change_bit(int nr, volatile void *addr) +{ + unsigned long mask = BIT_MASK(nr); + unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); + + *p ^= mask; Please note that you actually even drop the volatile property in your implementation. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de There is no statute of limitations on stupidity. - Randomly produced by a computer program called Markov3. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/5] usb:gadget:s5p USB Device Controller (UDC) implementation
Dear Lukasz Majewski, In message 20111007093950.17d94287@lmajewski.digital.local you wrote: Most warnings are related to lines over 80 characters. This code is a debug code. As fair as I remember debug print code shall not be break in Linux kernel for easier debugging. Can you please point me to the respective entry in the CodingStyle file? I don't know what is the policy in u-boot. I haven't seen any guideline about breaking debug code when it is larger than 80 characters (so I stick to kernel policy). We make no distinction between different types of code. Other warnings are related to kernel API (like the min() macro usage) which is different in u-boot. So it needs to be fixed? 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 A supercomputer is a machine that runs an endless loop in 2 seconds. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4] OMAP3: mvblx: Initial support for mvBlueLYNX-X
Dear Michael Jones, In message 4e8ec11b.8040...@matrix-vision.de you wrote: But while we're on the topic- Most of those old warnings were because my board/matrix_vision/mvblx/mvblx.h was based on board/ti/beagle/beagle.h, which would've itself had lots of checkpatch warnings from long lines. Sandeep advised me that this was a poor argument for submitting a patch with warnings, so I submitted v5. Now I've researched this again and found the patch which introduced the warnings for beagle.h and the discussion [2] around it. If it was decided back then to indent the lines with tabs although it caused checkpatch warnings, isn't it reasonable for mvblx.h to be formatted in the same way? I don't care how it's formatted, but I find the inconsistency ugly. There are a few cases where longer lines actually provide better readbility than wrapping the code - these are things like tables of MUX initializations, and the like. But normal code or header files has a strict 80 char line length limit. 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 Star Trek Lives! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] api: export LCD and video to external apps
Dear Che-liang Chiou, In message CANJuy2LVSzvodiim096iqj2kJ3gGD4dR=9-bctO=hjm4nhf...@mail.gmail.com you wrote: Hi Wolfgang Denk, I have added following comments to this call in patch V2. + /*+* This only clears me= ssages on screen, not on serial port. It is+* equivalent to a no-op if n= o display is available.+*/Do you think it is sufficient? Yes, this is OK with me. 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 As of 1992, they're called European Economic Community fries. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH][V3] drivers: add the support for Silicon Image SATA controller
Dear Tang Yuantian-B29983, In message 3c06c26914daca4bb3a368f78ca0b3a70ea...@039-sn1mpn1-005.039d.mgd.msft.net you wrote: Did you say the following warnings: - WARNING: Use #include linux/io.h instead of asm/io.h #79: FILE: drivers/block/sata_sil.c:26: +#include asm/io.h We should add this to a U-Boot specific ignore list. WARNING: externs should be avoided in .c files #90: FILE: drivers/block/sata_sil.c:37: +extern block_dev_desc_t sata_dev_desc[CONFIG_SYS_SATA_MAX_DEVICE]; This should be fixed. The first warning can't be fixed because there is no linux/io.h in uboot. Agreed. I left the second warning on purpose because other sata drivers do the same way. Well, it would be better to fix the other drivers as well. I will fix the second warning. 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 It is a human characteristic to love little animals, especially if they're attractive in some way. -- McCoy, The Trouble with Tribbles, stardate 4525.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] USB: Rework USB keyboard driver
Dear Marek Vasut, In message 201110092112.18014.marek.va...@gmail.com you wrote: +#undef USB_KBD_DEBUG Please do not undef what is not defined [or what a user might want to define on the command line]. Command line ? This is a placeholder in case the user wants to debug this piece of code. GCC command line. Please do not add dead code. Remove that line. And please split code changes and pure cosmetic ones into separate commits. Thanks. Well that means I can do all this work one more time :-( I'll get to it sometimes ... later. Don't blame me. You should know these rules by now. You have been through this more thanonce before. 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 Documentation is the castor oil of programming. Managers know it must be good because the programmers hate it so much. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/6] ColdFire: Cleanup lds files for multiple defined symbols
From: Stany MARCEL [mailto:stany.mar...@novasys-ingenierie.com] Sent: Wednesday, September 14, 2011 8:44 PM To: u-boot@lists.denx.de Cc: Jin Zhengxiong-R64188; Jin Zhengxiong-R64188; Stany MARCEL Subject: [PATCH 1/6] ColdFire: Cleanup lds files for multiple defined symbols Lds files cleened to remove multiple defined section and modified to be compliant with --gc-sections added for ColdFire platform in a previous patch. Signed-off-by: Stany MARCEL stany.mar...@novasys-ingenierie.com --- board/BuS/EB+MCF-EV123/u-boot.lds | 73 ++- board/cobra5272/u-boot.lds | 69 ++ board/esd/tasreg/u-boot.lds | 69 +- board/freescale/m5235evb/u-boot.16 | 71 ++- board/freescale/m5235evb/u-boot.32 | 79 ++ board/freescale/m5249evb/u-boot.lds | 68 + board/freescale/m5253evbe/u-boot.lds | 67 +--- board/freescale/m5271evb/u-boot.lds | 66 +--- board/freescale/m5272c3/u-boot.lds | 67 +--- board/freescale/m5275evb/u-boot.lds | 68 ++--- board/freescale/m5282evb/u-boot.lds | 70 ++ board/idmr/u-boot.lds | 69 +- 12 files changed, 150 insertions(+), 686 deletions(-) [snip] diff --git a/board/cobra5272/u-boot.lds b/board/cobra5272/u-boot.lds index da14807..6c2dfe8 100644 --- a/board/cobra5272/u-boot.lds +++ b/board/cobra5272/u-boot.lds @@ -1,5 +1,5 @@ /* - * (C) Copyright 2000 + * (C) Copyright 2000-2003 * Wolfgang Denk, DENX Software Engineering, w...@denx.de. [Jin Zhengxiong-R64188] Please double check the year for the Copyright, Thanks. Best Regards, Jason I merged with another files with this copyright years. Each time a file is edited do I have to actualizes end dates ? Or leave them as they are ? Regards, Stany Hello, As I've got no response I write a new message. Regards, -- Stany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] ppc: Include asm/cache.h in common.h
Dear Stefan Roese, In message 1317985534-11135-1-git-send-email...@denx.de you wrote: This is needed for the patch cache: add default setting for CONFIG_SYS_CACHELINE_SIZE from Anton Staaf. As cache.h defines CONFIG_SYS_CACHELINE_SIZE for PPC targets. This will remove the following warnings/errors: include/common.h:819:2: warning: #warning CONFIG_SYS_CACHELINE_SIZE not defined, using __BIGGEST_ALIGNMENT__ cache.c:33: error: '__BIGGEST_ALIGNMENT__' undeclared (first use in this function) Signed-off-by: Stefan Roese s...@denx.de Cc: Anton Staaf robot...@chromium.org Cc: Wolfgang Denk w...@denx.de --- include/common.h |8 1 files changed, 8 insertions(+), 0 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de ...one of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs. - Robert Firth ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] ppc: Fix DBSR_IAx defines in bedbug/regs.h
Dear Stefan Roese, In message 1317985549-11206-1-git-send-email...@denx.de you wrote: While adding asm/cache.h to common.h for PPC targets, I got an error about multiple definitions of some DBSR_ macros. While scanning these defines, I noticed that some where defined not correctly for all PPC variants. So I removed all unused defines, and corrected the ones really used by bedbug (book-e vs. ppc40x). Signed-off-by: Stefan Roese s...@denx.de Cc: Wolfgang Denk w...@denx.de --- include/bedbug/regs.h | 31 +++ 1 files changed, 15 insertions(+), 16 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de There is an old custom among my people. When a woman saves a man's life, he is grateful. -- Nona, the Kanuto which woman, A Private Little War, stardate 4211.8. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 1/4] USB: move ehci.h and ehci-core.h into /include/usb/
2011/10/9 Marek Vasut marek.va...@gmail.com On Sunday, September 25, 2011 07:25:07 PM Jana Rapava wrote: Signed-off-by: Jana Rapava ferma...@gmail.com Cc: Marek Vasut marek.va...@gmail.com Cc: Remy Bohmer li...@bohmer.net Cc: Fabio Estevam feste...@gmail.com --- Changes for v2: - changed to proper patch Changes for v3: - merged other USB patches from u-boot-pxa/efikasb - offset-based access changed to struct-based access - use {clrset,clr,set}bits_le32() calls - CodingStyle and naming cleanup Changes for v4: - split into patchset - move ehci.h and ehci-core.h into /include/usb/ Uh, I have totally no idea which is the last set of patches here now anymore. Anyway, is there any update or is this plain stuck ? Cheers Last set of patches is there: [0/4] http://lists.denx.de/pipermail/u-boot/2011-September/102729.html [1/4] http://lists.denx.de/pipermail/u-boot/2011-September/102720.html [2/4] http://lists.denx.de/pipermail/u-boot/2011-September/102719.html [3/4] http://lists.denx.de/pipermail/u-boot/2011-September/102721.html [4/4] http://lists.denx.de/pipermail/u-boot/2011-September/102803.html I haven't found time to work on this recently, I have some problems in school which I absolutely have to solve first. Regards, Jana Rapava ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] common/image.c: remove duplicated IH_TYPE entries.
Dear Wolfgang Denk, In message 1317969361-24887-1-git-send-email...@denx.de you wrote: Also rearrange IH_TYPE table slightly. Signed-off-by: Wolfgang Denk w...@denx.de --- common/image.c |9 +++-- 1 files changed, 3 insertions(+), 6 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition. - Isaac Asimov ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3] cmd_time: add time command
Dear Che-Liang Chiou, In message 1317980448-25774-1-git-send-email-clch...@chromium.org you wrote: The 'time' command runs and reports execution time of commands. Sample usage: u-boot# time crc 0x1000 1000 CRC32 for 1000 ... 1fff == ae94dc4b time: 0.004 seconds, 4 ticks Signed-off-by: Che-Liang Chiou clch...@chromium.org --- Changes since V2 - Remove CONFIG_CMD_TIME from config_cmd_all.h Changes Since V1 - Switch unsigned long int to ulong to match function prototype - Remove unnecessary 'ifdef CONFIG_SYS_HZ' guard - Factor out codes into the run_command_and_time_it() function README|1 + common/Makefile |1 + common/cmd_time.c | 90 + 3 files changed, 92 insertions(+), 0 deletions(-) create mode 100644 common/cmd_time.c Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de War is never imperative. -- McCoy, Balance of Terror, stardate 1709.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/7] arch/arm/lib/board.c: fix warning: variable ... set but not used
Dear Wolfgang Denk, In message 1317849453-8216-1-git-send-email...@denx.de you wrote: Fix: board.c:445:8: warning: variable 'bd' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk w...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net --- arch/arm/lib/board.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Anyone who knows history, particularly the history of Europe, will, I think, recognize that the domination of education or of government by any one particular religious faith is never a happy arrangement for the people. - Eleanor Roosevelt ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/7] CFI: fix warning: variable ... set but not used
Dear Wolfgang Denk, In message 1317849453-8216-2-git-send-email...@denx.de you wrote: Fix: cfi_mtd.c: In function 'cfi_mtd_init': cfi_mtd.c:226:19: warning: variable 'mtd_list' set but not used [-Wunused-but-set-variable] cfi_mtd.c: In function 'cfi_mtd_init': cfi_mtd.c:226:19: warning: variable 'mtd_list' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk w...@denx.de Cc: Stefan Roese s...@denx.de --- common/cmd_mtdparts.c |9 +++-- drivers/mtd/cfi_mtd.c |4 2 files changed, 11 insertions(+), 2 deletions(-) Applied (with changes to fix the other issue, too). 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 Is truth not truth for all? -- Natira, For the World is Hollow and I have Touched the Sky, stardate 5476.4. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/7] fs/jffs2/jffs2_1pass.c: fix warning: variable ... set but not used
Dear Wolfgang Denk, In message 1317849453-8216-3-git-send-email...@denx.de you wrote: Fix: jffs2_1pass.c: In function 'jffs2_1pass_read_inode': jffs2_1pass.c:699:7: warning: variable 'ret' set but not used [-Wunused-but-set-variable] jffs2_1pass.c: In function 'jffs2_1pass_build_lists': jffs2_1pass.c:1578:14: warning: variable 'empty_start' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk w...@denx.de --- fs/jffs2/jffs2_1pass.c | 14 -- 1 files changed, 4 insertions(+), 10 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de If all you have is a hammer, everything looks like a nail. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/7] drivers/net/smc91111.c: fix warning: variable ... set but not used
Dear Wolfgang Denk, In message 1317849453-8216-4-git-send-email...@denx.de you wrote: Fix: smc9.c: In function 'smc_phy_configure': smc9.c:1194:6: warning: variable 'failed' set but not used [-Wunused-but-set-variable] smc9.c:1190:7: warning: variable 'phyaddr' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk w...@denx.de --- drivers/net/smc9.c |8 1 files changed, 0 insertions(+), 8 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de The price of curiosity is a terminal experience. - Terry Pratchett, _The Dark Side of the Sun_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/7] common/cmd_usb.c: fix warning: variable ... set but not used
Dear Wolfgang Denk, In message 1317849453-8216-5-git-send-email...@denx.de you wrote: Fix: cmd_usb.c: In function 'usb_show_tree_graph': cmd_usb.c:284:29: warning: variable 'port' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk w...@denx.de Cc: Remy Bohmer li...@bohmer.net --- common/cmd_usb.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de You are only young once, but you can stay immature indefinitely. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 6/7] drivers/usb/host/ohci-hcd.c: fix warning: variable ... set but not used
Dear Wolfgang Denk, In message 1317849453-8216-6-git-send-email...@denx.de you wrote: Fix: ohci-hcd.c: In function 'dl_transfer_length': ohci-hcd.c:968:8: warning: variable 'tdINFO' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk w...@denx.de Cc: Remy Bohmer li...@bohmer.net --- drivers/usb/host/ohci-hcd.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de The shortest unit of time in the multiverse is the News York Second, defined as the period of time between the traffic lights turning green and the cab behind you honking. - Terry Pratchett, _Lords and Ladies_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 7/7] common/usb.c: fix warning: variable ... set but not used
Dear Wolfgang Denk, In message 1317849453-8216-7-git-send-email...@denx.de you wrote: Fix: usb.c: In function 'usb_parse_config': usb.c:331:17: warning: variable 'ch' set but not used [-Wunused-but-set-variable] usb.c: In function 'usb_hub_port_connect_change': usb.c:1123:29: warning: variable 'portchange' set but not used [-Wunused-but-set-variable] usb.c: In function 'usb_hub_configure': usb.c:1183:25: warning: variable 'hubsts' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk w...@denx.de Cc: Remy Bohmer li...@bohmer.net --- common/usb.c | 20 +--- 1 files changed, 13 insertions(+), 7 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de God may be subtle, but He isn't plain mean. - Albert Einstein ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/7] arch/arm/lib/board.c: fix warning: variable ... set but not used
Dear Simon Glass, In message capnjgz2oku0d5kzjhjnqar2zi_8y0fsp1pskpcy5gsdey1i...@mail.gmail.com you wrote: Sorry if I have missed a mailing list patch, but in my version of the source there is a line a little lower down which uses bd: mmc_initialize(bd); Of course it can just become gd-bd so there is no problem removing the variable. You are right - thanks for pointing out. Fixed when checking in. 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 If I don't document something, it's usually either for a good reason, or a bad reason. In this case it's a good reason. :-) - Larry Wall in 1992jan17.005405.16...@netlabs.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] README: fix documentation of CONFIG_SHOW_BOOT_PROGRESS
Dear Wolfgang Denk, In message 1317974690-6739-1-git-send-email...@denx.de you wrote: SOme previous changes added code right in the middle of the description of CONFIG_SHOW_BOOT_PROGRESS. Move this text down. Fix formatting while we are at it. Signed-off-by: Wolfgang Denk w...@denx.de --- README | 72 1 files changed, 36 insertions(+), 36 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Democracy is mob rule, but with income taxes. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] README: fix typos and such.
Dear Wolfgang Denk, In message 1318187362-9798-1-git-send-email...@denx.de you wrote: Reported-by: Michael Jones michael.jo...@matrix-vision.de Signed-off-by: Wolfgang Denk w...@denx.de --- README | 13 + 1 files changed, 5 insertions(+), 8 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Another megabytes the dust. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/7] Add cache line alignment support
Dear Anton Staaf, In message 1317763491-7274-1-git-send-email-robot...@chromium.org you wrote: The cache line alignment issue has gone around a couple of times now. This patch set implements all of the details that we have discussed about the implementation of ALLOC_CACHE_ALIGN_BUFFER other than the switch to the Linux style L1_CACHE_BYTES, L1_CACHE_SHIFT, and ARCH_DMA_MINALIGN defines mentioned by Mike Frysinger. It also includes patches that use the macro to fix MMC and ext2 buffers, as well as define the CONFIG_SYS_CACHELINE_SIZE value for Tegra and add a default value for CONFIG_SYS_CACHELINE_SIZE with a warning if it is used. About the Linux defines that Mike suggests. It may make sense to move these patches over to use that mechanism, especially since there are only a few configs that define CONFIG_SYS_CACHELINE_SIZE anyway. Also, since this is an architecture specific parameter and not a board specific one it makes sense that these configs would be architecture specific. I am also not supper happy with the fact that most boards generate a warning with this patchset, because they don't set CONFIG_SYS_CACHELINE_SIZE. But I'm not sure that silently providing a default is a good idea. I think we can discuss the relative merrits of that move independently of the implementation of this fix though, and I wanted to get this discussion going again. Sorry, but I'm going to back out all these patches from my tree again. I can;t get this to work. With the patches applied, I get all kinds of #warning CONFIG_SYS_CACHELINE_SIZE not defined, using __BIGGEST_ALIGNMENT__ for Power Atchitecture systems (ppc4xx expecially). Stefan Roese provided the ppc: Include asm/cache.h in common.h and ppc: Fix DBSR_IAx defines in bedbug/regs.h to fix this on PPC, but now I see the same on ARM, like that: Configuring for jornada board... In file included from /home/wd/git/u-boot/work/lib/asm-offsets.c:18:0: /home/wd/git/u-boot/work/include/common.h:825:2: warning: #warning CONFIG_SYS_CACHELINE_SIZE not defined, using __BIGGEST_ALIGNMENT__ [-Wcpp] In file included from hello_world.c:24:0: /home/wd/git/u-boot/work/include/common.h:825:2: warning: #warning CONFIG_SYS_CACHELINE_SIZE not defined, using __BIGGEST_ALIGNMENT__ [-Wcpp] In file included from /home/wd/git/u-boot/work/include/exports.h:6:0, from stubs.c:1: /home/wd/git/u-boot/work/include/common.h:825:2: warning: #warning CONFIG_SYS_CACHELINE_SIZE not defined, using __BIGGEST_ALIGNMENT__ [-Wcpp] ^Carm-linux-gnueabi-size: '/work/wd/tmp-arm/u-boot': No such file Please fix, and resubmit. Please make sure to run MAKEALL not only for your boards, but for some architectures (say, ARM, MIPS and PPC). 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 When anyone says `theoretically,' they really mean `not really.' - David Parnas ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] ppc: Include asm/cache.h in common.h
On Sun, Oct 9, 2011 at 12:11 PM, Wolfgang Denk w...@denx.de wrote: Dear Anton Staaf, In message CAF6FioV3YFk02Sgp0AasYGQJSNKv=cb-sszcqr8f3s2esya...@mail.gmail.com you wrote: This is needed for the patch cache: add default setting for CONFIG_SYS_CACHELINE_SIZE from Anton Staaf. As cache.h defines CONFIG_SYS_CACHELINE_SIZE for PPC targets. This will remove the following warnings/errors: include/common.h:819:2: warning: #warning CONFIG_SYS_CACHELINE_SIZE not d= efined, using __BIGGEST_ALIGNMENT__ cache.c:33: error: '__BIGGEST_ALIGNMENT__' undeclared (first use in this = function) ... It would be great if this could be enabled for all configs, not just PPC. Would it make sense to remove this check and add #ifndef __ASSEMBLY__ to the other cache.h files? The list is not too long (m68k, sparc, sh, nios2, and arm). I'd be happy to look into that if you'd rather get this in first. Agreed. But please let's do this in a second step (feel free to submit a patch :-) Will do. :) Thanks, Anton I suggest to just add this under #ifndef __ASSEMBLY__ 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 Never put off until tomorrow what you can put off indefinitely. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/7] Add cache line alignment support
On Sun, Oct 9, 2011 at 2:22 PM, Wolfgang Denk w...@denx.de wrote: Dear Anton Staaf, In message 1317763491-7274-1-git-send-email-robot...@chromium.org you wrote: The cache line alignment issue has gone around a couple of times now. This patch set implements all of the details that we have discussed about the implementation of ALLOC_CACHE_ALIGN_BUFFER other than the switch to the Linux style L1_CACHE_BYTES, L1_CACHE_SHIFT, and ARCH_DMA_MINALIGN defines mentioned by Mike Frysinger. It also includes patches that use the macro to fix MMC and ext2 buffers, as well as define the CONFIG_SYS_CACHELINE_SIZE value for Tegra and add a default value for CONFIG_SYS_CACHELINE_SIZE with a warning if it is used. About the Linux defines that Mike suggests. It may make sense to move these patches over to use that mechanism, especially since there are only a few configs that define CONFIG_SYS_CACHELINE_SIZE anyway. Also, since this is an architecture specific parameter and not a board specific one it makes sense that these configs would be architecture specific. I am also not supper happy with the fact that most boards generate a warning with this patchset, because they don't set CONFIG_SYS_CACHELINE_SIZE. But I'm not sure that silently providing a default is a good idea. I think we can discuss the relative merrits of that move independently of the implementation of this fix though, and I wanted to get this discussion going again. Sorry, but I'm going to back out all these patches from my tree again. I can;t get this to work. With the patches applied, I get all kinds of #warning CONFIG_SYS_CACHELINE_SIZE not defined, using __BIGGEST_ALIGNMENT__ for Power Atchitecture systems (ppc4xx expecially). Stefan Roese provided the ppc: Include asm/cache.h in common.h and ppc: Fix DBSR_IAx defines in bedbug/regs.h to fix this on PPC, but now I see the same on ARM, like that: Configuring for jornada board... In file included from /home/wd/git/u-boot/work/lib/asm-offsets.c:18:0: /home/wd/git/u-boot/work/include/common.h:825:2: warning: #warning CONFIG_SYS_CACHELINE_SIZE not defined, using __BIGGEST_ALIGNMENT__ [-Wcpp] In file included from hello_world.c:24:0: /home/wd/git/u-boot/work/include/common.h:825:2: warning: #warning CONFIG_SYS_CACHELINE_SIZE not defined, using __BIGGEST_ALIGNMENT__ [-Wcpp] In file included from /home/wd/git/u-boot/work/include/exports.h:6:0, from stubs.c:1: /home/wd/git/u-boot/work/include/common.h:825:2: warning: #warning CONFIG_SYS_CACHELINE_SIZE not defined, using __BIGGEST_ALIGNMENT__ [-Wcpp] ^Carm-linux-gnueabi-size: '/work/wd/tmp-arm/u-boot': No such file Please fix, and resubmit. Please make sure to run MAKEALL not only for your boards, but for some architectures (say, ARM, MIPS and PPC). Yup, I was surprised that it went in so quickly actually. I did point out the warnings that would be generated. But perhaps I should have been more clear about just how many would be generated. I'll look into a solution. I am hoping that it won't be that I need to understand the cache line sizes of all architectures and fix them all to define CONFIG_SYS_CACHELINE_SIZE. :) Thanks, Anton 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 When anyone says `theoretically,' they really mean `not really.' - David Parnas ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5 01/20] sandbox: Add architecture header files
Hi Wolfgang, On Sun, Oct 9, 2011 at 12:28 PM, Wolfgang Denk w...@denx.de wrote: Dear Simon Glass, In message 1318031631-13643-2-git-send-email-...@chromium.org you wrote: This adds required header files for the sandbox architecture, and a basic description of what sandbox is (README.sandbox). This commit generates a list of 44 checkpatch warnings: This should go to the comment section. I don't want to see this as part of the commit message. Neither do I, but I guessed another patch version was coming. I will move it. 0 errors, 44 warnings for 0001-sandbox-Add-architecture-header-files.patch: warning: arch/sandbox/include/asm/bitops.h,30: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,32: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,34: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,36: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,44: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,54: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,66: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,76: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,88: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,90: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt (These are the bitops and seem to have volatile in all the other archs also.) Existence of bad code examples is no excuse for submitting new bad code. OK. I will drop volatile from the patch. Are you OK with the other checkpatch problems? Regards, Simon ... +/* + * Function prototypes to keep gcc -Wall happy. + */ +extern void set_bit(int nr, volatile void *addr); + +extern void clear_bit(int nr, volatile void *addr); + +extern void change_bit(int nr, volatile void *addr); I see no reason to accept these voplatiles here. +static inline void __change_bit(int nr, volatile void *addr) +{ + unsigned long mask = BIT_MASK(nr); + unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); + + *p ^= mask; Please note that you actually even drop the volatile property in your implementation. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de There is no statute of limitations on stupidity. - Randomly produced by a computer program called Markov3. ___ 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-85xx.git
On Oct 9, 2011, at 1:34 PM, Wolfgang Denk wrote: Dear Kumar Gala, In message alpine.lfd.2.00.1110071105270.5...@right.am.freescale.net you wrote: The following changes since commit 08e4f700ac450ddc5d4819e23df5bc46eb767464: Marek Vasut (1): SPL: Make path to start.S configurable are available in the git repository at: git://git.denx.de/u-boot-mpc85xx master Andy Fleming (1): phylib: Work around bug in Teranetics PHY Becky Bruce (2): powerpc/mpc8641hpcn: fix SRIO BAT config powerpc/mpc86xx: Disable translation for BAT setup Fanzc (1): powerpc/mpc8536ds: Add USB support for MPC8536DS Tang Yuantian (1): fsl_sata: Fix compile error when CONFIG_LBA48 is not defined Timur Tabi (2): powerpc/85xx: CONFIG_ENABLE_36BIT_PHYS does not depend on CONFIG_PHYS_64BIT powerpc/85xx: fix null pointer dereference when init the SGMII TBI PHY Xie Xiaobo (3): powerpc/mpc8536ds: Add eSPI support for MPC8536DS powerpc/mpc8536ds: Invert SDHC_WP pin polarity powerpc/mpc8536ds: Save the env variables to SDcard and SPI flash York Sun (2): powerpc/8xxx: Add support for interactive DDR programming interface powerpc/mpc8xxx: Merge entries in DDR speed table chenhui zhao (1): powerpc/mpc8548cds: Update config file This commit was rejected. I will not pull that. Rejected how? I saw the checkpatch comments, reviewed and disagree with it. I think there should be some maintainer purview here. - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] powerpc/mpc8548cds: Update config file
From: chenhui zhao chenhui.z...@freescale.com - Increase the size of malloc space. - Enable e1000 network card. - Show pci devices on startup. - Change the location of env address. - Use hwconfig to turn off ECC by default. [Kumar Gala] Fixed white space formating for CONFIG_EXTRA_ENV_SETTINGS Signed-off-by: Zhao Chenhui chenhui.z...@freescale.com Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- * fixed whitespace / checkpatch issue include/configs/MPC8548CDS.h | 44 - 1 files changed, 26 insertions(+), 18 deletions(-) diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h index 63e23c2..ab887c1 100644 --- a/include/configs/MPC8548CDS.h +++ b/include/configs/MPC8548CDS.h @@ -86,6 +86,7 @@ extern unsigned long get_clock_freq(void); #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for DDR setup*/ #define CONFIG_DDR_SPD +#define CONFIG_DDR_ECC #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER /* DDR controller or DMA? */ #define CONFIG_MEM_INIT_VALUE 0xDeadBeef @@ -162,6 +163,7 @@ extern unsigned long get_clock_freq(void); #define CONFIG_SYS_FLASH_CFI #define CONFIG_SYS_FLASH_EMPTY_INFO +#define CONFIG_HWCONFIG/* enable hwconfig */ /* * SDRAM on the Local Bus @@ -276,7 +278,7 @@ extern unsigned long get_clock_freq(void); #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */ -#define CONFIG_SYS_MALLOC_LEN (128 * 1024)/* Reserved for malloc */ +#define CONFIG_SYS_MALLOC_LEN (1024 * 1024) /* Reserved for malloc */ /* Serial Port */ #define CONFIG_CONS_INDEX 2 @@ -381,8 +383,9 @@ extern unsigned long get_clock_freq(void); #undef CONFIG_EEPRO100 #undef CONFIG_TULIP +#define CONFIG_E1000 /* Define e1000 pci Ethernet card */ -#undef CONFIG_PCI_SCAN_SHOW/* show pci devices on startup */ +#define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ #endif /* CONFIG_PCI */ @@ -423,8 +426,12 @@ extern unsigned long get_clock_freq(void); * Environment */ #define CONFIG_ENV_IS_IN_FLASH 1 -#define CONFIG_ENV_ADDR(CONFIG_SYS_MONITOR_BASE + 0x4) -#define CONFIG_ENV_SECT_SIZE 0x4 /* 256K(one sector) for env */ +#if CONFIG_SYS_MONITOR_BASE 0xfff8 +#define CONFIG_ENV_ADDR0xfff8 +#else +#define CONFIG_ENV_ADDR(CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE) +#endif +#define CONFIG_ENV_SECT_SIZE 0x2 /* 128K for env */ #define CONFIG_ENV_SIZE0x2000 #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ @@ -524,20 +531,21 @@ extern unsigned long get_clock_freq(void); #define CONFIG_BAUDRATE115200 -#defineCONFIG_EXTRA_ENV_SETTINGS \ - netdev=eth0\0 \ - uboot= MK_STR(CONFIG_UBOOTPATH) \0\ - tftpflash=tftpboot $loadaddr $uboot;\ - protect off MK_STR(CONFIG_SYS_TEXT_BASE) +$filesize; \ - erase MK_STR(CONFIG_SYS_TEXT_BASE) +$filesize;\ - cp.b $loadaddr MK_STR(CONFIG_SYS_TEXT_BASE) $filesize;\ - protect on MK_STR(CONFIG_SYS_TEXT_BASE) +$filesize; \ - cmp.b $loadaddr MK_STR(CONFIG_SYS_TEXT_BASE) $filesize\0 \ - consoledev=ttyS1\0 \ - ramdiskaddr=200\0 \ - ramdiskfile=ramdisk.uboot\0 \ - fdtaddr=c0\0\ - fdtfile=mpc8548cds.dtb\0 +#defineCONFIG_EXTRA_ENV_SETTINGS \ + hwconfig=fsl_ddr:ecc=off\0\ + netdev=eth0\0 \ + uboot= MK_STR(CONFIG_UBOOTPATH) \0 \ + tftpflash=tftpboot $loadaddr $uboot; \ + protect off MK_STR(CONFIG_SYS_TEXT_BASE) +$filesize;\ + erase MK_STR(CONFIG_SYS_TEXT_BASE) +$filesize; \ + cp.b $loadaddr MK_STR(CONFIG_SYS_TEXT_BASE) $filesize; \ + protect on MK_STR(CONFIG_SYS_TEXT_BASE) +$filesize; \ + cmp.b $loadaddr MK_STR(CONFIG_SYS_TEXT_BASE) $filesize\0\ + consoledev=ttyS1\0\ + ramdiskaddr=200\0 \ + ramdiskfile=ramdisk.uboot\0 \ + fdtaddr=c0\0 \ + fdtfile=mpc8548cds.dtb\0 #define CONFIG_NFSBOOTCOMMAND \ setenv bootargs root=/dev/nfs rw \ -- 1.7.3.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [GIT PULL] Pull request u-boot-85xx.git (updated)
[ fixed mpc8548cds config patch to pass checkpatch ] The following changes since commit 0841ca90f22d73b0ea4642ef1ce33d879bb2f3ff: Wolfgang Denk (1): arm920t/s3c24x0/usb_ohci.c: fix warning: variable ... set but not used are available in the git repository at: git://git.denx.de/u-boot-mpc85xx master Andy Fleming (1): phylib: Work around bug in Teranetics PHY Becky Bruce (2): powerpc/mpc8641hpcn: fix SRIO BAT config powerpc/mpc86xx: Disable translation for BAT setup Fanzc (1): powerpc/mpc8536ds: Add USB support for MPC8536DS Tang Yuantian (1): fsl_sata: Fix compile error when CONFIG_LBA48 is not defined Timur Tabi (2): powerpc/85xx: CONFIG_ENABLE_36BIT_PHYS does not depend on CONFIG_PHYS_64BIT powerpc/85xx: fix null pointer dereference when init the SGMII TBI PHY Xie Xiaobo (3): powerpc/mpc8536ds: Add eSPI support for MPC8536DS powerpc/mpc8536ds: Invert SDHC_WP pin polarity powerpc/mpc8536ds: Save the env variables to SDcard and SPI flash York Sun (2): powerpc/8xxx: Add support for interactive DDR programming interface powerpc/mpc8xxx: Merge entries in DDR speed table chenhui zhao (1): powerpc/mpc8548cds: Update config file README |3 + arch/powerpc/cpu/mpc86xx/cpu_init.c| 28 - arch/powerpc/cpu/mpc86xx/start.S | 69 ++- arch/powerpc/cpu/mpc8xxx/ddr/Makefile |3 +- arch/powerpc/cpu/mpc8xxx/ddr/ddr.h | 40 +- arch/powerpc/cpu/mpc8xxx/ddr/interactive.c | 1691 arch/powerpc/cpu/mpc8xxx/ddr/main.c|9 +- arch/powerpc/include/asm/fsl_fman.h|9 +- arch/powerpc/include/asm/immap_85xx.h |5 + board/freescale/corenet_ds/ddr.c | 222 ++-- board/freescale/mpc8349emds/ddr.c | 80 +- board/freescale/mpc8536ds/mpc8536ds.c | 12 +- board/freescale/mpc8572ds/ddr.c| 203 ++-- board/freescale/mpc8641hpcn/ddr.c | 165 ++-- board/freescale/p1022ds/ddr.c | 79 +- board/freescale/p2020ds/ddr.c | 105 +- board/freescale/p2041rdb/ddr.c | 78 +- doc/README.fsl-ddr | 150 +++ drivers/block/fsl_sata.c | 15 +- drivers/net/fm/dtsec.c |2 +- drivers/net/fm/eth.c |3 +- drivers/net/phy/teranetics.c | 21 +- include/configs/MPC8536DS.h| 51 +- include/configs/MPC8548CDS.h | 44 +- include/configs/MPC8641HPCN.h | 128 ++- include/configs/P1022DS.h |3 +- include/configs/p1_p2_rdb_pc.h |5 +- include/mpc86xx.h |1 + 28 files changed, 2625 insertions(+), 599 deletions(-) create mode 100644 arch/powerpc/cpu/mpc8xxx/ddr/interactive.c ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] powerpc/mpc8548cds: Update config file
On Sun, Oct 9, 2011 at 5:55 PM, Kumar Gala ga...@kernel.crashing.org wrote: - Increase the size of malloc space. - Enable e1000 network card. - Show pci devices on startup. - Change the location of env address. - Use hwconfig to turn off ECC by default. This patch is missing all of the explanations that were provided by the developer on the internal mailing list. In particular, Wolfgang previously stated that he did not want CONFIG_PCI_SCAN_SHOW enabled by default. -- Timur Tabi Linux kernel developer at Freescale ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] powerpc/mpc8548cds: Update config file
On Oct 9, 2011, at 6:41 PM, Tabi Timur-B04825 wrote: On Sun, Oct 9, 2011 at 5:55 PM, Kumar Gala ga...@kernel.crashing.org wrote: - Increase the size of malloc space. - Enable e1000 network card. - Show pci devices on startup. - Change the location of env address. - Use hwconfig to turn off ECC by default. This patch is missing all of the explanations that were provided by the developer on the internal mailing list. In particular, Wolfgang previously stated that he did not want CONFIG_PCI_SCAN_SHOW enabled by default. * The only things not explained is the env address change. I can see it matches our other boards MPC8572DS, etc. So not exactly critical to me. * If Wolfgang wants to remove CONFIG_PCI_SCAN_SHOW so be it, but as long as it exists I think its the board maintainers purview if they want it enabled. - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] powerpc/mpc8548cds: Update config file
Kumar Gala wrote: * The only things not explained is the env address change. I can see it matches our other boards MPC8572DS, etc. So not exactly critical to me. There's no explanation for increasing the malloc size. * If Wolfgang wants to remove CONFIG_PCI_SCAN_SHOW so be it, but as long as it exists I think its the board maintainers purview if they want it enabled. Seriously? I've lost count the number of times I've been bitch-slapped by Wolfgang for adding a board-specific patch that he didn't like. -- Timur Tabi Linux kernel developer at Freescale ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5 01/20] sandbox: Add architecture header files
On Sunday 09 October 2011 15:28:16 Wolfgang Denk wrote: Simon Glass wrote: 0 errors, 44 warnings for 0001-sandbox-Add-architecture-header-files.patch: warning: arch/sandbox/include/asm/bitops.h,30: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,32: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,34: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,36: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,44: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,54: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,66: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,76: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,88: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,90: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt (These are the bitops and seem to have volatile in all the other archs also.) Existence of bad code examples is no excuse for submitting new bad code. maybe we should take this up with LKML rather than forcing our code to randomly fork ... -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] cmd_bdinfo: replace print_str() with print_mhz()
Tested-by: Mike Frysinger vap...@gentoo.org -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/5 v1] integrator: pass configs for core modules
On Wed, Sep 21, 2011 at 1:00 PM, Linus Walleij linus.wall...@linaro.org wrote: Albert do you want this series through patchwork or through a git pull request? Ping on this... I'm happy to help. The patchwork entries are here: http://patchwork.ozlabs.org/patch/115217/ http://patchwork.ozlabs.org/patch/115218/ http://patchwork.ozlabs.org/patch/115219/ http://patchwork.ozlabs.org/patch/115220/ http://patchwork.ozlabs.org/patch/115296/ Now also: http://patchwork.ozlabs.org/patch/117924/ http://patchwork.ozlabs.org/patch/117925/ Yours, Linus Walleij ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 20/21] Adjust dependency rules to permit per-file flags
On Monday 03 October 2011 21:10:17 Simon Glass wrote: Hi, On Mon, Sep 26, 2011 at 5:10 PM, Simon Glass s...@chromium.org wrote: The dependency rules are currently done in a shell 'for' loop. This does not permit Makefile variables to adjust preprocessor flags as is done with normal compile flags, using the CFLAGS_path/file.o syntax. This change moves the dependency generation into the Makefile itself, and permits a CPPFLAGS_path/file.o to adjust preprocessor flags on a file or directory basis. The CPPFLAGS_... variable is also folded into CFLAGS during the build. Signed-off-by: Simon Glass s...@chromium.org --- Changes in v3: - Change U-Boot's dependency generation to permit per-file flags .gitignore |2 +- config.mk |7 +++ rules.mk | 23 --- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index dbf545f..7ba0dd9 100644 --- a/.gitignore +++ b/.gitignore @@ -39,7 +39,7 @@ # Generated files # -*.depend +*.depend* /LOG /errlog /reloc_off diff --git a/config.mk b/config.mk index e2b440d..3fa9eef 100644 --- a/config.mk +++ b/config.mk @@ -277,6 +277,13 @@ export CONFIG_SYS_TEXT_BASE PLATFORM_CPPFLAGS PLATFORM_RELFLAGS CPPFLAGS CFLAGS BCURDIR = $(subst $(SRCTREE)/,,$(CURDIR:$(obj)%=%)) ALL_AFLAGS = $(AFLAGS) $(AFLAGS_$(BCURDIR)/$(@F)) $(AFLAGS_$(BCURDIR)) ALL_CFLAGS = $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) +EXTRA_CPPFLAGS = $(CPPFLAGS_$(BCURDIR)/$(@F)) $(CPPFLAGS_$(BCURDIR)) +ALL_CFLAGS += $(EXTRA_CPPFLAGS) + +# The _DEP version uses the $ file target (for dependency generation) +# See rules.mk +EXTRA_CPPFLAGS_DEP = $(CPPFLAGS_$(BCURDIR)/$(addsuffix .o,$(basename $))) \ + $(CPPFLAGS_$(BCURDIR)) $(obj)%.s: %.S $(CPP) $(ALL_AFLAGS) -o $@ $ $(obj)%.o: %.S diff --git a/rules.mk b/rules.mk index d79fcd3..56b9044 100644 --- a/rules.mk +++ b/rules.mk @@ -25,17 +25,18 @@ _depend: $(obj).depend -$(obj).depend: $(src)Makefile $(TOPDIR)/config.mk $(SRCS) $(HOSTSRCS) - @rm -f $@ - @touch $@ - @for f in $(SRCS); do \ - g=`basename $$f | sed -e 's/\(.*\)\.[[:alnum:]_]/\1.o/'`; \ - $(CC) -M $(CPPFLAGS) -MQ $(obj)$$g $$f $@ ; \ - done - @for f in $(HOSTSRCS); do \ - g=`basename $$f | sed -e 's/\(.*\)\.[[:alnum:]_]/\1.o/'`; \ - $(HOSTCC) -M $(HOSTCPPFLAGS) -MQ $(obj)$$g $$f $@ ; \ - done +DEPS := $(basename $(patsubst %,$(obj).depend.%,$(SRCS))) + +$(obj).depend: $(src)Makefile $(TOPDIR)/config.mk $(DEPS) $(HOSTSRCS) + cat /dev/null $(DEPS) $@ + @for f in $(HOSTSRCS); do \ + g=`basename $$f | sed -e 's/\(.*\)\.[[:alnum:]_]/\1.o/'`; \ + $(HOSTCC) -M $(HOSTCPPFLAGS) -MQ $(obj)$$g $$f $@ ; \ + done + +$(obj).depend.%: %.c + $(CC) -M $(CPPFLAGS) $(EXTRA_CPPFLAGS_DEP) \ + -MQ $(addsuffix .o,$(basename $)) $ $@ $(HOSTOBJS): $(obj)%.o: %.c $(HOSTCC) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) $(HOSTCFLAGS_$(BCURDIR)) -o $@ $ -c -- 1.7.3.1 Sadly this doesn't work for two reasons: 1. It ignores .S files (which is easy to fix) 2. It doesn't like paths like ../common/fred.c. I can fix that with a patsubst I suspect. Does anyone have better ideas on how to deal with this? what if we move away from a single .depend file ? most every project i see out there utilizes one .depend file per source. -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Introduce generic TPM support in u-boot
TPM (Trusted Platform Module) is an integrated circuit and software platform that provides computer manufacturers with the core components of a subsystem used to assure authenticity, integrity and confidentiality. This driver supports version 1.2 of the TCG (Trusted Computing Group) specifications. The TCG specification defines several so called localities in a TPM chip, to be controlled by different software layers. When used on a typical x86 platform during the firmware phase, only locality 0 can be accessed by the CPU, so this driver even while supporting the locality concept presumes that only locality zero is used. This implementation is loosely based on the article Writing a TPM Device Driver published on http://ptgmedia.pearsoncmg.com and a submission by Stefan Berger on Qemu-devel mailing list (http://lists.gnu.org/archive/html/qemu-devel). Compiling this driver with DEBUG defined will generate trace of all accesses to TMP registers. This driver has been tested and is being used in three different functional ChromeOS machines (Pinetrail and Sandy Bridge Intel chipsets) all using the same Infineon SLB 9635 TT 1.2 device. A u-boot cli command allowing access to the TPM was also implemented and will be submitted separately. Change-Id: I22a33c3e5b2e20eec9557a7621bd463b30389d73 Signed-off-by: Vadim Bendebury vben...@chromium.org CC: Wolfgang Denk w...@denx.de --- Makefile |3 + README|8 + drivers/tpm/Makefile | 27 ++ drivers/tpm/generic_lpc_tpm.c | 523 + include/tpm.h | 17 ++ 5 files changed, 578 insertions(+), 0 deletions(-) create mode 100644 drivers/tpm/Makefile create mode 100644 drivers/tpm/generic_lpc_tpm.c create mode 100644 include/tpm.h diff --git a/Makefile b/Makefile index cd6fc8c..996db11 100644 --- a/Makefile +++ b/Makefile @@ -268,6 +268,9 @@ LIBS += arch/powerpc/cpu/mpc8xxx/lib8xxx.o endif LIBS += drivers/rtc/librtc.o LIBS += drivers/serial/libserial.o +ifneq ($(CONFIG_GENERIC_LPC_TPM),) +LIBS += drivers/tpm/libtpm.o +endif LIBS += drivers/twserial/libtws.o LIBS += drivers/usb/eth/libusb_eth.o LIBS += drivers/usb/gadget/libusb_gadget.o diff --git a/README b/README index 0868531..e831d68 100644 --- a/README +++ b/README @@ -1016,6 +1016,14 @@ The following options need to be configured: CONFIG_SH_ETHER_CACHE_WRITEBACK If this option is set, the driver enables cache flush. +- TPM Support: + CONFIG_GENERIC_LPC_TPM + Support for generic parallel port TPM devices. + + CONFIG_TPM_TIS_BASE_ADDRESS + Base address where the generic TPM device is mapped + to. Default value is 0xfed4. + - USB Support: At the moment only the UHCI host controller is supported (PIP405, MIP405, MPC5200); define diff --git a/drivers/tpm/Makefile b/drivers/tpm/Makefile new file mode 100644 index 000..abe1180 --- /dev/null +++ b/drivers/tpm/Makefile @@ -0,0 +1,27 @@ +# Copyright (c) 2011 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# + +include $(TOPDIR)/config.mk + +LIB := $(obj)libtpm.o + +COBJS-$(CONFIG_GENERIC_LPC_TPM) = generic_lpc_tpm.o + +COBJS := $(COBJS-y) +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +all: $(LIB) + +$(LIB): $(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +# + +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/drivers/tpm/generic_lpc_tpm.c b/drivers/tpm/generic_lpc_tpm.c new file mode 100644 index 000..939f715 --- /dev/null +++ b/drivers/tpm/generic_lpc_tpm.c @@ -0,0 +1,523 @@ +/* Copyright (c) 2011 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + * + * The code in this file has been heavily based on the article Writing a TPM + * Device Driver published on http://ptgmedia.pearsoncmg.com and the + * submission by Stefan Berger on Qemu-devel mailing list. + * + * One principal difference is that in the simplest config the other than 0 + * TPM localities do not get mapped by some devices (for instance, by + * Infineon slb9635), so this driver provides access to locality 0 only. + */ + +/* #define DEBUG */ +#include common.h +#include asm/io.h +#include tpm.h + +#ifdef DEBUG +#define TPM_DEBUG_ON 1 +#else +#define TPM_DEBUG_ON 0 +#endif + +#define PREFIX lpc_tpm: +#defineTPM_DEBUG(fmt, args...) \ + if (TPM_DEBUG_ON) { \ + printf(PREFIX); \ + printf(fmt , ##args); \ + } + +#ifndef
Re: [U-Boot] [PATCH v3 19/21] Use uintptr_t for 32/64-bit compatibility
On Tuesday 04 October 2011 01:24:56 Simon Glass wrote: On Mon, Oct 3, 2011 at 11:57 AM, Mike Frysinger wrote: On Monday, September 26, 2011 20:10:53 Simon Glass wrote: --- a/common/cmd_mem.c +++ b/common/cmd_mem.c printf (\nMem error @ 0x%08X: found %08lX, expected %08lX\n, - (uint)addr, readback, val); + (uint)(uintptr_t)addr, readback, val); could you change the printf format to %#p instead (and drop the casts completely for addr) ? Well it's not complete clear where we want to go with this. My current thinking is that the emulated memory will be small (in 2011 terms) - maybe 128MB. The real memory of the machine is not accessible since it doesn't make sense. So perhaps just because the host happens to be a 64-bit machine we don't suddenly want to be printing 64-bit addresses. So the answer is 'yes' but for now I'm not sure that's the right thing to do. I have another patch which enables 'md', etc. but of course only within the 128MB 'emulated' memory area. It actually brings up a question - does U-Boot run on 64-machines? i don't believe u-boot runs on any 64bit system (or at least, in 64bit mode). there's quite a lot of random assumptions all over the tree where pointers are stored in 32bits, so for making sandbox work on 64bit stuff, i would focus on making stuff work with minimal intrusion for 32bit systems. although thinking about this a bit more, %p will not zero pad its output (i think even if you specify like 08 it'll get ignored). but maybe people don't care as normally this output shouldn't occur ? -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 0/2]: OMAP3 SPL updates
On Sun, Oct 9, 2011 at 2:21 AM, Igor Grinberg grinb...@compulab.co.il wrote: On 10/07/11 02:28, Tom Rini wrote: On Tue, Oct 4, 2011 at 7:59 AM, Tom Rini tr...@ti.com wrote: Hey all, The following short series does two things. First, it re-works where we do memory initalization in SPL for OMAP3 to be board-specific. This is needed since in many cases (beagleboard, omap3evm) what timings we set depend on what hardware we detect ourself to be running on. Second, along those same lines what omap_rev_string tells us is doing to be board specific as well so provide a weak version in the common omap SPL code and lets it be replaced as needed. Please disregard this version, I need to do a full v3 with the right set of board_early_sdrc_init, sorry for the noise. While I was looking at the series, I've got similar thoughts. May be this should be facilitated by providing kind of framework for the board file only to set the right settings and not duplicate the board_early_sdrc_init() function (with changed values)? The problem is that what to do is very board specific. For example for beagleboard we need to probe the nand driver to see what package we have and then pick from at least 3, maybe 4 or 5 (I don't have the code in front of me) settings. That said, perhaps a function that takes the series of values that do change would be a little clearer in the end so I'll give that a spin once I've gotten beagle and omap3evm spun up again (and maybe finally gotten NAND SPL working there, it seems to be an omap3-specific issue sadly). -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 20/21] Adjust dependency rules to permit per-file flags
Hi Mike, On Sun, Oct 9, 2011 at 7:50 PM, Mike Frysinger vap...@gentoo.org wrote: On Monday 03 October 2011 21:10:17 Simon Glass wrote: Hi, On Mon, Sep 26, 2011 at 5:10 PM, Simon Glass s...@chromium.org wrote: The dependency rules are currently done in a shell 'for' loop. This does not permit Makefile variables to adjust preprocessor flags as is done with normal compile flags, using the CFLAGS_path/file.o syntax. This change moves the dependency generation into the Makefile itself, and permits a CPPFLAGS_path/file.o to adjust preprocessor flags on a file or directory basis. The CPPFLAGS_... variable is also folded into CFLAGS during the build. Signed-off-by: Simon Glass s...@chromium.org --- Changes in v3: - Change U-Boot's dependency generation to permit per-file flags .gitignore | 2 +- config.mk | 7 +++ rules.mk | 23 --- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index dbf545f..7ba0dd9 100644 --- a/.gitignore +++ b/.gitignore @@ -39,7 +39,7 @@ # Generated files # -*.depend +*.depend* /LOG /errlog /reloc_off diff --git a/config.mk b/config.mk index e2b440d..3fa9eef 100644 --- a/config.mk +++ b/config.mk @@ -277,6 +277,13 @@ export CONFIG_SYS_TEXT_BASE PLATFORM_CPPFLAGS PLATFORM_RELFLAGS CPPFLAGS CFLAGS BCURDIR = $(subst $(SRCTREE)/,,$(CURDIR:$(obj)%=%)) ALL_AFLAGS = $(AFLAGS) $(AFLAGS_$(BCURDIR)/$(@F)) $(AFLAGS_$(BCURDIR)) ALL_CFLAGS = $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) +EXTRA_CPPFLAGS = $(CPPFLAGS_$(BCURDIR)/$(@F)) $(CPPFLAGS_$(BCURDIR)) +ALL_CFLAGS += $(EXTRA_CPPFLAGS) + +# The _DEP version uses the $ file target (for dependency generation) +# See rules.mk +EXTRA_CPPFLAGS_DEP = $(CPPFLAGS_$(BCURDIR)/$(addsuffix .o,$(basename $))) \ + $(CPPFLAGS_$(BCURDIR)) $(obj)%.s: %.S $(CPP) $(ALL_AFLAGS) -o $@ $ $(obj)%.o: %.S diff --git a/rules.mk b/rules.mk index d79fcd3..56b9044 100644 --- a/rules.mk +++ b/rules.mk @@ -25,17 +25,18 @@ _depend: $(obj).depend -$(obj).depend: $(src)Makefile $(TOPDIR)/config.mk $(SRCS) $(HOSTSRCS) - @rm -f $@ - @touch $@ - @for f in $(SRCS); do \ - g=`basename $$f | sed -e 's/\(.*\)\.[[:alnum:]_]/\1.o/'`; \ - $(CC) -M $(CPPFLAGS) -MQ $(obj)$$g $$f $@ ; \ - done - @for f in $(HOSTSRCS); do \ - g=`basename $$f | sed -e 's/\(.*\)\.[[:alnum:]_]/\1.o/'`; \ - $(HOSTCC) -M $(HOSTCPPFLAGS) -MQ $(obj)$$g $$f $@ ; \ - done +DEPS := $(basename $(patsubst %,$(obj).depend.%,$(SRCS))) + +$(obj).depend: $(src)Makefile $(TOPDIR)/config.mk $(DEPS) $(HOSTSRCS) + cat /dev/null $(DEPS) $@ + @for f in $(HOSTSRCS); do \ + g=`basename $$f | sed -e 's/\(.*\)\.[[:alnum:]_]/\1.o/'`; \ + $(HOSTCC) -M $(HOSTCPPFLAGS) -MQ $(obj)$$g $$f $@ ; \ + done + +$(obj).depend.%: %.c + $(CC) -M $(CPPFLAGS) $(EXTRA_CPPFLAGS_DEP) \ + -MQ $(addsuffix .o,$(basename $)) $ $@ $(HOSTOBJS): $(obj)%.o: %.c $(HOSTCC) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) $(HOSTCFLAGS_$(BCURDIR)) -o $@ $ -c -- 1.7.3.1 Sadly this doesn't work for two reasons: 1. It ignores .S files (which is easy to fix) 2. It doesn't like paths like ../common/fred.c. I can fix that with a patsubst I suspect. Does anyone have better ideas on how to deal with this? what if we move away from a single .depend file ? most every project i see out there utilizes one .depend file per source. -mike That is essentially what my patch does for the most part - the non-host files are generated with a separate rule and then combined later into a single file. Combining them is just a convenience for the Makefile - easier to include one file than 50, that's all. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 19/21] Use uintptr_t for 32/64-bit compatibility
Hi Mike, On Sun, Oct 9, 2011 at 7:54 PM, Mike Frysinger vap...@gentoo.org wrote: On Tuesday 04 October 2011 01:24:56 Simon Glass wrote: On Mon, Oct 3, 2011 at 11:57 AM, Mike Frysinger wrote: On Monday, September 26, 2011 20:10:53 Simon Glass wrote: --- a/common/cmd_mem.c +++ b/common/cmd_mem.c printf (\nMem error @ 0x%08X: found %08lX, expected %08lX\n, - (uint)addr, readback, val); + (uint)(uintptr_t)addr, readback, val); could you change the printf format to %#p instead (and drop the casts completely for addr) ? Well it's not complete clear where we want to go with this. My current thinking is that the emulated memory will be small (in 2011 terms) - maybe 128MB. The real memory of the machine is not accessible since it doesn't make sense. So perhaps just because the host happens to be a 64-bit machine we don't suddenly want to be printing 64-bit addresses. So the answer is 'yes' but for now I'm not sure that's the right thing to do. I have another patch which enables 'md', etc. but of course only within the 128MB 'emulated' memory area. It actually brings up a question - does U-Boot run on 64-machines? i don't believe u-boot runs on any 64bit system (or at least, in 64bit mode). there's quite a lot of random assumptions all over the tree where pointers are stored in 32bits, so for making sandbox work on 64bit stuff, i would focus on making stuff work with minimal intrusion for 32bit systems. Yes - I don't seem a lot of use in having massive amounts of RAM for testing U-Boot, so 32-bit addresses should be fine for now. although thinking about this a bit more, %p will not zero pad its output (i think even if you specify like 08 it'll get ignored). but maybe people don't care as normally this output shouldn't occur ? -mike Yes %p is not quite what we want, but as you say this is an error condition. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5 01/20] sandbox: Add architecture header files
Hi, On Sun, Oct 9, 2011 at 6:03 PM, Mike Frysinger vap...@gentoo.org wrote: On Sunday 09 October 2011 15:28:16 Wolfgang Denk wrote: Simon Glass wrote: 0 errors, 44 warnings for 0001-sandbox-Add-architecture-header-files.patch: warning: arch/sandbox/include/asm/bitops.h,30: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,32: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,34: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,36: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,44: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,54: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,66: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,76: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,88: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt warning: arch/sandbox/include/asm/bitops.h,90: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt (These are the bitops and seem to have volatile in all the other archs also.) Existence of bad code examples is no excuse for submitting new bad code. maybe we should take this up with LKML rather than forcing our code to randomly fork ... -mike Maybe, but I suspect they would take a patch, given that their own checkpatch complains about it. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Introduce generic TPM support in u-boot
On Sunday 09 October 2011 22:53:26 Vadim Bendebury wrote: Change-Id: I22a33c3e5b2e20eec9557a7621bd463b30389d73 these don't make sense outside of gerrit ;) --- a/Makefile +++ b/Makefile +ifneq ($(CONFIG_GENERIC_LPC_TPM),) please use: ifeq ($(CONFIG_...),y) --- a/README +++ b/README +- TPM Support: + CONFIG_GENERIC_LPC_TPM + Support for generic parallel port TPM devices. + + CONFIG_TPM_TIS_BASE_ADDRESS + Base address where the generic TPM device is mapped + to. Default value is 0xfed4. i'm not sure a default address makes sense at all for all of u-boot. best to just force people to define it, or keep the default in cpu/soc-specific configs. --- /dev/null +++ b/drivers/tpm/Makefile +# Copyright (c) 2011 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. this is incorrect for the u-boot tree. the LICENSE file doesn't exist, and the COPYING file is GPLv2. please use something like: # Copyright (c) 2011 The Chromium OS Authors. # Released under the 2-clause BSD license. +$(LIB): $(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) this is an old makefile. you have to use cmd_link_o_target now and not AR. index 000..939f715 --- /dev/null +++ b/drivers/tpm/generic_lpc_tpm.c +/* #define DEBUG */ just delete it +#ifdef DEBUG +#define TPM_DEBUG_ON 1 +#else +#define TPM_DEBUG_ON 0 +#endif + +#define PREFIX lpc_tpm: +#define TPM_DEBUG(fmt, args...) \ + if (TPM_DEBUG_ON) { \ + printf(PREFIX); \ + printf(fmt , ##args); \ + } simplify this with one line: #define tpm_debug(fmt, args...) debug(lpc_tpm: fmt, ## args) +/* the macro accepts the locality value, but only locality 0 is operational */ +#define TIS_REG(LOCALITY, REG) \ + (void *)(CONFIG_TPM_TIS_BASE_ADDRESS + (LOCALITY 12) + REG) + +/* hardware registers' offsets */ +#define TIS_REG_ACCESS 0x0 +#define TIS_REG_INT_ENABLE 0x8 +#define TIS_REG_INT_VECTOR 0xc +#define TIS_REG_INT_STATUS 0x10 +#define TIS_REG_INTF_CAPABILITY0x14 +#define TIS_REG_STS0x18 +#define TIS_REG_DATA_FIFO 0x24 +#define TIS_REG_DID_VID0xf00 +#define TIS_REG_RID0xf04 you need to use C structs here and not offsets. same feedback as i gave you when you posted it to gerrit :P. +/* Some registers' bit field definitions */ +#define TIS_STS_VALID (1 7) /* 0x80 */ +#define TIS_STS_COMMAND_READY (1 6) /* 0x40 */ +#define TIS_STS_TPM_GO (1 5) /* 0x20 */ +#define TIS_STS_DATA_AVAILABLE (1 4) /* 0x10 */ +#define TIS_STS_EXPECT (1 3) /* 0x08 */ +#define TIS_STS_RESPONSE_RETRY (1 1) /* 0x02 */ having both values is a bit silly. pick one. if you think 0x80 is more clear than 17, then define that. +struct device_name { + u16 dev_id; + const char * const dev_name; +}; + +struct vendor_name { + u16 vendor_id; + const char *vendor_name; + struct device_name *dev_names; +}; + +static struct device_name infineon_devices[] = { + {0xb, SLB9635 TT 1.2}, + {0} +}; + +static const struct vendor_name vendor_names[] = { + {0x15d1, Infineon, infineon_devices}, +}; the infineon_devices (and thus dev_names) should be constified + +/* + * Cached vendor/device ID pair to indicate that the device has been + * already discovered + */ +static u32 vendor_dev_id; so you're assuming only one TPM device per system. probably not a realistic problem, but this should be documented in the README. +static u32 tis_senddata(const u8 * const data, u32 len) ... + printf(%s:%d - failed to get 'command_ready' status\n, +__FILE__, __LINE__); __FILE__/__LINE__ don't really belong in common output. please replace with __func__. same feedback as in gerrit :P. +/* + * tis_init() + * + * Initialize the TPM device. Returns 0 on success or TPM_DRIVER_ERR on + * failure (in case device probing did not succeed). + */ +int tis_init(void) +{ + if (tis_probe()) + return TPM_DRIVER_ERR; + return 0; +} but TPM_DRIVER_ERR is only defined in this file. please just use the more u- boot normal 0 on success, non-zero on failure. +/* + * tis_sendrecv() + * + * Send the requested data to the TPM and then try to get its response + * + * @sendbuf - buffer of the data to send + * @send_size size of the data to send + * @recvbuf - memory to save the response to + * @recv_len - pointer to the size of the response buffer + * + * Returns 0 on success (and places the number of response bytes at recv_len) + * or TPM_DRIVER_ERR on failure. + */