Re: [U-Boot] [RFC][PATCH] Pre-console buffer
Dear Graeme Russ, In message 4e5985c8.8020...@gmail.com you wrote: And this is actually wrong. If we can use the serial console for output, we definitely don;t want to use your buffer any more. Look closer - It's a diff weirdness - The actual code is: I see. Thanks for pointing out. Also, I have noticed in drivers/i2c/ppc4xx_i2c.c: if (gd-flags GD_FLG_HAVE_CONSOLE) { printf(I2C %s: failed %d\n, read ? read : write, ret); } and in drivers/i2c/soft_i2c.c: #ifdef DEBUG_I2C #define PRINTD(fmt,args...) do {\ if (gd-flags GD_FLG_HAVE_CONSOLE)\ printf (fmt ,##args); \ } while (0) #else #define PRINTD(fmt,args...) #endif So there are drivers that anticipate generating output before console is initialised - I think we should not put the onus on the driver and move these conditions to printf() in console.c - Unfortunately this could lead to head-scratching when one _thinks_ a printf() should generate an output, but it is squelched (which is what the pre-console buffer is for) Indeed - which is why this code is only used for debugging drivers in certain very special configurations. 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 1/5 V2] PXA: Cleanup serial_pxa
Dear Marek Vasut, In message 1314507088-1472-1-git-send-email-marek.va...@gmail.com you wrote: * Cleanup register definitions by introducing new regs-uart.h, compliant with rest of U-Boot. * Remove old register definitions from pxa-regs.h * Convert serial_pxa to new regs-uart.h * Cleanup serial_pxa Signed-off-by: Marek Vasut marek.va...@gmail.com --- arch/arm/include/asm/arch-pxa/pxa-regs.h | 111 --- arch/arm/include/asm/arch-pxa/regs-uart.h | 109 +++ drivers/serial/serial_pxa.c | 464 - 3 files changed, 297 insertions(+), 387 deletions(-) create mode 100644 arch/arm/include/asm/arch-pxa/regs-uart.h V2: Add missing regs-uart.h Your patch stacks are a mess. It's impossible for mne to tell what you actually intend. So we have now tow series: 1: [PATCH 1/6] PXA: Fix Lubbock, remove redundant parenthesis 1: [PATCH 2/6] PXA: Fix CSB226, fix monitor length 1: [PATCH 3/6] USB: Fix complaints about strict aliasing in OHCI-HCD 1: [PATCH 4/6] IDE: Fix complaints about strict aliasing in cmd_ide.c 1: [PATCH 5/6] PXA: Cleanup serial_pxa 1: [PATCH 6/6] PXA: vpac270: Remove re-defined CONFIG_SYS_TEXT_BASE 2: [PATCH 1/5 V2] PXA: Cleanup serial_pxa 2: [PATCH 3/5] PXA: vpac270: Enable the new generic MMC driver 2: [PATCH 2/5] PXA: Add MMC driver using the generic MMC framework 2: [PATCH 4/5 RESEND] USB: Fix complaints about strict aliasing in OHCI-HCD 2: [PATCH 5/5 RESEND] IDE: Fix complaints about strict aliasing in cmd_id It appears as if 2: [PATCH 1/5 V2] might be a replacement for 1: [PATCH 5/6] - but then, it does not contain any of the required In-reply-to: and/or References: headers. It appears as if 2: [PATCH 4/5 RESEND] and 2: [PATCH 5/5 RESEND] might be (unchanged ???) Repostings of 1: [PATCH 3/6] resp. 1: [PATCH 4/6] - but then, why do you repost these at all? You are not supposed to resubmit patches without changes. Also, it does not appears as if the whole 2nd series was a replacement / update for the first, as there are no equivalents for 1: [PATCH 1/6] or 1: [PATCH 2/6]'. All in all, this is a terrible mess, and in violation of patch submission rules. Please consider both patch series NAKed. Fix your code and clean up as needed, then repost but please with proper version information, proper change logs, and proper mail threading. 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 Have you lived in this village all your life?No, not yet. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PULL] U-Boot PXA
Dear Marek Vasut, In message 201108280639.56242.marek.va...@gmail.com you wrote: I prepared a branch for you to pull containing PXA fixes: Cheers The following changes since commit 6e8a3951f7656958cefccab55945604a8bbc43e7: Merge branch 'master' of git://git.denx.de/u-boot (2011-08-28 01:36:27 +0200) are available in the git repository at: git://git.denx.de/u-boot-pxa.git for-arm-fix Marek Vasut (3): PXA: Fix Lubbock, remove redundant parenthesis PXA: Fix CSB226, fix monitor length PXA: vpac270: Remove re-defined CONFIG_SYS_TEXT_BASE Again, what a mess... Why are you selecting just 3 commits from a 6 patches series? This makes no sense. Either these are separate, independent patches, then submit separately. Or they form a series, with patches depending on each other, then obviously you want to include ALL of them? Ok, # 3 and 4 are for other custodians, but there is still # 6 missing here? 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 Stanford research group advertised for participants in a study of obsessive-compulsive disorder. They were looking for therapy clients who had been diagnosed with this disorder. The response was grati- fying; they got 3,000 responses about three days after the ad came out. All from the same person. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC][PATCH] Pre-console buffer
Hi Wolfgang, On 28/08/11 20:08, Wolfgang Denk wrote: Dear Graeme Russ, [snip] So there are drivers that anticipate generating output before console is initialised - I think we should not put the onus on the driver and move these conditions to printf() in console.c - Unfortunately this could lead to head-scratching when one _thinks_ a printf() should generate an output, but it is squelched (which is what the pre-console buffer is for) Indeed - which is why this code is only used for debugging drivers in certain very special configurations. So do you think it is worth handling this in printf() as suggested? I do wonder what unforeseen consequences there can be for an unintended printf() before console has been initialised. I know that a plain-old 16550 will just output garbage because the baud rate is not set, but I wonder if other cases exist where totally unexpected (and unwanted) behaviour will occur because the hardware is not setup yet. I think the safe option is to squelch it in printf(), puts() and putc(). At least then you are only left wondering why something did not print rather than why you hardware is behaving oddly. And with the pre-console buffer (if you can squeeze it in) you automagically get those messages as soon as the console is ready. Regards, Graeme ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/3] Makefile x86 - Move to generic include/asm/arch/asm-offsets.h
This series creates build rules to create (and clean) include/asm/arch/asm-offsets.h from an asm-offsets.c file located in the SoC directory. In particular, the new rules will skip creating the asm-offsets.h file if the SoC does not have an asm-offsets.c file Big Fat Note: I have not tested this on ARM which needs to be looked at closely as the SoC files are one level deeper than where sc520 sits under x86 Graeme Russ (3): Makefile: Add generic build rules for include/asm/arch/asm-offsets.h x86: Rename include/asm/ic to include/asm/arch-sc520 sc520: Create arch asm-offsets Makefile| 22 ++- arch/x86/cpu/Makefile |3 + arch/x86/cpu/sc520/Makefile |2 + arch/x86/cpu/sc520/asm-offsets.c| 45 arch/x86/cpu/sc520/sc520.c |2 +- arch/x86/cpu/sc520/sc520_car.S |5 +- arch/x86/cpu/sc520/sc520_pci.c |4 +- arch/x86/cpu/sc520/sc520_reset.c|2 +- arch/x86/cpu/sc520/sc520_sdram.c|2 +- arch/x86/cpu/sc520/sc520_ssi.c |4 +- arch/x86/cpu/sc520/sc520_timer.c|2 +- arch/x86/cpu/start.S|3 +- arch/x86/include/asm/arch-sc520/pci.h | 79 ++ arch/x86/include/asm/arch-sc520/sc520.h | 372 + arch/x86/include/asm/arch-sc520/ssi.h | 34 +++ arch/x86/include/asm/global_data.h | 19 -- arch/x86/include/asm/ic/pci.h | 79 -- arch/x86/include/asm/ic/sc520.h | 398 --- arch/x86/include/asm/ic/ssi.h | 34 --- arch/x86/lib/zimage.c |1 - board/eNET/eNET.c |2 +- board/eNET/eNET_pci.c |2 +- board/eNET/eNET_start16.S |9 +- 23 files changed, 574 insertions(+), 551 deletions(-) create mode 100644 arch/x86/cpu/sc520/asm-offsets.c create mode 100644 arch/x86/include/asm/arch-sc520/pci.h create mode 100644 arch/x86/include/asm/arch-sc520/sc520.h create mode 100644 arch/x86/include/asm/arch-sc520/ssi.h delete mode 100644 arch/x86/include/asm/ic/pci.h delete mode 100644 arch/x86/include/asm/ic/sc520.h delete mode 100644 arch/x86/include/asm/ic/ssi.h -- 1.7.5.2.317.g391b14 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3] Makefile: Add generic build rules for include/asm/arch/asm-offsets.h
Add three features to the top-level makefile: - Add include/asm/arch/asm-offsets.h as a dependency of the 'depend' target to eliminate 'file does not exist' errors during dependency building - Skip generation of include/asm/arch/asm-offsets.h if the source file ($(CPUDIR)/$(SOC)/asm-offsets.c) does not exist - Add removal of arch specific asm-offsets.s and asm-offsets.h files to the 'clean' target Signed-off-by: Graeme Russ graeme.r...@gmail.com --- Big Fat Note: I have not tested this on ARM which needs to be looked at closely as the SoC files are one level deeper than where sc520 sits under x86 Makefile | 24 ++-- 1 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 03d80b7..049b169 100644 --- a/Makefile +++ b/Makefile @@ -464,7 +464,8 @@ updater: # parallel sub-makes creating .depend files simultaneously. depend dep:$(TIMESTAMP_FILE) $(VERSION_FILE) \ $(obj)include/autoconf.mk \ - $(obj)include/generated/generic-asm-offsets.h + $(obj)include/generated/generic-asm-offsets.h \ + $(obj)include/asm/arch/asm-offsets.h for dir in $(SUBDIRS) $(CPUDIR) $(dir $(LDSCRIPT)) ; do \ $(MAKE) -C $$dir _depend ; done @@ -527,6 +528,23 @@ $(obj)lib/asm-offsets.s: $(obj)include/autoconf.mk.dep \ $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ -o $@ $(src)lib/asm-offsets.c -c -S +$(obj)include/asm/arch/asm-offsets.h: $(TOPDIR)/include/autoconf.mk.dep \ + $(if $(wildcard $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c), \ + $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s,) + @echo Generating $@ + $(if $(wildcard $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c), \ + tools/scripts/make-asm-offsets $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s $@ \ + ,@echo $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c does not exist - skipping) + +$(TOPDIR)$(CPUDIR)/$(SOC)/asm-offsets.s: $(TOPDIR)/include/autoconf.mk.dep \ + $(if $(wildcard $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c), \ + $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c,) + $(if $(wildcard $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c), \ + $(CC) -DDO_DEPS_ONLY \ + $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ + -o $@ $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c -c -S \ + ,@echo $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c does not exist - skipping) + # else # !config.mk all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \ @@ -1019,7 +1037,9 @@ clean: $(obj)board/armltd/{integratorap,integratorcp}/u-boot.lds \ $(obj)u-boot.lds \ $(obj)arch/blackfin/cpu/bootrom-asm-offsets.[chs] \ - $(obj)arch/blackfin/cpu/init.{lds,elf} + $(obj)arch/blackfin/cpu/init.{lds,elf} \ + $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s \ + $(TOPDIR)/include/asm/arch/asm-offsets.h @rm -f $(obj)include/bmp_logo.h @rm -f $(obj)lib/asm-offsets.s @rm -f $(obj)nand_spl/{u-boot.lds,u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map,System.map} -- 1.7.5.2.317.g391b14 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/3] sc520: Create arch asm-offsets
Signed-off-by: Graeme Russ graeme.r...@gmail.com --- arch/x86/cpu/Makefile |3 ++ arch/x86/cpu/sc520/Makefile |2 + arch/x86/cpu/sc520/asm-offsets.c| 45 +++ arch/x86/cpu/sc520/sc520_car.S |3 +- arch/x86/cpu/start.S|3 +- arch/x86/include/asm/arch-sc520/sc520.h | 26 -- arch/x86/include/asm/global_data.h | 19 - board/eNET/eNET_start16.S |5 ++- 8 files changed, 57 insertions(+), 49 deletions(-) create mode 100644 arch/x86/cpu/sc520/asm-offsets.c diff --git a/arch/x86/cpu/Makefile b/arch/x86/cpu/Makefile index 7f1fc18..f88aa5f 100644 --- a/arch/x86/cpu/Makefile +++ b/arch/x86/cpu/Makefile @@ -40,6 +40,9 @@ all: $(obj).depend $(START) $(LIB) $(LIB):$(OBJS) $(call cmd_link_o_target, $(OBJS)) +$(OBJS) \ +$(START): $(TOPDIR)/include/asm/arch/asm-offsets.h + # # defines $(obj).depend target diff --git a/arch/x86/cpu/sc520/Makefile b/arch/x86/cpu/sc520/Makefile index f462264..e1ef98d 100644 --- a/arch/x86/cpu/sc520/Makefile +++ b/arch/x86/cpu/sc520/Makefile @@ -48,6 +48,8 @@ all: $(obj).depend $(LIB) $(LIB):$(OBJS) $(call cmd_link_o_target, $(OBJS)) +$(OBJS) : $(TOPDIR)/include/asm/arch/asm-offsets.h + # # defines $(obj).depend target diff --git a/arch/x86/cpu/sc520/asm-offsets.c b/arch/x86/cpu/sc520/asm-offsets.c new file mode 100644 index 000..794f00c --- /dev/null +++ b/arch/x86/cpu/sc520/asm-offsets.c @@ -0,0 +1,45 @@ +/* + * Adapted from Linux v2.6.36 kernel: arch/powerpc/kernel/asm-offsets.c + * + * This program is used to generate definitions needed by + * assembly language modules. + * + * We use the technique used in the OSF Mach kernel code: + * generate asm statements containing #defines, + * compile this file to assembler, and then extract the + * #defines from the assembly-language output. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#include common.h +#include asm/arch/sc520.h + +#include linux/kbuild.h + +int main(void) +{ + DEFINE(GENERATED_GD_RELOC_OFF, offsetof(gd_t, reloc_off)); + + DEFINE(GENERATED_SC520_PAR0, offsetof(struct sc520_mmcr, par[0])); + DEFINE(GENERATED_SC520_PAR1, offsetof(struct sc520_mmcr, par[1])); + DEFINE(GENERATED_SC520_PAR2, offsetof(struct sc520_mmcr, par[2])); + DEFINE(GENERATED_SC520_PAR3, offsetof(struct sc520_mmcr, par[3])); + DEFINE(GENERATED_SC520_PAR4, offsetof(struct sc520_mmcr, par[4])); + DEFINE(GENERATED_SC520_PAR5, offsetof(struct sc520_mmcr, par[5])); + DEFINE(GENERATED_SC520_PAR6, offsetof(struct sc520_mmcr, par[6])); + DEFINE(GENERATED_SC520_PAR7, offsetof(struct sc520_mmcr, par[7])); + DEFINE(GENERATED_SC520_PAR8, offsetof(struct sc520_mmcr, par[8])); + DEFINE(GENERATED_SC520_PAR9, offsetof(struct sc520_mmcr, par[9])); + DEFINE(GENERATED_SC520_PAR10, offsetof(struct sc520_mmcr, par[10])); + DEFINE(GENERATED_SC520_PAR11, offsetof(struct sc520_mmcr, par[11])); + DEFINE(GENERATED_SC520_PAR12, offsetof(struct sc520_mmcr, par[12])); + DEFINE(GENERATED_SC520_PAR13, offsetof(struct sc520_mmcr, par[13])); + DEFINE(GENERATED_SC520_PAR14, offsetof(struct sc520_mmcr, par[14])); + DEFINE(GENERATED_SC520_PAR15, offsetof(struct sc520_mmcr, par[15])); + + return 0; +} diff --git a/arch/x86/cpu/sc520/sc520_car.S b/arch/x86/cpu/sc520/sc520_car.S index 7cac4d1..c66df58 100644 --- a/arch/x86/cpu/sc520/sc520_car.S +++ b/arch/x86/cpu/sc520/sc520_car.S @@ -24,6 +24,7 @@ #include config.h #include asm/processor-flags.h #include asm/arch/sc520.h +#include asm/arch/asm-offsets.h .section .text @@ -55,7 +56,7 @@ car_init: /* Configure Cache-As-RAM PAR */ movl$CONFIG_SYS_SC520_CAR_PAR, %eax - movl$SC520_PAR2, %edi + movl$(SC520_MMCR_BASE + GENERATED_SC520_PAR2), %edi movl%eax, (%edi) /* Trash the cache then turn it on */ diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S index 306fb49..4a34e37 100644 --- a/arch/x86/cpu/start.S +++ b/arch/x86/cpu/start.S @@ -30,6 +30,7 @@ #include version.h #include asm/global_data.h #include asm/processor-flags.h +#include asm/arch/asm-offsets.h .section .text .code32 @@ -114,7 +115,7 @@ relocate_code: /* Setup call address of in-RAM copy of board_init_r() */ movl$board_init_r, %ebp - addl(GD_RELOC_OFF * 4)(%edx), %ebp + addl(GENERATED_GD_RELOC_OFF)(%edx), %ebp /* Setup parameters to board_init_r() */ movl%edx, %eax
Re: [U-Boot] [PATCH 2/2 v3] powerpc/p1023rds: Enable nand node and disable nor node
On Aug 17, 2011, at 1:24 AM, Chunhe Lan wrote: In the p1023rds, accessing exclusively nor flash or nand flash device by BR0/OR0. When booting from nor flash, nand node is disabled and nor node is enabled in the default dtb. So, when booting from nand flash, nand node should be enabled and nor node should be disabled. Fix where you break the line, should like more like (use upto 75 chars per line): In the p1023rds, accessing exclusively nor flash or nand flash device by BR0/OR0. When booting from nor flash, nand node is disabled and nor node is enabled in the default dtb. So, when booting from nand flash, nand node should be enabled and nor node should be disabled. Signed-off-by: Chunhe Lan chunhe@freescale.com Can you provide example of what the device tree looks like for the two cases. --- board/freescale/p1023rds/p1023rds.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/board/freescale/p1023rds/p1023rds.c b/board/freescale/p1023rds/p1023rds.c index 8cfd199..2fec3ee 100644 --- a/board/freescale/p1023rds/p1023rds.c +++ b/board/freescale/p1023rds/p1023rds.c @@ -146,6 +146,14 @@ int board_eth_init(bd_t *bis) return pci_eth_init(bis); } +void fdt_fixup_flash(void *fdt) +{ +#ifdef CONFIG_NAND_U_BOOT + do_fixup_by_path_string(fdt, nor_flash, status, disabled); + do_fixup_by_path_string(fdt, nand_flash, status, okay); +#endif +} + No need for a separate function, just put the two line in ft_board_setup() #if defined(CONFIG_OF_BOARD_SETUP) void ft_board_setup(void *blob, bd_t *bd) { @@ -158,5 +166,7 @@ void ft_board_setup(void *blob, bd_t *bd) size = getenv_bootm_size(); fdt_fixup_memory(blob, (u64)base, (u64)size); + + fdt_fixup_flash(blob); } #endif -- 1.5.6.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2 v3] fdt: Add a do_fixup_by_path_string() function
On Aug 17, 2011, at 1:24 AM, Chunhe Lan wrote: The do_fixup_by_path_string() will set the specified node's property to the value contained in status. It would just be a wrapper for do_fixup_by_path() that calls strlen on the argument. Fix where you break the line, should like more like (use upto 75 chars per line): The do_fixup_by_path_string() will set the specified node's property to the value contained in status. It would just be a wrapper for do_fixup_by_path() that calls strlen on the argument. Signed-off-by: Chunhe Lan chunhe@freescale.com --- include/fdt_support.h |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/include/fdt_support.h b/include/fdt_support.h index 863024f..1de4a1d 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -36,6 +36,13 @@ void do_fixup_by_path(void *fdt, const char *path, const char *prop, const void *val, int len, int create); void do_fixup_by_path_u32(void *fdt, const char *path, const char *prop, u32 val, int create); + +static inline void do_fixup_by_path_string(void *fdt, const char *path, +const char *prop, const char *status) +{ + do_fixup_by_path(fdt, path, prop, status, strlen(status) + 1, 1); +} + void do_fixup_by_prop(void *fdt, const char *pname, const void *pval, int plen, const char *prop, const void *val, int len, -- 1.5.6.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/5 V2] PXA: Cleanup serial_pxa
On Sunday, August 28, 2011 12:16:18 PM Wolfgang Denk wrote: Dear Marek Vasut, [...] V2: Add missing regs-uart.h Your patch stacks are a mess. It's impossible for mne to tell what you actually intend. Yes, it didn't work out a bit here. I tried to split the stuff so Albert can pick up what's for him and then the rest for review. [...] All in all, this is a terrible mess, and in violation of patch submission rules. Please consider both patch series NAKed. Can you just review this series and scrap the other one please? Thanks Cheers Thanks. Best regards, Wolfgang Denk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PULL] U-Boot PXA
On Sunday, August 28, 2011 12:20:34 PM Wolfgang Denk wrote: Dear Marek Vasut, In message 201108280639.56242.marek.va...@gmail.com you wrote: I prepared a branch for you to pull containing PXA fixes: Cheers The following changes since commit 6e8a3951f7656958cefccab55945604a8bbc43e7: Merge branch 'master' of git://git.denx.de/u-boot (2011-08-28 01:36:27 +0200) are available in the git repository at: git://git.denx.de/u-boot-pxa.git for-arm-fix Marek Vasut (3): PXA: Fix Lubbock, remove redundant parenthesis PXA: Fix CSB226, fix monitor length PXA: vpac270: Remove re-defined CONFIG_SYS_TEXT_BASE Again, what a mess... Why are you selecting just 3 commits from a 6 patches series? This makes no sense. Because Albert wanted me to send a pull rq with the PXA fixes. I don't know if he hand-picked them already or not, but if not, here's a pull request. Either these are separate, independent patches, then submit separately. Or they form a series, with patches depending on each other, then obviously you want to include ALL of them? Ok, # 3 and 4 are for other custodians, but there is still # 6 missing here? Best regards, Wolfgang Denk Cheers! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3 v2] ARM: ARM926EJS - Add cache operations
On Friday, August 19, 2011 04:16:44 PM Aneesh V wrote: On Friday 19 August 2011 06:25 PM, Marek Vasut wrote: On Friday, August 19, 2011 12:43:30 PM Aneesh V wrote: Hi Marek, On Friday 19 August 2011 03:16 PM, Marek Vasut wrote: On Friday, August 19, 2011 11:37:29 AM Aneesh V wrote: Hi Hong, On Friday 19 August 2011 02:53 PM, Hong Xu wrote: Add a new file arch/arm/cpu/arm926ejs/cache.c and put cache operations into this file. How about converting as much as possible of these to armv5/armv6 generic code as I mentioned in this thread: http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/105385/focus=10 55 26 On a quick look everything below except the flush_dcache_all() seems to be armv5 generic. I'd be _VERY_ careful here. And this seems doesn't sound very convincing. Are you dead sure it won't break any v5 CPU we support? What Hong has used is operations mentioned in the ARMv5 architecture and these are not marked as IMPLEMENTATION DEFINED. So, compliant implementations should implement those CP15 operations. They may enhance the operations by adding their own like ARM926EJS seems to be doing with 'flush d-cache all'. However, I think that's immaterial. Hong can provide this as a library and define a CONFIG_* flag to enable it. Let the platform maintainers decide whether to use it or not. IMHO, it will definitely be an improvement over what we have today. Hi, It certainly will, but I'm quite relucant to that as it'll also -- since CONFIG_SYS_DCACHE_OFF and CONFIG_SYS_ICACHE_OFF isn't defined by default -- break some things. Even though what I said is not exactly an argument for what you said. If you're firm all ARMv5 implement it this way, I'm all for it being done the way you suggest it! I can not vouch for all the CPUs. But I checked one more - ARM946ES. This one is also implementing all the standard operations that Hong has used('flush d-cache all' used by Hong is not a standard armv5 operation - that seems to be a 926ejs specific one). Dear Aneesh, today I looked into Xscale cache ops. Xscale (ARMv5) seems to have the invalidation operations implemented, but it is missing the flush operations. MRC p15, 0, r15, c7, c14, 3 won't work. Or more like anything with c14 won't. The cache flushing is done differently on Xscale, but that is probably only a matter of Xscale. I need to investigate how to handle the Xscale flush ops, there is code for that in Linux. Best regards Marek Vasut best regards, Aneesh ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PULL] U-Boot PXA
Dear Marek Vasut, In message 201108282049.02428.marek.va...@gmail.com you wrote: Again, what a mess... Why are you selecting just 3 commits from a 6 patches series? This makes no sense. Because Albert wanted me to send a pull rq with the PXA fixes. I don't know if he hand-picked them already or not, but if not, here's a pull request. I think you did not understand what I mean. My question was why (1) you send a patch series which is obviously not really a set of patches that depend on each other (these should be submitted as separate patches then), and (2) why you did not inclyde the 4th PXA related patch into the pull request. 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 Artificial Intelligence is the study of how to make real computers act like the ones in movies. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/5 V2] PXA: Cleanup serial_pxa
Dear Marek Vasut, In message 201108282048.02525.marek.va...@gmail.com you wrote: All in all, this is a terrible mess, and in violation of patch submission rules. Please consider both patch series NAKed. Can you just review this series and scrap the other one please? This being the second (5 parts), and the other being the first (6 parts)? That means we also ignore your pull request, which refers to the first series? I revommend you restart from a clean state. Split off independent patches that are not actually forming a series, and then send a new pull rq. 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 Alliance: In international politics, the union of two thieves who have their hands so deeply inserted in each other's pocket that they cannot separately plunder a third. - Ambrose Bierce ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PULL] U-Boot PXA
On Sunday, August 28, 2011 10:55:33 PM Wolfgang Denk wrote: Dear Marek Vasut, In message 201108282049.02428.marek.va...@gmail.com you wrote: Again, what a mess... Why are you selecting just 3 commits from a 6 patches series? This makes no sense. Because Albert wanted me to send a pull rq with the PXA fixes. I don't know if he hand-picked them already or not, but if not, here's a pull request. I think you did not understand what I mean. My question was why (1) you send a patch series which is obviously not really a set of patches that depend on each other (these should be submitted as separate patches then), and Ok, I get what you mean. (2) why you did not inclyde the 4th PXA related patch into the pull request. Because that's really something I want to be tested properly. I want to avoid breakage. Cheers Best regards, Wolfgang Denk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 8/9 v2] DM9000: change some printf to use debug instead
Signed-off-by: Eric Jarrige eric.jarr...@armadeus.org Cc: Wolfgang Denk w...@denx.de Cc: Detlev Zundel d...@denx.de Changes for v2: - Remove DM9000_ DEBUG macros and use debug() instead --- drivers/net/dm9000x.c | 97 +++-- 1 files changed, 46 insertions(+), 51 deletions(-) diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c index b5c5573..7fe7e46 100644 --- a/drivers/net/dm9000x.c +++ b/drivers/net/dm9000x.c @@ -66,27 +66,6 @@ TODO: external MII is not functional, only internal at the moment. #include dm9000x.h -/* Board/System/Debug information/definition */ - -/* #define CONFIG_DM9000_DEBUG */ - -#ifdef CONFIG_DM9000_DEBUG -#define DM9000_DBG(fmt,args...) printf(fmt, ##args) -#define DM9000_DMP_PACKET(func,packet,length) \ - do { \ - int i; \ - printf(%s: length: %d\n, func, length); \ - for (i = 0; i length; i++) { \ - if (i % 8 == 0) \ - printf(\n%s: %02x: , func, i);\ - printf(%02x , ((unsigned char *) packet)[i]); \ - } printf(\n); \ - } while(0) -#else -#define DM9000_DBG(fmt,args...) -#define DM9000_DMP_PACKET(func,packet,length) -#endif - /* Structure/enum declaration --- */ typedef struct board_info { u32 runt_length_counter;/* counter: RX length 64byte */ @@ -124,21 +103,37 @@ static void DM9000_iow(int reg, u8 value); #define DM9000_inw(r) readw((volatile u16 *)(r)) #define DM9000_inl(r) readl((volatile u32 *)(r)) -#ifdef CONFIG_DM9000_DEBUG +#ifdef DEBUG static void dump_regs(void) { - DM9000_DBG(\n); - DM9000_DBG(NCR (0x00): %02x\n, DM9000_ior(0)); - DM9000_DBG(NSR (0x01): %02x\n, DM9000_ior(1)); - DM9000_DBG(TCR (0x02): %02x\n, DM9000_ior(2)); - DM9000_DBG(TSRI (0x03): %02x\n, DM9000_ior(3)); - DM9000_DBG(TSRII (0x04): %02x\n, DM9000_ior(4)); - DM9000_DBG(RCR (0x05): %02x\n, DM9000_ior(5)); - DM9000_DBG(RSR (0x06): %02x\n, DM9000_ior(6)); - DM9000_DBG(ISR (0xFE): %02x\n, DM9000_ior(DM9000_ISR)); - DM9000_DBG(\n); + debug(\n); + debug(NCR (0x00): %02x\n, DM9000_ior(0)); + debug(NSR (0x01): %02x\n, DM9000_ior(1)); + debug(TCR (0x02): %02x\n, DM9000_ior(2)); + debug(TSRI (0x03): %02x\n, DM9000_ior(3)); + debug(TSRII (0x04): %02x\n, DM9000_ior(4)); + debug(RCR (0x05): %02x\n, DM9000_ior(5)); + debug(RSR (0x06): %02x\n, DM9000_ior(6)); + debug(ISR (0xFE): %02x\n, DM9000_ior(DM9000_ISR)); + debug(\n); +} + +static void dm9000_dmp_packet(char *func, unsigned char *packet, int length) +{ + int i; + do { + printf(%s: length: %d\n, func, length); + for (i = 0; i length; i++) { + if (i % 8 == 0) + printf(\n%s: %02x: , func, i); + printf(%02x , ((unsigned char *) packet)[i]); + } + printf(\n); + } while (0); } +#else +#define dm9000_dmp_packet(func, packet, length) #endif static void dm9000_outblk_8bit(volatile void *data_ptr, int count) @@ -232,7 +227,7 @@ dm9000_probe(void) id_val |= DM9000_ior(DM9000_PIDL) 16; id_val |= DM9000_ior(DM9000_PIDH) 24; if (id_val == DM9000_ID) { - printf(dm9000 i/o: 0x%x, id: 0x%x \n, CONFIG_DM9000_BASE, + debug(dm9000 i/o: 0x%x, id: 0x%x \n, CONFIG_DM9000_BASE, id_val); return 0; } else { @@ -246,7 +241,7 @@ dm9000_probe(void) static void dm9000_reset(void) { - DM9000_DBG(resetting DM9000\n); + debug(resetting DM9000\n); /* Reset DM9000, see DM9000 Application Notes V1.22 Jun 11, 2004 page 29 */ @@ -259,7 +254,7 @@ dm9000_reset(void) DM9000_iow(DM9000_NCR, (NCR_LBK_INT_MAC | NCR_RST)); do { - DM9000_DBG(resetting the DM9000, 1st reset\n); + debug(resetting the DM9000, 1st reset\n); udelay(25); /* Wait at least 20 us */ } while (DM9000_ior(DM9000_NCR) 1); @@ -267,7 +262,7 @@ dm9000_reset(void) DM9000_iow(DM9000_NCR, (NCR_LBK_INT_MAC | NCR_RST)); /* Issue a second reset */ do { - DM9000_DBG(resetting the DM9000, 2nd reset\n); + debug(resetting the DM9000, 2nd reset\n); udelay(25); /* Wait at least 20 us */ } while (DM9000_ior(DM9000_NCR) 1); @@ -285,7 +280,7 @@ static int dm9000_init(struct eth_device *dev, bd_t *bd) u8 io_mode; struct board_info *db = dm9000_info; - DM9000_DBG(%s\n, __func__); + debug(%s\n, __func__);
[U-Boot] [PATCH v2] add dm9000 eeprom read/write command
Signed-off-by: Eric Jarrige eric.jarr...@armadeus.org Signed-off-by: Stefano Babic sba...@denx.de Cc: Wolfgang Denk w...@denx.de Cc: Detlev Zundel d...@denx.de Changes for v2: - remove DM9000 driver dependant compilation flag --- README|1 + common/Makefile |1 + common/cmd_dm9000ee.c | 82 + 3 files changed, 84 insertions(+), 0 deletions(-) create mode 100644 common/cmd_dm9000ee.c diff --git a/README b/README index 0886987..c6981bf 100644 --- a/README +++ b/README @@ -707,6 +707,7 @@ The following options need to be configured: CONFIG_CMD_DATE * support for RTC, date/time... CONFIG_CMD_DHCP * DHCP support CONFIG_CMD_DIAG * Diagnostics + CONFIG_CMD_DM9000EE DM9000 external EEPROM support CONFIG_CMD_DS4510 * ds4510 I2C gpio commands CONFIG_CMD_DS4510_INFO * ds4510 I2C info command CONFIG_CMD_DS4510_MEM * ds4510 I2C eeprom/sram commansd diff --git a/common/Makefile b/common/Makefile index d662468..d22cbac 100644 --- a/common/Makefile +++ b/common/Makefile @@ -81,6 +81,7 @@ ifdef CONFIG_POST COBJS-$(CONFIG_CMD_DIAG) += cmd_diag.o endif COBJS-$(CONFIG_CMD_DISPLAY) += cmd_display.o +COBJS-$(CONFIG_CMD_DM9000EE) += cmd_dm9000ee.o COBJS-$(CONFIG_CMD_DTT) += cmd_dtt.o COBJS-$(CONFIG_CMD_ECHO) += cmd_echo.o COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += cmd_eeprom.o diff --git a/common/cmd_dm9000ee.c b/common/cmd_dm9000ee.c new file mode 100644 index 000..788e3bd --- /dev/null +++ b/common/cmd_dm9000ee.c @@ -0,0 +1,82 @@ +/* + * (C) Copyright 2008-2011 Armadeus Project + * (C) Copyright 2007 + * Stefano Babic, DENX Software Engineering, sba...@denx.de. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include common.h +#include command.h +#include dm9000.h + +static int do_read_dm9000_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, +char *const argv[]) +{ + unsigned int i; + u8 data[2]; + + for (i = 0; i 0x40; i++) { + if (!(i % 0x10)) + printf(\n%08x:, i); + dm9000_read_srom_word(i, data); + printf( %02x%02x, data[1], data[0]); + } + printf(\n); + return 0; +} + +static int do_write_dm9000_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, + char *const argv[]) +{ + unsigned long offset, value; + + if (argc 4) + return cmd_usage(cmdtp); + + strict_strtoul(argv[2], 16, offset); + strict_strtoul(argv[3], 16, value); + if (offset 0x40) { + printf(Wrong offset : 0x%lx\n, offset); + return cmd_usage(cmdtp); + } + dm9000_write_srom_word(offset, value); + return 0; +} + +int do_dm9000_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) +{ + if (argc 2) + return cmd_usage(cmdtp); + + if (strcmp(argv[1], read) == 0) + return do_read_dm9000_eeprom(cmdtp, flag, argc, argv); + else if (strcmp(argv[1], write) == 0) + return do_write_dm9000_eeprom(cmdtp, flag, argc, argv); + else + return cmd_usage(cmdtp); +} + +U_BOOT_CMD(dm9000ee, 4, 1, do_dm9000_eeprom, + Read/Write eeprom connected to Ethernet Controller, + \ndm9000ee write word offset value \n + \tdm9000ee read \n + \tword:\t\t00-02 : MAC Address\n + \t\t\t03-07 : DM9000 Configuration\n \t\t\t08-63 : User data); + ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/5 V2] PXA: Cleanup serial_pxa
On Sunday, August 28, 2011 10:58:37 PM Wolfgang Denk wrote: Dear Marek Vasut, In message 201108282048.02525.marek.va...@gmail.com you wrote: All in all, this is a terrible mess, and in violation of patch submission rules. Please consider both patch series NAKed. Can you just review this series and scrap the other one please? This being the second (5 parts), and the other being the first (6 parts)? Yes That means we also ignore your pull request, which refers to the first series? No, the pull request _IS_FINE_. I picked the patches that are good for Albert to pick (fixes). These would be good to have in 2011.09. Then I submitted again the rest of the patches I have in stack ... 5 part series. I just want review on these, I don't intend to have them in 2011.09. The 6 part series is wrong and should be scrapped. I revommend you restart from a clean state. Split off independent patches that are not actually forming a series, and then send a new pull rq. The pull request is fine, so it's no use to resend it again. It can be pulled. I'll resend the patches in a smaller chunks. Cheers Best regards, Wolfgang Denk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] PXA: Cleanup serial_pxa
* Cleanup register definitions by introducing new regs-uart.h, compliant with rest of U-Boot. * Remove old register definitions from pxa-regs.h * Convert serial_pxa to new regs-uart.h * Cleanup serial_pxa Signed-off-by: Marek Vasut marek.va...@gmail.com --- arch/arm/include/asm/arch-pxa/pxa-regs.h | 111 --- arch/arm/include/asm/arch-pxa/regs-uart.h | 109 +++ drivers/serial/serial_pxa.c | 464 - 3 files changed, 297 insertions(+), 387 deletions(-) create mode 100644 arch/arm/include/asm/arch-pxa/regs-uart.h diff --git a/arch/arm/include/asm/arch-pxa/pxa-regs.h b/arch/arm/include/asm/arch-pxa/pxa-regs.h index 109fdc0..52c79a9 100644 --- a/arch/arm/include/asm/arch-pxa/pxa-regs.h +++ b/arch/arm/include/asm/arch-pxa/pxa-regs.h @@ -315,117 +315,6 @@ typedef void (*ExcpHndlr) (void) ; /**/ /* - * UARTs - */ -/* Full Function UART (FFUART) */ -#define FFUART FFRBR -#define FFRBR 0x4010 /* Receive Buffer Register (read only) */ -#define FFTHR 0x4010 /* Transmit Holding Register (write only) */ -#define FFIER 0x4014 /* Interrupt Enable Register (read/write) */ -#define FFIIR 0x4018 /* Interrupt ID Register (read only) */ -#define FFFCR 0x4018 /* FIFO Control Register (write only) */ -#define FFLCR 0x401C /* Line Control Register (read/write) */ -#define FFMCR 0x40100010 /* Modem Control Register (read/write) */ -#define FFLSR 0x40100014 /* Line Status Register (read only) */ -#define FFMSR 0x40100018 /* Modem Status Register (read only) */ -#define FFSPR 0x4010001C /* Scratch Pad Register (read/write) */ -#define FFISR 0x40100020 /* Infrared Selection Register (read/write) */ -#define FFDLL 0x4010 /* Divisor Latch Low Register (DLAB = 1) (read/write) */ -#define FFDLH 0x4014 /* Divisor Latch High Register (DLAB = 1) (read/write) */ - -/* Bluetooth UART (BTUART) */ -#define BTUART BTRBR -#define BTRBR 0x4020 /* Receive Buffer Register (read only) */ -#define BTTHR 0x4020 /* Transmit Holding Register (write only) */ -#define BTIER 0x4024 /* Interrupt Enable Register (read/write) */ -#define BTIIR 0x4028 /* Interrupt ID Register (read only) */ -#define BTFCR 0x4028 /* FIFO Control Register (write only) */ -#define BTLCR 0x402C /* Line Control Register (read/write) */ -#define BTMCR 0x40200010 /* Modem Control Register (read/write) */ -#define BTLSR 0x40200014 /* Line Status Register (read only) */ -#define BTMSR 0x40200018 /* Modem Status Register (read only) */ -#define BTSPR 0x4020001C /* Scratch Pad Register (read/write) */ -#define BTISR 0x40200020 /* Infrared Selection Register (read/write) */ -#define BTDLL 0x4020 /* Divisor Latch Low Register (DLAB = 1) (read/write) */ -#define BTDLH 0x4024 /* Divisor Latch High Register (DLAB = 1) (read/write) */ - -/* Standard UART (STUART) */ -#define STUART STRBR -#define STRBR 0x4070 /* Receive Buffer Register (read only) */ -#define STTHR 0x4070 /* Transmit Holding Register (write only) */ -#define STIER 0x4074 /* Interrupt Enable Register (read/write) */ -#define STIIR 0x4078 /* Interrupt ID Register (read only) */ -#define STFCR 0x4078 /* FIFO Control Register (write only) */ -#define STLCR 0x407C /* Line Control Register (read/write) */ -#define STMCR 0x40700010 /* Modem Control Register (read/write) */ -#define STLSR 0x40700014 /* Line Status Register (read only) */ -#define STMSR 0x40700018 /* Reserved */ -#define STSPR 0x4070001C /* Scratch Pad Register (read/write) */ -#define STISR 0x40700020 /* Infrared Selection Register (read/write) */ -#define STDLL 0x4070 /* Divisor Latch Low Register (DLAB = 1) (read/write) */ -#define STDLH 0x4074 /* Divisor Latch High Register (DLAB = 1) (read/write) */ - -#define IER_DMAE (1 7)/* DMA Requests Enable */ -#define IER_UUE(1 6)/* UART Unit Enable */ -#define IER_NRZE (1 5)/* NRZ coding Enable */ -#define IER_RTIOE (1 4)/* Receiver Time Out Interrupt Enable */ -#define IER_MIE(1 3)/* Modem Interrupt Enable */ -#define IER_RLSE (1 2)/* Receiver Line Status Interrupt Enable */ -#define IER_TIE(1 1)/* Transmit Data request Interrupt Enable */ -#define IER_RAVIE (1 0)/* Receiver Data Available Interrupt Enable */ - -#define IIR_FIFOES1(1 7)/* FIFO Mode Enable Status */ -#define IIR_FIFOES0(1 6)
[U-Boot] [PATCH 1/2] PXA: Add MMC driver using the generic MMC framework
Signed-off-by: Marek Vasut marek.va...@gmail.com --- arch/arm/include/asm/arch-pxa/regs-mmc.h | 155 +++ drivers/mmc/Makefile |1 + drivers/mmc/pxa_mmc_gen.c| 442 ++ 3 files changed, 598 insertions(+), 0 deletions(-) create mode 100644 arch/arm/include/asm/arch-pxa/regs-mmc.h create mode 100644 drivers/mmc/pxa_mmc_gen.c diff --git a/arch/arm/include/asm/arch-pxa/regs-mmc.h b/arch/arm/include/asm/arch-pxa/regs-mmc.h new file mode 100644 index 000..fd1eb1e --- /dev/null +++ b/arch/arm/include/asm/arch-pxa/regs-mmc.h @@ -0,0 +1,155 @@ +/* + * Copyright (C) 2011 Marek Vasut marek.va...@gmail.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef__REGS_MMC_H__ +#define__REGS_MMC_H__ + +#defineMMC0_BASE 0x4110 +#defineMMC1_BASE 0x4200 + +int pxa_mmc_register(int card_index); + +struct pxa_mmc_regs { + uint32_tstrpcl; + uint32_tstat; + uint32_tclkrt; + uint32_tspi; + uint32_tcmdat; + uint32_tresto; + uint32_trdto; + uint32_tblklen; + uint32_tnob; + uint32_tprtbuf; + uint32_ti_mask; + uint32_ti_reg; + uint32_tcmd; + uint32_targh; + uint32_targl; + uint32_tres; + uint32_trxfifo; + uint32_ttxfifo; +}; + +/* MMC_STRPCL */ +#defineMMC_STRPCL_STOP_CLK (1 0) +#defineMMC_STRPCL_START_CLK(1 1) + +/* MMC_STAT */ +#defineMMC_STAT_END_CMD_RES(1 13) +#defineMMC_STAT_PRG_DONE (1 12) +#defineMMC_STAT_DATA_TRAN_DONE (1 11) +#defineMMC_STAT_CLK_EN (1 8) +#defineMMC_STAT_RECV_FIFO_FULL (1 7) +#defineMMC_STAT_XMIT_FIFO_EMPTY(1 6) +#defineMMC_STAT_RES_CRC_ERROR (1 5) +#defineMMC_STAT_SPI_READ_ERROR_TOKEN (1 4) +#defineMMC_STAT_CRC_READ_ERROR (1 3) +#defineMMC_STAT_CRC_WRITE_ERROR(1 2) +#defineMMC_STAT_TIME_OUT_RESPONSE (1 1) +#defineMMC_STAT_READ_TIME_OUT (1 0) + +/* MMC_CLKRT */ +#defineMMC_CLKRT_20MHZ 0 +#defineMMC_CLKRT_10MHZ 1 +#defineMMC_CLKRT_5MHZ 2 +#defineMMC_CLKRT_2_5MHZ3 +#defineMMC_CLKRT_1_25MHZ 4 +#defineMMC_CLKRT_0_625MHZ 5 +#defineMMC_CLKRT_0_3125MHZ 6 + +/* MMC_SPI */ +#defineMMC_SPI_EN (1 0) +#defineMMC_SPI_CS_EN (1 2) +#defineMMC_SPI_CS_ADDRESS (1 3) +#defineMMC_SPI_CRC_ON (1 1) + +/* MMC_CMDAT */ +#defineMMC_CMDAT_SD_4DAT (1 8) +#defineMMC_CMDAT_MMC_DMA_EN(1 7) +#defineMMC_CMDAT_INIT (1 6) +#defineMMC_CMDAT_BUSY (1 5) +#defineMMC_CMDAT_BCR (MMC_CMDAT_BUSY | MMC_CMDAT_INIT) +#defineMMC_CMDAT_STREAM(1 4) +#defineMMC_CMDAT_WRITE (1 3) +#defineMMC_CMDAT_DATA_EN (1 2) +#defineMMC_CMDAT_R00 +#defineMMC_CMDAT_R11 +#defineMMC_CMDAT_R22 +#defineMMC_CMDAT_R33 + +/* MMC_RESTO */ +#defineMMC_RES_TO_MAX_MASK 0x7f + +/* MMC_RDTO */ +#defineMMC_READ_TO_MAX_MASK0x + +/* MMC_BLKLEN */ +#defineMMC_BLK_LEN_MAX_MASK0x3ff + +/* MMC_PRTBUF */ +#defineMMC_PRTBUF_BUF_PART_FULL(1 0) + +/* MMC_I_MASK */ +#defineMMC_I_MASK_TXFIFO_WR_REQ(1 6) +#defineMMC_I_MASK_RXFIFO_RD_REQ(1 5) +#defineMMC_I_MASK_CLK_IS_OFF (1 4) +#defineMMC_I_MASK_STOP_CMD (1 3) +#defineMMC_I_MASK_END_CMD_RES (1 2) +#defineMMC_I_MASK_PRG_DONE (1 1) +#defineMMC_I_MASK_DATA_TRAN_DONE (1
[U-Boot] [PATCH 2/2] PXA: vpac270: Enable the new generic MMC driver
Signed-off-by: Marek Vasut marek.va...@gmail.com --- board/vpac270/vpac270.c |8 include/configs/vpac270.h |3 ++- 2 files changed, 10 insertions(+), 1 deletions(-) diff --git a/board/vpac270/vpac270.c b/board/vpac270/vpac270.c index 43bbdff..d3f03c0 100644 --- a/board/vpac270/vpac270.c +++ b/board/vpac270/vpac270.c @@ -21,6 +21,7 @@ #include common.h #include asm/arch/hardware.h +#include asm/arch/regs-mmc.h #include netdev.h #include serial.h #include asm/io.h @@ -72,6 +73,13 @@ void dram_init_banksize(void) #endif } +#ifdef CONFIG_CMD_MMC +int board_mmc_init(bd_t *bis) +{ + pxa_mmc_register(0); +} +#endif + #ifdef CONFIG_CMD_USB int usb_board_init(void) { diff --git a/include/configs/vpac270.h b/include/configs/vpac270.h index ea77971..9c3980d 100644 --- a/include/configs/vpac270.h +++ b/include/configs/vpac270.h @@ -108,7 +108,8 @@ */ #ifdef CONFIG_CMD_MMC #defineCONFIG_MMC -#defineCONFIG_PXA_MMC +#defineCONFIG_GENERIC_MMC +#defineCONFIG_PXA_MMC_GENERIC #defineCONFIG_SYS_MMC_BASE 0xF000 #defineCONFIG_CMD_FAT #defineCONFIG_CMD_EXT2 -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Hello
Hello.. my name is stella i seek for a honest partner for friendship i hope you don't mind if you don't mind please reply me i will like to here form you ok so i can tell you more about myself and we can exchange picture too and share some other things with love___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2 v3] powerpc/p1023rds: Enable nand node and disable nor node
On Mon, 29 Aug 2011 02:14:20 +0800, Kumar Gala kumar.g...@freescale.com wrote: On Aug 17, 2011, at 1:24 AM, Chunhe Lan wrote: In the p1023rds, accessing exclusively nor flash or nand flash device by BR0/OR0. When booting from nor flash, nand node is disabled and nor node is enabled in the default dtb. So, when booting from nand flash, nand node should be enabled and nor node should be disabled. Fix where you break the line, should like more like (use upto 75 chars per line): OK. In the p1023rds, accessing exclusively nor flash or nand flash device by BR0/OR0. When booting from nor flash, nand node is disabled and nor node is enabled in the default dtb. So, when booting from nand flash, nand node should be enabled and nor node should be disabled. Signed-off-by: Chunhe Lan chunhe@freescale.com Can you provide example of what the device tree looks like for the two cases. OK. --- board/freescale/p1023rds/p1023rds.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/board/freescale/p1023rds/p1023rds.c b/board/freescale/p1023rds/p1023rds.c index 8cfd199..2fec3ee 100644 --- a/board/freescale/p1023rds/p1023rds.c +++ b/board/freescale/p1023rds/p1023rds.c @@ -146,6 +146,14 @@ int board_eth_init(bd_t *bis) return pci_eth_init(bis); } +void fdt_fixup_flash(void *fdt) +{ +#ifdef CONFIG_NAND_U_BOOT +do_fixup_by_path_string(fdt, nor_flash, status, disabled); +do_fixup_by_path_string(fdt, nand_flash, status, okay); +#endif +} + No need for a separate function, just put the two line in ft_board_setup() OK. Thanks. -Jack Lan #if defined(CONFIG_OF_BOARD_SETUP) void ft_board_setup(void *blob, bd_t *bd) { @@ -158,5 +166,7 @@ void ft_board_setup(void *blob, bd_t *bd) size = getenv_bootm_size(); fdt_fixup_memory(blob, (u64)base, (u64)size); + +fdt_fixup_flash(blob); } #endif -- 1.5.6.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2 v3] fdt: Add a do_fixup_by_path_string() function
On Mon, 29 Aug 2011 02:15:15 +0800, Kumar Gala kumar.g...@freescale.com wrote: On Aug 17, 2011, at 1:24 AM, Chunhe Lan wrote: The do_fixup_by_path_string() will set the specified node's property to the value contained in status. It would just be a wrapper for do_fixup_by_path() that calls strlen on the argument. Fix where you break the line, should like more like (use upto 75 chars per line): OK. Thanks. -Jack Lan The do_fixup_by_path_string() will set the specified node's property to the value contained in status. It would just be a wrapper for do_fixup_by_path() that calls strlen on the argument. Signed-off-by: Chunhe Lan chunhe@freescale.com --- include/fdt_support.h |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/include/fdt_support.h b/include/fdt_support.h index 863024f..1de4a1d 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -36,6 +36,13 @@ void do_fixup_by_path(void *fdt, const char *path, const char *prop, const void *val, int len, int create); void do_fixup_by_path_u32(void *fdt, const char *path, const char *prop, u32 val, int create); + +static inline void do_fixup_by_path_string(void *fdt, const char *path, + const char *prop, const char *status) +{ +do_fixup_by_path(fdt, path, prop, status, strlen(status) + 1, 1); +} + void do_fixup_by_prop(void *fdt, const char *pname, const void *pval, int plen, const char *prop, const void *val, int len, -- 1.5.6.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Generating random numbers
Hi, I am trying to random my mac in u-boot on AT91RM9200 and AT91SAM9G45 processor. My purpose is that before a MAC is assigned to the board at production, the board should use a random MAC address (and random IP) and also that it shouldn't conflict with other devices on the same network. In lib_arm/board.c if the environment variables ethaddr and ipaddr are not set, I generate a random MAC and IP. bootcmd is set to tftp filename;autoscr $(TFTP_LOAD_ADDR) in the config.h file. A tftp server on the network reads the filename(different for different products) and calls mkimage to create a u-boot script file that sets the correct MAC address and the correct bootcmd after getting one from the database. This is to reduce the time at Production. At present they have to connect each board's serial cable and set the MAC address. On the 9G45, I used the pseudo-random generator from board/esd/du440/du440.c along with a few combinations of udelay and get_timer and am able to get different MAC addresses over reboots and also different MAC addresses on similar boards. start_time=get_timer(0); udelay(start_time); prng(start_time); elapsed_time=get_timer(start_time); udelay(elapsed_time); etc along with a few more loops. However the same code generates the same sequence of random numbers on the AT91RM9200. I am not sure how this code generates different numbers every time on the AT91SAM9G45 ! On the AT91RM9200, I also tried using bfin_gen_rand_mac from arch/blackfin/include/asm/net.h, However I always get the same sequence of random numbers. /* make something up */ const char s[] = __DATE__; size_t i; u32 cycles; for (i = 0; i 6; ++i) { asm(%0 = CYCLES; : =r (cycles)); mac_addr[i] = cycles ^ s[i]; } mac_addr[0] = (mac_addr[0] | 0x02) ~0x01; /* make it local unicast */ Is there any method to generate different sequences of random numbers by the same code executing on same machines? I could do this after the kernel starts using /dev/urandom and then use fw_setenv but I prefer to do it in U-boot. Does using fw_setenv require the flash partition containing the U-boot environment variables be mounted as read-write? Because I mount it as read-only. Thanks, Elison ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 1/3] net: Adds Fast Ethernet Controller driver for Armada100
- Mike Frysinger vap...@gentoo.org wrote: On Friday, August 26, 2011 02:36:51 Ajay Bhargav wrote: +static int add_del_hash_entry(struct armdfec_device *darmdfec, u32 mach, + u32 macl, u32 rd, u32 skip, int del) +{ +u8 *last; local var ... +last = (u8 *) entry; +last = last + sizeof(*entry); + +return 0; +} so what's the point of these two assignments to last ? I forgot to delete them during cleanup of initial code. Thanks for pointing. +int armada100_fec_register(int base_addr) when it comes to addresses for memory mapped registers, we typically use unsigned long rather than int yes right... +darmdfec = malloc(sizeof(struct armdfec_device)); +if (!darmdfec) +goto error; if this first one fails, we jump to: +error: +free(darmdfec-p_aligned_txbuf); +free(darmdfec-p_rxbuf); +free(darmdfec-p_rxdesc); +free(darmdfec-htpr); looks like 4 NULL pointer derefs. so you'll need one specific path for the first malloc(), but the rest are fine. -mike so you mean like this... if(!darmdfec) goto error; ... error1: free(darmdfec-p_aligned_txbuf); free(darmdfec-p_rxbuf); free(darmdfec-p_rxdesc); free(darmdfec-htpr); error: free(darmdfec); return -1; Thanks, Ajay Bhargav ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 1/3] net: Adds Fast Ethernet Controller driver for Armada100
On Monday, August 29, 2011 01:10:49 Ajay Bhargav wrote: - Mike Frysinger vap...@gentoo.org wrote: On Friday, August 26, 2011 02:36:51 Ajay Bhargav wrote: +darmdfec = malloc(sizeof(struct armdfec_device)); +if (!darmdfec) +goto error; if this first one fails, we jump to: +error: +free(darmdfec-p_aligned_txbuf); +free(darmdfec-p_rxbuf); +free(darmdfec-p_rxdesc); +free(darmdfec-htpr); looks like 4 NULL pointer derefs. so you'll need one specific path for the first malloc(), but the rest are fine. so you mean like this... if(!darmdfec) goto error; ... error1: free(darmdfec-p_aligned_txbuf); free(darmdfec-p_rxbuf); free(darmdfec-p_rxdesc); free(darmdfec-htpr); error: free(darmdfec); return -1; that's one way of fixing it -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 1/3] net: Adds Fast Ethernet Controller driver for Armada100
- Marek Vasut marek.va...@gmail.com wrote: On Friday, August 26, 2011 08:36:51 AM Ajay Bhargav wrote: This patch adds support for Fast Ethernet Controller driver for Armada100 series. Signed-off-by: Ajay Bhargav ajay.bhar...@einfochips.com Hi, please don't forget to CC me next time ;-) Sure, I'll do that.. you and Mike both :) [...] +static int smi_reg_read(const char *devname, u8 phy_addr, u8 phy_reg, + u16 *value) +{ + struct eth_device *dev = eth_get_dev_by_name(devname); + struct armdfec_device *darmdfec = to_darmdfec(dev); + struct armdfec_reg *regs = darmdfec-regs; + u32 val, reg_data; + + if (phy_addr == PHY_ADR_REQ phy_reg == PHY_ADR_REQ) { + reg_data = readl(regs-phyadr); + *value = (u16) (reg_data 0x1f); Do you need this cast? I thought I fixed most of the cast related issues :) looks like I missed one. Unify the error reporting please. I will do that... It looks good, just a few nits Cheers! Cheers! :) Ajay Bhargav ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/8] net: emaclite: Change driver name and add address
Mike Frysinger wrote: On Friday, August 26, 2011 08:47:16 Michal Simek wrote: -sprintf(dev-name, Xilinx_Emaclite); +sprintf(dev-name, Xelite.%x, base_addr); you calculated this down to the byte huh ;). i see it uses the full 16. Yes, I had to because eth_device has 16 chars array for it. do we have to worry about people who specify the device in their envs ? i'm guessing not if the current driver only supports one instance. The whole point is to support several instances that's why I need to add base address to name and fit to 16 chars. Michal -- Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/ Microblaze U-BOOT custodian ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 1/3] net: Adds Fast Ethernet Controller driver for Armada100
- Mike Frysinger vap...@gentoo.org wrote: On Monday, August 29, 2011 01:10:49 Ajay Bhargav wrote: - Mike Frysinger vap...@gentoo.org wrote: On Friday, August 26, 2011 02:36:51 Ajay Bhargav wrote: +darmdfec = malloc(sizeof(struct armdfec_device)); +if (!darmdfec) +goto error; if this first one fails, we jump to: +error: +free(darmdfec-p_aligned_txbuf); +free(darmdfec-p_rxbuf); +free(darmdfec-p_rxdesc); +free(darmdfec-htpr); looks like 4 NULL pointer derefs. so you'll need one specific path for the first malloc(), but the rest are fine. so you mean like this... if(!darmdfec) goto error; ... error1: free(darmdfec-p_aligned_txbuf); free(darmdfec-p_rxbuf); free(darmdfec-p_rxdesc); free(darmdfec-htpr); error: free(darmdfec); return -1; that's one way of fixing it -mike Any other better way? --Ajay ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 7/8] net: emaclite: Free allocated space for device
Mike Frysinger wrote: On Friday, August 26, 2011 08:47:22 Michal Simek wrote: --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c @@ -356,8 +356,10 @@ int xilinx_emaclite_initialize (bd_t *bis, int base_addr) return -1; emaclite = calloc(1, sizeof(struct xemaclite)); -if (emaclite == NULL) +if (emaclite == NULL) { +free(dev); return -1; +} since this bug was introduced by your patch 5/8, please squash it into that rather than sending out a known buggy one aah. Good point. Thanks, Michal -- Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/ Microblaze U-BOOT custodian ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot