[U-Boot] [PATCH] powerpc/fm: fix TBI PHY address settings
From: shaohui xie TBI PHY address (TBIPA) register is set in general frame manager phy init funciton dtsec_init_phy() in drivers/net/fm/eth.c, and it is supposed to set TBIPA on FM1@DTSEC1 in case of FM1@DTSEC1 isn't used directly, which provides MDIO for other ports. So following code is wrong in case of FM2, which has a different mac base. struct dtsec *regs = (struct dtsec *)fm_eth->mac->base; /* Assign a Physical address to the TBI */ out_be32(®s->tbipa, CONFIG_SYS_TBIPA_VALUE); Signed-off-by: Shaohui Xie --- drivers/net/fm/eth.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c index 2b616ad..c8dc1d0 100644 --- a/drivers/net/fm/eth.c +++ b/drivers/net/fm/eth.c @@ -65,7 +65,7 @@ void dtsec_configure_serdes(struct fm_eth *priv) static void dtsec_init_phy(struct eth_device *dev) { struct fm_eth *fm_eth = dev->priv; - struct dtsec *regs = (struct dtsec *)fm_eth->mac->base; + struct dtsec *regs = (struct dtsec *)CONFIG_SYS_FSL_FM1_DTSEC1_ADDR; /* Assign a Physical address to the TBI */ out_be32(®s->tbipa, CONFIG_SYS_TBIPA_VALUE); -- 1.6.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] powerpc/espi: remove write command length check
Current espi controller driver assumes the command length of write command is not equal to '1', it was made based on SPANSION SPI flash, but some SPI flash driver such as SST does use write command length as '1', so write command on SST SPI flash will not work. And the length check for write command is not necessary for SPANSION, though it's harmless for SPANSION, it will stop write operation on flashes like SST, so we remove the check. Signed-off-by: Shaohui Xie --- drivers/spi/fsl_espi.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/spi/fsl_espi.c b/drivers/spi/fsl_espi.c index a1ebd33..eb99e90 100644 --- a/drivers/spi/fsl_espi.c +++ b/drivers/spi/fsl_espi.c @@ -216,10 +216,8 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *data_out, return 1; } memcpy(buffer, cmd_buf, cmd_len); - if (cmd_len != 1) { - if (data_in == NULL) - memcpy(buffer + cmd_len, data_out, data_len); - } + if (data_in == NULL) + memcpy(buffer + cmd_len, data_out, data_len); break; case SPI_XFER_BEGIN | SPI_XFER_END: len = data_len; -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] m28: Properly configure the SPI flash chipselect
Am 12/10/2012 04:08, schrieb Marek Vasut: > Dear Tom Rini, > >> The SPI flash is not properly detected by plain "sf probe" due to >> it being located on different bus and different chipselect. Fix >> this problem. >> >> Signed-off-by: Marek Vasut >> Cc: Stefano Babic >> Cc: Tom Rini > [...] > > Please apply for .10 release, this is an important bugfix. Tested by DUTS as > of > now. So should Tom apply it directly to u-boot/master or do you think we follow the usual path through u-boot-imx/master ? Stefano -- = DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 09/21] pmic: Extend struct pmic to support battery and charger related operations
Hi Stefano, > Am 05/10/2012 10:16, schrieb Lukasz Majewski: > > Now it is possible to provide specific function per PMIC/power > > device instance. > > > > Signed-off-by: Lukasz Majewski > > Signed-off-by: Kyungmin Park > > --- > > Changes for v2: > > - New at patch v2 > > --- > > Hi Lucasz, > > > include/power/battery.h | 38 > > ++ include/power/pmic.h| > > 23 ++- 2 files changed, 60 insertions(+), 1 > > deletions(-) create mode 100644 include/power/battery.h > > > > diff --git a/include/power/battery.h b/include/power/battery.h > > new file mode 100644 > > index 000..e2fec68 > > --- /dev/null > > +++ b/include/power/battery.h > > @@ -0,0 +1,38 @@ > > +/* > > + * Copyright (C) 2012 Samsung Electronics > > + * Lukasz Majewski > > + * > > + * See file CREDITS for list of people who contributed to this > > + * project. > > + * > > + * This program is free software; you can redistribute it and/or > > + * modify it under the terms of the GNU General Public License as > > + * published by the Free Software Foundation; either version 2 of > > + * the License, or (at your option) any later version. > > + * > > + * This program is distributed in the hope that it will be useful, > > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > > + * GNU General Public License for more details. > > + * > > + * You should have received a copy of the GNU General Public > > License > > + * along with this program; if not, write to the Free Software > > + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, > > + * MA 02111-1307 USA > > + */ > > + > > +#ifndef __POWER_BATTERY_H_ > > +#define __POWER_BATTERY_H_ > > + > > +struct battery { > > + unsigned int version; > > + unsigned int state_of_chrg; > > + unsigned int time_to_empty; > > + unsigned int capacity; > > + unsigned int voltage_uV; > > + > > + unsigned int state; > > +}; > > + > > +int power_bat_init(unsigned char bus); > > +#endif /* __POWER_BATTERY_H_ */ > > diff --git a/include/power/pmic.h b/include/power/pmic.h > > index 3583342..5ec7bae 100644 > > --- a/include/power/pmic.h > > +++ b/include/power/pmic.h > > @@ -27,8 +27,9 @@ > > #include > > #include > > #include > > +#include > > > > -enum { PMIC_I2C, PMIC_SPI, }; > > +enum { PMIC_I2C, PMIC_SPI, PMIC_NONE}; > > enum { I2C_PMIC, I2C_NUM, }; > > enum { PMIC_READ, PMIC_WRITE, }; > > enum { PMIC_BYTE_ORDER_REVERSED, PMIC_BYTE_ORDER_NORMAL, }; > > @@ -48,6 +49,21 @@ struct p_spi { > > u32 (*prepare_tx)(u32 reg, u32 *val, u32 write); > > }; > > > > +struct pmic; > > +struct power_battery { > > + struct battery *bat; > > + > > + int (*fg_battery_check) (struct pmic *p, struct pmic *bat); > > + int (*fg_battery_update) (struct pmic *p, struct pmic > > *bat); + > > + int (*chrg_type) (struct pmic *p); > > + int (*chrg_bat_present) (struct pmic *p); > > + int (*chrg_state) (struct pmic *p, int state, int current); > > + > > + /* Keep info about power devices involved with battery > > operation */ > > + struct pmic *chrg, *fg, *muic; > > +}; > > + > > struct pmic { > > const char *name; > > unsigned char bus; > > @@ -59,6 +75,11 @@ struct pmic { > > struct p_spi spi; > > } hw; > > > > + struct power_battery *pwr_bat; > > + int (*battery_init) (struct pmic *p, struct pmic *bat); > > If we add entry points to the pmic structure, I do not expect to pass > the pointer of the structure itself, or I could call the function with > another pointer: > > p->battery_init(p1, bat); > > So p should be hide, stored during the initialization of PMIC itself > > > + int (*battery_charge) (struct pmic *bat); > > + void (*low_power_mode) (void); > > + > > struct list_head list; > > }; > > > > I have some concerns regarding this structure. It seems to me very > coupled to the PMIC you are using. > > Reading this and the next patches it seems to me that is due because > your PMIC includes other three PMICs. However, IMHO the interface > presented before this patch is very clear. > > I have expected something as: > > P = get_pmic("CHRG"); > p->chrg_state(current); I use explicit name to get access to e.g. charger (instead of "CHRG" I use "MAX8997_PMIC"). We can define the "CHRG" at ./include/configs/{board.h} file as #define CHRG MAX8997_PMIC. This is not a problem. > > And if the problem is that this PMIC really descend from another one, > we could add a "struct pmic *parent" in the pmic itself. You already > introduced lists, and we can work with pointer instead of hard-code > the subpmics as in : > struct pmic *chrg, *fg, *muic; I've considered using of "parents" there. But for the sake of simpler code (or rather simpler logical view), I wanted to use the "flat" structure. The "flat" structure is OK with PMIC, MUIC, Fuel gauge (since those are in the same
Re: [U-Boot] [PATCH] m28: Properly configure the SPI flash chipselect
Dear Stefano Babic, > Am 12/10/2012 04:08, schrieb Marek Vasut: > > Dear Tom Rini, > > > >> The SPI flash is not properly detected by plain "sf probe" due to > >> it being located on different bus and different chipselect. Fix > >> this problem. > >> > >> Signed-off-by: Marek Vasut > >> Cc: Stefano Babic > >> Cc: Tom Rini > > > > [...] > > > > Please apply for .10 release, this is an important bugfix. Tested by DUTS > > as of now. > > So should Tom apply it directly to u-boot/master or do you think we > follow the usual path through u-boot-imx/master ? I don't have any further patches, so if Tom is OK with picking it up directly, WFM. Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [ARM] [STATUS] ATTENTION: Uu-boot-arm/master branch ROLLBACK to 28e5ac2d
Hi Minkyu, On Fri, 12 Oct 2012 15:45:24 +0900, Minkyu Kang wrote: > On 12 October 2012 15:39, Minkyu Kang wrote: > > Dear Albert, > > > > On 12 October 2012 14:53, Albert ARIBAUD wrote: > >> Hi all, > >> > >> I am sending this notice because I have force-pushed a rollback of > >> u-boot-arm/master. > >> > >> This is due to the recently submitted u-boot-arm/master pull request > >> being NAKed by Tom: the content of this pull req was exactly that of > >> the latest u-boot-samsung/master pull req and was a fast forward from > >> previous u-boot-arm/master (28e5ac2d) which had received extensive > >> testing from Tom. > >> > >> Therefore, as a roll back of u-boot-arm/master was both easy to perform > >> and safe(r) from a release perspective, I decided to stray from formal > >> master branch management rules and force it back to 28e5ac2d. > >> > >> All: if you intend to send a pull request to u-boot-arm/master, please > >> rework this request to take this rollback into account. > >> > >> Minkyu: for the reasons above, I suggest you roll u-boot-samsung/master > >> back to 28e5ac2d before building and sending an amended pull req, but of > >> course the choice is yours. > >> > > > > OK. I'll revert soft i2c patches and send new pull request at next Monday. > > sorry. spi, not i2c. > > > Is it OK? It's ok, but note that it won't be included in the 2012.10 release anyway, as monday is the release date. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request: u-boot-arm/master to u-boot/master
Dear All, > -Original Message- > From: Minkyu Kang [mailto:proms...@gmail.com] > Sent: Friday, October 12, 2012 8:47 AM > To: Albert ARIBAUD; Piotr Wilczek > Cc: U-Boot; Tom Rini; Marek Vasut > Subject: Re: [U-Boot] Pull request: u-boot-arm/master to u-boot/master > > On 12 October 2012 14:55, Albert ARIBAUD > wrote: > > On Fri, 12 Oct 2012 07:36:20 +0200, Albert ARIBAUD > > wrote: > > > >> Hi Tom, > >> > >> On Thu, 11 Oct 2012 11:45:35 -0700, Tom Rini wrote: > >> > >> > On Thu, Oct 11, 2012 at 06:51:30PM +0200, Albert ARIBAUD wrote: > >> > > >> > > Hi Tom, > >> > > > >> > > The following changes since commit > >> > > 28e5ac2d974547bde0c72aa0c1d66fd22c6ef3ad: > >> > > > >> > > arm: armv7: temporarily set -mno-unaligned-access (2012-10-05 > >> > > 21:24:22 +0200) > >> > > > >> > > are available in the git repository at: > >> > > > >> > > git://git.denx.de/u-boot-arm master > >> > > > >> > > for you to fetch changes up to > 9b5dba537473578153961ee96ed23e37e1fde3f7: > >> > > > >> > > exynos4: universal_C210: use software SPI (2012-10-10 20:37:39 > >> > > +0900) > >> > > > >> > > > >> > > Chander Kashyap (1): > >> > > Exynos5250: Enable PXE Support > >> > > > >> > > Piotr Wilczek (9): > >> > > arm:exynos4:trats: Correct SDRAM configuration for trats > >> > > arm:exynos4:trats: Fix SDRAM size > >> > > arm:exynos4:pinmux: Modify the gpio function for mmc > >> > > arm:exynos4:trats: Use pinmux for mmc configuration > >> > > arm:exynos4:universal: Use pinmux for mmc configuration > >> > > arm:exynos4:universal: Eliminated low level init > >> > > arm: trats: Power down core 1 > >> > > drivers: spi: modify soft spi driver > >> > > exynos4: universal_C210: use software SPI > >> > > > >> > > ??ukasz Majewski (1): > >> > > gpio:fix: Proper handling of GPIO subsystem parts at > >> > > Samsung devices > >> > > > >> > > arch/arm/cpu/armv7/exynos/pinmux.c | 58 > >> > > arch/arm/include/asm/arch-exynos/gpio.h | 19 ++ > >> > > arch/arm/include/asm/arch-exynos/periph.h|1 + > >> > > arch/arm/include/asm/arch-s5pc1xx/gpio.h |7 +- > >> > > board/samsung/trats/trats.c | 80 ++ > >> > > board/samsung/universal_c210/Makefile|1 - > >> > > board/samsung/universal_c210/lowlevel_init.S | 395 > >> > > -- > >> > > board/samsung/universal_c210/universal.c | 116 > >> > > drivers/gpio/s5p_gpio.c |6 +- > >> > > drivers/spi/soft_spi.c |3 + > >> > > include/configs/s5pc210_universal.h | 21 ++ > >> > > include/configs/smdk5250.h |6 + > >> > > include/configs/trats.h | 17 +- 13 files > >> > > changed, 209 insertions(+), 521 deletions(-) delete mode 100644 > >> > > board/samsung/universal_c210/lowlevel_init.S > >> > > >> > NAK, sorry. We have a two problems now: > >> > - On PowerPC we have which takes > but > >> > boards which do use soft_spi.c and now fail (taihu sacsng) > >> > - zipitz2 has the same problem (cc'ing Marek) > >> > >> Now that's very weird. I *know* I had issues with zipitz2 among > >> others when I git am'd the commits while the git server was down; > >> then when I could fetch u-boot/samsung I re-tested > >> u-boot-samsung/master in itself then merged into u-boot-arm/master, > >> and I *know* those ran fine... And now they don't. Something's fishy > >> in my git repo. :( > >> > >> In any case: NAK fully understood and agreed upon, in my capacity as > >> a custodian, back-ported into ARM repo, i.e. I've rolled back ARM > >> master to where it was before the (ff) merge. > >> > >> Also, actually CC:ing Marek, as well as Minkyu. > > > > *Actually* CC:ing Minkyu... > > > > CC:ing Piotr. The problem is caused by my patch. I will fix it as soon as possible. Regards, Piotr Wilczek > > > -- > from. prom. > www.promsoft.net ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] U-Boot git usage model
Hi Scott, On Thu, 11 Oct 2012 13:59:31 -0500, Scott Wood wrote: > On 10/11/2012 01:45:02 PM, Albert ARIBAUD wrote: > > Hi Scott, > > > > On Thu, 11 Oct 2012 13:13:33 -0500, Scott Wood > > wrote: > > > > > FWIW I think putting policy documents in a wiki, without any > > > guidance on who's supposed to edit it or how changes get approved, > > is a > > > bad idea. Why not put policy documents in the git-managed source > > > tree? And changes would be > > > proposed, discussed, and accepted/rejected like any other change. > > Plus > > > there'd be at least a chance of a commit message showing rationale. > > > > While I can see the benefits you find in this, is it not based on > > the unspoken axiom that the project's policies should necessarily be > > subject to a democratic process? > > Process is othogonal to revision control. We could vote on whether a > policy patch gets applied, though I do not think U-Boot is currently > democraticly run, except to the extent that Wolfgang sometimes changes > his mind if enough people complain. I do not know of any existing > democratic process for approving a wiki update, and would hesitate to > just go make a change. My remark was that Stephen took the democracy for granted in the process, not that there was a relationship to be drawn between process and revision control. > As for the merits of the policy itself, I find maintainer signoffs to > be useful, for example to distinguish a patch that I've applied locally > versus one that I've fetched from upstream. This you can see by looking at the upstream branch tip, the patch's committer identity or by doing a git branch -r --contains . > -Scott Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] m28: Properly configure the SPI flash chipselect
Am 12/10/2012 10:07, schrieb Marek Vasut: > Dear Stefano Babic, > >> Am 12/10/2012 04:08, schrieb Marek Vasut: >>> Dear Tom Rini, >>> The SPI flash is not properly detected by plain "sf probe" due to it being located on different bus and different chipselect. Fix this problem. Signed-off-by: Marek Vasut Cc: Stefano Babic Cc: Tom Rini >>> >>> [...] >>> >>> Please apply for .10 release, this is an important bugfix. Tested by DUTS >>> as of now. >> >> So should Tom apply it directly to u-boot/master or do you think we >> follow the usual path through u-boot-imx/master ? > > I don't have any further patches, so if Tom is OK with picking it up > directly, > WFM. Ok, fine with m, of course ! Stefano -- = DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] FEC: Rework RX buffer init
Hi Marek, On Wed, 10 Oct 2012 00:43:33 +0200, Marek Vasut wrote: > Rework the RX buffer init so that it's easier to understand. > Firstly, allocate the whole RX buffer as one large continuous > piece of memory. Also, drop all these writel() accessors used > on the FEC RX DMA descriptor, since it's all flat bogus. I'd like this commit message to be more usefully descriptive than "all flat bogus". What exactly is bogus in it? > Finally, this makes recoverable stalls of the FEC on i.MX28 > disappear completely. Are both the single allocation change and the writel() change needed for this? Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] phylib: Enable SMSC LAN87xx PHY support
LAN8720 PHY is used on Freescale C2X0QDS board. Signed-off-by: Mingkai Hu diff --git a/include/config_phylib_all_drivers.h b/include/config_phylib_all_drivers.h index 1db7cec..12828c6 100644 --- a/include/config_phylib_all_drivers.h +++ b/include/config_phylib_all_drivers.h @@ -23,6 +23,7 @@ #define CONFIG_PHY_NATSEMI #define CONFIG_PHY_LXT #define CONFIG_PHY_ATHEROS +#define CONFIG_PHY_SMSC #ifdef CONFIG_PHYLIB_10G #define CONFIG_PHY_TERANETICS -- 1.7.5.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Host driver for ISP1362?
I am working on a embedded board that uses a BF537 (Blackfin) and ISP1362 USB controller. I want to access a USB flash drive from U-Boot. But I haven't been able to find the drivers for the ISP1362. I have found two other U-Boot target platforms that at least reference the ISP1362: In include/configs/NSCU.h, I found this: #define CONFIG_ISP1362_USB /* ISP1362 USB OTG controller */ #ifdef CONFIG_ISP1362_USB #define CONFIG_SYS_ISP1362_BASE 0xD000 #define CONFIG_SYS_ISP1362_OR_AM0x8000 #define CONFIG_SYS_OR5_ISP1362 (CONFIG_SYS_ISP1362_OR_AM | OR_CSNT_SAM | \ OR_ACS_DIV2 | OR_BI | OR_SCY_5_CLK) #define CONFIG_SYS_BR5_ISP1362 ((CONFIG_SYS_ISP1362_BASE & BR_BA_MSK) | \ BR_PS_16 | BR_MS_GPCM | BR_V ) #endif And in board/tqc/tqm8xx/tqm8xx.c: #ifdef CONFIG_ISP1362_USB memctl->memc_or5 = CONFIG_SYS_OR5_ISP1362; memctl->memc_br5 = CONFIG_SYS_BR5_ISP1362; #endif The first of those certainly appears to be setting up a driver for the ISP1362, but I haven't been able to find that driver. Any pointers would be greatly appreciated. Steve ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [ARM] [STATUS] ATTENTION: Uu-boot-arm/master branch ROLLBACK to 28e5ac2d
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/12/12 03:00, Albert ARIBAUD wrote: > Hi Minkyu, > > On Fri, 12 Oct 2012 15:45:24 +0900, Minkyu Kang > wrote: > >> On 12 October 2012 15:39, Minkyu Kang >> wrote: >>> Dear Albert, >>> >>> On 12 October 2012 14:53, Albert ARIBAUD >>> wrote: Hi all, I am sending this notice because I have force-pushed a rollback of u-boot-arm/master. This is due to the recently submitted u-boot-arm/master pull request being NAKed by Tom: the content of this pull req was exactly that of the latest u-boot-samsung/master pull req and was a fast forward from previous u-boot-arm/master (28e5ac2d) which had received extensive testing from Tom. Therefore, as a roll back of u-boot-arm/master was both easy to perform and safe(r) from a release perspective, I decided to stray from formal master branch management rules and force it back to 28e5ac2d. All: if you intend to send a pull request to u-boot-arm/master, please rework this request to take this rollback into account. Minkyu: for the reasons above, I suggest you roll u-boot-samsung/master back to 28e5ac2d before building and sending an amended pull req, but of course the choice is yours. >>> >>> OK. I'll revert soft i2c patches and send new pull request at >>> next Monday. >> >> sorry. spi, not i2c. >> >>> Is it OK? > > It's ok, but note that it won't be included in the 2012.10 release > anyway, as monday is the release date. Indeed. If you want to split out any critical fixes from the spi patches and get that out today or tomorrow I can build-test things again. - -- Tom -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQIcBAEBAgAGBQJQeCpXAAoJENk4IS6UOR1Wxy4P/0WNN+lMAt9/gutSdOR+ZjnF DqnlcTtNATqsoSzBYToHvineXmvHrz7G00MATgIE8rXvv+cIOnuvJJCmDv8+FAza 0qtaJCA61c7K05A6RyvnXs829kDpHvak10VfeAdDQ/XvBUSo+lePALp+q2KzHgx1 /TfjXrhkvl8WQsjgtmdrFdHSZnnpJoEi0TTXOmqllawmElapEh9ZOcNUazfN7/pj 51SxtXNb/oc4yXC8hJpILk+ArtACVPktU6SPnhnco1j43RQ4Q1REFUonZW1H0SNV gaJqsYrXc4f7z+zgDZjtjCXp7S21P88bHbvw8PoPBuJC+ipxwL4dkSlpwoC//5s1 5ooGEBVJ44PlYagwj7ThcAlOy6zuOahCT7dDYN6/6EWPbf5REfl04kf6ObBgigN7 BmxVko6mFTYLsWXQY6xHvyWf1OG/2vLMUr3zqkco5W4VkKOLn/+wHktLcqnBghAC NqY9eh1oUrWSQq1RHrJWoXHDPLxv0Mcq/EUN0IclY9xM+4KW4TFlxD+kO6hxNpGJ zv1wIfRUM+jkEgCoX75IajBwtMU9Q1QF2NABnsyoxfeBOy+2b3nzsKvwSwXLlthD 9UwKu1TaAC9LHP4cZSg1foMaiukQM2IfaB7+55fQ6R8MK0ZmzN7CHclQI0ok+NhT wCfbiI3vlptpqW1+qc2c =2jCx -END PGP SIGNATURE- ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/6] EXYNOS: Add support for Exynos4x10
This patch series adds Register base addresses, clock, gpio, power and system structures for Exynos4x10. Piotr Wilczek (6): Exynos: Exynos4x10: Add base addresses for Exynos4x10 Exynos: Exynos4x10: Add clock structure for exynos4x10 Exynos: Exynos4x10: Add gpio structure for Exynos4X10 Exynos: Exynos4x10: add power structure for Exynos4x10 Exynos: Exynos4x10: add sysreg structure for exynos4x10 arm: trats: Use exynos4x10 structures on Trats board arch/arm/include/asm/arch-exynos/clock.h | 236 + arch/arm/include/asm/arch-exynos/cpu.h| 43 +- arch/arm/include/asm/arch-exynos/gpio.h | 47 ++ arch/arm/include/asm/arch-exynos/power.h | 201 arch/arm/include/asm/arch-exynos/system.h |9 + board/samsung/trats/trats.c | 40 +++--- 6 files changed, 551 insertions(+), 25 deletions(-) -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/6] Exynos: Exynos4x10: Add base addresses for Exynos4x10
This patch add base addresses for Exynos4x10 registers. Signed-off-by: Piotr Wilczek Signed-off-by: Kyungmin Park CC: Minkyu Kang --- Depends on <1349171443-13624-1-git-send-email-chander.kash...@linaro.org> arch/arm/include/asm/arch-exynos/cpu.h | 43 --- 1 files changed, 38 insertions(+), 5 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/cpu.h b/arch/arm/include/asm/arch-exynos/cpu.h index 3ecb7d5..76ee668 100644 --- a/arch/arm/include/asm/arch-exynos/cpu.h +++ b/arch/arm/include/asm/arch-exynos/cpu.h @@ -60,6 +60,36 @@ #define EXYNOS4_GPIO_PART4_BASEDEVICE_NOT_AVAILABLE #define EXYNOS4_DP_BASEDEVICE_NOT_AVAILABLE +/* EXYNOS4X10 */ +#define EXYNOS4X10_GPIO_PART3_BASE 0x0386 +#define EXYNOS4X10_PRO_ID 0x1000 +#define EXYNOS4X10_SYSREG_BASE 0x1001 +#define EXYNOS4X10_POWER_BASE 0x1002 +#define EXYNOS4X10_SWRESET 0x10020400 +#define EXYNOS4X10_CLOCK_BASE 0x1003 +#define EXYNOS4X10_SYSTIMER_BASE 0x1005 +#define EXYNOS4X10_WATCHDOG_BASE 0x1006 +#define EXYNOS4X10_MIU_BASE0x1060 +#define EXYNOS4X10_DMC0_BASE 0x1040 +#define EXYNOS4X10_DMC1_BASE 0x1041 +#define EXYNOS4X10_GPIO_PART2_BASE 0x1100 +#define EXYNOS4X10_GPIO_PART1_BASE 0x1140 +#define EXYNOS4X10_FIMD_BASE 0x11C0 +#define EXYNOS4X10_MIPI_DSIM_BASE 0x11C8 +#define EXYNOS4X10_USBOTG_BASE 0x1248 +#define EXYNOS4X10_MMC_BASE0x1251 +#define EXYNOS4X10_SROMC_BASE 0x1257 +#define EXYNOS4X10_USB_HOST_EHCI_BASE 0x1258 +#define EXYNOS4X10_USBPHY_BASE 0x125B +#define EXYNOS4X10_UART_BASE 0x1380 +#define EXYNOS4X10_I2C_BASE0x1386 +#define EXYNOS4X10_ADC_BASE0x1391 +#define EXYNOS4X10_PWMTIMER_BASE 0x139D +#define EXYNOS4X10_MODEM_BASE 0x13A0 + +#define EXYNOS4X10_GPIO_PART4_BASE DEVICE_NOT_AVAILABLE +#define EXYNOS4X10_DP_BASE DEVICE_NOT_AVAILABLE + /* EXYNOS5 */ #define EXYNOS5_I2C_SPACING0x1 @@ -153,12 +183,15 @@ IS_EXYNOS_TYPE(exynos5250, 0x5250) #define SAMSUNG_BASE(device, base) \ static inline unsigned int samsung_get_base_##device(void) \ { \ - if (cpu_is_exynos4()) \ - return EXYNOS4_##base; \ - else if (cpu_is_exynos5()) \ + if (cpu_is_exynos4()) { \ + if (proid_is_exynos4210()) \ + return EXYNOS4X10_##base; \ + else\ + return EXYNOS4_##base; \ + } else if (cpu_is_exynos5()) { \ return EXYNOS5_##base; \ - else\ - return 0; \ + } \ + return 0; \ } SAMSUNG_BASE(adc, ADC_BASE) -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/6] Exynos: Exynos4x10: Add clock structure for exynos4x10
This patch adds clock structure for Exynos4x10. Signed-off-by: Piotr Wilczek Signed-off-by: Kyungmin Park CC: Minkyu Kang --- arch/arm/include/asm/arch-exynos/clock.h | 236 ++ 1 files changed, 236 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/clock.h b/arch/arm/include/asm/arch-exynos/clock.h index fce38ef..1b5c48c 100644 --- a/arch/arm/include/asm/arch-exynos/clock.h +++ b/arch/arm/include/asm/arch-exynos/clock.h @@ -251,6 +251,242 @@ struct exynos4_clock { unsigned intdiv_iem_l1; }; +struct exynos4x10_clock { + unsigned char res1[0x4200]; + unsigned intsrc_leftbus; + unsigned char res2[0x1fc]; + unsigned intmux_stat_leftbus; + unsigned char res4[0xfc]; + unsigned intdiv_leftbus; + unsigned char res5[0xfc]; + unsigned intdiv_stat_leftbus; + unsigned char res6[0x1fc]; + unsigned intgate_ip_leftbus; + unsigned char res7[0x1fc]; + unsigned intclkout_leftbus; + unsigned intclkout_leftbus_div_stat; + unsigned char res8[0x37f8]; + unsigned intsrc_rightbus; + unsigned char res9[0x1fc]; + unsigned intmux_stat_rightbus; + unsigned char res10[0xfc]; + unsigned intdiv_rightbus; + unsigned char res11[0xfc]; + unsigned intdiv_stat_rightbus; + unsigned char res12[0x1fc]; + unsigned intgate_ip_rightbus; + unsigned char res13[0x1fc]; + unsigned intclkout_rightbus; + unsigned intclkout_rightbus_div_stat; + unsigned char res14[0x3608]; + unsigned intepll_lock; + unsigned char res15[0xc]; + unsigned intvpll_lock; + unsigned char res16[0xec]; + unsigned intepll_con0; + unsigned intepll_con1; + unsigned char res17[0x8]; + unsigned intvpll_con0; + unsigned intvpll_con1; + unsigned char res18[0xe8]; + unsigned intsrc_top0; + unsigned intsrc_top1; + unsigned char res19[0x8]; + unsigned intsrc_cam; + unsigned intsrc_tv; + unsigned intsrc_mfc; + unsigned intsrc_g3d; + unsigned intsrc_image; + unsigned intsrc_lcd0; + unsigned intsrc_lcd1; + unsigned intsrc_maudio; + unsigned intsrc_fsys; + unsigned char res20[0xc]; + unsigned intsrc_peril0; + unsigned intsrc_peril1; + unsigned char res21[0xb8]; + unsigned intsrc_mask_top; + unsigned char res22[0xc]; + unsigned intsrc_mask_cam; + unsigned intsrc_mask_tv; + unsigned char res23[0xc]; + unsigned intsrc_mask_lcd0; + unsigned intsrc_mask_lcd1; + unsigned intsrc_mask_maudio; + unsigned intsrc_mask_fsys; + unsigned char res24[0xc]; + unsigned intsrc_mask_peril0; + unsigned intsrc_mask_peril1; + unsigned char res25[0xb8]; + unsigned intmux_stat_top; + unsigned char res26[0x14]; + unsigned intmux_stat_mfc; + unsigned intmux_stat_g3d; + unsigned intmux_stat_image; + unsigned char res27[0xdc]; + unsigned intdiv_top; + unsigned char res28[0xc]; + unsigned intdiv_cam; + unsigned intdiv_tv; + unsigned intdiv_mfc; + unsigned intdiv_g3d; + unsigned intdiv_image; + unsigned intdiv_lcd0; + unsigned intdiv_lcd1; + unsigned intdiv_maudio; + unsigned intdiv_fsys0; + unsigned intdiv_fsys1; + unsigned intdiv_fsys2; + unsigned intdiv_fsys3; + unsigned intdiv_peril0; + unsigned intdiv_peril1; + unsigned intdiv_peril2; + unsigned intdiv_peril3; + unsigned intdiv_peril4; + unsigned intdiv_peril5; + unsigned char res29[0x18]; + unsigned intdiv2_ratio; + unsigned char res30[0x8c]; + unsigned intdiv_stat_top; + unsigned char res31[0xc]; + unsigned intdiv_stat_cam; + unsigned intdiv_stat_tv; + unsigned intdiv_stat_mfc; + unsigned intdiv_stat_g3d; + unsigned intdiv_stat_image; + unsigned intdiv_stat_lcd0; + unsigned intdiv_stat_lcd1; + unsigned intdiv_stat_maudio; + unsigned intdiv_stat_fsys0; + unsigned intdiv_stat_fsys1; + unsigned intdiv_stat_fsys2; + unsigned intdiv_stat_fsys3; + unsigned intdiv_stat_peril0; + unsigned intdiv_stat_peril1; + unsigned intdiv_stat_peril2; + unsigned intdiv_stat_peril3; + unsigned intdiv_stat_peril4; + unsigned intdiv_stat_peril5; + unsigned char res32[0x18]; + unsigned intdiv2_stat; + unsigned char res33[
[U-Boot] [PATCH 3/6] Exynos: Exynos4x10: Add gpio structure for Exynos4X10
This patch adds gpio structure for Exynos4x10. Signed-off-by: Piotr Wilczek Signed-off-by: Kyungmin Park CC: Minkyu Kang --- arch/arm/include/asm/arch-exynos/gpio.h | 47 +++ 1 files changed, 47 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/gpio.h b/arch/arm/include/asm/arch-exynos/gpio.h index 97be4ea..923802a 100644 --- a/arch/arm/include/asm/arch-exynos/gpio.h +++ b/arch/arm/include/asm/arch-exynos/gpio.h @@ -79,6 +79,53 @@ struct exynos4_gpio_part3 { struct s5p_gpio_bank z; }; +struct exynos4x10_gpio_part1 { + struct s5p_gpio_bank a0; + struct s5p_gpio_bank a1; + struct s5p_gpio_bank b; + struct s5p_gpio_bank c0; + struct s5p_gpio_bank c1; + struct s5p_gpio_bank d0; + struct s5p_gpio_bank d1; + struct s5p_gpio_bank e0; + struct s5p_gpio_bank e1; + struct s5p_gpio_bank e2; + struct s5p_gpio_bank e3; + struct s5p_gpio_bank e4; + struct s5p_gpio_bank f0; + struct s5p_gpio_bank f1; + struct s5p_gpio_bank f2; + struct s5p_gpio_bank f3; +}; + +struct exynos4x10_gpio_part2 { + struct s5p_gpio_bank j0; + struct s5p_gpio_bank j1; + struct s5p_gpio_bank k0; + struct s5p_gpio_bank k1; + struct s5p_gpio_bank k2; + struct s5p_gpio_bank k3; + struct s5p_gpio_bank l0; + struct s5p_gpio_bank l1; + struct s5p_gpio_bank l2; + struct s5p_gpio_bank y0; + struct s5p_gpio_bank y1; + struct s5p_gpio_bank y2; + struct s5p_gpio_bank y3; + struct s5p_gpio_bank y4; + struct s5p_gpio_bank y5; + struct s5p_gpio_bank y6; + struct s5p_gpio_bank res1[80]; + struct s5p_gpio_bank x0; + struct s5p_gpio_bank x1; + struct s5p_gpio_bank x2; + struct s5p_gpio_bank x3; +}; + +struct exynos4x10_gpio_part3 { + struct s5p_gpio_bank z; +}; + struct exynos5_gpio_part1 { struct s5p_gpio_bank a0; struct s5p_gpio_bank a1; -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/6] Exynos: Exynos4x10: add power structure for Exynos4x10
This patch adds power structure for Exynos4x10. Signed-off-by: Piotr Wilczek Signed-off-by: Kyungmin Park CC: Minkyu Kang --- arch/arm/include/asm/arch-exynos/power.h | 201 ++ 1 files changed, 201 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/power.h b/arch/arm/include/asm/arch-exynos/power.h index d2fdb59..4eba96c 100644 --- a/arch/arm/include/asm/arch-exynos/power.h +++ b/arch/arm/include/asm/arch-exynos/power.h @@ -226,6 +226,207 @@ struct exynos4_power { unsigned intgps_alive_option; }; +struct exynos4x10_power { + unsigned intom_stat; + unsigned char res1[0x8]; + unsigned intrtc_clko_sel; + unsigned intgnss_rtc_out_ctrl; + unsigned char res2[0x1ec]; + unsigned intsystem_power_down_ctrl; + unsigned char res3[0x1]; + unsigned intsystem_power_down_option; + unsigned char res4[0x1f4]; + unsigned intswreset; + unsigned intrst_stat; + unsigned char res5[0x1f8]; + unsigned intwakeup_stat; + unsigned inteint_wakeup_mask; + unsigned intwakeup_mask; + unsigned char res6[0xf4]; + unsigned inthdmi_phy_control; + unsigned intusbdevice_phy_control; + unsigned intusbhost_phy_control; + unsigned intdac_phy_control; + unsigned intmipi_phy0_control; + unsigned intmipi_phy1_control; + unsigned intadc_phy_control; + unsigned intpcie_phy_control; + unsigned intsata_phy_control; + unsigned char res7[0xdc]; + unsigned intinform0; + unsigned intinform1; + unsigned intinform2; + unsigned intinform3; + unsigned intinform4; + unsigned intinform5; + unsigned intinform6; + unsigned intinform7; + unsigned char res8[0x1e0]; + unsigned intpmu_debug; + unsigned char res9[0x5fc]; + unsigned intarm_core0_sys_pwr_reg; + unsigned char res10[0xc]; + unsigned intarm_core1_sys_pwr_reg; + unsigned char res11[0x6c]; + unsigned intarm_common_sys_pwr_reg; + unsigned char res12[0x3c]; + unsigned intarm_cpu_l2_0_sys_pwr_reg; + unsigned intarm_cpu_l2_1_sys_pwr_reg; + unsigned char res13[0x38]; + unsigned intcmu_aclkstop_sys_pwr_reg; + unsigned intcmu_sclkstop_sys_pwr_reg; + unsigned char res14[0x4]; + unsigned intcmu_reset_sys_pwr_reg; + unsigned char res15[0x10]; + unsigned intapll_sysclk_sys_pwr_reg; + unsigned intmpll_sysclk_sys_pwr_reg; + unsigned intvpll_sysclk_sys_pwr_reg; + unsigned intepll_sysclk_sys_pwr_reg; + unsigned char res16[0x8]; + unsigned intcmu_clkstop_gps_alive_sys_pwr_reg; + unsigned intcmu_reset_gps_alive_sys_pwr_reg; + unsigned intcmu_clkstop_cam_sys_pwr_reg; + unsigned intcmu_clkstop_tv_sys_pwr_reg; + unsigned intcmu_clkstop_mfc_sys_pwr_reg; + unsigned intcmu_clkstop_g3d_sys_pwr_reg; + unsigned intcmu_clkstop_lcd0_sys_pwr_reg; + unsigned intcmu_clkstop_lcd1_sys_pwr_reg; + unsigned intcmu_clkstop_maudio_sys_pwr_reg; + unsigned intcmu_clkstop_gps_sys_pwr_reg; + unsigned intcmu_reset_cam_sys_pwr_reg; + unsigned intcmu_reset_tv_sys_pwr_reg; + unsigned intcmu_reset_mfc_sys_pwr_reg; + unsigned intcmu_reset_g3d_sys_pwr_reg; + unsigned intcmu_reset_lcd0_sys_pwr_reg; + unsigned intcmu_reset_lcd1_sys_pwr_reg; + unsigned intcmu_reset_maudio_sys_pwr_reg; + unsigned intcmu_reset_gps_sys_pwr_reg; + unsigned inttop_bus_sys_pwr_reg; + unsigned inttop_retention_sys_pwr_reg; + unsigned inttop_pwr_sys_pwr_reg; + unsigned char res17[0x1c]; + unsigned intlogic_reset_sys_pwr_reg; + unsigned char res18[0x14]; + unsigned intonenandxl_mem_sys_pwr_reg; + unsigned intmodemif_mem_sys_pwr_reg; + unsigned char res19[0x4]; + unsigned intusbdevice_mem_sys_pwr_reg; + unsigned intsdmmc_mem_sys_pwr_reg; + unsigned intcssys_mem_sys_pwr_reg; + unsigned intsecss_mem_sys_pwr_reg; + unsigned char res20[0x4]; + unsigned intpcie_mem_sys_pwr_reg; + unsigned intsata_mem_sys_pwr_reg; + unsigned char res21[0x18]; + unsigned intpad_retention_dram_sys_pwr_reg; + unsigned intpad_retention_maudio_sys_pwr_reg; + unsigned char res22[0x18]; + unsigned intpad_retention_gpio_sys_pwr_reg; + unsigned intpad_retention_uart_sys_pwr_reg; + unsigned intpad_retention_mmca_sys_pwr_reg; + unsigned intpad_retention_mmcb_sys_pwr_reg; + unsigned intpad_retention_ebia_sys_pwr_reg; +
[U-Boot] [PATCH 5/6] Exynos: Exynos4x10: add sysreg structure for exynos4x10
This patch adds sysreg structure for Exynos4x10. Signed-off-by: Piotr Wilczek Signed-off-by: Kyungmin Park CC: Minkyu Kang --- arch/arm/include/asm/arch-exynos/system.h |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/system.h b/arch/arm/include/asm/arch-exynos/system.h index 42e1d21..1c93b6b 100644 --- a/arch/arm/include/asm/arch-exynos/system.h +++ b/arch/arm/include/asm/arch-exynos/system.h @@ -32,6 +32,15 @@ struct exynos4_sysreg { unsigned intjtag_con; }; +struct exynos4x10_sysreg { + unsigned char res1[0x210]; + unsigned intdisplay_ctrl; + unsigned intdisplay_ctrl2; + unsigned intcamera_control; + unsigned intaudio_endian; + unsigned intjtag_con; +}; + struct exynos5_sysreg { unsigned char res1[0x214]; unsigned intdisp1blk_cfg; -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 6/6] arm: trats: Use exynos4x10 structures on Trats board
This patch use exynos4x10 structures on Trats board. Signed-off-by: Piotr Wilczek Signed-off-by: Kyungmin Park CC: Minkyu Kang --- board/samsung/trats/trats.c | 40 1 files changed, 20 insertions(+), 20 deletions(-) diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c index d5c681c..3fb3d2a 100644 --- a/board/samsung/trats/trats.c +++ b/board/samsung/trats/trats.c @@ -78,10 +78,10 @@ int board_init(void) void i2c_init_board(void) { - struct exynos4_gpio_part1 *gpio1 = - (struct exynos4_gpio_part1 *)samsung_get_base_gpio_part1(); - struct exynos4_gpio_part2 *gpio2 = - (struct exynos4_gpio_part2 *)samsung_get_base_gpio_part2(); + struct exynos4x10_gpio_part1 *gpio1 = + (struct exynos4x10_gpio_part1 *)samsung_get_base_gpio_part1(); + struct exynos4x10_gpio_part2 *gpio2 = + (struct exynos4x10_gpio_part2 *)samsung_get_base_gpio_part2(); /* I2C_5 -> PMIC */ s5p_gpio_direction_output(&gpio1->b, 7, 1); @@ -115,8 +115,8 @@ void dram_init_banksize(void) static unsigned int get_hw_revision(void) { - struct exynos4_gpio_part1 *gpio = - (struct exynos4_gpio_part1 *)samsung_get_base_gpio_part1(); + struct exynos4x10_gpio_part1 *gpio = + (struct exynos4x10_gpio_part1 *)samsung_get_base_gpio_part1(); int hwrev = 0; int i; @@ -156,8 +156,8 @@ int checkboard(void) #ifdef CONFIG_GENERIC_MMC int board_mmc_init(bd_t *bis) { - struct exynos4_gpio_part2 *gpio = - (struct exynos4_gpio_part2 *)samsung_get_base_gpio_part2(); + struct exynos4x10_gpio_part2 *gpio = + (struct exynos4x10_gpio_part2 *)samsung_get_base_gpio_part2(); int err; /* eMMC_EN: SD_0_CDn: GPK0[2] Output High */ @@ -248,8 +248,8 @@ void board_usb_init(void) static void pmic_reset(void) { - struct exynos4_gpio_part2 *gpio = - (struct exynos4_gpio_part2 *)samsung_get_base_gpio_part2(); + struct exynos4x10_gpio_part2 *gpio = + (struct exynos4x10_gpio_part2 *)samsung_get_base_gpio_part2(); s5p_gpio_direction_output(&gpio->x0, 7, 1); s5p_gpio_set_pull(&gpio->x2, 7, GPIO_PULL_NONE); @@ -257,8 +257,8 @@ static void pmic_reset(void) static void board_clock_init(void) { - struct exynos4_clock *clk = - (struct exynos4_clock *)samsung_get_base_clock(); + struct exynos4x10_clock *clk = + (struct exynos4x10_clock *)samsung_get_base_clock(); writel(CLK_SRC_CPU_VAL, (unsigned int)&clk->src_cpu); writel(CLK_SRC_TOP0_VAL, (unsigned int)&clk->src_top0); @@ -307,8 +307,8 @@ static void board_clock_init(void) static void board_power_init(void) { - struct exynos4_power *pwr = - (struct exynos4_power *)samsung_get_base_power(); + struct exynos4x10_power *pwr = + (struct exynos4x10_power *)samsung_get_base_power(); /* PS HOLD */ writel(EXYNOS4_PS_HOLD_CON_VAL, (unsigned int)&pwr->ps_hold_control); @@ -329,10 +329,10 @@ static void board_power_init(void) static void board_uart_init(void) { - struct exynos4_gpio_part1 *gpio1 = - (struct exynos4_gpio_part1 *)samsung_get_base_gpio_part1(); - struct exynos4_gpio_part2 *gpio2 = - (struct exynos4_gpio_part2 *)samsung_get_base_gpio_part2(); + struct exynos4x10_gpio_part1 *gpio1 = + (struct exynos4x10_gpio_part1 *)samsung_get_base_gpio_part1(); + struct exynos4x10_gpio_part2 *gpio2 = + (struct exynos4x10_gpio_part2 *)samsung_get_base_gpio_part2(); int i; /* @@ -366,8 +366,8 @@ int board_early_init_f(void) static void lcd_reset(void) { - struct exynos4_gpio_part2 *gpio2 = - (struct exynos4_gpio_part2 *)samsung_get_base_gpio_part2(); + struct exynos4x10_gpio_part2 *gpio2 = + (struct exynos4x10_gpio_part2 *)samsung_get_base_gpio_part2(); s5p_gpio_direction_output(&gpio2->y4, 5, 1); udelay(1); -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] U-Boot git usage model
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/11/12 22:29, Stefan Roese wrote: > On 10/11/2012 08:30 PM, Scott Wood wrote: >>> But, yes, it bears more thinking if we want the next branch >>> open for longer than it has historically been, if we want >>> that. And we have at least historically been saying that next >>> can and will be rebased. >> >> IMHO it would be nice for the next branch to open immediately >> after the merge window closes, and be kept up to date except >> during the merge window. Historically the next branch has >> opened when someone requests a pull into it, but how do I make a >> sane pull request when the next branch has been untouched since >> the last release? > > This has been discussed on the U-Boot BoF in Geneva a few months > ago. And it was generally agreed upon that opening the next branch > earlier (best directly after the merge window) would be a big > plus. > > IIRC, then Tom did exactly this in this release cycle. Yes, I got -rc1 out sooner than we do historically. I think there's a few changes I would like to make about how we handle branching, releasing and merge windows. But this thread has reminded me that I need to think very carefully about how we manage branches that are longer lived. And I don't want to make big changes for v2013.01 but prepare everyone to try them for v2013.04 (and .07). - -- Tom -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQIcBAEBAgAGBQJQeDwHAAoJENk4IS6UOR1WGdkP/1MbKMql6CZ8sAff1jnJqWXv XNwblGN0uKC2qgOT4wxVD5pY6w/ZzE6zFJuhPqSz5Ham2GKggBzlKodYY0hDWhua b8CdK8f4YOwDb5FJ07oi0/LxUQMq1SN0j+KVY6HBv5JoLlwiAm2G7XpBLGn8SkBJ cqqBuN3y0KS3CI2eoJ3rli5sInATxh9f1f0WckTANaF6kRAgbriZutHOflVw45KG hh63tGGO0ERJRmUlhkpGH20Vizbxd7VqX9AWydlam1RuJ513+/EX7YvZ5/mmOqPA ReNfj6bnaY8YOVh8fs9h+LG2a5soZJYxEx1N01R3dz3me3On48li30GdO39m79EH aKPYN5AwcsA6LrGt7eTPjseqhB/OIezeIrjYGO2ESZDZVoB4TG3QRYAiNNijRgfN 9BcUAn/b5lue2L3GhG/37BOyV6xjxXjDEjvpp0rYW1Stnssa0egFXTYwf9x+pRim 9MlLvGEi1ckbtIq9qa2aeoUxYIqyKPPFtIYlL5Vbt8d52fMYg6mRntpIe2RSIGu7 e+FpzRlyRFgOpcJGEhjG+VByT3AZXHYRF6h69ZNUDGBA7ax8q5UgAnWpEUfl5KN5 NncdltZm4oOopFvrzLZUj5B+RksPGQQtjAhb6r+VZHJ5MbCRTUUFaBmrT8IeDudJ tMUW7jbcmx8dELDSPqe6 =aW9J -END PGP SIGNATURE- ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/5] input: Provide a board specific mechanism to decide whether to skip i8042 init
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/11/12 18:15, Simon Glass wrote: > From: Gabe Black > > This change adds a board overridable function which can be used to > decide whether or not to initialize the i8042 keyboard controller. > On systems where it isn't actually connected to anything, this can > save a significant amount of boot time. > > On Stumpy, this saves about 200ms on boot. > > Signed-off-by: Gabe Black Signed-off-by: > Simon Glass --- drivers/input/i8042.c | 13 > - 1 files changed, 12 insertions(+), 1 deletions(-) > > diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c index > 99254e4..cae2d0a 100644 --- a/drivers/input/i8042.c +++ > b/drivers/input/i8042.c @@ -320,6 +320,17 @@ static int > kbd_controller_present(void) return in8(I8042_STATUS_REG) != 0xff; > } > > +/* + * Implement a weak default function for boards that > optionally + * need to skip the i8042 initialization. + */ +int > __board_i8042_skip(void) +{ + /* As default, don't skip */ + return > 0; +} +int board_i8042_skip(void) __attribute__((weak, > alias("__board_i8042_skip"))); Please add and use __weak directly, thanks. - -- Tom -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQIcBAEBAgAGBQJQeD/QAAoJENk4IS6UOR1WVMsP/RJTlWaTvF56K6H75WbjK7l5 xE7zeAeCS4gbM1CS0fEv1X4296L7oWUUUkw73gwSEAxd2CxOj96HrhJI0WQIqZ/a m6ysfwswzY92oqXJGxnWnLiZzd0JUR/QHZAM7U0tX1yHFsYrycEtuq+JvfMm5BU7 1ozqrN0SoFPa8ZBq0GpnXhDsGdMApucDBkbDv3cgHTYPkOlfh3gLpbz/dkWKxrCv NBwKvZgVMtEPf9hZf5CLuB2ghfWIRyP50Bf99nKhV+gdLGtrEbboHkMMXEc2Z1ex foEMqpmSiMVd9yMRqVEIM3sWwnapqAZVn3wQLoq5Kz+YGS/9e0c9t95ck+CmndiM kJmrx/LZ/XSGzjLrKC3MWLWC/KUS2hHqj4AfYUf1kL5lPuHM24c+oSRfOjogkaqR bMJZ9ii/kYcQJry/dAYTjFyEa120X48y46e2bNcMhWVZh48A6VpJkFILb1Ga4tEo ss+hMBX/tiMNp8eoOR7y1n+A+94r3ABKUrLapjfVKg+qXeufrMyotBVfPY35hWnP qLNVlPpdEF7nP1Wt22OB9s6bBcI6dCrNuL75Ym6wJ3DYnpqU8Y8f3HihwL7cBy7F o1Zpo0bzazNfy722IYphWu0O3hihIQ11fRpAndVemUzjaXP/kKxaVhiDCj28xHup 9zGuTm7SW/liJTXp4cc8 =5tNx -END PGP SIGNATURE- ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/6] EXYNOS: Add support for Exynos4x10
Dear Piotr, On 13 October 2012 00:08, Piotr Wilczek wrote: > This patch series adds Register base addresses, clock, gpio, power > and system structures for Exynos4x10. > > Piotr Wilczek (6): > Exynos: Exynos4x10: Add base addresses for Exynos4x10 > Exynos: Exynos4x10: Add clock structure for exynos4x10 > Exynos: Exynos4x10: Add gpio structure for Exynos4X10 > Exynos: Exynos4x10: add power structure for Exynos4x10 > Exynos: Exynos4x10: add sysreg structure for exynos4x10 > arm: trats: Use exynos4x10 structures on Trats board > > arch/arm/include/asm/arch-exynos/clock.h | 236 > + > arch/arm/include/asm/arch-exynos/cpu.h| 43 +- > arch/arm/include/asm/arch-exynos/gpio.h | 47 ++ > arch/arm/include/asm/arch-exynos/power.h | 201 > arch/arm/include/asm/arch-exynos/system.h |9 + > board/samsung/trats/trats.c | 40 +++--- > 6 files changed, 551 insertions(+), 25 deletions(-) > Did you check Chander's patchset? http://patchwork.ozlabs.org/patch/188437/ http://patchwork.ozlabs.org/patch/188438/ http://patchwork.ozlabs.org/patch/188511/ http://patchwork.ozlabs.org/patch/188512/ http://patchwork.ozlabs.org/patch/188513/ http://patchwork.ozlabs.org/patch/189809/ Thanks. Minkyu Kang. -- from. prom. www.promsoft.net ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tegra: move common features to a common makefile
Marc, > -Original Message- > From: Thierry Reding [mailto:thierry.red...@avionic-design.de] > Sent: Wednesday, October 03, 2012 10:59 PM > To: Marc Dietrich > Cc: u-boot@lists.denx.de; Stephen Warren; Tom Warren; Lucas Stach > Subject: Re: [PATCH] tegra: move common features to a common makefile Applied to u-boot-tegra/next. I'll be pushing it to denx.de as soon as build/sanity tests are done. Thanks, Tom > > * PGP Signed by an unknown key > > On Wed, Oct 03, 2012 at 04:26:28PM +0200, Marc Dietrich wrote: > > For Non-Nvidia boards to include newly added features (like emc clock > > scaling) it would be necessary to add each feature to their own board > > Makefile. This is because currently the top Makefile automaticly > > includes these features only for Nvidia boards. > > > > This patch adds a simple Makefile include so all new features become > > available for non-Nvidia board vendors. > > > > Cc: Stephen Warren > > Cc: Tom Warren > > Cc: Thierry Reding > > Cc: Lucas Stach > > Signed-off-by: Marc Dietrich > > > > --- > > > > Passed: MAKEALL -s tegra20, booted on paz00 > > --- > > board/avionic-design/medcom-wide/Makefile |6 -- > > board/avionic-design/plutux/Makefile |6 -- > > board/avionic-design/tec/Makefile |6 -- > > board/compal/paz00/Makefile |6 -- > > board/compulab/trimslice/Makefile |6 -- > > board/nvidia/common/Makefile |4 +--- > > board/nvidia/common/common.mk |4 > > 7 files changed, 25 insertions(+), 13 deletions(-) create mode > > 100644 board/nvidia/common/common.mk > > Acked-by: Thierry Reding > > * Unknown Key > * 0x7F3EB3A1 -- nvpublic ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] env: cosmetic: Consilidate the default env definition
There used to be a huge structure duplicated 3 times in the source. Signed-off-by: Joe Hershberger --- common/env_common.c | 97 +--- common/env_embedded.c | 104 ++ include/env_default.h | 135 ++ tools/env/fw_env.c| 98 +--- 4 files changed, 141 insertions(+), 293 deletions(-) create mode 100644 include/env_default.h diff --git a/common/env_common.c b/common/env_common.c index 61c4be5..3d3cb70 100644 --- a/common/env_common.c +++ b/common/env_common.c @@ -37,102 +37,7 @@ DECLARE_GLOBAL_DATA_PTR; / * Default settings to be used when no valid environment is found */ - -const uchar default_environment[] = { -#ifdef CONFIG_BOOTARGS - "bootargs=" CONFIG_BOOTARGS "\0" -#endif -#ifdef CONFIG_BOOTCOMMAND - "bootcmd=" CONFIG_BOOTCOMMAND "\0" -#endif -#ifdef CONFIG_RAMBOOTCOMMAND - "ramboot=" CONFIG_RAMBOOTCOMMAND "\0" -#endif -#ifdef CONFIG_NFSBOOTCOMMAND - "nfsboot=" CONFIG_NFSBOOTCOMMAND "\0" -#endif -#if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0) - "bootdelay="__stringify(CONFIG_BOOTDELAY) "\0" -#endif -#if defined(CONFIG_BAUDRATE) && (CONFIG_BAUDRATE >= 0) - "baudrate=" __stringify(CONFIG_BAUDRATE)"\0" -#endif -#ifdef CONFIG_LOADS_ECHO - "loads_echo=" __stringify(CONFIG_LOADS_ECHO) "\0" -#endif -#ifdef CONFIG_ETHADDR - "ethaddr=" __stringify(CONFIG_ETHADDR) "\0" -#endif -#ifdef CONFIG_ETH1ADDR - "eth1addr=" __stringify(CONFIG_ETH1ADDR)"\0" -#endif -#ifdef CONFIG_ETH2ADDR - "eth2addr=" __stringify(CONFIG_ETH2ADDR)"\0" -#endif -#ifdef CONFIG_ETH3ADDR - "eth3addr=" __stringify(CONFIG_ETH3ADDR)"\0" -#endif -#ifdef CONFIG_ETH4ADDR - "eth4addr=" __stringify(CONFIG_ETH4ADDR)"\0" -#endif -#ifdef CONFIG_ETH5ADDR - "eth5addr=" __stringify(CONFIG_ETH5ADDR)"\0" -#endif -#ifdef CONFIG_ETHPRIME - "ethprime=" CONFIG_ETHPRIME "\0" -#endif -#ifdef CONFIG_IPADDR - "ipaddr=" __stringify(CONFIG_IPADDR) "\0" -#endif -#ifdef CONFIG_SERVERIP - "serverip=" __stringify(CONFIG_SERVERIP)"\0" -#endif -#ifdef CONFIG_SYS_AUTOLOAD - "autoload=" CONFIG_SYS_AUTOLOAD "\0" -#endif -#ifdef CONFIG_PREBOOT - "preboot=" CONFIG_PREBOOT "\0" -#endif -#ifdef CONFIG_ROOTPATH - "rootpath=" CONFIG_ROOTPATH "\0" -#endif -#ifdef CONFIG_GATEWAYIP - "gatewayip="__stringify(CONFIG_GATEWAYIP) "\0" -#endif -#ifdef CONFIG_NETMASK - "netmask=" __stringify(CONFIG_NETMASK) "\0" -#endif -#ifdef CONFIG_HOSTNAME - "hostname=" __stringify(CONFIG_HOSTNAME)"\0" -#endif -#ifdef CONFIG_BOOTFILE - "bootfile=" CONFIG_BOOTFILE "\0" -#endif -#ifdef CONFIG_LOADADDR - "loadaddr=" __stringify(CONFIG_LOADADDR)"\0" -#endif -#ifdef CONFIG_CLOCKS_IN_MHZ - "clocks_in_mhz=1\0" -#endif -#if defined(CONFIG_PCI_BOOTDELAY) && (CONFIG_PCI_BOOTDELAY > 0) - "pcidelay=" __stringify(CONFIG_PCI_BOOTDELAY)"\0" -#endif -#ifdef CONFIG_ENV_VARS_UBOOT_CONFIG - "arch=" CONFIG_SYS_ARCH "\0" - "cpu=" CONFIG_SYS_CPU "\0" - "board="CONFIG_SYS_BOARD"\0" -#ifdef CONFIG_SYS_VENDOR - "vendor=" CONFIG_SYS_VENDOR "\0" -#endif -#ifdef CONFIG_SYS_SOC - "soc=" CONFIG_SYS_SOC "\0" -#endif -#endif -#ifdef CONFIG_EXTRA_ENV_SETTINGS - CONFIG_EXTRA_ENV_SETTINGS -#endif - "\0" -}; +#include struct hsearch_data env_htab = { .apply = env_check_apply, diff --git a/common/env_embedded.c b/common/env_embedded.c index 8cc08ae..52bc687 100644 --- a/common/env_embedded.c +++ b/common/env_embedded.c @@ -89,107 +89,9 @@ # define ENV_CRC (~0) #endif -env_t environment __PPCENV__ = { - ENV_CRC,/* CRC Sum */ -#ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT - 1, /* Flags: valid */ -#endif - { -#if defined(CONFIG_BOOTARGS) - "bootargs=" CONFIG_BOOTARGS "\0" -#endif -#if defined(CONFIG_BOOTCOMMAND) - "bootcmd=" CONFIG_BOOTCOMMAND "\0" -#endif -#if defined(CONFIG_RAMBOOTCOMMAND) - "ramboot=" CONFIG_RAMBOOTCOMMAND "\0" -#endif -#if defined(CONFIG_NFSBOOTCOMMAND) - "nfsboot=" CONFIG_NFSBOOTCOMMAND "\0" -#endif -#if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0) - "bootdelay="__stringify(CONFIG_BOOTDELAY) "\0" -#endif -#if defined(CONFIG_BAUDRATE) && (CONFIG_BAUDRATE >= 0) - "baudrate=" __stringify(CONFIG_BAUDRATE)"\0" -#endif -#
Re: [U-Boot] [PATCH] m28: Properly configure the SPI flash chipselect
On Fri, Oct 12, 2012 at 03:36:56AM +0200, Marek Vasut wrote: > The SPI flash is not properly detected by plain "sf probe" due to > it being located on different bus and different chipselect. Fix > this problem. > > Signed-off-by: Marek Vasut > Cc: Stefano Babic > Cc: Tom Rini Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] powerpc/fm: fix TBI PHY address settings
On Fri, Oct 12, 2012 at 1:25 AM, Shaohui Xie wrote: > From: shaohui xie > > TBI PHY address (TBIPA) register is set in general frame manager > phy init funciton dtsec_init_phy() in drivers/net/fm/eth.c, and > it is supposed to set TBIPA on FM1@DTSEC1 in case of FM1@DTSEC1 > isn't used directly, which provides MDIO for other ports. So > following code is wrong in case of FM2, which has a different > mac base. Is this still true with Fman v3? Does this patch fix any known bugs? -- Timur Tabi Linux kernel developer at Freescale ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3] ARM: tegra: Harmony: enable ULPI USB port
From: Stephen Warren The ULPI port is routed onto pins on the mini PCI Express connector. A standard breakout board may be used to access the port. * Add required DT entries to configure the ULPI port. * Setup up the ULPI pinmux in the board code. * Enable multiple USB controller and ULPI support in the board config. Signed-off-by: Stephen Warren --- board/nvidia/dts/tegra20-harmony.dts |3 ++- board/nvidia/harmony/harmony.c |9 + include/configs/harmony.h|3 +++ 3 files changed, 14 insertions(+), 1 deletions(-) diff --git a/board/nvidia/dts/tegra20-harmony.dts b/board/nvidia/dts/tegra20-harmony.dts index ca5facb..5645a8d 100644 --- a/board/nvidia/dts/tegra20-harmony.dts +++ b/board/nvidia/dts/tegra20-harmony.dts @@ -8,6 +8,7 @@ aliases { usb0 = "/usb@c5008000"; + usb1 = "/usb@c5004000"; }; memory { @@ -52,7 +53,7 @@ }; usb@c5004000 { - status = "disabled"; + nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */ }; nand-controller@70008000 { diff --git a/board/nvidia/harmony/harmony.c b/board/nvidia/harmony/harmony.c index 32ed9bb..c7590ac 100644 --- a/board/nvidia/harmony/harmony.c +++ b/board/nvidia/harmony/harmony.c @@ -75,3 +75,12 @@ int board_mmc_init(bd_t *bd) return 0; } #endif + +void pin_mux_usb(void) +{ + funcmux_select(PERIPH_ID_USB2, FUNCMUX_USB2_ULPI); + pinmux_set_func(PINGRP_CDEV2, PMUX_FUNC_PLLP_OUT4); + pinmux_tristate_disable(PINGRP_CDEV2); + /* USB2 PHY reset GPIO */ + pinmux_tristate_disable(PINGRP_UAC); +} diff --git a/include/configs/harmony.h b/include/configs/harmony.h index d582ae1..040bfe4 100644 --- a/include/configs/harmony.h +++ b/include/configs/harmony.h @@ -72,8 +72,11 @@ #define CONFIG_ENV_OFFSET (SZ_512M - SZ_128K) /* 128K sector size */ /* USB Host support */ +#define CONFIG_USB_MAX_CONTROLLER_COUNT 3 #define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_TEGRA +#define CONFIG_USB_ULPI +#define CONFIG_USB_ULPI_VIEWPORT #define CONFIG_USB_STORAGE #define CONFIG_CMD_USB -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] ARM: tegra: Seaboard: enable multiple USB ports
From: Stephen Warren The device tree already contains the required configuration for both the USB1 and USB3 ports. Enable the required configuration options to enable both these ports, which in turn allows the USB1 port to be used. Note that on a true Seaboard, this port is typically used as a device port hosting Tegra's USB recovery protocol. However, on the Springbank derivative, this port is the only external USB port, so we enable it as a host port so that USB peripherals may be used. Enabling this port in U-Boot as a host port doesn't prevent the port from reverting to a device port when the CPU is reset into recovery mode. Signed-off-by: Stephen Warren --- include/configs/seaboard.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index 0727a4c..74d3b94 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -81,6 +81,7 @@ #define CONFIG_SYS_MMC_ENV_PART 2 /* USB Host support */ +#define CONFIG_USB_MAX_CONTROLLER_COUNT 3 #define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_TEGRA #define CONFIG_USB_STORAGE -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/3] ARM: tegra: Whistler: remove unused USB alias
From: Stephen Warren Port USB1 on Whistler is intended as a device port for USB recovery. Whistler's DT currently contains an alias for this USB port, even though Whistler's config doesn't enable multiple USB controllers, so the alias is unused. Remove the unused alias for consistency for now. Similar, explicitly disable the port in the device tree too. Signed-off-by: Stephen Warren --- board/nvidia/dts/tegra20-whistler.dts |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/board/nvidia/dts/tegra20-whistler.dts b/board/nvidia/dts/tegra20-whistler.dts index 38599bd..f830cf3 100644 --- a/board/nvidia/dts/tegra20-whistler.dts +++ b/board/nvidia/dts/tegra20-whistler.dts @@ -9,7 +9,6 @@ aliases { i2c0 = "/i2c@7000d000"; usb0 = "/usb@c5008000"; - usb1 = "/usb@c500"; }; memory { @@ -61,6 +60,10 @@ }; }; + usb@c500 { + status = "disabled"; + }; + usb@c5004000 { status = "disabled"; }; -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] U-Boot Ethernet Connectivity Issues
I have a Windows 7 development machine that I cannot verify ethernet connectivity with my P2041RDB QorIQ platfrom running u-boot. The two devices are connected using a crossover cable. When I try to ping from the P2041 to the Windows 7, the ping returns No link. I verified that my dev machine and cabling is fully functional by replacing the P2041 with a Linux machine. The Linux machine and Windows machine were both able to successfully ping one another. My settings are the following: Windows 7 Development machine has: ipaddress = 192.168.1.2 netmask = 255.255.255.0 gateway = 191.168.1.1 P2041RDB: U-Boot 2011.09-0-g2c02d1d ethaddr=00:04:9F:02:1C:00 ipaddr=192.168.1.10 netmask=255.255.255.0 gatewayip=192.168.1.1 ethact=FM1@DTSEC1 netdev=eth0 ping 192.168.1.2 FM1@DTSEC1: No link. The cabling is good; I am in the correct port for DTSEC1, the ethernet address is not multicast or local. Someone please help to troubleshoot. With u-boot how do I verify that the ethernet is enabled, what speed and duplex the device is using, etc.? Thank you, -Joel ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] tools/env: Fix build failure from missing header include
This was introduced in: 8679d0ffdcc0beafea8e6942c0c67cf859afa18e - COMMON: Use __stringify() instead of MK_STR() The header is now needed since common.h is not included in this tool. Signed-off-by: Joe Hershberger --- tools/env/fw_env.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c index 520ce3f..ab8c15d 100644 --- a/tools/env/fw_env.c +++ b/tools/env/fw_env.c @@ -26,6 +26,7 @@ #include #include +#include #include #include #include -- 1.7.11.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/6 V3] Linker-generated arrays (take 2)
This is a second stab at the linker-generated array. Basically, this concept is a generic abstraction of how u_boot_cmd works today. The patch 2/4 contains a huge pile of documentation which should clarify most of the questions. I don't see size growth, I see size fluctiation in the order of tens of bytes with these patches applied. Subsequent patch added to this series removes the __u_boot_cmd section completely. Marek Vasut (6): common: Add symbol handling for generic lists into Makefile common: Implement support for linker-generated arrays common: Add .u_boot_list into all linker files common: Convert the U-Boot commands to LG-arrays common: Discard the __u_boot_cmd section kerneldoc: tmpl: Implement template for LG-arrays .gitignore |1 + Makefile | 19 ++- arch/arm/cpu/arm920t/ep93xx/u-boot.lds |8 +- arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds|7 +- arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds |7 +- arch/arm/cpu/armv7/omap-common/u-boot-spl.lds|5 + arch/arm/cpu/ixp/u-boot.lds |8 +- arch/arm/cpu/u-boot.lds |8 +- arch/arm/imx-common/cmd_bmode.c | 11 +- arch/avr32/cpu/u-boot.lds|8 +- arch/avr32/lib/board.c |4 +- arch/blackfin/cpu/u-boot.lds |8 +- arch/m68k/lib/board.c|4 +- arch/microblaze/cpu/u-boot.lds |9 +- arch/mips/lib/board.c|4 +- arch/nds32/cpu/n1213/u-boot.lds |8 +- arch/nds32/lib/board.c |4 +- arch/nios2/cpu/u-boot.lds| 10 +- arch/powerpc/cpu/74xx_7xx/u-boot.lds |8 +- arch/powerpc/cpu/mpc512x/u-boot.lds |8 +- arch/powerpc/cpu/mpc5xx/u-boot.lds |8 +- arch/powerpc/cpu/mpc5xxx/u-boot-customlayout.lds |6 +- arch/powerpc/cpu/mpc5xxx/u-boot.lds |8 +- arch/powerpc/cpu/mpc8220/u-boot.lds |8 +- arch/powerpc/cpu/mpc824x/u-boot.lds |8 +- arch/powerpc/cpu/mpc8260/u-boot.lds |8 +- arch/powerpc/cpu/mpc83xx/u-boot.lds |8 +- arch/powerpc/cpu/mpc85xx/u-boot-nand.lds |7 +- arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds |4 + arch/powerpc/cpu/mpc85xx/u-boot.lds |8 +- arch/powerpc/cpu/mpc86xx/u-boot.lds |8 +- arch/powerpc/cpu/ppc4xx/u-boot.lds |8 +- arch/sandbox/cpu/u-boot.lds |8 +- arch/sh/cpu/sh2/u-boot.lds |9 +- arch/sh/cpu/sh3/u-boot.lds |9 +- arch/sh/cpu/sh4/u-boot.lds |9 +- arch/sparc/lib/board.c |4 +- arch/x86/cpu/u-boot.lds |7 +- board/BuS/eb_cpu5282/u-boot.lds |8 +- board/LEOX/elpt860/u-boot.lds|8 +- board/RPXClassic/u-boot.lds |8 +- board/RPXClassic/u-boot.lds.debug|8 +- board/RPXlite/u-boot.lds |8 +- board/RPXlite/u-boot.lds.debug |8 +- board/RPXlite_dw/u-boot.lds |8 +- board/RPXlite_dw/u-boot.lds.debug|8 +- board/RRvision/u-boot.lds|8 +- board/actux1/u-boot.lds |8 +- board/actux2/u-boot.lds |8 +- board/actux3/u-boot.lds |8 +- board/adder/u-boot.lds |8 +- board/ait/cam_enc_4xx/u-boot-spl.lds |4 + board/altera/nios2-generic/u-boot.lds| 10 +- board/amcc/acadia/u-boot-nand.lds|6 +- board/amcc/bamboo/u-boot-nand.lds|6 +- board/amcc/canyonlands/u-boot-nand.lds |6 +- board/amcc/kilauea/u-boot-nand.lds |6 +- board/amcc/sequoia/u-boot-nand.lds |6 +- board/amcc/sequoia/u-boot-ram.lds|6 +- board/astro/mcf5373l/u-boot.lds |8 +- board/c2mon/u-boot.lds |8 +- board/c2mon/u-boot.lds.debug |8 +- board/cobra5272/u-boot.lds |8 +- board/cogent/u-boot.lds |8 +- board/cogent/u-boot.lds.debug|8 +- board/cray/L1/u-boot.lds.debug |8 +- board/dave/PPChameleonEVB/u-boot.lds |8 +- board/davinci/da8xxevm/u-boot-spl-da850evm.lds |6 + board/davinci/da8xxevm/u-boot-spl-hawk.lds |5 + board/dbau1x00/u-boot.lds|7 +- board/dvlhost/u-boot.lds |
[U-Boot] [PATCH 2/6 V3] common: Implement support for linker-generated arrays
This patch adds support for linker-generated array. These arrays are a generalization of the U-Boot command declaration approach. Basically, the idea is to generate an array, where elements of the array are statically initialized at compile time and each element is declared separatelly at different place. Such array is assembled together into continuous piece of memory by linker and a pointer to it's first entry can then be retrieved via accessor. The actual implementation relies on placing any variable that is to represent an element of LG-array into particular subsection of the .u_boot_list linker section . The subsection is determined by user options. Once compiled, it is possible to dump all symbols placed in .u_boot_list section and the subsections in which they should be and generate appropriate bounds for each requested subsection of the .u_boot_list section. Each such subsection thus contains __start and __end entries at the begining and end respecitively. This allows for simple run-time traversing of the array, since the symbols are properly defined. Signed-off-by: Marek Vasut Cc: Joe Hershberger Cc: Mike Frysinger --- include/linker_lists.h | 148 1 file changed, 148 insertions(+) create mode 100644 include/linker_lists.h V2: - Rebase on top of testing/dm-kerneldoc V3: - Rebase on top of u-boot/next diff --git a/include/linker_lists.h b/include/linker_lists.h new file mode 100644 index 000..0b405d7 --- /dev/null +++ b/include/linker_lists.h @@ -0,0 +1,148 @@ +/* + * include/linker_lists.h + * + * Implementation of linker-generated arrays + * + * Copyright (C) 2012 Marek Vasut + * + * 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. + */ +#ifndef __LINKER_LISTS_H__ +#define __LINKER_LISTS_H__ + +/** + * ll_entry_declare() - Declare linker-generated array entry + * @_type: Data type of the entry + * @_name: Name of the entry + * @_section_u:Subsection of u_boot_list in which this entry is placed + * (with underscores instead of dots, for name concatenation) + * @_section_d:Subsection of u_boot_list in which this entry is placed + * (with dots, for section concatenation) + * + * This macro declares a variable that is placed into a linker-generated + * array. This is a basic building block for more advanced use of linker- + * generated arrays. The user is expected to build their own macro wrapper + * around this one. + * + * A variable declared using this macro must be compile-time initialized + * and is as such placed into subsection of special section, .u_boot_list. + * The subsection is specified by the _section_[u,d] parameter, see below. + * The base name of the variable is _name, yet the actual variable is + * declared as concatenation of + * + * %_u_boot_list_ + @_section_u + _ + @_name + * + * which ensures name uniqueness. This variable shall never be refered + * directly though. + * + * Special precaution must be made when using this macro: + * 1) The _type must not contain the "static" keyword, otherwise the entry + *is not generated. + * + * 2) The @_section_u and @_section_d variables must match, the only difference + *is that in @_section_u is every dot "." character present in @_section_d + *replaced by a single underscore "_" character in @_section_u. The actual + *purpose of these parameters is to select proper subsection in the global + *.u_boot_list section. + * + * 3) In case a section is declared that contains some array elements AND a + *subsection of this section is declared and contains some elements, it is + *imperative that the elements are of the same type. + * + * 4) In case an outer section is declared that contains some array elements + *AND am inner subsection of this section is declared and contains some + *elements, then when traversing the outer section, even the elements of + *the inner sections are present in the array. + * + * Example: + * ll_entry_declare(struct my_sub_cmd, my_sub_cmd, cmd_sub, cmd.sub) = { + * .x = 3, + * .y = 4, + * }; + */ +#define ll_entry_declare(_type, _name, _section_u, _section_d) \ + _type _u_boot_list_##_section_u##_##_name __attribute__(( \ + unused, aligned(4), \ + section(".u_boot_list."#_section_d"."#_name))) + +/** + * ll_entry_start() - Point to first entry of linker-generated array + * @_type: Data type of the entry + * @_section_u:Subsection of u_boot_list in which this entry is placed + * (with underscores instead of dots) + * + * This function returns (_type *) poin
[U-Boot] [PATCH 1/6 V3] common: Add symbol handling for generic lists into Makefile
This patch adds essential components for generation of the contents of the linker section that is used by the linker-generated array. All of the contents is held in a separate file, u-boot.lst, which is generated at runtime just before U-Boot is linked. The purpose of this code is to especially generate the appropriate boundary symbols around each subsection in the section carrying the linker-generated arrays. Obviously, the interim linker code for actual placement of the variables into the section is generated too. The generated file, u-boot.lst, is included into u-boot.lds via the linker INCLUDE directive in u-boot.lds . Adjustments are made in the Makefile and spl/Makefile so that the u-boot.lds and u-boot-spl.lds depend on their respective .lst files. Signed-off-by: Marek Vasut Cc: Joe Hershberger Cc: Mike Frysinger Cover-letter: Linker-generated arrays (take 2) This is a second stab at the linker-generated array. Basically, this concept is a generic abstraction of how u_boot_cmd works today. The patch 2/4 contains a huge pile of documentation which should clarify most of the questions. I don't see size growth, I see size fluctiation in the order of tens of bytes with these patches applied. Subsequent patch added to this series removes the __u_boot_cmd section completely. --- .gitignore |1 + Makefile | 19 --- config.mk |2 + helper.mk | 64 nand_spl/board/freescale/mpc8536ds/Makefile|9 +++- nand_spl/board/freescale/mpc8569mds/Makefile |9 +++- nand_spl/board/freescale/mpc8572ds/Makefile|9 +++- nand_spl/board/freescale/mx31pdk/Makefile |9 +++- nand_spl/board/freescale/p1010rdb/Makefile |9 +++- nand_spl/board/freescale/p1023rds/Makefile |9 +++- nand_spl/board/freescale/p1_p2_rdb/Makefile|9 +++- nand_spl/board/freescale/p1_p2_rdb_pc/Makefile |9 +++- nand_spl/board/karo/tx25/Makefile |9 +++- spl/.gitignore |1 + spl/Makefile |8 ++- 15 files changed, 150 insertions(+), 26 deletions(-) create mode 100644 helper.mk V2: - Rebase on top of testing/dm-kerneldoc - Fix INCLUDE u-boot.lds in linker scripts. It didn't work with older LD, use #include instead and make use of CPP. - Fix placement of u-boot.lds for NAND SPL V3: - Rebase on top of u-boot/next - Put u-boot.lst into include/ , so the CPP finds it easily. diff --git a/.gitignore b/.gitignore index d91e91b..1ac43f2 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,7 @@ /u-boot.sha1 /u-boot.dis /u-boot.lds +/u-boot.lst /u-boot.ubl /u-boot.ais /u-boot.dtb diff --git a/Makefile b/Makefile index ab34fa7..66c8c77 100644 --- a/Makefile +++ b/Makefile @@ -535,7 +535,10 @@ else GEN_UBOOT = \ UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \ sed -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\ - cd $(LNDIR) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) $$UNDEF_SYM $(__OBJS) \ + UNDEF_LST=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \ + sed -n -e 's/.*\($(SYM_PREFIX)__u_boot_list_.*\)/-u\1/p'|sort|uniq`;\ + cd $(LNDIR) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \ + $$UNDEF_SYM $$UNDEF_LST $(__OBJS) \ --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \ -Map u-boot.map -o u-boot endif @@ -568,8 +571,12 @@ $(SUBDIR_EXAMPLES): $(obj)u-boot $(LDSCRIPT): depend $(MAKE) -C $(dir $@) $(notdir $@) -$(obj)u-boot.lds: $(LDSCRIPT) - $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ +# The following line expands into whole rule which generates u-boot.lst, +# the file containing u-boots LG-array linker section. This is included into +# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file. +$(eval $(call make_u_boot_list, $(obj)include/u-boot.lst, $(LIBBOARD) $(LIBS))) +$(obj)u-boot.lds: $(LDSCRIPT) $(obj)include/u-boot.lst + $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$< >$@ nand_spl: $(TIMESTAMP_FILE) $(VERSION_FILE) depend $(MAKE) -C nand_spl/board/$(BOARDDIR) all @@ -807,7 +814,7 @@ clean: @rm -f $(obj)board/cray/L1/{bootscript.c,bootscript.image}\ $(obj)board/matrix_vision/*/bootscript.img \ $(obj)board/voiceblue/eeprom \ - $(obj)u-boot.lds \ + $(obj)u-boot.lds,include/u-boot.lst\ $(obj)arch/blackfin/cpu/bootrom-asm-offsets.[chs] \ $(obj)arch/blackfin/cpu/init.{lds,elf} @rm -f $(obj)include/bmp_logo.h
[U-Boot] [PATCH 6/6 V3] kerneldoc: tmpl: Implement template for LG-arrays
Implement kerneldoc template for linker-generated arrays. This is the first template in U-Boot that is used to generate kerneldoc style documentation. This template is very basic. Signed-off-by: Marek Vasut --- doc/DocBook/Makefile |2 +- doc/DocBook/linker_lists.tmpl | 46 + 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 doc/DocBook/linker_lists.tmpl V2: - Rebase on top of testing/dm-kerneldoc V3: - Rebase on top of u-boot/next diff --git a/doc/DocBook/Makefile b/doc/DocBook/Makefile index 2f2ddfc..5f13d3d 100644 --- a/doc/DocBook/Makefile +++ b/doc/DocBook/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/config.mk -DOCBOOKS := +DOCBOOKS := linker_lists.xml ### # The build process is as follows (targets): diff --git a/doc/DocBook/linker_lists.tmpl b/doc/DocBook/linker_lists.tmpl new file mode 100644 index 000..a47377f --- /dev/null +++ b/doc/DocBook/linker_lists.tmpl @@ -0,0 +1,46 @@ + +http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; []> + + + + The U-Boot Linker-Generated Arrays + + + + This documentation 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 + + + + For more details see the file COPYING in the source + distribution of U-Boot Bootloader. + + + + + + + + Linker-Generated Arrays +!Iinclude/linker_lists.h + + + -- 1.7.10.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/6 V3] common: Convert the U-Boot commands to LG-arrays
This patch converts the old method of creating a list of command onto the new LG-arrays code. The old u_boot_cmd section is converted to new u_boot_list_cmd subsection and LG-array macros used as needed. Minor adjustments had to be made to the common code to work with the LG-array macros, mostly the fixup_cmdtable() calls are now passed the ll_entry_start and ll_entry_count instead of linker-generated symbols. The command.c had to be adjusted as well so it would use the newly introduced LG-array API instead of directly using linker-generated symbols. Signed-off-by: Marek Vasut Cc: Joe Hershberger Cc: Mike Frysinger --- arch/arm/imx-common/cmd_bmode.c | 11 +++ arch/avr32/lib/board.c |4 ++-- arch/m68k/lib/board.c |4 ++-- arch/mips/lib/board.c |4 ++-- arch/nds32/lib/board.c |4 ++-- arch/sparc/lib/board.c |4 ++-- common/cmd_help.c |8 common/command.c| 17 ++--- doc/README.commands | 10 +- include/command.h | 26 ++ 10 files changed, 50 insertions(+), 42 deletions(-) V2: - Rebase on top of testing/dm-kerneldoc V3: - Rebase on top of u-boot/next diff --git a/arch/arm/imx-common/cmd_bmode.c b/arch/arm/imx-common/cmd_bmode.c index 02fe72e..ddc14b0 100644 --- a/arch/arm/imx-common/cmd_bmode.c +++ b/arch/arm/imx-common/cmd_bmode.c @@ -24,6 +24,7 @@ #include #include #include +#include static const struct boot_mode *modes[2]; @@ -103,9 +104,11 @@ void add_board_boot_modes(const struct boot_mode *p) int size; char *dest; - if (__u_boot_cmd_bmode.usage) { - free(__u_boot_cmd_bmode.usage); - __u_boot_cmd_bmode.usage = NULL; + cmd_tbl_t *entry = ll_entry_get(cmd_tbl_t, bmode, cmd); + + if (entry->usage) { + free(entry->usage); + entry->usage = NULL; } modes[0] = p; @@ -114,6 +117,6 @@ void add_board_boot_modes(const struct boot_mode *p) dest = malloc(size); if (dest) { create_usage(dest); - __u_boot_cmd_bmode.usage = dest; + entry->usage = dest; } } diff --git a/arch/avr32/lib/board.c b/arch/avr32/lib/board.c index 9d3b76e..e3287c4 100644 --- a/arch/avr32/lib/board.c +++ b/arch/avr32/lib/board.c @@ -272,8 +272,8 @@ void board_init_r(gd_t *new_gd, ulong dest_addr) /* * We have to relocate the command table manually */ - fixup_cmdtable(&__u_boot_cmd_start, - (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start)); + fixup_cmdtable(ll_entry_start(cmd_tbl_t, cmd), + ll_entry_count(cmd_tbl_t, cmd)); #endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */ /* there are some other pointer constants we must deal with */ diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c index 67c9a13..2a694b4 100644 --- a/arch/m68k/lib/board.c +++ b/arch/m68k/lib/board.c @@ -415,8 +415,8 @@ void board_init_r (gd_t *id, ulong dest_addr) /* * We have to relocate the command table manually */ - fixup_cmdtable(&__u_boot_cmd_start, - (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start)); + fixup_cmdtable(ll_entry_start(cmd_tbl_t, cmd), + ll_entry_count(cmd_tbl_t, cmd)); #endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */ /* there are some other pointer constants we must deal with */ diff --git a/arch/mips/lib/board.c b/arch/mips/lib/board.c index b14b33e..7ddd778 100644 --- a/arch/mips/lib/board.c +++ b/arch/mips/lib/board.c @@ -266,8 +266,8 @@ void board_init_r(gd_t *id, ulong dest_addr) /* * We have to relocate the command table manually */ - fixup_cmdtable(&__u_boot_cmd_start, - (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start)); + fixup_cmdtable(ll_entry_start(cmd_tbl_t, cmd), + ll_entry_count(cmd_tbl_t, cmd)); #endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */ /* there are some other pointer constants we must deal with */ diff --git a/arch/nds32/lib/board.c b/arch/nds32/lib/board.c index 89900fe..cd8d6a7 100644 --- a/arch/nds32/lib/board.c +++ b/arch/nds32/lib/board.c @@ -320,8 +320,8 @@ void board_init_r(gd_t *id, ulong dest_addr) /* * We have to relocate the command table manually */ - fixup_cmdtable(&__u_boot_cmd_start, - (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start)); + fixup_cmdtable(ll_entry_start(cmd_tbl_t, cmd), + ll_entry_count(cmd_tbl_t, cmd)); #endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */ serial_initialize(); diff --git a/arch/sparc/lib/board.c b/arch/sparc/lib/board.c index ff0e0f2..32d025a 100644 --- a/arch/sparc/lib/board.c +++ b/arch/sparc/lib/board.c @@ -246,8 +246,8 @@ void board_init_f(ulong bootflag) /*
[U-Boot] which toolchain version for Microblaze
Hi Michal, Hi David which version of binutils and gcc you are currently using for embedded Linux development? Just now I've played a little bit with the new one I've found in the Xilinx git repository on: git://git.xilinx.com/microblaze-gnu.git Unfortunately both the binaries and the sources seems to be buggy. When I try to compile U-Boot with it the final linker stage runs into a SIGSEGV -- here is the (reduced) output: UNDEF_SYM=`microblaze-unknown-linux-gnu-objdump -x board/xilinx/microblaze-generic/libmicroblaze-generic.o api/libapi.o arch/microblaze/cpu/libmicroblaze.o arch/microblaze/lib/libmicroblaze.o **/*.o | sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`; cd /store/devel/MICROBLAZE/u-boot-mbref && microblaze-unknown-linux-gnu-ld.bfd -T u-boot.lds -Bstatic -Ttext 0x2900 $UNDEF_SYM arch/microblaze/cpu/start.o --start-group api/libapi.o arch/microblaze/cpu/libmicroblaze.o arch/microblaze/lib/libmicroblaze.o **/*.o board/xilinx/microblaze-generic/libmicroblaze-generic.o --end-group -L /opt/tools-4.6.2-mb-xilinx-v3.0/microblaze-unknown-linux-gnu/bin/../lib/gcc/microblaze-unknown-linux-gnu/4.6.2 -lgcc -Map u-boot.map -o u-boot /opt/tools-4.6.2-mb-xilinx-v3.0/microblaze-unknown-linux-gnu/bin/../lib/gcc/microblaze-unknown-linux-gnu/4.6.2/libgcc.a(_muldi3.o): In function `__muldi3': /home/buildbot/plgx_bld/xils005/2012_06_30/toolchains/lin32-microblaze-xilinx-linux-gnu/crosstool-ng/targets/src/gcc-4.6.2/libgcc/../gcc/libgcc2.c:549: undefined reference to `_GLOBAL_OFFSET_TABLE_' /bin/sh: line 1: 17792 Segmentation fault @David: This error can be reproduced with the binaries in Xilinx git repo. Have you any idea? @Michal: which version did you use currently? @all: Is there anybody who can give me a hint how I can / should handle this error? br, Stephan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] u-boot-tegra/master and /next have been updated and uploaded to denx.de
Folks, u-boot-tegra/next has been updated with new patches from Lucas, Marc, and Stephen, rebased against u-boot-arm, and pushed to denx.de. Please use this for any future patches, and if you have patches under review, please rebase them if they no longer apply cleanly. I'm going to be on vacation from the 16th thru the 25th of October. If you have stuff you want in /next, and it's reviewed/Acked/tested, let me know and I'll try to get it in on Monday before I leave. Thanks, Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Reminder: v2012.10 on Monday
Hey all, As a reminder, v2012.10 is going to be released on Monday. If you have any critical patches that are not current applied please let me (and any relevant custodian) know ASAP. Thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] u-boot-tegra/master and /next have been updated and uploaded to denx.de
On 10/12/2012 03:26 PM, Tom Warren wrote: > Folks, > > u-boot-tegra/next has been updated with new patches from Lucas, Marc, and > Stephen, rebased against u-boot-arm, and pushed to denx.de. u-boot-tegra/next right now is based on u-boot-arm/master, but includes patches that are both: a) Already in u-boot-arm/next (but *not* u-boot-arm/master since master is for the current release and next is for the next release) b) New. I think you want to create (rebase) u-boot-tegra/next based on u-boot-arm/next, and drop the following patches (they would rebase out anyway if you just rebase onto u-boot-arm/next): c699a7b tegra: nand: add board pinmux c7560dd tegra: clean up board include hell 1ddfbf3 tegra: add funcmux entry for NAND attached to KBC 8d49ab8 tegra20: rework UART GPIO handling 5904a2e tegra20: add clock_set_pllout function 0e0eb51 tegra20: complete periph_id enum 7811a6d tegra: enable CONFIG_CMD_PART 517ef6d Tegra20: Move some include files to arch-tegra for sharing with Tegra30 1367676 Tegra20: Move some code files to common directories for upcoming Tegra30 patches. 7d92ef4 tegra: Rename Medcom to Medcom-Wide c527d55 tegra: Update Avionic Design vendor prefix ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] U-Boot git usage model
On 10/12/2012 05:11:17 AM, Albert ARIBAUD wrote: Hi Scott, On Thu, 11 Oct 2012 13:59:31 -0500, Scott Wood wrote: > On 10/11/2012 01:45:02 PM, Albert ARIBAUD wrote: > > Hi Scott, > > > > On Thu, 11 Oct 2012 13:13:33 -0500, Scott Wood > > wrote: > > > > > FWIW I think putting policy documents in a wiki, without any > > > guidance on who's supposed to edit it or how changes get approved, > > is a > > > bad idea. Why not put policy documents in the git-managed source > > > tree? And changes would be > > > proposed, discussed, and accepted/rejected like any other change. > > Plus > > > there'd be at least a chance of a commit message showing rationale. > > > > While I can see the benefits you find in this, is it not based on > > the unspoken axiom that the project's policies should necessarily be > > subject to a democratic process? > > Process is othogonal to revision control. We could vote on whether a > policy patch gets applied, though I do not think U-Boot is currently > democraticly run, except to the extent that Wolfgang sometimes changes > his mind if enough people complain. I do not know of any existing > democratic process for approving a wiki update, and would hesitate to > just go make a change. My remark was that Stephen took the democracy for granted in the process, not that there was a relationship to be drawn between process and revision control. OK, I misread what you said. I don't think my comment (I assume you meant mine and not Stephen's, given what it's a reply to) assumes any such thing. Wolfgang is free to NACK any patch that changes policy in ways he doesn't like. With the wiki it's not clear who should make changes to policy documents and under what circumstances, but it doesn't appear to be just Wolfgang, as he has said things like "it's a wiki, go edit it". http://www.mail-archive.com/u-boot@lists.denx.de/msg87395.html http://www.mail-archive.com/u-boot@lists.denx.de/msg12795.html > As for the merits of the policy itself, I find maintainer signoffs to > be useful, for example to distinguish a patch that I've applied locally > versus one that I've fetched from upstream. This you can see by looking at the upstream branch tip, the patch's committer identity or by doing a git branch -r --contains . Sure, I was just describing a way in which I found it useful. Are there any benefits to U-Boot's current policy that justify deviating from what Signed-off-by: means in Linux? -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tools/env: Fix build failure from missing header include
Dear Joe Hershberger, > This was introduced in: > 8679d0ffdcc0beafea8e6942c0c67cf859afa18e - > COMMON: Use __stringify() instead of MK_STR() > > The header is now needed since common.h is not included in this tool. Good find. This is -next, right ? > Signed-off-by: Joe Hershberger > --- > tools/env/fw_env.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c > index 520ce3f..ab8c15d 100644 > --- a/tools/env/fw_env.c > +++ b/tools/env/fw_env.c > @@ -26,6 +26,7 @@ > > #include > #include > +#include > #include > #include > #include Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/5] input: Use finer grain udelays while waitng for the i8042 keyboard buffer to empty
Hi Graeme, On Thu, Oct 11, 2012 at 8:55 PM, Graeme Russ wrote: > Hi Simon, > > On Fri, Oct 12, 2012 at 12:15 PM, Simon Glass wrote: > >> diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c >> index c3bc536..99254e4 100644 >> --- a/drivers/input/i8042.c >> +++ b/drivers/input/i8042.c >> @@ -607,11 +607,10 @@ static void kbd_led_set(void) >> >> static int kbd_input_empty(void) >> { >> - int kbdTimeout = KBD_TIMEOUT; >> + int kbdTimeout = KBD_TIMEOUT * 1000; >> >> - /* wait for input buf empty */ >> while ((in8(I8042_STATUS_REG) & 0x02) && kbdTimeout--) > > I know this magic number was already here, but later patches introduce > even more. Any chance these can be cleaned up as well? Yes, will do. Regards, Simon > > Regards, > > Graeme ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 2/5] input: Provide a board specific mechanism to decide whether to skip i8042 init
From: Gabe Black This change adds a board overridable function which can be used to decide whether or not to initialize the i8042 keyboard controller. On systems where it isn't actually connected to anything, this can save a significant amount of boot time. On Stumpy, this saves about 200ms on boot. Signed-off-by: Gabe Black Signed-off-by: Simon Glass --- Changes in v2: - Use __weak instead of the long attribute form drivers/input/i8042.c | 13 - 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c index 6839c6b..3a4c467 100644 --- a/drivers/input/i8042.c +++ b/drivers/input/i8042.c @@ -26,6 +26,7 @@ /* includes */ #include +#include #ifdef CONFIG_USE_CPCIDVI extern u8 gt_cpcidvi_in8(u32 offset); @@ -320,6 +321,16 @@ static int kbd_controller_present(void) return in8(I8042_STATUS_REG) != 0xff; } +/* + * Implement a weak default function for boards that optionally + * need to skip the i8042 initialization. + */ +int __weak board_i8042_skip(void) +{ + /* As default, don't skip */ + return 0; +} + /*** * * i8042_kbd_init - reset keyboard and init state flags @@ -329,7 +340,7 @@ int i8042_kbd_init(void) int keymap, try; char *penv; - if (!kbd_controller_present()) + if (!kbd_controller_present() || board_i8042_skip()) return -1; #ifdef CONFIG_USE_CPCIDVI -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 1/5] input: Use finer grain udelays while waitng for the i8042 keyboard buffer to empty
From: Gabe Black On x86, the i8042 keyboard controller driver frequently waits for the keyboard input buffer to be empty to make sure the controller has had a chance to process the data it was given. The way the delay loop was structured, if the controller hadn't cleared the corresponding status bit immediately, it would wait 1ms before checking again. If the keyboard responded quickly but not instantly, the driver would still wait a full 1ms when perhaps 1us would have been sufficient. Because udelay is a busy wait anyway, this change decreases the delay between checks to 1us. Also, this change gets rid of a hardcoded 250ms delay. On Stumpy, this saves 100-150ms during boot. Signed-off-by: Gabe Black Signed-off-by: Simon Glass --- Changes in v2: - Add constants for i8042 status registers drivers/input/i8042.c |9 +++-- include/i8042.h |6 ++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c index c3bc536..6839c6b 100644 --- a/drivers/input/i8042.c +++ b/drivers/input/i8042.c @@ -607,11 +607,10 @@ static void kbd_led_set(void) static int kbd_input_empty(void) { - int kbdTimeout = KBD_TIMEOUT; + int kbdTimeout = KBD_TIMEOUT * 1000; - /* wait for input buf empty */ - while ((in8(I8042_STATUS_REG) & 0x02) && kbdTimeout--) - udelay(1000); + while ((in8(I8042_STATUS_REG) & I8042_STATUS_IN_DATA) && kbdTimeout--) + udelay(1); return kbdTimeout != -1; } @@ -625,8 +624,6 @@ static int kbd_reset(void) out8(I8042_DATA_REG, 0xff); - udelay(25); - if (kbd_input_empty() == 0) return -1; diff --git a/include/i8042.h b/include/i8042.h index 1395289..aeb3f09 100644 --- a/include/i8042.h +++ b/include/i8042.h @@ -39,6 +39,12 @@ #define I8042_STATUS_REG(CONFIG_SYS_ISA_IO + 0x0064)/* keyboard status read */ #define I8042_COMMAND_REG (CONFIG_SYS_ISA_IO + 0x0064)/* keyboard ctrl write */ +enum { + /* Output register (I8042_DATA_REG) has data for system */ + I8042_STATUS_OUT_DATA = 1 << 0, + I8042_STATUS_IN_DATA= 1 << 1, +}; + #define KBD_US 0/* default US layout */ #define KBD_GER 1/* german layout */ -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] x86: coreboot: Enable i8042 keyboard
Add support for an i8042 keyboard controller. Signed-off-by: Simon Glass --- include/configs/coreboot.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/include/configs/coreboot.h b/include/configs/coreboot.h index 0e89242..a0d3d44 100644 --- a/include/configs/coreboot.h +++ b/include/configs/coreboot.h @@ -50,6 +50,8 @@ */ #define CONFIG_RTC_MC146818 #define CONFIG_SYS_ISA_IO_BASE_ADDRESS 0 +#define CONFIG_SYS_ISA_IO CONFIG_SYS_ISA_IO_BASE_ADDRESS + /*--- * Serial Configuration @@ -99,6 +101,8 @@ #undef CONFIG_VIDEO #undef CONFIG_CFB_CONSOLE +#define CONFIG_I8042_KBD + /*--- * Command line configuration. */ -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/5] input: Provide a board specific mechanism to decide whether to skip i8042 init
Hi Tom, On Fri, Oct 12, 2012 at 9:05 AM, Tom Rini wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 10/11/12 18:15, Simon Glass wrote: >> From: Gabe Black >> >> This change adds a board overridable function which can be used to >> decide whether or not to initialize the i8042 keyboard controller. >> On systems where it isn't actually connected to anything, this can >> save a significant amount of boot time. >> >> On Stumpy, this saves about 200ms on boot. >> >> Signed-off-by: Gabe Black Signed-off-by: >> Simon Glass --- drivers/input/i8042.c | 13 >> - 1 files changed, 12 insertions(+), 1 deletions(-) >> >> diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c index >> 99254e4..cae2d0a 100644 --- a/drivers/input/i8042.c +++ >> b/drivers/input/i8042.c @@ -320,6 +320,17 @@ static int >> kbd_controller_present(void) return in8(I8042_STATUS_REG) != 0xff; >> } >> >> +/* + * Implement a weak default function for boards that >> optionally + * need to skip the i8042 initialization. + */ +int >> __board_i8042_skip(void) +{ + /* As default, don't skip */ + return >> 0; +} +int board_i8042_skip(void) __attribute__((weak, >> alias("__board_i8042_skip"))); > > Please add and use __weak directly, thanks. Yes will do, > > - -- > Tom > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.11 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ > > iQIcBAEBAgAGBQJQeD/QAAoJENk4IS6UOR1WVMsP/RJTlWaTvF56K6H75WbjK7l5 > xE7zeAeCS4gbM1CS0fEv1X4296L7oWUUUkw73gwSEAxd2CxOj96HrhJI0WQIqZ/a > m6ysfwswzY92oqXJGxnWnLiZzd0JUR/QHZAM7U0tX1yHFsYrycEtuq+JvfMm5BU7 > 1ozqrN0SoFPa8ZBq0GpnXhDsGdMApucDBkbDv3cgHTYPkOlfh3gLpbz/dkWKxrCv > NBwKvZgVMtEPf9hZf5CLuB2ghfWIRyP50Bf99nKhV+gdLGtrEbboHkMMXEc2Z1ex > foEMqpmSiMVd9yMRqVEIM3sWwnapqAZVn3wQLoq5Kz+YGS/9e0c9t95ck+CmndiM > kJmrx/LZ/XSGzjLrKC3MWLWC/KUS2hHqj4AfYUf1kL5lPuHM24c+oSRfOjogkaqR > bMJZ9ii/kYcQJry/dAYTjFyEa120X48y46e2bNcMhWVZh48A6VpJkFILb1Ga4tEo > ss+hMBX/tiMNp8eoOR7y1n+A+94r3ABKUrLapjfVKg+qXeufrMyotBVfPY35hWnP > qLNVlPpdEF7nP1Wt22OB9s6bBcI6dCrNuL75Ym6wJ3DYnpqU8Y8f3HihwL7cBy7F > o1Zpo0bzazNfy722IYphWu0O3hihIQ11fRpAndVemUzjaXP/kKxaVhiDCj28xHup > 9zGuTm7SW/liJTXp4cc8 > =5tNx > -END PGP SIGNATURE- Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/14] Homogenise baud rate type to unsigned int
The global_data and bd_info structures for each board have different types for the baudrate and bi_baudrate fields. This series lines them all up to be the same. There is some discussion on the list about using u32 instead of 'unsigned int'. These are equivalent on all current architectures, and other fields in global_data and bd_info do not use this. However I can change this if required. Simon Glass (14): sh: Change bi_baudrate and global data baudrate to int avr32: Change bi_baudrate and global data baudrate to int m68k: Change bi_baudrate and global data baudrate to int microblaze: Change bi_baudrate and global data baudrate to int nios2: Change bi_baudrate and global data baudrate to int openrisc: Change bi_baudrate and global data baudrate to int powerpc: Change bi_baudrate and global data baudrate to int sparc: Change bi_baudrate and global data baudrate to int arm: Change global data baudrate to int blackfin: Change global data baudrate to int mips: Change global data baudrate to int nds32: Change global data baudrate to int x86: Change global data baudrate to int sandbox: Change global data baudrate to int arch/arm/include/asm/global_data.h|2 +- arch/arm/include/asm/u-boot.h |2 +- arch/avr32/include/asm/global_data.h |2 +- arch/avr32/include/asm/u-boot.h |2 +- arch/blackfin/include/asm/global_data.h |2 +- arch/blackfin/include/asm/u-boot.h|2 +- arch/blackfin/lib/board.c |2 +- arch/m68k/include/asm/global_data.h |2 +- arch/m68k/include/asm/u-boot.h|2 +- arch/microblaze/include/asm/global_data.h |2 +- arch/microblaze/include/asm/u-boot.h |2 +- arch/mips/include/asm/global_data.h |2 +- arch/mips/include/asm/u-boot.h|2 +- arch/nds32/include/asm/global_data.h |2 +- arch/nds32/include/asm/u-boot.h |2 +- arch/nios2/include/asm/global_data.h |2 +- arch/nios2/include/asm/u-boot.h |2 +- arch/openrisc/include/asm/global_data.h |2 +- arch/openrisc/include/asm/u-boot.h|2 +- arch/powerpc/include/asm/global_data.h|2 +- arch/powerpc/include/asm/u-boot.h |2 +- arch/sandbox/include/asm/global_data.h|2 +- arch/sh/include/asm/global_data.h |2 +- arch/sh/include/asm/u-boot.h |2 +- arch/sparc/include/asm/global_data.h |2 +- arch/sparc/include/asm/u-boot.h |2 +- arch/x86/include/asm/global_data.h|2 +- common/cmd_bdinfo.c | 26 +- 28 files changed, 40 insertions(+), 40 deletions(-) -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 10/14] blackfin: Change global data baudrate to int
This doesn't need to be a long, so change it. Also adjust bi_baudrate to be unsigned. Signed-off-by: Simon Glass --- arch/blackfin/include/asm/global_data.h |2 +- arch/blackfin/include/asm/u-boot.h |2 +- arch/blackfin/lib/board.c |2 +- common/cmd_bdinfo.c |2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/blackfin/include/asm/global_data.h b/arch/blackfin/include/asm/global_data.h index 290a9e7..d91e5a4 100644 --- a/arch/blackfin/include/asm/global_data.h +++ b/arch/blackfin/include/asm/global_data.h @@ -41,7 +41,7 @@ typedef struct global_data { bd_t *bd; unsigned long flags; unsigned long board_type; - unsigned long baudrate; + unsigned int baudrate; unsigned long have_console; /* serial_init() was called */ #ifdef CONFIG_PRE_CONSOLE_BUFFER unsigned long precon_buf_idx; /* Pre-Console buffer index */ diff --git a/arch/blackfin/include/asm/u-boot.h b/arch/blackfin/include/asm/u-boot.h index df81183..7abd6c2 100644 --- a/arch/blackfin/include/asm/u-boot.h +++ b/arch/blackfin/include/asm/u-boot.h @@ -29,7 +29,7 @@ #define _U_BOOT_H_ 1 typedef struct bd_info { - int bi_baudrate;/* serial console baudrate */ + unsigned int bi_baudrate; /* serial console baudrate */ unsigned long bi_boot_params; /* where this board expects params */ unsigned long bi_memstart; /* start of DRAM memory */ phys_size_t bi_memsize; /* size of DRAM memory in bytes */ diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c index e47b606..9fbbea0 100644 --- a/arch/blackfin/lib/board.c +++ b/arch/blackfin/lib/board.c @@ -78,7 +78,7 @@ static void display_global_data(void) printf(" gd: %p\n", gd); printf(" |-flags: %lx\n", gd->flags); printf(" |-board_type: %lx\n", gd->board_type); - printf(" |-baudrate: %lu\n", gd->baudrate); + printf(" |-baudrate: %u\n", gd->baudrate); printf(" |-have_console: %lx\n", gd->have_console); printf(" |-ram_size: %lx\n", gd->ram_size); printf(" |-env_addr: %lx\n", gd->env_addr); diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index 7686996..bc737d0 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -304,7 +304,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) print_eth(0); printf("ip_addr = %s\n", getenv("ipaddr")); - printf("baudrate= %d bps\n", bd->bi_baudrate); + printf("baudrate= %u bps\n", bd->bi_baudrate); return 0; } -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 06/14] openrisc: Change bi_baudrate and global data baudrate to int
These don't need to be longs, so change them. Signed-off-by: Simon Glass --- arch/openrisc/include/asm/global_data.h |2 +- arch/openrisc/include/asm/u-boot.h |2 +- common/cmd_bdinfo.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/openrisc/include/asm/global_data.h b/arch/openrisc/include/asm/global_data.h index 6a0c0cc..96f3f1c 100644 --- a/arch/openrisc/include/asm/global_data.h +++ b/arch/openrisc/include/asm/global_data.h @@ -35,7 +35,7 @@ typedef struct global_data { bd_t*bd; unsigned long flags; - unsigned long baudrate; + unsigned intbaudrate; unsigned long cpu_clk;/* CPU clock in Hz! */ unsigned long have_console; /* serial_init() was called */ phys_size_t ram_size; /* RAM size */ diff --git a/arch/openrisc/include/asm/u-boot.h b/arch/openrisc/include/asm/u-boot.h index 76b8132..f2f31d3 100644 --- a/arch/openrisc/include/asm/u-boot.h +++ b/arch/openrisc/include/asm/u-boot.h @@ -32,7 +32,7 @@ #define _U_BOOT_H_ typedef struct bd_info { - unsigned long bi_baudrate;/* serial console baudrate */ + unsigned intbi_baudrate;/* serial console baudrate */ unsigned long bi_arch_number; /* unique id for this board */ unsigned long bi_boot_params; /* where this board expects params */ unsigned long bi_memstart;/* start of DRAM memory */ diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index 899a216..5af60e8 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -509,7 +509,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) printf("ip_addr = %s\n", getenv("ipaddr")); #endif - printf("baudrate= %ld bps\n", bd->bi_baudrate); + printf("baudrate= %u bps\n", bd->bi_baudrate); return 0; } -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 03/14] m68k: Change bi_baudrate and global data baudrate to int
These don't need to be longs, so change them. Signed-off-by: Simon Glass --- arch/m68k/include/asm/global_data.h |2 +- arch/m68k/include/asm/u-boot.h |2 +- common/cmd_bdinfo.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/m68k/include/asm/global_data.h b/arch/m68k/include/asm/global_data.h index cd55b83..0cdb11c 100644 --- a/arch/m68k/include/asm/global_data.h +++ b/arch/m68k/include/asm/global_data.h @@ -34,7 +34,7 @@ typedefstruct global_data { bd_t*bd; unsigned long flags; - unsigned long baudrate; + unsigned intbaudrate; unsigned long cpu_clk;/* CPU clock in Hz! */ unsigned long bus_clk; #ifdef CONFIG_PCI diff --git a/arch/m68k/include/asm/u-boot.h b/arch/m68k/include/asm/u-boot.h index 973c9ee..8c7c554 100644 --- a/arch/m68k/include/asm/u-boot.h +++ b/arch/m68k/include/asm/u-boot.h @@ -58,7 +58,7 @@ typedef struct bd_info { unsigned long bi_vcofreq; /* vco Freq in MHz */ unsigned long bi_flbfreq; /* Flexbus Freq in MHz */ #endif - unsigned long bi_baudrate; /* Console Baudrate */ + unsigned int bi_baudrate; /* Console Baudrate */ } bd_t; #endif /* __ASSEMBLY__ */ diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index 138693e..d6f14ab 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -277,7 +277,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) printf("ip_addr = %s\n", getenv("ipaddr")); #endif - printf("baudrate= %ld bps\n", bd->bi_baudrate); + printf("baudrate= %u bps\n", bd->bi_baudrate); return 0; } -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 05/14] nios2: Change bi_baudrate and global data baudrate to int
These don't need to be longs, so change them. Signed-off-by: Simon Glass --- arch/nios2/include/asm/global_data.h |2 +- arch/nios2/include/asm/u-boot.h |2 +- common/cmd_bdinfo.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/nios2/include/asm/global_data.h b/arch/nios2/include/asm/global_data.h index 3b0d9e6..413b485 100644 --- a/arch/nios2/include/asm/global_data.h +++ b/arch/nios2/include/asm/global_data.h @@ -26,7 +26,7 @@ typedefstruct global_data { bd_t*bd; unsigned long flags; - unsigned long baudrate; + unsigned intbaudrate; unsigned long cpu_clk;/* CPU clock in Hz! */ unsigned long have_console; /* serial_init() was called */ #ifdef CONFIG_PRE_CONSOLE_BUFFER diff --git a/arch/nios2/include/asm/u-boot.h b/arch/nios2/include/asm/u-boot.h index 315ef8b..e591237 100644 --- a/arch/nios2/include/asm/u-boot.h +++ b/arch/nios2/include/asm/u-boot.h @@ -39,7 +39,7 @@ typedef struct bd_info { unsigned long bi_flashoffset; /* reserved area for startup monitor */ unsigned long bi_sramstart; /* start of SRAM memory */ unsigned long bi_sramsize;/* size of SRAM memory */ - unsigned long bi_baudrate;/* Console Baudrate */ + unsigned intbi_baudrate;/* Console Baudrate */ } bd_t; /* For image.h:image_check_target_arch() */ diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index 447c0a2..899a216 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -175,7 +175,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) printf("ip_addr = %s\n", getenv("ipaddr")); #endif - printf("baudrate= %ld bps\n", bd->bi_baudrate); + printf("baudrate= %u bps\n", bd->bi_baudrate); return 0; } -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 02/14] avr32: Change bi_baudrate and global data baudrate to int
These don't need to be longs, so change them. Signed-off-by: Simon Glass --- arch/avr32/include/asm/global_data.h |2 +- arch/avr32/include/asm/u-boot.h |2 +- common/cmd_bdinfo.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/avr32/include/asm/global_data.h b/arch/avr32/include/asm/global_data.h index 7878bb1..bf661e2 100644 --- a/arch/avr32/include/asm/global_data.h +++ b/arch/avr32/include/asm/global_data.h @@ -33,7 +33,7 @@ typedefstruct global_data { bd_t*bd; unsigned long flags; - unsigned long baudrate; + unsigned intbaudrate; unsigned long stack_end; /* highest stack address */ unsigned long have_console; /* serial_init() was called */ #ifdef CONFIG_PRE_CONSOLE_BUFFER diff --git a/arch/avr32/include/asm/u-boot.h b/arch/avr32/include/asm/u-boot.h index 1d2959a..97bbbde 100644 --- a/arch/avr32/include/asm/u-boot.h +++ b/arch/avr32/include/asm/u-boot.h @@ -23,7 +23,7 @@ #define __ASM_U_BOOT_H__ 1 typedef struct bd_info { - unsigned long bi_baudrate; + unsigned intbi_baudrate; unsigned char bi_phy_id[4]; unsigned long bi_board_number; void*bi_boot_params; diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index 698826c..138693e 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -344,7 +344,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) print_eth(0); printf("ip_addr = %s\n", getenv("ipaddr")); - printf("baudrate= %lu bps\n", bd->bi_baudrate); + printf("baudrate= %u bps\n", bd->bi_baudrate); return 0; } -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 01/14] sh: Change bi_baudrate and global data baudrate to int
These don't need to be longs, so change them. Signed-off-by: Simon Glass --- arch/sh/include/asm/global_data.h |2 +- arch/sh/include/asm/u-boot.h |2 +- common/cmd_bdinfo.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/sh/include/asm/global_data.h b/arch/sh/include/asm/global_data.h index 6e534ad..9a2c193 100644 --- a/arch/sh/include/asm/global_data.h +++ b/arch/sh/include/asm/global_data.h @@ -31,7 +31,7 @@ typedef struct global_data { bd_t*bd; unsigned long flags; - unsigned long baudrate; + unsigned intbaudrate; unsigned long cpu_clk;/* CPU clock in Hz! */ unsigned long have_console; /* serial_init() was called */ #ifdef CONFIG_PRE_CONSOLE_BUFFER diff --git a/arch/sh/include/asm/u-boot.h b/arch/sh/include/asm/u-boot.h index 6c04daf..2c9c463 100644 --- a/arch/sh/include/asm/u-boot.h +++ b/arch/sh/include/asm/u-boot.h @@ -33,7 +33,7 @@ typedef struct bd_info { unsigned long bi_flashoffset; /* reserved area for startup monitor */ unsigned long bi_sramstart; /* start of SRAM memory */ unsigned long bi_sramsize;/* size of SRAM memory */ - unsigned long bi_baudrate;/* Console Baudrate */ + unsigned intbi_baudrate;/* Console Baudrate */ unsigned long bi_boot_params; /* where this board expects params */ } bd_t; diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index 286c8c8..698826c 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -405,7 +405,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) print_eth(0); printf("ip_addr = %s\n", getenv("ipaddr")); #endif - printf("baudrate= %ld bps\n", (ulong)bd->bi_baudrate); + printf("baudrate= %u bps\n", bd->bi_baudrate); return 0; } -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 07/14] powerpc: Change bi_baudrate and global data baudrate to int
These don't need to be longs, so change them. Signed-off-by: Simon Glass --- arch/powerpc/include/asm/global_data.h |2 +- arch/powerpc/include/asm/u-boot.h |2 +- common/cmd_bdinfo.c|2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/global_data.h b/arch/powerpc/include/asm/global_data.h index 5a5877f..374fc6d 100644 --- a/arch/powerpc/include/asm/global_data.h +++ b/arch/powerpc/include/asm/global_data.h @@ -38,7 +38,7 @@ typedefstruct global_data { bd_t*bd; unsigned long flags; - unsigned long baudrate; + unsigned intbaudrate; unsigned long cpu_clk;/* CPU clock in Hz! */ unsigned long bus_clk; #if defined(CONFIG_8xx) diff --git a/arch/powerpc/include/asm/u-boot.h b/arch/powerpc/include/asm/u-boot.h index b2fa2b5..7229a98 100644 --- a/arch/powerpc/include/asm/u-boot.h +++ b/arch/powerpc/include/asm/u-boot.h @@ -81,7 +81,7 @@ typedef struct bd_info { unsigned long bi_ipbfreq; /* IPB Bus Freq, in MHz */ unsigned long bi_pcifreq; /* PCI Bus Freq, in MHz */ #endif - unsigned long bi_baudrate;/* Console Baudrate */ + unsigned intbi_baudrate;/* Console Baudrate */ #if defined(CONFIG_405) || \ defined(CONFIG_405GP) || \ defined(CONFIG_405CR) || \ diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index 5af60e8..6b2f914 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -148,7 +148,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) print_mhz("ethspeed", bd->bi_ethspeed); #endif printf("IP addr = %s\n", getenv("ipaddr")); - printf("baudrate= %6ld bps\n", bd->bi_baudrate); + printf("baudrate= %6u bps\n", bd->bi_baudrate); print_num("relocaddr", gd->relocaddr); return 0; } -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 09/14] arm: Change global data baudrate to int
This does not need to be a long, so change it. Also adjust bi_baudrate to be unsigned. Signed-off-by: Simon Glass --- arch/arm/include/asm/global_data.h |2 +- arch/arm/include/asm/u-boot.h |2 +- common/cmd_bdinfo.c|2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h index f8088fe..2b9af93 100644 --- a/arch/arm/include/asm/global_data.h +++ b/arch/arm/include/asm/global_data.h @@ -34,7 +34,7 @@ typedefstruct global_data { bd_t*bd; unsigned long flags; - unsigned long baudrate; + unsigned intbaudrate; unsigned long have_console; /* serial_init() was called */ #ifdef CONFIG_PRE_CONSOLE_BUFFER unsigned long precon_buf_idx; /* Pre-Console buffer index */ diff --git a/arch/arm/include/asm/u-boot.h b/arch/arm/include/asm/u-boot.h index eac3800..2ba98bc 100644 --- a/arch/arm/include/asm/u-boot.h +++ b/arch/arm/include/asm/u-boot.h @@ -37,7 +37,7 @@ #define _U_BOOT_H_ 1 typedef struct bd_info { -intbi_baudrate;/* serial console baudrate */ + unsigned intbi_baudrate;/* serial console baudrate */ ulong bi_arch_number; /* unique id for this board */ ulong bi_boot_params; /* where this board expects params */ unsigned long bi_arm_freq; /* arm frequency */ diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index ca05985..7686996 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -369,7 +369,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) print_eth(0); printf("ip_addr = %s\n", getenv("ipaddr")); #endif - printf("baudrate= %d bps\n", bd->bi_baudrate); + printf("baudrate= %u bps\n", bd->bi_baudrate); #if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) print_num("TLB addr", gd->tlb_addr); #endif -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 11/14] mips: Change global data baudrate to int
This doesn't need to be a long, so change it. Also adjust bi_baudrate to be unsigned. Signed-off-by: Simon Glass --- arch/mips/include/asm/global_data.h |2 +- arch/mips/include/asm/u-boot.h |2 +- common/cmd_bdinfo.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/mips/include/asm/global_data.h b/arch/mips/include/asm/global_data.h index 6e2cdc7..a735a8a 100644 --- a/arch/mips/include/asm/global_data.h +++ b/arch/mips/include/asm/global_data.h @@ -48,7 +48,7 @@ typedef struct global_data { unsigned long tbl; unsigned long lastinc; #endif - unsigned long baudrate; + unsigned intbaudrate; unsigned long have_console; /* serial_init() was called */ #ifdef CONFIG_PRE_CONSOLE_BUFFER unsigned long precon_buf_idx; /* Pre-Console buffer index */ diff --git a/arch/mips/include/asm/u-boot.h b/arch/mips/include/asm/u-boot.h index 590649a..5fa4a6a 100644 --- a/arch/mips/include/asm/u-boot.h +++ b/arch/mips/include/asm/u-boot.h @@ -32,7 +32,7 @@ #define _U_BOOT_H_ 1 typedef struct bd_info { - int bi_baudrate;/* serial console baudrate */ + unsigned intbi_baudrate;/* serial console baudrate */ unsigned long bi_arch_number; /* unique id for this board */ unsigned long bi_boot_params; /* where this board expects params */ unsigned long bi_memstart;/* start of DRAM memory */ diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index bc737d0..aca54d1 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -324,7 +324,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) print_eth(0); printf("ip_addr = %s\n", getenv("ipaddr")); - printf("baudrate= %d bps\n", bd->bi_baudrate); + printf("baudrate= %u bps\n", bd->bi_baudrate); return 0; } -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 04/14] microblaze: Change bi_baudrate and global data baudrate to int
These don't need to be longs, so change them. Signed-off-by: Simon Glass --- arch/microblaze/include/asm/global_data.h |2 +- arch/microblaze/include/asm/u-boot.h |2 +- common/cmd_bdinfo.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/microblaze/include/asm/global_data.h b/arch/microblaze/include/asm/global_data.h index de3b8db..2111c7c 100644 --- a/arch/microblaze/include/asm/global_data.h +++ b/arch/microblaze/include/asm/global_data.h @@ -35,7 +35,7 @@ typedefstruct global_data { bd_t*bd; unsigned long flags; - unsigned long baudrate; + unsigned intbaudrate; unsigned long have_console; /* serial_init() was called */ #ifdef CONFIG_PRE_CONSOLE_BUFFER unsigned long precon_buf_idx; /* Pre-Console buffer index */ diff --git a/arch/microblaze/include/asm/u-boot.h b/arch/microblaze/include/asm/u-boot.h index a0b1dbf..8d00658 100644 --- a/arch/microblaze/include/asm/u-boot.h +++ b/arch/microblaze/include/asm/u-boot.h @@ -40,7 +40,7 @@ typedef struct bd_info { unsigned long bi_flashoffset; /* reserved area for startup monitor */ unsigned long bi_sramstart; /* start of SRAM memory */ unsigned long bi_sramsize;/* size of SRAM memory */ - unsigned long bi_baudrate;/* Console Baudrate */ + unsigned intbi_baudrate;/* Console Baudrate */ } bd_t; /* For image.h:image_check_target_arch() */ diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index d6f14ab..447c0a2 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -198,7 +198,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) print_eth(0); printf("ip_addr = %s\n", getenv("ipaddr")); #endif - printf("baudrate= %ld bps\n", (ulong)bd->bi_baudrate); + printf("baudrate= %u bps\n", (ulong)bd->bi_baudrate); return 0; } -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 08/14] sparc: Change bi_baudrate and global data baudrate to int
These don't need to be longs, so change them. Signed-off-by: Simon Glass --- arch/sparc/include/asm/global_data.h |2 +- arch/sparc/include/asm/u-boot.h |2 +- common/cmd_bdinfo.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/sparc/include/asm/global_data.h b/arch/sparc/include/asm/global_data.h index 93d3cc0..aa63b35 100644 --- a/arch/sparc/include/asm/global_data.h +++ b/arch/sparc/include/asm/global_data.h @@ -40,7 +40,7 @@ typedef struct global_data { bd_t *bd; unsigned long flags; - unsigned long baudrate; + unsigned int baudrate; unsigned long cpu_clk; /* CPU clock in Hz! */ unsigned long bus_clk; diff --git a/arch/sparc/include/asm/u-boot.h b/arch/sparc/include/asm/u-boot.h index 8d01118..04c05d4 100644 --- a/arch/sparc/include/asm/u-boot.h +++ b/arch/sparc/include/asm/u-boot.h @@ -54,7 +54,7 @@ typedef struct bd_info { unsigned short bi_ethspeed; /* Ethernet speed in Mbps */ unsigned long bi_intfreq; /* Internal Freq, in MHz */ unsigned long bi_busfreq; /* Bus Freq, in MHz */ - unsigned long bi_baudrate; /* Console Baudrate */ + unsigned int bi_baudrate; /* Console Baudrate */ } bd_t; #endif /* __ASSEMBLY__ */ diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index 6b2f914..ca05985 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -231,7 +231,7 @@ int do_bdinfo(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) print_eth(0); printf("ip_addr = %s\n", getenv("ipaddr")); #endif - printf("baudrate = %6ld bps\n", bd->bi_baudrate); + printf("baudrate = %6u bps\n", bd->bi_baudrate); return 0; } -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 13/14] x86: Change global data baudrate to int
This doesn't need to be a long, so change it. Signed-off-by: Simon Glass --- arch/x86/include/asm/global_data.h |2 +- common/cmd_bdinfo.c|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h index 6d29c0b..bce999f 100644 --- a/arch/x86/include/asm/global_data.h +++ b/arch/x86/include/asm/global_data.h @@ -38,7 +38,7 @@ typedef struct global_data { unsigned long gd_addr;/* Location of Global Data */ bd_t*bd; unsigned long flags; - unsigned long baudrate; + unsigned intbaudrate; unsigned long have_console; /* serial_init() was called */ #ifdef CONFIG_PRE_CONSOLE_BUFFER unsigned long precon_buf_idx; /* Pre-Console buffer index */ diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index 656c565..48cdd16 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -439,7 +439,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) printf("ip_addr = %s\n", getenv("ipaddr")); print_mhz("ethspeed", bd->bi_ethspeed); #endif - printf("baudrate= %d bps\n", bd->bi_baudrate); + printf("baudrate= %u bps\n", bd->bi_baudrate); return 0; } -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 12/14] nds32: Change global data baudrate to int
This doesn't need to be a long, so change it. Also adjust bi_baudrate to be unsigned. Signed-off-by: Simon Glass --- arch/nds32/include/asm/global_data.h |2 +- arch/nds32/include/asm/u-boot.h |2 +- common/cmd_bdinfo.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/nds32/include/asm/global_data.h b/arch/nds32/include/asm/global_data.h index 94bd4c2..b1feb2c 100644 --- a/arch/nds32/include/asm/global_data.h +++ b/arch/nds32/include/asm/global_data.h @@ -44,7 +44,7 @@ typedefstruct global_data { bd_t*bd; unsigned long flags; - unsigned long baudrate; + unsigned intbaudrate; unsigned long have_console; /* serial_init() was called */ unsigned long reloc_off; /* Relocation Offset */ diff --git a/arch/nds32/include/asm/u-boot.h b/arch/nds32/include/asm/u-boot.h index b533fea..7b8d8e4 100644 --- a/arch/nds32/include/asm/u-boot.h +++ b/arch/nds32/include/asm/u-boot.h @@ -39,7 +39,7 @@ #include typedef struct bd_info { - int bi_baudrate;/* serial console baudrate */ + unsigned intbi_baudrate;/* serial console baudrate */ unsigned long bi_arch_number; /* unique id for this board */ unsigned long bi_boot_params; /* where this board expects params */ unsigned long bi_memstart;/* start of DRAM memory */ diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index aca54d1..656c565 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -487,7 +487,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) print_eth(0); printf("ip_addr = %s\n", getenv("ipaddr")); #endif - printf("baudrate= %d bps\n", bd->bi_baudrate); + printf("baudrate= %u bps\n", bd->bi_baudrate); return 0; } -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 14/14] sandbox: Change global data baudrate to int
This doesn't need to be a long, so change it. Signed-off-by: Simon Glass --- arch/sandbox/include/asm/global_data.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/sandbox/include/asm/global_data.h b/arch/sandbox/include/asm/global_data.h index 581fd2f..78a751d 100644 --- a/arch/sandbox/include/asm/global_data.h +++ b/arch/sandbox/include/asm/global_data.h @@ -36,7 +36,7 @@ typedefstruct global_data { bd_t*bd; unsigned long flags; - unsigned long baudrate; + unsigned intbaudrate; unsigned long have_console; /* serial_init() was called */ unsigned long env_addr; /* Address of Environment struct */ unsigned long env_valid; /* Checksum of Environment valid? */ -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/7] ide: Add printf format string for CONFIG_SYS_64BIT_LBA option
From: Gabe Black The size of an LBA type changes depending on this option. We need to use a different printf() string in each case, so create a define for this. Signed-off-by: Gabe Black Signed-off-by: Simon Glass --- include/ide.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/ide.h b/include/ide.h index 385e909..18d63b2 100644 --- a/include/ide.h +++ b/include/ide.h @@ -42,8 +42,10 @@ #ifdef CONFIG_SYS_64BIT_LBA typedef uint64_t lbaint_t; +#define LBAF "%llx" #else typedef ulong lbaint_t; +#define LBAF "%lx" #endif /* -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/7] usb: Support the CONFIG_SYS_64BIT_LBA option
From: Gabe Black usb_storage wouldn't compile when the CONFIG_SYS_64BIT_LBA option is turned on because the used fixed size data types in their exported functions when they should have used lbaint_t for the block count parameter. That meant that when the sizes happened to be the same, when using a 28 bit LBA, the driver would build, but when it wasn't, a 48 bit LBA, things broke. This change adjusts the signatures to use the right type and makes small adjustments in the affected functions. Signed-off-by: Gabe Black Signed-off-by: Simon Glass --- common/usb_storage.c | 24 ++-- 1 files changed, 14 insertions(+), 10 deletions(-) diff --git a/common/usb_storage.c b/common/usb_storage.c index 950451e..0c2a4c7 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -179,9 +179,9 @@ int usb_stor_get_info(struct usb_device *dev, struct us_data *us, int usb_storage_probe(struct usb_device *dev, unsigned int ifnum, struct us_data *ss); unsigned long usb_stor_read(int device, unsigned long blknr, - unsigned long blkcnt, void *buffer); + lbaint_t blkcnt, void *buffer); unsigned long usb_stor_write(int device, unsigned long blknr, -unsigned long blkcnt, const void *buffer); +lbaint_t blkcnt, const void *buffer); struct usb_device * usb_get_dev_index(int index); void uhci_show_temp_int_td(void); @@ -1053,9 +1053,10 @@ static void usb_bin_fixup(struct usb_device_descriptor descriptor, #endif /* CONFIG_USB_BIN_FIXUP */ unsigned long usb_stor_read(int device, unsigned long blknr, - unsigned long blkcnt, void *buffer) + lbaint_t blkcnt, void *buffer) { - unsigned long start, blks, buf_addr; + lbaint_t start, blks; + uintptr_t buf_addr; unsigned short smallblks; struct usb_device *dev; struct us_data *ss; @@ -1084,7 +1085,7 @@ unsigned long usb_stor_read(int device, unsigned long blknr, start = blknr; blks = blkcnt; - USB_STOR_PRINTF("\nusb_read: dev %d startblk %lx, blccnt %lx" + USB_STOR_PRINTF("\nusb_read: dev %d startblk " LBAF ", blccnt " LBAF " buffer %lx\n", device, start, blks, buf_addr); do { @@ -1114,7 +1115,8 @@ retry_it: } while (blks != 0); ss->flags &= ~USB_READY; - USB_STOR_PRINTF("usb_read: end startblk %lx, blccnt %x buffer %lx\n", + USB_STOR_PRINTF("usb_read: end startblk " LBAF + ", blccnt %x buffer %lx\n", start, smallblks, buf_addr); usb_disable_asynch(0); /* asynch transfer allowed */ @@ -1124,9 +1126,10 @@ retry_it: } unsigned long usb_stor_write(int device, unsigned long blknr, - unsigned long blkcnt, const void *buffer) + lbaint_t blkcnt, const void *buffer) { - unsigned long start, blks, buf_addr; + lbaint_t start, blks; + uintptr_t buf_addr; unsigned short smallblks; struct usb_device *dev; struct us_data *ss; @@ -1156,7 +1159,7 @@ unsigned long usb_stor_write(int device, unsigned long blknr, start = blknr; blks = blkcnt; - USB_STOR_PRINTF("\nusb_write: dev %d startblk %lx, blccnt %lx" + USB_STOR_PRINTF("\nusb_write: dev %d startblk " LBAF ", blccnt " LBAF " buffer %lx\n", device, start, blks, buf_addr); do { @@ -1188,7 +1191,8 @@ retry_it: } while (blks != 0); ss->flags &= ~USB_READY; - USB_STOR_PRINTF("usb_write: end startblk %lx, blccnt %x buffer %lx\n", + USB_STOR_PRINTF("usb_write: end startblk " LBAF + ", blccnt %x buffer %lx\n", start, smallblks, buf_addr); usb_disable_asynch(0); /* asynch transfer allowed */ -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 7/7] config: Enable CBFS, ext4 for coreboot
Enable Coreboot and EXT4 Filesystems on the coreboot board. Signed-off-by: Simon Glass --- include/configs/coreboot.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/include/configs/coreboot.h b/include/configs/coreboot.h index 0e89242..3df085b 100644 --- a/include/configs/coreboot.h +++ b/include/configs/coreboot.h @@ -92,6 +92,9 @@ #define CONFIG_MAC_PARTITION #define CONFIG_ISO_PARTITION /* Experimental */ +#define CONFIG_CMD_CBFS +#define CONFIG_CMD_EXT4 +#define CONFIG_CMD_EXT4_WRITE /*--- * Video Configuration -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/7] disk: Make the disk partition code work with no specific partition types
From: Gabe Black Currently, if the disk partition code is compiled with all of the parition types compiled out, it hits an #error which stops the build. This change adjusts that file so that those functions will fall through to their defaults in those cases instead of breaking the build. These functions are needed because other code calls them, and that code is needed because other config options are overly broad and bring in support we don't need along with support we do. Also reduce repetition of the 6-term #ifdef throughout the file. Signed-off-by: Gabe Black Signed-off-by: Simon Glass --- disk/part.c | 50 +- 1 files changed, 17 insertions(+), 33 deletions(-) diff --git a/disk/part.c b/disk/part.c index 3022969..ec50516 100644 --- a/disk/part.c +++ b/disk/part.c @@ -35,12 +35,15 @@ #define PRINTF(fmt,args...) #endif +/* Rather than repeat this expression each time, add a define for it */ #if (defined(CONFIG_CMD_IDE) || \ defined(CONFIG_CMD_SATA) || \ defined(CONFIG_CMD_SCSI) || \ defined(CONFIG_CMD_USB) || \ defined(CONFIG_MMC) || \ defined(CONFIG_SYSTEMACE) ) +#define HAVE_BLOCK_DEVICE +#endif struct block_drvr { char *name; @@ -71,6 +74,7 @@ static const struct block_drvr block_drvr[] = { DECLARE_GLOBAL_DATA_PTR; +#ifdef HAVE_BLOCK_DEVICE block_dev_desc_t *get_dev(const char *ifname, int dev) { const struct block_drvr *drvr = block_drvr; @@ -104,12 +108,7 @@ block_dev_desc_t *get_dev(const char *ifname, int dev) } #endif -#if (defined(CONFIG_CMD_IDE) || \ - defined(CONFIG_CMD_SATA) || \ - defined(CONFIG_CMD_SCSI) || \ - defined(CONFIG_CMD_USB) || \ - defined(CONFIG_MMC) || \ - defined(CONFIG_SYSTEMACE) ) +#ifdef HAVE_BLOCK_DEVICE /* - */ /* @@ -239,18 +238,7 @@ void dev_print (block_dev_desc_t *dev_desc) } #endif -#if (defined(CONFIG_CMD_IDE) || \ - defined(CONFIG_CMD_SATA) || \ - defined(CONFIG_CMD_SCSI) || \ - defined(CONFIG_CMD_USB) || \ - defined(CONFIG_MMC) || \ - defined(CONFIG_SYSTEMACE) ) - -#if defined(CONFIG_MAC_PARTITION) || \ -defined(CONFIG_DOS_PARTITION) || \ -defined(CONFIG_ISO_PARTITION) || \ -defined(CONFIG_AMIGA_PARTITION) || \ -defined(CONFIG_EFI_PARTITION) +#ifdef HAVE_BLOCK_DEVICE void init_part (block_dev_desc_t * dev_desc) { @@ -293,6 +281,12 @@ void init_part (block_dev_desc_t * dev_desc) } +#if defined(CONFIG_MAC_PARTITION) || \ + defined(CONFIG_DOS_PARTITION) || \ + defined(CONFIG_ISO_PARTITION) || \ + defined(CONFIG_AMIGA_PARTITION) || \ + defined(CONFIG_EFI_PARTITION) + static void print_part_header (const char *type, block_dev_desc_t * dev_desc) { puts ("\nPartition Map for "); @@ -326,6 +320,8 @@ static void print_part_header (const char *type, block_dev_desc_t * dev_desc) dev_desc->dev, type); } +#endif /* any CONFIG_..._PARTITION */ + void print_part (block_dev_desc_t * dev_desc) { @@ -372,24 +368,12 @@ void print_part (block_dev_desc_t * dev_desc) puts ("## Unknown partition table\n"); } - -#else /* neither MAC nor DOS nor ISO nor AMIGA nor EFI partition configured */ -# error neither CONFIG_MAC_PARTITION nor CONFIG_DOS_PARTITION -# error nor CONFIG_ISO_PARTITION nor CONFIG_AMIGA_PARTITION -# error nor CONFIG_EFI_PARTITION configured! -#endif - -#endif +#endif /* HAVE_BLOCK_DEVICE */ int get_partition_info(block_dev_desc_t *dev_desc, int part , disk_partition_t *info) { -#if defined(CONFIG_CMD_IDE) || \ - defined(CONFIG_CMD_SATA) || \ - defined(CONFIG_CMD_SCSI) || \ - defined(CONFIG_CMD_USB) || \ - defined(CONFIG_MMC) || \ - defined(CONFIG_SYSTEMACE) +#ifdef HAVE_BLOCK_DEVICE #ifdef CONFIG_PARTITION_UUIDS /* The common case is no UUID support */ @@ -444,7 +428,7 @@ int get_partition_info(block_dev_desc_t *dev_desc, int part default: break; } -#endif +#endif /* HAVE_BLOCK_DEVICE */ return -1; } -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 6/7] fs: Add a Coreboot Filesystem (CBFS) driver and commands
From: Gabe Black This change adds CBFS support and some commands to use it to u-boot. These commands are: cbfsinit - Initialize CBFS support and pull all metadata into RAM. The end of the ROM is an optional parameter which defaults to the standard 0x and can be used to support multiple CBFSes in a system. The last one set up with cbfsinit is the one that will be used. cbfsinfo - Print information from the CBFS header. cbfsls - Print out the size, type, and name of all the files in the current CBFS. Recognized types are translated into symbolic names. cbfsload - Load a file from CBFS into memory. Like the similar command for fat filesystems, you can optionally provide a maximum size. Support for CBFS is compiled in when the CONFIG_CMD_CBFS option is specified. The CBFS driver can also be used programmatically from within u-boot. If u-boot needs something out of CBFS very early before the heap is configured, it won't be able to use the normal CBFS support which caches some information in memory it allocates from the heap. The cbfs_file_find_uncached function searches a CBFS instance without touching the heap. Signed-off-by: Gabe Black Signed-off-by: Stefan Reinauer Signed-off-by: Simon Glass --- Makefile |3 +- README|7 + common/Makefile |1 + common/cmd_cbfs.c | 214 + fs/Makefile |1 + fs/cbfs/Makefile | 43 +++ fs/cbfs/cbfs.c| 339 + include/cbfs.h| 181 8 files changed, 788 insertions(+), 1 deletions(-) create mode 100644 common/cmd_cbfs.c create mode 100644 fs/cbfs/Makefile create mode 100644 fs/cbfs/cbfs.c create mode 100644 include/cbfs.h diff --git a/Makefile b/Makefile index 90e99af..d2cfac0 100644 --- a/Makefile +++ b/Makefile @@ -242,7 +242,8 @@ LIBS-y += drivers/net/npe/libnpe.o endif LIBS-$(CONFIG_OF_EMBED) += dts/libdts.o LIBS-y += arch/$(ARCH)/lib/lib$(ARCH).o -LIBS-y += fs/cramfs/libcramfs.o \ +LIBS-y += fs/cbfs/libcbfs.o \ + fs/cramfs/libcramfs.o \ fs/ext4/libext4fs.o \ fs/fat/libfat.o \ fs/fdos/libfdos.o \ diff --git a/README b/README index 9804cea..f5adcc0 100644 --- a/README +++ b/README @@ -1316,6 +1316,13 @@ The following options need to be configured: This will also enable the command "fatwrite" enabling the user to write files to FAT. +CBFS (Coreboot Filesystem) support + CONFIG_CMD_CBFS + + Define this to enable support for reading from a Coreboot + filesystem. Available commands are cbfsinit, cbfsinfo, cbfsls + and cbfsload. + - Keyboard Support: CONFIG_ISA_KEYBOARD diff --git a/common/Makefile b/common/Makefile index a4eb477..7cb0e88 100644 --- a/common/Makefile +++ b/common/Makefile @@ -69,6 +69,7 @@ COBJS-$(CONFIG_CMD_BEDBUG) += bedbug.o cmd_bedbug.o COBJS-$(CONFIG_CMD_BMP) += cmd_bmp.o COBJS-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o COBJS-$(CONFIG_CMD_CACHE) += cmd_cache.o +COBJS-$(CONFIG_CMD_CBFS) += cmd_cbfs.o COBJS-$(CONFIG_CMD_CONSOLE) += cmd_console.o COBJS-$(CONFIG_CMD_CPLBINFO) += cmd_cplbinfo.o COBJS-$(CONFIG_DATAFLASH_MMC_SELECT) += cmd_dataflash_mmc_mux.o diff --git a/common/cmd_cbfs.c b/common/cmd_cbfs.c new file mode 100644 index 000..3b6cfd8 --- /dev/null +++ b/common/cmd_cbfs.c @@ -0,0 +1,214 @@ +/* + * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. + * + * 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 + */ + +/* + * CBFS commands + */ +#include +#include +#include + +int do_cbfs_init(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) +{ + uintptr_t end_of_rom = 0x; + char *ep; + + if (argc > 2) { + printf("usage: cbfsls [end of rom]>\n"); + return 0; + } + if (argc == 2) { + end_of_rom = (int)simple_strtoul(argv[1], &ep, 16); + if (*ep) { + puts("\n** Invalid end of ROM **\n"); + return 1; + } + } + file_cbfs_init(end_of_rom); + if (file_cbfs_result != CBFS_SUCCESS) { +
[U-Boot] [PATCH 5/7] disk: Allow alternate EFI partition signature
From: Stefan Reinauer ChromeOS uses a GPT partition table to partition the disk. However, Windows will refuse to install on a GPT partitioned disk if there is no EFI available (Even if there is an MBR, too) To hide the GPT partition table from Windows, we need to write it with a header magic other than "EFI PART". To support old and new systems, Check for the magic string "CHROMEOS" too. Signed-off-by: Stefan Reinauer Signed-off-by: Simon Glass --- disk/part_efi.c |3 ++- disk/part_efi.h |4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/disk/part_efi.c b/disk/part_efi.c index 22a1dad..f2a2445 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -307,7 +307,8 @@ static int is_gpt_valid(block_dev_desc_t * dev_desc, unsigned long long lba, } /* Check the GPT header signature */ - if (le64_to_int(pgpt_head->signature) != GPT_HEADER_SIGNATURE) { + if ((le64_to_int(pgpt_head->signature) != GPT_HEADER_SIGNATURE) && + (le64_to_int(pgpt_head->signature) != GPT_HEADER_SIGNATURE2)) { printf("GUID Partition Table Header signature is wrong:" "0x%llX != 0x%llX\n", (unsigned long long)le64_to_int(pgpt_head->signature), diff --git a/disk/part_efi.h b/disk/part_efi.h index 5903e7c..07e590d 100644 --- a/disk/part_efi.h +++ b/disk/part_efi.h @@ -37,7 +37,9 @@ #define EFI_PMBR_OSTYPE_EFI_GPT 0xEE #define GPT_BLOCK_SIZE 512 -#define GPT_HEADER_SIGNATURE 0x5452415020494645ULL +#define GPT_HEADER_SIGNATURE 0x5452415020494645ULL +#define GPT_HEADER_SIGNATURE2 0x534f454d4f524843ULL + #define GPT_HEADER_REVISION_V1 0x0001 #define GPT_PRIMARY_PARTITION_TABLE_LBA 1ULL #define GPT_ENTRY_NAME "gpt" -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/7] disk: Address cast and format errors
From: Taylor Hutt This change addresses a few printf-formatting errors, and a typecast error. Signed-off-by: Taylor Hutt Signed-off-by: Simon Glass --- disk/part_efi.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/disk/part_efi.c b/disk/part_efi.c index 264ea9c..22a1dad 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -405,7 +405,7 @@ static gpt_entry *alloc_read_gpt_entries(block_dev_desc_t * dev_desc, count = le32_to_int(pgpt_head->num_partition_entries) * le32_to_int(pgpt_head->sizeof_partition_entry); - debug("%s: count = %lu * %lu = %u\n", __func__, + debug("%s: count = %lu * %lu = %zu\n", __func__, le32_to_int(pgpt_head->num_partition_entries), le32_to_int(pgpt_head->sizeof_partition_entry), count); @@ -415,7 +415,8 @@ static gpt_entry *alloc_read_gpt_entries(block_dev_desc_t * dev_desc, } if (count == 0 || pte == NULL) { - printf("%s: ERROR: Can't allocate 0x%X bytes for GPT Entries\n", + printf("%s: ERROR: Can't allocate 0x%zX " + "bytes for GPT Entries\n", __func__, count); return NULL; } @@ -457,7 +458,7 @@ static int is_pte_valid(gpt_entry * pte) sizeof(unused_guid.b)) == 0) { debug("%s: Found an unused PTE GUID at 0x%08X\n", __func__, - (unsigned int)pte); + (unsigned int)(uintptr_t)pte); return 0; } else { -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH 1/2] fs: delete unused Makefile
Hi Stephen, On Wed, Oct 10, 2012 at 5:05 PM, Stephen Warren wrote: > From: Stephen Warren > > fs/Makefile is unused. The top-level Makefile sets LIBS-y += fs/xxx and > hence causes make to directly descend two directory levels into each > individual filesystem, and it never descends into fs/ itself. > > So, delete this useless file. I noticed this recently, and I can't see any reason for it, unless there was an intent to remove the top-level Makefile stuff one day? > > Signed-off-by: Stephen Warren Acked-by: Simon Glass Regards, Simon > --- > fs/Makefile | 42 -- > 1 files changed, 0 insertions(+), 42 deletions(-) > delete mode 100644 fs/Makefile > > diff --git a/fs/Makefile b/fs/Makefile > deleted file mode 100644 > index 901e189..000 > --- a/fs/Makefile > +++ /dev/null > @@ -1,42 +0,0 @@ > -# > -# (C) Copyright 2000-2006 > -# Wolfgang Denk, DENX Software Engineering, w...@denx.de. > -# > -# See file CREDITS for list of people who contributed to this > -# project. > -# > -# This program is free software; you can redistribute it and/or > -# modify it under the terms of the GNU General Public License as > -# published by the Free Software Foundation; either version 2 of > -# the License, or (at your option) any later version. > -# > -# This program is distributed in the hope that it will be useful, > -# but WITHOUT ANY WARRANTY; without even the implied warranty of > -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > -# GNU General Public License for more details. > -# > -# You should have received a copy of the GNU General Public License > -# along with this program; if not, write to the Free Software > -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, > -# MA 02111-1307 USA > -# > -# > - > -subdirs-$(CONFIG_CMD_CRAMFS) := cramfs > -subdirs-$(CONFIG_CMD_EXT4) += ext4 > -ifndef CONFIG_CMD_EXT4 > -subdirs-$(CONFIG_CMD_EXT2) += ext4 > -endif > -subdirs-$(CONFIG_CMD_FAT) += fat > -subdirs-$(CONFIG_CMD_FDOS) += fdos > -subdirs-$(CONFIG_CMD_JFFS2) += jffs2 > -subdirs-$(CONFIG_CMD_REISER) += reiserfs > -subdirs-$(CONFIG_YAFFS2) += yaffs2 > -subdirs-$(CONFIG_CMD_UBIFS) += ubifs > -subdirs-$(CONFIG_CMD_ZFS) += zfs > - > -SUBDIRS:= $(subdirs-y) > - > -$(obj).depend all: > - @for dir in $(SUBDIRS) ; do \ > - $(MAKE) -C $$dir $@ ; done > -- > 1.7.0.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] mpc85xx debug TLB entry
On 10/11/2012 10:21:07 AM, Scott Wood wrote: On 10/11/2012 04:01:27 AM, Prabhakar Kushwaha wrote: On 10/11/2012 05:51 AM, Scott Wood wrote: I'm debugging some SPL changes and am still having a hard time following the initial TLB flow. We seem to be creating an entry in AS0 -- how is that not conflicting with the TLB entry we're running from? The behaviour of overlapping TLB entries is undefined for e500v2 processor. Luckily it is working for P1010RDB, P1020RDB, P2020RDB-PC and BSC9131RDB. Why is the debug TLB 256K? Why is it not aligned to 256K? Temp TLB is created because label "nexti" resize the current TLB to 4K. So create one for debugging with CONFIG_SYS_MONITOR_BASE. Although we are creating TLB entry for 0x11001000 but actual TLB entry is created with 0x1100,256K aligned. Same is verified from debugger. You shouldn't rely on the hardware to ignore the lower bits of the address. Why does it need to be 256K? How do you know that MAS2_I is correct (it should be cacheable in the loaded-by-spl case)? I set it as MAS2_I because same is done while creating AS1 TLB entries for CONFIG_SYS_MONITOR_BASE during CONFIG_SYS_RAMBOOT. I'm trying to get the p2020rdb-pca SPL payload to run out of L2 SRAM, and I see weird TLB behavior causing a hang if I don't comment out the debug TLB. is the root cause MAS2_I or 256K TLB entries created? It's not MAS2_I, as it happens even when I have all the other SRAM mappings cache inhibited. I don't know what the root cause is. On p2020, the debug tlb is entry 2. The entry we're running out of (in my current patchset) is entry 8. These entries are for the same virtual address (which as you note is illegal). When we do a tlbsx to find out which entry to shrink, it's returning the bitwise OR of the two entry numbers, and we end up writing a new entry 10 without removing the old entry 8. Then we go through the TLB removing entries which are neither 2 nor 10. After 8 is removed, we end up executing the wrong code -- we take a fault with SRR0=0xf8f81288 that only makes sense if it's really executing code at 0xf8ff1288. TLB entry 2 is 256K at 0xf8f8, and TLB entry 10 is 4K at 0xf8f81000 (both identity mapped). The only entry that points to physical addres 0xf8ff1288 is entry 12, which is 256K at 0xf8fc (identity mapped). While all this is totally illegal and strange things are allowed to happen as a result, I do find it odd that having just entry 2 and 10 causes worse behavior than having 2, 8, and 10. The only difference between entries 2 and 8 is that entry 8 is guarded and entry 2 is not (both are cache inhibited). The proper solution would be to create temp Debug TLB for CONFIG_SYS_RAMBOOT after resizing current TLB to 4K. Please suggest. I suggest you do so. :-) In the meantime, I'll remove it for RAMBOOT/SPL as it's broken. I'll move it as part of my patchset, but I'll need you to verify that debugging still works. I won't be basing this on RAMBOOT -- until we shrink the entry we're running from and remove other entries, we shouldn't add anything else to the TLB under any boot scenario. Plus the file is messy enough as is without putting the debug TLB stuff in two different places. I'll also reduce the debug mapping to 4K, so it doesn't conflict with the 4K page we're running out of. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/7] usb: Support the CONFIG_SYS_64BIT_LBA option
Dear Simon Glass, > From: Gabe Black > > usb_storage wouldn't compile when the CONFIG_SYS_64BIT_LBA option is > turned on because the used fixed size data types in their exported > functions when they should have used lbaint_t for the block count > parameter. That meant that when the sizes happened to be the same, when > using a 28 bit LBA, the driver would build, but when it wasn't, a 48 bit > LBA, things broke. Reviewed-by: Marek Vasut > This change adjusts the signatures to use the right type and makes small > adjustments in the affected functions. > > Signed-off-by: Gabe Black > Signed-off-by: Simon Glass > --- > common/usb_storage.c | 24 ++-- > 1 files changed, 14 insertions(+), 10 deletions(-) > > diff --git a/common/usb_storage.c b/common/usb_storage.c > index 950451e..0c2a4c7 100644 > --- a/common/usb_storage.c > +++ b/common/usb_storage.c > @@ -179,9 +179,9 @@ int usb_stor_get_info(struct usb_device *dev, struct > us_data *us, int usb_storage_probe(struct usb_device *dev, unsigned int > ifnum, struct us_data *ss); > unsigned long usb_stor_read(int device, unsigned long blknr, > - unsigned long blkcnt, void *buffer); > + lbaint_t blkcnt, void *buffer); > unsigned long usb_stor_write(int device, unsigned long blknr, > - unsigned long blkcnt, const void *buffer); > + lbaint_t blkcnt, const void *buffer); > struct usb_device * usb_get_dev_index(int index); > void uhci_show_temp_int_td(void); > > @@ -1053,9 +1053,10 @@ static void usb_bin_fixup(struct > usb_device_descriptor descriptor, #endif /* CONFIG_USB_BIN_FIXUP */ > > unsigned long usb_stor_read(int device, unsigned long blknr, > - unsigned long blkcnt, void *buffer) > + lbaint_t blkcnt, void *buffer) > { > - unsigned long start, blks, buf_addr; > + lbaint_t start, blks; > + uintptr_t buf_addr; > unsigned short smallblks; > struct usb_device *dev; > struct us_data *ss; > @@ -1084,7 +1085,7 @@ unsigned long usb_stor_read(int device, unsigned long > blknr, start = blknr; > blks = blkcnt; > > - USB_STOR_PRINTF("\nusb_read: dev %d startblk %lx, blccnt %lx" > + USB_STOR_PRINTF("\nusb_read: dev %d startblk " LBAF ", blccnt " LBAF > " buffer %lx\n", device, start, blks, buf_addr); > > do { > @@ -1114,7 +1115,8 @@ retry_it: > } while (blks != 0); > ss->flags &= ~USB_READY; > > - USB_STOR_PRINTF("usb_read: end startblk %lx, blccnt %x buffer %lx\n", > + USB_STOR_PRINTF("usb_read: end startblk " LBAF > + ", blccnt %x buffer %lx\n", > start, smallblks, buf_addr); > > usb_disable_asynch(0); /* asynch transfer allowed */ > @@ -1124,9 +1126,10 @@ retry_it: > } > > unsigned long usb_stor_write(int device, unsigned long blknr, > - unsigned long blkcnt, const void *buffer) > + lbaint_t blkcnt, const void *buffer) > { > - unsigned long start, blks, buf_addr; > + lbaint_t start, blks; > + uintptr_t buf_addr; > unsigned short smallblks; > struct usb_device *dev; > struct us_data *ss; > @@ -1156,7 +1159,7 @@ unsigned long usb_stor_write(int device, unsigned > long blknr, start = blknr; > blks = blkcnt; > > - USB_STOR_PRINTF("\nusb_write: dev %d startblk %lx, blccnt %lx" > + USB_STOR_PRINTF("\nusb_write: dev %d startblk " LBAF ", blccnt " LBAF > " buffer %lx\n", device, start, blks, buf_addr); > > do { > @@ -1188,7 +1191,8 @@ retry_it: > } while (blks != 0); > ss->flags &= ~USB_READY; > > - USB_STOR_PRINTF("usb_write: end startblk %lx, blccnt %x buffer %lx\n", > + USB_STOR_PRINTF("usb_write: end startblk " LBAF > + ", blccnt %x buffer %lx\n", > start, smallblks, buf_addr); > > usb_disable_asynch(0); /* asynch transfer allowed */ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5 1/2] qi_lb60: add nand spl support
Dear xian...@openmobilefree.net, > From: Xiangfu > > The JZ4740 CPU can load 8KB from two different addresses: >1. the normal area up to 8KB starting from NAND flash address 0x >2. the backup area up to 8KB starting from NAND flash address 0x2000 > > After create u-boot-spl.bin. it needs those 4 commands create final image > for jz4740 cpu. > dd if=spl/u-boot-spl.bin of=u-boot-nand.bin conv=sync bs=8192 count=1 > dd if=spl/u-boot-spl.bin of=u-boot-nand.bin conv=sync,notrunc > oflag=append bs=8192 count=1 tr '\0' '\377' < /dev/zero | dd > of=u-boot-nand.bin conv=sync,notrunc oflag=append bs=16384 count=1 cat > u-boot-nand.bin u-boot.bin > u-boot-nand-final.bin > Can you not do this in the linker script? Or implement CPU-specific build target that does this? [...] Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5 2/2] qi_lb60: add software usbboot support
Dear xian...@openmobilefree.net, > From: Xiangfu > > JZ4740 CPU have a internal ROM have such kind of code, that make > JZ4740 can boot from USB > > usbboot.S can downloads user program from the USB port to internal > SRAM and branches to the internal SRAM to execute the program > > Signed-off-by: Xiangfu > --- > board/qi/qi_lb60/qi_lb60-spl.c | 20 + > board/qi/qi_lb60/usbboot.S | 838 > 2 files changed, 858 > insertions(+) > create mode 100644 board/qi/qi_lb60/usbboot.S > [...] UGH. Simply ... UGH. Can that assembler blob not be rewritten into C ? Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tools/env: Fix build failure from missing header include
Hi Marek, On Fri, Oct 12, 2012 at 5:20 PM, Marek Vasut wrote: > Dear Joe Hershberger, > >> This was introduced in: >> 8679d0ffdcc0beafea8e6942c0c67cf859afa18e - >> COMMON: Use __stringify() instead of MK_STR() >> >> The header is now needed since common.h is not included in this tool. > > Good find. This is -next, right ? Correct... this is based on -next. -Joe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/5] x86: coreboot: Drop sysinfo.c
From: Stefan Reinauer sysinfo.c only contains the lib_sysinfo data structure which is used/filled by tables.c. This split was introduced by importing code from libpayload originally, but to keep the code simple, add the single line of actual code to tables.c Signed-off-by: Stefan Reinauer Signed-off-by: Simon Glass --- arch/x86/cpu/coreboot/Makefile |1 - arch/x86/cpu/coreboot/sysinfo.c | 39 --- arch/x86/cpu/coreboot/tables.c |8 3 files changed, 8 insertions(+), 40 deletions(-) delete mode 100644 arch/x86/cpu/coreboot/sysinfo.c diff --git a/arch/x86/cpu/coreboot/Makefile b/arch/x86/cpu/coreboot/Makefile index fbf5a00..2afd30c 100644 --- a/arch/x86/cpu/coreboot/Makefile +++ b/arch/x86/cpu/coreboot/Makefile @@ -37,7 +37,6 @@ COBJS-$(CONFIG_SYS_COREBOOT) += coreboot.o COBJS-$(CONFIG_SYS_COREBOOT) += tables.o COBJS-$(CONFIG_SYS_COREBOOT) += ipchecksum.o COBJS-$(CONFIG_SYS_COREBOOT) += sdram.o -COBJS-$(CONFIG_SYS_COREBOOT) += sysinfo.o COBJS-$(CONFIG_PCI) += pci.o SOBJS-$(CONFIG_SYS_COREBOOT) += coreboot_car.o diff --git a/arch/x86/cpu/coreboot/sysinfo.c b/arch/x86/cpu/coreboot/sysinfo.c deleted file mode 100644 index 9b3e660..000 --- a/arch/x86/cpu/coreboot/sysinfo.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This file is part of the libpayload project. - * - * Copyright (C) 2008 Advanced Micro Devices, Inc. - * Copyright (C) 2009 coresystems GmbH - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - *notice, this list of conditions and the following disclaimer in the - *documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - *derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include - -/* - * This needs to be in the .data section so that it's copied over during - * relocation. By default it's put in the .bss section which is simply filled - * with zeroes when transitioning from "ROM", which is really RAM, to other - * RAM. - */ -struct sysinfo_t lib_sysinfo __attribute__((section(".data"))); diff --git a/arch/x86/cpu/coreboot/tables.c b/arch/x86/cpu/coreboot/tables.c index 0e3451b..25ca50d 100644 --- a/arch/x86/cpu/coreboot/tables.c +++ b/arch/x86/cpu/coreboot/tables.c @@ -33,6 +33,14 @@ #include /* + * This needs to be in the .data section so that it's copied over during + * relocation. By default it's put in the .bss section which is simply filled + * with zeroes when transitioning from "ROM", which is really RAM, to other + * RAM. + */ +struct sysinfo_t lib_sysinfo __attribute__((section(".data"))); + +/* * Some of this is x86 specific, and the rest of it is generic. Right now, * since we only support x86, we'll avoid trying to make lots of infrastructure * we don't need. If in the future, we want to use coreboot on some other -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/5] x86: Add CBMEM console driver for coreboot
From: Vadim Bendebury This patch builds upon the recently introduced CBMEM console feature of coreboot. CBMEM console uses a memry area allocated by coreboot to store the console output. The memory area has a certain structure, which allows to determine where the buffer is, the buffer size and the location of the pointer in the buffer. This allows different phases of the firmware (rom based coreboot, ram based coreboot, u-boot after relocation with this change) to keep adding text to the same buffer. Note that this patch introduces a new console driver and adds the driver to the list of drivers to be used for console output, i.e. it engages only after u-boot relocates. Usiong CBMEM console for capturing the pre-relocation console output will be done under a separate change. >From Linux, run the cbmem.py utility (which is a part of the coreboot package) to see the output, e.g.: v SCSI: AHCI 0001.0300 32 slots 6 ports ? Gbps 0xf impl SATA mode flags: 64bit ilck stag led pmp pio ... Magic signature found Kernel command line: "cros_secure quiet loglevel=1 console=tty2... ^ Note that the entire u-boot output fits into the buffer only if the coreboot log level is reduced from the most verbose. Ether the buffer size will have to be increased, or the coreboot verbosity permanently reduced. Signed-off-by: Vadim Bendebury Signed-off-by: Simon Glass --- common/stdio.c |4 ++- drivers/misc/Makefile|1 + drivers/misc/cbmem_console.c | 67 ++ include/stdio_dev.h |3 ++ 4 files changed, 74 insertions(+), 1 deletions(-) create mode 100644 drivers/misc/cbmem_console.c diff --git a/common/stdio.c b/common/stdio.c index 605ff3f..9f48e5f 100644 --- a/common/stdio.c +++ b/common/stdio.c @@ -237,6 +237,8 @@ int stdio_init (void) #ifdef CONFIG_JTAG_CONSOLE drv_jtag_console_init (); #endif - +#ifdef CONFIG_CBMEM_CONSOLE + cbmemc_init(); +#endif return (0); } diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index 271463c..a77db3d 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -27,6 +27,7 @@ LIB := $(obj)libmisc.o COBJS-$(CONFIG_ALI152X) += ali512x.o COBJS-$(CONFIG_DS4510) += ds4510.o +COBJS-$(CONFIG_CBMEM_CONSOLE) += cbmem_console.o COBJS-$(CONFIG_FSL_LAW) += fsl_law.o COBJS-$(CONFIG_GPIO_LED) += gpio_led.o COBJS-$(CONFIG_FSL_MC9SDZ60) += mc9sdz60.o diff --git a/drivers/misc/cbmem_console.c b/drivers/misc/cbmem_console.c new file mode 100644 index 000..80a84fd --- /dev/null +++ b/drivers/misc/cbmem_console.c @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2011 The ChromiumOS Authors. All rights reserved. + * + * 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; version 2 of the License. + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA + */ + +#include + +#ifndef CONFIG_SYS_COREBOOT +#error This driver requires coreboot +#endif + +#include + +struct cbmem_console { + u32 buffer_size; + u32 buffer_cursor; + u8 buffer_body[0]; +} __attribute__ ((__packed__)); + +static struct cbmem_console *cbmem_console_p; + +void cbmemc_putc(char data) +{ + int cursor; + + cursor = cbmem_console_p->buffer_cursor++; + if (cursor < cbmem_console_p->buffer_size) + cbmem_console_p->buffer_body[cursor] = data; +} + +void cbmemc_puts(const char *str) +{ + char c; + + while ((c = *str++) != 0) + cbmemc_putc(c); +} + +int cbmemc_init(void) +{ + int rc; + struct stdio_dev cons_dev; + cbmem_console_p = lib_sysinfo.cbmem_cons; + + memset(&cons_dev, 0, sizeof(cons_dev)); + + strcpy(cons_dev.name, "cbmem"); + cons_dev.flags = DEV_FLAGS_OUTPUT; /* Output only */ + cons_dev.putc = cbmemc_putc; + cons_dev.puts = cbmemc_puts; + + rc = stdio_register(&cons_dev); + + return (rc == 0) ? 1 : rc; +} diff --git a/include/stdio_dev.h b/include/stdio_dev.h index 23e0ee1..932d093 100644 --- a/include/stdio_dev.h +++ b/include/stdio_dev.h @@ -120,5 +120,8 @@ int drv_nc_init (void); #ifdef CONFIG_JTAG_CONSOLE int drv_jtag_console_init (void); #endif +#ifdef CONFIG_CBMEM_CONSOLE +int cbmemc_init(void); +#endif #endif -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/5] x86: coreboot: Decode additional coreboot sysinfo tags
Add support for decoding tags for GPIOs, compile/build info, cbmem and other features. Signed-off-by: Stefan Reinauer Signed-off-by: Vadim Bendebury Signed-off-by: Gabe Black Signed-off-by: Simon Glass --- arch/x86/cpu/coreboot/tables.c | 109 - arch/x86/include/asm/arch-coreboot/sysinfo.h | 34 +++-- arch/x86/include/asm/arch-coreboot/tables.h | 74 + 3 files changed, 188 insertions(+), 29 deletions(-) diff --git a/arch/x86/cpu/coreboot/tables.c b/arch/x86/cpu/coreboot/tables.c index 25ca50d..b116d59 100644 --- a/arch/x86/cpu/coreboot/tables.c +++ b/arch/x86/cpu/coreboot/tables.c @@ -28,6 +28,7 @@ * SUCH DAMAGE. */ +#include #include #include #include @@ -80,22 +81,45 @@ static void cb_parse_memory(unsigned char *ptr, struct sysinfo_t *info) static void cb_parse_serial(unsigned char *ptr, struct sysinfo_t *info) { struct cb_serial *ser = (struct cb_serial *)ptr; - if (ser->type != CB_SERIAL_TYPE_IO_MAPPED) - return; - info->ser_ioport = ser->baseaddr; + info->serial = ser; } -static void cb_parse_optiontable(unsigned char *ptr, struct sysinfo_t *info) +static void cb_parse_vbnv(unsigned char *ptr, struct sysinfo_t *info) { - info->option_table = (struct cb_cmos_option_table *)ptr; + struct cb_vbnv *vbnv = (struct cb_vbnv *)ptr; + + info->vbnv_start = vbnv->vbnv_start; + info->vbnv_size = vbnv->vbnv_size; } -static void cb_parse_checksum(unsigned char *ptr, struct sysinfo_t *info) +static void cb_parse_gpios(unsigned char *ptr, struct sysinfo_t *info) { - struct cb_cmos_checksum *cmos_cksum = (struct cb_cmos_checksum *)ptr; - info->cmos_range_start = cmos_cksum->range_start; - info->cmos_range_end = cmos_cksum->range_end; - info->cmos_checksum_location = cmos_cksum->location; + int i; + struct cb_gpios *gpios = (struct cb_gpios *)ptr; + + info->num_gpios = (gpios->count < SYSINFO_MAX_GPIOS) ? + (gpios->count) : SYSINFO_MAX_GPIOS; + + for (i = 0; i < info->num_gpios; i++) + info->gpios[i] = gpios->gpios[i]; +} + +static void cb_parse_vdat(unsigned char *ptr, struct sysinfo_t *info) +{ + struct cb_vdat *vdat = (struct cb_vdat *) ptr; + + info->vdat_addr = vdat->vdat_addr; + info->vdat_size = vdat->vdat_size; +} + +static void cb_parse_tstamp(unsigned char *ptr, struct sysinfo_t *info) +{ + info->tstamp_table = ((struct cb_cbmem_tab *)ptr)->cbmem_tab; +} + +static void cb_parse_cbmem_cons(unsigned char *ptr, struct sysinfo_t *info) +{ + info->cbmem_cons = ((struct cb_cbmem_tab *)ptr)->cbmem_tab; } static void cb_parse_framebuffer(unsigned char *ptr, struct sysinfo_t *info) @@ -103,6 +127,11 @@ static void cb_parse_framebuffer(unsigned char *ptr, struct sysinfo_t *info) info->framebuffer = (struct cb_framebuffer *)ptr; } +static void cb_parse_string(unsigned char *ptr, char **info) +{ + *info = (char *)((struct cb_string *)ptr)->string; +} + static int cb_parse_header(void *addr, int len, struct sysinfo_t *info) { struct cb_header *header; @@ -133,6 +162,9 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info) /* Now, walk the tables. */ ptr += header->header_bytes; + /* Inintialize some fields to sentinel values. */ + info->vbnv_start = info->vbnv_size = (uint32_t)(-1); + for (i = 0; i < header->table_entries; i++) { struct cb_record *rec = (struct cb_record *)ptr; @@ -150,11 +182,35 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info) case CB_TAG_SERIAL: cb_parse_serial(ptr, info); break; - case CB_TAG_CMOS_OPTION_TABLE: - cb_parse_optiontable(ptr, info); + case CB_TAG_VERSION: + cb_parse_string(ptr, &info->version); + break; + case CB_TAG_EXTRA_VERSION: + cb_parse_string(ptr, &info->extra_version); + break; + case CB_TAG_BUILD: + cb_parse_string(ptr, &info->build); + break; + case CB_TAG_COMPILE_TIME: + cb_parse_string(ptr, &info->compile_time); + break; + case CB_TAG_COMPILE_BY: + cb_parse_string(ptr, &info->compile_by); + break; + case CB_TAG_COMPILE_HOST: + cb_parse_string(ptr, &info->compile_host); + break; + case CB_TAG_COMPILE_DOMAIN: + cb_parse_string(ptr, &info->compile_domain); + break; + case CB_TAG_COMPILER: + cb_parse_string(ptr, &info->compiler); +
[U-Boot] [PATCH 5/5] x86: Select stdio devices for coreboot
We want to support VGA, serial, USB keyboard and the Coreboot memory console buffer. Signed-off-by: Simon Glass --- include/configs/coreboot.h |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/include/configs/coreboot.h b/include/configs/coreboot.h index 2649b82..fe589f3 100644 --- a/include/configs/coreboot.h +++ b/include/configs/coreboot.h @@ -39,6 +39,10 @@ #define CONFIG_LAST_STAGE_INIT #define CONFIG_NO_RESET_CODE +#define CONFIG_STD_DEVICES_SETTINGS "stdin=usbkbd,vga,serial\0" \ + "stdout=vga,serial,cbmem\0" \ + "stderr=vga,serial,cbmem\0" + /*--- * Watchdog Configuration */ @@ -70,6 +74,9 @@ #define CONFIG_SYS_NS16550_COM2UART1_BASE #define CONFIG_SYS_NS16550_PORT_MAPPED +#define CONFIG_CONSOLE_MUX +#define CONFIG_CBMEM_CONSOLE + /* max. 1 IDE bus */ #define CONFIG_SYS_IDE_MAXBUS 1 /* max. 1 drive per IDE bus */ -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/5] x86: Add console command to display CBMEM console buffer
From: Vadim Bendebury This command is useful to allow to observe messages generated by coreboot and u-boot until present. In particular it is handy when u-boot is instrumented to fall through into console mode on startup errors. Signed-off-by: Vadim Bendebury Signed-off-by: Simon Glass --- drivers/misc/cbmem_console.c | 26 ++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/drivers/misc/cbmem_console.c b/drivers/misc/cbmem_console.c index 80a84fd..35c3cb1 100644 --- a/drivers/misc/cbmem_console.c +++ b/drivers/misc/cbmem_console.c @@ -31,10 +31,19 @@ struct cbmem_console { static struct cbmem_console *cbmem_console_p; +/* + * Need to be able to avoid adding charactes to cbmem console buffer while its + * contents are being dumped. + */ +static int suppress_cbmem_console; + void cbmemc_putc(char data) { int cursor; + if (suppress_cbmem_console) + return; + cursor = cbmem_console_p->buffer_cursor++; if (cursor < cbmem_console_p->buffer_size) cbmem_console_p->buffer_body[cursor] = data; @@ -65,3 +74,20 @@ int cbmemc_init(void) return (rc == 0) ? 1 : rc; } + +static int +do_cbc_dump(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + int cursor = 0; + + suppress_cbmem_console = 1; + + while (cursor < cbmem_console_p->buffer_cursor) + putc(cbmem_console_p->buffer_body[cursor++]); + + suppress_cbmem_console = 0; + return 0; +} + +U_BOOT_CMD(cbc_dump, 1, 1, do_cbc_dump, + "dump CBMEM console buffer to serial port", NULL); -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot