Re: [U-Boot] [PATCH v1 (WIP) 01/16] [Timer]Fix misuse of ARM *timer_masked() functions outside arch/arm
Dear Graeme Russ, In message 4e1f7ac5.2080...@gmail.com you wrote: So I could either: - Send a revised version as a separate patch for ARM and remove it from the series - Include it in the truncated series - Remove it from the series and let Albert process it as is Which do you prefer? I'm fine with each of these - I just like to see this go 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 C++ is the best example of second-system effect since OS/360. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] arm, lib/board.c: Coding Style cleanup
Hello Albert, Albert ARIBAUD wrote: Hi Heiko, Sorry for having kept this patch unanswered so long. I am now on holiday, which means *a bit* more time for U-Boot, so here comes: Re: patch title, can you make it arm: libboard.c: ... rather than arm, libboard.c ? Yep, do this. Also add cosmetic as macp...@gmail.com commented. Also, make sure you rebase onto latest u-boot-arm/master for next version: this one does not apply cleanly ATM. Yes, I saw this too now, but at the time I posted the patch, it applied clean... Le 03/06/2011 10:11, Heiko Schocher a écrit : --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -92,26 +92,28 @@ extern void rtl8019_get_enetaddr (uchar * addr); * May be supplied by boards if desired */ -void inline __coloured_LED_init (void) {} -void coloured_LED_init (void) __attribute__((weak, alias(__coloured_LED_init))); -void inline __red_LED_on (void) {} -void red_LED_on (void) __attribute__((weak, alias(__red_LED_on))); -void inline __red_LED_off(void) {} +inline void __coloured_LED_init(void) {} +void coloured_LED_init(void) +__attribute__((weak, alias(__coloured_LED_init))); If you break the declaration in several lines, please leave some indentation in the second and subsequent lines. Ok, fixed. +inline void __red_LED_on(void) {} +void red_LED_on(void) __attribute__((weak, alias(__red_LED_on))); +inline void __red_LED_off(void) {} void red_LED_off(void) __attribute__((weak, alias(__red_LED_off))); -void inline __green_LED_on(void) {} +inline void __green_LED_on(void) {} void green_LED_on(void) __attribute__((weak, alias(__green_LED_on))); -void inline __green_LED_off(void) {} +inline void __green_LED_off(void) {} void green_LED_off(void) __attribute__((weak, alias(__green_LED_off))); -void inline __yellow_LED_on(void) {} +inline void __yellow_LED_on(void) {} void yellow_LED_on(void) __attribute__((weak, alias(__yellow_LED_on))); -void inline __yellow_LED_off(void) {} +inline void __yellow_LED_off(void) {} void yellow_LED_off(void) __attribute__((weak, alias(__yellow_LED_off))); -void inline __blue_LED_on(void) {} +inline void __blue_LED_on(void) {} void blue_LED_on(void) __attribute__((weak, alias(__blue_LED_on))); -void inline __blue_LED_off(void) {} +inline void __blue_LED_off(void) {} void blue_LED_off(void) __attribute__((weak, alias(__blue_LED_off))); -/ +/* + * Init Utilities* * Some of this code should be moved into the core functions, @@ -485,34 +490,37 @@ void board_init_r (gd_t *id, ulong dest_addr) mem_malloc_init (malloc_start, TOTAL_MALLOC_LEN); #if !defined(CONFIG_SYS_NO_FLASH) -puts (Flash: ); +puts(Flash: ); -if ((flash_size = flash_init ()) 0) { +flash_size = flash_init(); +if (flash_size 0) { # ifdef CONFIG_SYS_FLASH_CHECKSUM -print_size (flash_size, ); +print_size(flash_size, ); /* * Compute and print flash CRC if flashchecksum is set to 'y' * * NOTE: Maybe we should add some WATCHDOG_RESET()? XXX */ -s = getenv (flashchecksum); +s = getenv(flashchecksum); if (s (*s == 'y')) { -printf ( CRC: %08X, -crc32 (0, (const unsigned char *) CONFIG_SYS_FLASH_BASE, flash_size) +printf( CRC: %08X, +crc32(0, +(const unsigned char *) CONFIG_SYS_FLASH_BASE, +flash_size) Pleas indent deeper for the last two lines that belong to the call to crc32. Ups, I think, the crc32 call could be in the previous line! Fixed. Thanks for the review! bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v1 (WIP) 01/16] [Timer]Fix misuse of ARM *timer_masked() functions outside arch/arm
Hi Wolfgang, On 15/07/11 16:31, Wolfgang Denk wrote: Dear Graeme Russ, In message 4e1f7ac5.2080...@gmail.com you wrote: So I could either: - Send a revised version as a separate patch for ARM and remove it from the series - Include it in the truncated series - Remove it from the series and let Albert process it as is Which do you prefer? I'm fine with each of these - I just like to see this go in :-) OK, I'll go with option #2 and rename the series 'Simplify Timer API'. I'll post this in the next day or two (hopefully tonight) This will get the existing Timer API into a state where I can proceed with the outcome of our latest round of discussion. Regards, Graeme ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 01/02] cosmetic: arm: libboard.c: Coding Style cleanup
Signed-off-by: Heiko Schocher h...@denx.de Acked-by: Detlev Zundel d...@denx.de cc: Albert Aribaud albert.u.b...@aribaud.net cc: macp...@gmail.com --- changes for v2: Added Acked-by from Detlev Zundel Added comments from Albert Aribaud: - fixed some Codingstyle issues - changed subject title Added comment from macp...@gmail.com: - Add cosmetic to subject title arch/arm/lib/board.c | 216 ++ 1 files changed, 111 insertions(+), 105 deletions(-) diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index fc52a26..8b11eb1 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -92,26 +92,28 @@ extern void rtl8019_get_enetaddr (uchar * addr); * May be supplied by boards if desired */ -void inline __coloured_LED_init (void) {} -void coloured_LED_init (void) __attribute__((weak, alias(__coloured_LED_init))); -void inline __red_LED_on (void) {} -void red_LED_on (void) __attribute__((weak, alias(__red_LED_on))); -void inline __red_LED_off(void) {} +inline void __coloured_LED_init(void) {} +void coloured_LED_init(void) + __attribute__((weak, alias(__coloured_LED_init))); +inline void __red_LED_on(void) {} +void red_LED_on(void) __attribute__((weak, alias(__red_LED_on))); +inline void __red_LED_off(void) {} void red_LED_off(void) __attribute__((weak, alias(__red_LED_off))); -void inline __green_LED_on(void) {} +inline void __green_LED_on(void) {} void green_LED_on(void) __attribute__((weak, alias(__green_LED_on))); -void inline __green_LED_off(void) {} +inline void __green_LED_off(void) {} void green_LED_off(void) __attribute__((weak, alias(__green_LED_off))); -void inline __yellow_LED_on(void) {} +inline void __yellow_LED_on(void) {} void yellow_LED_on(void) __attribute__((weak, alias(__yellow_LED_on))); -void inline __yellow_LED_off(void) {} +inline void __yellow_LED_off(void) {} void yellow_LED_off(void) __attribute__((weak, alias(__yellow_LED_off))); -void inline __blue_LED_on(void) {} +inline void __blue_LED_on(void) {} void blue_LED_on(void) __attribute__((weak, alias(__blue_LED_on))); -void inline __blue_LED_off(void) {} +inline void __blue_LED_off(void) {} void blue_LED_off(void) __attribute__((weak, alias(__blue_LED_off))); -/ +/* + * Init Utilities * * Some of this code should be moved into the core functions, @@ -122,30 +124,30 @@ void blue_LED_off(void) __attribute__((weak, alias(__blue_LED_off))); #if defined(CONFIG_ARM_DCC) !defined(CONFIG_BAUDRATE) #define CONFIG_BAUDRATE 115200 #endif -static int init_baudrate (void) +static int init_baudrate(void) { char tmp[64]; /* long enough for environment variables */ - int i = getenv_f(baudrate, tmp, sizeof (tmp)); + int i = getenv_f(baudrate, tmp, sizeof(tmp)); gd-baudrate = (i 0) - ? (int) simple_strtoul (tmp, NULL, 10) + ? (int) simple_strtoul(tmp, NULL, 10) : CONFIG_BAUDRATE; return (0); } -static int display_banner (void) +static int display_banner(void) { - printf (\n\n%s\n\n, version_string); - debug (U-Boot code: %08lX - %08lX BSS: - %08lX\n, + printf(\n\n%s\n\n, version_string); + debug(U-Boot code: %08lX - %08lX BSS: - %08lX\n, _TEXT_BASE, - _bss_start_ofs+_TEXT_BASE, _bss_end_ofs+_TEXT_BASE); + _bss_start_ofs + _TEXT_BASE, _bss_end_ofs + _TEXT_BASE); #ifdef CONFIG_MODEM_SUPPORT - debug (Modem Support enabled\n); + debug(Modem Support enabled\n); #endif #ifdef CONFIG_USE_IRQ - debug (IRQ Stack: %08lx\n, IRQ_STACK_START); - debug (FIQ Stack: %08lx\n, FIQ_STACK_START); + debug(IRQ Stack: %08lx\n, IRQ_STACK_START); + debug(FIQ Stack: %08lx\n, FIQ_STACK_START); #endif return (0); @@ -158,23 +160,23 @@ static int display_banner (void) * gives a simple yet clear indication which part of the * initialization if failing. */ -static int display_dram_config (void) +static int display_dram_config(void) { int i; #ifdef DEBUG - puts (RAM Configuration:\n); + puts(RAM Configuration:\n); - for(i=0; iCONFIG_NR_DRAM_BANKS; i++) { - printf (Bank #%d: %08lx , i, gd-bd-bi_dram[i].start); - print_size (gd-bd-bi_dram[i].size, \n); + for (i = 0; i CONFIG_NR_DRAM_BANKS; i++) { + printf(Bank #%d: %08lx , i, gd-bd-bi_dram[i].start); + print_size(gd-bd-bi_dram[i].size, \n); } #else ulong size = 0; - for (i=0; iCONFIG_NR_DRAM_BANKS; i++) { + for (i = 0; i
Re: [U-Boot] U-boot : bootdelay: require your help
Hi Phani, I am using a MPC8572 costume board. I am using U-boot as the boot loader. I accidently made the bootdelay to 0 and I have the valid kernel , rootfs in flash. The bootargs is root=/dev/ram rw console=ttyS0,115200. So I am not able to stop booting the board at the u-boot prompt. Can you pls let me know how can I access/change the uboot params from the Linux user application. You can check if your configuration includes CONFIG_ZERO_BOOTDELAY_CHECK (see doc/README.autoboot). In this case you should still be able to stop the boot process by continuously hitting a key during startup. If this is not the case, then you'll need to use the tool to change the U-Boot environment from Linux. For details see tools/env/README. When you have this working, simply adjust bootdelay again. Cheers Detlev -- He who can properly define and divide is to be considered a god. -- Plato -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v1 (WIP) 00/16] [Timer]API Rewrite
Dear J. William Campbell, In message 4e1f8127.8030...@comcast.net you wrote: I am pretty sure that is long enough for someone to notice. . I would be interested in seeing an example of such code as you refer to. Could you point me to one, because it seems to me that the only reason to code such a delay is that for some reason the user didn't want to keep looking at the termination condition so often. I think that that arch/powerpc/cpu/mpc512x/i2c.c: 80 while (timeout-- (status I2C_BB)) { ... 88 udelay (1000); 89 status = mpc_reg_in (regs-msr); 90 } 103 while (timeout-- !(*status I2C_IF)) { 104 udelay (1000); 105 *status = mpc_reg_in (regs-msr); 106 } arch/powerpc/cpu/mpc512x/pci.c: 87 /* We need to wait at least a 1sec based on PCI specs */ 88 for (i = 0; i 1000; i++) 89 udelay(1000); arch/powerpc/cpu/mpc5xx/spi.c: 258 for (i = 0; i 1000; i++) { ... 265 udelay(1000); 266 } 390 for (tm=0; tm1000; ++tm) { ... 394 udelay (1000); 395 } arch/powerpc/cpu/mpc5xxx/i2c.c: 102 while (timeout-- (status I2C_BB)) { ... 111 udelay(15); 112 status = mpc_reg_in(regs-msr); 113 } 125 while (timeout-- !(*status I2C_IF)) { 126 udelay(15); 127 *status = mpc_reg_in(regs-msr); 128 } And just that you don't think this is in a single CPU only: arch/powerpc/cpu/mpc8260/pci.c: 343 for (i = 0; i 1000; ++i) ... 345 udelay (1000); Or in board code: board/altera/common/cfide.c: 29 /* wait 500 ms for power to stabilize */ 30 for (i = 0; i 500; i++) 31 udelay(1000); board/amcc/bamboo/bamboo.c: 1019 for (i=0; i500; i++) 1020 udelay(1000); or common code: common/cmd_fdc.c: 213 while((read_fdc_reg(FDC_SRA)0x80)==0) { 214 timeout--; 215 udelay(10); 216 if(timeout==0) /* timeout occured */ 217 return FALSE; 218 } 228 while((read_fdc_reg(FDC_MSR)0xC0)!=0xC0) { 229 /* direction out and ready */ 230 udelay(10); 231 timeout--; 232 if(timeout==0) /* timeout occured */ 233 return -1; 234 } etc.etc. 375 for(val=0;val255;val++) 376 udelay(500); /* wait some time to start motor */ 418 for(i=0;i100;i++) 419 udelay(500); /* wait 500usec for fifo overrun */ 600 for(i=0; i255; i++) /* then we wait some time */ 601 udelay(500); common/usb.c: 93 inline void wait_ms(unsigned long ms) 94 { 95 while (ms-- 0) 96 udelay(1000); 97 } etc. etc. Note this last example which spreads the effect in a not so nice way. Note that there are even places where udelay() is part of the protocol timing implementation - like in the soft-I2C and soft-SPI drivers. equivalent operation can be produced by a pretty simple re-coding of the loop. In any case, NIOS does not have the problem at present, so the suggested new work-around would be no worse than the present situation. I think it is not correct to state that NIOS does not have the problem at present - it does, only this is not a blatant problem at the moment. Which in turn might result from the fact that all presently supported NIOS boards has any support enabled for I2C or SPI or USB or MMC or watchdogs or ... you name it. The first user who adds any of the currently unused (and thus untested) standard features that work just fine on all other architectures might run into issue... It is also true that the hardware timer cannot be used in a reasonable version of udelay, as most of the desired delays may be very short relative to the timebase. A calibrated timing loop would be the best approach to the udelay problem. Just try using Soft-I2C on a NIOS board and you will immediately realize how crucial a working version of udelay() is. In general, that is true. There may be a few cases where a delay of less than the resolution is essential to make something work. There are These are not just a few cases. There are tons of it, all over the place - from protocol implementations like soft-I2C or soft-I2C to timing requirements for RAM initializations etc. etc. And there are enough places that mandate that the timing is at least in the requested oder, and not off by factors of tens or hundrets or worse. probably lots of other cases where we can easily remove the restriction on the resolution. We cannot fix the first kind, no matter what we do, to work on a lower resolution timer. The second kind we can and probably should fix, because
Re: [U-Boot] Ping command
Dear smitha.va...@wipro.com, In message 07acdfb8eca8ef47863a613bc01bbb22032bc...@hyd-mkd-mbx02.wipro.com you wrote: execute the PING Command I get the following error ping 172.16.52.20 Using unknown device ping failed; host 172.16.52.20 is not alive Check the source code and find out why ping reports an unknown device. 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 v2 01/02] cosmetic: arm: libboard.c: Coding Style cleanup
Dear Heiko Schocher, In message 1310713420-6076-1-git-send-email...@denx.de you wrote: Signed-off-by: Heiko Schocher h...@denx.de Acked-by: Detlev Zundel d...@denx.de cc: Albert Aribaud albert.u.b...@aribaud.net cc: macp...@gmail.com --- changes for v2: Added Acked-by from Detlev Zundel Added comments from Albert Aribaud: - fixed some Codingstyle issues - changed subject title Added comment from macp...@gmail.com: - Add cosmetic to subject title arch/arm/lib/board.c | 216 ++ 1 files changed, 111 insertions(+), 105 deletions(-) Sorry, but libboard.c appears to be wrong. Should this not be lib/board.c instead? 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 philosophy exam was a piece of cake - which was a bit of a surprise, actually, because I was expecting some questions on a sheet of paper. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Let target 'cscope' follow symbolic links
Hi Horst, Without telling 'find' to follow symbolic links, files under include/asm and arch/$(ARCH)/include/asm/arch are not added to the cscope file list. While your point seems valid, I see three occurrences of such a find pattern and you fix only one. May I ask you to fix all of them so users of tags and etags are not left behind? Thanks! Detlev -- A zen-buddhist walked into a pizza shop and said, Make me one with everything. -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] armv7: fix: Disable D cache for goni target (s5p)
On Thu, 14 Jul 2011 16:00:23 +0200 Albert ARIBAUD albert.u.b...@aribaud.net wrote: Hi Lukasz, Le 11/07/2011 09:41, Lukasz Majewski a écrit : Signed-off-by: Lukasz Majewskil.majew...@samsung.com Cc: Minkyu Kangmk7.k...@samsung.com Cc: Aneesh Vane...@ti.com --- Can you please submit a V2 patch in which the commit message provides a rationale for turning the data cache off? People who want to turn it on later will benefit from the info. Amicalement, Hi Albert, Rationale for turning OFF D cache: 1. Before change introduced in commit SHA1:c2dd0d45540397704de9b13287417d21049d34c6 the D-cache for GONI/Universal_c210 targets was disabled. This change was supposed to preserve this state. 2. I've done some investigation about enabling D-cache support. It turned out, that some drivers (which are already posted or are in the queue for posting to u-boot list) have had problems with D-cache coherency. This commit shall be treated as a temporal solution. After solving cache management (and coherency) problems the D-cache would be definitely enabled. -- Best regards, Lukasz Majewski Samsung Poland RD Center Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC] gpio command: return value on write, additional actions
Hi Mike, On Wednesday, July 06, 2011 06:36:00 Wolfgang Denk wrote: For consistency I would prefer to have all commands return the same type of information, i. e. either an error status (like we do with all other commands - any result values would then have to be passed as environment settings) going through the env seems a little wonky. i dont know of any other commands that do this, so i dont think there's any standard to work off of here ... I believe Wolfgang means for example this: ,[ common/cmd_setexpr.c ] | U_BOOT_CMD( | setexpr, 5, 0, do_setexpr, | set environment variable as the result of eval expression, | [.b, .w, .l] name value1 op value2\n | - set environment variable 'name' to the result of the evaluated\n | express specified by op. op can be , |, ^, +, -, *, /, %\n | size argument is only meaningful if value1 and/or value2 are memory addresses | ); ` Cheers Detlev -- Als ich entführt wurde, begannen meine Eltern aktiv zu werden. Sie vermieteten mein Zimmer. -- Woody Allen -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] integratorap: disable dcache
Hello Linus, Linus Walleij wrote: On Thu, Jul 14, 2011 at 1:39 PM, Wolfgang Denk w...@denx.de wrote: Sorry, but again I have to point out that I really dislike papering over existing bugs. If the disable D-cache in bootm does not work, _this_ should be analyzed and fixed instead of globally disabling he data cache. No problem, I didn't label it as RFC since what it does is actually fix a regression. At one point U-boot was working on the Integrator and now it doesn't, it seems commit 880eff5cfb9df6f0855f4e48affd349ca64692e9 ARM: cp15: setup mmu and enable dcache is causing it. Heiko, Alessandro, do you have any hints on how to go about flushing and disabling the D-cache in bootm for ARM920T? It doesn't seem to work on this ARM CPU chip in its current form... Hmm.. trying bootm with actual u-boot on a davinci (arm926ejs) based board, there I couldn;t use the Davinci-EMAC (if I disable the dcache it works ...) Seems above commit introduced problems for other arm architectures, drivers, ... Hmm... if we globally always enable the dcache, we have a lot of more drivers to fix (I think) ... bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 01/02] cosmetic: arm: libboard.c: Coding Style cleanup
Hello Wolfgang, Wolfgang Denk wrote: Dear Heiko Schocher, In message 1310713420-6076-1-git-send-email...@denx.de you wrote: Signed-off-by: Heiko Schocher h...@denx.de Acked-by: Detlev Zundel d...@denx.de cc: Albert Aribaud albert.u.b...@aribaud.net cc: macp...@gmail.com --- changes for v2: Added Acked-by from Detlev Zundel Added comments from Albert Aribaud: - fixed some Codingstyle issues - changed subject title Added comment from macp...@gmail.com: - Add cosmetic to subject title arch/arm/lib/board.c | 216 ++ 1 files changed, 111 insertions(+), 105 deletions(-) Sorry, but libboard.c appears to be wrong. Should this not be lib/board.c instead? Hehe, you are right, I just copypasted from Alberts comment ;-) Fixed! (waiting for some more coments before posting v3) bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v1 0/9] Prototype for generic SPL framework
On Friday 15 July 2011 01:55 AM, Wolfgang Denk wrote: Dear Daniel Schwierzeck, In message1310569869-31810-1-git-send-email-daniel.schwierz...@googlemail.com you wrote: This patch series is the final proposal from Aneesh and myself for a generic SPL framework. The implementation already works and have been tested with in-tree and out-of-tree builds. The latest feedback from ML is already included. I read your patches, and except to the documentation commetns I already made I have but only one question (I did not spend enough time to figure this out myself, sorry): Do you think the split of the patches is OK, i. e. do we maintain bisectability ? I tried building after applying each patch one by one. There are no errors or warnings. best regards, Aneesh ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] It is risk free and legal
My partners and I need a good partner some one we can trust ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] ARM POST Tests.
Hello sreekumar.sivakumar, sreekumar.sivaku...@wipro.com wrote: I am new to u-boot code. I had a requirement for running memory, cpu and cache tests as part of diagnostics, on an ARM based platform. After going through the code, I found that only PPC variants are available for cpu and cache post tests. 1) Is that a limitation, or Is it some sort of misunderstanding on my side? Actually nobody used it on arm 2) If NO, Is there a branch or patch I can pickup which will have ARM POST tests for cache and cpu? Try this patches (I actually worked on getting POST tests running on an davinci based board): - get CONFIG_POST working for arm boards: [PATCH] post, memorytest: fix if vstart is not = 0x0 http://patchwork.ozlabs.org/patch/98127/ [PATCH v2] post, memorytest: add support for none powerpc archs http://patchwork.ozlabs.org/patch/98522/ [PATCH] post, memory test: add memory_post_test() to include file http://patchwork.ozlabs.org/patch/98126/ [PATCH 1/2] arm, lib/board.c: Coding Style cleanup http://patchwork.ozlabs.org/patch/98532/ update: http://patchwork.ozlabs.org/patch/104755/ [PATCH 2/2] arm, lib/board.c: use gd-ram_size instead of bd-bi_memsize http://patchwork.ozlabs.org/patch/98531/ bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/4] cosmetic
Here are some minor changes I've been collecting. Most of it is purely cosmetic, but there are some printf and help output changes, too. Michael Jones (4): cosmetic altera: fix printf typo cmd_mac: cleanup help cmd_mac: fix help for 'mac read' README |6 +++--- arch/arm/include/asm/global_data.h |2 +- common/cmd_eeprom.c|2 +- common/cmd_i2c.c |4 ++-- common/cmd_mac.c |4 ++-- drivers/fpga/altera.c |2 +- drivers/i2c/omap24xx_i2c.c |2 +- include/altera.h | 10 +- 8 files changed, 16 insertions(+), 16 deletions(-) -- 1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/4] cosmetic
Signed-off-by: Michael Jones michael.jo...@matrix-vision.de --- README |6 +++--- arch/arm/include/asm/global_data.h |2 +- common/cmd_eeprom.c|2 +- common/cmd_i2c.c |4 ++-- drivers/i2c/omap24xx_i2c.c |2 +- include/altera.h | 10 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README b/README index 446966d..38428cc 100644 --- a/README +++ b/README @@ -1693,12 +1693,12 @@ The following options need to be configured: = If you now switch to the new I2C Bus 3 with i2c dev 3 - u-boot sends First the Commando to the mux@70 to enable - channel 6, and then the Commando to the mux@71 to enable + u-boot first sends the command to the mux@70 to enable + channel 6, and then the command to the mux@71 to enable the channel 4. After that, you can use the normal i2c commands as - usual, to communicate with your I2C devices behind + usual to communicate with your I2C devices behind the 2 muxes. This option is actually implemented for the bitbanging diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h index ef9959e..7439a88 100644 --- a/arch/arm/include/asm/global_data.h +++ b/arch/arm/include/asm/global_data.h @@ -24,7 +24,7 @@ #ifndef__ASM_GBL_DATA_H #define __ASM_GBL_DATA_H /* - * The following data structure is placed in some memory wich is + * The following data structure is placed in some memory which is * available very early after boot (like DPRAM on MPC8xx/MPC82xx, or * some locked parts of the data cache) to allow for a minimum set of * global variables during system initialization (until we have set diff --git a/common/cmd_eeprom.c b/common/cmd_eeprom.c index 9f4b22c..e911377 100644 --- a/common/cmd_eeprom.c +++ b/common/cmd_eeprom.c @@ -250,7 +250,7 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cn /* * For a FRAM device there is no limit on the number of the -* bytes that can be ccessed with the single read or write +* bytes that can be accessed with the single read or write * operation. */ #if !defined(CONFIG_SYS_I2C_FRAM) diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c index d913e13..3ea75f7 100644 --- a/common/cmd_i2c.c +++ b/common/cmd_i2c.c @@ -1397,8 +1397,8 @@ static int i2c_mux_get_busid (void) return tmp; } -/* Analyses a Muxstring and sends immediately the - Commands to the Muxes. Runs from Flash. +/* Analyses a Muxstring and immediately sends the + commands to the muxes. Runs from flash. */ int i2c_mux_ident_muxstring_f (uchar *buf) { diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c index 71251d8..966ffc4 100644 --- a/drivers/i2c/omap24xx_i2c.c +++ b/drivers/i2c/omap24xx_i2c.c @@ -399,7 +399,7 @@ static void wait_for_bb (void) int timeout = I2C_TIMEOUT; u16 stat; - writew(0x, i2c_base-stat); /* clear current interruts...*/ + writew(0x, i2c_base-stat);/* clear current interrupts...*/ while ((stat = readw (i2c_base-stat) I2C_STAT_BB) timeout--) { writew (stat, i2c_base-stat); udelay(1000); diff --git a/include/altera.h b/include/altera.h index bc21ddf..f28a6a8 100644 --- a/include/altera.h +++ b/include/altera.h @@ -51,18 +51,18 @@ typedef enum { /* typedef Altera_iface */ passive_parallel_asynchronous, /* parallel data */ passive_serial_asynchronous,/* serial data w/ internal clock (not used) */ altera_jtag_mode, /* jtag/tap serial (not used ) */ - fast_passive_parallel, /* fast passive parallel (FPP) */ + fast_passive_parallel, /* fast passive parallel (FPP) */ fast_passive_parallel_security, /* fast passive parallel with security (FPPS) */ max_altera_iface_type /* insert all new types before this */ } Altera_iface;/* end, typedef Altera_iface */ typedef enum { /* typedef Altera_Family */ -min_altera_type, /* insert all new types after this */ -Altera_ACEX1K, /* ACEX1K Family */ -Altera_CYC2, /* CYCLONII Family */ + min_altera_type,/* insert all new types after this */ + Altera_ACEX1K, /* ACEX1K Family */ + Altera_CYC2,/* CYCLONII Family */ Altera_StratixII, /* StratixII Familiy */ /* Add new models here */ -max_altera_type/* insert all new types before this */ + max_altera_type /* insert all new types before this */ } Altera_Family;
[U-Boot] [PATCH 2/4] altera: fix printf typo
Signed-off-by: Michael Jones michael.jo...@matrix-vision.de --- drivers/fpga/altera.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/fpga/altera.c b/drivers/fpga/altera.c index 650f2ec..103d81c 100644 --- a/drivers/fpga/altera.c +++ b/drivers/fpga/altera.c @@ -60,7 +60,7 @@ int altera_load( Altera_desc *desc, void *buf, size_t bsize ) __FUNCTION__); ret_val = ACEX1K_load (desc, buf, bsize); #elif defined(CONFIG_FPGA_CYCLON2) - PRINTF (%s: Launching the CYCLON II Loader...\n, + PRINTF (%s: Launching the CYCLONE II Loader...\n, __FUNCTION__); ret_val = CYC2_load (desc, buf, bsize); #else -- 1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/4] cmd_mac: cleanup help
Signed-off-by: Michael Jones michael.jo...@matrix-vision.de --- common/cmd_mac.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/common/cmd_mac.c b/common/cmd_mac.c index 1884c2a..0f924b7 100644 --- a/common/cmd_mac.c +++ b/common/cmd_mac.c @@ -30,7 +30,7 @@ U_BOOT_CMD( mac, 3, 1, do_mac, display and program the system ID and MAC addresses in EEPROM, [read|save|id|num|errata|date|ports|0|1|2|3|4|5|6|7]\n - read\n + mac read\n - show content of EEPROM\n mac save\n - save to the EEPROM\n -- 1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/4] cmd_mac: fix help for 'mac read'
In the only implementation of 'mac read', it doesn't display the contents of the eeprom as the help indicated unless compiled with DEBUG. It only re-reads the contents of the EEPROM into memory. Displaying the contents of the EEPROM is done by passing no arguments to 'mac'. Signed-off-by: Michael Jones michael.jo...@matrix-vision.de --- common/cmd_mac.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/common/cmd_mac.c b/common/cmd_mac.c index 0f924b7..fcc2867 100644 --- a/common/cmd_mac.c +++ b/common/cmd_mac.c @@ -31,7 +31,7 @@ U_BOOT_CMD( display and program the system ID and MAC addresses in EEPROM, [read|save|id|num|errata|date|ports|0|1|2|3|4|5|6|7]\n mac read\n - - show content of EEPROM\n + - read EEPROM content into memory\n mac save\n - save to the EEPROM\n mac id\n -- 1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Let target 'cscope' follow symbolic links
-Original Message- From: Detlev Zundel [mailto:d...@denx.de] Sent: Freitag, 15. Juli 2011 09:34 To: KRONSTORFER Horst Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH] Let target 'cscope' follow symbolic links Hi Horst, Without telling 'find' to follow symbolic links, files under include/asm and arch/$(ARCH)/include/asm/arch are not added to the cscope file list. While your point seems valid, I see three occurrences of such a find pattern and you fix only one. May I ask you to fix all of them so users of tags and etags are not left behind? you're right ... will do! br -h Thanks! Detlev -- A zen-buddhist walked into a pizza shop and said, Make me one with everything. -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v1 0/9] Prototype for generic SPL framework
Dear Aneesh, In message 4e1ff2d7.3010...@ti.com you wrote: I read your patches, and except to the documentation commetns I already made I have but only one question (I did not spend enough time to figure this out myself, sorry): Do you think the split of the patches is OK, i. e. do we maintain bisectability ? I tried building after applying each patch one by one. There are no errors or warnings. Excellent. Thanks for the good work. 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 Lead me not into temptation... I can find it myself. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/2] ARMV7: Add support for Samsung ORIGEN board
Dear Chander Kashyap, On 12 July 2011 17:48, Chander Kashyap chander.kash...@linaro.org wrote: Origen board is based upon S5PV310 SoC which is similiar to S5PC210 SoC. Signed-off-by: Chander Kashyap chander.kash...@linaro.org --- MAINTAINERS | 1 + board/samsung/origen/Makefile | 46 board/samsung/origen/lowlevel_init.S | 468 ++ board/samsung/origen/mem_setup.S | 392 board/samsung/origen/origen.c | 103 boards.cfg | 1 + include/configs/origen.h | 167 7 files changed, 1178 insertions(+), 0 deletions(-) create mode 100644 board/samsung/origen/Makefile create mode 100644 board/samsung/origen/lowlevel_init.S create mode 100644 board/samsung/origen/mem_setup.S create mode 100644 board/samsung/origen/origen.c create mode 100644 include/configs/origen.h diff --git a/MAINTAINERS b/MAINTAINERS index 2bba7b4..bb98115 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -704,6 +704,7 @@ Minkyu Kang mk7.k...@samsung.com Chander Kashyap k.chan...@samsung.com SMDKV310 ARM ARMV7 (S5PC210 SoC) + origen ARM ARMV7 (S5PC210 SoC) Please keep this list alphabetically. Frederik Kriewitz frede...@kriewitz.eu diff --git a/board/samsung/origen/origen.c b/board/samsung/origen/origen.c new file mode 100644 index 000..84e1415 --- /dev/null +++ b/board/samsung/origen/origen.c @@ -0,0 +1,103 @@ +#include common.h +#include asm/io.h +#include asm/arch/cpu.h +#include asm/arch/gpio.h +#include asm/arch/mmc.h + +DECLARE_GLOBAL_DATA_PTR; +struct s5pc210_gpio_part1 *gpio1; +struct s5pc210_gpio_part2 *gpio2; + +int board_init(void) +{ + gpio1 = (struct s5pc210_gpio_part1 *) S5PC210_GPIO_PART1_BASE; + gpio2 = (struct s5pc210_gpio_part2 *) S5PC210_GPIO_PART2_BASE; + + gd-bd-bi_arch_number = MACH_TYPE_ORIGEN; + gd-bd-bi_boot_params = (PHYS_SDRAM_1 + 0x100UL); + return 0; +} + +int dram_init(void) +{ + gd-ram_size = PHYS_SDRAM_1_SIZE + PHYS_SDRAM_2_SIZE \ + + PHYS_SDRAM_3_SIZE + PHYS_SDRAM_4_SIZE; get_ram_size(). + return 0; +} + +void dram_init_banksize(void) +{ + gd-bd-bi_dram[0].start = PHYS_SDRAM_1; + gd-bd-bi_dram[0].size = PHYS_SDRAM_1_SIZE; + gd-bd-bi_dram[1].start = PHYS_SDRAM_2; + gd-bd-bi_dram[1].size = PHYS_SDRAM_2_SIZE; + gd-bd-bi_dram[2].start = PHYS_SDRAM_3; + gd-bd-bi_dram[2].size = PHYS_SDRAM_3_SIZE; + gd-bd-bi_dram[3].start = PHYS_SDRAM_4; + gd-bd-bi_dram[3].size = PHYS_SDRAM_4_SIZE; +} + +#ifdef CONFIG_DISPLAY_BOARDINFO +int checkboard(void) +{ + printf(\nBoard: ORIGEN\n); + return 0; +} +#endif + +#endif diff --git a/boards.cfg b/boards.cfg index dfefc3f..a3ee25d 100644 --- a/boards.cfg +++ b/boards.cfg @@ -161,6 +161,7 @@ s5p_goni arm armv7 goni samsung smdkc100 arm armv7 smdkc100 samsung s5pc1xx s5pc210_universal arm armv7 universal_c210 samsung s5pc2xx smdkv310 arm armv7 smdkv310 samsung s5pc2xx +origen arm armv7 origen samsung s5pc2xx Please keep this list alphabetically. harmony arm armv7 harmony nvidia tegra2 seaboard arm armv7 seaboard nvidia tegra2 u8500_href arm armv7 u8500 st-ericsson u8500 diff --git a/include/configs/origen.h b/include/configs/origen.h new file mode 100644 index 000..6fa488a --- /dev/null +++ b/include/configs/origen.h @@ -0,0 +1,167 @@ +/* + * Copyright (C) 2011 Samsung Electronics + * + * Configuration settings for the SAMSUNG ORIGEN (S5PV310) board. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef __CONFIG_H +#define
Re: [U-Boot] Ping command
Hi Wolfgang Denk, I get the below messages. Its failing in the fec_send BD_ENET_TX_READY bit is not getting set. Any clue? EPN412 ping 172.16.52.20 Trying FCC1 ETHERNET pram_ptr-fen_genfcc.fcc_rbase 03efcc88 pram_ptr-fen_genfcc.fcc_tbase 03efcca8 Using FCC1 ETHERNET device sending ARP for ac103414 ARP broadcast 1 fec: tx error Value : 8000 ARP broadcast 2 fec: tx buffer not ready ping failed; host 172.16.52.20 is not alive Regards, Smitha -Original Message- From: Wolfgang Denk [mailto:w...@denx.de] Sent: Friday, July 15, 2011 12:51 PM To: Smitha Vanga (WT01 - GMT-Telecom Equipment) Cc: u-boot@lists.denx.de Subject: Re: Ping command Dear smitha.va...@wipro.com, In message 07acdfb8eca8ef47863a613bc01bbb22032bc...@hyd-mkd-mbx02.wipro.com you wrote: execute the PING Command I get the following error ping 172.16.52.20 Using unknown device ping failed; host 172.16.52.20 is not alive Check the source code and find out why ping reports an unknown device. 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. Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] integratorap: disable dcache
On Fri, Jul 15, 2011 at 09:42:53AM +0200, Heiko Schocher wrote: Hmm.. trying bootm with actual u-boot on a davinci (arm926ejs) based board, there I couldn;t use the Davinci-EMAC (if I disable the dcache it works ...) I can confirm there are some cache coherency problems with the DaVinci EMAC driver. I've done a port to a new board based on the DA850 and had problems with corrupt Ethernet packets until I disabled the dcache altogether. The clue was the packets started working when I added a hex dump just before eth_send()! While I haven't come across any explicit documentation I presume the EMAC controller's independent DMA engine is simply not aware of the ARM's cache. I haven't yet identified whether there's some mechanism already in U-Boot for marking particular bits of memory as uncacheable, which would seem to be the correct approach, but turning of dcache doesn't really have any side effects that cause problems for me. 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
[U-Boot] [PATCH 0/7] OMAP3: Add support for mvBlueLYNX-X
Add support for the Matrix Vision mvBlueLYNX-X, an OMAP3-based intelligent camera. These patches were created on top of v2011.06, but they also apply cleanly to master and u-boot-arm/master. What should I use as base to submit such a patch? Howard D. Gray (1): Add 37xx ESx revision numbers. Michael Jones (5): fpga: support FPP Cyclone configuration mmc: rescan fails on empty slot mv_common.c: don't compile reset_environment if ENV_IS_NOWHERE ARMV7: OMAP: I2C driver: Write more than 1 byte at a time in i2c_write mvblx: Initial support for mvBlueLYNX-X MAINTAINERS |4 + MAKEALL |1 + arch/arm/cpu/armv7/omap3/sys_info.c | 13 +- arch/arm/include/asm/arch-omap3/omap3.h | 10 + board/matrix_vision/common/mv_common.c |2 + board/matrix_vision/mvblx/Makefile | 53 board/matrix_vision/mvblx/config.mk | 33 +++ board/matrix_vision/mvblx/fpga.c| 222 + board/matrix_vision/mvblx/fpga.h| 32 +++ board/matrix_vision/mvblx/mvblx.c | 171 + board/matrix_vision/mvblx/mvblx.h | 362 board/matrix_vision/mvblx/sys_eeprom.c | 396 +++ boards.cfg |1 + common/cmd_mmc.c|6 +- doc/README.omap3|5 + drivers/fpga/cyclon2.c | 10 + drivers/i2c/omap24xx_i2c.c | 134 +-- include/configs/omap3_mvblx.h | 312 18 files changed, 1686 insertions(+), 81 deletions(-) create mode 100644 board/matrix_vision/mvblx/Makefile create mode 100644 board/matrix_vision/mvblx/config.mk create mode 100644 board/matrix_vision/mvblx/fpga.c create mode 100644 board/matrix_vision/mvblx/fpga.h create mode 100644 board/matrix_vision/mvblx/mvblx.c create mode 100644 board/matrix_vision/mvblx/mvblx.h create mode 100644 board/matrix_vision/mvblx/sys_eeprom.c create mode 100644 include/configs/omap3_mvblx.h -- 1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/7] fpga: add #define for Altera Cyclone EP3C5
Signed-off-by: Michael Jones michael.jo...@matrix-vision.de --- include/ACEX1K.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/ACEX1K.h b/include/ACEX1K.h index ae20164..2bb9226 100644 --- a/include/ACEX1K.h +++ b/include/ACEX1K.h @@ -76,6 +76,7 @@ typedef struct { #define Altera_EP2C8_SIZE 247942 #define Altera_EP2C20_SIZE 586562 #define Altera_EP2C35_SIZE 883905 +#define Altera_EP3C5_SIZE 368011 /* .rbf size in bytes */ /* Descriptor Macros */ -- 1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/7] fpga: support FPP Cyclone configuration
Support FPGAs which use Fast Passive Parallel configuration Signed-off-by: Michael Jones michael.jo...@matrix-vision.de --- drivers/fpga/cyclon2.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/drivers/fpga/cyclon2.c b/drivers/fpga/cyclon2.c index 4622b4e..567099e 100644 --- a/drivers/fpga/cyclon2.c +++ b/drivers/fpga/cyclon2.c @@ -63,6 +63,16 @@ int CYC2_load (Altera_desc * desc, void *buf, size_t bsize) ret_val = CYC2_ps_load (desc, buf, bsize); break; + case fast_passive_parallel: + /* Fast Passive Parallel (FPP) and PS only differ in what is +* done in the write() callback. Use the existing PS load +* function for FPP, too. +*/ + PRINTF (%s: Launching Fast Passive Parallel Loader\n, + __FUNCTION__); + ret_val = CYC2_ps_load(desc, buf, bsize); + break; + /* Add new interface types here */ default: -- 1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/7] ARMV7: OMAP3: Add 37xx ESx revision numbers.
From: Howard D. Gray howard.g...@matrix-vision.de Signed-off-by: Michael Jones michael.jo...@matrix-vision.de --- arch/arm/cpu/armv7/omap3/sys_info.c | 13 - arch/arm/include/asm/arch-omap3/omap3.h | 10 ++ 2 files changed, 22 insertions(+), 1 deletions(-) diff --git a/arch/arm/cpu/armv7/omap3/sys_info.c b/arch/arm/cpu/armv7/omap3/sys_info.c index 549ac19..8f1e74a 100644 --- a/arch/arm/cpu/armv7/omap3/sys_info.c +++ b/arch/arm/cpu/armv7/omap3/sys_info.c @@ -43,6 +43,12 @@ static char *rev_s[CPU_3XX_MAX_REV] = { UNKNOWN, 3.1.2}; +/* this is the revision table for 37xx CPUs */ +static char *rev_s_37xx[CPU_37XX_MAX_REV] = { + 1.0, + 1.1, + 1.2}; + /* * dieid_num_r(void) - read and set die ID */ @@ -344,7 +350,12 @@ int print_cpuinfo (void) sec_s = ?; } - printf(%s%s-%s ES%s, CPU-OPP2, L3-165MHz, Max CPU Clock %s\n, + if (CPU_OMAP36XX == get_cpu_family()) + printf(%s%s-%s ES%s, CPU-OPP2, L3-165MHz, Max CPU Clock %s\n, + cpu_family_s, cpu_s, sec_s, + rev_s_37xx[get_cpu_rev()], max_clk); + else + printf(%s%s-%s ES%s, CPU-OPP2, L3-165MHz, Max CPU Clock %s\n, cpu_family_s, cpu_s, sec_s, rev_s[get_cpu_rev()], max_clk); diff --git a/arch/arm/include/asm/arch-omap3/omap3.h b/arch/arm/include/asm/arch-omap3/omap3.h index cc2b541..63340af 100644 --- a/arch/arm/include/asm/arch-omap3/omap3.h +++ b/arch/arm/include/asm/arch-omap3/omap3.h @@ -193,6 +193,16 @@ struct gpio { #define CPU_3XX_ES312 7 #define CPU_3XX_MAX_REV8 +/* + * 37xx real hardware: + * ES1.0 onwards, the value maps to contents of IDCODE register [31:28]. + */ + +#define CPU_37XX_ES10 0 +#define CPU_37XX_ES11 1 +#define CPU_37XX_ES12 2 +#define CPU_37XX_MAX_REV 3 + #define CPU_3XX_ID_SHIFT 28 #define WIDTH_8BIT 0x -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 5/7] mv_common.c: don't compile reset_environment if ENV_IS_NOWHERE
Doesn't make sense to provide this function to boards which defined CONFIG_ENV_IS_NOWHERE. Such a board gets a linking error because common/env_nowhere.c doesn't define saveenv(). Signed-off-by: Michael Jones michael.jo...@matrix-vision.de --- board/matrix_vision/common/mv_common.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/board/matrix_vision/common/mv_common.c b/board/matrix_vision/common/mv_common.c index 0afc535..404c8b4 100644 --- a/board/matrix_vision/common/mv_common.c +++ b/board/matrix_vision/common/mv_common.c @@ -38,6 +38,7 @@ static char* entries_to_keep[] = { #define MV_MAX_ENV_ENTRY_LENGTH64 #define MV_KEEP_ENTRIESARRAY_SIZE(entries_to_keep) +#ifndef CONFIG_ENV_IS_NOWHERE void mv_reset_environment(void) { int i; @@ -67,6 +68,7 @@ void mv_reset_environment(void) saveenv(); } +#endif int mv_load_fpga(void) { -- 1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/7] mmc: rescan fails on empty slot
Fail in 'mmc rescan' if mmc_init() returns error Signed-off-by: Michael Jones michael.jo...@matrix-vision.de --- common/cmd_mmc.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c index 176646d..28918f6 100644 --- a/common/cmd_mmc.c +++ b/common/cmd_mmc.c @@ -165,9 +165,11 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } mmc-has_init = 0; - mmc_init(mmc); - return 0; + if (mmc_init(mmc)) + return 1; + else + return 0; } else if (strncmp(argv[1], part, 4) == 0) { block_dev_desc_t *mmc_dev; struct mmc *mmc = find_mmc_device(curr_device); -- 1.7.5.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 6/7] ARMV7: OMAP: I2C driver: Write more than 1 byte at a time in i2c_write
This allows the EEPROM layer to send a single i2c write command per page, and wait CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS between i2c write commands. Signed-off-by: Michael Jones michael.jo...@matrix-vision.de --- drivers/i2c/omap24xx_i2c.c | 134 ++- 1 files changed, 56 insertions(+), 78 deletions(-) diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c index 966ffc4..4ae03bc 100644 --- a/drivers/i2c/omap24xx_i2c.c +++ b/drivers/i2c/omap24xx_i2c.c @@ -216,77 +216,6 @@ read_exit: return i2c_error; } -static int i2c_write_byte (u8 devaddr, u8 regoffset, u8 value) -{ - int i2c_error = 0; - u16 status; - - /* wait until bus not busy */ - wait_for_bb (); - - /* two bytes */ - writew (2, i2c_base-cnt); - /* set slave address */ - writew (devaddr, i2c_base-sa); - /* stop bit needed here */ - writew (I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | I2C_CON_TRX | - I2C_CON_STP, i2c_base-con); - - while (1) { - status = wait_for_pin(); - if (status == 0 || status I2C_STAT_NACK) { - i2c_error = 1; - goto write_exit; - } - if (status I2C_STAT_XRDY) { -#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX) || \ -defined(CONFIG_OMAP44XX) - /* send register offset */ - writeb(regoffset, i2c_base-data); - writew(I2C_STAT_XRDY, i2c_base-stat); - - while (1) { - status = wait_for_pin(); - if (status == 0 || status I2C_STAT_NACK) { - i2c_error = 1; - goto write_exit; - } - if (status I2C_STAT_XRDY) { - /* send data */ - writeb(value, i2c_base-data); - writew(I2C_STAT_XRDY, i2c_base-stat); - } - if (status I2C_STAT_ARDY) { - writew(I2C_STAT_ARDY, i2c_base-stat); - break; - } - } - break; -#else - /* send out two bytes */ - writew((value 8) + regoffset, i2c_base-data); - writew(I2C_STAT_XRDY, i2c_base-stat); -#endif - } - if (status I2C_STAT_ARDY) { - writew(I2C_STAT_ARDY, i2c_base-stat); - break; - } - } - - wait_for_bb(); - - status = readw(i2c_base-stat); - if (status I2C_STAT_NACK) - i2c_error = 1; - -write_exit: - flush_fifo(); - writew (0x, i2c_base-stat); - writew (0, i2c_base-cnt); - return i2c_error; -} - static void flush_fifo(void) { u16 stat; @@ -372,26 +301,75 @@ int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len) int i2c_write (uchar chip, uint addr, int alen, uchar * buffer, int len) { int i; + u16 status; + int i2c_error = 0; if (alen 1) { - printf (I2C read: addr len %d not supported\n, alen); + printf(I2C write: addr len %d not supported\n, alen); return 1; } if (addr + len 256) { - printf (I2C read: address out of range\n); + printf(I2C write: address 0x%x + 0x%x out of range\n); return 1; } + /* wait until bus not busy */ + wait_for_bb(); + + /* start address phase - will write regoffset + len bytes data */ + /* TODO consider case when !CONFIG_OMAP243X/34XX/44XX */ + writew(alen+len, i2c_base-cnt); + /* set slave address */ + writew(chip, i2c_base-sa); + /* stop bit needed here */ + writew(I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | I2C_CON_TRX | + I2C_CON_STP, i2c_base-con); + + /* Send address byte */ + status = wait_for_pin(); + + if (status == 0 || status I2C_STAT_NACK) { + i2c_error = 1; + printf(%s:%d error status=0x%x\n, __func__, __LINE__, status); + goto write_exit; + } + + if (status I2C_STAT_XRDY) { + writeb(addr 0xFF, i2c_base-data); + writew(I2C_STAT_XRDY, i2c_base-stat); + } else { + i2c_error = 1; + printf(%s:%d error status=0x%x\n, __func__, __LINE__, status); + goto write_exit; + } + + /* address phase is over, now write data */ for (i = 0; i len; i++) { - if (i2c_write_byte (chip, addr + i, buffer[i])) {
Re: [U-Boot] [PATCH] miiphy: use strcpy() not sprintf()
On Thu, Jul 14, 2011 at 02:02:42PM -0400, Mike Frysinger wrote: On Thursday, July 14, 2011 09:49:23 Albert ARIBAUD wrote: Please use strncpy() which will also guard against overflows. or BUG_ON(strlen(name) = MDIO_NAME_LEN) -mike Patch v3 has both. The original code did have a check for the name overflowing but BUG_ON() is IMO clearer so I switched to using it instead. I kept strncpy() in v3, rather than just strcpy(), because it makes the code robust against future edits. Thanks for the feedback. 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
[U-Boot] [PATCH] miiphy: use strncpy() not sprintf()
In miiphy_register() the new device's name was initialised by passing a string parameter as the format string to sprintf(). As this would cause problems if it ever contained a '%' symbol, switch to using strncpy() instead. Signed-off-by: Laurence Withers lwith...@guralp.com Cc: Andy Fleming aflem...@freescale.com --- Changes for v2: - Use strncpy() rather than plain strcpy() for extra safety. Changes for v3: - Use BUG_ON() as an additional safety measure to ensure the name never exceeds the buffer size MDIO_NAME_LEN, simplifying the previous test. --- common/miiphyutil.c | 14 -- 1 files changed, 4 insertions(+), 10 deletions(-) diff --git a/common/miiphyutil.c b/common/miiphyutil.c index bcab74e..35ad357 100644 --- a/common/miiphyutil.c +++ b/common/miiphyutil.c @@ -111,7 +111,8 @@ void miiphy_register(const char *name, { struct mii_dev *new_dev; struct legacy_mii_dev *ldev; - unsigned int name_len; + + BUG_ON(strlen(name) = MDIO_NAME_LEN); /* check if we have unique name */ new_dev = miiphy_get_dev_by_name(name); @@ -121,14 +122,6 @@ void miiphy_register(const char *name, } /* allocate memory */ - name_len = strlen(name); - if (name_len MDIO_NAME_LEN - 1) { - /* Hopefully this won't happen, but if it does, we'll know */ - printf(miiphy_register: MDIO name was longer than %d\n, - MDIO_NAME_LEN); - return; - } - new_dev = mdio_alloc(); ldev = malloc(sizeof(*ldev)); @@ -141,7 +134,8 @@ void miiphy_register(const char *name, /* initalize mii_dev struct fields */ new_dev-read = legacy_miiphy_read; new_dev-write = legacy_miiphy_write; - sprintf(new_dev-name, name); + strncpy(new_dev-name, name, MDIO_NAME_LEN); + new_dev-name[MDIO_NAME_LEN - 1] = 0; ldev-read = read; ldev-write = write; new_dev-priv = ldev; -- 1.7.2.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4] scb9328: Add ARM relocation support
From: Torsten Koschorrek koschor...@synertronixx.de This patch fixes compiler errors due to missing definitions of CONFIG_SYS_SDRAM_BASE and CONFIG_SYS_INIT_SP_ADDR. It also does some cleanup: CONFIG_SYS_TEXT_BASE was moved to scb9328.h, obsolete config.mk was removed. The scb9328 board has 1 DRAM bank, so don't ask for more banks. CONFIG_NR_DRAM_BANKS will ever be 1. Signed-off-by: Torsten Koschorrek koschor...@synertronixx.de --- Changes in v2: - config.mk removed - cleanups in dram_init_banksize() Changes in v3: - checkpatch errors fixed Changes in v4: - patch send with git send-email board/scb9328/config.mk | 10 -- board/scb9328/scb9328.c | 24 +--- include/configs/scb9328.h |5 + 3 files changed, 14 insertions(+), 25 deletions(-) delete mode 100644 board/scb9328/config.mk diff --git a/board/scb9328/config.mk b/board/scb9328/config.mk deleted file mode 100644 index 7c5e067..000 --- a/board/scb9328/config.mk +++ /dev/null @@ -1,10 +0,0 @@ -# -# This config file is used for compilation of scb93328 sources -# -# You might change location of U-Boot in memory by setting right CONFIG_SYS_TEXT_BASE. -# This allows for example having one copy located at the end of ram and stored -# in flash device and later on while developing use other location to test -# the code in RAM device only. -# - -CONFIG_SYS_TEXT_BASE = 0x08f0 diff --git a/board/scb9328/scb9328.c b/board/scb9328/scb9328.c index 428e8c9..2e31e8c 100644 --- a/board/scb9328/scb9328.c +++ b/board/scb9328/scb9328.c @@ -39,23 +39,17 @@ int board_init (void) int dram_init (void) { -#if ( CONFIG_NR_DRAM_BANKS 0 ) + /* dram_init must store complete ramsize in gd-ram_size */ + gd-ram_size = get_ram_size((volatile void *)SCB9328_SDRAM_1, + SCB9328_SDRAM_1_SIZE); + + return 0; +} + +void dram_init_banksize(void) +{ gd-bd-bi_dram[0].start = SCB9328_SDRAM_1; gd-bd-bi_dram[0].size = SCB9328_SDRAM_1_SIZE; -#endif -#if ( CONFIG_NR_DRAM_BANKS 1 ) - gd-bd-bi_dram[1].start = SCB9328_SDRAM_2; - gd-bd-bi_dram[1].size = SCB9328_SDRAM_2_SIZE; -#endif -#if ( CONFIG_NR_DRAM_BANKS 2 ) - gd-bd-bi_dram[2].start = SCB9328_SDRAM_3; - gd-bd-bi_dram[2].size = SCB9328_SDRAM_3_SIZE; -#endif -#if ( CONFIG_NR_DRAM_BANKS 3 ) - gd-bd-bi_dram[3].start = SCB9328_SDRAM_4; - gd-bd-bi_dram[3].size = SCB9328_SDRAM_4_SIZE; -#endif - return 0; } /** diff --git a/include/configs/scb9328.h b/include/configs/scb9328.h index 6a92ec3..1b5d931 100644 --- a/include/configs/scb9328.h +++ b/include/configs/scb9328.h @@ -126,6 +126,11 @@ #define SCB9328_SDRAM_10x0800 /* SDRAM bank #1 */ #define SCB9328_SDRAM_1_SIZE 0x0100 /* 16 MB */ +#define CONFIG_SYS_TEXT_BASE 0x1000 + +#define CONFIG_SYS_SDRAM_BASE SCB9328_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR(SCB9328_SDRAM_1 + 0xf0) + /* * Configuration for FLASH memory for the Synertronixx board */ -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] integratorap: disable dcache
Hi Laurence, On Friday 15 July 2011 10:54:41 Laurence Withers wrote: On Fri, Jul 15, 2011 at 09:42:53AM +0200, Heiko Schocher wrote: Hmm.. trying bootm with actual u-boot on a davinci (arm926ejs) based board, there I couldn;t use the Davinci-EMAC (if I disable the dcache it works ...) I can confirm there are some cache coherency problems with the DaVinci EMAC driver. I've done a port to a new board based on the DA850 and had problems with corrupt Ethernet packets until I disabled the dcache altogether. The clue was the packets started working when I added a hex dump just before eth_send()! While I haven't come across any explicit documentation I presume the EMAC controller's independent DMA engine is simply not aware of the ARM's cache. Yes. I haven't yet identified whether there's some mechanism already in U-Boot for marking particular bits of memory as uncacheable, which would seem to be the correct approach, but turning of dcache doesn't really have any side effects that cause problems for me. The side effect is a slow down on boot time. And it should be avoided if possible. We have stumbled over this d-cache problem on powerpc a while ago. I suggest you take a look at the EHCI driver for example (drivers/usb/host/ehci-hcd.c). Please search for CONFIG_EHCI_DCACHE). We implemented the following functions on powerpc for d-cache handling: - flush_dcache_range() - invalidate_dcache_range() The API was taken from Linux at that time. Now I notice that unfortunately this API seems to be powerpc specific in Linux. IMHO it would make sense to either implement this API for all other platforms using dcache with DMA engines (e.g. USB), or introduce another cache/flush/invalidate API and move powerpc to it as well. Best regards, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] integratorap: disable dcache
On Fri, Jul 15, 2011 at 9:42 AM, Heiko Schocher h...@denx.de wrote: Heiko, Alessandro, do you have any hints on how to go about flushing and disabling the D-cache in bootm for ARM920T? It doesn't seem to work on this ARM CPU chip in its current form... Hmm.. trying bootm with actual u-boot on a davinci (arm926ejs) based board, there I couldn;t use the Davinci-EMAC (if I disable the dcache it works ...) I take it that due to the above you cannot even get so far as to testing bootm on that platform with recent kernels? If you upload the kernel with say loady over serial (this is what I have to use on this board that has no ethernet) then does the bootm command work? Thanks, Linus Walleij ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] gpio:s5p s5p_ suffix add for GPIO functions
Dear Lukasz Majewski, On 11 July 2011 17:18, Lukasz Majewski l.majew...@samsung.com wrote: This change is driven by need of general gpio_* functions, which as their parameter are accepting the GPIO pin number, NOT block and pin. This makes the code alike to omap, and allows for using I2C software generic framework. Signed-off-by: Lukasz Majewski l.majew...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com --- arch/arm/include/asm/arch-s5pc1xx/gpio.h | 16 arch/arm/include/asm/arch-s5pc2xx/gpio.h | 16 board/samsung/goni/goni.c | 8 board/samsung/smdkc100/smdkc100.c | 2 +- board/samsung/smdkv310/smdkv310.c | 8 drivers/gpio/s5p_gpio.c | 20 ++-- 6 files changed, 35 insertions(+), 35 deletions(-) Please make it single patch. separate from i2c patch. Thanks Minkyu Kang -- from. prom. www.promsoft.net ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] i2c:gpio:s5p: I2C GPIO Software implementation (via soft_i2c)
Dear Lukasz Majewski, On 11 July 2011 17:18, Lukasz Majewski l.majew...@samsung.com wrote: Signed-off-by: Lukasz Majewski l.majew...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com --- arch/arm/include/asm/arch-s5pc1xx/gpio.h | 2 + board/samsung/goni/goni.c | 55 +- include/configs/s5p_goni.h | 13 +++ 3 files changed, 69 insertions(+), 1 deletions(-) You missing commit message. diff --git a/arch/arm/include/asm/arch-s5pc1xx/gpio.h b/arch/arm/include/asm/arch-s5pc1xx/gpio.h index 903de9c..108fb64 100644 --- a/arch/arm/include/asm/arch-s5pc1xx/gpio.h +++ b/arch/arm/include/asm/arch-s5pc1xx/gpio.h @@ -155,4 +155,6 @@ void s5p_gpio_set_rate(struct s5p_gpio_bank *bank, int gpio, int mode); #define GPIO_DRV_FAST 0x0 #define GPIO_DRV_SLOW 0x1 +/* GPIO pins per bank */ +#define GPIO_PER_BANK 8 #endif diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c index e24cd29..dbbd7ed 100644 --- a/board/samsung/goni/goni.c +++ b/board/samsung/goni/goni.c @@ -1,7 +1,8 @@ /* - * Copyright (C) 2008-2009 Samsung Electronics + * Copyright (C) 2008-2011 Samsung Electronics * Minkyu Kang mk7.k...@samsung.com * Kyungmin Park kyungmin.p...@samsung.com + * Lukasz Majewski l.majew...@samsung.com * * See file CREDITS for list of people who contributed to this * project. @@ -96,3 +97,55 @@ int board_mmc_init(bd_t *bis) return s5p_mmc_init(0, 4); } #endif + +#ifdef CONFIG_SOFT_I2C + +enum { I2C_PMIC, I2C_NUM, }; What purpose of these enum? Where these used? + +void i2c_init_board(void) {} + +int s5p_gpio_get_nr(void *gp_ptr, int gpio) +{ + unsigned int offset = gp_ptr - (void *) s5pc110_gpio; + offset /= sizeof(struct s5p_gpio_bank); + + return (offset * GPIO_PER_BANK) + gpio; +} + +struct s5p_gpio_bank *s5p_gpio_get_bank(int nr) +{ + int bank = nr / GPIO_PER_BANK; + bank *= sizeof(struct s5p_gpio_bank); + + return (struct s5p_gpio_bank *) ((void *) s5pc110_gpio + bank); +} + +inline int s5p_gpio_get_pin(int nr) +{ + return nr % GPIO_PER_BANK; +} + +inline int gpio_direction_input(int nr) +{ + s5p_gpio_direction_input(s5p_gpio_get_bank(nr), + s5p_gpio_get_pin(nr)); +} + +inline int gpio_direction_output(int nr, int value) +{ + s5p_gpio_direction_output(s5p_gpio_get_bank(nr), + s5p_gpio_get_pin(nr), value); +} + +inline int gpio_get_value(int nr) +{ + return (int) s5p_gpio_get_value(s5p_gpio_get_bank(nr), + s5p_gpio_get_pin(nr)); +} + +inline void gpio_set_value(int nr, int value) +{ + s5p_gpio_set_value(s5p_gpio_get_bank(nr), + s5p_gpio_get_pin(nr), value); +} +#endif I think It's not a board specific. Please make common file for I2C gpio for s5p. diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h index 010428b..ee87927 100644 --- a/include/configs/s5p_goni.h +++ b/include/configs/s5p_goni.h @@ -224,4 +224,17 @@ #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - 0x100) +#include asm/arch/gpio.h +/* + * I2C Settings + */ +#define S5PC110_GPIO_J3 (S5PC110_GPIO_BASE + 0x2C0) +#define CONFIG_SOFT_I2C_GPIO_SCL s5p_gpio_get_nr(S5PC110_GPIO_J3, 3) +#define CONFIG_SOFT_I2C_GPIO_SDA s5p_gpio_get_nr(S5PC110_GPIO_J3, 0) I have one question. How we can handle multiple bus? I mean.. how we can change SCL and SDA? + +#define CONFIG_SOFT_I2C 1 +#define CONFIG_SYS_I2C_INIT_BOARD +#define CONFIG_SYS_I2C_SPEED 5 +#define CONFIG_I2C_MULTI_BUS +#define CONFIG_SYS_MAX_I2C_BUS 7 #endif /* __CONFIG_H */ -- 1.7.2.3 Thanks Minkyu Kang -- from. prom. www.promsoft.net ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4] scb9328: Add ARM relocation support
On 07/15/2011 11:16 AM, 'Torsten Koschorrek ' wrote: From: Torsten Koschorrek koschor...@synertronixx.de This patch fixes compiler errors due to missing definitions of CONFIG_SYS_SDRAM_BASE and CONFIG_SYS_INIT_SP_ADDR. It also does some cleanup: CONFIG_SYS_TEXT_BASE was moved to scb9328.h, obsolete config.mk was removed. The scb9328 board has 1 DRAM bank, so don't ask for more banks. CONFIG_NR_DRAM_BANKS will ever be 1. Signed-off-by: Torsten Koschorrek koschor...@synertronixx.de Applied to u-boot-imx, thanks. Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RESEND PATCH] gpio:samsung s5p_ suffix add for GPIO functions
This change is driven by need of general gpio_* functions, which as their parameter are accepting the GPIO pin number, NOT block and pin. This makes the code alike to omap, and allows for using more generic frameworks (e.g. software I2C). Signed-off-by: Lukasz Majewski l.majew...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com --- arch/arm/include/asm/arch-s5pc1xx/gpio.h | 16 arch/arm/include/asm/arch-s5pc2xx/gpio.h | 16 board/samsung/goni/goni.c|8 board/samsung/smdkc100/smdkc100.c|2 +- board/samsung/smdkv310/smdkv310.c|8 drivers/gpio/s5p_gpio.c | 20 ++-- 6 files changed, 35 insertions(+), 35 deletions(-) diff --git a/arch/arm/include/asm/arch-s5pc1xx/gpio.h b/arch/arm/include/asm/arch-s5pc1xx/gpio.h index 485b9bf..903de9c 100644 --- a/arch/arm/include/asm/arch-s5pc1xx/gpio.h +++ b/arch/arm/include/asm/arch-s5pc1xx/gpio.h @@ -126,14 +126,14 @@ struct s5pc110_gpio { }; /* functions */ -void gpio_cfg_pin(struct s5p_gpio_bank *bank, int gpio, int cfg); -void gpio_direction_output(struct s5p_gpio_bank *bank, int gpio, int en); -void gpio_direction_input(struct s5p_gpio_bank *bank, int gpio); -void gpio_set_value(struct s5p_gpio_bank *bank, int gpio, int en); -unsigned int gpio_get_value(struct s5p_gpio_bank *bank, int gpio); -void gpio_set_pull(struct s5p_gpio_bank *bank, int gpio, int mode); -void gpio_set_drv(struct s5p_gpio_bank *bank, int gpio, int mode); -void gpio_set_rate(struct s5p_gpio_bank *bank, int gpio, int mode); +void s5p_gpio_cfg_pin(struct s5p_gpio_bank *bank, int gpio, int cfg); +void s5p_gpio_direction_output(struct s5p_gpio_bank *bank, int gpio, int en); +void s5p_gpio_direction_input(struct s5p_gpio_bank *bank, int gpio); +void s5p_gpio_set_value(struct s5p_gpio_bank *bank, int gpio, int en); +unsigned int s5p_gpio_get_value(struct s5p_gpio_bank *bank, int gpio); +void s5p_gpio_set_pull(struct s5p_gpio_bank *bank, int gpio, int mode); +void s5p_gpio_set_drv(struct s5p_gpio_bank *bank, int gpio, int mode); +void s5p_gpio_set_rate(struct s5p_gpio_bank *bank, int gpio, int mode); #endif /* Pin configurations */ diff --git a/arch/arm/include/asm/arch-s5pc2xx/gpio.h b/arch/arm/include/asm/arch-s5pc2xx/gpio.h index 38303e4..8db5895 100644 --- a/arch/arm/include/asm/arch-s5pc2xx/gpio.h +++ b/arch/arm/include/asm/arch-s5pc2xx/gpio.h @@ -80,14 +80,14 @@ struct s5pc210_gpio_part3 { }; /* functions */ -void gpio_cfg_pin(struct s5p_gpio_bank *bank, int gpio, int cfg); -void gpio_direction_output(struct s5p_gpio_bank *bank, int gpio, int en); -void gpio_direction_input(struct s5p_gpio_bank *bank, int gpio); -void gpio_set_value(struct s5p_gpio_bank *bank, int gpio, int en); -unsigned int gpio_get_value(struct s5p_gpio_bank *bank, int gpio); -void gpio_set_pull(struct s5p_gpio_bank *bank, int gpio, int mode); -void gpio_set_drv(struct s5p_gpio_bank *bank, int gpio, int mode); -void gpio_set_rate(struct s5p_gpio_bank *bank, int gpio, int mode); +void s5p_gpio_cfg_pin(struct s5p_gpio_bank *bank, int gpio, int cfg); +void s5p_gpio_direction_output(struct s5p_gpio_bank *bank, int gpio, int en); +void s5p_gpio_direction_input(struct s5p_gpio_bank *bank, int gpio); +void s5p_gpio_set_value(struct s5p_gpio_bank *bank, int gpio, int en); +unsigned int s5p_gpio_get_value(struct s5p_gpio_bank *bank, int gpio); +void s5p_gpio_set_pull(struct s5p_gpio_bank *bank, int gpio, int mode); +void s5p_gpio_set_drv(struct s5p_gpio_bank *bank, int gpio, int mode); +void s5p_gpio_set_rate(struct s5p_gpio_bank *bank, int gpio, int mode); #endif /* Pin configurations */ diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c index 581935d..e24cd29 100644 --- a/board/samsung/goni/goni.c +++ b/board/samsung/goni/goni.c @@ -73,7 +73,7 @@ int board_mmc_init(bd_t *bis) int i; /* MASSMEMORY_EN: XMSMDATA7: GPJ2[7] output high */ - gpio_direction_output(s5pc110_gpio-j2, 7, 1); + s5p_gpio_direction_output(s5pc110_gpio-j2, 7, 1); /* * MMC0 GPIO @@ -86,11 +86,11 @@ int board_mmc_init(bd_t *bis) if (i == 2) continue; /* GPG0[0:6] special function 2 */ - gpio_cfg_pin(s5pc110_gpio-g0, i, 0x2); + s5p_gpio_cfg_pin(s5pc110_gpio-g0, i, 0x2); /* GPG0[0:6] pull disable */ - gpio_set_pull(s5pc110_gpio-g0, i, GPIO_PULL_NONE); + s5p_gpio_set_pull(s5pc110_gpio-g0, i, GPIO_PULL_NONE); /* GPG0[0:6] drv 4x */ - gpio_set_drv(s5pc110_gpio-g0, i, GPIO_DRV_4X); + s5p_gpio_set_drv(s5pc110_gpio-g0, i, GPIO_DRV_4X); } return s5p_mmc_init(0, 4); diff --git a/board/samsung/smdkc100/smdkc100.c b/board/samsung/smdkc100/smdkc100.c index 1ad68b9..c41e610 100644 --- a/board/samsung/smdkc100/smdkc100.c +++
[U-Boot] [PATCH v2] Let source cross-reference targets follow symbolic links
From: Horst Kronstorfer hkron...@frequentis.com Without telling 'find' to follow symbolic links, files under include/asm and arch/$(ARCH)/include/asm/arch are not added to the indexing file list. Signed-off-by: Horst Kronstorfer hkron...@frequentis.com Changes for v2: - Apply this change to all source cross-reference targets --- Makefile |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index e56fa02..e86a81a 100644 --- a/Makefile +++ b/Makefile @@ -471,15 +471,17 @@ TAG_SUBDIRS = $(SUBDIRS) TAG_SUBDIRS += $(dir $(__LIBS)) TAG_SUBDIRS += include +FIND := find -L + tags ctags: - ctags -w -o $(obj)ctags `find $(TAG_SUBDIRS) \ + ctags -w -o $(obj)ctags `$(FIND) $(TAG_SUBDIRS) \ -name '*.[chS]' -print` etags: - etags -a -o $(obj)etags `find $(TAG_SUBDIRS) \ + etags -a -o $(obj)etags `$(FIND) $(TAG_SUBDIRS) \ -name '*.[chS]' -print` cscope: - find $(TAG_SUBDIRS) -name '*.[chS]' -print cscope.files + $(FIND) $(TAG_SUBDIRS) -name '*.[chS]' -print cscope.files cscope -b -q -k SYSTEM_MAP = \ -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] integratorap: remove hardcoded 32MB memory cmdline
On Thu, Jul 14, 2011 at 8:03 PM, Linus Walleij linus.wall...@linaro.org wrote: On Thu, Jul 14, 2011 at 1:44 PM, Wolfgang Denk w...@denx.de wrote: --- a/include/configs/integratorap.h +++ b/include/configs/integratorap.h Please make sure to Cc: the board maintainer! Aw yes, that's one thing. Peter, are you still looking after the Integrator AP board support in U-boot? I got this as autoreply from another conversation, so obviously Peter isn't working with this anymore, actually if I recall correctly, he has retired from ARM. I will attempt to find his private email address but I will propose a patch taking over as Integrator maintainer since I have the board and I suspect noone else i likely to be working with it. From: staffleav...@arm.com Sender: staffleav...@arm.com Reply-To: staffleav...@arm.com To: Linus Walleij linus.wall...@linaro.org Subject: Re: Re: ARM DMA controllers X-OriginalArrivalTime: 14 Jul 2011 20:25:56.0600 (UTC) FILETIME=[3C7EAF80:01CC4264] peter.pearse no longer works for ARM. Your email will be forwarded to their line manager. Please do not reply to this email. If you need more information, please email real-postmas...@arm.com Thank you. --- Thanks, Linus Walleij ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] i2c:gpio:s5p: I2C GPIO Software implementation (via soft_i2c)
Hi Minkyu, + +#ifdef CONFIG_SOFT_I2C + +enum { I2C_PMIC, I2C_NUM, }; What purpose of these enum? Where these used? For now goni reference target is going to use only one I2C bus (implemented as soft_i2c GPIO). Therefore this enum will be erased for v2. In the future, however this might be needed. +#define S5PC110_GPIO_J3 (S5PC110_GPIO_BASE + 0x2C0) +#define CONFIG_SOFT_I2C_GPIO_SCL s5p_gpio_get_nr(S5PC110_GPIO_J3, 3) +#define CONFIG_SOFT_I2C_GPIO_SDA s5p_gpio_get_nr(S5PC110_GPIO_J3, 0) I have one question. How we can handle multiple bus? I mean.. how we can change SCL and SDA? I've asked this question to Heiko Schocher already. Please refer to this reply: http://lists.denx.de/pipermail/u-boot/2011-July/095610.html -- Best regards, Lukasz Majewski Samsung Poland RD Center Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] No gpio.h file
Dear Wolfgang, There is no asm/gpio.h file available in U-Boot 2011.06 release. So generic gpio framework is being created now?? Regards, Ajay Bhargav ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] miiphy: use strncpy() not sprintf()
On Fri, Jul 15, 2011 at 09:21:45AM +, Laurence Withers wrote: In miiphy_register() the new device's name was initialised by passing a string parameter as the format string to sprintf(). As this would cause problems if it ever contained a '%' symbol, switch to using strncpy() instead. My apologies; I have missed the v3 tag in the subject. I shall repost. 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
[U-Boot] [PATCH v3] miiphy: use strncpy() not sprintf()
In miiphy_register() the new device's name was initialised by passing a string parameter as the format string to sprintf(). As this would cause problems if it ever contained a '%' symbol, switch to using strncpy() instead. Signed-off-by: Laurence Withers lwith...@guralp.com Cc: Andy Fleming aflem...@freescale.com --- Changes for v2: - Use strncpy() rather than plain strcpy() for extra safety. Changes for v3: - Use BUG_ON() as an additional safety measure to ensure the name never exceeds the buffer size MDIO_NAME_LEN, simplifying the previous test. --- common/miiphyutil.c | 14 -- 1 files changed, 4 insertions(+), 10 deletions(-) diff --git a/common/miiphyutil.c b/common/miiphyutil.c index bcab74e..35ad357 100644 --- a/common/miiphyutil.c +++ b/common/miiphyutil.c @@ -111,7 +111,8 @@ void miiphy_register(const char *name, { struct mii_dev *new_dev; struct legacy_mii_dev *ldev; - unsigned int name_len; + + BUG_ON(strlen(name) = MDIO_NAME_LEN); /* check if we have unique name */ new_dev = miiphy_get_dev_by_name(name); @@ -121,14 +122,6 @@ void miiphy_register(const char *name, } /* allocate memory */ - name_len = strlen(name); - if (name_len MDIO_NAME_LEN - 1) { - /* Hopefully this won't happen, but if it does, we'll know */ - printf(miiphy_register: MDIO name was longer than %d\n, - MDIO_NAME_LEN); - return; - } - new_dev = mdio_alloc(); ldev = malloc(sizeof(*ldev)); @@ -141,7 +134,8 @@ void miiphy_register(const char *name, /* initalize mii_dev struct fields */ new_dev-read = legacy_miiphy_read; new_dev-write = legacy_miiphy_write; - sprintf(new_dev-name, name); + strncpy(new_dev-name, name, MDIO_NAME_LEN); + new_dev-name[MDIO_NAME_LEN - 1] = 0; ldev-read = read; ldev-write = write; new_dev-priv = ldev; -- 1.7.2.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Ping command
Dear smitha.va...@wipro.com, please stop top posting/ full quoting. You can find hints here: http://www.netmeister.org/news/learn2quote.html In message 07acdfb8eca8ef47863a613bc01bbb22032bc...@hyd-mkd-mbx02.wipro.com you wrote: I get the below messages. Its failing in the fec_send BD_ENET_TX_READY bit is not getting set. Any clue? Check your clock routing. Eventually you have misconfigured the Tx clock. ping 172.16.52.20 Using unknown device ping failed; host 172.16.52.20 is not alive Check the source code and find out why ping reports an unknown device. Did you solve this unknown device issue? THis must be done first. 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 Very ugly or very beautiful women should be flattered on their understanding, and mediocre ones on their beauty. -- Philip Earl of Chesterfield ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/4] DaVinci/DA8xx cleanups
Some general cleanup patches for the DaVinci/DA8xx CPUs made in preparation for porting to a new board based on the DA850. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/4] DA8xx: fix LPSC constants
Some of the LPSC constants were incorrect, and some were missing. This commit fixes the incorrect constants (which were not used anywhere in the tree) and adds all constants for both DA830 and DA850, as per the TI datasheets. Signed-off-by: Laurence Withers lwith...@guralp.com --- arch/arm/include/asm/arch-davinci/hardware.h | 43 ++--- 1 files changed, 31 insertions(+), 12 deletions(-) diff --git a/arch/arm/include/asm/arch-davinci/hardware.h b/arch/arm/include/asm/arch-davinci/hardware.h index 551b469..f537c4b 100644 --- a/arch/arm/include/asm/arch-davinci/hardware.h +++ b/arch/arm/include/asm/arch-davinci/hardware.h @@ -234,27 +234,46 @@ typedef volatile unsigned int * dv_reg_p; /* for LPSCs in PSC1, offset from 32 for differentiation */ #define DAVINCI_LPSC_PSC1_BASE 32 -#define DAVINCI_LPSC_USB11 (DAVINCI_LPSC_PSC1_BASE + 1) -#define DAVINCI_LPSC_USB20 (DAVINCI_LPSC_PSC1_BASE + 2) +#define DAVINCI_LPSC_USB20 (DAVINCI_LPSC_PSC1_BASE + 1) +#define DAVINCI_LPSC_USB11 (DAVINCI_LPSC_PSC1_BASE + 2) #define DAVINCI_LPSC_GPIO (DAVINCI_LPSC_PSC1_BASE + 3) #define DAVINCI_LPSC_UHPI (DAVINCI_LPSC_PSC1_BASE + 4) #define DAVINCI_LPSC_EMAC (DAVINCI_LPSC_PSC1_BASE + 5) #define DAVINCI_LPSC_DDR_EMIF (DAVINCI_LPSC_PSC1_BASE + 6) #define DAVINCI_LPSC_McASP0(DAVINCI_LPSC_PSC1_BASE + 7) -#define DAVINCI_LPSC_McASP1(DAVINCI_LPSC_PSC1_BASE + 8) -#define DAVINCI_LPSC_McASP2(DAVINCI_LPSC_PSC1_BASE + 9) #define DAVINCI_LPSC_SPI1 (DAVINCI_LPSC_PSC1_BASE + 10) #define DAVINCI_LPSC_I2C1 (DAVINCI_LPSC_PSC1_BASE + 11) #define DAVINCI_LPSC_UART1 (DAVINCI_LPSC_PSC1_BASE + 12) #define DAVINCI_LPSC_UART2 (DAVINCI_LPSC_PSC1_BASE + 13) -#define DAVINCI_LPSC_LCDC (DAVINCI_LPSC_PSC1_BASE + 14) -#define DAVINCI_LPSC_ePWM (DAVINCI_LPSC_PSC1_BASE + 15) -#define DAVINCI_LPSC_eCAP (DAVINCI_LPSC_PSC1_BASE + 16) -#define DAVINCI_LPSC_eQEP (DAVINCI_LPSC_PSC1_BASE + 17) -#define DAVINCI_LPSC_SCR_P0(DAVINCI_LPSC_PSC1_BASE + 18) -#define DAVINCI_LPSC_SCR_P1(DAVINCI_LPSC_PSC1_BASE + 19) -#define DAVINCI_LPSC_CR_P3 (DAVINCI_LPSC_PSC1_BASE + 20) -#define DAVINCI_LPSC_L3_CBA_RAM(DAVINCI_LPSC_PSC1_BASE + 21) +#define DAVINCI_LPSC_LCDC (DAVINCI_LPSC_PSC1_BASE + 16) +#define DAVINCI_LPSC_ePWM (DAVINCI_LPSC_PSC1_BASE + 17) +#define DAVINCI_LPSC_eCAP (DAVINCI_LPSC_PSC1_BASE + 20) +#define DAVINCI_LPSC_L3_CBA_RAM(DAVINCI_LPSC_PSC1_BASE + 31) + +/* DA830-specific peripherals */ +#define DAVINCI_LPSC_McASP1(DAVINCI_LPSC_PSC1_BASE + 8) +#define DAVINCI_LPSC_McASP2(DAVINCI_LPSC_PSC1_BASE + 9) +#define DAVINCI_LPSC_eQEP (DAVINCI_LPSC_PSC1_BASE + 21) +#define DAVINCI_LPSC_SCR8 (DAVINCI_LPSC_PSC1_BASE + 24) +#define DAVINCI_LPSC_SCR7 (DAVINCI_LPSC_PSC1_BASE + 25) +#define DAVINCI_LPSC_SCR12 (DAVINCI_LPSC_PSC1_BASE + 26) + +/* DA850-specific peripherals */ +#define DAVINCI_LPSC_TPCC1 (DAVINCI_LPSC_PSC1_BASE + 0) +#define DAVINCI_LPSC_SATA (DAVINCI_LPSC_PSC1_BASE + 8) +#define DAVINCI_LPSC_VPIF (DAVINCI_LPSC_PSC1_BASE + 9) +#define DAVINCI_LPSC_McBSP0(DAVINCI_LPSC_PSC1_BASE + 14) +#define DAVINCI_LPSC_McBSP1(DAVINCI_LPSC_PSC1_BASE + 15) +#define DAVINCI_LPSC_MMC_SD1 (DAVINCI_LPSC_PSC1_BASE + 18) +#define DAVINCI_LPSC_uPP (DAVINCI_LPSC_PSC1_BASE + 19) +#define DAVINCI_LPSC_TPTC2 (DAVINCI_LPSC_PSC1_BASE + 21) +#define DAVINCI_LPSC_SCR_F0(DAVINCI_LPSC_PSC1_BASE + 24) +#define DAVINCI_LPSC_SCR_F1(DAVINCI_LPSC_PSC1_BASE + 25) +#define DAVINCI_LPSC_SCR_F2(DAVINCI_LPSC_PSC1_BASE + 26) +#define DAVINCI_LPSC_SCR_F6(DAVINCI_LPSC_PSC1_BASE + 27) +#define DAVINCI_LPSC_SCR_F7(DAVINCI_LPSC_PSC1_BASE + 28) +#define DAVINCI_LPSC_SCR_F8(DAVINCI_LPSC_PSC1_BASE + 29) +#define DAVINCI_LPSC_BR_F7 (DAVINCI_LPSC_PSC1_BASE + 30) #endif /* CONFIG_SOC_DA8XX */ -- 1.7.2.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/4] DaVinci EMAC: declare function for all DA8xx CPUs
The function davinci_emac_mii_mode_sel() is defined in board/davinci/common/misc.c for any DA8xx CPU which has CONFIG_DRIVER_TI_EMAC enabled. However, the prototype was only being declared in include/asm/arch/davinci_misc.h for the DA850 EVM board. This patch declares it for all DA8xx CPUs where CONFIG_DRIVER_TI_EMAC is enabled. Signed-off-by: Laurence Withers lwith...@guralp.com --- arch/arm/include/asm/arch-davinci/davinci_misc.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/include/asm/arch-davinci/davinci_misc.h b/arch/arm/include/asm/arch-davinci/davinci_misc.h index 347aa89..211b769 100644 --- a/arch/arm/include/asm/arch-davinci/davinci_misc.h +++ b/arch/arm/include/asm/arch-davinci/davinci_misc.h @@ -57,7 +57,7 @@ void davinci_sync_env_enetaddr(uint8_t *rom_enetaddr); int davinci_configure_pin_mux(const struct pinmux_config *pins, int n_pins); int davinci_configure_pin_mux_items(const struct pinmux_resource *item, int n_items); -#if defined(CONFIG_DRIVER_TI_EMAC) defined(CONFIG_MACH_DAVINCI_DA850_EVM) +#if defined(CONFIG_DRIVER_TI_EMAC) defined(CONFIG_SOC_DA8XX) void davinci_emac_mii_mode_sel(int mode_sel); #endif #if defined(CONFIG_SOC_DA8XX) -- 1.7.2.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/4] DA8xx: switch an enum to defines for consistency
There are two main sets of LPSC constants, depending on the processor family. The DA8xx constants were given in an enum whereas the non-DA8xx constants were preprocessor defines. This commit switches the DA8xx constants to defines for consistency. Signed-off-by: Laurence Withers lwith...@guralp.com --- arch/arm/include/asm/arch-davinci/hardware.h | 81 +- 1 files changed, 40 insertions(+), 41 deletions(-) diff --git a/arch/arm/include/asm/arch-davinci/hardware.h b/arch/arm/include/asm/arch-davinci/hardware.h index d5d4211..551b469 100644 --- a/arch/arm/include/asm/arch-davinci/hardware.h +++ b/arch/arm/include/asm/arch-davinci/hardware.h @@ -215,47 +215,46 @@ typedef volatile unsigned int * dv_reg_p; #else /* CONFIG_SOC_DA8XX */ -enum davinci_lpsc_ids { - DAVINCI_LPSC_TPCC = 0, - DAVINCI_LPSC_TPTC0, - DAVINCI_LPSC_TPTC1, - DAVINCI_LPSC_AEMIF, - DAVINCI_LPSC_SPI0, - DAVINCI_LPSC_MMC_SD, - DAVINCI_LPSC_AINTC, - DAVINCI_LPSC_ARM_RAM_ROM, - DAVINCI_LPSC_SECCTL_KEYMGR, - DAVINCI_LPSC_UART0, - DAVINCI_LPSC_SCR0, - DAVINCI_LPSC_SCR1, - DAVINCI_LPSC_SCR2, - DAVINCI_LPSC_DMAX, - DAVINCI_LPSC_ARM, - DAVINCI_LPSC_GEM, - /* for LPSCs in PSC1, offset from 32 for differentiation */ - DAVINCI_LPSC_PSC1_BASE = 32, - DAVINCI_LPSC_USB11, - DAVINCI_LPSC_USB20, - DAVINCI_LPSC_GPIO, - DAVINCI_LPSC_UHPI, - DAVINCI_LPSC_EMAC, - DAVINCI_LPSC_DDR_EMIF, - DAVINCI_LPSC_McASP0, - DAVINCI_LPSC_McASP1, - DAVINCI_LPSC_McASP2, - DAVINCI_LPSC_SPI1, - DAVINCI_LPSC_I2C1, - DAVINCI_LPSC_UART1, - DAVINCI_LPSC_UART2, - DAVINCI_LPSC_LCDC, - DAVINCI_LPSC_ePWM, - DAVINCI_LPSC_eCAP, - DAVINCI_LPSC_eQEP, - DAVINCI_LPSC_SCR_P0, - DAVINCI_LPSC_SCR_P1, - DAVINCI_LPSC_CR_P3, - DAVINCI_LPSC_L3_CBA_RAM -}; +#define DAVINCI_LPSC_TPCC 0 +#define DAVINCI_LPSC_TPTC0 1 +#define DAVINCI_LPSC_TPTC1 2 +#define DAVINCI_LPSC_AEMIF 3 +#define DAVINCI_LPSC_SPI0 4 +#define DAVINCI_LPSC_MMC_SD5 +#define DAVINCI_LPSC_AINTC 6 +#define DAVINCI_LPSC_ARM_RAM_ROM 7 +#define DAVINCI_LPSC_SECCTL_KEYMGR 8 +#define DAVINCI_LPSC_UART0 9 +#define DAVINCI_LPSC_SCR0 10 +#define DAVINCI_LPSC_SCR1 11 +#define DAVINCI_LPSC_SCR2 12 +#define DAVINCI_LPSC_DMAX 13 +#define DAVINCI_LPSC_ARM 14 +#define DAVINCI_LPSC_GEM 15 + +/* for LPSCs in PSC1, offset from 32 for differentiation */ +#define DAVINCI_LPSC_PSC1_BASE 32 +#define DAVINCI_LPSC_USB11 (DAVINCI_LPSC_PSC1_BASE + 1) +#define DAVINCI_LPSC_USB20 (DAVINCI_LPSC_PSC1_BASE + 2) +#define DAVINCI_LPSC_GPIO (DAVINCI_LPSC_PSC1_BASE + 3) +#define DAVINCI_LPSC_UHPI (DAVINCI_LPSC_PSC1_BASE + 4) +#define DAVINCI_LPSC_EMAC (DAVINCI_LPSC_PSC1_BASE + 5) +#define DAVINCI_LPSC_DDR_EMIF (DAVINCI_LPSC_PSC1_BASE + 6) +#define DAVINCI_LPSC_McASP0(DAVINCI_LPSC_PSC1_BASE + 7) +#define DAVINCI_LPSC_McASP1(DAVINCI_LPSC_PSC1_BASE + 8) +#define DAVINCI_LPSC_McASP2(DAVINCI_LPSC_PSC1_BASE + 9) +#define DAVINCI_LPSC_SPI1 (DAVINCI_LPSC_PSC1_BASE + 10) +#define DAVINCI_LPSC_I2C1 (DAVINCI_LPSC_PSC1_BASE + 11) +#define DAVINCI_LPSC_UART1 (DAVINCI_LPSC_PSC1_BASE + 12) +#define DAVINCI_LPSC_UART2 (DAVINCI_LPSC_PSC1_BASE + 13) +#define DAVINCI_LPSC_LCDC (DAVINCI_LPSC_PSC1_BASE + 14) +#define DAVINCI_LPSC_ePWM (DAVINCI_LPSC_PSC1_BASE + 15) +#define DAVINCI_LPSC_eCAP (DAVINCI_LPSC_PSC1_BASE + 16) +#define DAVINCI_LPSC_eQEP (DAVINCI_LPSC_PSC1_BASE + 17) +#define DAVINCI_LPSC_SCR_P0(DAVINCI_LPSC_PSC1_BASE + 18) +#define DAVINCI_LPSC_SCR_P1(DAVINCI_LPSC_PSC1_BASE + 19) +#define DAVINCI_LPSC_CR_P3 (DAVINCI_LPSC_PSC1_BASE + 20) +#define DAVINCI_LPSC_L3_CBA_RAM(DAVINCI_LPSC_PSC1_BASE + 21) #endif /* CONFIG_SOC_DA8XX */ -- 1.7.2.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/4] DA8xx: add MMC/SD controller addresses
Signed-off-by: Laurence Withers lwith...@guralp.com --- arch/arm/include/asm/arch-davinci/hardware.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/arch-davinci/hardware.h b/arch/arm/include/asm/arch-davinci/hardware.h index df3f549..d5d4211 100644 --- a/arch/arm/include/asm/arch-davinci/hardware.h +++ b/arch/arm/include/asm/arch-davinci/hardware.h @@ -140,6 +140,8 @@ typedef volatile unsigned int * dv_reg_p; #define DAVINCI_EMAC_WRAPPER_CNTRL_REGS_BASE 0x01e22000 #define DAVINCI_EMAC_WRAPPER_RAM_BASE 0x01e2 #define DAVINCI_MDIO_CNTRL_REGS_BASE 0x01e24000 +#define DAVINCI_MMC_SD0_BASE 0x01c4 +#define DAVINCI_MMC_SD1_BASE 0x01e1b000 #define DAVINCI_ASYNC_EMIF_CNTRL_BASE 0x6800 #define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x4000 #define DAVINCI_ASYNC_EMIF_DATA_CE2_BASE 0x6000 -- 1.7.2.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/2] DA8xx: add generic GPIO driver
This adds a generic GPIO driver fulfilling the asm/gpio.h interface for the TI DaVinci DA8xx CPU. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] DaVinci: rename gpio_defs.h to gpio.h
In preparation for a generic GPIO driver for the DA8xx processors, rename asm/arch/gpio_defs.h to asm/arch/gpio.h and fix up all files which include it. Signed-off-by: Laurence Withers lwith...@guralp.com --- arch/arm/include/asm/arch-davinci/gpio.h | 66 + arch/arm/include/asm/arch-davinci/gpio_defs.h | 66 - board/davinci/dm355leopard/dm355leopard.c |2 +- board/davinci/dm365evm/dm365evm.c |2 +- drivers/usb/musb/da8xx.h |2 +- 5 files changed, 69 insertions(+), 69 deletions(-) create mode 100644 arch/arm/include/asm/arch-davinci/gpio.h delete mode 100644 arch/arm/include/asm/arch-davinci/gpio_defs.h diff --git a/arch/arm/include/asm/arch-davinci/gpio.h b/arch/arm/include/asm/arch-davinci/gpio.h new file mode 100644 index 000..1be2ac2 --- /dev/null +++ b/arch/arm/include/asm/arch-davinci/gpio.h @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2009 Texas Instruments Incorporated + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ +#ifndef _GPIO_DEFS_H_ +#define _GPIO_DEFS_H_ + +#ifndef CONFIG_SOC_DA8XX +#define DAVINCI_GPIO_BINTEN0x01C67008 +#define DAVINCI_GPIO_BANK010x01C67010 +#define DAVINCI_GPIO_BANK230x01C67038 +#define DAVINCI_GPIO_BANK450x01C67060 +#define DAVINCI_GPIO_BANK670x01C67088 + +#else /* CONFIG_SOC_DA8XX */ +#define DAVINCI_GPIO_BINTEN0x01E26008 +#define DAVINCI_GPIO_BANK010x01E26010 +#define DAVINCI_GPIO_BANK230x01E26038 +#define DAVINCI_GPIO_BANK450x01E26060 +#define DAVINCI_GPIO_BANK670x01E26088 +#endif /* CONFIG_SOC_DA8XX */ + +struct davinci_gpio { + unsigned int dir; + unsigned int out_data; + unsigned int set_data; + unsigned int clr_data; + unsigned int in_data; + unsigned int set_rising; + unsigned int clr_rising; + unsigned int set_falling; + unsigned int clr_falling; + unsigned int intstat; +}; + +struct davinci_gpio_bank { + int num_gpio; + unsigned int irq_num; + unsigned int irq_mask; + unsigned long *in_use; + unsigned long base; +}; + +#define davinci_gpio_bank01 ((struct davinci_gpio *)DAVINCI_GPIO_BANK01) +#define davinci_gpio_bank23 ((struct davinci_gpio *)DAVINCI_GPIO_BANK23) +#define davinci_gpio_bank45 ((struct davinci_gpio *)DAVINCI_GPIO_BANK45) +#define davinci_gpio_bank67 ((struct davinci_gpio *)DAVINCI_GPIO_BANK67) + +#endif diff --git a/arch/arm/include/asm/arch-davinci/gpio_defs.h b/arch/arm/include/asm/arch-davinci/gpio_defs.h deleted file mode 100644 index 1be2ac2..000 --- a/arch/arm/include/asm/arch-davinci/gpio_defs.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2009 Texas Instruments Incorporated - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ -#ifndef _GPIO_DEFS_H_ -#define _GPIO_DEFS_H_ - -#ifndef CONFIG_SOC_DA8XX -#define DAVINCI_GPIO_BINTEN0x01C67008 -#define DAVINCI_GPIO_BANK010x01C67010 -#define DAVINCI_GPIO_BANK230x01C67038 -#define DAVINCI_GPIO_BANK450x01C67060 -#define DAVINCI_GPIO_BANK670x01C67088 - -#else /* CONFIG_SOC_DA8XX */ -#define DAVINCI_GPIO_BINTEN0x01E26008 -#define DAVINCI_GPIO_BANK010x01E26010 -#define DAVINCI_GPIO_BANK230x01E26038 -#define DAVINCI_GPIO_BANK450x01E26060 -#define DAVINCI_GPIO_BANK670x01E26088 -#endif /* CONFIG_SOC_DA8XX */ - -struct davinci_gpio { - unsigned int dir; - unsigned int out_data; - unsigned int
[U-Boot] [PATCH 2/2] DA8xx: add generic GPIO driver
Add a generic GPIO driver for the DaVinci DA8xx processors. It is turned on by defining CONFIG_DA8XX_GPIO and fulfills the generic GPIO interface specified in asm/gpio.h . The driver has support for both manipulating GPIO pins as well as automatically configuring the pin multiplexor registers to set the pin function to GPIO. Signed-off-by: Laurence Withers lwith...@guralp.com --- arch/arm/include/asm/arch-davinci/gpio.h |8 + drivers/gpio/Makefile|1 + drivers/gpio/da8xx_gpio.c| 281 ++ 3 files changed, 290 insertions(+), 0 deletions(-) create mode 100644 drivers/gpio/da8xx_gpio.c diff --git a/arch/arm/include/asm/arch-davinci/gpio.h b/arch/arm/include/asm/arch-davinci/gpio.h index 1be2ac2..29dcccf 100644 --- a/arch/arm/include/asm/arch-davinci/gpio.h +++ b/arch/arm/include/asm/arch-davinci/gpio.h @@ -63,4 +63,12 @@ struct davinci_gpio_bank { #define davinci_gpio_bank45 ((struct davinci_gpio *)DAVINCI_GPIO_BANK45) #define davinci_gpio_bank67 ((struct davinci_gpio *)DAVINCI_GPIO_BANK67) +#define gpio_status() gpio_info() +#define GPIO_NAME_SIZE 20 +#define MAX_NUM_GPIOS 144 +#define GPIO_BANK(gp) (davinci_gpio_bank01 + ((gp) 5)) +#define GPIO_BIT(gp) ((gp) 0x1F) + +void gpio_info(void); + #endif diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index 1e3ae11..62ec97d 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -32,6 +32,7 @@ COBJS-$(CONFIG_MXC_GPIO) += mxc_gpio.o COBJS-$(CONFIG_PCA953X)+= pca953x.o COBJS-$(CONFIG_S5P)+= s5p_gpio.o COBJS-$(CONFIG_TEGRA2_GPIO)+= tegra2_gpio.o +COBJS-$(CONFIG_DA8XX_GPIO) += da8xx_gpio.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/drivers/gpio/da8xx_gpio.c b/drivers/gpio/da8xx_gpio.c new file mode 100644 index 000..0308223 --- /dev/null +++ b/drivers/gpio/da8xx_gpio.c @@ -0,0 +1,281 @@ +/* + * GPIO driver for TI DaVinci DA8xx SOCs. + * + * (C) Copyright 2011 Guralp Systems Ltd. + * Laurence Withers lwith...@guralp.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include common.h +#include asm/io.h +#include asm/gpio.h +#include asm/arch/gpio.h +#include asm/arch/hardware.h +#include asm/arch/davinci_misc.h + + +static struct gpio_registry { + int is_registered; + char name[GPIO_NAME_SIZE]; +} gpio_registry[MAX_NUM_GPIOS]; + + +#define pinmux(x) (davinci_syscfg_regs-pinmux[x]) + +static const struct pinmux_config gpio_pinmux[] = { + { pinmux(1), 8, 7 },/* GP0[0] */ + { pinmux(1), 8, 6 }, + { pinmux(1), 8, 5 }, + { pinmux(1), 8, 4 }, + { pinmux(1), 8, 3 }, + { pinmux(1), 8, 2 }, + { pinmux(1), 8, 1 }, + { pinmux(1), 8, 0 }, + { pinmux(0), 8, 7 }, + { pinmux(0), 8, 6 }, + { pinmux(0), 8, 5 }, + { pinmux(0), 8, 4 }, + { pinmux(0), 8, 3 }, + { pinmux(0), 8, 2 }, + { pinmux(0), 8, 1 }, + { pinmux(0), 8, 0 }, + { pinmux(4), 8, 7 },/* GP1[0] */ + { pinmux(4), 8, 6 }, + { pinmux(4), 8, 5 }, + { pinmux(4), 8, 4 }, + { pinmux(4), 8, 3 }, + { pinmux(4), 8, 2 }, + { pinmux(4), 4, 1 }, + { pinmux(4), 4, 0 }, + { pinmux(3), 4, 0 }, + { pinmux(2), 4, 6 }, + { pinmux(2), 4, 5 }, + { pinmux(2), 4, 4 }, + { pinmux(2), 4, 3 }, + { pinmux(2), 4, 2 }, + { pinmux(2), 4, 1 }, + { pinmux(2), 8, 0 }, + { pinmux(6), 8, 7 },/* GP2[0] */ + { pinmux(6), 8, 6 }, + { pinmux(6), 8, 5 }, + { pinmux(6), 8, 4 }, + { pinmux(6), 8, 3 }, + { pinmux(6), 8, 2 }, + { pinmux(6), 8, 1 }, + { pinmux(6), 8, 0 }, + { pinmux(5), 8, 7 }, + { pinmux(5), 8, 6 }, + { pinmux(5), 8, 5 }, + { pinmux(5), 8, 4 }, + { pinmux(5), 8, 3 }, + { pinmux(5), 8, 2 }, + { pinmux(5), 8, 1 }, + { pinmux(5), 8, 0 }, + { pinmux(8), 8, 7 },/* GP3[0] */ + { pinmux(8), 8, 6 }, + { pinmux(8), 8, 5 }, + { pinmux(8), 8, 4 }, + { pinmux(8), 8, 3 }, + { pinmux(8), 8, 2 }, + { pinmux(8), 8, 1 }, + { pinmux(8), 8, 0 }, + { pinmux(7), 8, 7 }, + { pinmux(7), 8, 6 }, + {
Re: [U-Boot] Ping command
Hi Wolfgang, I solved the unknow device issue by enabling the CONFIG_ETHER_ON_FCC1 in my config. Will check the TX clock configuration. Currently getting the blow messages. It says using the FCC1 ETHERNET. ping 172.16.52.60 Trying FCC1 ETHERNET pram_ptr-fen_genfcc.fcc_rbase 03efcc88 pram_ptr-fen_genfcc.fcc_tbase 03efcca8 Using FCC1 ETHERNET device sending ARP for ac10343c ARP broadcast 1 fec: tx error Value : 8000 ARP broadcast 2 fec: tx buffer not ready ping failed; host 172.16.52.60 is not alive Thanks Reagrds, Smitha Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] integratorap: remove hardcoded 32MB memory cmdline
Hi Linus, Wolfgang, On Fri, Jul 15, 2011 at 11:34 AM, Linus Walleij linus.wall...@linaro.org wrote: On Thu, Jul 14, 2011 at 8:03 PM, Linus Walleij linus.wall...@linaro.org wrote: On Thu, Jul 14, 2011 at 1:44 PM, Wolfgang Denk w...@denx.de wrote: --- a/include/configs/integratorap.h +++ b/include/configs/integratorap.h Please make sure to Cc: the board maintainer! Aw yes, that's one thing. Peter, are you still looking after the Integrator AP board support in U-boot? I got this as autoreply from another conversation, so obviously Peter isn't working with this anymore, actually if I recall correctly, he has retired from ARM. This is correct, Peter retired a couple of months ago. I will attempt to find his private email address but I will propose a patch taking over as Integrator maintainer since I have the board and I suspect noone else i likely to be working with it. This is probably best for this. Many thanks. Regards, Philippe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 0/7]Timer: Simplify API
This patch series is the first 'logical' half of the previous series titled '(WIP) [Timer]API Rewrite' which was a 16 part series This half (the first half) of the original series is a simplification of the existing API designed to correct a few 'implementation errors' and prepare the U-Boot tree for the new Timer API (which is still under active discussion). Changes since v1 ((WIP) [Timer]API Rewrite): - Rebased to 68d4230c3ccce96a72c5b99e48399bf1796fe3c6 - Tweaks to some patch titles - Changed title prefix from '[Timer]' to 'Timer:' (git eats [..]) - Introduce new #define CONFIG_SYS_LOW_RES_TIMER - Dropping of the entire second half of the series (the new Timer API) Graeme Russ (7): Timer: Fix misuse of ARM *timer_masked() functions outside arch/arm Timer: Remove calls to set_timer outside arch/ Timer: Remove set_timer completely Timer: Allow reset_timer() only for systems with low resolution timers Timer: Remove reset_timer() for non-Nios2 arches Timer: Fix at91rm9200/spi.c timer usage Timer: Remove reset_timer_masked() arch/arm/cpu/arm1136/mx31/timer.c| 17 - arch/arm/cpu/arm1136/mx35/timer.c|9 - arch/arm/cpu/arm1136/omap24xx/timer.c| 24 +++- arch/arm/cpu/arm1176/s3c64xx/timer.c | 17 - arch/arm/cpu/arm1176/tnetv107x/timer.c | 14 -- arch/arm/cpu/arm720t/interrupts.c| 17 - arch/arm/cpu/arm920t/a320/timer.c| 12 arch/arm/cpu/arm920t/at91/timer.c| 19 --- arch/arm/cpu/arm920t/at91rm9200/spi.c|5 +++-- arch/arm/cpu/arm920t/at91rm9200/timer.c | 18 -- arch/arm/cpu/arm920t/ep93xx/timer.c | 15 +++ arch/arm/cpu/arm920t/imx/timer.c | 21 +++-- arch/arm/cpu/arm920t/ks8695/timer.c | 25 + arch/arm/cpu/arm920t/s3c24x0/timer.c | 18 -- arch/arm/cpu/arm925t/timer.c | 23 +++ arch/arm/cpu/arm926ejs/armada100/timer.c | 20 ++-- arch/arm/cpu/arm926ejs/davinci/timer.c |5 - arch/arm/cpu/arm926ejs/kirkwood/timer.c | 20 ++-- arch/arm/cpu/arm926ejs/mb86r0x/timer.c | 19 +++ arch/arm/cpu/arm926ejs/mx25/timer.c | 19 --- arch/arm/cpu/arm926ejs/mx27/timer.c | 19 --- arch/arm/cpu/arm926ejs/nomadik/timer.c | 12 +--- arch/arm/cpu/arm926ejs/omap/timer.c | 11 --- arch/arm/cpu/arm926ejs/orion5x/timer.c | 20 ++-- arch/arm/cpu/arm926ejs/pantheon/timer.c | 20 ++-- arch/arm/cpu/arm926ejs/spear/timer.c | 22 +++--- arch/arm/cpu/arm926ejs/versatile/timer.c | 11 --- arch/arm/cpu/armv7/mx5/timer.c | 20 arch/arm/cpu/armv7/omap-common/timer.c | 21 +++-- arch/arm/cpu/armv7/s5p-common/timer.c| 10 -- arch/arm/cpu/armv7/tegra2/timer.c| 17 - arch/arm/cpu/armv7/u8500/timer.c |5 - arch/arm/cpu/ixp/timer.c | 10 -- arch/arm/cpu/lh7a40x/timer.c | 11 --- arch/arm/cpu/pxa/timer.c | 18 +- arch/arm/cpu/s3c44b0/timer.c | 18 -- arch/arm/cpu/sa1100/timer.c | 16 arch/avr32/cpu/interrupts.c | 23 --- arch/blackfin/cpu/interrupts.c |5 - arch/m68k/cpu/mcf547x_8x/slicetimer.c|9 - arch/m68k/lib/board.c|2 -- arch/m68k/lib/time.c | 21 ++--- arch/microblaze/cpu/timer.c | 12 +--- arch/mips/cpu/mips32/time.c | 12 arch/nios2/cpu/interrupts.c |6 -- arch/powerpc/lib/board.c |2 -- arch/powerpc/lib/interrupts.c| 10 -- arch/sh/lib/time.c | 12 arch/sh/lib/time_sh2.c | 15 +-- arch/sparc/lib/board.c |2 -- arch/sparc/lib/interrupts.c | 12 +--- arch/x86/lib/board.c |2 -- arch/x86/lib/timer.c | 10 -- board/BuS/EB+MCF-EV123/flash.c | 10 ++ board/armadillo/flash.c |6 -- board/armltd/integrator/timer.c | 24 board/armltd/vexpress/ca9x4_ct_vxp.c |5 - board/atmel/at91rm9200dk/flash.c | 10 ++ board/cerf250/flash.c| 14 ++ board/cm4008/flash.c | 10 ++ board/cm41xx/flash.c | 10 ++ board/cmc_pu2/flash.c|
[U-Boot] [PATCH v2 2/7]Timer: Remove calls to set_timer outside arch/
There is no need to use set_timer(). Replace with appropriate use of get_timer() Signed-off-by: Graeme Russ graeme.r...@gmail.com --- Sorry Wolfgang, but this patch has been through a few versions before it got integrated into the larger Timer API hence the v1-v2-v1 debacle. checkpatch complains about long lines and brace usage in the board specific flash.c files - They are deprecated and not worth fixing for style Changes since v1 ((WIP) [Timer]API Rewrite): - Rebased to 68d4230c3ccce96a72c5b99e48399bf1796fe3c6 Changes since V1: - Fix typo in commit message - Add reset_timer() to Nios2 get_timer(0) Changes since V2 - No longer remove reset_timer() --- board/BuS/EB+MCF-EV123/flash.c | 10 ++ board/cobra5272/flash.c| 10 ++ board/idmr/flash.c | 10 ++ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/board/BuS/EB+MCF-EV123/flash.c b/board/BuS/EB+MCF-EV123/flash.c index 3c36367..8b7f957 100644 --- a/board/BuS/EB+MCF-EV123/flash.c +++ b/board/BuS/EB+MCF-EV123/flash.c @@ -157,6 +157,7 @@ int amd_flash_erase_sector(flash_info_t * info, int sector) { int state; ulong result; + ulong start; volatile u16 *addr = (volatile u16 *) (info-start[sector]); @@ -171,13 +172,13 @@ int amd_flash_erase_sector(flash_info_t * info, int sector) /* wait until flash is ready */ state = 0; - set_timer (0); + start = get_timer(0); do { result = *addr; /* check timeout */ - if (get_timer (0) CONFIG_SYS_FLASH_ERASE_TOUT) { + if (get_timer(start) CONFIG_SYS_FLASH_ERASE_TOUT) { MEM_FLASH_ADDR1 = CMD_READ_ARRAY; state = ERR_TIMOUT; } @@ -267,6 +268,7 @@ volatile static int amd_write_word (flash_info_t * info, ulong dest, u16 data) ulong result; int cflag, iflag; int state; + ulong start; /* * Check if Flash is (sufficiently) erased @@ -295,7 +297,7 @@ volatile static int amd_write_word (flash_info_t * info, ulong dest, u16 data) *addr = data; /* arm simple, non interrupt dependent timer */ - set_timer (0); + start = get_timer(0); /* wait until flash is ready */ state = 0; @@ -303,7 +305,7 @@ volatile static int amd_write_word (flash_info_t * info, ulong dest, u16 data) result = *addr; /* check timeout */ - if (get_timer (0) CONFIG_SYS_FLASH_ERASE_TOUT) { + if (get_timer(start) CONFIG_SYS_FLASH_ERASE_TOUT) { state = ERR_TIMOUT; } if (!state ((result BIT_RDY_MASK) == (data BIT_RDY_MASK))) diff --git a/board/cobra5272/flash.c b/board/cobra5272/flash.c index 33c9361..e8f02eb 100644 --- a/board/cobra5272/flash.c +++ b/board/cobra5272/flash.c @@ -147,6 +147,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last) int iflag, cflag, prot, sect; int rc = ERR_OK; int chip1; + ulong start; /* first look for protection bits */ @@ -190,7 +191,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last) printf (Erasing sector %2d ... , sect); /* arm simple, non interrupt dependent timer */ - set_timer (0); + start = get_timer(0); if (info-protect[sect] == 0) { /* not protected */ volatile u16 *addr = @@ -211,7 +212,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last) result = *addr; /* check timeout */ - if (get_timer (0) CONFIG_SYS_FLASH_ERASE_TOUT) { + if (get_timer(start) CONFIG_SYS_FLASH_ERASE_TOUT) { MEM_FLASH_ADDR1 = CMD_READ_ARRAY; chip1 = TMO; break; @@ -264,6 +265,7 @@ static int write_word (flash_info_t * info, ulong dest, ulong data) int rc = ERR_OK; int cflag, iflag; int chip1; + ulong start; /* * Check if Flash is (sufficiently) erased @@ -291,7 +293,7 @@ static int write_word (flash_info_t * info, ulong dest, ulong data) *addr = data; /* arm simple, non interrupt dependent timer */ - set_timer (0); + start = get_timer(0); /* wait until flash is ready */ chip1 = 0; @@ -299,7 +301,7 @@ static int write_word (flash_info_t * info, ulong dest, ulong data) result = *addr; /* check timeout */ - if (get_timer (0) CONFIG_SYS_FLASH_ERASE_TOUT) { + if (get_timer(start) CONFIG_SYS_FLASH_ERASE_TOUT) { chip1 = ERR | TMO;
[U-Boot] [PATCH v2 3/7]Timer: Remove set_timer completely
--- Changes since v1 ((WIP) [Timer]API Rewrite): - Rebased to 68d4230c3ccce96a72c5b99e48399bf1796fe3c6 - Updated description arch/arm/cpu/arm1136/mx31/timer.c|5 - arch/arm/cpu/arm1136/mx35/timer.c|4 arch/arm/cpu/arm1136/omap24xx/timer.c|5 - arch/arm/cpu/arm1176/s3c64xx/timer.c |5 - arch/arm/cpu/arm1176/tnetv107x/timer.c |5 - arch/arm/cpu/arm720t/interrupts.c|5 - arch/arm/cpu/arm920t/a320/timer.c|6 -- arch/arm/cpu/arm920t/at91/timer.c|5 - arch/arm/cpu/arm920t/at91rm9200/timer.c |5 - arch/arm/cpu/arm920t/imx/timer.c |5 - arch/arm/cpu/arm920t/ks8695/timer.c |5 - arch/arm/cpu/arm920t/s3c24x0/timer.c |5 - arch/arm/cpu/arm925t/timer.c |5 - arch/arm/cpu/arm926ejs/armada100/timer.c |5 - arch/arm/cpu/arm926ejs/kirkwood/timer.c |5 - arch/arm/cpu/arm926ejs/mx25/timer.c |5 - arch/arm/cpu/arm926ejs/mx27/timer.c |5 - arch/arm/cpu/arm926ejs/omap/timer.c |5 - arch/arm/cpu/arm926ejs/orion5x/timer.c |5 - arch/arm/cpu/arm926ejs/pantheon/timer.c |5 - arch/arm/cpu/arm926ejs/spear/timer.c |5 - arch/arm/cpu/arm926ejs/versatile/timer.c |5 - arch/arm/cpu/armv7/mx5/timer.c |5 - arch/arm/cpu/armv7/omap-common/timer.c |5 - arch/arm/cpu/armv7/s5p-common/timer.c|5 - arch/arm/cpu/armv7/tegra2/timer.c|5 - arch/arm/cpu/armv7/u8500/timer.c |5 - arch/arm/cpu/ixp/timer.c |5 - arch/arm/cpu/lh7a40x/timer.c |5 - arch/arm/cpu/pxa/timer.c |5 - arch/arm/cpu/s3c44b0/timer.c |5 - arch/arm/cpu/sa1100/timer.c |5 - arch/avr32/cpu/interrupts.c | 16 arch/m68k/cpu/mcf547x_8x/slicetimer.c|4 arch/m68k/lib/board.c|2 -- arch/m68k/lib/time.c | 16 ++-- arch/microblaze/cpu/timer.c |5 - arch/mips/cpu/mips32/time.c |6 -- arch/nios2/cpu/interrupts.c |6 -- arch/powerpc/lib/board.c |2 -- arch/powerpc/lib/interrupts.c|5 - arch/sh/lib/time.c |7 +-- arch/sh/lib/time_sh2.c |9 ++--- arch/sparc/lib/board.c |2 -- arch/sparc/lib/interrupts.c |5 - arch/x86/lib/board.c |2 -- arch/x86/lib/timer.c |5 - board/armltd/integrator/timer.c |6 -- include/common.h |1 - 49 files changed, 5 insertions(+), 254 deletions(-) diff --git a/arch/arm/cpu/arm1136/mx31/timer.c b/arch/arm/cpu/arm1136/mx31/timer.c index c4bc3b3..d51acbb 100644 --- a/arch/arm/cpu/arm1136/mx31/timer.c +++ b/arch/arm/cpu/arm1136/mx31/timer.c @@ -147,11 +147,6 @@ ulong get_timer (ulong base) return get_timer_masked () - base; } -void set_timer (ulong t) -{ - gd-tbl = time_to_tick(t); -} - /* delay x useconds AND preserve advance timestamp value */ void __udelay (unsigned long usec) { diff --git a/arch/arm/cpu/arm1136/mx35/timer.c b/arch/arm/cpu/arm1136/mx35/timer.c index db1e2c9..6dfb63a 100644 --- a/arch/arm/cpu/arm1136/mx35/timer.c +++ b/arch/arm/cpu/arm1136/mx35/timer.c @@ -92,10 +92,6 @@ ulong get_timer(ulong base) return (tmp / 1000) - base; } -void set_timer(ulong t) -{ -} - /* * delay x useconds AND preserve advance timstamp value * GPTCNT is now supposed to tick 1 by 1 us. diff --git a/arch/arm/cpu/arm1136/omap24xx/timer.c b/arch/arm/cpu/arm1136/omap24xx/timer.c index 228ceba..d6267ba 100644 --- a/arch/arm/cpu/arm1136/omap24xx/timer.c +++ b/arch/arm/cpu/arm1136/omap24xx/timer.c @@ -67,11 +67,6 @@ ulong get_timer (ulong base) return get_timer_masked () - base; } -void set_timer (ulong t) -{ - gd-tbl = t; -} - /* delay x useconds AND preserve advance timestamp value */ void __udelay (unsigned long usec) { diff --git a/arch/arm/cpu/arm1176/s3c64xx/timer.c b/arch/arm/cpu/arm1176/s3c64xx/timer.c index 9768319..8e54060 100644 --- a/arch/arm/cpu/arm1176/s3c64xx/timer.c +++ b/arch/arm/cpu/arm1176/s3c64xx/timer.c @@ -159,11 +159,6 @@ ulong get_timer(ulong base) return get_timer_masked() - base; } -void set_timer(ulong t) -{ - timestamp = t * (timer_load_val / (100 * CONFIG_SYS_HZ)); -} - void __udelay(unsigned long usec) { unsigned long long tmp; diff --git a/arch/arm/cpu/arm1176/tnetv107x/timer.c b/arch/arm/cpu/arm1176/tnetv107x/timer.c index a7a400d..c27375c 100644 --- a/arch/arm/cpu/arm1176/tnetv107x/timer.c +++ b/arch/arm/cpu/arm1176/tnetv107x/timer.c @@ -88,11 +88,6 @@ ulong get_timer(ulong base) return (get_timer_raw() /
[U-Boot] [PATCH v2 4/7]Timer: Allow reset_timer() only for systems with low resolution timers
--- Changes since v1 ((WIP) [Timer]API Rewrite): - Rebased to 68d4230c3ccce96a72c5b99e48399bf1796fe3c6 - Introduce new #define CONFIG_SYS_LOW_RES_TIMER drivers/block/mg_disk.c |2 ++ drivers/mtd/cfi_flash.c |4 include/configs/PCI5441.h |1 + include/configs/PK1C20.h|1 + include/configs/nios2-generic.h |1 + 5 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/block/mg_disk.c b/drivers/block/mg_disk.c index b74307a..921bce9 100644 --- a/drivers/block/mg_disk.c +++ b/drivers/block/mg_disk.c @@ -91,7 +91,9 @@ static unsigned int mg_wait (u32 expect, u32 msec) u32 from, cur, err; err = MG_ERR_NONE; +#ifdef CONFIG_SYS_LOW_RES_TIMER reset_timer(); +#endif from = get_timer(0); status = readb(mg_base() + MG_REG_STATUS); diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 929f9a9..ac91dfd 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -573,7 +573,9 @@ static int flash_status_check (flash_info_t * info, flash_sect_t sector, #endif /* Wait for command completion */ +#ifdef CONFIG_SYS_LOW_RES_TIMER reset_timer(); +#endif start = get_timer (0); while (flash_is_busy (info, sector)) { if (get_timer (start) tout) { @@ -662,7 +664,9 @@ static int flash_status_poll(flash_info_t *info, void *src, void *dst, #endif /* Wait for command completion */ +#ifdef CONFIG_SYS_LOW_RES_TIMER reset_timer(); +#endif start = get_timer(0); while (1) { switch (info-portwidth) { diff --git a/include/configs/PCI5441.h b/include/configs/PCI5441.h index 70775e7..ae5bc2e 100644 --- a/include/configs/PCI5441.h +++ b/include/configs/PCI5441.h @@ -118,6 +118,7 @@ * TMRMS represents the desired mecs per tick (msecs per interrupt). *--*/ #define CONFIG_SYS_HZ 1000/* Always 1000 */ +#define CONFIG_SYS_LOW_RES_TIMER #define CONFIG_SYS_NIOS_TMRBASE0x00920860 /* Tick timer base addr */ #define CONFIG_SYS_NIOS_TMRIRQ 3 /* Timer IRQ num */ #define CONFIG_SYS_NIOS_TMRMS 10 /* Desired period (msec)*/ diff --git a/include/configs/PK1C20.h b/include/configs/PK1C20.h index b466c4b..95c30cc 100644 --- a/include/configs/PK1C20.h +++ b/include/configs/PK1C20.h @@ -128,6 +128,7 @@ * TMRMS represents the desired mecs per tick (msecs per interrupt). *--*/ #define CONFIG_SYS_HZ 1000/* Always 1000 */ +#define CONFIG_SYS_LOW_RES_TIMER #define CONFIG_SYS_NIOS_TMRBASE0x02120820 /* Tick timer base addr */ #define CONFIG_SYS_NIOS_TMRIRQ 3 /* Timer IRQ num */ #define CONFIG_SYS_NIOS_TMRMS 10 /* Desired period */ diff --git a/include/configs/nios2-generic.h b/include/configs/nios2-generic.h index 53f2084..d57d53c 100644 --- a/include/configs/nios2-generic.h +++ b/include/configs/nios2-generic.h @@ -52,6 +52,7 @@ /* * TIMER */ +#define CONFIG_SYS_LOW_RES_TIMER #define CONFIG_SYS_NIOS_TMRBASECONFIG_SYS_TIMER_BASE #define CONFIG_SYS_NIOS_TMRIRQ CONFIG_SYS_TIMER_IRQ #define CONFIG_SYS_HZ 1000/* Always 1000 */ -- 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 v2 5/7]Timer: Remove reset_timer() for non-Nios2 arches
--- Changes since v1 ((WIP) [Timer]API Rewrite): - Rebased to 68d4230c3ccce96a72c5b99e48399bf1796fe3c6 arch/arm/cpu/arm1136/mx31/timer.c|5 - arch/arm/cpu/arm1136/mx35/timer.c|5 - arch/arm/cpu/arm1136/omap24xx/timer.c|5 - arch/arm/cpu/arm1176/s3c64xx/timer.c |5 - arch/arm/cpu/arm1176/tnetv107x/timer.c |9 - arch/arm/cpu/arm720t/interrupts.c|5 - arch/arm/cpu/arm920t/a320/timer.c|6 -- arch/arm/cpu/arm920t/at91/timer.c|6 -- arch/arm/cpu/arm920t/at91rm9200/timer.c |6 -- arch/arm/cpu/arm920t/ep93xx/timer.c |5 - arch/arm/cpu/arm920t/imx/timer.c |6 -- arch/arm/cpu/arm920t/ks8695/timer.c |7 +-- arch/arm/cpu/arm920t/s3c24x0/timer.c |6 -- arch/arm/cpu/arm925t/timer.c |6 -- arch/arm/cpu/arm926ejs/armada100/timer.c |5 - arch/arm/cpu/arm926ejs/davinci/timer.c |5 - arch/arm/cpu/arm926ejs/kirkwood/timer.c |5 - arch/arm/cpu/arm926ejs/mb86r0x/timer.c |5 - arch/arm/cpu/arm926ejs/mx25/timer.c |5 - arch/arm/cpu/arm926ejs/mx27/timer.c |5 - arch/arm/cpu/arm926ejs/nomadik/timer.c | 12 +--- arch/arm/cpu/arm926ejs/omap/timer.c |6 -- arch/arm/cpu/arm926ejs/orion5x/timer.c |5 - arch/arm/cpu/arm926ejs/pantheon/timer.c |5 - arch/arm/cpu/arm926ejs/spear/timer.c |6 -- arch/arm/cpu/arm926ejs/versatile/timer.c |6 -- arch/arm/cpu/armv7/mx5/timer.c |5 - arch/arm/cpu/armv7/omap-common/timer.c |5 - arch/arm/cpu/armv7/s5p-common/timer.c|5 - arch/arm/cpu/armv7/tegra2/timer.c|5 - arch/arm/cpu/ixp/timer.c |5 - arch/arm/cpu/lh7a40x/timer.c |6 -- arch/arm/cpu/pxa/timer.c |7 +-- arch/arm/cpu/s3c44b0/timer.c |6 -- arch/arm/cpu/sa1100/timer.c |5 - arch/avr32/cpu/interrupts.c |7 --- arch/blackfin/cpu/interrupts.c |5 - arch/m68k/cpu/mcf547x_8x/slicetimer.c|5 - arch/m68k/lib/time.c |5 - arch/microblaze/cpu/timer.c |7 +-- arch/mips/cpu/mips32/time.c |6 -- arch/powerpc/lib/interrupts.c|5 - arch/sh/lib/time.c |7 --- arch/sh/lib/time_sh2.c |8 arch/sparc/lib/interrupts.c |7 +-- arch/x86/lib/timer.c |5 - board/armltd/integrator/timer.c |5 - board/armltd/vexpress/ca9x4_ct_vxp.c |5 - board/nvidia/common/board.c |1 - 49 files changed, 9 insertions(+), 270 deletions(-) diff --git a/arch/arm/cpu/arm1136/mx31/timer.c b/arch/arm/cpu/arm1136/mx31/timer.c index d51acbb..eac4ffb 100644 --- a/arch/arm/cpu/arm1136/mx31/timer.c +++ b/arch/arm/cpu/arm1136/mx31/timer.c @@ -113,11 +113,6 @@ void reset_timer_masked (void) gd-tbl = 0; /* start advancing time stamp from 0 */ } -void reset_timer(void) -{ - reset_timer_masked(); -} - unsigned long long get_ticks (void) { ulong now = GPTCNT; /* current tick value */ diff --git a/arch/arm/cpu/arm1136/mx35/timer.c b/arch/arm/cpu/arm1136/mx35/timer.c index 6dfb63a..80c0675 100644 --- a/arch/arm/cpu/arm1136/mx35/timer.c +++ b/arch/arm/cpu/arm1136/mx35/timer.c @@ -73,11 +73,6 @@ inline ulong get_timer_masked(void) return val; } -void reset_timer(void) -{ - reset_timer_masked(); -} - ulong get_timer(ulong base) { ulong tmp; diff --git a/arch/arm/cpu/arm1136/omap24xx/timer.c b/arch/arm/cpu/arm1136/omap24xx/timer.c index d6267ba..6f1ebbf 100644 --- a/arch/arm/cpu/arm1136/omap24xx/timer.c +++ b/arch/arm/cpu/arm1136/omap24xx/timer.c @@ -57,11 +57,6 @@ int timer_init (void) /* * timer without interrupts */ -void reset_timer (void) -{ - reset_timer_masked (); -} - ulong get_timer (ulong base) { return get_timer_masked () - base; diff --git a/arch/arm/cpu/arm1176/s3c64xx/timer.c b/arch/arm/cpu/arm1176/s3c64xx/timer.c index 8e54060..bc21f86 100644 --- a/arch/arm/cpu/arm1176/s3c64xx/timer.c +++ b/arch/arm/cpu/arm1176/s3c64xx/timer.c @@ -142,11 +142,6 @@ void reset_timer_masked(void) timestamp = 0; } -void reset_timer(void) -{ - reset_timer_masked(); -} - ulong get_timer_masked(void) { unsigned long long res = get_ticks(); diff --git a/arch/arm/cpu/arm1176/tnetv107x/timer.c b/arch/arm/cpu/arm1176/tnetv107x/timer.c index c27375c..b3123c5 100644 --- a/arch/arm/cpu/arm1176/tnetv107x/timer.c +++ b/arch/arm/cpu/arm1176/tnetv107x/timer.c @@ -60,15 +60,6 @@ int timer_init(void) return 0; } -void reset_timer(void) -{ - lastinc = timestamp = 0; - - __raw_writel(0, regs-tcr); - __raw_writel(0,
[U-Boot] [PATCH v2 6/7]Timer: Fix at91rm9200/spi.c timer usage
--- Changes since v1 ((WIP) [Timer]API Rewrite): - Rebased to 68d4230c3ccce96a72c5b99e48399bf1796fe3c6 arch/arm/cpu/arm920t/at91rm9200/spi.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/arm920t/at91rm9200/spi.c b/arch/arm/cpu/arm920t/at91rm9200/spi.c index f3cb5d8..c70efc6 100644 --- a/arch/arm/cpu/arm920t/at91rm9200/spi.c +++ b/arch/arm/cpu/arm920t/at91rm9200/spi.c @@ -108,6 +108,7 @@ void AT91F_SpiEnable(int cs) unsigned int AT91F_SpiWrite ( AT91PS_DataflashDesc pDesc ) { unsigned int timeout; + unsigned long start; pDesc-state = BUSY; @@ -132,12 +133,12 @@ unsigned int AT91F_SpiWrite ( AT91PS_DataflashDesc pDesc ) } /* arm simple, non interrupt dependent timer */ - reset_timer_masked(); + start = get_timer(0); timeout = 0; AT91C_BASE_SPI-SPI_PTCR = AT91C_PDC_TXTEN + AT91C_PDC_RXTEN; while(!(AT91C_BASE_SPI-SPI_SR AT91C_SPI_RXBUFF) - ((timeout = get_timer_masked() ) CONFIG_SYS_SPI_WRITE_TOUT)); + ((timeout = get_timer(start) ) CONFIG_SYS_SPI_WRITE_TOUT)); AT91C_BASE_SPI-SPI_PTCR = AT91C_PDC_TXTDIS + AT91C_PDC_RXTDIS; pDesc-state = IDLE; -- 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 v2 7/7]Timer: Remove reset_timer_masked()
In some circumstances, reset_timer_masked() was called be timer_init() in order to perform architecture specific timer initialisation. In such cases, the required code in reset_timer_masked() has been moved into timer_init() --- Changes since v1 ((WIP) [Timer]API Rewrite): - Rebased to 68d4230c3ccce96a72c5b99e48399bf1796fe3c6 - Updated description arch/arm/cpu/arm1136/mx31/timer.c|7 --- arch/arm/cpu/arm1136/omap24xx/timer.c| 14 +++--- arch/arm/cpu/arm1176/s3c64xx/timer.c |7 --- arch/arm/cpu/arm720t/interrupts.c|7 --- arch/arm/cpu/arm920t/at91/timer.c|8 arch/arm/cpu/arm920t/at91rm9200/timer.c |7 --- arch/arm/cpu/arm920t/ep93xx/timer.c | 10 +++--- arch/arm/cpu/arm920t/imx/timer.c | 10 +++--- arch/arm/cpu/arm920t/ks8695/timer.c | 15 +-- arch/arm/cpu/arm920t/s3c24x0/timer.c |7 --- arch/arm/cpu/arm925t/timer.c | 12 +++- arch/arm/cpu/arm926ejs/armada100/timer.c | 10 ++ arch/arm/cpu/arm926ejs/kirkwood/timer.c | 10 ++ arch/arm/cpu/arm926ejs/mb86r0x/timer.c | 14 +++--- arch/arm/cpu/arm926ejs/mx25/timer.c |9 - arch/arm/cpu/arm926ejs/mx27/timer.c |9 - arch/arm/cpu/arm926ejs/orion5x/timer.c | 10 ++ arch/arm/cpu/arm926ejs/pantheon/timer.c | 10 ++ arch/arm/cpu/arm926ejs/spear/timer.c | 11 +++ arch/arm/cpu/armv7/mx5/timer.c | 10 -- arch/arm/cpu/armv7/omap-common/timer.c | 11 +++ arch/arm/cpu/armv7/tegra2/timer.c|7 --- arch/arm/cpu/pxa/timer.c |8 +--- arch/arm/cpu/s3c44b0/timer.c |7 --- arch/arm/cpu/sa1100/timer.c |6 -- board/armltd/integrator/timer.c | 13 - 26 files changed, 47 insertions(+), 202 deletions(-) diff --git a/arch/arm/cpu/arm1136/mx31/timer.c b/arch/arm/cpu/arm1136/mx31/timer.c index eac4ffb..c05a39d 100644 --- a/arch/arm/cpu/arm1136/mx31/timer.c +++ b/arch/arm/cpu/arm1136/mx31/timer.c @@ -106,13 +106,6 @@ int timer_init (void) return 0; } -void reset_timer_masked (void) -{ - /* reset time */ - gd-lastinc = GPTCNT; /* capture current incrementer value time */ - gd-tbl = 0; /* start advancing time stamp from 0 */ -} - unsigned long long get_ticks (void) { ulong now = GPTCNT; /* current tick value */ diff --git a/arch/arm/cpu/arm1136/omap24xx/timer.c b/arch/arm/cpu/arm1136/omap24xx/timer.c index 6f1ebbf..73bf4a7 100644 --- a/arch/arm/cpu/arm1136/omap24xx/timer.c +++ b/arch/arm/cpu/arm1136/omap24xx/timer.c @@ -41,6 +41,13 @@ DECLARE_GLOBAL_DATA_PTR; +static void reset_timer_masked (void) +{ + /* reset time */ + gd-lastinc = READ_TIMER; /* capture current incrementer value time */ + gd-tbl = 0;/* start advancing time stamp from 0 */ +} + int timer_init (void) { int32_t val; @@ -85,13 +92,6 @@ void __udelay (unsigned long usec) /*NOP*/; } -void reset_timer_masked (void) -{ - /* reset time */ - gd-lastinc = READ_TIMER; /* capture current incrementer value time */ - gd-tbl = 0;/* start advancing time stamp from 0 */ -} - ulong get_timer_masked (void) { ulong now = READ_TIMER; /* current tick value */ diff --git a/arch/arm/cpu/arm1176/s3c64xx/timer.c b/arch/arm/cpu/arm1176/s3c64xx/timer.c index bc21f86..f16a37b 100644 --- a/arch/arm/cpu/arm1176/s3c64xx/timer.c +++ b/arch/arm/cpu/arm1176/s3c64xx/timer.c @@ -135,13 +135,6 @@ ulong get_tbclk(void) return (ulong)(timer_load_val / 100); } -void reset_timer_masked(void) -{ - /* reset time */ - lastdec = read_timer(); - timestamp = 0; -} - ulong get_timer_masked(void) { unsigned long long res = get_ticks(); diff --git a/arch/arm/cpu/arm720t/interrupts.c b/arch/arm/cpu/arm720t/interrupts.c index 9cd7fee..fa9c5a2 100644 --- a/arch/arm/cpu/arm720t/interrupts.c +++ b/arch/arm/cpu/arm720t/interrupts.c @@ -233,13 +233,6 @@ void __udelay (unsigned long usec) #endif } -void reset_timer_masked (void) -{ - /* reset time */ - lastdec = READ_TIMER; - timestamp = 0; -} - ulong get_timer_masked (void) { ulong now = READ_TIMER; diff --git a/arch/arm/cpu/arm920t/at91/timer.c b/arch/arm/cpu/arm920t/at91/timer.c index 374cc25..c321e28 100644 --- a/arch/arm/cpu/arm920t/at91/timer.c +++ b/arch/arm/cpu/arm920t/at91/timer.c @@ -82,14 +82,6 @@ void __udelay(unsigned long usec) udelay_masked(usec); } -void reset_timer_masked(void) -{ - /* reset time */ - at91_tc_t *tc = (at91_tc_t *) ATMEL_BASE_TC; - gd-lastinc = readl(tc-tc[0].cv) 0x; - gd-tbl = 0; -} - ulong get_timer_raw(void) { at91_tc_t *tc = (at91_tc_t *) ATMEL_BASE_TC; diff --git
Re: [U-Boot] [RFC PATCH v1 6/9] scaled down version of generic libraries for SPL
Hi Daniel, at the moment I'am playing a bit with your patch. I stumbled over this: diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index d31321a..300c8fa 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -26,6 +26,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(ARCH).o LIBGCC = $(obj)libgcc.o +ifndef CONFIG_SPL_BUILD GLSOBJS += _ashldi3.o GLSOBJS += _ashrdi3.o GLSOBJS += _divsi3.o @@ -45,6 +46,7 @@ COBJS-y += interrupts.o COBJS-y += reset.o SOBJS-$(CONFIG_USE_ARCH_MEMSET) += memset.o SOBJS-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o +endif Is it really your intention here to exclude board.c from the SPL? Or do i misinterpret something? Also cache.c I would include to a standard SPL. I really like the new SPL - good work! ;) Regards Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v1 6/9] scaled down version of generic libraries for SPL
Hi Simon, On Friday 15 July 2011 06:01 PM, Simon Schwarz wrote: Hi Daniel, at the moment I'am playing a bit with your patch. I stumbled over this: diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index d31321a..300c8fa 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -26,6 +26,7 @@ include $(TOPDIR)/config.mk LIB= $(obj)lib$(ARCH).o LIBGCC = $(obj)libgcc.o +ifndef CONFIG_SPL_BUILD GLSOBJS+= _ashldi3.o GLSOBJS+= _ashrdi3.o GLSOBJS+= _divsi3.o @@ -45,6 +46,7 @@ COBJS-y += interrupts.o COBJS-y+= reset.o SOBJS-$(CONFIG_USE_ARCH_MEMSET) += memset.o SOBJS-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o +endif Is it really your intention here to exclude board.c from the SPL? Or do i misinterpret something? Also cache.c I would include to a standard SPL. Yes, it's intentional. At the moment OMAP spl doesn't need anything from this directory other than the eabi_comapt.o. In the future if somebody needs contents from another file for SPL they may have to bring it out of the '#ifndef CONFIG_SPL_BUILD' block. In all likelihood board.c will always remain out of SPL because board.c defines board_init_f() and board_init_r() that are re-defined for SPL. In the event some SPL has to reuse some content from this file, we may have to make these functions weakly linked in this file. But I don't think that will be ever needed. best regards, Aneesh ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V3 3/4] ARM: Warn when the machine ID isn't set.
On 07/14/2011 09:02 PM, Igor Grinberg wrote: +#ifdef DEBUG +if (machid == BI_ARCH_NUMBER_INVALID) +printf(Warning: machid not set.\n); +#endif + Is it essential to enclose that check in #ifdef DEBUG? IMHO, it can be useful also with no DEBUG defined, so I'd add it without the #ifdef DEBUG. Also, in the printf line, you are mixing tabs with spaces (sorry for not noticing this in previous versions...). ...and if you want to print something only for debug purposes, the best way is to substitute printf() with debug() and get rid of #ifdef. + if (machid == BI_ARCH_NUMBER_INVALID) + debug(Warning: machid not set.\n); Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/7]Timer: Simplify API
Hi Wolfgang, On 15/07/11 22:15, Graeme Russ wrote: This patch series is the first 'logical' half of the previous series titled '(WIP) [Timer]API Rewrite' which was a 16 part series This half (the first half) of the original series is a simplification of the existing API designed to correct a few 'implementation errors' and prepare the U-Boot tree for the new Timer API (which is still under active discussion). Changes since v1 ((WIP) [Timer]API Rewrite): - Rebased to 68d4230c3ccce96a72c5b99e48399bf1796fe3c6 - Tweaks to some patch titles - Changed title prefix from '[Timer]' to 'Timer:' (git eats [..]) - Introduce new #define CONFIG_SYS_LOW_RES_TIMER - Dropping of the entire second half of the series (the new Timer API) Graeme Russ (7): Timer: Fix misuse of ARM *timer_masked() functions outside arch/arm Timer: Remove calls to set_timer outside arch/ Timer: Remove set_timer completely Timer: Allow reset_timer() only for systems with low resolution timers Timer: Remove reset_timer() for non-Nios2 arches Timer: Fix at91rm9200/spi.c timer usage Timer: Remove reset_timer_masked() Oh dear, it looks like Patchwork does not honour 'in-reply-to'. It has created new patches rather than updating the existing ones :( I've marked the old ones 'Superseded' in Patchwork Regards, Graeme ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v1 6/9] scaled down version of generic libraries for SPL
Hi Aneesh, at the moment I'am playing a bit with your patch. I stumbled over this: diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index d31321a..300c8fa 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -26,6 +26,7 @@ include $(TOPDIR)/config.mk =A0LIB =A0 =A0=3D $(obj)lib$(ARCH).o =A0LIBGCC =3D $(obj)libgcc.o +ifndef CONFIG_SPL_BUILD =A0GLSOBJS =A0 =A0 =A0 =A0+=3D _ashldi3.o =A0GLSOBJS =A0 =A0 =A0 =A0+=3D _ashrdi3.o =A0GLSOBJS =A0 =A0 =A0 =A0+=3D _divsi3.o @@ -45,6 +46,7 @@ COBJS-y =A0 =A0 =A0 +=3D interrupts.o =A0COBJS-y =A0 =A0 =A0 =A0+=3D reset.o =A0SOBJS-$(CONFIG_USE_ARCH_MEMSET) +=3D memset.o =A0SOBJS-$(CONFIG_USE_ARCH_MEMCPY) +=3D memcpy.o +endif Is it really your intention here to exclude board.c from the SPL? Or do i misinterpret something? Also cache.c I would include to a standard SPL. Yes, it's intentional. At the moment OMAP spl doesn't need anything from this directory other than the eabi_comapt.o. In the future if somebody needs contents from another file for SPL they may have to bring it out of the '#ifndef CONFIG_SPL_BUILD' block. In all likelihood board.c will always remain out of SPL because board.c defines board_init_f() and board_init_r() that are re-defined for SPL. In the event some SPL has to reuse some content from this file, we may have to make these functions weakly linked in this file. But I don't think that will be ever needed. Then I think I didn't understand the concept correctly. In this patch: http://patchwork.ozlabs.org/patch/104534/ you modify board.c and add CONFIG_SPL_BUILD. Then this was just automatic search and replace and isn't needed anymore for the new SPL? So the new board_init_f then is created in the same dir as board.c but e.g. named spl-board.c? Or is it preferred to write these functions - like in the old system - totally board depended and place it in ./board/[BOARDDIR]/spl-[BOARD].c? Thanks for answering these - probably dump - questions! Regards Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v1 6/9] scaled down version of generic libraries for SPL
On Friday 15 July 2011 06:40 PM, Simon Schwarz wrote: Hi Aneesh, at the moment I'am playing a bit with your patch. I stumbled over this: diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index d31321a..300c8fa 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -26,6 +26,7 @@ include $(TOPDIR)/config.mk =A0LIB =A0 =A0=3D $(obj)lib$(ARCH).o =A0LIBGCC =3D $(obj)libgcc.o +ifndef CONFIG_SPL_BUILD =A0GLSOBJS =A0 =A0 =A0 =A0+=3D _ashldi3.o =A0GLSOBJS =A0 =A0 =A0 =A0+=3D _ashrdi3.o =A0GLSOBJS =A0 =A0 =A0 =A0+=3D _divsi3.o @@ -45,6 +46,7 @@ COBJS-y =A0 =A0 =A0 +=3D interrupts.o =A0COBJS-y =A0 =A0 =A0 =A0+=3D reset.o =A0SOBJS-$(CONFIG_USE_ARCH_MEMSET) +=3D memset.o =A0SOBJS-$(CONFIG_USE_ARCH_MEMCPY) +=3D memcpy.o +endif Is it really your intention here to exclude board.c from the SPL? Or do i misinterpret something? Also cache.c I would include to a standard SPL. Yes, it's intentional. At the moment OMAP spl doesn't need anything from this directory other than the eabi_comapt.o. In the future if somebody needs contents from another file for SPL they may have to bring it out of the '#ifndef CONFIG_SPL_BUILD' block. In all likelihood board.c will always remain out of SPL because board.c defines board_init_f() and board_init_r() that are re-defined for SPL. In the event some SPL has to reuse some content from this file, we may have to make these functions weakly linked in this file. But I don't think that will be ever needed. Then I think I didn't understand the concept correctly. In this patch: http://patchwork.ozlabs.org/patch/104534/ you modify board.c and add CONFIG_SPL_BUILD. Then this was just automatic search and replace and isn't needed anymore for the new SPL? Yes. That was just a search and replace. I don't think any SPL will really use the board_init_f() in this file, be it the old framework or new framework. So the new board_init_f then is created in the same dir as board.c but e.g. named spl-board.c? Or is it preferred to write these functions - like in the old system - totally board depended and place it in ./board/[BOARDDIR]/spl-[BOARD].c? Yes, it would be typically board/SoC dependent and written according to the needs of the board/SoC and much lesser in scope compared to the one in arch/arm/lib/board.c For omap I have it at: arch/arm/cpu/armv7/omap-common/spl.c best regards, Aneesh ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v1 6/9] scaled down version of generic libraries for SPL
Hi Simon, On Fri, Jul 15, 2011 at 2:41 PM, Aneesh V ane...@ti.com wrote: Hi Simon, On Friday 15 July 2011 06:01 PM, Simon Schwarz wrote: Hi Daniel, at the moment I'am playing a bit with your patch. I stumbled over this: diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index d31321a..300c8fa 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -26,6 +26,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(ARCH).o LIBGCC = $(obj)libgcc.o +ifndef CONFIG_SPL_BUILD GLSOBJS += _ashldi3.o GLSOBJS += _ashrdi3.o GLSOBJS += _divsi3.o @@ -45,6 +46,7 @@ COBJS-y += interrupts.o COBJS-y += reset.o SOBJS-$(CONFIG_USE_ARCH_MEMSET) += memset.o SOBJS-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o +endif Is it really your intention here to exclude board.c from the SPL? Or do i misinterpret something? Also cache.c I would include to a standard SPL. Yes, it's intentional. At the moment OMAP spl doesn't need anything from this directory other than the eabi_comapt.o. In the future if somebody needs contents from another file for SPL they may have to bring it out of the '#ifndef CONFIG_SPL_BUILD' block. In all likelihood board.c will always remain out of SPL because board.c defines board_init_f() and board_init_r() that are re-defined for SPL. In the event some SPL has to reuse some content from this file, we may have to make these functions weakly linked in this file. But I don't think that will be ever needed. I can only speak for MIPS but the regular board.c is too heavy for SPL. Either you insert a lot of #ifdef CONFIG_SPL_BUILD (ugly) or you create a simplified board_spl.c. Maybe a common version for ARM, your SoC or your board only. Best regards, Daniel ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v1 0/9] Prototype for generic SPL framework
Dear Wolfgang, On Thu, Jul 14, 2011 at 10:25 PM, Wolfgang Denk w...@denx.de wrote: Dear Daniel Schwierzeck, In message 1310569869-31810-1-git-send-email-daniel.schwierz...@googlemail.com you wrote: This patch series is the final proposal from Aneesh and myself for a generic SPL framework. The implementation already works and have been tested with in-tree and out-of-tree builds. The latest feedback from ML is already included. I read your patches, and except to the documentation commetns I already made I have but only one question (I did not spend enough time to figure this out myself, sorry): Do you think the split of the patches is OK, i. e. do we maintain bisectability ? I guess yes. We focussed on splitting in generic and ARM specfifc patches. Assuming you reply yes, and add the docs I aseked for, you have my: I have a README file in my queue but left it out for the RFC series. Acked-by: Wolfgang Denk w...@denx.de Thanks. Then I'll create a new series with the README files and the gc-sections patch from Aneesh. Best regards, Daniel ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/4] cosmetic
Hi Michael, Signed-off-by: Michael Jones michael.jo...@matrix-vision.de Acked-by: Detlev Zundel d...@denx.de Cheers Detlev -- There are two hard things in computer science: cache invalidation, naming things, and off-by-one errors. -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/4] altera: fix printf typo
Michael Jones michael.jo...@matrix-vision.de writes: Signed-off-by: Michael Jones michael.jo...@matrix-vision.de Acked-by: Detlev Zundel d...@denx.de -- Windows Vista? And what a vista! All you see as you look around your garden is a 60foot high brick wall -- Crosbie Fitch. -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/4] cmd_mac: cleanup help
Michael Jones michael.jo...@matrix-vision.de writes: Signed-off-by: Michael Jones michael.jo...@matrix-vision.de Acked-by: Detlev Zundel d...@denx.de -- It's bad civic hygiene to build technologies that could someday be used to facilitate a police state. No matter what the eavesdroppers and censors say, these systems put us all at greater risk. Communications systems that have no inherent eavesdropping capabilities are more secure than systems with those capabilities built in. -- Bruce Schneier -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4] cmd_mac: fix help for 'mac read'
Michael Jones michael.jo...@matrix-vision.de writes: In the only implementation of 'mac read', it doesn't display the contents of the eeprom as the help indicated unless compiled with DEBUG. It only re-reads the contents of the EEPROM into memory. Displaying the contents of the EEPROM is done by passing no arguments to 'mac'. Signed-off-by: Michael Jones michael.jo...@matrix-vision.de Acked-by: Detlev Zundel d...@denx.de -- Der Kluge tue gleich anfangs, was der Dumme erst am Ende. --- Baltasar Gracian -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] Let source cross-reference targets follow symbolic links
Hi Horst, From: Horst Kronstorfer hkron...@frequentis.com Without telling 'find' to follow symbolic links, files under include/asm and arch/$(ARCH)/include/asm/arch are not added to the indexing file list. Signed-off-by: Horst Kronstorfer hkron...@frequentis.com Changes for v2: - Apply this change to all source cross-reference targets This needs to go below the '---' as it is not part of the git commit message. --- Makefile |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index e56fa02..e86a81a 100644 --- a/Makefile +++ b/Makefile @@ -471,15 +471,17 @@ TAG_SUBDIRS = $(SUBDIRS) TAG_SUBDIRS += $(dir $(__LIBS)) TAG_SUBDIRS += include +FIND := find -L I really dislike this approach. I would never expect a variable $(FIND) to already include options. So if you want to go that way then also introduce FINDFLAGS. Thanks Detlev -- One of my most productive days was throwing away 1000 lines of code. - Ken Thompson. -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Ping command
Hi Wolfgang, Thanks , ping is working the problem was with routing of the Tx clock. Thanks Reagrds, Smitha Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH v2 3/9] Extend build-system for SPL framework
Signed-off-by: Aneesh V ane...@ti.com Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com --- Changes since RFC v1: make garbage collect of unused sections unconditionally for SPL Makefile |3 ++- config.mk | 34 +- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 62c2078..9478059 100644 --- a/Makefile +++ b/Makefile @@ -104,10 +104,11 @@ $(if $(BUILD_DIR),,$(error output directory $(saved-output) does not exist)) endif # ifneq ($(BUILD_DIR),) OBJTREE:= $(if $(BUILD_DIR),$(BUILD_DIR),$(CURDIR)) +SPLTREE:= $(OBJTREE)/spl SRCTREE:= $(CURDIR) TOPDIR := $(SRCTREE) LNDIR := $(OBJTREE) -export TOPDIR SRCTREE OBJTREE +export TOPDIR SRCTREE OBJTREE SPLTREE MKCONFIG := $(SRCTREE)/mkconfig export MKCONFIG diff --git a/config.mk b/config.mk index 2eb7fa2..ed44d03 100644 --- a/config.mk +++ b/config.mk @@ -23,19 +23,31 @@ # -ifneq ($(OBJTREE),$(SRCTREE)) ifeq ($(CURDIR),$(SRCTREE)) dir := else dir := $(subst $(SRCTREE)/,,$(CURDIR)) endif +ifneq ($(OBJTREE),$(SRCTREE)) +# Create object files for SPL in a separate directory +ifeq ($(CONFIG_SPL_BUILD),y) +obj := $(if $(dir),$(SPLTREE)/$(dir)/,$(SPLTREE)/) +else obj := $(if $(dir),$(OBJTREE)/$(dir)/,$(OBJTREE)/) +endif src := $(if $(dir),$(SRCTREE)/$(dir)/,$(SRCTREE)/) $(shell mkdir -p $(obj)) else +# Create object files for SPL in a separate directory +ifeq ($(CONFIG_SPL_BUILD),y) +obj := $(if $(dir),$(SPLTREE)/$(dir)/,$(SPLTREE)/) + +$(shell mkdir -p $(obj)) +else obj := +endif src := endif @@ -160,10 +172,25 @@ gccincdir := $(shell $(CC) -print-file-name=include) CPPFLAGS := $(DBGFLAGS) $(OPTFLAGS) $(RELFLAGS)\ -D__KERNEL__ + +# Enable garbage collection of un-used sections for SPL +ifeq ($(CONFIG_SPL_BUILD),y) +CPPFLAGS += -ffunction-sections -fdata-sections +LDFLAGS_FINAL += --gc-sections +endif + ifneq ($(CONFIG_SYS_TEXT_BASE),) CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) endif +ifneq ($(CONFIG_SPL_TEXT_BASE),) +CPPFLAGS += -DCONFIG_SPL_TEXT_BASE=$(CONFIG_SPL_TEXT_BASE) +endif + +ifeq ($(CONFIG_SPL_BUILD),y) +CPPFLAGS += -DCONFIG_SPL_BUILD +endif + ifneq ($(RESET_VECTOR_ADDRESS),) CPPFLAGS += -DRESET_VECTOR_ADDRESS=$(RESET_VECTOR_ADDRESS) endif @@ -206,6 +233,11 @@ ifneq ($(CONFIG_SYS_TEXT_BASE),) LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE) endif +LDFLAGS_u-boot-spl += -T $(obj)u-boot-spl.lds $(LDFLAGS_FINAL) +ifneq ($(CONFIG_SPL_TEXT_BASE),) +LDFLAGS_u-boot-spl += -Ttext $(CONFIG_SPL_TEXT_BASE) +endif + # Location of a usable BFD library, where we define usable as # built for ${HOST}, supports ${TARGET}. Sensible values are # - When cross-compiling: the root of the cross-environment -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH v2 2/9] spl: add initial support for a generic SPL framework
Signed-off-by: Aneesh V ane...@ti.com Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com --- Changes since RFC v1: added documentation for SPL README | 36 doc/README.SPL | 59 spl/.gitignore |4 ++ spl/Makefile | 101 4 files changed, 200 insertions(+), 0 deletions(-) create mode 100644 doc/README.SPL create mode 100644 spl/.gitignore create mode 100644 spl/Makefile diff --git a/README b/README index 1e2d4d3..63a897d 100644 --- a/README +++ b/README @@ -2236,6 +2236,42 @@ FIT uImage format: Adds the MTD partitioning infrastructure from the Linux kernel. Needed for UBI support. +- SPL framework +CONFIG_SPL +Enable building of SPL globally. + +CONFIG_SPL_TEXT_BASE +TEXT_BASE that is used when linking the SPL binary. + +CONFIG_SPL_LIBCOMMON_SUPPORT +Support for common/libcommon.o in SPL binary + +CONFIG_SPL_LIBDISK_SUPPORT +Support for disk/libdisk.o in SPL binary + +CONFIG_SPL_I2C_SUPPORT +Support for drivers/i2c/libi2c.o in SPL binary + +CONFIG_SPL_GPIO_SUPPORT +Support for drivers/gpio/libgpio.o in SPL binary + +CONFIG_SPL_MMC_SUPPORT +Support for drivers/mmc/libmmc.o in SPL binary + +CONFIG_SPL_SERIAL_SUPPORT +Support for drivers/serial/libserial.o in SPL binary + +CONFIG_SPL_SPI_FLASH_SUPPORT +Support for drivers/mtd/spi/libspi_flash.o in SPL binary + +CONFIG_SPL_SPI_SUPPORT +Support for drivers/spi/libspi.o in SPL binary + +CONFIG_SPL_FAT_SUPPORT +Support for fs/fat/libfat.o in SPL binary + +CONFIG_SPL_LIBGENERIC_SUPPORT +Support for lib/libgeneric.o in SPL binary Modem Support: -- diff --git a/doc/README.SPL b/doc/README.SPL new file mode 100644 index 000..0a89821 --- /dev/null +++ b/doc/README.SPL @@ -0,0 +1,59 @@ +Generic SPL framework += + +Overview + + +To unify all existing implementations for a secondary program loader (SPL) +and to allow simply adding of new implementations this generic SPL framework +have been created. With this framework almost all source files for a board +can be reused. No code duplication or symlinking is necessary anymore. + + +How it works + + +There is a new directory TOPDIR/spl which contains only a Makefile. +All source files needed by SPL are recompiled inside this directory +and linked to the final binaries named u-boot-spl[.bin|.map]. + +During the SPL build a variable named CONFIG_SPL_BUILD is exported +in the make environment and also appended to CPPFLAGS with -DCONFIG_SPL_BUILD. +Thus makefiles and source files are able to build things differently for SPL. + +For example: + +ifeq ($(CONFIG_SPL_BUILD),y) +COBJS-y += board_spl.o +else +COBJS-y += board.o +endif + +COBJS-$(CONFIG_SPL_BUILD) += foo.o + +#ifdef CONFIG_SPL_BUILD +foo(); +#endif + + +The building of SPL images can be with: + +#define CONFIG_SPL + +Because SPL images normally have a different test base, one have to be +configured by defining CONFIG_SPL_TEXT_BASE. + +To support generic U-Boot libraries and drivers in the SPL binary one can +optionally define CONFIG_SPL_XXX_SUPPORT. Currently following options +are supported: + +CONFIG_SPL_LIBCOMMON_SUPPORT (common/libcommon.o) +CONFIG_SPL_LIBDISK_SUPPORT (disk/libdisk.o) +CONFIG_SPL_I2C_SUPPORT (drivers/i2c/libi2c.o) +CONFIG_SPL_GPIO_SUPPORT (drivers/gpio/libgpio.o) +CONFIG_SPL_MMC_SUPPORT (drivers/mmc/libmmc.o) +CONFIG_SPL_SERIAL_SUPPORT (drivers/serial/libserial.o) +CONFIG_SPL_SPI_FLASH_SUPPORT (drivers/mtd/spi/libspi_flash.o) +CONFIG_SPL_SPI_SUPPORT (drivers/spi/libspi.o) +CONFIG_SPL_FAT_SUPPORT (fs/fat/libfat.o) +CONFIG_SPL_LIBGENERIC_SUPPORT (lib/libgeneric.o) diff --git a/spl/.gitignore b/spl/.gitignore new file mode 100644 index 000..7c88147 --- /dev/null +++ b/spl/.gitignore @@ -0,0 +1,4 @@ +u-boot-spl +u-boot-spl.bin +u-boot-spl.lds +u-boot-spl.map diff --git a/spl/Makefile b/spl/Makefile new file mode 100644 index 000..f20092f --- /dev/null +++ b/spl/Makefile @@ -0,0 +1,101 @@ +# +# (C) Copyright 2000-2011 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# (C) Copyright 2011 +# Daniel Schwierzeck, daniel.schwierz...@googlemail.com. +# +# (C) Copyright 2011 +# Texas Instruments Incorporated - http://www.ti.com/ +# Aneesh V ane...@ti.com +# +# This file is released under the terms of GPL v2 and any later version. +# See the file COPYING in the root directory of the source tree for details. +# +# Based on top-level Makefile. +# + +CONFIG_SPL_BUILD := y +export CONFIG_SPL_BUILD + +include
[U-Boot] eldk5.0 generate illegal instruction for at91rm9200
So what compiler options should be use? I notice some u-boot compile commandline has option '-march=armv4'. Why with this option it is still generate wrong code Thi sis a strong statement, based on somewhat weak facts. Why are you so sure that there is any wrong code being generated? Please show which exact instructions you are talking about. Today I found the wrong code : in u-boot v2011.03 drivers/serial/at91rm9200_usart.c:68: us-US_BRGR = (AT91C_MASTER_CLOCK 4) / (unsigned)baudrate; The correspond asm code : 2010c830: d1a01003movle r1, r3 2010c834: eb001530bl 20111cfc __udivsi3 2010c838: e5840020str r0, [r4, #32] and the __udivsi3 contain the wrong code : 20111cfc __udivsi3: 20111cfc: e2512001subsr2, r1, #1 ; 0x1 20111d00: 012fff1ebxeqlr 20111d04: 3a23bcc 20111d98 __udivsi3+0x9c 20111d08: e151cmp r0, r1 20111d0c: 9a1abls 20111d7c __udivsi3+0x80 20111d10: e1110002tst r1, r2 20111d14: 0a1bbeq 20111d88 __udivsi3+0x8c 20111d18: e16f3f11clz r3, r1 # ***this is the wrong code 20111d1c: e16f2f10clz r2, r0 20111d20: e0432002sub r2, r3, r2 I search the 'clz' instruction in ARM's manual and it says: Usage The CLZ instruction counts the number of leading zeroes in the value in Rm and returns the result in Rd. The result value is 32 if no bits are set in the source register, and zero if bit 31 is set. Condition flags This instruction does not affect the flags. Architectures This instruction is available in ARM architecture versions 5 and above. But at91rm9200 is armv4. Does this mean I can't use eldk5.0 for at91rm9200 ? If yes, How can I use eldk4.2 to build the newest busybox? Because eldk4.2 can't build busybox(with ubiattach enabled) due to it's too old kernel header files(the error message had been sent to eldk list, but no response). help me, please. -- Best Regards, zzs ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] sf: winbond: Add support for the Winbond W25X40
The Winbond W25X40 is now being used in the IP02 (and possibly IP04). Tested and working on the actual device. --- drivers/mtd/spi/winbond.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/spi/winbond.c b/drivers/mtd/spi/winbond.c index e8d30ae..4ab197f 100644 --- a/drivers/mtd/spi/winbond.c +++ b/drivers/mtd/spi/winbond.c @@ -48,6 +48,14 @@ to_winbond_spi_flash(struct spi_flash *flash) static const struct winbond_spi_flash_params winbond_spi_flash_table[] = { { + .id = 0x3013, + .l2_page_size = 8, + .pages_per_sector = 16, + .sectors_per_block = 16, + .nr_blocks = 8, + .name = W25X40, + }, + { .id = 0x3015, .l2_page_size = 8, .pages_per_sector = 16, -- 1.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] eldk5.0 generate illegal instruction for at91rm9200
Dear zzs, In message 20110715161531.ga5...@greatfirst.com you wrote: Today I found the wrong code : Very well - thanks. and the __udivsi3 contain the wrong code : 20111cfc __udivsi3: 20111cfc: e2512001subsr2, r1, #1 ; 0x1 20111d00: 012fff1ebxeqlr 20111d04: 3a23bcc 20111d98 __udivsi3+0x9c 20111d08: e151cmp r0, r1 20111d0c: 9a1abls 20111d7c __udivsi3+0x80 20111d10: e1110002tst r1, r2 20111d14: 0a1bbeq 20111d88 __udivsi3+0x8c 20111d18: e16f3f11clz r3, r1 # ***this is the wrong code 20111d1c: e16f2f10clz r2, r0 20111d20: e0432002sub r2, r3, r2 ... Architectures This instruction is available in ARM architecture versions 5 and above. But at91rm9200 is armv4. This is to be expected. It comes from using the GCC library routines from ELDK, which are configured for an ARMv5TE architecture. Does this mean I can't use eldk5.0 for at91rm9200 ? If yes, How can I You can use it, but you must make sure to rebuild the needed GCC library routines as needed for your target. See the USE_PRIVATE_LIBGCC make option, i. e. use: USE_PRIVATE_LIBGCC=yes make ... 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 advantages of being a captain is being able to ask for ad- vice without necessarily having to take it. -- Kirk, Dagger of the Mind, stardate 2715.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] My partners and I need a good partner some one we can trust
It is risk free and legal ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] eldk5.0 generate illegal instruction for at91rm9200
Dear zzs, In message 20110715161531.ga5...@greatfirst.com you wrote: Today I found the wrong code : Thanks again for the feedback. I have documented this issue in the ELDK FAQ section: http://www.denx.de/wiki/view/ELDK-5/QuestionsAndAnswers#GCC_generates_illegal_opcodes_fo 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 my experience the best way to get something done is to give it to someone who is busy. - Terry Pratchett, _Going_Postal_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v1 (WIP) 00/16] [Timer]API Rewrite
On 7/15/2011 12:17 AM, Wolfgang Denk wrote: Dear J. William Campbell, In message4e1f8127.8030...@comcast.net you wrote: I am pretty sure that is long enough for someone to notice. . I would be interested in seeing an example of such code as you refer to. Could you point me to one, because it seems to me that the only reason to code such a delay is that for some reason the user didn't want to keep looking at the termination condition so often. I think that that arch/powerpc/cpu/mpc512x/i2c.c: 80 while (timeout-- (status I2C_BB)) { ... 88 udelay (1000); 89 status = mpc_reg_in (regs-msr); 90 } 103 while (timeout-- !(*status I2C_IF)) { 104 udelay (1000); 105 *status = mpc_reg_in (regs-msr); 106 } arch/powerpc/cpu/mpc512x/pci.c: 87 /* We need to wait at least a 1sec based on PCI specs */ 88 for (i = 0; i 1000; i++) 89 udelay(1000); arch/powerpc/cpu/mpc5xx/spi.c: 258 for (i = 0; i 1000; i++) { ... 265 udelay(1000); 266 } 390 for (tm=0; tm1000; ++tm) { ... 394 udelay (1000); 395 } arch/powerpc/cpu/mpc5xxx/i2c.c: 102 while (timeout-- (status I2C_BB)) { ... 111 udelay(15); 112 status = mpc_reg_in(regs-msr); 113 } 125 while (timeout-- !(*status I2C_IF)) { 126 udelay(15); 127 *status = mpc_reg_in(regs-msr); 128 } And just that you don't think this is in a single CPU only: arch/powerpc/cpu/mpc8260/pci.c: 343 for (i = 0; i 1000; ++i) ... 345 udelay (1000); Or in board code: board/altera/common/cfide.c: 29 /* wait 500 ms for power to stabilize */ 30 for (i = 0; i 500; i++) 31 udelay(1000); board/amcc/bamboo/bamboo.c: 1019 for (i=0; i500; i++) 1020 udelay(1000); or common code: common/cmd_fdc.c: 213 while((read_fdc_reg(FDC_SRA)0x80)==0) { 214 timeout--; 215 udelay(10); 216 if(timeout==0) /* timeout occured */ 217 return FALSE; 218 } 228 while((read_fdc_reg(FDC_MSR)0xC0)!=0xC0) { 229 /* direction out and ready */ 230 udelay(10); 231 timeout--; 232 if(timeout==0) /* timeout occured */ 233 return -1; 234 } etc.etc. 375 for(val=0;val255;val++) 376 udelay(500); /* wait some time to start motor */ 418 for(i=0;i100;i++) 419 udelay(500); /* wait 500usec for fifo overrun */ 600 for(i=0; i255; i++) /* then we wait some time */ 601 udelay(500); common/usb.c: 93 inline void wait_ms(unsigned long ms) 94 { 95 while (ms-- 0) 96 udelay(1000); 97 } etc. etc. Note this last example which spreads the effect in a not so nice way. Note that there are even places where udelay() is part of the protocol timing implementation - like in the soft-I2C and soft-SPI drivers. Hi All, Thanks for the pointers Wolfgang. From your examples, it seems we are talking exclusively about udelay. As I said in my previous post, on NIOS2, udelay needs to be mechanized on NIOS2 by a timed loop, not by using the same mechanism as the timer, as there is no way one can approximate microsecond resolution by the hardware timer. It is my opinion that there are many CPUs on which the udelay implementation must not be/should not be based on the same timer code as the get_time() operation, because in many cases the get_time() operation requires interrupts to be functional. As you have also pointed out, udelay needs to be available early, before interrupts are available. Therefore, the udelay and get_timer must use the hardware at least somewhat differently. The must also not interfere with each other, which on some existing boards they did. If the I2C protocol must be available before interrupts are available, then udelay must be used. In the above examples, there are some loops in i2c and spi that appear to be waiting a full second. I assume they are using udelay because the get_timer feature is not yet available to them. I also assume that the example in common/usb.c uses udelay to wait for millisecond sized values for the same reason, i.e. that it may run before get_time() is available. However, if you examine the timer code on of the existing CPUs, you will find that udelay is NOT available early ( before interrupts are enabled) on quite a few of them. Therefore, none of the above code would work on these CPUs at present either. These CPUs must not have I2C or spi busses on them that are
Re: [U-Boot] [PATCH v1 (WIP) 00/16] [Timer]API Rewrite
Dear J. William Campbell, In message 4e208227.6010...@comcast.net you wrote: If the I2C protocol must be available before interrupts are available, then udelay must be used. In the above examples, there are some loops in i2c and spi that appear to be waiting a full second. I assume they are using udelay because the get_timer feature is not yet available to them. I also assume that the example in common/usb.c uses No, this is usually not the case. This long delay is the error case, which most probably will never happen. For the normal case, you want a tight spinning loop that introduces as little additional delay as possible. True, although I expect you will find the statement on all the other architectures to be false. Many other architectures, yes, all, no. These other architectures just don't have spi or I2C yet, or if they do, they don't use it early. Are you aware of another architecture that cannot provide sub-microsecond timer resolution? Which is it? 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 Make it right before you make it faster. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] uboot not responding to ping to ubuntu
Hi All, I am facing a very strange problem. I have a MINI2440 SBC which I am connecting to my laptop with Ubuntu11.04. I have downloaded the Uboot configured for mini2440 and its version is 1.3.2. I have successfully transferred the Uboot code on the SBC. But when I am trying to do a TFTP from the SBC to my laptop its failing. I have enabled debug prints in Uboot and am monitoring packets received on Wireshark on my laptop. I see that uboot sends ARP requests and the Host replies back, but these are not acknowledged by the Uboot on SBC. Eventually it timeouts. Ping also fails. Then I connected my SBC to windows Xp based Host machine and in this case when Uboot sent out ARP requests these were received and acknowledged by Uboot and accordingly a ping was successful. My ubuntu based laptop was also able to ping to my windows machine and viceversa. The wireshark dumps for ARP replies from both Ubuntu and Windows to the Uboot looked the same with the source MAC address being different. So I am missing some configuration on my Ubuntu11.04 or what else could be the problem. Thanks Regards. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v1 (WIP) 00/16] [Timer]API Rewrite
On 7/15/2011 11:34 AM, Wolfgang Denk wrote: Dear J. William Campbell, In message4e208227.6010...@comcast.net you wrote: If the I2C protocol must be available before interrupts are available, then udelay must be used. In the above examples, there are some loops in i2c and spi that appear to be waiting a full second. I assume they are using udelay because the get_timer feature is not yet available to them. I also assume that the example in common/usb.c uses No, this is usually not the case. This long delay is the error case, which most probably will never happen. For the normal case, you want a tight spinning loop that introduces as little additional delay as possible. Hi All, I understand why one would want to use udelay in those cases where there are other conditions that should cause the loop to exit. However, in the 16 examples you cited, 7 of those usages are for delays of multiple milliseconds with no tests or escape conditions included. I therefore pointed out that I assume that it was being done that way (as opposed to using get_timer) because this code would be executed early, before get_timer was available. True, although I expect you will find the statement on all the other architectures to be false. Many other architectures, yes, all, no. These other architectures just don't have spi or I2C yet, or if they do, they don't use it early. Are you aware of another architecture that cannot provide sub-microsecond timer resolution? Which is it? No, but I am aware of some that do not provide udelay at all until after interrupts are enabled and the get_timer interface is available. Several ARM implementations have this property. There are one or two others (SPARC) that are similar as I recall. There were also some that called reset_timer, which would mess up nested timing loops, but this has already been fixed. There also quite a few udelay implementations that do not actually provide 1 µs resolution. For instance, the first thing that happens in arm720t/interrupts.c __udelay is that the input microseconds is divided by 1000 and the remainder discarded. A udelay(10) won't work so well here. The lh7a40x/timer.c uses a 508 kHz clock, so delays are accurate to at best 2 µs. There are other examples. For instance, I am pretty sure some u-boot based CPUs use a 32kHz clock as the timebase for udelay. The resolution in that case is 30 µs, which would be a problem for your example code. I am sure further digging will reveal other resolution issues. These udelay issues would need fixing if all u-boot options are to work out of the box. In some cases of low resolution, the fix is not easy, or maybe not even possible. However, this problem has not prevented the use of u-boot on these CPUs. It does mean that some things do not work out of the box, and these non-compliant udelays should be fixed wherever practical. In any case, this shouldn't stop progress on get_timer and the delay_at_least (or whatever it ends up being called) function being adopted. That is independent of the udelay issues. udelay must be implemented in a compliant manner, which may or may not use the same hardware as get_timer() does. It certainly can't use the same code (although some ARM version in effect do, resulting in a non-compliant, low resolution udelay). It might be interesting to utilize something like jiffies for the loop delays that are looking for error exits. In those cases, the error case should be infrequent. It may not matter that the total delay is quite a bit longer than the user requested, as long as it isn't vastly shorter. If a 10 µsec delay became a 30 µsec delay inside the loop examples where we expect to exit due to another cause, it probably wouldn't matter much. It would matter a lot though if the delay were setting a baud rate on a bit-banged output, so jiffies may not be worth it. I put it out there for consideration, as it is easier to produce than a udelay that has a guaranteed low absolute error. Best Regards, Bill Campbell Best regards, Wolfgang Denk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Get these great inspirational books and songs
Hi, The determination to explore new ways of doing things, especially by reading important life changing books, easily brings about a sustainable progressive and successful life --G.P.I. Among these great highly motivational and inspirational books are;- WAYS OF ATTAINING BUSINESS SUCCESSES Achieving True Love And Lasting Relationship DISCOVERING SECRETS OF SUCCESS AND RICHES OVERCOMING LIFE DIFFICULTIES IMPOSSIBILITY TO POSSIBILITY RELATIONSHIPS THAT WORK CAREER DEVELOPMENT AND MANAGEMENT IDEAS THAT CREATE WEALTH TACKLING PROBLEMS IN RELATIONSHIPS GREAT SUCCESS HABITS Written by the renowned multi-talented writer, Ambrose Nwaopara Jr., are available online for the development of all categories of people. Follow Ambrose at www.myspace.com/4ambrose. At the upper left general information section, click on the website link to down load the new e-book version of the books. For the print version, go to: www.wordclay.com , click on bookstore and search for Ambrose Nwaopara Jr. books or visit: www.amazon.com and search. The books are also available in India at: www.flipkart.com Make that choice today for a better future and try to be part of the great life changing benefits of the books. Also available, are the highly inspirational songs from the 2011 album Arise and shine, which can be found at: http://www.cdbaby.com/cd/chidiambrose1 or http://www.amazon.co.uk/Chidi-Ambrose/dp/B004I03AAK or http://itunes.apple.com/us/album/arise-and-shine/id413225675 Hurry now and get the promotional copies. Best wishes and have a great well fulfilled and lovely life. Message Powered by: Great Promos Inc. N.B: This very important life improvement message is not intended as a spam. Please if you do not have the interest to take advantage of the message, kindly ignore it. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] powerpc/85xx: Fix detection of P1017E
Had a typo such that P1017E would be detected correctly. Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- arch/powerpc/cpu/mpc8xxx/cpu.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/cpu/mpc8xxx/cpu.c b/arch/powerpc/cpu/mpc8xxx/cpu.c index 85ebcc9..767bc52 100644 --- a/arch/powerpc/cpu/mpc8xxx/cpu.c +++ b/arch/powerpc/cpu/mpc8xxx/cpu.c @@ -79,7 +79,7 @@ struct cpu_type cpu_type_list [] = { CPU_TYPE_ENTRY(P1016, P1016_E, 1), CPU_TYPE_ENTRY(P1016, P1016, 1), CPU_TYPE_ENTRY(P1017, P1017, 1), - CPU_TYPE_ENTRY(P1017, P1017, 1), + CPU_TYPE_ENTRY(P1017, P1017_E, 1), CPU_TYPE_ENTRY(P1020, P1020, 2), CPU_TYPE_ENTRY(P1020, P1020_E, 2), CPU_TYPE_ENTRY(P1021, P1021, 2), -- 1.7.3.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/3] powerpc/85xx: Fix TQM8560 DDR boot issue
Series to fix the TQM85xx issue reported by Wolfgang the problem turned out to be that those boards use get_ram_size(), which requires that a TLB entry be set up for the DDR region. My earlier patches changed the way this was done and broke this. I've created a new function, clear_ddr_tlbs(), so that there is now a setup_ddr_tlbs() and a matching clear_ddr_tlbs() that boards can use if they need to temporarily set up a TLB entry for this purpose. The tqm85xx ddr init code now uses this and the board is able to boot. There is also a cleanup patch to the TQM header file to make it easier to read - I added code that is dependent on this so it's included in this series. Cheers, Becky arch/powerpc/cpu/mpc85xx/cpu.c | 14 +++--- arch/powerpc/cpu/mpc85xx/tlb.c | 29 + arch/powerpc/include/asm/mmu.h |1 + board/tqc/tqm85xx/sdram.c |7 +++ include/configs/TQM85xx.h |9 - 5 files changed, 48 insertions(+), 12 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/3] board/tqm85xx: Create and tear down TLB for get_ram_size()
We need a TLB entry to call get_ram_size(); the common code doesn't create one until *after* fixed_sdram() has determined the size. So we set up tlbs for the max possible size and tear them down once we're done with get_ram_size(); the common 85xx code will then set up a final set of tlb entries for the *actual* detected size of ddr. This prevents us from having TLB entries that are larger than DDR sitting around for very long, which is not a recommended scenario. Signed-off-by: Becky Bruce bec...@kernel.crashing.org --- board/tqc/tqm85xx/sdram.c |7 +++ include/configs/TQM85xx.h |2 ++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/board/tqc/tqm85xx/sdram.c b/board/tqc/tqm85xx/sdram.c index 39a9e21..baf073e 100644 --- a/board/tqc/tqm85xx/sdram.c +++ b/board/tqc/tqm85xx/sdram.c @@ -363,6 +363,12 @@ static phys_size_t sdram_setup(int casl) udelay (1000); #endif /* CONFIG_TQM8548 */ + /* +* get_ram_size() depends on having tlbs for the DDR, but they are +* not yet setup because we don't know the size. Set up a temp +* mapping and delete it when done. +*/ + setup_ddr_tlbs(CONFIG_SYS_DDR_EARLY_SIZE_MB); for (i = 0; i N_DDR_CS_CONF; i++) { ddr-cs0_config = ddr_cs_conf[i].reg; @@ -376,6 +382,7 @@ static phys_size_t sdram_setup(int casl) break; } } + clear_ddr_tlbs(CONFIG_SYS_DDR_EARLY_SIZE_MB); #ifdef CONFIG_TQM8548 if (i N_DDR_CS_CONF) { diff --git a/include/configs/TQM85xx.h b/include/configs/TQM85xx.h index b4eef28..0eadcd2 100644 --- a/include/configs/TQM85xx.h +++ b/include/configs/TQM85xx.h @@ -152,8 +152,10 @@ defined(CONFIG_TQM8548_AG) || \ defined(CONFIG_TQM8548_BE) #define CONFIG_SYS_PPC_DDR_WIMGE (MAS2_I | MAS2_G) +#define CONFIG_SYS_DDR_EARLY_SIZE_MB (512) #else #define CONFIG_SYS_PPC_DDR_WIMGE (0) +#define CONFIG_SYS_DDR_EARLY_SIZE_MB (2 * 1024) #endif #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE -- 1.5.6.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3] powerpc/mpc85xx: Add clear_ddr_tlbs function
This is useful when we just want to wipe out the TLBs. There's currently a function that resets the ddr tlbs to a different value; it is changed to utilize this function. The new function can be used in conjunction with setup_ddr_tlbs() for a board to temporarily map/unmap the DDR address range as needed. Signed-off-by: Becky Bruce bec...@kernel.crashing.org --- arch/powerpc/cpu/mpc85xx/cpu.c | 14 +++--- arch/powerpc/cpu/mpc85xx/tlb.c | 29 + arch/powerpc/include/asm/mmu.h |1 + 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c index 53f0887..ce59c25 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu.c +++ b/arch/powerpc/cpu/mpc85xx/cpu.c @@ -374,6 +374,8 @@ void read_tlbcam_entry(int idx, u32 *valid, u32 *tsize, unsigned long *epn, unsigned int setup_ddr_tlbs_phys(phys_addr_t p_addr, unsigned int memsize_in_meg); +void clear_ddr_tlbs_phys(phys_addr_t p_addr, unsigned int memsize_in_meg); + static void dump_spd_ddr_reg(void) { int i, j, k, m; @@ -460,19 +462,9 @@ static int reset_tlb(phys_addr_t p_addr, u32 size, phys_addr_t *phys_offset) u32 vstart = CONFIG_SYS_DDR_SDRAM_BASE; unsigned long epn; u32 tsize, valid, ptr; - phys_addr_t rpn = 0; int ddr_esel; - ptr = vstart; - - while (ptr (vstart + size)) { - ddr_esel = find_tlb_idx((void *)ptr, 1); - if (ddr_esel != -1) { - read_tlbcam_entry(ddr_esel, valid, tsize, epn, rpn); - disable_tlb(ddr_esel); - } - ptr += TSIZE_TO_BYTES(tsize); - } + clear_ddr_tlbs_phys(p_addr, size20); /* Setup new tlb to cover the physical address */ setup_ddr_tlbs_phys(p_addr, size20); diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c index 295f175..01a3561 100644 --- a/arch/powerpc/cpu/mpc85xx/tlb.c +++ b/arch/powerpc/cpu/mpc85xx/tlb.c @@ -300,4 +300,33 @@ unsigned int setup_ddr_tlbs(unsigned int memsize_in_meg) return setup_ddr_tlbs_phys(CONFIG_SYS_DDR_SDRAM_BASE, memsize_in_meg); } + +/* Invalidate the DDR TLBs for the requested size */ +void clear_ddr_tlbs_phys(phys_addr_t p_addr, unsigned int memsize_in_meg) +{ + u32 vstart = CONFIG_SYS_DDR_SDRAM_BASE; + unsigned long epn; + u32 tsize, valid, ptr; + phys_addr_t rpn = 0; + int ddr_esel; + u64 memsize = (u64)memsize_in_meg 20; + + ptr = vstart; + + while (ptr (vstart + memsize)) { + ddr_esel = find_tlb_idx((void *)ptr, 1); + if (ddr_esel != -1) { + read_tlbcam_entry(ddr_esel, valid, tsize, epn, rpn); + disable_tlb(ddr_esel); + } + ptr += TSIZE_TO_BYTES(tsize); + } +} + +void clear_ddr_tlbs(unsigned int memsize_in_meg) +{ + clear_ddr_tlbs_phys(CONFIG_SYS_DDR_SDRAM_BASE, memsize_in_meg); +} + + #endif /* !CONFIG_NAND_SPL */ diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h index c01c85f..ef5076b 100644 --- a/arch/powerpc/include/asm/mmu.h +++ b/arch/powerpc/include/asm/mmu.h @@ -489,6 +489,7 @@ extern int find_free_tlbcam(void); extern void print_tlbcam(void); extern unsigned int setup_ddr_tlbs(unsigned int memsize_in_meg); +extern void clear_ddr_tlbs(unsigned int memsize_in_meg); extern void write_tlb(u32 _mas0, u32 _mas1, u32 _mas2, u32 _mas3, u32 _mas7); -- 1.5.6.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] board/tqm85xx: Clean up PPC_DDR_WIMGE define logic in config file
The way I wrote this in the first time was based on the original code, but I used a karnaugh map to make it a bit easier to read. There should be no functional change. Signed-off-by: Becky Bruce bec...@kernel.crashing.org --- include/configs/TQM85xx.h |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/include/configs/TQM85xx.h b/include/configs/TQM85xx.h index 79a958d..b4eef28 100644 --- a/include/configs/TQM85xx.h +++ b/include/configs/TQM85xx.h @@ -147,10 +147,15 @@ * DDR Setup */ #define CONFIG_SYS_DDR_SDRAM_BASE 0x /* DDR is system memory */ + #if defined(CONFIG_TQM_BIGFLASH) || \ - (!defined(CONFIG_TQM8548_AG) !defined(CONFIG_TQM8548_BE)) + defined(CONFIG_TQM8548_AG) || \ + defined(CONFIG_TQM8548_BE) #define CONFIG_SYS_PPC_DDR_WIMGE (MAS2_I | MAS2_G) +#else +#define CONFIG_SYS_PPC_DDR_WIMGE (0) #endif + #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE #ifdef CONFIG_TQM8548_AG #define CONFIG_VERY_BIG_RAM -- 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 2/3] board/tqm85xx: Clean up PPC_DDR_WIMGE define logic in config file
Dear Becky Bruce, In message 13107687401917-git-send-email-bec...@kernel.crashing.org you wrote: The way I wrote this in the first time was based on the original code, but I used a karnaugh map to make it a bit easier to read. There should be no functional change. Ummm... #if defined(CONFIG_TQM_BIGFLASH) || \ - (!defined(CONFIG_TQM8548_AG) !defined(CONFIG_TQM8548_BE)) + defined(CONFIG_TQM8548_AG) || \ + defined(CONFIG_TQM8548_BE) Sorry, but this looks wrong to me. Isn't the rule foo bar == !(!foo || !bar), so that (!defined(CONFIG_TQM8548_AG) !defined(CONFIG_TQM8548_BE)) becomes !(defined(CONFIG_TQM8548_AG) || defined(CONFIG_TQM8548_BE)) ? I think you are missing the not part... 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 Heavier than air flying machines are impossible. -- Lord Kelvin, President, Royal Society, c. 1895 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Linux 2.6.34.6 ethernet setup
Hello,I am running Linux 2.6.34.6 on p4080ds board. I am trying to get the interfaces running on the kernel but it does not seem to be working. So far I am able to set up the ipaddress etc for the interface fm1-gb1 but still cannot ping the outside world. I edited the file /etc/rc.d/rc.conf with no luck. My configuration is as follows: address@hidden rc.d]# vi rc.conf export HOSTNAME=p4080 export NTP_SERVER= export MODLIST= export RAMDIRS= export TMPFS=tmpfs export TMPFS_SIZE=512k export READONLY_FS= export INETD_ARGS= export BOA_ARGS=-c /etc export SMBD_ARGS= export NMBD_ARGS= export DHCP_ARG= export DEPLOYMENT_STYLE=RAMDISK export SYSCFG_DHCPC_CMD=udhcpc -b -i export DROPBEAR_ARGS= export SYSCFG_IFACE0=y export INTERFACE0=fm1-gb1 export IPADDR0=192.168.1.145' export NETMASK0=255.255.255.0 export BROADCAST0=192.168.1.255 export GATEWAY0=192.168.1.1 After restarting the rcS script:: address@hidden rc.d]# sh /etc/rc.d/rcS restart network Running sysctl Setting up networking on loopback device: SIOCADDRT: File exists Setting up networking on fm1-gb1: Adding static route for default gateway to 192.168.1.1: /etc/rc.d/init.d/network: line 90: cannot create tmp/hosts: nonexistent directory mv: cannot rename '/tmp/hosts': No such file or directory address@hidden rc.d]# ifconfig fm1-gb1 Link encap:Ethernet HWaddr 00:04:9F:02:01:FD inet addr:192.168.1.145 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:3 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:238 (238.0 b) Memory:fe4e2000-fe4e2fff loLink encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) address@hidden rc.d]# Thank you in advance for any help.___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] U-BOOT TFTP
Hello,I am running Linux 2.6.34.6 on p4080ds board. I am trying to get the interfaces running on the kernel but it does not seem to be working. So far I am able to set up the ipaddress etc for the interface fm1-gb1 but still cannot ping the outside world. I edited the file /etc/rc.d/rc.conf with no luck. My configuration is as follows: address@hidden rc.d]# vi rc.conf export HOSTNAME=p4080 export NTP_SERVER= export MODLIST= export RAMDIRS= export TMPFS=tmpfs export TMPFS_SIZE=512k export READONLY_FS= export INETD_ARGS= export BOA_ARGS=-c /etc export SMBD_ARGS= export NMBD_ARGS= export DHCP_ARG= export DEPLOYMENT_STYLE=RAMDISK export SYSCFG_DHCPC_CMD=udhcpc -b -i export DROPBEAR_ARGS= export SYSCFG_IFACE0=y export INTERFACE0=fm1-gb1 export IPADDR0=192.168.1.145' export NETMASK0=255.255.255.0 export BROADCAST0=192.168.1.255 export GATEWAY0=192.168.1.1 After restarting the rcS script:: address@hidden rc.d]# sh /etc/rc.d/rcS restart network Running sysctl Setting up networking on loopback device: SIOCADDRT: File exists Setting up networking on fm1-gb1: Adding static route for default gateway to 192.168.1.1: /etc/rc.d/init.d/network: line 90: cannot create tmp/hosts: nonexistent directory mv: cannot rename '/tmp/hosts': No such file or directory address@hidden rc.d]# ifconfig fm1-gb1 Link encap:Ethernet HWaddr 00:04:9F:02:01:FD inet addr:192.168.1.145 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:3 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:238 (238.0 b) Memory:fe4e2000-fe4e2fff loLink encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) address@hidden rc.d]# Thank you in advance for any help. Sorry if this is easy, I am a little new to this. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot