[U-Boot] SD-Card boot from SPI SD-Card
I have a Coldfire MCF5235 Board and I want to boot the uclinux direct from the sd-card connected to the spi-bus. Is that possible ? What do I have to configure ? Any driver to write ? Regards Wilfried ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] OMAP3:SDRC: Cleanup references to SDP
Remove SDP referenced unused defines Signed-off-by: Nishanth Menon --- cpu/arm_cortexa8/omap3/mem.c |2 +- cpu/arm_cortexa8/omap3/sys_info.c |2 +- include/asm-arm/arch-omap3/mem.h | 11 ++- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/cpu/arm_cortexa8/omap3/mem.c b/cpu/arm_cortexa8/omap3/mem.c index 5e6d542..dfb7e4c 100644 --- a/cpu/arm_cortexa8/omap3/mem.c +++ b/cpu/arm_cortexa8/omap3/mem.c @@ -161,7 +161,7 @@ void do_sdrc_init(u32 cs, u32 early) writel(0, &sdrc_base->sysconfig); /* setup sdrc to ball mux */ - writel(SDP_SDRC_SHARING, &sdrc_base->sharing); + writel(SDRC_SHARING, &sdrc_base->sharing); /* Disable Power Down of CKE cuz of 1 CKE on combo part */ writel(WAKEUPPROC | PWDNEN | SRFRONRESET | PAGEPOLICY_HIGH, diff --git a/cpu/arm_cortexa8/omap3/sys_info.c b/cpu/arm_cortexa8/omap3/sys_info.c index 31b2003..08fb32e 100644 --- a/cpu/arm_cortexa8/omap3/sys_info.c +++ b/cpu/arm_cortexa8/omap3/sys_info.c @@ -109,7 +109,7 @@ u32 get_cpu_rev(void) / u32 is_mem_sdr(void) { - if (readl(&sdrc_base->cs[CS0].mr) == SDP_SDRC_MR_0_SDR) + if (readl(&sdrc_base->cs[CS0].mr) == SDRC_MR_0_SDR) return 1; return 0; } diff --git a/include/asm-arm/arch-omap3/mem.h b/include/asm-arm/arch-omap3/mem.h index 31cbdef..3ef8478 100644 --- a/include/asm-arm/arch-omap3/mem.h +++ b/include/asm-arm/arch-omap3/mem.h @@ -40,11 +40,8 @@ enum { #define EARLY_INIT 1 /* Slower full frequency range default timings for x32 operation*/ -#define SDP_SDRC_SHARING 0x0100 -#define SDP_SDRC_MR_0_SDR 0x0031 - -/* optimized timings good for current shipping parts */ -#define SDP_3430_SDRC_RFR_CTRL_165MHz 0x0004e201 /* 7.8us/6ns - 50=0x4e2 */ +#define SDRC_SHARING 0x0100 +#define SDRC_MR_0_SDR 0x0031 #define DLL_OFFSET 0 #define DLL_WRITEDDRCLKX2DIS 1 @@ -91,10 +88,6 @@ enum { #define V_ACTIMB_165 (((TCKE_165 << 12) | (XSR_165 << 0)) | \ (TXP_165 << 8) | (TWTR_165 << 16)) -#define SDP_SDRC_ACTIM_CTRLA_0 V_ACTIMA_165 -#define SDP_SDRC_ACTIM_CTRLB_0 V_ACTIMB_165 -#define SDP_SDRC_RFR_CTRL SDP_3430_SDRC_RFR_CTRL_165MHz - /* * GPMC settings - * Definitions is as per the following format -- 1.6.3.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] OMAP3:SDRC: introduce DDR types
Micron DDR timings based on: http://www.sakoman.net/cgi-bin/gitweb.cgi?p=x-load-omap3.git;a=blob;f=include/asm/arch-omap3/mem.h;h=e6fbfe3947f5d0d85fea776e30821d4017316d86;hb=HEAD Introduce Micron DDR timings and provide CONFIG_OMAP3_INFINEON_DDR and CONFIG_OMAP3_MICRON_DDR config options to allow for platform files to setup their timings as per the type of DDR selected Reported-by: Steve Sakoman in http://www.nabble.com/forum/Permalink.jtp?root=25779518&post=25959734&page=y Signed-off-by: Nishanth Menon --- include/asm-arm/arch-omap3/mem.h | 88 ++ include/configs/devkit8000.h |3 + include/configs/omap3_beagle.h |3 + include/configs/omap3_evm.h |3 + include/configs/omap3_overo.h|3 + include/configs/omap3_pandora.h |3 + include/configs/omap3_sdp3430.h |3 + include/configs/omap3_zoom1.h|3 + include/configs/omap3_zoom2.h|3 + 9 files changed, 94 insertions(+), 18 deletions(-) diff --git a/include/asm-arm/arch-omap3/mem.h b/include/asm-arm/arch-omap3/mem.h index 3ef8478..ae06a14 100644 --- a/include/asm-arm/arch-omap3/mem.h +++ b/include/asm-arm/arch-omap3/mem.h @@ -68,26 +68,78 @@ enum { * TCKE = 2 * XSR = 120/6 = 20 */ -#define TDAL_165 6 -#define TDPL_165 3 -#define TRRD_165 2 -#define TRCD_165 3 -#define TRP_1653 -#define TRAS_165 7 -#define TRC_16510 -#define TRFC_165 12 -#define V_ACTIMA_165 ((TRFC_165 << 27) | (TRC_165 << 22) | \ - (TRAS_165 << 18) | (TRP_165 << 15) | \ - (TRCD_165 << 12) | (TRRD_165 << 9) | \ - (TDPL_165 << 6) | (TDAL_165)) - -#define TWTR_165 1 -#define TCKE_165 2 -#define TXP_1652 -#define XSR_16520 -#define V_ACTIMB_165 (((TCKE_165 << 12) | (XSR_165 << 0)) | \ - (TXP_165 << 8) | (TWTR_165 << 16)) +#define INFINEON_TDAL_165 6 +#define INFINEON_TDPL_165 3 +#define INFINEON_TRRD_165 2 +#define INFINEON_TRCD_165 3 +#define INFINEON_TRP_165 3 +#define INFINEON_TRAS_165 7 +#define INFINEON_TRC_165 10 +#define INFINEON_TRFC_165 12 +#define INFINEON_V_ACTIMA_165 ((INFINEON_TRFC_165 << 27) |\ + (INFINEON_TRC_165 << 22) | (INFINEON_TRAS_165 << 18) | \ + (INFINEON_TRP_165 << 15) | (INFINEON_TRCD_165 << 12) | \ + (INFINEON_TRRD_165 << 9) | (INFINEON_TDPL_165 << 6) | \ + (INFINEON_TDAL_165)) +#define INFINEON_TWTR_165 1 +#define INFINEON_TCKE_165 2 +#define INFINEON_TXP_165 2 +#define INFINEON_XSR_165 20 +#define INFINEON_V_ACTIMB_165 ((INFINEON_TCKE_165 << 12) |\ + (INFINEON_XSR_165 << 0) | (INFINEON_TXP_165 << 8) | \ + (INFINEON_TWTR_165 << 16)) + +/* Micron part of 3430 EVM (165MHz optimized) 6.06ns + * ACTIMA + * TDAL = Twr/Tck + Trp/tck= 15/6 + 18 /6 = 2.5 + 3 = 5.5 -> 6 + * TDPL (Twr) = 15/6 = 2.5 -> 3 + * TRRD= 12/6 = 2 + * TRCD= 18/6 = 3 + * TRP = 18/6 = 3 + * TRAS= 42/6 = 7 + * TRC = 60/6 = 10 + * TRFC= 125/6 = 21 + * ACTIMB + * TWTR= 1 + * TCKE= 1 + * TXSR= 138/6 = 23 + * TXP = 25/6 = 4.1 ~5 + */ +#define MICRON_TDAL_1656 +#define MICRON_TDPL_1653 +#define MICRON_TRRD_1652 +#define MICRON_TRCD_1653 +#define MICRON_TRP_165 3 +#define MICRON_TRAS_1657 +#define MICRON_TRC_165 10 +#define MICRON_TRFC_16521 +#define MICRON_V_ACTIMA_165 ((MICRON_TRFC_165 << 27) | \ + (MICRON_TRC_165 << 22) | (MICRON_TRAS_165 << 18) | \ + (MICRON_TRP_165 << 15) | (MICRON_TRCD_165 << 12) | \ + (MICRON_TRRD_165 << 9) | (MICRON_TDPL_165 << 6) | \ + (MICRON_TDAL_165)) + +#define MICRON_TWTR_1651 +#define MICRON_TCKE_1651 +#define MICRON_XSR_165 23 +#define MICRON_TXP_165 5 +#define MICRON_V_ACTIMB_165 ((MICRON_TCKE_165 << 12) | \ + (MICRON_XSR_165 << 0) | (MICRON_TXP_165 << 8) | \ + (MICRON_TWTR_165 << 16)) + +#ifdef CONFIG_OMAP3_INFINEON_DDR +#define V_ACTIMA_165 INFINEON_V_ACTIMA_165 +#define V_ACTIMB_165 INFINEON_V_ACTIMB_165 +#endif +#ifdef CONFIG_OMAP3_MICRON_DDR +#define V_ACTIMA_165 MICRON_V_ACTIMA_165 +#define V_ACTIMB_165 MICRON_V_ACTIMB_165 +#endif + +#if !defined(V_ACTIMA_165) || !defined(V_ACTIMB_165) +#error "Please choose the right DDR type in config header" +#endif /* * GPMC settings - * Definitions is as per the following format diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h index bd5037e..1011770 10
[U-Boot] [PATCH 0/2] OMAP3:DDR timing cleanup series
Hi, in continuation of the discussion on: http://www.nabble.com/forum/Permalink.jtp?root=25779518&post=25959734&page=y the following patch set should introduce DDR timing changes for MICRON and INFINEON DDRs and allow both classes of boards to live happily together Tested ON: SDP3430 - type INFENINION BeagleBoard - type MICRON tested with mtest 0x8200 0x8300 1 from u-boot prompt Nishanth Menon (2): OMAP3:SDRC: Cleanup references to SDP OMAP3:SDRC: introduce DDR types cpu/arm_cortexa8/omap3/mem.c |2 +- cpu/arm_cortexa8/omap3/sys_info.c |2 +- include/asm-arm/arch-omap3/mem.h | 97 +++-- include/configs/devkit8000.h |3 + include/configs/omap3_beagle.h|3 + include/configs/omap3_evm.h |3 + include/configs/omap3_overo.h |3 + include/configs/omap3_pandora.h |3 + include/configs/omap3_sdp3430.h |3 + include/configs/omap3_zoom1.h |3 + include/configs/omap3_zoom2.h |3 + 11 files changed, 97 insertions(+), 28 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] tools: Use override when cha nging CC, CFLAGS , etc.
On Tuesday 20 October 2009 17:53:58 Scott Wood wrote: > Mike Frysinger wrote: > > On Monday 19 October 2009 17:24:35 Scott Wood wrote: > >> If the user has specified a CC or similar on the command line, that is > >> the cross compiler, not the host compiler. Override is needed to keep > >> these assignments from being ignored in that case. > > > > then again, if we didnt mix host and target variable names, this wouldnt > > be a problem. in a sane world, all of the host stuff would be HOSTXX (or > > BUILDXX). > > I was looking at making static pattern rules to divert host objects to a > host rule, with separate object lists for files that want pedantic and > non-pedantic (leaving the current set of individual file rules would > cause conflicts). > > It seems that nothing in tools/Makefile is using -pedantic or any of the > other HOSTCFLAGS set in tools/Makefile; HOSTCFLAGS is getting > overwritten by config.mk. It looks like maybe this was introduced when > HOST_CFLAGS was changed to HOSTCFLAGS. > > Any thoughts on how to untangle things? What flags to we really want to > use here? Given the number of files that have been exempted, do we > still want to keep the -pedantic stuff around? i dislike -pedantic/-ansi (i find it a waste of time), but i think Wolfgang wants to support older crap having all hostflags be in the top level would be good at any rate rather than duplicating into tools/ ... -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] OneNAND partial read/write support
On Wed, Oct 21, 2009 at 7:48 AM, Scott Wood wrote: > On Mon, Oct 12, 2009 at 04:27:10PM +0900, Kyungmin Park wrote: >> Now OneNAND handles block operation only. >> With this patch OneNAND handles all read/write size. >> >> Signed-off-by: Kyungmin Park >> --- >> diff --git a/common/cmd_onenand.c b/common/cmd_onenand.c >> index 9090940..2b8f01b 100644 >> --- a/common/cmd_onenand.c >> +++ b/common/cmd_onenand.c >> @@ -36,7 +36,7 @@ static inline int str2long(char *p, ulong *num) >> return (*p != '\0' && *endptr == '\0') ? 1 : 0; >> } >> >> -static int arg_off_size(int argc, char *argv[], ulong *off, size_t *size) >> +static int arg_off_size(int argc, char *argv[], ulong *off, ssize_t *size) >> { >> if (argc >= 1) { >> if (!(str2long(argv[0], off))) { > > Are you expecting negative sizes? I don't know why these are implemented. it's existing one. > >> @@ -69,61 +69,65 @@ static int arg_off_size(int argc, char *argv[], ulong >> *off, size_t *size) >> return 0; >> } >> >> -static int onenand_block_read(loff_t from, size_t len, >> - size_t *retlen, u_char *buf, int oob) >> +static int onenand_block_read(loff_t from, ssize_t len, >> + ssize_t *retlen, u_char *buf, int oob) >> { > > Is it still onenand_block_read if you don't have to read a whole block? > >> struct onenand_chip *this = mtd->priv; >> - int blocks = (int) len >> this->erase_shift; >> int blocksize = (1 << this->erase_shift); >> loff_t ofs = from; >> struct mtd_oob_ops ops = { >> .retlen = 0, >> }; >> + ssize_t thislen; >> int ret; >> >> - if (oob) >> - ops.ooblen = blocksize; >> - else >> - ops.len = blocksize; >> + while (len > 0) { >> + thislen = min_t(ssize_t, len, blocksize); >> + thislen = ALIGN(thislen, mtd->writesize); >> >> - while (blocks) { >> ret = mtd->block_isbad(mtd, ofs); >> if (ret) { >> printk("Bad blocks %d at 0x%x\n", >> (u32)(ofs >> this->erase_shift), (u32)ofs); >> - ofs += blocksize; >> + ofs += thislen; >> continue; >> } >> >> - if (oob) >> + if (oob) { >> ops.oobbuf = buf; >> - else >> + ops.ooblen = thislen; >> + } else { >> ops.datbuf = buf; >> + ops.len = thislen; > > thislen can be greater than len, in which case you'll be overflowing buf. No, len is unsigned int, but thislen is int. and can't overflow since. it's size down with blocksize at min macro. > > If you want to allow partial page reads, you need to allocate a temporary > buffer at some point. If not (I don't see a huge need), the ALIGN() > should be an error check instead. > > Does this code handle being given an offset that is not at a block (or > page) boundary? It doesn't look like it (it will try to read across > block boundaries). Basically it reads/writes data based on block. but last or first partial read/writes support. > >> @@ -265,9 +276,10 @@ static int onenand_block_test(u32 start, u32 size) >> goto next; >> } >> >> - if (memcmp(buf, verify_buf, blocksize)) >> + if (memcmp(buf, verify_buf, blocksize)) { >> printk("\nRead/Write test failed at 0x%x\n", (u32)ofs); >> - >> + break; >> + } >> @@ -322,6 +334,7 @@ static int onenand_dump(struct mtd_info *mtd, ulong off, >> int only_oob) >> p += 16; >> } >> puts("OOB:\n"); >> + p = oobbuf; >> i = mtd->oobsize >> 3; >> while (i--) { >> printf("\t%02x %02x %02x %02x %02x %02x %02x %02x\n", >> @@ -339,7 +352,7 @@ int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, >> char *argv[]) >> struct onenand_chip *this; >> int blocksize; >> ulong addr, ofs; >> - size_t len, retlen = 0; >> + ssize_t len, retlen = 0; >> int ret = 0; >> char *cmd, *s; >> >> @@ -385,7 +398,8 @@ int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, >> char *argv[]) >> int erase; >> >> erase = strcmp(cmd, "erase") == 0; /* 1 = erase, 0 = >> test */ >> - printf("\nOneNAND %s: ", erase ? "erase" : "test"); >> + printf("\nOneNAND %s %s: ", erase ? "erase" : "test", >> + force ? "force" : ""); > > These seem to be unrelated changes. Right, but it's for exact display for user. Thank you, Kyungmin Park ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] OneNAND partial read/write support
On Mon, Oct 12, 2009 at 04:27:10PM +0900, Kyungmin Park wrote: > Now OneNAND handles block operation only. > With this patch OneNAND handles all read/write size. > > Signed-off-by: Kyungmin Park > --- > diff --git a/common/cmd_onenand.c b/common/cmd_onenand.c > index 9090940..2b8f01b 100644 > --- a/common/cmd_onenand.c > +++ b/common/cmd_onenand.c > @@ -36,7 +36,7 @@ static inline int str2long(char *p, ulong *num) > return (*p != '\0' && *endptr == '\0') ? 1 : 0; > } > > -static int arg_off_size(int argc, char *argv[], ulong *off, size_t *size) > +static int arg_off_size(int argc, char *argv[], ulong *off, ssize_t *size) > { > if (argc >= 1) { > if (!(str2long(argv[0], off))) { Are you expecting negative sizes? > @@ -69,61 +69,65 @@ static int arg_off_size(int argc, char *argv[], ulong > *off, size_t *size) > return 0; > } > > -static int onenand_block_read(loff_t from, size_t len, > - size_t *retlen, u_char *buf, int oob) > +static int onenand_block_read(loff_t from, ssize_t len, > + ssize_t *retlen, u_char *buf, int oob) > { Is it still onenand_block_read if you don't have to read a whole block? > struct onenand_chip *this = mtd->priv; > - int blocks = (int) len >> this->erase_shift; > int blocksize = (1 << this->erase_shift); > loff_t ofs = from; > struct mtd_oob_ops ops = { > .retlen = 0, > }; > + ssize_t thislen; > int ret; > > - if (oob) > - ops.ooblen = blocksize; > - else > - ops.len = blocksize; > + while (len > 0) { > + thislen = min_t(ssize_t, len, blocksize); > + thislen = ALIGN(thislen, mtd->writesize); > > - while (blocks) { > ret = mtd->block_isbad(mtd, ofs); > if (ret) { > printk("Bad blocks %d at 0x%x\n", > (u32)(ofs >> this->erase_shift), (u32)ofs); > - ofs += blocksize; > + ofs += thislen; > continue; > } > > - if (oob) > + if (oob) { > ops.oobbuf = buf; > - else > + ops.ooblen = thislen; > + } else { > ops.datbuf = buf; > + ops.len = thislen; thislen can be greater than len, in which case you'll be overflowing buf. If you want to allow partial page reads, you need to allocate a temporary buffer at some point. If not (I don't see a huge need), the ALIGN() should be an error check instead. Does this code handle being given an offset that is not at a block (or page) boundary? It doesn't look like it (it will try to read across block boundaries). > @@ -265,9 +276,10 @@ static int onenand_block_test(u32 start, u32 size) > goto next; > } > > - if (memcmp(buf, verify_buf, blocksize)) > + if (memcmp(buf, verify_buf, blocksize)) { > printk("\nRead/Write test failed at 0x%x\n", (u32)ofs); > - > + break; > + } > @@ -322,6 +334,7 @@ static int onenand_dump(struct mtd_info *mtd, ulong off, > int only_oob) > p += 16; > } > puts("OOB:\n"); > + p = oobbuf; > i = mtd->oobsize >> 3; > while (i--) { > printf("\t%02x %02x %02x %02x %02x %02x %02x %02x\n", > @@ -339,7 +352,7 @@ int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, > char *argv[]) > struct onenand_chip *this; > int blocksize; > ulong addr, ofs; > - size_t len, retlen = 0; > + ssize_t len, retlen = 0; > int ret = 0; > char *cmd, *s; > > @@ -385,7 +398,8 @@ int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, > char *argv[]) > int erase; > > erase = strcmp(cmd, "erase") == 0; /* 1 = erase, 0 = > test */ > - printf("\nOneNAND %s: ", erase ? "erase" : "test"); > + printf("\nOneNAND %s %s: ", erase ? "erase" : "test", > + force ? "force" : ""); These seem to be unrelated changes. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Add mpc5125ads board and processor to the mpc512x family
Dear John, In message <4b73d43f0910191545x3127cba5w7fdec3f638213...@mail.gmail.com> you wrote: > > The register map for 5125 does not just change the size of the registers. > Some registers change locations. The issue is that the hardware guys > decided to "fix" the old broken register access. The 5200, 5121, 5123 had > some registers that were: I always stand fascinated about the inventiveness of these guys; even when just releasing a new chip from one family where one would expect basicly upward-compatibility they find ways not to simplify the design but to make it more complex and wonderful. Nobody else does so much to save our jobs. > So the problem is painful but I believe doable. The problem I never > resolved was dealing with this mess in linux where the same binary has to > work with both platforms. I decided that the register accesses needed to be > done via an offsets array that was populated at run time but I never got > around to implementing that. Heh. I don't envy the guy who has to do this. 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 "Most people would like to be delivered from temptation but would like it to keep in touch." - Robert Orben ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] tools: Use override when changing CC, CFLAGS, etc.
Mike Frysinger wrote: > On Monday 19 October 2009 17:24:35 Scott Wood wrote: >> If the user has specified a CC or similar on the command line, that is the >> cross compiler, not the host compiler. Override is needed to keep these >> assignments from being ignored in that case. > > then again, if we didnt mix host and target variable names, this wouldnt be a > problem. in a sane world, all of the host stuff would be HOSTXX (or BUILDXX). I was looking at making static pattern rules to divert host objects to a host rule, with separate object lists for files that want pedantic and non-pedantic (leaving the current set of individual file rules would cause conflicts). It seems that nothing in tools/Makefile is using -pedantic or any of the other HOSTCFLAGS set in tools/Makefile; HOSTCFLAGS is getting overwritten by config.mk. It looks like maybe this was introduced when HOST_CFLAGS was changed to HOSTCFLAGS. Any thoughts on how to untangle things? What flags to we really want to use here? Given the number of files that have been exempted, do we still want to keep the -pedantic stuff around? -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 07/10] Rearrange i386 Interupt Handling
On Wed, Oct 21, 2009 at 1:35 AM, Joakim Tjernlund wrote: >> >> In preperation for full relocation >> >> Signed-off-by: Graeme Russ >> --- >> cpu/i386/Makefile | 2 +- >> cpu/i386/cpu.c | 1 - >> cpu/i386/exceptions.c | 229 - >> cpu/i386/interrupts.c | 431 >> ++-- >> include/asm-i386/interrupt.h | 27 --- >> include/asm-i386/u-boot-i386.h | 3 - >> lib_i386/interrupts.c | 4 +- >> lib_i386/pcat_interrupts.c | 33 --- >> 8 files changed, 420 insertions(+), 310 deletions(-) >> delete mode 100644 cpu/i386/exceptions.c > > Don't know much about x86, but should not these new asm > symbools be .hidden and .type , @function ? > Yes >> >> +#define DECLARE_INTERRUPT(x) \ >> + ".globl irq_"#x"\n" \ >> + "irq_"#x":\n" \ >> + "pushl %ebp\n" \ >> + "movl %esp,%ebp\n" \ >> + "pusha\n" \ >> + "pushl $"#x"\n" \ >> + "jmp irq_common_entry\n" > Done in patch 8 >> +asm(".globl irq_common_entry\n" \ >> + "irq_common_entry:\n" \ >> + "pushl $0\n" \ >> + "pushl $0\n" \ >> + "call irq_llsr\n" \ >> + "popl %eax\n" \ >> + "popl %eax\n" \ > > I missed this one - I will respin patch 8 after any further comments have been made Regards, Graeme ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] ppc4xx: Update flash size in reg property of the NOR flash node
Dear Stefan Roese, In message <1256048896-10508-1-git-send-email...@denx.de> you wrote: > Till now only the ranges in the ebc node are updated with the values > currently configured in the PPC4xx EBC controller. With this patch now > the NOR flash size is updated in the device tree blob as well. This is > done by scanning the compatible nodes "cfi-flash" and "jedec-flash" > for the correct chip select number. > > Signed-off-by: Stefan Roese > Cc: Wolfgang Denk > --- > Changes in v2: > - NOR flash nodes are now scanned/detected via the compatible node. Thanks. Hm... thinking about it, this problem most probably affects other (non-4xx boards as well). I guess there is no easy way to generalize this code enough tomake it usable by other (or even all?) boards as well? 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 Philosophy is a game with objectives and no rules. Mathematics is a game with rules and no objectives. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] cpu/ppc4xx/fdt.c: avoid strcpy() to constant string
From: Wolfgang Denk strcpy() was iused with the target address being a pointer to a constant string, which potentially is read-only. Use a (writable) array of characters instead. Signed-off-by: Wolfgang Denk --- cpu/ppc4xx/fdt.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cpu/ppc4xx/fdt.c b/cpu/ppc4xx/fdt.c index 496e028..b310832 100644 --- a/cpu/ppc4xx/fdt.c +++ b/cpu/ppc4xx/fdt.c @@ -42,7 +42,7 @@ void __ft_board_setup(void *blob, bd_t *bd) u32 bxcr; u32 ranges[EBC_NUM_BANKS * 4]; u32 *p = ranges; - char *ebc_path = "/plb/opb/ebc"; + char ebc_path[] = "/plb/opb/ebc"; ft_cpu_setup(blob, bd); -- 1.6.2.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Add mpc5125ads board and processor to the mpc512x family
Dear Martha, can you _please_ fix your mailer and make sure to keep the In-reply-to: and References: mail headers in place and working, so threading of messages works? Thanks. In message <200910200953803.sm05...@[206.180.163.89]> you wrote: > > > Well, the ideas was that this was the default setting that fits most > > boards, and if it doesn't fit it will be overwritten by another array. > > Adding #ifdef's here is a strict No-No. > > How do I override a default array of 30 ulong elements that is declared > static in common code from my board code ? I declare my own and use it > exclusively so the one in common code is a waste of space. Besides which > it puts constraints that all the elements need a declaration. Why if I'm not > using it ? If the assumption that the default code is useful on all boards is wrong, it has the be revised. We can implement this is a way that it can be completel enabled/ disabled, but I will not accept any #ifdef's right in the middle of that array init code. > > No. You can build either one implementation of the function or the > > other one, depending of the config settings. > > Are you talking about pulling one or the other in at the make ? > SO to share the 8 functions or so like putc and getc I have one file, > 5121 init another and 5125 init a third -- all that to bypass an if statement > ?? Why compile code for two incompatible architectures when you know at compile time which one you have? You don't attempt to have one U-Boot binary image that runs both on a MPC5121 and on a MPC5125 board, or do you? [I would be interested to see how this could be done in a halfway clean way.] Whether you split this in several files or not is a different question. > You're not making any sense to me. I'm sorry to hear that. > > I'm not talking about any printed messages here. I smell a basic > > misunderstaning in your comments - there cannot be more than one > > network interface active and in use in U-Boot. > > Can't I initialize both and switch between them ? I do it now and > want to keep this functionality. No, you cannot do that. You must not initialize _any_ network interface unless U-Boot issues a network related command. And when switching to another interface, you have to disable the previouly used one. Same before you boot Linux. > > Umm... Why should we care about this? See bullet # 2 at > > http://www.denx.de/wiki/view/U-Boot/DesignPrinciples#2_Keep_it_Fast > > > > U-Boot should not care about these things, unless you run a network > > command on the second Ethernet interface. > > Yes but since you can switch midstream they both need to be initialized > and the code needs to determine which one it's using ??? You cannot switch "midstream". You can use a new network interface with a new network command - and there it does not make a difference whether you ran a command on another interface before (except that you have to make sure to disable such other interface first). There is no and cannot be any switching while any command (say, a TFTP download) is running. Initialization must not be done before actual use, and then only for the network interface that is actually going to be used. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de The human race is faced with a cruel choice: work or daytime tele- vision. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH U-BOOTV2] image.h: amd64 support
Use IH_CPU_I386 for amd64 machines as well, so bootm.c is able to build on amd64 sandbox. Signed-off-by: Peter Korsgaard --- include/image.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/image.h b/include/image.h index 0d2f472..5524f84 100644 --- a/include/image.h +++ b/include/image.h @@ -84,7 +84,7 @@ #define IH_CPU IH_CPU_PPC #elif defined(__ARM__) #define IH_CPU IH_CPU_ARM -#elif defined(__I386__) +#elif defined(__I386__) || defined(__x86_64__) #define IH_CPU IH_CPU_I386 #elif defined(__mips__) #define IH_CPU IH_CPU_MIPS -- 1.6.3.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] DM9000 issue in DM355
> > > Stefano, > > > > Paulraj, Sandeep wrote: > > > Ben, > > > > > Hi, > > > > > When the board comes after I reflash with a new U-boot image, I no > > > longer see the ethaddr being set. But when I do a tftp I can see the > > > ethaddr being read. tftp complains and says no ethaddr set. > > > > Not sure, but it seems that the mac address is read from the eeprom > > connected to the DM9000 and it is not used again. > > I see that the mac address is copied into the environment variable, but > > is is not copied to the dev structure. > > > > Could you give the following simple patch a try ? > > > > Regards, > > Stefano > > > > Thanks for your patch. I tried an image with your patch > The issues still persists. > > I am wondering if any other board using this driver is facing this issue. > To me it seems to be generic to the DM9000. > > It does not exist on the EMAC driver for DM355. I meant EMAC driver for DM365. Obviously Dm355 does not have both DM9000 and EMAC :-) dhcp works just fine. I meant on the DM365. dhcp does not work on DM355. It just times out. > > Thanks, > Sandeep ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] cmd_onenand.c, onenand_block_read (...)
On Tue, Oct 20, 2009 at 05:27:04PM +0400, Tuma wrote: > Hi, All! > > It seems I have a trouble. > I want to use onenand_block_read function. So I've written a cover for it: > > int OneNANDBlockRead (loff_t _from, ssize_t _len, > ssize_t *_retlen, u_char *_buf, int _oob) > { > int lRet; > > return lRet; > } You wrote a function that does nothing but return an uninitialized stack value? > When I do from this fuction: > printf ("Reading from: 0x%X, Length: 0x%X\n", _from, _len); > I get _len and _form swapped. > What's wrong? For one, if that's the same _from as in OneNANDBlockRead, you're using the wrong printf formats. You need %llX for loff_t (you may want to cast to unsigned long long just in case the type of loff_t varies), and %zX for ssize_t. Please pay attention to complier warnings. > I tryed to pass _from and _len as pointers - pointer addresses are correct > but > printf ("Reading from: 0x%X\n", *_from); > printf ("Reading Length: 0x%X\n", *_len); > return swapped result again. > > This is how I call OneNANDBlockRead function: > static const ssize_t lLen = 0x20; > static const ulong lLT = 0x0026; > OneNANDBlockRead (&lLT, &lLen, &retlen, lEnvironment, 0); You're passing pointers to integer arguments. Please pay attention to compiler warnings. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] ARM: OMAP3: Refactors the SM911x driver
From: Steve Sakoman Move the test up in the function to not hang on systems without ethernet. Signed-off-by: Steve Sakoman Acked-by: Ben Warren --- drivers/net/smc911x.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) Index: u-boot-arm/drivers/net/smc911x.c === --- u-boot-arm.orig/drivers/net/smc911x.c +++ u-boot-arm/drivers/net/smc911x.c @@ -249,6 +249,12 @@ int smc911x_initialize(u8 dev_num, int b dev->iobase = base_addr; + /* Try to detect chip. Will fail if not present. */ + if (smc911x_detect_chip(dev)) { + free(dev); + return 0; + } + addrh = smc911x_get_mac_csr(dev, ADDRH); addrl = smc911x_get_mac_csr(dev, ADDRL); dev->enetaddr[0] = addrl; @@ -264,12 +270,6 @@ int smc911x_initialize(u8 dev_num, int b dev->recv = smc911x_rx; sprintf(dev->name, "%s-%hu", DRIVERNAME, dev_num); - /* Try to detect chip. Will fail if not present. */ - if (smc911x_detect_chip(dev)) { - free(dev); - return 0; - } - eth_register(dev); return 0; } ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] DM9000 issue in DM355
Stefano, > > Paulraj, Sandeep wrote: > > Ben, > > > Hi, > > > When the board comes after I reflash with a new U-boot image, I no > > longer see the ethaddr being set. But when I do a tftp I can see the > > ethaddr being read. tftp complains and says no ethaddr set. > > Not sure, but it seems that the mac address is read from the eeprom > connected to the DM9000 and it is not used again. > I see that the mac address is copied into the environment variable, but > is is not copied to the dev structure. > > Could you give the following simple patch a try ? > > Regards, > Stefano > Thanks for your patch. I tried an image with your patch The issues still persists. I am wondering if any other board using this driver is facing this issue. To me it seems to be generic to the DM9000. It does not exist on the EMAC driver for DM355. dhcp works just fine. Thanks, Sandeep ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] fsl_elbc_nand: remove the bbt descriptors relocation fixup
On Oct 20, 2009, at 10:28 AM, Scott Wood wrote: > On Tue, Oct 20, 2009 at 10:27:05AM -0500, Kumar Gala wrote: >> >> On Oct 20, 2009, at 3:58 AM, Mingkai Hu wrote: >> >>> The commit 66372fe2 manually relocated the bbt pattern pointer, >>> which can be removed by using full relocation. >>> >>> Signed-off-by: Mingkai Hu >>> --- >>> drivers/mtd/nand/fsl_elbc_nand.c |4 >>> 1 files changed, 0 insertions(+), 4 deletions(-) >> >> Scott are you picking this up via the NAND tree? > > I can if you want. Go ahead and pick both up via NAND tree. I'll ack the second one. - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ppc/85xx: make boot from NAND full relocation to RAM
On Oct 20, 2009, at 3:58 AM, Mingkai Hu wrote: > Take advantage of the latest full relocation commit of PPC platform > for boot from NAND. > > Signed-off-by: Mingkai Hu > --- Acked-by: Kumar Gala Scott, go ahead and take this via the NAND tree to keep the patches together. - k > > Changelog: > > - according to Scott's comments to seperate this patch. > > cpu/mpc85xx/u-boot-nand.lds |1 - > 1 files changed, 0 insertions(+), 1 deletions(-) > > diff --git a/cpu/mpc85xx/u-boot-nand.lds b/cpu/mpc85xx/u-boot-nand.lds > index a0fc8f1..b4c63e2 100644 > --- a/cpu/mpc85xx/u-boot-nand.lds > +++ b/cpu/mpc85xx/u-boot-nand.lds > @@ -58,7 +58,6 @@ SECTIONS > .text : > { > *(.text) > -*(.fixup) > *(.got1) >} :text > _etext = .; > -- > 1.6.4 > > ___ > U-Boot mailing list > U-Boot@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] fsl_elbc_nand: remove the bbt descriptors relocation fixup
On Tue, Oct 20, 2009 at 10:27:05AM -0500, Kumar Gala wrote: > > On Oct 20, 2009, at 3:58 AM, Mingkai Hu wrote: > >> The commit 66372fe2 manually relocated the bbt pattern pointer, >> which can be removed by using full relocation. >> >> Signed-off-by: Mingkai Hu >> --- >> drivers/mtd/nand/fsl_elbc_nand.c |4 >> 1 files changed, 0 insertions(+), 4 deletions(-) > > Scott are you picking this up via the NAND tree? I can if you want. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] fsl_elbc_nand: remove the bbt descriptors relocation fixup
On Oct 20, 2009, at 3:58 AM, Mingkai Hu wrote: > The commit 66372fe2 manually relocated the bbt pattern pointer, > which can be removed by using full relocation. > > Signed-off-by: Mingkai Hu > --- > drivers/mtd/nand/fsl_elbc_nand.c |4 > 1 files changed, 0 insertions(+), 4 deletions(-) Scott are you picking this up via the NAND tree? Do you want to take both patches? - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] DM9000 issue in DM355
Paulraj, Sandeep wrote: > Ben, > Hi, > When the board comes after I reflash with a new U-boot image, I no > longer see the ethaddr being set. But when I do a tftp I can see the > ethaddr being read. tftp complains and says no ethaddr set. Not sure, but it seems that the mac address is read from the eeprom connected to the DM9000 and it is not used again. I see that the mac address is copied into the environment variable, but is is not copied to the dev structure. Could you give the following simple patch a try ? Regards, Stefano -- = 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 = diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c index efe9135..9c95e53 100644 --- a/drivers/net/dm9000x.c +++ b/drivers/net/dm9000x.c @@ -348,6 +348,7 @@ static int dm9000_init(struct eth_device *dev, bd_t *bd) for (i = 0; i < 3; i++) dm9000_read_srom_word(i, enetaddr + 2 * i); eth_setenv_enetaddr("ethaddr", enetaddr); + memcpy(dev->enetaddr, enetaddr, 6); #endif } ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [u-boot] [PATCH] [2/2] [v1.2] mxc_fec: avoid free() calls to already freed pointers.
> >> /** >> + * @brief Possible values for status >> + * >> + * fec_halt() changes the status to FEC_HALT_STATUS and fec_init() >> + * changes the status to FEC_INIT_STATUS >> + */ >> +#define FEC_HALT_STATUS 0 >> +#define FEC_INIT_STATUS 1 > > It would seem more logical to me if you swapped names around, i. e. > please use FEC_STATUS_INIT and FEC_STATUS_HALT. > > Also, we might consider using an enum here? No problem, let me fix it and resend. Thank you for the comments. -- Javier Martin Vista Silicon S.L. CDTUC - FASE C - Oficina S-345 Avda de los Castros s/n 39005- Santander. Cantabria. Spain +34 942 25 32 60 www.vista-silicon.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 07/10] Rearrange i386 Interupt Handling
> > In preperation for full relocation > > Signed-off-by: Graeme Russ > --- > cpu/i386/Makefile |2 +- > cpu/i386/cpu.c |1 - > cpu/i386/exceptions.c | 229 - > cpu/i386/interrupts.c | 431 > ++-- > include/asm-i386/interrupt.h | 27 --- > include/asm-i386/u-boot-i386.h |3 - > lib_i386/interrupts.c |4 +- > lib_i386/pcat_interrupts.c | 33 --- > 8 files changed, 420 insertions(+), 310 deletions(-) > delete mode 100644 cpu/i386/exceptions.c Don't know much about x86, but should not these new asm symbools be .hidden and .type , @function ? > > +#define DECLARE_INTERRUPT(x) \ > + ".globl irq_"#x"\n" \ > + "irq_"#x":\n" \ > + "pushl %ebp\n" \ > + "movl %esp,%ebp\n" \ > + "pusha\n" \ > + "pushl $"#x"\n" \ > + "jmp irq_common_entry\n" > +asm(".globl irq_common_entry\n" \ > + "irq_common_entry:\n" \ > + "pushl $0\n" \ > + "pushl $0\n" \ > + "call irq_llsr\n" \ > + "popl %eax\n" \ > + "popl %eax\n" \ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] ppc4xx: Update flash size in reg property of the NOR flash node
Till now only the ranges in the ebc node are updated with the values currently configured in the PPC4xx EBC controller. With this patch now the NOR flash size is updated in the device tree blob as well. This is done by scanning the compatible nodes "cfi-flash" and "jedec-flash" for the correct chip select number. Signed-off-by: Stefan Roese Cc: Wolfgang Denk --- Changes in v2: - NOR flash nodes are now scanned/detected via the compatible node. cpu/ppc4xx/fdt.c | 43 ++- 1 files changed, 42 insertions(+), 1 deletions(-) diff --git a/cpu/ppc4xx/fdt.c b/cpu/ppc4xx/fdt.c index 496e028..2688af1 100644 --- a/cpu/ppc4xx/fdt.c +++ b/cpu/ppc4xx/fdt.c @@ -35,6 +35,43 @@ DECLARE_GLOBAL_DATA_PTR; +static int fdt_update_nor_flash_node(void *blob, int cs, u32 size) +{ + char *compat[] = { "cfi-flash", "jedec-flash" }; + int off; + int len; + struct fdt_property *prop; + u32 *reg; + int i; + + for (i = 0; i < 2; i++) { + off = fdt_node_offset_by_compatible(blob, -1, compat[i]); + while (off != -FDT_ERR_NOTFOUND) { + /* +* Found one compatible node, now check if this one +* has the correct CS +*/ + prop = fdt_get_property_w(blob, off, "reg", &len); + if (prop) { + reg = (u32 *)&prop->data[0]; + if (reg[0] == cs) { + reg[2] = size; + fdt_setprop(blob, off, "reg", reg, + 3 * sizeof(u32)); + + return 0; + } + } + + /* Move to next compatible node */ + off = fdt_node_offset_by_compatible(blob, off, + compat[i]); + } + } + + return -1; +} + void __ft_board_setup(void *blob, bd_t *bd) { int rc; @@ -59,11 +96,15 @@ void __ft_board_setup(void *blob, bd_t *bd) *p++ = 0; *p++ = bxcr & EBC_BXCR_BAS_MASK; *p++ = EBC_BXCR_BANK_SIZE(bxcr); + + /* Try to update reg property in nor flash node too */ + fdt_update_nor_flash_node(blob, i, + EBC_BXCR_BANK_SIZE(bxcr)); } } /* Some 405 PPC's have EBC as direct PLB child in the dts */ - if (fdt_path_offset(blob, "/plb/opb/ebc") < 0) + if (fdt_path_offset(blob, ebc_path) < 0) strcpy(ebc_path, "/plb/ebc"); rc = fdt_find_and_setprop(blob, ebc_path, "ranges", ranges, (p - ranges) * sizeof(u32), 1); -- 1.6.5.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Add mpc5125ads board and processor to the mpc512x family
> > Yes but the default has constants like CONFIG_SYS_MICRON_INIT_DEV_OP > > ... must I then declare this if I am using > > CONFIG_SYS_ELPIDA_INIT_DEV_OP ? > Well, the ideas was that this was the default setting that fits most > boards, and if it doesn't fit it will be overwritten by another array. > Adding #ifdef's here is a strict No-No. How do I override a default array of 30 ulong elements that is declared static in common code from my board code ? I declare my own and use it exclusively so the one in common code is a waste of space. Besides which it puts constraints that all the elements need a declaration. Why if I'm not using it ? > > The default constants are a large mem array that just plain doesn't need > > to be there if you must override it anyway. I don't understand the > > impetus to save on printf strings, for example, and not wanting to save > > here ??? > Feel free to implement something that needs less memory, but do not > add #ifdef's here. > > >> +#ifdef CONFIG_MPC5125 > > >> + out_8(&im->io_ctrl.io_control_mem, IOCTRL_MUX_DDR); > > >> +#else > > >> out_be32(&im->io_ctrl.io_control_mem, IOCTRL_MUX_DDR); > > >> +#endif > > > > > This is something which happens a lot in the remaining code - so often > > > that it is plain unacceptable. As mentioned above, I know that you are > > > just a victim here, but we need a less ugly implementation. > > > > Actually .. since I redid the entire iopin_initialize function to a > > separate one for the mpc5125 this is the only place where an ugly > > #ifdef'ed iopin init occurs now. > > I think it's not the only place, and it's just a symptom of the > problem. I think we should try to avoid duplicating structs that are > more or less the same, except for the data type. If they had been left as an array with indices as when the 5121 was first implemented these differences would be trivial ... now that each iopin is an elemnet in a struct there are over 50 different namesbesides the ordering by the 3rd element is off for the few names at the beginning that are the same. Also the init code still treats it like an array. I believe you NAKed me on doing this a week or two ago. Perhaps I should take it back to that implementation ??? > > > As I said .. since I redid the iopin_initialize (there are now 2 > > different functions) I don't think this is necessary ... it's not > > just a size difference ... there is also a bit configuration > > difference. I redid the #define for this too. Also .. the elements > > within the struct are all different. > > It's primarily and issue of being able to read and maintain the code. > Duplicating the structs makes no sense if they are essentially the > same except for the u8 versus u32 difference. > > You claim the elements are all different? I didn't get this impression > from reading either your code or the RefMan. I've read and reread the manual Wolfgang ... I could recite page numbers at this point ... I believe you 've glanced at it and have the wrong impression. > > ... > > >> +#ifndef CONFIG_MPC5125 > > >> /* set MR register to point to MR1 */ > > >> out_8(&psc->command, PSC_SEL_MODE_REG_1); > > >> > > >> @@ -93,12 +93,25 @@ int serial_init(void) > > >> /* switch to UART mode */ > > >> out_be32(&psc->sicr, 0); > > >> > > >> - /* mode register points to mr1 */ > > >> /* configure parity, bit length and so on in mode register 1*/ > > >> + /* mode register points to mr1 */ > > >> out_8(&psc->mode, PSC_MODE_8_BITS | PSC_MODE_PARNONE); > > >> /* now, mode register points to mr2 */ > > >> out_8(&psc->mode, PSC_MODE_1_STOPBIT); > > >> +#else > > >> + /* disable Tx/Rx */ > > >> + out_8(&psc->command, PSC_TX_DISABLE | PSC_RX_DISABLE); > > >> + > > >> + /* choose the prescaler the Tx/Rx clock generation */ > > >> + out_8(&psc->psc_clock_select, 0xdd); > > >> + > > >> + /* switch to UART mode */ > > >> + out_be32(&psc->sicr, 0); > > >> > > >> + /* configure parity, bit length and so on in mode registers */ > > >> + out_8(&psc->mr1, PSC_MODE_8_BITS | PSC_MODE_PARNONE); > > >> + out_8(&psc->mr2, PSC_MODE_1_STOPBIT); > > >> +#endif > > >> /* set baudrate */ > > >> serial_setbrg(); > > > I think we should move the differing code into separate functions. > > > > Fine .. but I'll have to check the processor type to see which one > > to call at some point if I take out the ifdefs ??? > > No. You can build either one implementation of the function or the > other one, depending of the config settings. Are you talking about pulling one or the other in at the make ? SO to share the 8 functions or so like putc and getc I have one file, 5121 init another and 5125 init a third -- all that to bypass an if statement ?? You're not making any sense to me. > > > > diff --git a/drivers/net/mpc512x_fec.c b/drivers/net/mpc512x_fec.c > > >> index fb2c19a..9f839a1 100644 > > >> --- a/drivers/n
Re: [U-Boot] [PATCH 1/1] davinci_emac driver: modify to allow support for DA8xx
> -Original Message- > From: u-boot-boun...@lists.denx.de [mailto:u-boot-boun...@lists.denx.de] > On Behalf Of Nick Thompson > Sent: Tuesday, October 20, 2009 9:21 AM > To: Ben Warren; u-boot@lists.denx.de > Subject: [U-Boot] [PATCH 1/1] davinci_emac driver: modify to allow support > for DA8xx > > Abstract out $ARCH specific parts of the davinci_emac driver. > > Some Davinci devices contain an EMAC implemetation that has small > differences from the devices currently supported by the driver. > Abstrating those sections into static inlines in the $ARCH include > files allows those parts to be modified per $ARCH. > > Specifically this patch will allow DA830 and DA850 devices to use > the same driver as many DM devices. > > Signed-off-by: Nick Thompson > --- > Applies to u-boot-ti > Only tested on DA830 > > drivers/net/davinci_emac.c | 61 - > - > include/asm-arm/arch-davinci/emac_defs.h | 35 + > 2 files changed, 59 insertions(+), 37 deletions(-) > > diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c > index fa8cee4..0d61b9f 100644 > --- a/drivers/net/davinci_emac.c > +++ b/drivers/net/davinci_emac.c > @@ -1,6 +1,10 @@ > /* > * Ethernet driver for TI TMS320DM644x (DaVinci) chips. > * > + * Copyright (C) 2009 Nick Thompson, GE Fanuc Ltd > > + * > + * Abstracted out code not common to all davinci class devices. > + * > * Copyright (C) 2007 Sergey Kubushyn > * > * Parts shamelessly stolen from TI's dm644x_emac.c. Original copyright > @@ -119,7 +123,8 @@ static int davinci_eth_phy_detect(void) > > active_phy_addr = 0xff; > > - if ((phy_act_state = adap_mdio->ALIVE) == 0) > + phy_act_state = adap_mdio->ALIVE & EMAC_MDIO_PHY_MASK; > + if (phy_act_state == 0) > return(0); /* No active PHYs */ > > debug_emac("davinci_eth_phy_detect(), ALIVE = 0x%08x\n", > phy_act_state); > @@ -261,10 +266,7 @@ static int davinci_eth_open(struct eth_device *dev, > bd_t *bis) > /* Reset EMAC module and disable interrupts in wrapper */ > adap_emac->SOFTRESET = 1; > while (adap_emac->SOFTRESET != 0) {;} > - adap_ewrap->EWCTL = 0; > - for (cnt = 0; cnt < 5; cnt++) { > - clkdiv = adap_ewrap->EWCTL; > - } > + davinci_reset_emac_wrapper(adap_ewrap); Dm6467 and DM365 uses a different set of registers to do this. Some time back I had submitted a patch. It will be better if we modify this driver only once to support all DaVinci SOCs. I submiited a patch for DM365 and DM6467 some time back http://www.mail-archive.com/u-boot@lists.denx.de/msg23031.html Ben can you comment on the above, I don't think I received any comments from you. > > rx_desc = emac_rx_desc; > > @@ -272,30 +274,11 @@ static int davinci_eth_open(struct eth_device *dev, > bd_t *bis) > adap_emac->RXCONTROL = 0x01; > > /* Set MAC Addresses & Init multicast Hash to 0 (disable any > multicast receive) */ > - /* Using channel 0 only - other channels are disabled */ > - adap_emac->MACINDEX = 0; > - adap_emac->MACADDRHI = > - (davinci_eth_mac_addr[3] << 24) | > - (davinci_eth_mac_addr[2] << 16) | > - (davinci_eth_mac_addr[1] << 8) | > - (davinci_eth_mac_addr[0]); > - adap_emac->MACADDRLO = > - (davinci_eth_mac_addr[5] << 8) | > - (davinci_eth_mac_addr[4]); > + davinci_emac_set_mac_addr(adap_emac, davinci_eth_mac_addr); > > adap_emac->MACHASH1 = 0; > adap_emac->MACHASH2 = 0; > > - /* Set source MAC address - REQUIRED */ > - adap_emac->MACSRCADDRHI = > - (davinci_eth_mac_addr[3] << 24) | > - (davinci_eth_mac_addr[2] << 16) | > - (davinci_eth_mac_addr[1] << 8) | > - (davinci_eth_mac_addr[0]); > - adap_emac->MACSRCADDRLO = > - (davinci_eth_mac_addr[4] << 8) | > - (davinci_eth_mac_addr[5]); > - > /* Set DMA 8 TX / 8 RX Head pointers to 0 */ > addr = &adap_emac->TX0HDP; > for(cnt = 0; cnt < 16; cnt++) > @@ -341,7 +324,7 @@ static int davinci_eth_open(struct eth_device *dev, > bd_t *bis) > adap_emac->RXUNICASTSET = 0x01; > > /* Enable MII interface and Full duplex mode */ > - adap_emac->MACCONTROL = (EMAC_MACCONTROL_MIIEN_ENABLE | > EMAC_MACCONTROL_FULLDUPLEX_ENABLE); > + davinci_enable_mii(adap_emac); > > /* Init MDIO & get link state */ > clkdiv = (EMAC_MDIO_BUS_FREQ / EMAC_MDIO_CLOCK_FREQ) - 1; > @@ -374,9 +357,9 @@ static void davinci_eth_ch_teardown(int ch) >* Note: A task delay can be called here to pend rather > than >* occupying CPU cycles - anyway it has been found that > teardown >* takes very few cpu cycles and does not affect > functionality */ > - dly--; > - udelay(1); > -
[U-Boot] cmd_onenand.c, onenand_block_read (...)
Hi, All! It seems I have a trouble. I want to use onenand_block_read function. So I've written a cover for it: int OneNANDBlockRead (loff_t _from, ssize_t _len, ssize_t *_retlen, u_char *_buf, int _oob) { int lRet; return lRet; } When I do from this fuction: printf ("Reading from: 0x%X, Length: 0x%X\n", _from, _len); I get _len and _form swapped. What's wrong? I tryed to pass _from and _len as pointers - pointer addresses are correct but printf ("Reading from: 0x%X\n", *_from); printf ("Reading Length: 0x%X\n", *_len); return swapped result again. This is how I call OneNANDBlockRead function: static const ssize_t lLen = 0x20; static const ulong lLT = 0x0026; OneNANDBlockRead (&lLT, &lLen, &retlen, lEnvironment, 0); I don't understand it. Can someone help me please. Of course if you need some more information on my problem - you can ask me. -- Software Developer General Satellite Corp. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/1] davinci_emac driver: modify to allow support for DA8xx
Abstract out $ARCH specific parts of the davinci_emac driver. Some Davinci devices contain an EMAC implemetation that has small differences from the devices currently supported by the driver. Abstrating those sections into static inlines in the $ARCH include files allows those parts to be modified per $ARCH. Specifically this patch will allow DA830 and DA850 devices to use the same driver as many DM devices. Signed-off-by: Nick Thompson --- Applies to u-boot-ti Only tested on DA830 drivers/net/davinci_emac.c | 61 -- include/asm-arm/arch-davinci/emac_defs.h | 35 + 2 files changed, 59 insertions(+), 37 deletions(-) diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index fa8cee4..0d61b9f 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -1,6 +1,10 @@ /* * Ethernet driver for TI TMS320DM644x (DaVinci) chips. * + * Copyright (C) 2009 Nick Thompson, GE Fanuc Ltd + * + * Abstracted out code not common to all davinci class devices. + * * Copyright (C) 2007 Sergey Kubushyn * * Parts shamelessly stolen from TI's dm644x_emac.c. Original copyright @@ -119,7 +123,8 @@ static int davinci_eth_phy_detect(void) active_phy_addr = 0xff; - if ((phy_act_state = adap_mdio->ALIVE) == 0) + phy_act_state = adap_mdio->ALIVE & EMAC_MDIO_PHY_MASK; + if (phy_act_state == 0) return(0); /* No active PHYs */ debug_emac("davinci_eth_phy_detect(), ALIVE = 0x%08x\n", phy_act_state); @@ -261,10 +266,7 @@ static int davinci_eth_open(struct eth_device *dev, bd_t *bis) /* Reset EMAC module and disable interrupts in wrapper */ adap_emac->SOFTRESET = 1; while (adap_emac->SOFTRESET != 0) {;} - adap_ewrap->EWCTL = 0; - for (cnt = 0; cnt < 5; cnt++) { - clkdiv = adap_ewrap->EWCTL; - } + davinci_reset_emac_wrapper(adap_ewrap); rx_desc = emac_rx_desc; @@ -272,30 +274,11 @@ static int davinci_eth_open(struct eth_device *dev, bd_t *bis) adap_emac->RXCONTROL = 0x01; /* Set MAC Addresses & Init multicast Hash to 0 (disable any multicast receive) */ - /* Using channel 0 only - other channels are disabled */ - adap_emac->MACINDEX = 0; - adap_emac->MACADDRHI = - (davinci_eth_mac_addr[3] << 24) | - (davinci_eth_mac_addr[2] << 16) | - (davinci_eth_mac_addr[1] << 8) | - (davinci_eth_mac_addr[0]); - adap_emac->MACADDRLO = - (davinci_eth_mac_addr[5] << 8) | - (davinci_eth_mac_addr[4]); + davinci_emac_set_mac_addr(adap_emac, davinci_eth_mac_addr); adap_emac->MACHASH1 = 0; adap_emac->MACHASH2 = 0; - /* Set source MAC address - REQUIRED */ - adap_emac->MACSRCADDRHI = - (davinci_eth_mac_addr[3] << 24) | - (davinci_eth_mac_addr[2] << 16) | - (davinci_eth_mac_addr[1] << 8) | - (davinci_eth_mac_addr[0]); - adap_emac->MACSRCADDRLO = - (davinci_eth_mac_addr[4] << 8) | - (davinci_eth_mac_addr[5]); - /* Set DMA 8 TX / 8 RX Head pointers to 0 */ addr = &adap_emac->TX0HDP; for(cnt = 0; cnt < 16; cnt++) @@ -341,7 +324,7 @@ static int davinci_eth_open(struct eth_device *dev, bd_t *bis) adap_emac->RXUNICASTSET = 0x01; /* Enable MII interface and Full duplex mode */ - adap_emac->MACCONTROL = (EMAC_MACCONTROL_MIIEN_ENABLE | EMAC_MACCONTROL_FULLDUPLEX_ENABLE); + davinci_enable_mii(adap_emac); /* Init MDIO & get link state */ clkdiv = (EMAC_MDIO_BUS_FREQ / EMAC_MDIO_CLOCK_FREQ) - 1; @@ -374,9 +357,9 @@ static void davinci_eth_ch_teardown(int ch) * Note: A task delay can be called here to pend rather than * occupying CPU cycles - anyway it has been found that teardown * takes very few cpu cycles and does not affect functionality */ -dly--; -udelay(1); -if (dly == 0) + dly--; + udelay(1); + if (dly == 0) break; } adap_emac->TX0CP = cnt; @@ -389,9 +372,9 @@ static void davinci_eth_ch_teardown(int ch) * Note: A task delay can be called here to pend rather than * occupying CPU cycles - anyway it has been found that teardown * takes very few cpu cycles and does not affect functionality */ -dly--; -udelay(1); -if (dly == 0) + dly--; + udelay(1); + if (dly == 0)
Re: [U-Boot] ARM pull request v3
Dirk Behme wrote: > Tom wrote: >> This is what has changed since v2 >> >> 10,12c10,12 >> < CPU9260 : fix machine ID when using a CPU9G20. >> < fix CPU9260/CPU9G20 compile warnings >> < main.c: In function 'abortboot': >> --- >> > AT91 CPU9260 Fix machine ID when using a CPU9G20. >> > AT91 CPU9260 CPU9G20 Fix compile warnings >> > AT91 CPUAT91 Fix compiler warning >> 45,46c45 >> < Steve Sakoman (2): >> < TI: OMAP3: Refactors the SM911x driver >> --- >> > Steve Sakoman (1): >> 117d115 >> < drivers/net/smc911x.c | 12 +- >> 161c159 >> >> This comes from rebasing the arm master-sync branch > > ... > >> I removed the sm911x patch. > > After this is discussed now, could we apply it again? > > Without this patch it will be broken. > I believe the issue is only about the workflow process of the patch. I believe to resolve, the patch needs to be reposted, unchanged, to the list and to have Ben's ack-ed by added. Once this is done, I can apply it. Tom > Thanks > > Dirk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 09/10] Move references to link script exports
Signed-off-by: Graeme Russ --- include/asm-i386/u-boot-i386.h |6 -- lib_i386/bios_setup.c |6 ++ lib_i386/board.c | 11 --- lib_i386/realmode.c|5 + 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/include/asm-i386/u-boot-i386.h b/include/asm-i386/u-boot-i386.h index dfec307..1e8def7 100644 --- a/include/asm-i386/u-boot-i386.h +++ b/include/asm-i386/u-boot-i386.h @@ -35,12 +35,6 @@ extern ulong i386boot_bss_size; /* bss size */ extern ulong i386boot_stack_end;/* first usable RAM address after bss and stack */ extern ulong i386boot_ram_end; /* end of ram */ -extern ulong i386boot_realmode; /* start of realmode entry code */ -extern ulong i386boot_realmode_size;/* size of realmode entry code */ -extern ulong i386boot_bios; /* start of BIOS emulation code */ -extern ulong i386boot_bios_size;/* size of BIOS emulation code */ - - /* cpu/.../cpu.c */ int cpu_init(void); diff --git a/lib_i386/bios_setup.c b/lib_i386/bios_setup.c index 33c842c..6491e52 100644 --- a/lib_i386/bios_setup.c +++ b/lib_i386/bios_setup.c @@ -45,6 +45,9 @@ DECLARE_GLOBAL_DATA_PTR; #define BIOS_BASE((char*)0xf) #define BIOS_CS 0xf000 +extern ulong _i386boot_bios; +extern ulong _i386boot_bios_size; + /* these are defined in a 16bit segment and needs * to be accessed with the RELOC_16_() macros below */ @@ -138,6 +141,9 @@ static void setvector(int vector, u16 segment, void *handler) int bios_setup(void) { + ulong i386boot_bios = (ulong)&_i386boot_bios; + ulong i386boot_bios_size = (ulong)&_i386boot_bios_size; + static int done=0; int vector; #ifdef CONFIG_PCI diff --git a/lib_i386/board.c b/lib_i386/board.c index ebd7047..44fa0e3 100644 --- a/lib_i386/board.c +++ b/lib_i386/board.c @@ -53,11 +53,6 @@ extern long _i386boot_romdata_size; extern long _i386boot_bss_start; extern long _i386boot_bss_size; -extern long _i386boot_realmode; -extern long _i386boot_realmode_size; -extern long _i386boot_bios; -extern long _i386boot_bios_size; - /* The symbols defined by the linker script becomes pointers * which is somewhat inconveient ... */ ulong i386boot_start = (ulong)&_i386boot_start; /* code start (in flash) defined in start.S */ @@ -68,12 +63,6 @@ ulong i386boot_romdata_size = (ulong)&_i386boot_romdata_size; /* size of data ulong i386boot_bss_start = (ulong)&_i386boot_bss_start; /* bss start */ ulong i386boot_bss_size = (ulong)&_i386boot_bss_size; /* bss size */ -ulong i386boot_realmode = (ulong)&_i386boot_realmode; /* start of realmode entry code */ -ulong i386boot_realmode_size = (ulong)&_i386boot_realmode_size; /* size of realmode entry code */ -ulong i386boot_bios = (ulong)&_i386boot_bios; /* start of BIOS emulation code */ -ulong i386boot_bios_size = (ulong)&_i386boot_bios_size; /* size of BIOS emulation code */ - - const char version_string[] = U_BOOT_VERSION" (" U_BOOT_DATE " - " U_BOOT_TIME ")"; diff --git a/lib_i386/realmode.c b/lib_i386/realmode.c index 6cf2738..3c3c1fc 100644 --- a/lib_i386/realmode.c +++ b/lib_i386/realmode.c @@ -31,10 +31,15 @@ #define REALMODE_MAILBOX ((char*)0xe00) +extern ulong _i386boot_realmode; +extern ulong _i386boot_realmode_size; extern char realmode_enter; int realmode_setup(void) { + ulong i386boot_realmode = (ulong)&_i386boot_realmode; + ulong i386boot_realmode_size = (ulong)&_i386boot_realmode_size; + /* copy the realmode switch code */ if (i386boot_realmode_size > (REALMODE_MAILBOX-REALMODE_BASE)) { printf("realmode switch too large (%ld bytes, max is %d)\n", -- 1.6.4.1.174.g32f4c ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 10/10] Final i386 Relocation
Signed-off-by: Graeme Russ --- board/eNET/config.mk |2 + board/eNET/eNET.c | 17 +++-- board/eNET/u-boot.lds | 34 +++-- cpu/i386/cpu.c | 12 ++- cpu/i386/interrupts.c |4 +- cpu/i386/start.S | 132 -- include/asm-i386/u-boot-i386.h | 14 +--- lib_i386/board.c | 155 +++- lib_i386/interrupts.c |4 +- lib_i386/timer.c |2 +- 10 files changed, 159 insertions(+), 217 deletions(-) diff --git a/board/eNET/config.mk b/board/eNET/config.mk index c9703ea..5c64804 100644 --- a/board/eNET/config.mk +++ b/board/eNET/config.mk @@ -23,4 +23,6 @@ TEXT_BASE = 0x3804 CFLAGS_dlmalloc.o += -Wa,--no-warn -fno-strict-aliasing +PLATFORM_RELFLAGS += -fvisibility=hidden PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm +PLATFORM_LDFLAGS += -pic --emit-relocs -Bsymbolic -Bsymbolic-functions diff --git a/board/eNET/eNET.c b/board/eNET/eNET.c index 29cf295..baf7c95 100644 --- a/board/eNET/eNET.c +++ b/board/eNET/eNET.c @@ -47,7 +47,6 @@ void init_sc520_enet (void) { /* Set CPU Speed to 100MHz */ sc520_mmcr->cpuctl = 0x01; - gd->cpu_clk = 1; /* wait at least one millisecond */ asm("movl $0x2000,%%ecx\n" @@ -67,7 +66,7 @@ void init_sc520_enet (void) /* * Miscellaneous platform dependent initializations */ -int board_init(void) +int board_early_init_f(void) { init_sc520_enet(); @@ -117,12 +116,20 @@ int board_init(void) sc520_mmcr->sysarbctl = 0x06; sc520_mmcr->sysarbmenb = 0x0003; - /* Crystal is 33.000MHz */ - gd->bus_clk = 3300; - return 0; } +int board_early_init_r(void) +{ + /* CPU Speed to 100MHz */ + gd->cpu_clk = 1; + + /* Crystal is 33.000MHz */ + gd->bus_clk = 3300; + + return 0; +} + int dram_init(void) { init_sc520_dram(); diff --git a/board/eNET/u-boot.lds b/board/eNET/u-boot.lds index 4ea424d..8f9885b 100644 --- a/board/eNET/u-boot.lds +++ b/board/eNET/u-boot.lds @@ -28,28 +28,48 @@ ENTRY(_start) SECTIONS { . = 0x3804; /* Location of bootcode in flash */ + _i386boot_text_start = .; .text : { *(.text); } . = ALIGN(4); .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } _i386boot_text_size = SIZEOF(.text) + SIZEOF(.rodata); + . = ALIGN(4); + + .data : { *(.data) } + . = ALIGN(4); + + .interp : { *(.interp) } + . = ALIGN(4); + + .dynsym : { *(.dynsym) } + . = ALIGN(4); - . = 0x03FF; /* Ram data segment to use */ - _i386boot_romdata_dest = ABSOLUTE(.); - .data : AT ( LOADADDR(.rodata) + SIZEOF(.rodata) ) { *(.data) } - _i386boot_romdata_start = LOADADDR(.data); + .dynstr : { *(.dynstr) } + . = ALIGN(4); + + .hash : { *(.hash) } + . = ALIGN(4); + .got : { *(.got) } . = ALIGN(4); - .got : AT ( LOADADDR(.data) + SIZEOF(.data) ) { *(.got) } + .got.plt : { *(.got.plt) } . = ALIGN(4); + + .dynamic (NOLOAD) : { *(.dynamic) } + . = ALIGN(4); + __u_boot_cmd_start = .; .u_boot_cmd : { *(.u_boot_cmd) } + . = ALIGN(4); __u_boot_cmd_end = .; _i386boot_cmd_start = LOADADDR(.u_boot_cmd); - _i386boot_romdata_size = SIZEOF(.data) + SIZEOF(.got) + SIZEOF(.u_boot_cmd); + _i386boot_rel_dyn_start = .; + .rel.dyn : { *(.rel.dyn) } + _i386boot_rel_dyn_end = .; . = ALIGN(4); _i386boot_bss_start = ABSOLUTE(.); @@ -57,7 +77,7 @@ SECTIONS _i386boot_bss_size = SIZEOF(.bss); /* 16bit realmode trampoline code */ - .realmode 0x7c0 : AT ( LOADADDR(.got) + SIZEOF(.got) + SIZEOF(.u_boot_cmd)) { *(.realmode) } + .realmode 0x7c0 : AT ( LOADADDR(.rel.dyn) + SIZEOF(.rel.dyn) ) { *(.realmode) } _i386boot_realmode = LOADADDR(.realmode); _i386boot_realmode_size = SIZEOF(.realmode); diff --git a/cpu/i386/cpu.c b/cpu/i386/cpu.c index 4b68105..e9c0739 100644 --- a/cpu/i386/cpu.c +++ b/cpu/i386/cpu.c @@ -37,7 +37,7 @@ #include #include -int cpu_init(void) +int cpu_init_f(void) { /* initialize FPU, reset EM, set MP and NE */ asm ("fninit\n" \ @@ -46,12 +46,16 @@ int cpu_init(void) "orl $0x22, %eax\n" \ "movl %eax, %cr0\n" ); - /* Initialize core interrupt and exception functionality of CPU */ - cpu_init_interrupts (); - return 0; } +int cpu_init_r(void) +{ + /* Initialize core interrupt and exception functionality of CPU */ + cpu_init_interrupts (); + return 0; +} + int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { printf ("resetting ...\n"); diff --git a/cpu/i386/interrupts.c b/cpu/i386/interrupts.c index 6d699e2.
[U-Boot] [PATCH 08/10] Remove inline asm symbols from .dynsym
Hides global symbols in inline asm to reduce size of dynamic symbol table Signed-off-by: Graeme Russ --- board/eNET/eNET_start16.S |2 + cpu/i386/cpu.c|2 + cpu/i386/interrupts.c |2 + lib_i386/bios.S | 70 + lib_i386/bios_pci.S |2 + 5 files changed, 78 insertions(+), 0 deletions(-) diff --git a/board/eNET/eNET_start16.S b/board/eNET/eNET_start16.S index 48e4d83..af2c132 100644 --- a/board/eNET/eNET_start16.S +++ b/board/eNET/eNET_start16.S @@ -71,6 +71,8 @@ board_init16: .section .bios, "ax" .code16 .globl realmode_reset +.hidden realmode_reset +.type realmode_reset, @function realmode_reset: /* Alias MMCR to 0xdf000 */ movw$0xfffc, %dx diff --git a/cpu/i386/cpu.c b/cpu/i386/cpu.c index 8baf37d..4b68105 100644 --- a/cpu/i386/cpu.c +++ b/cpu/i386/cpu.c @@ -73,6 +73,8 @@ void __attribute__ ((regparm(0))) generate_gpf(void); /* segment 0x70 is an arbitrary segment which does not exist */ asm(".globl generate_gpf\n" +".hidden generate_gpf\n" +".type generate_gpf, @function\n" "generate_gpf:\n" "ljmp $0x70, $0x47114711\n"); diff --git a/cpu/i386/interrupts.c b/cpu/i386/interrupts.c index d80cfb1..6d699e2 100644 --- a/cpu/i386/interrupts.c +++ b/cpu/i386/interrupts.c @@ -29,6 +29,8 @@ #define DECLARE_INTERRUPT(x) \ ".globl irq_"#x"\n" \ + ".hidden irq_"#x"\n" \ + ".type irq_"#x", @function\n" \ "irq_"#x":\n" \ "pushl %ebp\n" \ "movl %esp,%ebp\n" \ diff --git a/lib_i386/bios.S b/lib_i386/bios.S index d6ca3e3..48f1b81 100644 --- a/lib_i386/bios.S +++ b/lib_i386/bios.S @@ -50,134 +50,200 @@ jmp realmode_reset .globl rm_int00 +.hidden rm_int00 +.type rm_int00, @function rm_int00: pushw $0 jmp any_interrupt16 .globl rm_int01 +.hidden rm_int01 +.type rm_int01, @function rm_int01: pushw $1 jmp any_interrupt16 .globl rm_int02 +.hidden rm_int02 +.type rm_int02, @function rm_int02: pushw $2 jmp any_interrupt16 .globl rm_int03 +.hidden rm_int03 +.type rm_int03, @function rm_int03: pushw $3 jmp any_interrupt16 .globl rm_int04 +.hidden rm_int04 +.type rm_int04, @function rm_int04: pushw $4 jmp any_interrupt16 .globl rm_int05 +.hidden rm_int05 +.type rm_int05, @function rm_int05: pushw $5 jmp any_interrupt16 .globl rm_int06 +.hidden rm_int06 +.type rm_int06, @function rm_int06: pushw $6 jmp any_interrupt16 .globl rm_int07 +.hidden rm_int07 +.type rm_int07, @function rm_int07: pushw $7 jmp any_interrupt16 .globl rm_int08 +.hidden rm_int08 +.type rm_int08, @function rm_int08: pushw $8 jmp any_interrupt16 .globl rm_int09 +.hidden rm_int09 +.type rm_int09, @function rm_int09: pushw $9 jmp any_interrupt16 .globl rm_int0a +.hidden rm_int0a +.type rm_int0a, @function rm_int0a: pushw $10 jmp any_interrupt16 .globl rm_int0b +.hidden rm_int0b +.type rm_int0b, @function rm_int0b: pushw $11 jmp any_interrupt16 .globl rm_int0c +.hidden rm_int0c +.type rm_int0c, @function rm_int0c: pushw $12 jmp any_interrupt16 .globl rm_int0d +.hidden rm_int0d +.type rm_int0d, @function rm_int0d: pushw $13 jmp any_interrupt16 .globl rm_int0e +.hidden rm_int0e +.type rm_int0e, @function rm_int0e: pushw $14 jmp any_interrupt16 .globl rm_int0f +.hidden rm_int0f +.type rm_int0f, @function rm_int0f: pushw $15 jmp any_interrupt16 .globl rm_int10 +.hidden rm_int10 +.type rm_int10, @function rm_int10: pushw $16 jmp any_interrupt16 .globl rm_int11 +.hidden rm_int11 +.type rm_int11, @function rm_int11: pushw $17 jmp any_interrupt16 .globl rm_int12 +.hidden rm_int12 +.type rm_int12, @function rm_int12: pushw $18 jmp any_interrupt16 .globl rm_int13 +.hidden rm_int13 +.type rm_int13, @function rm_int13: pushw $19 jmp any_interrupt16 .globl rm_int14 +.hidden rm_int14 +.type rm_int14, @function rm_int14: pushw $20 jmp any_interrupt16 .globl rm_int15 +.hidden rm_int15 +.type rm_int15, @function rm_int15: pushw $21 jmp any_interrupt16 .globl rm_int16 +.hidden rm_int16 +.type rm_int16, @function rm_int16: pushw $22 jmp any_interrupt16 .globl rm_int17 +.hidden rm_int17 +.type rm_int17, @function rm_int17: pushw $23 jmp any_interrupt16 .globl rm_int18 +.hidden rm_int18 +.type rm_int18, @function rm_int18: pushw $24 jmp any_interrupt16 .globl rm_int19 +.hidden rm_int19 +.type rm_int19, @function rm_int19: pushw $25 jmp any_interrupt16 .globl rm_int1a +.hid
[U-Boot] [PATCH 07/10] Rearrange i386 Interupt Handling
In preperation for full relocation Signed-off-by: Graeme Russ --- cpu/i386/Makefile |2 +- cpu/i386/cpu.c |1 - cpu/i386/exceptions.c | 229 - cpu/i386/interrupts.c | 431 ++-- include/asm-i386/interrupt.h | 27 --- include/asm-i386/u-boot-i386.h |3 - lib_i386/interrupts.c |4 +- lib_i386/pcat_interrupts.c | 33 --- 8 files changed, 420 insertions(+), 310 deletions(-) delete mode 100644 cpu/i386/exceptions.c diff --git a/cpu/i386/Makefile b/cpu/i386/Makefile index e98bd3d..c658c6e 100644 --- a/cpu/i386/Makefile +++ b/cpu/i386/Makefile @@ -29,7 +29,7 @@ include $(TOPDIR)/config.mk LIB= $(obj)lib$(CPU).a START = start.o start16.o resetvec.o -COBJS = serial.o interrupts.o exceptions.o cpu.o +COBJS = serial.o interrupts.o cpu.o SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) diff --git a/cpu/i386/cpu.c b/cpu/i386/cpu.c index d91e33b..8baf37d 100644 --- a/cpu/i386/cpu.c +++ b/cpu/i386/cpu.c @@ -48,7 +48,6 @@ int cpu_init(void) /* Initialize core interrupt and exception functionality of CPU */ cpu_init_interrupts (); - cpu_init_exceptions (); return 0; } diff --git a/cpu/i386/exceptions.c b/cpu/i386/exceptions.c deleted file mode 100644 index bc3d434..000 --- a/cpu/i386/exceptions.c +++ /dev/null @@ -1,229 +0,0 @@ -/* - * (C) Copyright 2002 - * Daniel Engström, Omicron Ceti AB, dan...@omicron.se. - * - * 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 -#include - -asm (".globl exp_return\n" - "exp_return:\n" - " addl $12, %esp\n" - " pop %esp\n" - " popa\n" - " iret\n"); - -char exception_stack[4096]; - -/* - * For detailed description of each exception, refer to: - * Intel® 64 and IA-32 Architectures Software Developer's Manual - * Volume 1: Basic Architecture - * Order Number: 253665-029US, November 2008 - * Table 6-1. Exceptions and Interrupts - */ -DECLARE_EXCEPTION(0, divide_error_entry); -DECLARE_EXCEPTION(1, debug_entry); -DECLARE_EXCEPTION(2, nmi_interrupt_entry); -DECLARE_EXCEPTION(3, breakpoint_entry); -DECLARE_EXCEPTION(4, overflow_entry); -DECLARE_EXCEPTION(5, bound_range_exceeded_entry); -DECLARE_EXCEPTION(6, invalid_opcode_entry); -DECLARE_EXCEPTION(7, device_not_available_entry); -DECLARE_EXCEPTION(8, double_fault_entry); -DECLARE_EXCEPTION(9, coprocessor_segment_overrun_entry); -DECLARE_EXCEPTION(10, invalid_tss_entry); -DECLARE_EXCEPTION(11, segment_not_present_entry); -DECLARE_EXCEPTION(12, stack_segment_fault_entry); -DECLARE_EXCEPTION(13, general_protection_entry); -DECLARE_EXCEPTION(14, page_fault_entry); -DECLARE_EXCEPTION(15, reserved_exception_entry); -DECLARE_EXCEPTION(16, floating_point_error_entry); -DECLARE_EXCEPTION(17, alignment_check_entry); -DECLARE_EXCEPTION(18, machine_check_entry); -DECLARE_EXCEPTION(19, simd_floating_point_exception_entry); -DECLARE_EXCEPTION(20, reserved_exception_entry); -DECLARE_EXCEPTION(21, reserved_exception_entry); -DECLARE_EXCEPTION(22, reserved_exception_entry); -DECLARE_EXCEPTION(23, reserved_exception_entry); -DECLARE_EXCEPTION(24, reserved_exception_entry); -DECLARE_EXCEPTION(25, reserved_exception_entry); -DECLARE_EXCEPTION(26, reserved_exception_entry); -DECLARE_EXCEPTION(27, reserved_exception_entry); -DECLARE_EXCEPTION(28, reserved_exception_entry); -DECLARE_EXCEPTION(29, reserved_exception_entry); -DECLARE_EXCEPTION(30, reserved_exception_entry); -DECLARE_EXCEPTION(31, reserved_exception_entry); - -__isr__ reserved_exception_entry(int cause, int ip, int seg) -{ - printf("Reserved Exception %d at %04x:%08x\n", cause, seg, ip); -} - -__isr__ divide_error_entry(int cause, int ip, int seg) -{ - printf("Divide Error (Division by zero) at %04x:%08x\n", seg, ip); - while(1); -} - -__isr__ debug_entry(int cause, int ip, int seg) -{ - printf("Debug Interrupt (Single step) at %04x:%08x\n", seg, ip); -} - -__isr__ nmi_interrupt_entry(int cause, int ip, int seg) -{ - printf("NMI Interrupt at %04x:%08x\n", seg, ip); -} - -__isr__ breakpoint_entry(int cause, int ip, int seg) -{
[U-Boot] [PATCH 06/10] Fix race condition when using SC520 timers
Signed-off-by: Graeme Russ --- cpu/i386/sc520/sc520_timer.c | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cpu/i386/sc520/sc520_timer.c b/cpu/i386/sc520/sc520_timer.c index 23de14b..25c9a24 100644 --- a/cpu/i386/sc520/sc520_timer.c +++ b/cpu/i386/sc520/sc520_timer.c @@ -35,6 +35,12 @@ void sc520_timer_isr(void) int timer_init(void) { + /* Register the SC520 specific timer interrupt handler */ + register_timer_isr (sc520_timer_isr); + + /* Install interrupt handler for GP Timer 1 */ + irq_install_handler (0, timer_isr, NULL); + /* Map GP Timer 1 to Master PIC IR0 */ sc520_mmcr->gp_tmr_int_map[1] = 0x01; @@ -54,11 +60,6 @@ int timer_init(void) sc520_mmcr->gptmr1maxcmpa = 100; sc520_mmcr->gptmr1ctl = 0xe009; - /* Register the SC520 specific timer interrupt handler */ - register_timer_isr (sc520_timer_isr); - - /* Install interrupt handler for GP Timer 1 */ - irq_install_handler (0, timer_isr, NULL); unmask_irq (0); /* Clear the GP Timer 1 status register to get the show rolling*/ -- 1.6.4.1.174.g32f4c ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 05/10] Fix global label in inline asm compile error
Signed-off-by: Graeme Russ --- include/configs/eNET.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/configs/eNET.h b/include/configs/eNET.h index 54c34fa..0a86550 100644 --- a/include/configs/eNET.h +++ b/include/configs/eNET.h @@ -234,8 +234,8 @@ #ifndef __ASSEMBLER__ extern unsigned long ip; -#define PRINTIPasm ("call next_line\n" \ - "next_line:\n" \ +#define PRINTIPasm ("call 0\n" \ + "0:\n" \ "pop %%eax\n" \ "movl %%eax, %0\n" \ :"=r"(ip) \ -- 1.6.4.1.174.g32f4c ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 04/10] Reorder source objects in lib_i386 Makefile
Signed-off-by: Graeme Russ --- lib_i386/Makefile |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib_i386/Makefile b/lib_i386/Makefile index bb9b330..9838506 100644 --- a/lib_i386/Makefile +++ b/lib_i386/Makefile @@ -32,16 +32,16 @@ SOBJS-y += realmode_switch.o COBJS-y+= bios_setup.o COBJS-y+= board.o COBJS-y+= bootm.o +COBJS-y+= interrupts.o +COBJS-$(CONFIG_SYS_PCAT_INTERRUPTS) += pcat_interrupts.o +COBJS-$(CONFIG_SYS_GENERIC_TIMER) += pcat_timer.o COBJS-$(CONFIG_PCI) += pci.o COBJS-$(CONFIG_PCI) += pci_type1.o COBJS-y+= realmode.o +COBJS-y+= timer.o COBJS-y+= video_bios.o COBJS-y+= video.o COBJS-y+= zimage.o -COBJS-y+= interrupts.o -COBJS-y+= timer.o -COBJS-$(CONFIG_SYS_PCAT_INTERRUPTS) += pcat_interrupts.o -COBJS-$(CONFIG_SYS_GENERIC_TIMER) += pcat_timer.o SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) -- 1.6.4.1.174.g32f4c ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 03/10] Fix link collisions resulting from gcc4.4.1 upgrade
Signed-off-by: Graeme Russ --- board/eNET/config.mk |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/board/eNET/config.mk b/board/eNET/config.mk index 058026d..c9703ea 100644 --- a/board/eNET/config.mk +++ b/board/eNET/config.mk @@ -23,3 +23,4 @@ TEXT_BASE = 0x3804 CFLAGS_dlmalloc.o += -Wa,--no-warn -fno-strict-aliasing +PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm -- 1.6.4.1.174.g32f4c ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 00/10] i386 Relocation
This patch series implements full relocation support for the i386 port of U-Boot. The first 5 patches came about due to my toolchain upgrade (to gcc 4.4.1 and binutils 2.19) (patch 4 id really just a quick tidy-up) Patch 6 is a standalone bug-fix to resolve a start-up race condition Patch 7 sets up the i386 interupt handling to be relocation friendly Patches 8 and 9 are a relocation setup patch - no functionality change By the end of patch 9, the i386 port is still non-relocatable Patch 10 is the actual Relocation Patch itself Relocation is achieved by utilising the -pie ld command line option and minimal boot-up processing of the resulting .rel.dyn section. By not using gcc's -fpie flag, the overhead of .got and the call/pop in each function entry is avoided - This prevents bloat of .text and .got and avoids the performance penalty of GOT lookups This relocation scheme is possibly usable on many other arches Many thanks to Joakim Tjernlund and Bill Campbell for their invaluable assistance and references. Size analysis: Non-Reloc Reloc - .text 0x00011970 0x00011850 .plt 0x .rodata 0x5bae 0x5b49 .data 0x0a5c 0x0a3c .interp0x0013 .dynsym0x00f0 .dynstr0x0113 .hash 0x0050 .got 0x 0x .got.plt 0x000c .dynamic 0x0080 .u_boot_cmd 0x03c0 0x03c0 .rel.dyn 0x4190 .bss 0x1a34 0x1a34 .realmode 0x0166 0x0166 .bios 0x053e 0x053e .start16 0x00bc 0x00bc .resetvec 0x0010 0x0010 = 0x0001a4de 0x0001e7bb ~17kB increase in binary image size (of which ~16kb is .rel.dyn which is not copied to RAM). Post processing of .rel.dyn could reduce the overhead by a further ~8kB - Speed improvement would be negligble and the only saving would be in image size, not RAM utilisation. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 02/10] Fix i386 malloc initialisation
Brings i386 malloc init in line with other arches Signed-off-by: Graeme Russ --- common/dlmalloc.c |6 -- include/configs/eNET.h|2 +- include/configs/sc520_cdp.h |2 +- include/configs/sc520_spunk.h |2 +- lib_i386/board.c | 15 +++ 5 files changed, 10 insertions(+), 17 deletions(-) diff --git a/common/dlmalloc.c b/common/dlmalloc.c index ca088a1..735b344 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -1522,11 +1522,6 @@ void *sbrk(ptrdiff_t increment) return (void *)old; } -#ifndef CONFIG_X86 -/* - * x86 boards use a slightly different init sequence thus they implement - * their own version of mem_malloc_init() - */ void mem_malloc_init(ulong start, ulong size) { mem_malloc_start = start; @@ -1535,7 +1530,6 @@ void mem_malloc_init(ulong start, ulong size) memset((void *)mem_malloc_start, 0, size); } -#endif /* field-extraction macros */ diff --git a/include/configs/eNET.h b/include/configs/eNET.h index 243a554..54c34fa 100644 --- a/include/configs/eNET.h +++ b/include/configs/eNET.h @@ -61,7 +61,7 @@ /* * Size of malloc() pool */ -#define CONFIG_MALLOC_SIZE (CONFIG_SYS_ENV_SIZE + 128*1024) +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024) #define CONFIG_BAUDRATE9600 diff --git a/include/configs/sc520_cdp.h b/include/configs/sc520_cdp.h index 214a9af..2f1dae7 100644 --- a/include/configs/sc520_cdp.h +++ b/include/configs/sc520_cdp.h @@ -65,7 +65,7 @@ /* * Size of malloc() pool */ -#define CONFIG_MALLOC_SIZE (CONFIG_ENV_SIZE + 128*1024) +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024) #define CONFIG_BAUDRATE9600 diff --git a/include/configs/sc520_spunk.h b/include/configs/sc520_spunk.h index f3fc960..cf5633c 100644 --- a/include/configs/sc520_spunk.h +++ b/include/configs/sc520_spunk.h @@ -63,7 +63,7 @@ /* * Size of malloc() pool */ -#define CONFIG_MALLOC_SIZE (CONFIG_ENV_SIZE + 128*1024) +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024) #define CONFIG_BAUDRATE9600 diff --git a/lib_i386/board.c b/lib_i386/board.c index 12ca20f..ebd7047 100644 --- a/lib_i386/board.c +++ b/lib_i386/board.c @@ -77,17 +77,16 @@ ulong i386boot_bios_size = (ulong)&_i386boot_bios_size; /* size of BIOS const char version_string[] = U_BOOT_VERSION" (" U_BOOT_DATE " - " U_BOOT_TIME ")"; -static int mem_malloc_init(void) +static int heap_init(void) { /* start malloc area right after the stack */ - mem_malloc_start = i386boot_bss_start + - i386boot_bss_size + CONFIG_SYS_STACK_SIZE; - mem_malloc_start = (mem_malloc_start+3)&~3; + ulong start = i386boot_bss_start + i386boot_bss_size + + CONFIG_SYS_STACK_SIZE; - /* Use all available RAM for malloc() */ - mem_malloc_end = gd->ram_size; + /* 4-byte aligned */ + start = (start+3)&~3; - mem_malloc_brk = mem_malloc_start; + mem_malloc_init(start, CONFIG_SYS_MALLOC_LEN); return 0; } @@ -184,7 +183,7 @@ init_fnc_t *init_sequence[] = { cpu_init, /* basic cpu dependent setup */ board_init, /* basic board dependent setup */ dram_init, /* configure available RAM banks */ - mem_malloc_init,/* dependant on dram_init */ + heap_init, /* dependant on dram_init */ interrupt_init, /* set up exceptions */ timer_init, serial_init, -- 1.6.4.1.174.g32f4c ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 01/10] Fix dlmalloc compile warning
Warning introduced by GCC 4.4.1 Signed-off-by: Graeme Russ --- board/eNET/config.mk |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/board/eNET/config.mk b/board/eNET/config.mk index a763841..058026d 100644 --- a/board/eNET/config.mk +++ b/board/eNET/config.mk @@ -22,3 +22,4 @@ # TEXT_BASE = 0x3804 +CFLAGS_dlmalloc.o += -Wa,--no-warn -fno-strict-aliasing -- 1.6.4.1.174.g32f4c ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Linux boot using bootz
Hai I am trying to boot linux in ubootv2.0.0 rc9 using the command bootz and not printing any kernel messages after *booting the kernel *messages. , Any help My log = U-Boot 2.0.0-rc10-00322-g146f9b6-dirty (Oct 20 2009 - 12:58:32) Board: Phytec phyCORE-i.MX31 NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bi t) got MAC address from EEPROM: 00:08:EE:01:86:71 Malloc space: 0x87b0 -> 0x87f0 (size 4 MB) Stack space : 0x87af8000 -> 0x87b0 (size 32 kB) Open /dev/env0 No such file or directory no valid environment found on /dev/env0. Using default environment running /env/bin/init... Hit any key to stop autoboot: 3 type update_kernel nand|nor [] to update kernel into flash type update_root nand|nor [] to update rootfs into flash uboot:/ bootargs="noinitrd console=ttymxc0 root=/dev/nfs nfsroot= 192.168.50.247: /home/arun/ltib-imx31ads-20071008/rootfs rw ip=192.168.50.182:192 .168.50.1:192.1 68.50.1:255.255.255.0" uboot:/ printenv locals: kernel=net root=net uimage=zImage_pico_final jffs2=root-pcm037.jffs2 autoboot_timeout=3 nfsroot=/home/arun/ltib-imx31ads-20071008/rootfs bootargs=noinitrd console=ttymxc0 root=/dev/nfs nfsroot=192.168.50.247: /home/aru n/ltib-imx31ads-20071008/rootfs rw ip=192.168.50.182:192.168.50.1: 192.168.50.1:2 55.255.255.0 globals: PATH=/env/bin uboot:/ tftp zImage_arun phy0: Link is up - 100/Full TFTP from server 192.168.50.247; our IP address is 192.168.50.182 Filename 'zImage_arun'. Loading: # # # # # ## done Bytes transferred = 1813660 (1bac9c hex) uboot:/ bootz zImage_arun loaded zImage from zImage_arun with size 1813660 Uncompressing Linux. .. done, booting the kernel. === ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [u-boot] [PATCH] [2/2] [v1.2] mxc_fec: avoid free() calls to already freed pointers.
Dear javier Martin, In message you wrote: > Sometimes, inside NetLoop, eth_halt() is called before eth_init() has > been called. This is harmless except for free() calls to pointers > which have not been allocated yet. This patch adds two states to > distinguish when it is necessary to call free() and when it is not. > > This has been tested in i.MX27 Litekit board and eldk-4.2 toolchains. Thanks. > /** > + * @brief Possible values for status > + * > + * fec_halt() changes the status to FEC_HALT_STATUS and fec_init() > + * changes the status to FEC_INIT_STATUS > + */ > +#define FEC_HALT_STATUS 0 > +#define FEC_INIT_STATUS 1 It would seem more logical to me if you swapped names around, i. e. please use FEC_STATUS_INIT and FEC_STATUS_HALT. Also, we might consider using an enum here? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Dear Lord: I just want *one* one-armed manager so I never have to hear "On the other hand", again. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] ppc/85xx: make boot from NAND full relocation to RAM
Take advantage of the latest full relocation commit of PPC platform for boot from NAND. Signed-off-by: Mingkai Hu --- Changelog: - according to Scott's comments to seperate this patch. cpu/mpc85xx/u-boot-nand.lds |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/cpu/mpc85xx/u-boot-nand.lds b/cpu/mpc85xx/u-boot-nand.lds index a0fc8f1..b4c63e2 100644 --- a/cpu/mpc85xx/u-boot-nand.lds +++ b/cpu/mpc85xx/u-boot-nand.lds @@ -58,7 +58,6 @@ SECTIONS .text : { *(.text) -*(.fixup) *(.got1) } :text _etext = .; -- 1.6.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] fsl_elbc_nand: remove the bbt descriptors relocation fixup
The commit 66372fe2 manually relocated the bbt pattern pointer, which can be removed by using full relocation. Signed-off-by: Mingkai Hu --- drivers/mtd/nand/fsl_elbc_nand.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index 50cb4aa..146e9bf 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c @@ -766,9 +766,6 @@ int board_nand_init(struct nand_chip *nand) nand->waitfunc = fsl_elbc_wait; /* set up nand options */ - /* redirect the pointer of bbt pattern to RAM */ - bbt_main_descr.pattern = bbt_pattern; - bbt_mirror_descr.pattern = mirror_pattern; nand->bbt_td = &bbt_main_descr; nand->bbt_md = &bbt_mirror_descr; @@ -815,7 +812,6 @@ int board_nand_init(struct nand_chip *nand) /* Large-page-specific setup */ if (or & OR_FCM_PGS) { priv->page_size = 1; - largepage_memorybased.pattern = scan_ff_pattern; nand->badblock_pattern = &largepage_memorybased; /* adjust ecc setup if needed */ -- 1.6.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] trouble with u-boot and bist fail on pcie adapter
Hi Ayman, On Monday 19 October 2009 18:19:47 ay...@elkhashab.com wrote: > Per your suggestion, we tried setting the delay (and observed a delay), > but the outcome did not change. The BIST still got set to fail and > caused the board to become unresponsive, and thus Linux fails the detection > later. FWIW, we've tried both with and without switches in between with no > change in the behavior. We observe the transactions on a lecroy pcie > analyzer. OK, thanks for reporting. > I suppose one question that lingers in my mind is why does u-boot do > anything other than just configure the IO/MEM bars? Is there some specific > reason it is touching the BIST controls? Could you please check the 4xx PCIe code (cpu/ppc4xx/4xx_pcie.c), where exactly the BIST is "touched". A quick scan through the source didn't reveal such an access to me. Could be I missed it though. Cheers, 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