Re: [U-Boot] [PATCH v2] MPC8260: fixup device tree by property instead of path
Hello Wolfgang, Wolfgang Denk wrote: cpu/mpc8260/cpu.c used to use do_fixup_by_path_u32() to update the clock frequencies in the device tree, using a CPU path /cpus/OF_CPU, with OF_CPU beind defined in the board config file. However, this does not work when one board config file (here: MPC8260ADS.h) is intended to be used for several diffrent CPUs and therefor contains a generic definition like c...@0, as the device trees that will then be loaded will contain specific names like PowerPC,8...@0. We switch to using do_fixup_by_prop_u32() instead, so we can search for device_type=cpu, as it is done in other architectures, too. Signed-off-by: Wolfgang Denk w...@denx.de Cc: Heiko Schocher h...@denx.de --- v2: Fix typo in Heiko's name. Heiko, could you please test if this works with mgcoge, too? It works fine on the mgcoge: = tftp 40 mgcoge/mgcoge.dtb-hs Using SCC ETHERNET device TFTP from server 192.168.1.1; our IP address is 192.168.20.3 Filename 'mgcoge/mgcoge.dtb-hs'. Load address: 0x40 Loading: # done Bytes transferred = 6000 (1770 hex) = fdt addr 40 = fdt print [...] cpus { #address-cells = 0x1; #size-cells = 0x0; PowerPC,8...@0 { device_type = cpu; reg = 0x0; d-cache-line-size = 0x20; i-cache-line-size = 0x20; d-cache-size = 0x4000; i-cache-size = 0x4000; timebase-frequency = 0x0; clock-frequency = 0x0; bus-frequency = 0x0; }; = fdt board = fdt print /cpus cpus { #address-cells = 0x1; #size-cells = 0x0; PowerPC,8...@0 { device_type = cpu; reg = 0x0; d-cache-line-size = 0x20; i-cache-line-size = 0x20; d-cache-size = 0x4000; i-cache-size = 0x4000; timebase-frequency = 0xfbc520; clock-frequency = 0xbcd3d80; bus-frequency = 0x3ef1480; }; }; = Also Linux boots fine :-) so this patch looks good to me, so: Acked-by: Heiko Schocherh...@denx.de 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] [PATCHv2 3/4] omap3: replace all instances of gpmc config struct by one global
On 07:26 Wed 13 May , Wolfgang Denk wrote: Dear Jean-Christophe PLAGNIOL-VILLARD, In message 20090512230224.gl...@game.jcrosoft.org you wrote: diff --git a/cpu/arm_cortexa8/omap3/mem.c b/cpu/arm_cortexa8/omap3/mem.c index aa15f94..079c848 100644 --- a/cpu/arm_cortexa8/omap3/mem.c +++ b/cpu/arm_cortexa8/omap3/mem.c @@ -41,6 +41,8 @@ unsigned int boot_flash_sec; unsigned int boot_flash_type; volatile unsigned int boot_flash_env_addr; +struct gpmc *gpmc_cfg; please do not expose it directly please use a function to get it Isn't this just adding to the memory footprint for little or no benefit? avoid overwrite of the pointer by never use it directly Best Regards, J. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCHv2 1/4] omap3: embedd gpmc_cs into gpmc config struct
Dear Jean-Christophe, Attention: this also fixes a missnaming in board/omap3/evm/evm.c which told to use CS6 but used CS5 in reallity. More info on http://lists.denx.de/pipermail/u-boot/2009-May/052157.html it will be better to split this in 2 patch to bisect it but how to split? I do not want to break the code (when only one of them applied). The pure renaming patch i sent last week was trigger for this series. board/omap3/evm/evm.c | 16 +++--- cpu/arm_cortexa8/omap3/mem.c | 33 -- cpu/arm_cortexa8/omap3/sys_info.c |4 +- drivers/mtd/nand/omap_gpmc.c | 22 ++- include/asm-arm/arch-omap3/cpu.h | 40 include/configs/omap3_beagle.h|1 - include/configs/omap3_evm.h |1 - include/configs/omap3_overo.h |1 - include/configs/omap3_pandora.h |1 - include/configs/omap3_zoom1.h |1 - zoom2? The patch then doess not apply on master... Which branch/repo should i base it on? #ifndef __ASSEMBLY__ +struct gpmc_cs { + unsigned int config1; /* 0x00 */ + unsigned int config2; /* 0x04 */ + unsigned int config3; /* 0x08 */ + unsigned int config4; /* 0x0C */ + unsigned int config5; /* 0x10 */ + unsigned int config6; /* 0x14 */ + unsigned int config7; /* 0x18 */ why not an array so can use a loop as in enable_gpmc_cs_config() good idea, will be fixed. Thanks for review, Matthias -- Matthias Ludwig, Software Development Ultratronik Entwicklungs GmbH, Gewerbestrasse 52, 82211 Herrsching, Germany http://www.ultratronik.de Tel: +49 8152 3709-356 Fax: +49 8152 5183 Registergericht Muenchen, HRB 55584 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCHv2 2/4] omap3: remove typedefs for configuration structs
} sdrc_cs_t; please remove too } sdrc_actim_t; please remove too this like i'm missen those :( will be fixed #ifndef __ASSEMBLY__ -typedef enum { +enum { STACKED = 0, IP_DDR = 1, COMBO_DDR = 2, IP_SDR = 3, -} mem_t; +}; it will be better to use the enum type so it will be check at the compiling time by gcc ok bst regards, Matthias -- Matthias Ludwig, Software Development Ultratronik Entwicklungs GmbH, Gewerbestrasse 52, 82211 Herrsching, Germany http://www.ultratronik.de Tel: +49 8152 3709-356 Fax: +49 8152 5183 Registergericht Muenchen, HRB 55584 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm/imx31_phycore: Fix bi_arch_number
On 07:28 Wed 13 May , Wolfgang Denk wrote: Dear Jean-Christophe PLAGNIOL-VILLARD, In message 20090512231236.gn...@game.jcrosoft.org you wrote: Sascha ping? What are you waiting for? Isn't the patch obvious? the ack from the board Maintainer which is Sascha For such trivial patches you can decide this yourself. That's better than delaying things. as you ask me last time I update the arch number http://www.mail-archive.com/u-boot@lists.denx.de/msg07273.html ---Extract You actually CHANGE the arch_number here; you need the board maintainer's ACK for such a patch. -- Best Regards, J. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCHv2 4/4] omap3: use only fixed-size types inside ctrl_structs
replace variable types in ctrl_structs for omap3 by those with fixed size (u8, u16, u32). Additional ifndef-protection is needed by examples which do not compile when including asm/types.h could explain why and in which case we need it? Explain why transfor to fixed-size-types or explain why we need the ifndef around all structs? The ifdef-protection against __KERNEL_STRICT_NAMES is needed to not break code in the tools-dir which (implizitely) includes cpu.h. See this compiler output: gcc -g -Wall -idirafter /mdata/gsrc/u-boot/include -idirafter /mdata/gsrc/u-boot/include2 -idirafter /mdata/gsrc/u-boot/include -I /mdata/gsrc/u-boot/libfdt -I /mdata/gsrc/u-boot/tools -DTEXT_BASE=0x80e8 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -O -c -o mkimage.o /mdata/gsrc/u-boot/tools/mkimage.c In file included from /mdata/gsrc/u-boot/include/configs/omap3_evm.h:46, from /mdata/gsrc/u-boot/include/config.h:2, from /mdata/gsrc/u-boot/include/command.h:30, from /mdata/gsrc/u-boot/include/image.h:55, from /mdata/gsrc/u-boot/tools/mkimage.c:26: /mdata/gsrc/u-boot/include/asm/arch/cpu.h:36: error: expected specifier-qualifier-list before ‘u8’ best regards, Matthias -- Matthias Ludwig, Software Development Ultratronik Entwicklungs GmbH, Gewerbestrasse 52, 82211 Herrsching, Germany http://www.ultratronik.de Tel: +49 8152 3709-356 Fax: +49 8152 5183 Registergericht Muenchen, HRB 55584 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCHv2 1/4] omap3: embedd gpmc_cs into gpmc config struct
On 09:16 Wed 13 May , Matthias Ludwig wrote: Dear Jean-Christophe, Attention: this also fixes a missnaming in board/omap3/evm/evm.c which told to use CS6 but used CS5 in reallity. More info on http://lists.denx.de/pipermail/u-boot/2009-May/052157.html it will be better to split this in 2 patch to bisect it but how to split? I do not want to break the code (when only one of them applied). The pure renaming patch i sent last week was trigger for this series. I think first rename the evm cs and then update the current API board/omap3/evm/evm.c | 16 +++--- cpu/arm_cortexa8/omap3/mem.c | 33 -- cpu/arm_cortexa8/omap3/sys_info.c |4 +- drivers/mtd/nand/omap_gpmc.c | 22 ++- include/asm-arm/arch-omap3/cpu.h | 40 include/configs/omap3_beagle.h|1 - include/configs/omap3_evm.h |1 - include/configs/omap3_overo.h |1 - include/configs/omap3_pandora.h |1 - include/configs/omap3_zoom1.h |1 - zoom2? The patch then doess not apply on master... Which branch/repo should i base it on? arm/next Best Regards, J. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Congratulations
Confirm receipt by contacting the process unit officer Herald claim your £1,000,000GBP E-mail:phun...@btinternet.com Fill the details:Name,Add,Tel.Yours Ms.Caroline ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/4] net: extend the netdev to have a common way to set the hw mac address
Hi Scott, On Tue, May 12, 2009 at 10:48:28AM +0200, Detlev Zundel wrote: Can you please explain to me, why you think it to be reasonable to demand providing an initramfs in the order of 100s of k to set an attribute of a hardware device which has its own driver? Kind of defeats any space-usage argument against putting device trees in ARM instead... Good point. Apart from being constantly repeated, I do not understand this reasoning at all. My (old-school) belief was that an operating system deals with abstracting the hardware thus userspace does not need to (nor should) know too many hw details. There's more to the operating system than the kernel. Sure - but how does this affect the question at hand? Cheers Detlev -- Practice random senselessness and act kind of beautiful. -- 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/4] net: extend the netdev to have a common way to set the hw mac address
Hi Mike, I never ran across this outside of linux arm where people seriously repeat the statement over and over that a whole initramfs with an initial userspace and a pivot_root is plausible for nfs root whilst patches of a few lines float around doing the same in the kernel. i never said that a completely populated initramfs was needed. it can be accomplished pretty easily with very little code. Sure, but still, how big is such an initramfs, do you have any numbers here? And how many lines of C code does it take to set the MAC in the kernel? Is this really worth it? Cheers Detlev -- Basically, Barnes Noble separates things by how old they are -- current stuff is Fiction, stuff from 20 years ago is Literature, stuff from 100 years ago is Classics, stuff from 400 years ago is Shakespeare [..] and stuff from 2000 years ago is History. -- James Kibo Parry in kibo-1207032212000...@10.0.1.2 -- 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] lib_arch/board.c: Move malloc initialization before flash_init()
Hi Stefan, On Tuesday 12 May 2009 22:09:11 Kim Phillips wrote: Signed-off-by: Stefan Roese s...@denx.de Cc: Wolfgang Denk w...@denx.de Cc: Mike Frysinger vap...@gentoo.org Cc: Scott McNutt smcn...@psyent.com Cc: Shinya Kuribayashi shinya.kuribaya...@necel.com Cc: Nobuhiro Iwamatsu iwama...@nigauri.org Cc: Daniel Hellstrom dan...@gaisler.com Cc: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Cc: John Rigby jcri...@gmail.com --- If nobody from the platforms custodians objects against this patch then I suggest that Wolfgang pulls it directly into next. fyi, you've only cc:d Scott McNutt and John Rigby on this mail, yet you indicate otherwise... Hmmm. I used git send-email for sending and I'm pretty sure that I saw all those email addresses added by this command. Perhaps the mailing list server removed some? I've seen this happen on other lists as well. It's pretty certain that there is a problem somewhere, as I also noted discrepancies between what I sent and what I see on the ML. I dare not point a finger to any component of this chain without further research however... Cheers Detlev -- 14474011154664524427946373126085988481573677491474835889066354349131199152128 If you know why this number is perfect - you're probably a mathematician... -- 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] MPC8260: fixup device tree by property instead of path
Hi Heiko, Acked-by: Heiko Schocherh...@denx.de Apart from fixing the inverse whitespace problemn, am I correct that strictly speaking we should now also add the following? Tested-by: Heiko Schocher h...@denx.de Cheers Detlev -- To summarize: It is a well known and lamented fact that those people who most want to rule people are, ipso facto, those least suited to do it. To summarize the summary: anyone who is capable of getting themselves made President should on no account be allowed to do the job. -- The Hitchhikers Guide To The Galaxy -- 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] powerpc/inka4x0: Remove left-over ide reset code.
Hi Grant, realizing that I forgot to CC you on the original mail[1], I now formally ask you to pull the patch into your repo as it fixes a real bug. Thanks Detlev [1] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/59148 The pin which was used in preliminary versions of the board for ide reset is really connected to the rtc clock. Signed-off-by: Detlev Zundel d...@denx.de --- board/inka4x0/inka4x0.c | 33 - include/configs/inka4x0.h |1 - 2 files changed, 0 insertions(+), 34 deletions(-) diff --git a/board/inka4x0/inka4x0.c b/board/inka4x0/inka4x0.c index 7428b92..c645b05 100644 --- a/board/inka4x0/inka4x0.c +++ b/board/inka4x0/inka4x0.c @@ -274,36 +274,3 @@ void pci_init_board(void) pci_mpc5xxx_init(hose); } #endif - -#if defined(CONFIG_CMD_IDE) defined(CONFIG_IDE_RESET) - -void init_ide_reset (void) -{ - volatile struct mpc5xxx_wu_gpio *wu_gpio = - (struct mpc5xxx_wu_gpio *)MPC5XXX_WU_GPIO; - - debug (init_ide_reset\n); - - /* Configure PSC1_4 as GPIO output for ATA reset */ - setbits_8(wu_gpio-enable, MPC5XXX_GPIO_WKUP_PSC1_4); - setbits_8(wu_gpio-ddr,MPC5XXX_GPIO_WKUP_PSC1_4); - /* Deassert reset */ - setbits_8(wu_gpio-dvo,MPC5XXX_GPIO_WKUP_PSC1_4); -} - -void ide_set_reset (int idereset) -{ - volatile struct mpc5xxx_wu_gpio *wu_gpio = - (struct mpc5xxx_wu_gpio *)MPC5XXX_WU_GPIO; - - debug (ide_reset(%d)\n, idereset); - - if (idereset) { - clrbits_8(wu_gpio-dvo, MPC5XXX_GPIO_WKUP_PSC1_4); - /* Make a delay. MPC5200 spec says 25 usec min */ - udelay(50); - } else { - setbits_8(wu_gpio-dvo, MPC5XXX_GPIO_WKUP_PSC1_4); - } -} -#endif diff --git a/include/configs/inka4x0.h b/include/configs/inka4x0.h index 5f06b09..46606ca 100644 --- a/include/configs/inka4x0.h +++ b/include/configs/inka4x0.h @@ -418,7 +418,6 @@ static inline void tws_data_config_output(unsigned output) #undef CONFIG_IDE_8xx_DIRECT /* Direct IDEnot supported */ #undef CONFIG_IDE_LED /* LED for ide not supported */ -#define CONFIG_IDE_RESET/* reset for ide supported */ #define CONFIG_IDE_PREINIT #define CONFIG_SYS_IDE_MAXBUS1 /* max. 1 IDE bus */ -- Old mathematicians never die; they just lose some of their functions. -- 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] onenand bad block handling
Hi Sharma-san, If I use u-boot to write kernel image to onenand that the kernel image across bad blocks, will u-boot able to skip blocks during read and successfully boot up the kernel? Also, same case for rootfs, if I write JFFS2 format rootfs to onenand using u-boot, how does the kernel handle the rootfs if rootfs across bad blocks? Many thanks. Best regards, Geiger Amit Kumar Sharma wrote: Hi, Hi all, I am working on an ARM platform with OneNAND as the permanent storage for u-boot, Linux kernel and rootfs. I am using u-boot-2009.03 and linux kernel 2.6.27. I have some questions about the bad block handling of OneNAND. 1. How does the u-boot handle bad block for onenand? Jsut skip the bad block and use only good bloks 2. If u-boot is creating a bad block table, does it need to pass to the kernel? If not, how to ensure their bad block table are in sync? no need to pass bad block from uboot, kernel will create table of bad blocks. 3. How to deal with bad blocks after the writing of the u-boot, kernel and rootfs image? Is it the job of UBI? yes, UBI will manage Thanks in advance. Best regards, Geiger ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Timeout in tftp.c
Jens Gehrlein schrieb: Wolfgang Denk schrieb: Dear Achim Ehrlich, In message 4a0969fc.2060...@taskit.de you wrote: The timeout for lost packages in tftp.c is defined to 5000 msecs. But when setting the timeout get_timer(0) is called in NetSetTimeout in net.c. But on AT91 the timer code returns usecs and not msecs resulting in a timeout of 5 ms instead of 5 secs, which is kind of short. I looked in the timer code of other ARM-based platforms and they seem to use usec-based timers as well. Of course I can change the defined timeout in tftp.c to one second or so, but that doesn't seem to be the right way to solve this issue. Any suggestions or ideas or do I miss something here? Any chance that you are using an old version of U-Boot? Hi Achim, I'm interested in this, too. I observed timeouts on ARM11 (MX31), but couldn't do any investigation due to other projects. I'm working on a custom developed board with AT91Sam9G20 and on the current at91-tree of u-boot, so all new. I will do further work this afternoon on this issue. Kind regards Achim -- product manager email:aehrl...@taskit.de Tel.: ++49 30 611295-25 Fax: ++49 30 611295-11 -- taskit GmbH Seelenbinderstr. 33 | D-12555 Berlin web:http://www.taskit.de Amtsgericht Charlottenburg: 93HRB39014 Managing director: Thorsten Raulfs -- ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Timeout in tftp.c
On 13:37 Wed 13 May , Achim Ehrlich wrote: Jens Gehrlein schrieb: Wolfgang Denk schrieb: Dear Achim Ehrlich, In message 4a0969fc.2060...@taskit.de you wrote: The timeout for lost packages in tftp.c is defined to 5000 msecs. But when setting the timeout get_timer(0) is called in NetSetTimeout in net.c. But on AT91 the timer code returns usecs and not msecs resulting in a timeout of 5 ms instead of 5 secs, which is kind of short. I looked in the timer code of other ARM-based platforms and they seem to use usec-based timers as well. Of course I can change the defined timeout in tftp.c to one second or so, but that doesn't seem to be the right way to solve this issue. Any suggestions or ideas or do I miss something here? Any chance that you are using an old version of U-Boot? Hi Achim, I'm interested in this, too. I observed timeouts on ARM11 (MX31), but couldn't do any investigation due to other projects. I'm working on a custom developed board with AT91Sam9G20 and on the current at91-tree of u-boot, so all new. I will do further work this afternoon on this issue. which value do you put in the CONFIG_SYS_HZ? if you can send patch we could take a look on this Best Regards, J. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] LCD issue
Hi guys, I try to add LCD driver in U-boot. LCD displays many vertical lines in different colors. Is it anyone has experience in LCD? Yan Feng ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] powerpc/inka4x0: Remove left-over ide reset code.
On Wed, May 13, 2009 at 3:30 AM, Detlev Zundel d...@denx.de wrote: Hi Grant, realizing that I forgot to CC you on the original mail[1], I now formally ask you to pull the patch into your repo as it fixes a real bug. Hi Detlev, I'm not the u-boot mpc5xxx maintainer anymore. I didn't have time to keep up with it. John Rigby is the current maintainer. g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] common/cmd_ide.c: Coding style cleanup (Lindent)
Hi Wolfgang, On Wednesday 13 May 2009 13:32:08 Wolfgang Denk wrote: Not sure if this patch will be accepted. It's probably not so easy to understand the history of changes in this file with this coding style cleanup. But the current condition is so bad that I think it's worth the change. Another argument against the patch is that it makes the code in some places more ugly... -const static pio_config_t pio_config_ns [IDE_MAX_PIO_MODE+1] = -{ -/* Setup Length Hold */ - { 70, 165,30 }, /* PIO-Mode 0, [ns] */ - { 50, 125,20 }, /* PIO-Mode 1, [ns] */ - { 30, 101,15 }, /* PIO-Mode 2, [ns] */ - { 30,80,10 }, /* PIO-Mode 3, [ns] */ - { 25,70,10 }, /* PIO-Mode 4, [ns] */ +const static pio_config_t pio_config_ns[IDE_MAX_PIO_MODE + 1] = { + /* Setup Length Hold */ + {70, 165, 30}, /* PIO-Mode 0, [ns] */ + {50, 125, 20}, /* PIO-Mode 1, [ns] */ + {30, 101, 15}, /* PIO-Mode 2, [ns] */ + {30, 80, 10}, /* PIO-Mode 3, [ns] */ + {25, 70, 10}, /* PIO-Mode 4, [ns] */ }; Instead of nice vertically aligned columns the new code is less readable. OK, I'll change this back to the original alignment. -static void ide_ident (block_dev_desc_t *dev_desc); -static uchar ide_wait (int dev, ulong t); +static void ide_ident(block_dev_desc_t * dev_desc); And I really hate the space after the '*' in lines like these, I don't like then too. I'm wondering why indent didn't do this consistent. especially as it's done more or lessa randomly: -static voidatapi_inquiry(block_dev_desc_t *dev_desc); -ulong atapi_read (int device, lbaint_t blknr, ulong blkcnt, void *buffer); +static void atapi_inquiry(block_dev_desc_t * dev_desc); +ulong atapi_read(int device, lbaint_t blknr, ulong blkcnt, void *buffer); We have * dev_desc, but *buffer ? That's just bogus. - printf (\nLoading from IDE device %d, partition %d: - Name: %.32s Type: %.32s\n, - dev, part, info.name, info.type); + printf(\nLoading from IDE device %d, partition %d: + Name: %.32s Type: %.32s\n, dev, part, info.name, info.type); Also, reordering the lines here makes the code more difficult to read. - if (ide_dev_desc[dev].block_read (dev, info.start, 1, (ulong *)addr) != 1) { - printf (** Read error on %d:%d\n, dev, part); - show_boot_progress (-48); + if (ide_dev_desc[dev].block_read(dev, info.start, 1, (ulong *) addr) != 1) { Why is there a space after the cast? No idea. I'll try to remove all those spaces. snip +U_BOOT_CMD(ide, 5, 1, do_ide, + IDE sub-system, + reset - reset IDE controller\n + ide info - show available IDE devices\n + ide device [dev] - show or set current device\n + ide part [dev] - print partition table of one or all IDE devices\n + ide read addr blk# cnt\n + ide write addr blk# cnt - read/write `cnt' + blocks starting at block `blk#'\n + to/from memory address `addr'\n); + +U_BOOT_CMD(diskboot, 3, 1, do_diskboot, + boot from IDE device, loadAddr dev:part\n); And indentation should be done by TAB - I see no reason to add more space here. Sure. I'll fix it. I agree that this file badly needs to be cleaned up, and I even agree to a patch like above - but it has to be done more intelligently. The resulting file should adhere to the Coding Style requirements, and be consistent in style. OK, I'll try to fix all those issues and resubmit a new version. Thanks. 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] common/cmd_ide.c: Coding style cleanup (Lindent)
Dear Stefan Roese, In message 200905131620.39726...@denx.de you wrote: -static void ide_ident (block_dev_desc_t *dev_desc); -static uchar ide_wait (int dev, ulong t); +static void ide_ident(block_dev_desc_t * dev_desc); And I really hate the space after the '*' in lines like these, I don't like then too. I'm wondering why indent didn't do this consistent. especially as it's done more or lessa randomly: -static void atapi_inquiry(block_dev_desc_t *dev_desc); -ulong atapi_read (int device, lbaint_t blknr, ulong blkcnt, void *buffer); +static void atapi_inquiry(block_dev_desc_t * dev_desc); +ulong atapi_read(int device, lbaint_t blknr, ulong blkcnt, void *buffer); We have * dev_desc, but *buffer ? That's just bogus. - printf (\nLoading from IDE device %d, partition %d: - Name: %.32s Type: %.32s\n, - dev, part, info.name, info.type); + printf(\nLoading from IDE device %d, partition %d: +Name: %.32s Type: %.32s\n, dev, part, info.name, info.type); Also, reordering the lines here makes the code more difficult to read. - if (ide_dev_desc[dev].block_read (dev, info.start, 1, (ulong *)addr) != 1) { -printf (** Read error on %d:%d\n, dev, part); - show_boot_progress (-48); + if (ide_dev_desc[dev].block_read(dev, info.start, 1, (ulong *) addr) != 1) { Why is there a space after the cast? No idea. I'll try to remove all those spaces. I can only speculate that Lindent understands about basic data types (void *, int *, etc.), and inserts NO space there, but it does not understand things like ulong or block_dev_desc_t and does insert a space there. Why this would make any sense to anybody I cannot tell. OK, I'll try to fix all those issues and resubmit a new version. Thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Computers are not intelligent. They only think they are. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] ARM DaVinci Leopard Board Support
The patch applies to arm/next. It was tested on a leopard board. After testing had to change the MACH TYPE as this board is not present in the list of mach types at the moment. So the patch itself is going to give a compilation failure. Further details on this board can be found at www.leopardboard.org This patch does not do the NAND initialization yet. Will send an update to this patch after David Brownell's NAND updates get merged Jean-Christophe can you please do a new sync for this board Signed-off-by: Sandeep Paulraj s-paul...@ti.com --- Makefile |3 + board/davinci/leopard/Makefile| 52 +++ board/davinci/leopard/config.mk | 11 +++ board/davinci/leopard/leopard.c | 36 ++ include/configs/davinci_leopard.h | 130 + 5 files changed, 232 insertions(+), 0 deletions(-) create mode 100644 board/davinci/leopard/Makefile create mode 100644 board/davinci/leopard/config.mk create mode 100644 board/davinci/leopard/leopard.c create mode 100644 include/configs/davinci_leopard.h diff --git a/Makefile b/Makefile index b7d5bd9..5fb126a 100644 --- a/Makefile +++ b/Makefile @@ -2793,6 +2793,9 @@ davinci_sonata_config : unconfig davinci_dm355evm_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs dm355evm davinci davinci +davinci_leopard_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs leopard davinci davinci + lpd7a400_config \ lpd7a404_config: unconfig @$(MKCONFIG) $(@:_config=) arm lh7a40x lpd7a40x diff --git a/board/davinci/leopard/Makefile b/board/davinci/leopard/Makefile new file mode 100644 index 000..26b0705 --- /dev/null +++ b/board/davinci/leopard/Makefile @@ -0,0 +1,52 @@ +# +# (C) Copyright 2000, 2001, 2002 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# Copyright (C) 2007 Sergey Kubushyn k...@koi8.net +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).a + +COBJS := $(BOARD).o +SOBJS := + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +# +# This is for $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/davinci/leopard/config.mk b/board/davinci/leopard/config.mk new file mode 100644 index 000..c4e6e07 --- /dev/null +++ b/board/davinci/leopard/config.mk @@ -0,0 +1,11 @@ +# +# Spectrum Digital DM355 EVM board +# dm355evm board has 1 bank of 128 MB DDR RAM +# Physical Address: 8000' to 8800' +# +# Linux Kernel is expected to be at 8000'8000, entry 8000'8000 +# (mem base + reserved) +# + +#Provide at least 16MB spacing between us and the Linux Kernel image +TEXT_BASE = 0x8108 diff --git a/board/davinci/leopard/leopard.c b/board/davinci/leopard/leopard.c new file mode 100644 index 000..282368d --- /dev/null +++ b/board/davinci/leopard/leopard.c @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2009 Texas Instruments + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include common.h +#include nand.h +#include asm/io.h +#include asm/arch/hardware.h +#include asm/arch/emif_defs.h
Re: [U-Boot] [PATCH] powerpc/inka4x0: Remove left-over ide reset code.
Hi Grant, I'm not the u-boot mpc5xxx maintainer anymore. I didn't have time to keep up with it. John Rigby is the current maintainer. Argh, my fault, I should have known better. Sorry for the noise. Cheers Detlev -- #define KSAMTIB_CIGAM_2SFFJ 0x8519 /* For detecting wrong-endian fs */ -- include/linux/jffs2.h -- 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] lib_arch/board.c: Move malloc initialization before flash_init()
On Wed, 13 May 2009 00:58:06 -0400 Mike Frysinger vap...@gentoo.org wrote: On Wednesday 13 May 2009 00:20:52 Stefan Roese wrote: On Tuesday 12 May 2009 22:09:11 Kim Phillips wrote: Signed-off-by: Stefan Roese s...@denx.de Cc: Wolfgang Denk w...@denx.de Cc: Mike Frysinger vap...@gentoo.org Cc: Scott McNutt smcn...@psyent.com Cc: Shinya Kuribayashi shinya.kuribaya...@necel.com Cc: Nobuhiro Iwamatsu iwama...@nigauri.org Cc: Daniel Hellstrom dan...@gaisler.com Cc: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Cc: John Rigby jcri...@gmail.com --- If nobody from the platforms custodians objects against this patch then I suggest that Wolfgang pulls it directly into next. fyi, you've only cc:d Scott McNutt and John Rigby on this mail, yet you indicate otherwise... Hmmm. I used git send-email for sending and I'm pretty sure that I saw all those email addresses added by this command. Perhaps the mailing list server removed some? I've seen this happen on other lists as well. full CC list looks fine on the e-mail i received -mike ok, makes sense; I thought I was over having problems with my mail server, but I guess not. sorry for the noise. Kim ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] MPC8260: fixup device tree by property instead of path
Hello Detlev, Detlev Zundel wrote: Acked-by: Heiko Schocherh...@denx.de Apart from fixing the inverse whitespace problemn, am I correct that strictly speaking we should now also add the following? Tested-by: Heiko Schocher h...@denx.de Ah, you are right. 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 1/4] net: extend the netdev to have a common way to set the hw mac address
On Wednesday 13 May 2009 04:41:29 Detlev Zundel wrote: I never ran across this outside of linux arm where people seriously repeat the statement over and over that a whole initramfs with an initial userspace and a pivot_root is plausible for nfs root whilst patches of a few lines float around doing the same in the kernel. i never said that a completely populated initramfs was needed. it can be accomplished pretty easily with very little code. Sure, but still, how big is such an initramfs, do you have any numbers here? And how many lines of C code does it take to set the MAC in the kernel? Is this really worth it? that is the problem of whoever needs this functionality. -mike ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V3] arm: timer and interrupt init rework
actually the timer init use the interrupt_init as init callback which make the interrupt and timer implementation difficult to follow so now rename it as int timer_init(void) and use interrupt_init for interrupt btw also remane the corresponding file to the functionnality implemented as ixp arch implement two timer - one based on interrupt - so all the timer related code is moved to timer.c Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com --- v3 do not move the board_init after the time board/armltd/integratorap/integratorap.c |2 +- board/armltd/integratorcp/integratorcp.c |2 +- board/atmel/at91cap9adk/at91cap9adk.c|1 - board/davinci/common/misc.h |1 - board/m501sk/m501sk.c|2 +- board/netstar/netstar.c |2 +- board/voiceblue/voiceblue.c |2 +- cpu/arm1136/mx31/Makefile|3 +- cpu/arm1136/mx31/{interrupts.c = timer.c} |3 +- cpu/arm1136/omap24xx/Makefile|3 +- cpu/arm1136/omap24xx/{interrupts.c = timer.c} |3 +- cpu/arm1176/s3c64xx/Makefile |2 +- cpu/arm1176/s3c64xx/{interrupts.c = timer.c}|2 +- cpu/arm720t/interrupts.c | 46 ++ cpu/arm920t/at91rm9200/Makefile |2 +- cpu/arm920t/at91rm9200/{interrupts.c = timer.c} |2 +- cpu/arm920t/imx/Makefile |4 +- cpu/arm920t/imx/{interrupts.c = timer.c}|2 +- cpu/arm920t/ks8695/Makefile |3 +- cpu/arm920t/ks8695/{interrupts.c = timer.c} | 12 ++--- cpu/arm920t/s3c24x0/Makefile |5 ++- cpu/arm920t/s3c24x0/{interrupts.c = timer.c}|2 +- cpu/arm925t/Makefile |5 ++- cpu/arm925t/{interrupts.c = timer.c}|2 +- cpu/arm926ejs/Makefile |2 +- cpu/arm926ejs/interrupts.c | 57 -- cpu/arm_cortexa8/omap3/Makefile |2 +- cpu/arm_cortexa8/omap3/{interrupts.c = timer.c} |2 +- cpu/ixp/Makefile |6 +-- cpu/ixp/interrupts.c | 55 - cpu/ixp/timer.c | 54 cpu/lh7a40x/Makefile |2 +- cpu/lh7a40x/{interrupts.c = timer.c}|2 +- cpu/pxa/Makefile |8 +++- cpu/pxa/{interrupts.c = timer.c}|7 ++- cpu/s3c44b0/Makefile |5 ++- cpu/s3c44b0/{interrupts.c = timer.c}|2 +- cpu/sa1100/Makefile |4 +- cpu/sa1100/{interrupts.c = timer.c} |5 +- include/asm-arm/u-boot-arm.h |3 + include/configs/ixdpg425.h |1 + include/configs/pdnb3.h |1 + lib_arm/board.c |3 + 43 files changed, 161 insertions(+), 173 deletions(-) rename cpu/arm1136/mx31/{interrupts.c = timer.c} (97%) rename cpu/arm1136/omap24xx/{interrupts.c = timer.c} (97%) rename cpu/arm1176/s3c64xx/{interrupts.c = timer.c} (99%) rename cpu/arm920t/at91rm9200/{interrupts.c = timer.c} (99%) rename cpu/arm920t/imx/{interrupts.c = timer.c} (99%) rename cpu/arm920t/ks8695/{interrupts.c = timer.c} (93%) rename cpu/arm920t/s3c24x0/{interrupts.c = timer.c} (99%) rename cpu/arm925t/{interrupts.c = timer.c} (99%) delete mode 100644 cpu/arm926ejs/interrupts.c rename cpu/arm_cortexa8/omap3/{interrupts.c = timer.c} (99%) rename cpu/lh7a40x/{interrupts.c = timer.c} (99%) rename cpu/pxa/{interrupts.c = timer.c} (96%) rename cpu/s3c44b0/{interrupts.c = timer.c} (98%) rename cpu/sa1100/{interrupts.c = timer.c} (95%) diff --git a/board/armltd/integratorap/integratorap.c b/board/armltd/integratorap/integratorap.c index 9631967..5ececd6 100644 --- a/board/armltd/integratorap/integratorap.c +++ b/board/armltd/integratorap/integratorap.c @@ -540,7 +540,7 @@ static ulong div_timer = 1; /* Divisor to convert timer reading * - the Integrator/AP timer issues an interrupt * each time it reaches zero */ -int interrupt_init (void) +int timer_init (void) { /* Load timer with initial value */ *(volatile ulong *)(CONFIG_SYS_TIMERBASE + 0) = TIMER_LOAD_VAL; diff --git a/board/armltd/integratorcp/integratorcp.c b/board/armltd/integratorcp/integratorcp.c index 72629ce..0d3afd8 100644 --- a/board/armltd/integratorcp/integratorcp.c +++ b/board/armltd/integratorcp/integratorcp.c @@ -163,7 +163,7 @@ static ulong timestamp; /* U-Boot ticks since startup */ /* starts up a counter * - the Integrator/CP timer can be set up to issue an interrupt */ -int interrupt_init (void)
[U-Boot] [PATCH 1/1] api: remove un-needed ifdef CONFIG_API already handle by the Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com --- api/api.c |5 - api/api_net.c |5 - api/api_platform-arm.c |3 --- api/api_platform-ppc.c |5 - api/api_storage.c |5 - 5 files changed, 0 insertions(+), 23 deletions(-) diff --git a/api/api.c b/api/api.c index f51ebb7..385a7e3 100644 --- a/api/api.c +++ b/api/api.c @@ -24,9 +24,6 @@ */ #include config.h - -#if defined(CONFIG_API) - #include command.h #include common.h #include malloc.h @@ -665,5 +662,3 @@ void platform_set_mr(struct sys_info *si, unsigned long start, unsigned long siz return; } } - -#endif /* CONFIG_API */ diff --git a/api/api_net.c b/api/api_net.c index 9611ab0..afe072e 100644 --- a/api/api_net.c +++ b/api/api_net.c @@ -24,9 +24,6 @@ */ #include config.h - -#if defined(CONFIG_API) - #include common.h #include net.h #include linux/types.h @@ -109,5 +106,3 @@ int dev_read_net(void *cookie, void *buf, int len) return eth_receive(buf, len); } - -#endif /* CONFIG_API */ diff --git a/api/api_platform-arm.c b/api/api_platform-arm.c index ca15ca5..fffaa1e 100644 --- a/api/api_platform-arm.c +++ b/api/api_platform-arm.c @@ -28,9 +28,6 @@ */ #include config.h - -#if defined(CONFIG_API) - #include linux/types.h #include api_public.h diff --git a/api/api_platform-ppc.c b/api/api_platform-ppc.c index 611a01b..bfcc417 100644 --- a/api/api_platform-ppc.c +++ b/api/api_platform-ppc.c @@ -28,9 +28,6 @@ */ #include config.h - -#if defined(CONFIG_API) - #include linux/types.h #include api_public.h @@ -75,5 +72,3 @@ int platform_sys_info(struct sys_info *si) return 1; } - -#endif /* CONFIG_API */ diff --git a/api/api_storage.c b/api/api_storage.c index 6fac98b..c535712 100644 --- a/api/api_storage.c +++ b/api/api_storage.c @@ -24,9 +24,6 @@ */ #include config.h - -#if defined(CONFIG_API) - #include common.h #include api_public.h @@ -391,5 +388,3 @@ lbasize_t dev_read_stor(void *cookie, void *buf, lbasize_t len, lbastart_t start return (dd-block_read(dev_stor_index(dd), start, len, buf)); } - -#endif /* CONFIG_API */ -- 1.6.1.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/4 v4] console.h: remove unused prototype 'console_realloc'
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com --- V4 update commit message as ask by Wolfgang include/console.h |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/include/console.h b/include/console.h index 06ec32a..bc8b139 100644 --- a/include/console.h +++ b/include/console.h @@ -33,6 +33,4 @@ extern device_t*stdio_devices[] ; extern char *stdio_names[MAX_FILES] ; -int console_realloc(int top); - #endif -- 1.6.1.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/4 v4] console: unify printing current devices
create stdio_print_current_devices() for this purpose Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com --- V4 split in 2 commits and remove an other duplicate block as ask by Wolfgang common/console.c| 75 +++--- include/stdio_dev.h |1 + 2 files changed, 30 insertions(+), 46 deletions(-) diff --git a/common/console.c b/common/console.c index 0a36d2f..867c12c 100644 --- a/common/console.c +++ b/common/console.c @@ -532,6 +532,33 @@ int console_init_f(void) return 0; } +void stdio_print_current_devices(void) +{ +#ifdef CONFIG_SYS_CONSOLE_INFO_QUIET + /* Print information */ + puts(In:); + if (stdio_devices[stdin] == NULL) { + puts(No input devices available!\n); + } else { + printf (%s\n, stdio_devices[stdin]-name); + } + + puts(Out: ); + if (stdio_devices[stdout] == NULL) { + puts(No output devices available!\n); + } else { + printf (%s\n, stdio_devices[stdout]-name); + } + + puts(Err: ); + if (stdio_devices[stderr] == NULL) { + puts(No error devices available!\n); + } else { + printf (%s\n, stdio_devices[stderr]-name); + } +#endif /* CONFIG_SYS_CONSOLE_INFO_QUIET */ +} + #ifdef CONFIG_SYS_CONSOLE_IS_IN_ENV /* Called after the relocation - use desired console functions */ int console_init_r(void) @@ -601,29 +628,7 @@ done: gd-flags |= GD_FLG_DEVINIT;/* device initialization completed */ -#ifndef CONFIG_SYS_CONSOLE_INFO_QUIET - /* Print information */ - puts(In:); - if (stdio_devices[stdin] == NULL) { - puts(No input devices available!\n); - } else { - console_printdevs(stdin); - } - - puts(Out: ); - if (stdio_devices[stdout] == NULL) { - puts(No output devices available!\n); - } else { - console_printdevs(stdout); - } - - puts(Err: ); - if (stdio_devices[stderr] == NULL) { - puts(No error devices available!\n); - } else { - console_printdevs(stderr); - } -#endif /* CONFIG_SYS_CONSOLE_INFO_QUIET */ + stdio_print_current_devices(); #ifdef CONFIG_SYS_CONSOLE_ENV_OVERWRITE /* set the environment variables (will overwrite previous env settings) */ @@ -694,29 +699,7 @@ int console_init_r(void) gd-flags |= GD_FLG_DEVINIT;/* device initialization completed */ -#ifndef CONFIG_SYS_CONSOLE_INFO_QUIET - /* Print information */ - puts(In:); - if (stdio_devices[stdin] == NULL) { - puts(No input devices available!\n); - } else { - printf(%s\n, stdio_devices[stdin]-name); - } - - puts(Out: ); - if (stdio_devices[stdout] == NULL) { - puts(No output devices available!\n); - } else { - printf(%s\n, stdio_devices[stdout]-name); - } - - puts(Err: ); - if (stdio_devices[stderr] == NULL) { - puts(No error devices available!\n); - } else { - printf(%s\n, stdio_devices[stderr]-name); - } -#endif /* CONFIG_SYS_CONSOLE_INFO_QUIET */ + stdio_print_current_devices(); /* Setting environment variables */ for (i = 0; i 3; i++) { diff --git a/include/stdio_dev.h b/include/stdio_dev.h index 8b06ccf..83da4cd 100644 --- a/include/stdio_dev.h +++ b/include/stdio_dev.h @@ -91,6 +91,7 @@ extern char *stdio_names[MAX_FILES]; */ intstdio_register (struct stdio_dev * dev); intstdio_init (void); +void stdio_print_current_devices(void); #ifdef CONFIG_SYS_STDIO_DEREGISTER intstdio_deregister(char *devname); #endif -- 1.6.1.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/4 v4] stdio/device: rework function naming convention
actually the console API use the following naming convention ==Extract== typedef struct device_t; int device_register (device_t * dev); int devices_init (void); int device_deregister(char *devname); struct list_head* device_get_list(void); device_t* device_get_by_name(char* name); device_t* device_clone(device_t *dev); === which is device generic and confusing instead of using device_XX and device_t we now switch to stdio_XX and stdio_dev this will also allow to add later a generic device mecanism in order to have multi generic device support and driver instance Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com --- V4 do not touch NULLDEL and update to stdio_dev as ask by Wolfgang board/MAI/AmigaOneG3SE/ps2kbd.c |6 +- board/MAI/AmigaOneG3SE/video.c|6 +- board/ads5121/ads5121_diu.c |2 +- board/bf527-ezkit/video.c |6 +- board/bf533-stamp/video.c |6 +- board/bf548-ezkit/video.c |6 +- board/bmw/bmw.c |2 +- board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c |2 +- board/linkstation/avr.c |2 +- board/mpl/common/common_util.c|2 +- board/mpl/common/isa.c|2 +- board/mpl/common/kbd.c|6 +- board/mpl/pati/pati.c |6 +- board/netphone/phone_console.c|6 +- board/rbc823/kbd.c|8 ++-- board/trab/vfd.c |2 +- common/Makefile |2 +- common/cmd_console.c |8 ++-- common/cmd_log.c |6 +- common/cmd_terminal.c |6 +- common/console.c | 36 +- common/iomux.c| 14 +++--- common/lcd.c |6 +- common/serial.c |8 ++-- common/{devices.c = stdio.c} | 50 common/usb_kbd.c | 14 +++--- cpu/blackfin/jtag-console.c |6 +- cpu/mpc8xx/lcd.c |2 +- cpu/mpc8xx/video.c|6 +- cpu/pxa/pxafb.c |2 +- drivers/input/keyboard.c |6 +- drivers/net/netconsole.c |6 +- drivers/serial/arm_dcc.c |6 +- drivers/serial/usbtty.c |6 +- drivers/usb/musb/musb_hcd.c |4 +- drivers/usb/musb/musb_hcd.h |2 +- drivers/video/cfb_console.c |8 ++-- include/configs/AmigaOneG3SE.h|2 +- include/configs/MIP405.h |2 +- include/configs/MPC8610HPCD.h |2 +- include/configs/MPC8641HPCN.h |2 +- include/configs/PIP405.h |2 +- include/configs/VCMA9.h |2 +- include/configs/gr_ep2s60.h |2 +- include/configs/mp2usb.h |2 +- include/console.h | 36 -- include/iomux.h |6 +- include/serial.h |2 +- include/{devices.h = stdio_dev.h}| 32 lib_arm/board.c |4 +- lib_avr32/board.c |4 +- lib_blackfin/board.c |6 +- lib_blackfin/post.c |2 +- lib_i386/board.c |4 +- lib_i386/video.c | 10 ++-- lib_m68k/board.c |6 +- lib_mips/board.c |6 +- lib_nios/board.c |4 +- lib_nios2/board.c |4 +- lib_ppc/board.c |6 +- lib_sh/board.c|4 +- lib_sparc/board.c |6 +- post/post.c |2 +- 63 files changed, 199 insertions(+), 235 deletions(-) rename common/{devices.c = stdio.c} (84%) delete mode 100644 include/console.h rename include/{devices.h = stdio_dev.h} (85%) diff --git a/board/MAI/AmigaOneG3SE/ps2kbd.c b/board/MAI/AmigaOneG3SE/ps2kbd.c index a297005..aa164b0 100644 --- a/board/MAI/AmigaOneG3SE/ps2kbd.c +++ b/board/MAI/AmigaOneG3SE/ps2kbd.c @@ -34,7 +34,7 @@ */ #include common.h #include asm/processor.h -#include devices.h +#include stdio_dev.h #include ps2kbd.h @@ -226,7 +226,7 @@ int overwrite_console (void) int drv_isa_kbd_init (void) {
[U-Boot] [PATCH 4/4 v4] mpl: printing current stdio devices cleanup
curently the mpl's boards duplicate the printing current devices from common/console.c use stdio_print_current_devices() instead Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com --- V4 split in 2 commits as ask by Wolfgang board/mpl/common/common_util.c | 30 -- board/mpl/common/common_util.h |1 - board/mpl/mip405/mip405.c |3 ++- board/mpl/pip405/pip405.c |3 ++- board/mpl/vcma9/vcma9.c|3 ++- 5 files changed, 6 insertions(+), 34 deletions(-) diff --git a/board/mpl/common/common_util.c b/board/mpl/common/common_util.c index 243e3eb..61af4ae 100644 --- a/board/mpl/common/common_util.c +++ b/board/mpl/common/common_util.c @@ -29,7 +29,6 @@ #include asm/processor.h #include asm/byteorder.h #include i2c.h -#include stdio_dev.h #include pci.h #include malloc.h #include bzlib.h @@ -428,35 +427,6 @@ void check_env(void) } } - -extern device_t *stdio_devices[]; -extern char *stdio_names[]; - -void show_stdio_dev(void) -{ - /* Print information */ - puts(In:); - if (stdio_devices[stdin] == NULL) { - puts(No input devices available!\n); - } else { - printf (%s\n, stdio_devices[stdin]-name); - } - - puts(Out: ); - if (stdio_devices[stdout] == NULL) { - puts(No output devices available!\n); - } else { - printf (%s\n, stdio_devices[stdout]-name); - } - - puts(Err: ); - if (stdio_devices[stderr] == NULL) { - puts(No error devices available!\n); - } else { - printf (%s\n, stdio_devices[stderr]-name); - } -} - #endif /* #if !defined(CONFIG_PATI) */ int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) diff --git a/board/mpl/common/common_util.h b/board/mpl/common/common_util.h index 46573da..29cd14f 100644 --- a/board/mpl/common/common_util.h +++ b/board/mpl/common/common_util.h @@ -37,7 +37,6 @@ void get_backup_values(backup_t *buf); #define BOOT_PCI 0x02 #endif -void show_stdio_dev(void); void check_env(void); #if defined(CONFIG_CMD_DOC) void doc_init (void); diff --git a/board/mpl/mip405/mip405.c b/board/mpl/mip405/mip405.c index 5eb90e5..24caa46 100644 --- a/board/mpl/mip405/mip405.c +++ b/board/mpl/mip405/mip405.c @@ -68,6 +68,7 @@ #include 4xx_i2c.h #include miiphy.h #include ../common/common_util.h +#include stdio_dev.h #include i2c.h #include rtc.h @@ -735,7 +736,7 @@ int last_stage_init (void) printf (Error writing to the PHY\n); } print_mip405_rev (); - show_stdio_dev (); + stdio_print_current_devices (); check_env (); /* check if RTC time is valid */ stop=get_timer(start); diff --git a/board/mpl/pip405/pip405.c b/board/mpl/pip405/pip405.c index 8724e27..f31a5e8 100644 --- a/board/mpl/pip405/pip405.c +++ b/board/mpl/pip405/pip405.c @@ -28,6 +28,7 @@ #include pip405.h #include asm/processor.h #include i2c.h +#include stdio_dev.h #include ../common/isa.h #include ../common/common_util.h @@ -705,7 +706,7 @@ int last_stage_init (void) { print_pip405_rev (); isa_init (); - show_stdio_dev (); + stdio_print_current_devices (); check_env(); return 0; } diff --git a/board/mpl/vcma9/vcma9.c b/board/mpl/vcma9/vcma9.c index a4c463a..2b3fad2 100644 --- a/board/mpl/vcma9/vcma9.c +++ b/board/mpl/vcma9/vcma9.c @@ -27,6 +27,7 @@ #include common.h #include s3c2410.h +#include stdio_dev.h #include i2c.h #include vcma9.h @@ -316,7 +317,7 @@ int last_stage_init(void) { mem_test_reloc(); checkboard(); - show_stdio_dev(); + stdio_print_current_devices(); check_env(); return 0; } -- 1.6.1.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 05/10] mxc-mmc: sdhc host driver for MX2 and MX3 proccessor
On Wed, May 6, 2009 at 1:30 PM, Ilya Yanok ya...@emcraft.com wrote: This is a port of Linux driver for SDHC host controller hardware found on Freescale's MX2 and MX3 processors. Would this work asis on the MX31 uboot. I tried making the code work on the MX31 with minor mods ( on some registers). Would it work on MX31? I am trying to understand the hardware better. I had some confusion on the internally generated clock. This code seems to borrow heavily from the linux api's. So it i s using the imx_get_perclk2() function as a source of the divder frequency. Will it work on the imx31. U-boot already has the mx31_get_ipg_clk() for extracting the clock. Which one should i use for the SD_MMC_CLOCK? From the data sheet, it seems ipgperclk3() has to be used for the divider. I am not sure though at this point . I am not getting a response from the SD card for the OCR for voltage validation as a part of the card identification cycle. Any help will be appreciated. Thanks, Alfred, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] at91: regroup IP hw init in one cpu file per soc
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com --- cpu/arm926ejs/at91/Makefile| 35 +--- cpu/arm926ejs/at91/at91cap9_devices.c | 176 +++ cpu/arm926ejs/at91/at91cap9_macb.c | 54 -- cpu/arm926ejs/at91/at91cap9_serial.c | 76 cpu/arm926ejs/at91/at91cap9_spi.c | 100 --- cpu/arm926ejs/at91/at91sam9260_devices.c | 184 cpu/arm926ejs/at91/at91sam9260_macb.c | 63 --- cpu/arm926ejs/at91/at91sam9260_serial.c| 76 cpu/arm926ejs/at91/at91sam9260_spi.c | 99 --- .../{at91sam9261_spi.c = at91sam9261_devices.c} | 49 + cpu/arm926ejs/at91/at91sam9261_serial.c| 76 cpu/arm926ejs/at91/at91sam9263_devices.c | 184 cpu/arm926ejs/at91/at91sam9263_macb.c | 54 -- cpu/arm926ejs/at91/at91sam9263_serial.c| 76 cpu/arm926ejs/at91/at91sam9263_spi.c | 99 --- cpu/arm926ejs/at91/at91sam9263_usb.c | 35 .../{at91sam9rl_serial.c = at91sam9rl_devices.c} | 37 cpu/arm926ejs/at91/at91sam9rl_spi.c| 64 --- 18 files changed, 636 insertions(+), 901 deletions(-) create mode 100644 cpu/arm926ejs/at91/at91cap9_devices.c delete mode 100644 cpu/arm926ejs/at91/at91cap9_macb.c delete mode 100644 cpu/arm926ejs/at91/at91cap9_serial.c delete mode 100644 cpu/arm926ejs/at91/at91cap9_spi.c create mode 100644 cpu/arm926ejs/at91/at91sam9260_devices.c delete mode 100644 cpu/arm926ejs/at91/at91sam9260_macb.c delete mode 100644 cpu/arm926ejs/at91/at91sam9260_serial.c delete mode 100644 cpu/arm926ejs/at91/at91sam9260_spi.c rename cpu/arm926ejs/at91/{at91sam9261_spi.c = at91sam9261_devices.c} (72%) delete mode 100644 cpu/arm926ejs/at91/at91sam9261_serial.c create mode 100644 cpu/arm926ejs/at91/at91sam9263_devices.c delete mode 100644 cpu/arm926ejs/at91/at91sam9263_macb.c delete mode 100644 cpu/arm926ejs/at91/at91sam9263_serial.c delete mode 100644 cpu/arm926ejs/at91/at91sam9263_spi.c delete mode 100644 cpu/arm926ejs/at91/at91sam9263_usb.c rename cpu/arm926ejs/at91/{at91sam9rl_serial.c = at91sam9rl_devices.c} (70%) delete mode 100644 cpu/arm926ejs/at91/at91sam9rl_spi.c diff --git a/cpu/arm926ejs/at91/Makefile b/cpu/arm926ejs/at91/Makefile index e300d97..71acb0b 100644 --- a/cpu/arm926ejs/at91/Makefile +++ b/cpu/arm926ejs/at91/Makefile @@ -25,35 +25,12 @@ include $(TOPDIR)/config.mk LIB= $(obj)lib$(SOC).a -ifdef CONFIG_AT91CAP9 -COBJS-$(CONFIG_MACB) += at91cap9_macb.o -COBJS-y+= at91cap9_serial.o -COBJS-$(CONFIG_HAS_DATAFLASH) += at91cap9_spi.o -endif -ifdef CONFIG_AT91SAM9260 -COBJS-$(CONFIG_MACB) += at91sam9260_macb.o -COBJS-y+= at91sam9260_serial.o -COBJS-$(CONFIG_HAS_DATAFLASH) += at91sam9260_spi.o -endif -ifdef CONFIG_AT91SAM9G20 -COBJS-$(CONFIG_MACB) += at91sam9260_macb.o -COBJS-y+= at91sam9260_serial.o -COBJS-$(CONFIG_HAS_DATAFLASH) += at91sam9260_spi.o -endif -ifdef CONFIG_AT91SAM9261 -COBJS-y+= at91sam9261_serial.o -COBJS-$(CONFIG_HAS_DATAFLASH) += at91sam9261_spi.o -endif -ifdef CONFIG_AT91SAM9263 -COBJS-$(CONFIG_MACB) += at91sam9263_macb.o -COBJS-y+= at91sam9263_serial.o -COBJS-$(CONFIG_HAS_DATAFLASH) += at91sam9263_spi.o -COBJS-$(CONFIG_USB_OHCI_NEW) += at91sam9263_usb.o -endif -ifdef CONFIG_AT91SAM9RL -COBJS-y+= at91sam9rl_serial.o -COBJS-$(CONFIG_HAS_DATAFLASH) += at91sam9rl_spi.o -endif +COBJS-$(CONFIG_AT91CAP9) += at91cap9_devices.o +COBJS-$(CONFIG_AT91SAM9260)+= at91sam9260_devices.o +COBJS-$(CONFIG_AT91SAM9G20)+= at91sam9260_devices.o +COBJS-$(CONFIG_AT91SAM9261)+= at91sam9261_devices.o +COBJS-$(CONFIG_AT91SAM9263)+= at91sam9263_devices.o +COBJS-$(CONFIG_AT91SAM9RL) += at91sam9rl_devices.o COBJS-$(CONFIG_AT91_LED) += led.o COBJS-y += clock.o COBJS-y += cpu.o diff --git a/cpu/arm926ejs/at91/at91cap9_devices.c b/cpu/arm926ejs/at91/at91cap9_devices.c new file mode 100644 index 000..c0024ac --- /dev/null +++ b/cpu/arm926ejs/at91/at91cap9_devices.c @@ -0,0 +1,176 @@ +/* + * (C) Copyright 2007-2008 + * Stelian Pop stelian@leadtechdesign.com + * Lead Tech Design www.leadtechdesign.com + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY;
Re: [U-Boot] [PATCH 01/10] mx27: basic cpu support
Hi Wolfgang, Wolfgang Denk wrote: +static ulong clk_in_26m(void) +{ +if (CSCR CSCR_OSC26M_DIV1P5) { +/* divide by 1.5 */ +return 2600 / 1.5; We definitely do not allow any FP use in U-Boot. This will be actually converted to an integer at the compile time. +void imx_gpio_mode(int gpio_mode) +{ +unsigned int pin = gpio_mode GPIO_PIN_MASK; +unsigned int port = (gpio_mode GPIO_PORT_MASK) GPIO_PORT_SHIFT; +unsigned int ocr = (gpio_mode GPIO_OCR_MASK) GPIO_OCR_SHIFT; +unsigned int aout = (gpio_mode GPIO_AOUT_MASK) GPIO_AOUT_SHIFT; +unsigned int bout = (gpio_mode GPIO_BOUT_MASK) GPIO_BOUT_SHIFT; +unsigned int tmp; + +/* Pullup enable */ +if(gpio_mode GPIO_PUEN) +PUEN(port) |= (1 pin); +else +PUEN(port) = ~(1 pin); This smells as if these were pointer accesses using register offsets instead of I/O accessor calls using C structs? Ok, I really like using accessor calls instead of pointer accesses but I don't really understand the reason for using C structs here... I remember I've already asked you about that and you told me that it's for type safety... But we loose this type-safety when we are using I/O accessor functions! All pointers are just silently converted to the needed type... On the other hand Linux uses offsets for registers definitions so converting them to C structs makes porting and maintaining ported drivers harder... You probably want to use the respective clrbits*() / setbits*() macros here? I can see these macros defined only for ppc arch... And I really prefer generic writel(readl() | something) here... The reason is the same: to preserve as much code as it possible in drivers ported from Linux. +#define IMX_IO_BASE 0x1000 + +#define IMX_AIPI1_BASE (0x0 + IMX_IO_BASE) +#define IMX_WDT_BASE (0x02000 + IMX_IO_BASE) +#define IMX_TIM1_BASE (0x03000 + IMX_IO_BASE) +#define IMX_TIM2_BASE (0x04000 + IMX_IO_BASE) +#define IMX_TIM3_BASE (0x05000 + IMX_IO_BASE) +#define IMX_UART1_BASE (0x0a000 + IMX_IO_BASE) +#define IMX_UART2_BASE (0x0b000 + IMX_IO_BASE) +#define IMX_UART3_BASE (0x0c000 + IMX_IO_BASE) +#define IMX_UART4_BASE (0x0d000 + IMX_IO_BASE) +#define IMX_I2C1_BASE (0x12000 + IMX_IO_BASE) +#define IMX_GPIO_BASE (0x15000 + IMX_IO_BASE) +#define IMX_TIM4_BASE (0x19000 + IMX_IO_BASE) +#define IMX_TIM5_BASE (0x1a000 + IMX_IO_BASE) +#define IMX_UART5_BASE (0x1b000 + IMX_IO_BASE) +#define IMX_UART6_BASE (0x1c000 + IMX_IO_BASE) +#define IMX_I2C2_BASE (0x1D000 + IMX_IO_BASE) +#define IMX_TIM6_BASE (0x1f000 + IMX_IO_BASE) +#define IMX_AIPI2_BASE (0x2 + IMX_IO_BASE) +#define IMX_PLL_BASE (0x27000 + IMX_IO_BASE) +#define IMX_SYSTEM_CTL_BASE(0x27800 + IMX_IO_BASE) +#define IMX_IIM_BASE (0x28000 + IMX_IO_BASE) +#define IMX_FEC_BASE (0x2b000 + IMX_IO_BASE) NAK. We do not accept device I/O through pointers; please use C structs to describe the hardware and use I/O accessor calls. These are actually base addresses. I don't think we can make use of C structs here. Regards, Ilya. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH 1/2] sh: make lds more generic
currently the sh lds need to sync the lds enty and TEXT_BASE manualy and the reloc_dst is based on it instead provide it now from the ldflags tested on r2dplus Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Cc: Nobuhiro Iwamatsu iwamatsu.nobuh...@renesas.com --- board/mpr2/u-boot.lds | 13 +++-- board/ms7720se/u-boot.lds | 15 +++ board/ms7722se/u-boot.lds | 15 +++ board/ms7750se/u-boot.lds | 15 +++ board/renesas/MigoR/u-boot.lds | 15 +++ board/renesas/ap325rxa/u-boot.lds | 15 +++ board/renesas/r2dplus/u-boot.lds | 15 +++ board/renesas/r7780mp/u-boot.lds | 15 +++ board/renesas/rsk7203/u-boot.lds | 10 ++ board/renesas/sh7763rdp/u-boot.lds | 15 +++ board/renesas/sh7785lcr/u-boot.lds |7 --- sh_config.mk |1 + 12 files changed, 34 insertions(+), 117 deletions(-) diff --git a/board/mpr2/u-boot.lds b/board/mpr2/u-boot.lds index deae344..4180522 100644 --- a/board/mpr2/u-boot.lds +++ b/board/mpr2/u-boot.lds @@ -34,16 +34,9 @@ ENTRY(_start) SECTIONS { /* - Base address of internal SDRAM is 0x8C00. - U-Boot resides in the last 256 kB of the 64 MB. - - NOTE: This address must match with the definition of - TEXT_BASE in config.mk (in this directory). - - */ - . = 0x8C00 + (64*1024*1024) - (256*1024); - - PROVIDE (reloc_dst = .); +* entry and reloct_dst will be provide by command line +*/ + . = .; PROVIDE (_ftext = .); PROVIDE (_fcode = .); diff --git a/board/ms7720se/u-boot.lds b/board/ms7720se/u-boot.lds index 1f9b792..7f8 100644 --- a/board/ms7720se/u-boot.lds +++ b/board/ms7720se/u-boot.lds @@ -31,18 +31,9 @@ ENTRY(_start) SECTIONS { /* - Base address of internal SDRAM is 0x0C00. - Although size of SDRAM can be either 16 or 32 MBytes, - we assume 16 MBytes (ie ignore upper half if the full - 32 MBytes is present). - - NOTE: This address must match with the definition of - TEXT_BASE in config.mk (in this directory). - - */ - . = 0x8C00 + (64*1024*1024) - (256*1024); - - PROVIDE (reloc_dst = .); +* entry and reloct_dst will be provide by command line +*/ + . = .; PROVIDE (_ftext = .); PROVIDE (_fcode = .); diff --git a/board/ms7722se/u-boot.lds b/board/ms7722se/u-boot.lds index 7b0fb67..db3741c 100644 --- a/board/ms7722se/u-boot.lds +++ b/board/ms7722se/u-boot.lds @@ -28,18 +28,9 @@ ENTRY(_start) SECTIONS { /* - Base address of internal SDRAM is 0x0C00. - Although size of SDRAM can be either 16 or 32 MBytes, - we assume 16 MBytes (ie ignore upper half if the full - 32 MBytes is present). - - NOTE: This address must match with the definition of - TEXT_BASE in config.mk (in this directory). - - */ - . = 0x8C00 + (64*1024*1024) - (256*1024); - - PROVIDE (reloc_dst = .); +* entry and reloct_dst will be provide by command line +*/ + . = .; PROVIDE (_ftext = .); PROVIDE (_fcode = .); diff --git a/board/ms7750se/u-boot.lds b/board/ms7750se/u-boot.lds index 7b0fb67..db3741c 100644 --- a/board/ms7750se/u-boot.lds +++ b/board/ms7750se/u-boot.lds @@ -28,18 +28,9 @@ ENTRY(_start) SECTIONS { /* - Base address of internal SDRAM is 0x0C00. - Although size of SDRAM can be either 16 or 32 MBytes, - we assume 16 MBytes (ie ignore upper half if the full - 32 MBytes is present). - - NOTE: This address must match with the definition of - TEXT_BASE in config.mk (in this directory). - - */ - . = 0x8C00 + (64*1024*1024) - (256*1024); - - PROVIDE (reloc_dst = .); +* entry and reloct_dst will be provide by command line +*/ + . = .; PROVIDE (_ftext = .); PROVIDE (_fcode = .); diff --git a/board/renesas/MigoR/u-boot.lds b/board/renesas/MigoR/u-boot.lds index c004b83..9b83cad 100644 --- a/board/renesas/MigoR/u-boot.lds +++ b/board/renesas/MigoR/u-boot.lds @@ -28,18 +28,9 @@ ENTRY(_start) SECTIONS { /* - Base address of internal SDRAM is 0x0C00. - Although size of SDRAM can be either 16 or 32 MBytes, - we assume 16 MBytes (ie ignore upper half if the full - 32 MBytes is present). - - NOTE: This address must match with the definition of - TEXT_BASE in config.mk (in this directory). - - */ - . = 0x8C00 + (64*1024*1024) - (256*1024); - - PROVIDE (reloc_dst = .); +* entry and reloct_dst will be provide by command line +*/ + . = .; PROVIDE (_ftext = .); PROVIDE (_fcode = .);
[U-Boot] [RFC PATCH 2/2] sh: unify lds
all sh boards use the same cpu lds so move it to cpu/$(CPU) that could be overwrite in following order SOC BOARD via the corresponding config.mk tested on r2dplus Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Cc: Nobuhiro Iwamatsu iwamatsu.nobuh...@renesas.com --- board/ms7722se/u-boot.lds | 96 board/ms7750se/u-boot.lds | 96 board/renesas/MigoR/u-boot.lds| 96 board/renesas/ap325rxa/u-boot.lds | 96 board/renesas/r2dplus/u-boot.lds | 96 board/renesas/r7780mp/u-boot.lds | 96 board/renesas/sh7763rdp/u-boot.lds| 96 board/renesas/sh7785lcr/u-boot.lds| 97 - {board/renesas/rsk7203 = cpu/sh2}/u-boot.lds |0 {board/mpr2 = cpu/sh3}/u-boot.lds|0 {board/ms7720se = cpu/sh4}/u-boot.lds| 12 ++-- sh_config.mk |2 + 12 files changed, 8 insertions(+), 775 deletions(-) delete mode 100644 board/ms7722se/u-boot.lds delete mode 100644 board/ms7750se/u-boot.lds delete mode 100644 board/renesas/MigoR/u-boot.lds delete mode 100644 board/renesas/ap325rxa/u-boot.lds delete mode 100644 board/renesas/r2dplus/u-boot.lds delete mode 100644 board/renesas/r7780mp/u-boot.lds delete mode 100644 board/renesas/sh7763rdp/u-boot.lds delete mode 100644 board/renesas/sh7785lcr/u-boot.lds rename {board/renesas/rsk7203 = cpu/sh2}/u-boot.lds (100%) rename {board/mpr2 = cpu/sh3}/u-boot.lds (100%) rename {board/ms7720se = cpu/sh4}/u-boot.lds (95%) diff --git a/board/ms7722se/u-boot.lds b/board/ms7722se/u-boot.lds deleted file mode 100644 index db3741c..000 --- a/board/ms7722se/u-boot.lds +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyrigth (c) 2007 - * Nobuhiro Iwamatsu iwama...@nigauri.org - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -OUTPUT_FORMAT(elf32-sh-linux, elf32-sh-linux, elf32-sh-linux) -OUTPUT_ARCH(sh) -ENTRY(_start) - -SECTIONS -{ - /* -* entry and reloct_dst will be provide by command line -*/ - . = .; - - PROVIDE (_ftext = .); - PROVIDE (_fcode = .); - PROVIDE (_start = .); - - .text : - { - cpu/sh4/start.o (.text) - . = ALIGN(8192); - common/env_embedded.o (.ppcenv) - . = ALIGN(8192); - common/env_embedded.o (.ppcenvr) - . = ALIGN(8192); - *(.text) - . = ALIGN(4); - } =0xFF - PROVIDE (_ecode = .); - .rodata : - { - *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) - . = ALIGN(4); - } - PROVIDE (_etext = .); - - - PROVIDE (_fdata = .); - .data : - { - *(.data) - . = ALIGN(4); - } - PROVIDE (_edata = .); - - PROVIDE (_fgot = .); - .got : - { - *(.got) - . = ALIGN(4); - } - PROVIDE (_egot = .); - - PROVIDE (__u_boot_cmd_start = .); - .u_boot_cmd : - { - *(.u_boot_cmd) - . = ALIGN(4); - } - PROVIDE (__u_boot_cmd_end = .); - - PROVIDE (reloc_dst_end = .); - /* _reloc_dst_end = .; */ - - PROVIDE (bss_start = .); - PROVIDE (__bss_start = .); - .bss (NOLOAD) : - { - *(.bss) - . = ALIGN(4); - } - PROVIDE (bss_end = .); - - PROVIDE (_end = .); -} diff --git a/board/ms7750se/u-boot.lds b/board/ms7750se/u-boot.lds deleted file mode 100644 index db3741c..000 --- a/board/ms7750se/u-boot.lds +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyrigth (c) 2007 - * Nobuhiro Iwamatsu iwama...@nigauri.org - * - * 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
[U-Boot] [PATCH v5] mtd: nand: new base driver for memory mapped nand devices
The BF537-STAMP Blackfin board had a driver for working with NAND devices that are simply memory mapped. Since there is nothing Blackfin specific about this, generalize the driver a bit so that everyone can leverage it. Signed-off-by: Mike Frysinger vap...@gentoo.org Signed-off-by: Scott Wood scottw...@freescale.com --- v5 - fix one more I/O usage board/bf537-stamp/Makefile|1 - board/bf537-stamp/nand.c | 100 - drivers/mtd/nand/Makefile |1 + drivers/mtd/nand/nand_plat.c | 53 +++ include/configs/bf537-stamp.h | 44 +++-- include/configs/bfin_adi_common.h |3 + 6 files changed, 75 insertions(+), 127 deletions(-) delete mode 100644 board/bf537-stamp/nand.c create mode 100644 drivers/mtd/nand/nand_plat.c diff --git a/board/bf537-stamp/Makefile b/board/bf537-stamp/Makefile index 1dbf406..6da04e3 100644 --- a/board/bf537-stamp/Makefile +++ b/board/bf537-stamp/Makefile @@ -32,7 +32,6 @@ LIB = $(obj)lib$(BOARD).a COBJS-y:= $(BOARD).o cmd_bf537led.o COBJS-$(CONFIG_BFIN_IDE) += ide-cf.o COBJS-$(CONFIG_CMD_EEPROM) += spi_flash.o -COBJS-$(CONFIG_CMD_NAND) += nand.o COBJS-$(CONFIG_POST) += post.o post-memory.o SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) diff --git a/board/bf537-stamp/nand.c b/board/bf537-stamp/nand.c deleted file mode 100644 index 181e83d..000 --- a/board/bf537-stamp/nand.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2006-2007 Analog Devices Inc. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -#include common.h -#include asm/io.h - -#include nand.h - -#define CONCAT(a,b,c,d) a ## b ## c ## d -#define PORT(a,b) CONCAT(pPORT,a,b,) - -#ifndef CONFIG_NAND_GPIO_PORT -#define CONFIG_NAND_GPIO_PORT F -#endif - -/* - * hardware specific access to control-lines - */ -static void bfin_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl) -{ - register struct nand_chip *this = mtd-priv; - u32 IO_ADDR_W = (u32) this-IO_ADDR_W; - - if (ctrl NAND_CTRL_CHANGE) { - if (ctrl NAND_CLE) - IO_ADDR_W = CONFIG_SYS_NAND_BASE + BFIN_NAND_CLE; - else - IO_ADDR_W = CONFIG_SYS_NAND_BASE; - if (ctrl NAND_ALE) - IO_ADDR_W = CONFIG_SYS_NAND_BASE + BFIN_NAND_ALE; - else - IO_ADDR_W = CONFIG_SYS_NAND_BASE; - this-IO_ADDR_W = (void __iomem *) IO_ADDR_W; - } - this-IO_ADDR_R = this-IO_ADDR_W; - - /* Drain the writebuffer */ - SSYNC(); - - if (cmd != NAND_CMD_NONE) - writeb(cmd, this-IO_ADDR_W); -} - -int bfin_device_ready(struct mtd_info *mtd) -{ - int ret = (*PORT(CONFIG_NAND_GPIO_PORT, IO) BFIN_NAND_READY) ? 1 : 0; - SSYNC(); - return ret; -} - -/* - * Board-specific NAND initialization. The following members of the - * argument are board-specific (per include/linux/mtd/nand.h): - * - IO_ADDR_R?: address to read the 8 I/O lines of the flash device - * - IO_ADDR_W?: address to write the 8 I/O lines of the flash device - * - cmd_ctrl: hardwarespecific function for accesing control-lines - * - dev_ready: hardwarespecific function for accesing device ready/busy line - * - enable_hwecc?: function to enable (reset) hardware ecc generator. Must - * only be provided if a hardware ECC is available - * - ecc.mode: mode of ecc, see defines - * - chip_delay: chip dependent delay for transfering data from array to - * read regs (tR) - * - options: various chip options. They can partly be set to inform - * nand_scan about special functionality. See the defines for further - * explanation - * Members with a ? were not set in the merged testing-NAND branch, - * so they are not set here either. - */ -int board_nand_init(struct nand_chip *nand) -{ - *PORT(CONFIG_NAND_GPIO_PORT, _FER) = ~BFIN_NAND_READY; - *PORT(CONFIG_NAND_GPIO_PORT, IO_DIR) = ~BFIN_NAND_READY; - *PORT(CONFIG_NAND_GPIO_PORT, IO_INEN) |= BFIN_NAND_READY; - - nand-cmd_ctrl = bfin_hwcontrol; - nand-ecc.mode = NAND_ECC_SOFT; - nand-dev_ready = bfin_device_ready; -
[U-Boot] map mtd partitions address for TWO NOR flash
Hi guys: I have a mpc8313erbd (powerpc arch) demo board. There are one NOR flash and one NAND flash on board. The drivers/mtd/map/mpc8313erbd.c do address map for NOR flash. I want to add another NOR flash and take off the NAND flash. So there are two NOR flash on board. I am trying to do address map for two NOR flash but I don't know how to. Some part of drivers/mtd/map/mpc8313erbd.c code is as following: Do I need to add another mtd_partition structure ? How to assign the partition_info to specific NOR flash (coz the two NOR flash are the same) BTW, I know u-boot can pass the mtdparts parameters to linux kernel. Which mtd partition info linux kernel will use, u-boot mtdparts info or static address map code ? thanks, regards. static struct mtd_partition partition_info[]={ { .name= U-Boot, .offset = 0, .size= 0x10, .mask_flags = MTD_WRITEABLE }, { .name= Kernel, .offset= MTDPART_OFS_APPEND, .size= 0x20 }, { .name= JFFS2, .offset= MTDPART_OFS_APPEND, .size= 0x40, }, { .name= dtb, .offset= MTDPART_OFS_APPEND, .size= 0x10, }, }; -- [To be different, do different. To be appear different, change the name.] H. Johnny ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] cmd_ide: Fix detection problem with missing devices
Currently only IDE busses are probed and all possible available devices are listed in the IDE bootup log. Even when devices on the bus are not available. This leads to the following output on the CPCI750: IDE: Bus 0: OK Bus 1: OK Device 0: Model: HITACHI_DK23FA-20J Firm: 00M7A0A0 Ser#: 42D182 Type: Hard Disk Capacity: 19077.1 MB = 18.6 GB (39070080 x 512) Device 1: Model: Firm: Ser#: Type: # 1F # Capacity: not available Device 2: Model: SanDisk SDCFB-128 Firm: vde 1.10 Ser#: gmo5i311404 Type: Removable Hard Disk Capacity: 122.5 MB = 0.1 GB (250880 x 512) Device 3: Model: Firm: Ser#: Type: # 1F # Capacity: not available Here devices 1 + 3 are listed which are not availble. This patch now fixes this problem by skipping the device output for non-available devices. This is the resulting log: IDE: Bus 0: OK Bus 1: OK Device 0: Model: HITACHI_DK23FA-20J Firm: 00M7A0A0 Ser#: 42D182 Type: Hard Disk Capacity: 19077.1 MB = 18.6 GB (39070080 x 512) Device 1: not available Device 2: Model: SanDisk SDCFB-128 Firm: vde 1.10 Ser#: gmo5i311404 Type: Removable Hard Disk Capacity: 122.5 MB = 0.1 GB (250880 x 512) Device 3: not available Signed-off-by: Stefan Roese s...@denx.de --- common/cmd_ide.c | 21 ++--- 1 files changed, 14 insertions(+), 7 deletions(-) diff --git a/common/cmd_ide.c b/common/cmd_ide.c index 71db933..7f9217d 100644 --- a/common/cmd_ide.c +++ b/common/cmd_ide.c @@ -154,7 +154,7 @@ static void ide_reset(void); #define ide_reset()/* dummy */ #endif -static void ide_ident(block_dev_desc_t *dev_desc); +static int ide_ident(block_dev_desc_t *dev_desc); static uchar ide_wait(int dev, ulong t); #define IDE_TIME_OUT 2000/* 2 sec timeout */ @@ -714,6 +714,7 @@ skip_bus: curr_device = -1; for (i = 0; i CONFIG_SYS_IDE_MAXDEVICE; ++i) { + int ret; #ifdef CONFIG_IDE_LED int led = (IDE_BUS(i) == 0) ? LED_IDE1 : LED_IDE2; #endif @@ -727,8 +728,12 @@ skip_bus: if (!ide_bus_ok[IDE_BUS(i)]) continue; ide_led(led, 1);/* LED on */ - ide_ident(ide_dev_desc[i]); + ret = ide_ident(ide_dev_desc[i]); ide_led(led, 0);/* LED off */ + if (ret 0) { + puts(not available\n); + continue; + } dev_print(ide_dev_desc[i]); if ((ide_dev_desc[i].lba 0) (ide_dev_desc[i].blksz 0)) { init_part(ide_dev_desc[i]);/* initialize partition type */ @@ -987,7 +992,7 @@ static void input_data(int dev, ulong *sect_buf, int words) /* - */ -static void ide_ident(block_dev_desc_t *dev_desc) +static int ide_ident(block_dev_desc_t *dev_desc) { ulong iobuf[ATA_SECTORWORDS]; unsigned char c; @@ -1018,7 +1023,7 @@ static void ide_ident(block_dev_desc_t *dev_desc) max_bus_scan = CONFIG_SYS_IDE_MAXBUS; if (device = max_bus_scan * 2) { dev_desc-type = DEV_TYPE_UNKNOWN; - return; + return -1; } #endif @@ -1087,7 +1092,7 @@ static void ide_ident(block_dev_desc_t *dev_desc) ATA_LBA | ATA_DEVICE(device)); retries++; #else - return; + return -1; #endif } #ifdef CONFIG_ATAPI @@ -1096,7 +1101,7 @@ static void ide_ident(block_dev_desc_t *dev_desc) } /* see above - ugly to read */ if (retries == 2) /* Not found */ - return; + return -1; #endif input_swap_data(device, iobuf, ATA_SECTORWORDS); @@ -1161,7 +1166,7 @@ static void ide_ident(block_dev_desc_t *dev_desc) #ifdef CONFIG_ATAPI if (dev_desc-if_type == IF_TYPE_ATAPI) { atapi_inquiry(dev_desc); - return; + return 0; } #endif /* CONFIG_ATAPI */ @@ -1193,6 +1198,8 @@ static void ide_ident(block_dev_desc_t *dev_desc) dev_desc-type = DEV_TYPE_HARDDISK; dev_desc-blksz = ATA_BLOCKSIZE; dev_desc-lun = 0; /* just to fill something in... */ + + return 0; } /* - */ -- 1.6.2.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] 74xx_7xx: Fix rounding problem in CPU frequency calculation
This patch fixes a problem in the CPU frequency calculation. Without it a 798MHz CPU is displayed as 368.503 MHz. And with it it's 798 MHz. Signed-off-by: Stefan Roese s...@denx.de --- cpu/74xx_7xx/speed.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/74xx_7xx/speed.c b/cpu/74xx_7xx/speed.c index bc33a67..f2fdcd5 100644 --- a/cpu/74xx_7xx/speed.c +++ b/cpu/74xx_7xx/speed.c @@ -149,8 +149,8 @@ int get_clocks (void) case CPU_750GX: case CPU_750FX: - clock = gd-bus_clk * - hid1_fx_multipliers_x_10[get_hid1 () 27] / 10; + clock = (gd-bus_clk / 10) * + hid1_fx_multipliers_x_10[get_hid1 () 27]; break; case CPU_7450: -- 1.6.2.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] video: ct6900: Add an option to skip video initialization
This patch adds an option to skip the video initialization on the ct6900. This is needed for the CPCI750 which can be built as CPCI host and adapter/target board. And the adapter board can't access the video cards. Signed-off-by: Stefan Roese s...@denx.de Cc: Anatolij Gustschin ag...@denx.de --- drivers/video/ct69000.c | 16 +++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/drivers/video/ct69000.c b/drivers/video/ct69000.c index ae219cc..6a5243b 100644 --- a/drivers/video/ct69000.c +++ b/drivers/video/ct69000.c @@ -964,6 +964,16 @@ static struct pci_device_id supported[] = { {} }; +/* + * Implement a weak default function for boards that optionally + * need to skip the video initialization. + */ +int __board_video_skip(void) +{ + return 0; +} +int board_video_skip(void) __attribute__((weak, alias(__board_video_skip))); + /*** * * Init video chip @@ -982,8 +992,12 @@ video_hw_init (void) struct ctfb_res_modes *res_mode; struct ctfb_res_modes var_mode; struct ctfb_chips_properties *chips_param; - /* Search for video chip */ + /* Check if video initialization should be skipped */ + if (board_video_skip()) + return NULL; + + /* Search for video chip */ if ((devbusfn = pci_find_devices (supported, 0)) 0) { #ifdef CONFIG_VIDEO_ONBOARD printf (Video: Controller not found !\n); -- 1.6.2.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] 74xx_7xx: Add CPCI adapter/target support for the CPCI750
The CPCI750 can be built as CPCI host or adapter/target board. This patch adds support for runtime detection of those variants. Signed-off-by: Stefan Roese s...@denx.de Cc: Reinhard Arlt reinhard.a...@esd-electronics.com --- board/esd/cpci750/cpci750.c | 108 +++ board/esd/cpci750/ide.c |4 +- board/esd/cpci750/pci.c | 57 -- include/configs/CPCI750.h |5 ++- 4 files changed, 147 insertions(+), 27 deletions(-) diff --git a/board/esd/cpci750/cpci750.c b/board/esd/cpci750/cpci750.c index 4826633..6641304 100644 --- a/board/esd/cpci750/cpci750.c +++ b/board/esd/cpci750/cpci750.c @@ -122,6 +122,9 @@ static char show_config_tab[][15] = {{PCI0DLL_2 }, /* 31 */ extern flash_info_t flash_info[]; +extern int do_bootm (cmd_tbl_t *, int, int, char *[]); +extern int do_bootvx (cmd_tbl_t *, int, int, char *[]); + /* - */ /* this is the current GT register space location */ @@ -137,6 +140,15 @@ void board_prebootm_init (void); unsigned int INTERNAL_REG_BASE_ADDR = CONFIG_SYS_GT_REGS; int display_mem_map (void); +/* + * Skip video initialization on slave variant. + * This function will overwrite the weak default in ct6900.c + */ +int board_video_skip(void) +{ + return CPCI750_SLAVE_TEST; +} + /* - */ /* @@ -184,6 +196,7 @@ original ppcboot 1.1.6 source end */ static void gt_pci_config (void) { unsigned int stat; + unsigned int data; unsigned int val = 0x00fff864; /* DINK32: BusNum 23:16, DevNum 15:11, FuncNum 10:8, RegNum 7:2 */ /* In PCIX mode devices provide their own bus and device numbers. We query the Discovery II's @@ -251,10 +264,11 @@ static void gt_pci_config (void) /*ronen update the pci internal registers base address.*/ #ifdef MAP_PCI - for (stat = 0; stat = PCI_HOST1; stat++) - pciWriteConfigReg (stat, - PCI_INTERNAL_REGISTERS_MEMORY_MAPPED_BASE_ADDRESS, - SELF, CONFIG_SYS_GT_REGS); + for (stat = 0; stat = PCI_HOST1; stat++) { + data = pciReadConfigReg(stat, PCI_INTERNAL_REGISTERS_MEMORY_MAPPED_BASE_ADDRESS, SELF); + data = (data 0x0f) | CONFIG_SYS_GT_REGS; + pciWriteConfigReg (stat, PCI_INTERNAL_REGISTERS_MEMORY_MAPPED_BASE_ADDRESS, SELF, data); + } #endif } @@ -448,13 +462,16 @@ int misc_init_r () void after_reloc (ulong dest_addr, gd_t * gd) { + memoryMapDeviceSpace (BOOT_DEVICE, CONFIG_SYS_BOOT_SPACE, + CONFIG_SYS_BOOT_SIZE); - memoryMapDeviceSpace (BOOT_DEVICE, CONFIG_SYS_BOOT_SPACE, CONFIG_SYS_BOOT_SIZE); + display_mem_map (); + GT_REG_WRITE (PCI_0BASE_ADDRESS_REGISTERS_ENABLE, 0xfdfe); + GT_REG_WRITE (PCI_1BASE_ADDRESS_REGISTERS_ENABLE, 0xfdfe); - display_mem_map (); - /* now, jump to the main ppcboot board init code */ - board_init_r (gd, dest_addr); - /* NOTREACHED */ + /* now, jump to the main ppcboot board init code */ + board_init_r (gd, dest_addr); + /* NOTREACHED */ } /* - */ @@ -538,6 +555,79 @@ int display_mem_map (void) return (0); } +/* + * Command loadpci: wait for signal from host and boot image. + */ +int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +{ + volatile unsigned int *ptr; + int count = 0; + int count2 = 0; + int status; + char addr[16]; + char str[] = \\|/-; + char *local_args[2]; + + /* +* Mark sync address +*/ + ptr = 0; + ptr[0] = 0x; + ptr[1] = 0x; + puts(\nWaiting for image from pci host -); + + /* +* Wait for host to write the start address +*/ + while (*ptr == 0x) { + count++; + if (!(count % 100)) { + count2++; + putc(0x08); /* backspace */ + putc(str[count2 % 4]); + } + + /* Abort if ctrl-c was pressed */ + if (ctrlc()) { + puts(\nAbort\n); + return 0; + } + + udelay(1000); + } + + sprintf(addr, %08x, *ptr); + printf(\nBooting Image at addr 0x%s ...\n, addr); + setenv(loadaddr, addr); + + switch (ptr[1] == 0) { + case 0: + /* +* Boot image via bootm +*/ + local_args[0] = argv[0]; + local_args[1] = NULL; + status = do_bootm (cmdtp, 0, 1, local_args); + break; + case 1: + /* +* Boot image via bootvx +*/ +