Re: [U-Boot] [PATCH] powerpc/85xx: Add USB device-tree fixup for various platforms
-Original Message- From: Andy Fleming [mailto:aflem...@gmail.com] Sent: Thursday, April 19, 2012 2:17 AM To: Mehresh Ramneek-B31383 Cc: u-boot@lists.denx.de; Fleming Andy-AFLEMING Subject: Re: [U-Boot] [PATCH] powerpc/85xx: Add USB device-tree fixup for various platforms On Mon, Mar 26, 2012 at 9:15 AM, Ramneek Mehresh ramneek.mehr...@freescale.com wrote: Add USB device-tree fixup for following platforms: MPC8536DS, P1022DS, P1023RDS, P2020COME, P2020DS, P2041RDB, P3060QDS Signed-off-by: Ramneek Mehresh ramneek.mehr...@freescale.com --- diff --git a/board/freescale/p2020come/p2020come.c b/board/freescale/p2020come/p2020come.c index 8cf7bee..ce78016 100644 --- a/board/freescale/p2020come/p2020come.c +++ b/board/freescale/p2020come/p2020come.c @@ -1,5 +1,5 @@ /* - * Copyright 2009 Freescale Semiconductor, Inc. + * Copyright 2009,2012 Freescale Semiconductor, Inc. * * See file CREDITS for list of people who contributed to this * project. @@ -282,6 +282,10 @@ void ft_board_setup(void *blob, bd_t *bd) fdt_fixup_memory(blob, (u64)base, (u64)size); +#ifdef CONFIG_HAS_FSL_DR_USB + fdt_fixup_dr_usb(blob, bd); +#endif + fdt_fixup_dr_usb(blob, bd); Umm I don't think this is right. :) Thanks for pointing out ... will correct ... - Ramneek ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] e1000e : Set Receive Threshold granularity to number of
In RXDCTL register, WTHRESH controls the write back of processed receive descriptors. WTHRESH controls the write back of processed receive descriptors. This threshold refers to the number of receive descriptors in the Ethernet controllers on-chip buffer which are ready to be written back to host memory. In the absence of external events (explicit flushes), the write back occurs only after more than WTHRESH descriptors are available for write back. A value of WTHRESH can be in either cache line units, or based on number of descriptors based on RXDCTL.GRAN. By default it is set to cache line granularoty. In e1000e driver, receive descriptor queue is configured such that hardware can add only 1 descriptor at a time. So the WTHRESH granularity should be set to single descriptor. This would ensure that every time controller fills a Rx descriptor, it is flushed to host memory. This change fixes timeout which was seen when tftping large files. Signed-off-by: Ruchika Gupta ruchika.gu...@freescale.com Signed-off-by: Vakul Garg va...@freescale.com Acked-by: Roy Zang tie-fei.z...@freescale.com --- drivers/net/e1000.c | 10 ++ drivers/net/e1000.h |1 + 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c index 98145bc..1f3c2b0 100644 --- a/drivers/net/e1000.c +++ b/drivers/net/e1000.c @@ -1703,6 +1703,16 @@ e1000_init_hw(struct eth_device *nic) E1000_WRITE_REG(hw, TXDCTL, ctrl); } + /* Set the receive descriptor write back policy */ + + if (hw-mac_type = e1000_82571) { + ctrl = E1000_READ_REG(hw, RXDCTL); + ctrl = + (ctrl ~E1000_RXDCTL_WTHRESH) | + E1000_RXDCTL_FULL_RX_DESC_WB; + E1000_WRITE_REG(hw, RXDCTL, ctrl); + } + switch (hw-mac_type) { default: break; diff --git a/drivers/net/e1000.h b/drivers/net/e1000.h index 720d8c6..cdb0e36 100644 --- a/drivers/net/e1000.h +++ b/drivers/net/e1000.h @@ -1518,6 +1518,7 @@ struct e1000_hw { #define E1000_RXDCTL_HTHRESH 0x3F00/* RXDCTL Host Threshold */ #define E1000_RXDCTL_WTHRESH 0x003F/* RXDCTL Writeback Threshold */ #define E1000_RXDCTL_GRAN0x0100/* RXDCTL Granularity */ +#define E1000_RXDCTL_FULL_RX_DESC_WB 0x0101/* GRAN=1, WTHRESH=1 */ /* Transmit Descriptor Control */ #define E1000_TXDCTL_PTHRESH 0x003F/* TXDCTL Prefetch Threshold */ -- 1.7.4.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] e1000e : Set Receive Threshold granularity to number of
Dear Ruchika Gupta, In message 1334834928-27157-1-git-send-email-ruchika.gu...@freescale.com you wrote: In RXDCTL register, WTHRESH controls the write back of processed receive descriptors. WTHRESH controls the write back of processed receive descriptors. ... Please fix both the Subject (which is truncated and too long anyway) and the commit message (which is redundant). Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Microsoft Multitasking: several applications can crash at the same time. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2] fs/fat: align disk buffers on cache line to enable DMA and cache
On 27.03.2012 18:28, Dirk Behme wrote: On 27.03.2012 16:20, Anatolij Gustschin wrote: Hello Dirk, On Sat, 24 Mar 2012 08:18:38 +0100 Dirk Behmedirk.be...@googlemail.com wrote: On 13.03.2012 02:24, Eric Nelson wrote: On 03/04/2012 02:46 PM, Eric Nelson wrote: Signed-off-by: Eric Nelsoneric.nel...@boundarydevices.com Acked-by: Mike Frysingervap...@gentoo.org --- fs/fat/fat.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 1f95eb4..f3c48bb 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -31,6 +31,8 @@ #includefat.h #includeasm/byteorder.h #includepart.h +#includemalloc.h +#includelinux/compiler.h /* * Convert a string to lowercase. @@ -62,7 +64,7 @@ static int disk_read(__u32 block, __u32 nr_blocks, void *buf) int fat_register_device (block_dev_desc_t * dev_desc, int part_no) { - unsigned char buffer[dev_desc-blksz]; + ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc-blksz); snip Hi Wolfgang, Have you had a chance to review this patch? Is there another maintainer for fs/fat? Please let me know if you need this updated. There's another patch that was acked by Mike but is otherwise lingering here: http://lists.denx.de/pipermail/u-boot/2012-March/119309.html Both of these are needed before enabling the data cache on i.MX6 when using the FAT filesystem. Anybody likes to comment/apply this patch? Both, this patch and the patch referenced by the above link were submitted when the merge window was closed. So, the patches will probably be applied to next when rc1 is out, unless Wolfgang decides to accept them for coming release. Ok, thanks! Do we have a -next branch for stuff like this, then? There should be a -next from Wolfgang for http://patchwork.ozlabs.org/patch/144462/ http://patchwork.ozlabs.org/patch/151799/ now :) Best regards Dirk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] fix IDE_BUS(dev) macro
Hi Dave, Le 18/04/2012 23:37, David Purdy a écrit : On Tue, Apr 17, 2012 at 2:06 PM, Luka Perkovub...@lukaperkov.net wrote: IDE_BUS assumes that each bus has two devices and thus returns the first bus even when the second one should be probed. Signed-off-by: Simon Baatzgmbno...@gmail.com Tested-by: Luka Perkovub...@lukaperkov.net --- Simon discovered this while adding support for new board IB NAS6210. More info can be found here: http://lists.denx.de/pipermail/u-boot/2012-April/122525.html When this is commited I will do a coding style cleanup. There are tabs after few #define parts in include/ide.h. include/ide.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ide.h b/include/ide.h index 8ecc9dd..385e909 100644 --- a/include/ide.h +++ b/include/ide.h @@ -24,7 +24,7 @@ #ifndef_IDE_H Simon, Luka, Prafulla, etal, I've tested this out on the Seagate GoFlex Net (Kirkwood) device, which also has dual SATA ports, and it resolved the long-standing (and irritating) bug/unwanted-feature that required us to boot from _only_ the right side port. I would guess that other Kirkwood dual-SATA-port boxes would be happier because of this, as well. Nice catch, Simon. Not my main area of expertise here, but I am not sure how this plays on Marvell non-kirkwood platforms (e.g., orion5x). ISTR it is not the first time we deal with the whole IDE number of bus / number of ports [ / useable ports ] issue, and we may be running in circles here, fixing one platform and breaking another. I'll try this on EDMiniV2 in the coming days, and let people know the results in this thread. regards, Dave Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: ea20: Change macro from BOARD_LATE_INIT to CONFIG_BOARD_LATE_INIT
Hi Nobuhiro Iwamatsu, Le 18/04/2012 04:41, Nobuhiro Iwamatsu a écrit : With almost all the architecture and board BOARD_LATE_INIT does not use. CONFIG_BOARD_LATE_INIT is used instead. This changed CONFIG_BOARD_LATE_INIT from BOARD_LATE_INIT. I think the commit message above is redundant with the commit summary, especially for a trivial one-line change. Can you just post a V2 patch with the same code change and commit summary, but without the commit message? Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: ea20: Change macro from BOARD_LATE_INIT to CONFIG_BOARD_LATE_INIT
Le 19/04/2012 08:44, Albert ARIBAUD a écrit : Hi Nobuhiro Iwamatsu, Le 18/04/2012 04:41, Nobuhiro Iwamatsu a écrit : With almost all the architecture and board BOARD_LATE_INIT does not use. CONFIG_BOARD_LATE_INIT is used instead. This changed CONFIG_BOARD_LATE_INIT from BOARD_LATE_INIT. I think the commit message above is redundant with the commit summary, especially for a trivial one-line change. Can you just post a V2 patch with the same code change and commit summary, but without the commit message? ... actually, you could apply this to all your elementary patches re BOARD_LATE_INIT, and then submit them in a single patch set. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCHv2] e1000e : Correct Rx Threshold granularity
In e1000e driver, Rx descriptor queue is used such that hardware can add only one descriptor at a time. So the WTHRESH granularity in RXDCTL should be set to single descriptor. This would ensure that every time controller fills a Rx descriptor, it is flushed to host memory. Earlier this granularity was in cache line units i.e 2 descriptors. This leads to controller always waiting for 2 descriptors before flushing them out. But since not more than one Rx BD is actually available , the accumulation condition never gets hit. Signed-off-by: Ruchika Gupta ruchika.gu...@freescale.com Signed-off-by: Vakul Garg va...@freescale.com Acked-by: Roy Zang tie-fei.z...@freescale.com --- Tested on P1010 and P4080 with 82572 and 82574 cards. Changes in v2 - Fixed subject line and commit message drivers/net/e1000.c | 10 ++ drivers/net/e1000.h |1 + 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c index 98145bc..1f3c2b0 100644 --- a/drivers/net/e1000.c +++ b/drivers/net/e1000.c @@ -1703,6 +1703,16 @@ e1000_init_hw(struct eth_device *nic) E1000_WRITE_REG(hw, TXDCTL, ctrl); } + /* Set the receive descriptor write back policy */ + + if (hw-mac_type = e1000_82571) { + ctrl = E1000_READ_REG(hw, RXDCTL); + ctrl = + (ctrl ~E1000_RXDCTL_WTHRESH) | + E1000_RXDCTL_FULL_RX_DESC_WB; + E1000_WRITE_REG(hw, RXDCTL, ctrl); + } + switch (hw-mac_type) { default: break; diff --git a/drivers/net/e1000.h b/drivers/net/e1000.h index 720d8c6..cdb0e36 100644 --- a/drivers/net/e1000.h +++ b/drivers/net/e1000.h @@ -1518,6 +1518,7 @@ struct e1000_hw { #define E1000_RXDCTL_HTHRESH 0x3F00/* RXDCTL Host Threshold */ #define E1000_RXDCTL_WTHRESH 0x003F/* RXDCTL Writeback Threshold */ #define E1000_RXDCTL_GRAN0x0100/* RXDCTL Granularity */ +#define E1000_RXDCTL_FULL_RX_DESC_WB 0x0101/* GRAN=1, WTHRESH=1 */ /* Transmit Descriptor Control */ #define E1000_TXDCTL_PTHRESH 0x003F/* TXDCTL Prefetch Threshold */ -- 1.7.4.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [ARM] [STATUS] Increasingly high build failures
Folks, I just did another round of ./MAKEALL arm with MG/CS 2011.09-69, and the failure rate is rising to say the least, with 277 boards failing out of 278. :( Basically, the issues are, in order of impact: - Now 264 'uses variable-size enums yet the output is to use 32-bit enums' errors. That's a raise! Probably caused by some commonly included .h, but as the issue is at link stage and only refers to library intrinsics, tracing the culprit may take time. However, I cannot keep on ignoring this warning now, and thus I will look for a general solution, probably along the lines of enabling variable-size enums throughout the U-Boot codebase at least for toolchains that complain about it. - 6 warnings are 'ap20.c:44:18: warning: array subscript is above array bounds'. Last changed was in commit 03c609f6. Simon Glass, as you are listed as author of the commit, please have a look. - netspace_v2 board causing the only error case: Undefined or unsupported LaCie KW board variant. Simon Guinot, as you are listed as the board maintainer, can you have a look? This pretty much covers the immediate actions, but extrapolating from the situation, I would advise any and all contributors whose first name is Simon and last name initial is G to watch out for issues. :) Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] powerpc/usb: fix bug of CPU halt when missing USB PHY clock
Hello guys, I didn't get an explicit list from silicon team to point out which platforms contain this PHY_CLK_VALID bit or not, Someone said all platforms have this bit, it's not true, at least we found P4080 and P1022 no this bit. I'll trace it later. This patch is not necessary for boards with USB PHY clock valid, just for those case of USB PHY clock invalid. Thanks, Shengzhou -Original Message- From: Marek Vasut [mailto:ma...@denx.de] Sent: Thursday, April 19, 2012 6:57 AM To: Andy Fleming Cc: Liu Shengzhou-B36685; u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH] powerpc/usb: fix bug of CPU halt when missing USB PHY clock Dear Andy Fleming, Pinging you on this, again. Also, I've now moved the patch to Marek's queue, instead of mine. Thanks! Did the FSL silicon team respond already? On Sun, Feb 26, 2012 at 8:44 PM, Liu Shengzhou-B36685 b36...@freescale.com wrote: -Original Message- From: Marek Vasut [mailto:ma...@denx.de] Sent: Monday, February 27, 2012 7:13 AM To: u-boot@lists.denx.de Cc: Liu Shengzhou-B36685 Subject: Re: [U-Boot] [PATCH] powerpc/usb: fix bug of CPU halt when missing USB PHY clock when missing USB PHY clock and issuing usb start at u-boot prompt, writing to or_portsc register will cause CPU halt. We should check USBGP[PHY_CLK_VALID] bit at the first time in ehci_hcd_init() to avoid CPU hang in this case. Signed-off-by: Shengzhou Liu shengzhou@freescale.com --- drivers/usb/host/ehci-fsl.c | 22 +++--- 1 files changed, 19 insertions(+), 3 deletions(-) Hi, what's the status of this patch/patchset? Thanks M Currently we found that usb CTRL_PHY_CLK_VALID bit breaks on P1022 platform, which not contains this bit. - P1023/P3041/P5020 etc, have this bit - P3060/4080/PSC913x do have this bit, but not mentioned in RM. - P1022(perhaps and other) has no this bit I'm waiting for the response from FSL silicon team to confirm whether there is other platform not including this bit or not, so this patch maybe have to be pending until I get confirmation. Thanks, Shengzhou ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v6 1/4] mmc: sdhci: add the quirk for broken r1b response
When response type is R1b, mask value is added the SDHCI_INT_DAT_END. but in while(), didn't check that flag. So sdhci controller didn't work fine. CMD6 didn't always complete. So add the quirks for broken r1b response and add the timeout value to prevent the infinite loop. Signed-off-by: Jaehoon Chung jh80.ch...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Lei Wenlei...@marvell.com --- drivers/mmc/sdhci.c | 12 include/sdhci.h |1 + 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index fc904b5..7790a1e 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -128,6 +128,7 @@ int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, int trans_bytes = 0, is_aligned = 1; u32 mask, flags, mode; unsigned int timeout, start_addr = 0; + unsigned int retry = 1; /* Wait max 10 ms */ timeout = 10; @@ -210,8 +211,19 @@ int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, stat = sdhci_readl(host, SDHCI_INT_STATUS); if (stat SDHCI_INT_ERROR) break; + if (--retry == 0) + break; } while ((stat mask) != mask); + if (retry == 0) { + if (host-quirks SDHCI_QUIRK_BROKEN_R1B) + return 0; + else { + printf(Timeout for status update!\n); + return TIMEOUT; + } + } + if ((stat (SDHCI_INT_ERROR | mask)) == mask) { sdhci_cmd_done(host, cmd); sdhci_writel(host, mask, SDHCI_INT_STATUS); diff --git a/include/sdhci.h b/include/sdhci.h index 800f9d9..a2415ba 100644 --- a/include/sdhci.h +++ b/include/sdhci.h @@ -216,6 +216,7 @@ */ #define SDHCI_QUIRK_32BIT_DMA_ADDR (1 0) #define SDHCI_QUIRK_REG32_RW (1 1) +#define SDHCI_QUIRK_BROKEN_R1B (1 2) /* to make gcc happy */ struct sdhci_host; ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v6 0/4] mmc: support sdhci instead of s5p_mmc
This patchset is supported the sdhci controller for Samsung-SoC. In mmc driver, already implemented the generic sdhci. There is no reason that didn't use sdhci.c. So, use the sdhci instead of s5p_mmc. Changelog-v6: - Fix typo - Code clean for #define Changelog-v5: - Tested with goni/trats board - Fixed wrong condition checking - Increased retry time - Add the quirk_broken_r1b in s5p_sdhci.c Changelog-v4: - seperate the device driver and SoC patch. Changelog-v3: - Add the quirks for broken R1b response. - Add the timeout to prevent infinite loop. Changelog-v2: - removed the s5p_mmc.c - based-on u-boot-samsung repository. Jaehoon Chung (4): mmc: sdhci: add the quirk for broken r1b response mmc: add the quirk to use the sdhci for samsung-soc mmc: support the sdhci intead of s5p_mmc for samsung-soc ARM: SAMSUNG: support sdhci controller arch/arm/include/asm/arch-exynos/mmc.h | 93 +++--- arch/arm/include/asm/arch-s5pc1xx/mmc.h | 93 +++--- drivers/mmc/Makefile|2 +- drivers/mmc/s5p_mmc.c | 490 --- drivers/mmc/sdhci.c | 24 ++ include/configs/origen.h|7 +- include/configs/s5p_goni.h |7 +- include/configs/s5pc210_universal.h |7 +- include/configs/smdk5250.h |3 +- include/configs/smdkv310.h |7 +- include/configs/trats.h |3 +- include/sdhci.h |7 + 12 files changed, 146 insertions(+), 597 deletions(-) delete mode 100644 drivers/mmc/s5p_mmc.c ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v6 2/4] mmc: add the quirk to use the sdhci for samsung-soc
To support the Samsung-SoC, added the basically functions. Samsung-SoC didn't used the SDHCI_CTRL_HISPD. And added set_control_reg callback for s3c64xx. Signed-off-by: Jaehoon Chung jh80.ch...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Lei Wenlei...@marvell.com --- drivers/mmc/sdhci.c | 12 include/sdhci.h |6 ++ 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index 7790a1e..1709643 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -337,6 +337,9 @@ void sdhci_set_ios(struct mmc *mmc) u32 ctrl; struct sdhci_host *host = (struct sdhci_host *)mmc-priv; + if (host-set_control_reg) + host-set_control_reg(host); + if (mmc-clock != host-clock) sdhci_set_clock(mmc, mmc-clock); @@ -360,6 +363,9 @@ void sdhci_set_ios(struct mmc *mmc) else ctrl = ~SDHCI_CTRL_HISPD; + if (host-quirks SDHCI_QUIRK_NO_HISPD_BIT) + ctrl = ~SDHCI_CTRL_HISPD; + sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL); } @@ -443,9 +449,15 @@ int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 min_clk) mmc-voltages |= MMC_VDD_29_30 | MMC_VDD_30_31; if (caps SDHCI_CAN_VDD_180) mmc-voltages |= MMC_VDD_165_195; + + if (host-quirks SDHCI_QUIRK_BROKEN_VOLTAGE) + mmc-voltages |= host-voltages; + mmc-host_caps = MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_4BIT; if (caps SDHCI_CAN_DO_8BIT) mmc-host_caps |= MMC_MODE_8BIT; + if (host-host_caps) + mmc-host_caps |= host-host_caps; sdhci_reset(host, SDHCI_RESET_ALL); mmc_register(mmc); diff --git a/include/sdhci.h b/include/sdhci.h index a2415ba..9d37183 100644 --- a/include/sdhci.h +++ b/include/sdhci.h @@ -217,6 +217,8 @@ #define SDHCI_QUIRK_32BIT_DMA_ADDR (1 0) #define SDHCI_QUIRK_REG32_RW (1 1) #define SDHCI_QUIRK_BROKEN_R1B (1 2) +#define SDHCI_QUIRK_NO_HISPD_BIT (1 3) +#define SDHCI_QUIRK_BROKEN_VOLTAGE (1 4) /* to make gcc happy */ struct sdhci_host; @@ -241,10 +243,14 @@ struct sdhci_host { char *name; void *ioaddr; unsigned int quirks; + unsigned int host_caps; unsigned int version; unsigned int clock; struct mmc *mmc; const struct sdhci_ops *ops; + + void (*set_control_reg)(struct sdhci_host *host); + uintvoltages; }; #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v6 3/4] mmc: support the sdhci instead of s5p_mmc for samsung-soc
In driver mmc, generic s5p_sdhci code is implemented. s5p_mmc file is dupulicated. we are good that use the generic sdhci. This patch supported the sdhci for Samsung-SoC. Signed-off-by: Jaehoon Chung jh80.ch...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Lei Wenlei...@marvell.com Acked-by: Minkyu Kang mk7.k...@samsung.com --- arch/arm/include/asm/arch-exynos/mmc.h | 93 +++--- arch/arm/include/asm/arch-s5pc1xx/mmc.h | 93 +++--- drivers/mmc/Makefile|2 +- drivers/mmc/s5p_mmc.c | 490 --- 4 files changed, 95 insertions(+), 583 deletions(-) delete mode 100644 drivers/mmc/s5p_mmc.c diff --git a/arch/arm/include/asm/arch-exynos/mmc.h b/arch/arm/include/asm/arch-exynos/mmc.h index 30f82b8..0f701c9 100644 --- a/arch/arm/include/asm/arch-exynos/mmc.h +++ b/arch/arm/include/asm/arch-exynos/mmc.h @@ -21,53 +21,54 @@ #ifndef __ASM_ARCH_MMC_H_ #define __ASM_ARCH_MMC_H_ -#ifndef __ASSEMBLY__ -struct s5p_mmc { - unsigned intsysad; - unsigned short blksize; - unsigned short blkcnt; - unsigned intargument; - unsigned short trnmod; - unsigned short cmdreg; - unsigned intrspreg0; - unsigned intrspreg1; - unsigned intrspreg2; - unsigned intrspreg3; - unsigned intbdata; - unsigned intprnsts; - unsigned char hostctl; - unsigned char pwrcon; - unsigned char blkgap; - unsigned char wakcon; - unsigned short clkcon; - unsigned char timeoutcon; - unsigned char swrst; - unsigned intnorintsts; /* errintsts */ - unsigned intnorintstsen;/* errintstsen */ - unsigned intnorintsigen;/* errintsigen */ - unsigned short acmd12errsts; - unsigned char res1[2]; - unsigned intcapareg; - unsigned char res2[4]; - unsigned intmaxcurr; - unsigned char res3[0x34]; - unsigned intcontrol2; - unsigned intcontrol3; - unsigned char res4[4]; - unsigned intcontrol4; - unsigned char res5[0x6e]; - unsigned short hcver; - unsigned char res6[0xFF00]; -}; +#define SDHCI_CONTROL2 0x80 +#define SDHCI_CONTROL3 0x84 +#define SDHCI_CONTROL4 0x8C -struct mmc_host { - struct s5p_mmc *reg; - unsigned int version; /* SDHCI spec. version */ - unsigned int clock; /* Current clock (MHz) */ - int dev_index; -}; +#define SDHCI_CTRL2_ENSTAASYNCCLR (1 31) +#define SDHCI_CTRL2_ENCMDCNFMSK(1 30) +#define SDHCI_CTRL2_CDINVRXD3 (1 29) +#define SDHCI_CTRL2_SLCARDOUT (1 28) -int s5p_mmc_init(int dev_index, int bus_width); +#define SDHCI_CTRL2_FLTCLKSEL_MASK (0xf 24) +#define SDHCI_CTRL2_FLTCLKSEL_SHIFT(24) +#define SDHCI_CTRL2_FLTCLKSEL(_x) ((_x) 24) -#endif /* __ASSEMBLY__ */ +#define SDHCI_CTRL2_LVLDAT_MASK(0xff 16) +#define SDHCI_CTRL2_LVLDAT_SHIFT (16) +#define SDHCI_CTRL2_LVLDAT(_x) ((_x) 16) + +#define SDHCI_CTRL2_ENFBCLKTX (1 15) +#define SDHCI_CTRL2_ENFBCLKRX (1 14) +#define SDHCI_CTRL2_SDCDSEL(1 13) +#define SDHCI_CTRL2_SDSIGPC(1 12) +#define SDHCI_CTRL2_ENBUSYCHKTXSTART (1 11) + +#define SDHCI_CTRL2_DFCNT_MASK(_x) ((_x) 9) +#define SDHCI_CTRL2_DFCNT_SHIFT(9) + +#define SDHCI_CTRL2_ENCLKOUTHOLD (1 8) +#define SDHCI_CTRL2_RWAITMODE (1 7) +#define SDHCI_CTRL2_DISBUFRD (1 6) +#define SDHCI_CTRL2_SELBASECLK_MASK(_x)((_x) 4) +#define SDHCI_CTRL2_SELBASECLK_SHIFT (4) +#define SDHCI_CTRL2_PWRSYNC(1 3) +#define SDHCI_CTRL2_ENCLKOUTMSKCON (1 1) +#define SDHCI_CTRL2_HWINITFIN (1 0) + +#define SDHCI_CTRL3_FCSEL3 (1 31) +#define SDHCI_CTRL3_FCSEL2 (1 23) +#define SDHCI_CTRL3_FCSEL1 (1 15) +#define SDHCI_CTRL3_FCSEL0 (1 7) + +#define SDHCI_CTRL4_DRIVE_MASK(_x) ((_x) 16) +#define SDHCI_CTRL4_DRIVE_SHIFT(16) + +int s5p_sdhci_init(u32 regbase, u32 max_clk, u32 min_clk, u32 quirks); + +static inline unsigned int s5p_mmc_init(int index, int bus_width) +{ + unsigned int base = samsung_get_base_mmc() + (0x1 * index); + return s5p_sdhci_init(base, 5200, 40, index); +} #endif diff --git a/arch/arm/include/asm/arch-s5pc1xx/mmc.h b/arch/arm/include/asm/arch-s5pc1xx/mmc.h index adef4ee..0f701c9 100644 --- a/arch/arm/include/asm/arch-s5pc1xx/mmc.h +++ b/arch/arm/include/asm/arch-s5pc1xx/mmc.h @@ -21,53 +21,54 @@ #ifndef __ASM_ARCH_MMC_H_ #define __ASM_ARCH_MMC_H_ -#ifndef __ASSEMBLY__ -struct s5p_mmc { - unsigned intsysad; - unsigned short blksize; - unsigned short blkcnt; - unsigned intargument; - unsigned short trnmod; - unsigned short
[U-Boot] [PATCH v6 4/4] ARM: SAMSUNG: support sdhci controller
To support sdhci controller, remove the CONFIG_S5P_MMC.. Instead, use the CONFIG_S5P_SDHCI/CONFIG_SDHCI. Signed-off-by: Jaehoon Chung jh80.ch...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Lei Wenlei...@marvell.com Acked-by: Minkyu Kang mk7.k...@samsung.com --- include/configs/origen.h|7 --- include/configs/s5p_goni.h |7 --- include/configs/s5pc210_universal.h |7 --- include/configs/smdk5250.h |3 ++- include/configs/smdkv310.h |7 --- include/configs/trats.h |3 ++- 6 files changed, 20 insertions(+), 14 deletions(-) diff --git a/include/configs/origen.h b/include/configs/origen.h index 8ede825..367f991 100644 --- a/include/configs/origen.h +++ b/include/configs/origen.h @@ -69,9 +69,10 @@ #define EXYNOS4_DEFAULT_UART_OFFSET0x02 /* SD/MMC configuration */ -#define CONFIG_GENERIC_MMC 1 -#define CONFIG_MMC 1 -#define CONFIG_S5P_MMC 1 +#define CONFIG_GENERIC_MMC +#define CONFIG_MMC +#define CONFIG_SDHCI +#define CONFIG_S5P_SDHCI /* PWM */ #define CONFIG_PWM 1 diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h index 56b5547..e133a17 100644 --- a/include/configs/s5p_goni.h +++ b/include/configs/s5p_goni.h @@ -63,9 +63,10 @@ #define CONFIG_BAUDRATE115200 /* MMC */ -#define CONFIG_GENERIC_MMC 1 -#define CONFIG_MMC 1 -#define CONFIG_S5P_MMC 1 +#define CONFIG_GENERIC_MMC +#define CONFIG_MMC +#define CONFIG_SDHCI +#define CONFIG_S5P_SDHCI /* PWM */ #define CONFIG_PWM 1 diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h index 1301275..00db374 100644 --- a/include/configs/s5pc210_universal.h +++ b/include/configs/s5pc210_universal.h @@ -66,9 +66,10 @@ #define CONFIG_BAUDRATE115200 /* MMC */ -#define CONFIG_GENERIC_MMC 1 -#define CONFIG_MMC 1 -#define CONFIG_S5P_MMC 1 +#define CONFIG_GENERIC_MMC +#define CONFIG_MMC +#define CONFIG_SDHCI +#define CONFIG_S5P_SDHCI /* PWM */ #define CONFIG_PWM 1 diff --git a/include/configs/smdk5250.h b/include/configs/smdk5250.h index 9659f9e..0f63040 100644 --- a/include/configs/smdk5250.h +++ b/include/configs/smdk5250.h @@ -78,7 +78,8 @@ /* SD/MMC configuration */ #define CONFIG_GENERIC_MMC #define CONFIG_MMC -#define CONFIG_S5P_MMC +#define CONFIG_SDHCI +#define CONFIG_S5P_SDHCI #define CONFIG_BOARD_EARLY_INIT_F diff --git a/include/configs/smdkv310.h b/include/configs/smdkv310.h index 93c25da..702134b 100644 --- a/include/configs/smdkv310.h +++ b/include/configs/smdkv310.h @@ -68,9 +68,10 @@ #define EXYNOS4_DEFAULT_UART_OFFSET0x01 /* SD/MMC configuration */ -#define CONFIG_GENERIC_MMC 1 -#define CONFIG_MMC 1 -#define CONFIG_S5P_MMC 1 +#define CONFIG_GENERIC_MMC +#define CONFIG_MMC +#define CONFIG_SDHCI +#define CONFIG_S5P_SDHCI /* PWM */ #define CONFIG_PWM 1 diff --git a/include/configs/trats.h b/include/configs/trats.h index 10f11d9..71b9393 100644 --- a/include/configs/trats.h +++ b/include/configs/trats.h @@ -74,7 +74,8 @@ /* MMC */ #define CONFIG_GENERIC_MMC #define CONFIG_MMC -#define CONFIG_S5P_MMC +#define CONFIG_S5P_SDHCI +#define CONFIG_SDHCI /* PWM */ #define CONFIG_PWM ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] powerpc/usb: fix bug of CPU halt when missing USB PHY clock
Dear Liu Shengzhou-B36685, Hello guys, I didn't get an explicit list from silicon team to point out which platforms contain this PHY_CLK_VALID bit or not, Someone said all platforms have this bit, it's not true, at least we found P4080 and P1022 no this bit. I'll trace it later. This patch is not necessary for boards with USB PHY clock valid, just for those case of USB PHY clock invalid. Roger that, thanks a lot :) Thanks, Shengzhou -Original Message- From: Marek Vasut [mailto:ma...@denx.de] Sent: Thursday, April 19, 2012 6:57 AM To: Andy Fleming Cc: Liu Shengzhou-B36685; u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH] powerpc/usb: fix bug of CPU halt when missing USB PHY clock Dear Andy Fleming, Pinging you on this, again. Also, I've now moved the patch to Marek's queue, instead of mine. Thanks! Did the FSL silicon team respond already? On Sun, Feb 26, 2012 at 8:44 PM, Liu Shengzhou-B36685 b36...@freescale.com wrote: -Original Message- From: Marek Vasut [mailto:ma...@denx.de] Sent: Monday, February 27, 2012 7:13 AM To: u-boot@lists.denx.de Cc: Liu Shengzhou-B36685 Subject: Re: [U-Boot] [PATCH] powerpc/usb: fix bug of CPU halt when missing USB PHY clock when missing USB PHY clock and issuing usb start at u-boot prompt, writing to or_portsc register will cause CPU halt. We should check USBGP[PHY_CLK_VALID] bit at the first time in ehci_hcd_init() to avoid CPU hang in this case. Signed-off-by: Shengzhou Liu shengzhou@freescale.com --- drivers/usb/host/ehci-fsl.c | 22 +++--- 1 files changed, 19 insertions(+), 3 deletions(-) Hi, what's the status of this patch/patchset? Thanks M Currently we found that usb CTRL_PHY_CLK_VALID bit breaks on P1022 platform, which not contains this bit. - P1023/P3041/P5020 etc, have this bit - P3060/4080/PSC913x do have this bit, but not mentioned in RM. - P1022(perhaps and other) has no this bit I'm waiting for the response from FSL silicon team to confirm whether there is other platform not including this bit or not, so this patch maybe have to be pending until I get confirmation. Thanks, Shengzhou ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot Best regards, Marek Vasut Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V4 1/8] i.MX25: esdhc: Add mxc_get_clock infrastructure
Defining CONFIG_FSL_ESDHC brings in a call to get_clocks, so let's implement get_clocks function. This is how it seems to be implemented elsewhere. Signed-off-by: Timo Ketola t...@exertus.fi --- Changes in v4: - Rewrapped commit message Changes in v2: - Rebased to u-boot-imx next arch/arm/cpu/arm926ejs/mx25/generic.c | 27 +++ arch/arm/include/asm/arch-mx25/clock.h | 23 +++ 2 files changed, 50 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c index 9cadb7c..8b07dae 100644 --- a/arch/arm/cpu/arm926ejs/mx25/generic.c +++ b/arch/arm/cpu/arm926ejs/mx25/generic.c @@ -28,10 +28,15 @@ #include asm/io.h #include asm/arch/imx-regs.h #include asm/arch/imx25-pinmux.h +#include asm/arch/clock.h #ifdef CONFIG_MXC_MMC #include asm/arch/mxcmmc.h #endif +#ifdef CONFIG_FSL_ESDHC +DECLARE_GLOBAL_DATA_PTR; +#endif + /* * get the system pll clock in Hz * @@ -105,6 +110,20 @@ ulong imx_get_perclk(int clk) return lldiv(fref, div); } +unsigned int mxc_get_clock(enum mxc_clock clk) +{ + if (clk = MXC_CLK_NUM) + return -1; + switch (clk) { + case MXC_ARM_CLK: + return imx_get_armclk(); + case MXC_FEC_CLK: + return imx_get_ahbclk(); + default: + return imx_get_perclk(clk); + } +} + u32 get_cpu_rev(void) { u32 srev; @@ -182,6 +201,14 @@ int cpu_eth_init(bd_t *bis) #endif } +int get_clocks(void) +{ +#ifdef CONFIG_FSL_ESDHC + gd-sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK); +#endif + return 0; +} + /* * Initializes on-chip MMC controllers. * to override, implement board_mmc_init() diff --git a/arch/arm/include/asm/arch-mx25/clock.h b/arch/arm/include/asm/arch-mx25/clock.h index c59f588..0f47eaf 100644 --- a/arch/arm/include/asm/arch-mx25/clock.h +++ b/arch/arm/include/asm/arch-mx25/clock.h @@ -26,11 +26,34 @@ #ifndef __ASM_ARCH_CLOCK_H #define __ASM_ARCH_CLOCK_H +enum mxc_clock { + MXC_CSI_CLK, + MXC_EPIT_CLK, + MXC_ESAI_CLK, + MXC_ESDHC1_CLK, + MXC_ESDHC2_CLK, + MXC_GPT_CLK, + MXC_I2C_CLK, + MXC_LCDC_CLK, + MXC_NFC_CLK, + MXC_OWIRE_CLK, + MXC_PWM_CLK, + MXC_SIM1_CLK, + MXC_SIM2_CLK, + MXC_SSI1_CLK, + MXC_SSI2_CLK, + MXC_UART_CLK, + MXC_ARM_CLK, + MXC_FEC_CLK, + MXC_CLK_NUM +}; + ulong imx_get_perclk(int clk); ulong imx_get_ahbclk(void); #define imx_get_uartclk() imx_get_perclk(15) #define imx_get_fecclk() (imx_get_ahbclk()/2) +unsigned int mxc_get_clock(enum mxc_clock clk); #endif /* __ASM_ARCH_CLOCK_H */ -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V4 2/8] i.MX25: This architecture has a GPIO4 too
Signed-off-by: Timo Ketola t...@exertus.fi --- Changes in v2: - Dropped patches 2 and 3 so this one changed from 4 to 2 - Rebased to u-boot-imx next - Fixed too long line drivers/gpio/mxc_gpio.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c index df6..3e94ac3 100644 --- a/drivers/gpio/mxc_gpio.c +++ b/drivers/gpio/mxc_gpio.c @@ -40,7 +40,8 @@ static unsigned long gpio_ports[] = { [0] = GPIO1_BASE_ADDR, [1] = GPIO2_BASE_ADDR, [2] = GPIO3_BASE_ADDR, -#if defined(CONFIG_MX51) || defined(CONFIG_MX53) || defined(CONFIG_MX6Q) +#if defined(CONFIG_MX25) || defined(CONFIG_MX51) || defined(CONFIG_MX53) || \ + defined(CONFIG_MX6Q) [3] = GPIO4_BASE_ADDR, #endif #if defined(CONFIG_MX53) || defined(CONFIG_MX6Q) -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V4 0/8] i.MX25: Preparing new board with miscellaneus fixes
I'm preparing to include Exertus board adaptation. This is the fourth version of this patchset and the history is showing my deep learning curve with git and formatting good patches. So please bear with me. I assumed that 'git send-email' (alone) would be a handy way to send patches but it proved to produce disappointing results, at least in my hands. I switched to trying 'git format-patch; edit; git send-email'. Lets see how this goes... The board, for which I'm trying to adapt, uses some peripherals (esdhc, gpio4) and functionalities (flash based BBT) which apparently are not yet used in other i.MX25 boards. This patchset fixes some issues in using those peripherals in i.MX25 environment and some bugs. Changes in contents of the patchset: V3: - Dropped patch 8 V2: - Dropped patches 2, 3 and 6 - Added patches 6, 7, 8 and 9 I hope and believe that all comments given to me so far are covered in these patches. Timo Ketola (8): i.MX25: esdhc: Add mxc_get_clock infrastructure i.MX25: This architecture has a GPIO4 too imx: fec: Resolve speed before configuring gasket imx: nand: Support flash based BBT i.MX25: usb: Set PORTSCx register imx: usb: There is no such register i.MX2: Include asm/types.h in arch-mx25/imx-regs.h imx: Add u-boot.imx as target for ARM9 i.MX SOCs arch/arm/cpu/arm926ejs/config.mk |6 arch/arm/cpu/arm926ejs/mx25/generic.c | 27 ++ arch/arm/include/asm/arch-mx25/clock.h| 23 +++ arch/arm/include/asm/arch-mx25/imx-regs.h |3 ++ drivers/gpio/mxc_gpio.c |3 +- drivers/mtd/nand/mxc_nand.c | 33 ++ drivers/net/fec_mxc.c | 43 - drivers/usb/host/ehci-mxc.c |4 --- 8 files changed, 118 insertions(+), 24 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 V4 3/8] imx: fec: Resolve speed before configuring gasket
Gasket needs a different configuration for 10BaseT than for higher speeds. Signed-off-by: Timo Ketola t...@exertus.fi --- Changes in v4: - Rewrapped commit message Changes in v2: - Dropped patches 2 and 3 so this one changed from 5 to 3 - Rebased to u-boot-imx next - Removed the remove of 'miiphy_duplex' call - Changed 'speed == _100BASET' to 'speed != _10BASET' to not to break _1000BASET - Changed configuration option to put gasket into RMII mode from !CONFIG_MII to CONFIG_RMII. I'm not too sure how this should be done though. !CONFIG_MII is normally used for this but its original purpose was to enable MII *management* interface, I think... drivers/net/fec_mxc.c | 43 --- 1 files changed, 24 insertions(+), 19 deletions(-) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 824a199..48a69d4 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -440,6 +440,22 @@ static int fec_open(struct eth_device *edev) */ writel(readl(fec-eth-ecntrl) | FEC_ECNTRL_ETHER_EN, fec-eth-ecntrl); +#ifdef CONFIG_PHYLIB + if (!fec-phydev) + fec_eth_phy_config(edev); + if (fec-phydev) { + /* Start up the PHY */ + phy_startup(fec-phydev); + speed = fec-phydev-speed; + } else { + speed = _100BASET; + } +#else + miiphy_wait_aneg(edev); + speed = miiphy_speed(edev-name, fec-phy_id); + miiphy_duplex(edev-name, fec-phy_id); +#endif + #if defined(CONFIG_MX25) || defined(CONFIG_MX53) udelay(100); /* @@ -453,9 +469,14 @@ static int fec_open(struct eth_device *edev) while (readw(fec-eth-miigsk_enr) MIIGSK_ENR_READY) udelay(2); -#if !defined(CONFIG_MII) - /* configure gasket for RMII, 50 MHz, no loopback, and no echo */ - writew(MIIGSK_CFGR_IF_MODE_RMII, fec-eth-miigsk_cfgr); +#if defined(CONFIG_RMII) + if (speed != _10BASET) + /* configure gasket for RMII, 50MHz, no loopback, and no echo */ + writew(MIIGSK_CFGR_IF_MODE_RMII, fec-eth-miigsk_cfgr); + else + /* configure gasket for RMII, 5MHz, no loopback, and no echo */ + writew(MIIGSK_CFGR_IF_MODE_RMII | MIIGSK_CFGR_FRCONT, + fec-eth-miigsk_cfgr); #else /* configure gasket for MII, no loopback, and no echo */ writew(MIIGSK_CFGR_IF_MODE_MII, fec-eth-miigsk_cfgr); @@ -474,22 +495,6 @@ static int fec_open(struct eth_device *edev) } #endif -#ifdef CONFIG_PHYLIB - if (!fec-phydev) - fec_eth_phy_config(edev); - if (fec-phydev) { - /* Start up the PHY */ - phy_startup(fec-phydev); - speed = fec-phydev-speed; - } else { - speed = _100BASET; - } -#else - miiphy_wait_aneg(edev); - speed = miiphy_speed(edev-name, fec-phy_id); - miiphy_duplex(edev-name, fec-phy_id); -#endif - #ifdef FEC_QUIRK_ENET_MAC { u32 ecr = readl(fec-eth-ecntrl) ~FEC_ECNTRL_SPEED; -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V4 4/8] imx: nand: Support flash based BBT
Signed-off-by: Timo Ketola t...@exertus.fi --- Changes in v4: - Removed blank lines inside #ifdef - Manipulate 'this-options' with '|=' instead of '=' Changes in v3: - Changed the subject - Changed the BBT pattern offsets (patch 4); They are now zero as in Linux Changes in v2: - Dropped patches 2, 3 and 6 so this one changed from 7 to 4 - Rebased to u-boot-imx next drivers/mtd/nand/mxc_nand.c | 33 + 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index 35e89a0..936186f 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c @@ -1302,12 +1302,45 @@ static void mxc_setup_config1(void) #define mxc_setup_config1() #endif +#ifdef CONFIG_SYS_NAND_USE_FLASH_BBT + +static u8 bbt_pattern[] = {'B', 'b', 't', '0' }; +static u8 mirror_pattern[] = {'1', 't', 'b', 'B' }; + +static struct nand_bbt_descr bbt_main_descr = { + .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE | + NAND_BBT_2BIT | NAND_BBT_VERSION | NAND_BBT_PERCHIP, + .offs = 0, + .len = 4, + .veroffs = 4, + .maxblocks = 4, + .pattern = bbt_pattern, +}; + +static struct nand_bbt_descr bbt_mirror_descr = { + .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE | + NAND_BBT_2BIT | NAND_BBT_VERSION | NAND_BBT_PERCHIP, + .offs = 0, + .len = 4, + .veroffs = 4, + .maxblocks = 4, + .pattern = mirror_pattern, +}; + +#endif + int board_nand_init(struct nand_chip *this) { struct mtd_info *mtd; uint16_t tmp; int err = 0; +#ifdef CONFIG_SYS_NAND_USE_FLASH_BBT + this-options |= NAND_USE_FLASH_BBT; + this-bbt_td = bbt_main_descr; + this-bbt_md = bbt_mirror_descr; +#endif + /* structures must be linked */ mtd = host-mtd; mtd-priv = this; -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V4 5/8] i.MX25: usb: Set PORTSCx register
The USB controller in i.MX25 has a PORTSCx registers which should be set. In this regard it is similar to the controller in i.MX31. As this file is compiled only with i.MX25 and -31, #ifdef check can be removed. Signed-off-by: Timo Ketola t...@exertus.fi --- Changes in v4: - Reworded subject to shorten it - Added commit message - Changed the fix from adding i.MX25 to removing the check altogether Changes in v2: - Dropped patches 2, 3 and 6 so this one changed from 8 to 5 - Rebased to u-boot-imx next drivers/usb/host/ehci-mxc.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c index 61dbccd..7384580 100644 --- a/drivers/usb/host/ehci-mxc.c +++ b/drivers/usb/host/ehci-mxc.c @@ -125,11 +125,9 @@ int ehci_hcd_init(void) hcor = (struct ehci_hcor *)((uint32_t) hccr + HC_LENGTH(ehci_readl(hccr-cr_capbase))); setbits_le32(ehci-usbmode, CM_HOST); -#ifdef CONFIG_MX31 setbits_le32(ehci-control, USB_EN); __raw_writel(CONFIG_MXC_USB_PORTSC, ehci-portsc); -#endif mxc_set_usbcontrol(CONFIG_MXC_USB_PORT, CONFIG_MXC_USB_FLAGS); udelay(1); -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V4 6/8] imx: usb: There is no such register
The reference manual of i.MX25 (nor i.MX31) does not define such register. This seems to access read only UH2_CAPLENGTH register (if CONFIG_MXC_USB_PORT is zero). Signed-off-by: Timo Ketola t...@exertus.fi --- Changes in v4: - Rewrapped commit message Changes in v2: - New patch in this series drivers/usb/host/ehci-mxc.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c index 7384580..45cbd18 100644 --- a/drivers/usb/host/ehci-mxc.c +++ b/drivers/usb/host/ehci-mxc.c @@ -125,8 +125,6 @@ int ehci_hcd_init(void) hcor = (struct ehci_hcor *)((uint32_t) hccr + HC_LENGTH(ehci_readl(hccr-cr_capbase))); setbits_le32(ehci-usbmode, CM_HOST); - setbits_le32(ehci-control, USB_EN); - __raw_writel(CONFIG_MXC_USB_PORTSC, ehci-portsc); mxc_set_usbcontrol(CONFIG_MXC_USB_PORT, CONFIG_MXC_USB_FLAGS); -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V4 7/8] i.MX2: Include asm/types.h in arch-mx25/imx-regs.h
types.h must be included in imx-regs.h if one wants to include imx-regs.h in a board configuration file. That for one's part is necessary, if one wants to use addresses defined in imx-regs.h. For example, fsl_esdhc.c needs CONFIG_SYS_FSL_ESDHC_ADDR defined and a proper thing is to define it with IMX_MMC_SDHCx_BASE in board configuration file. This patch fixes the build in that case. Signed-off-by: Timo Ketola t...@exertus.fi --- Changes in v4: - Proper fix was found so this patch changes altogether - subject, message and touched file Changes in v2: - New patch in this series arch/arm/include/asm/arch-mx25/imx-regs.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/arch-mx25/imx-regs.h b/arch/arm/include/asm/arch-mx25/imx-regs.h index 7f9449b..cf925d7 100644 --- a/arch/arm/include/asm/arch-mx25/imx-regs.h +++ b/arch/arm/include/asm/arch-mx25/imx-regs.h @@ -34,6 +34,9 @@ #define _IMX_REGS_H #ifndef __ASSEMBLY__ + +#include asm/types.h + #ifdef CONFIG_FEC_MXC extern void mx25_fec_init_pins(void); #endif -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V4 8/8] imx: Add u-boot.imx as target for ARM9 i.MX SOCs
Signed-off-by: Timo Ketola t...@exertus.fi --- Changes in v3: - Dropped old patch number 8 imx: nand: Don't invent new... so this one changed from 9 to 8 Changes in v2: - New patch in this series - Add .imx target in the spirit of commit 303838 arch/arm/cpu/arm926ejs/config.mk |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/config.mk b/arch/arm/cpu/arm926ejs/config.mk index ffb2e6c..6a3a1bb 100644 --- a/arch/arm/cpu/arm926ejs/config.mk +++ b/arch/arm/cpu/arm926ejs/config.mk @@ -31,3 +31,9 @@ PLATFORM_CPPFLAGS += -march=armv5te # = PF_RELFLAGS_SLB_AT := $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT) + +ifneq ($(CONFIG_IMX_CONFIG),) + +ALL-y += $(obj)u-boot.imx + +endif -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC] Preventing overriding of serverip when set in environment by user
On 18/04/2012 17:46, Peter Barada wrote: On 04/18/2012 11:28 AM, Wolfgang Denk wrote: Is this the proper way to fix this issue and the right location to make the change? The overall goal was to make sure that if I specified a particular serverip that I wanted to use, then the DHCP server should not be changing that. No, this is not an acceptable patch. What exactly _are_ you trying to fix? What is wrong with using the DHCP server supplied address? If it is incorrect, you should fix your DHCP server configuration. I have the same type of problem. In my case our company controls the DHCP server that hands out addresses for the network, but I want to use a *local* TFTP server (the one on my development machine). I can't modify the DHCP server so if I use dhcp to get and address u-boot also overwrites serverip. At home my FiOS router has a DHCP server (that I can't modify since its closed and is needed to provide addresses to my TV set top box) that provides addresses for my network, and has the same problem... Would an option to dhcp (i.e. one that tells it to *only* modify ipaddr) suffice? Or would it be better to provide an entirely a new command that optionally updates the variables in the environment be better? Then users have the option of using dhcp as is, or for environments like mine (and apparently Chase) can just get an IP address and go from there... There is already such as option. You can pass the tftp server in the tftpcommand, see code: tftp [loadAddress] [[hostIPaddr:]bootfilename] for example, something like tftp 0x80008000 192.168.1.1:uImage Is it not enough ? Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-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] [ARM] [STATUS] Increasingly high build failures
Dear Albert ARIBAUD, In message 4f8fbb22.5000...@aribaud.net you wrote: Folks, I just did another round of ./MAKEALL arm with MG/CS 2011.09-69, and the failure rate is rising to say the least, with 277 boards failing out of 278. :( Which version of GCC is this? Recent tests with ELDK 5.2 (which is based on gcc version 4.6.4 20120303) show no such problems. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de The complexity of software is an essential property, not an acciden- tal one. Hence, descriptions of a software entity that abstract away its complexity often abstract away its essence.- Fred Brooks, Jr. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [ARM] [STATUS] Increasingly high build failures
Hi Wolfgang, Le 19/04/2012 11:51, Wolfgang Denk a écrit : Dear Albert ARIBAUD, In message4f8fbb22.5000...@aribaud.net you wrote: Folks, I just did another round of ./MAKEALL arm with MG/CS 2011.09-69, and the failure rate is rising to say the least, with 277 boards failing out of 278. :( Which version of GCC is this? Recent tests with ELDK 5.2 (which is based on gcc version 4.6.4 20120303) show no such problems. Best regards, Wolfgang Denk Seems there was a misconfiguration in my toolchain and repo -- redoing the mass build with correct settings, will update notice when done Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] GCC4.6: Squash warnings in onenand_base.c
Fix gcc 4.6 build warnings: onenand_base.c: In function 'onenand_probe': onenand_base.c:2577:6: warning: variable 'maf_id' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk w...@denx.de Cc: Lukasz Majewski l.majew...@samsung.com Cc: Kyungmin Park kyungmin.p...@samsung.com --- drivers/mtd/onenand/onenand_base.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 480ae7a..1d0f196 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c @@ -2574,7 +2574,7 @@ static int onenand_chip_probe(struct mtd_info *mtd) int onenand_probe(struct mtd_info *mtd) { struct onenand_chip *this = mtd-priv; - int maf_id, dev_id, ver_id; + int dev_id, ver_id; int density; int ret; @@ -2582,8 +2582,7 @@ int onenand_probe(struct mtd_info *mtd) if (ret) return ret; - /* Read manufacturer and device IDs from Register */ - maf_id = this-read_word(this-base + ONENAND_REG_MANUFACTURER_ID); + /* Read device IDs from Register */ dev_id = this-read_word(this-base + ONENAND_REG_DEVICE_ID); ver_id = this-read_word(this-base + ONENAND_REG_VERSION_ID); this-technology = this-read_word(this-base + ONENAND_REG_TECHNOLOGY); -- 1.7.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] GCC4.6: Squash warnings in onenand_base.c
Hi Wolfgang, Fix gcc 4.6 build warnings: onenand_base.c: In function 'onenand_probe': onenand_base.c:2577:6: warning: variable 'maf_id' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk w...@denx.de Cc: Lukasz Majewski l.majew...@samsung.com Cc: Kyungmin Park kyungmin.p...@samsung.com --- drivers/mtd/onenand/onenand_base.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 480ae7a..1d0f196 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c @@ -2574,7 +2574,7 @@ static int onenand_chip_probe(struct mtd_info *mtd) int onenand_probe(struct mtd_info *mtd) { struct onenand_chip *this = mtd-priv; - int maf_id, dev_id, ver_id; + int dev_id, ver_id; int density; int ret; @@ -2582,8 +2582,7 @@ int onenand_probe(struct mtd_info *mtd) if (ret) return ret; - /* Read manufacturer and device IDs from Register */ - maf_id = this-read_word(this-base + ONENAND_REG_MANUFACTURER_ID); + /* Read device IDs from Register */ dev_id = this-read_word(this-base + ONENAND_REG_DEVICE_ID); ver_id = this-read_word(this-base + ONENAND_REG_VERSION_ID); this-technology = this-read_word(this-base + ONENAND_REG_TECHNOLOGY); This problem has been already resolved by Anatolij: http://patchwork.ozlabs.org/patch/152924/ and ready for u-boot inclusion. -- Best regards, Lukasz Majewski Samsung Poland RD Center Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [ARM] [STATUS] **NO** Increasingly high build failures
Le 19/04/2012 12:04, Albert ARIBAUD a écrit : Hi Wolfgang, Le 19/04/2012 11:51, Wolfgang Denk a écrit : Dear Albert ARIBAUD, In message4f8fbb22.5000...@aribaud.net you wrote: Folks, I just did another round of ./MAKEALL arm with MG/CS 2011.09-69, and the failure rate is rising to say the least, with 277 boards failing out of 278. :( Which version of GCC is this? Recent tests with ELDK 5.2 (which is based on gcc version 4.6.4 20120303) show no such problems. Best regards, Wolfgang Denk Seems there was a misconfiguration in my toolchain and repo -- redoing the mass build with correct settings, will update notice when done After triple-checking the I was using the right commit (my current master) and the right toolchain (gcc version 4.6.1 (Sourcery CodeBench Lite 2011.09-69)), ./MAKEALL arm shows the following: - SUMMARY Boards compiled: 277 Boards with warnings or errors: 28 ( VCMA9 smdk2410 nhk8815 nhk8815_onenand apollon igep0020 igep0030 omap4_panda omap4_sdp4430 omap5_evm s5p_goni smdkc100 s5pc210_universal seaboard ventana balloon3 lubbock palmld palmtc polaris pxa255_idp trizepsiv vpac270_nor_128 vpac270_nor_256 vpac270_ond_256 xaeniax zipitz2 colibri_pxa270 ) -- ... with still 3 build errors, for omap4_panda, omap4_sdp4430 and omap5_evm: 'internal compiler error: in decode_addr_const, at varasm.c:2635', and 57 warnings of which 48 are 'uses variable-size enums yet the output is to use 32-bit enums' and 9 are 'variable [...] set but not used [-Wunused-but-set-variable]' So the only 'issue' is the enums, for which I'll seek a solution. Apologies -- especially to Simon G.* -- for the noise. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] GCC4.6: Squash warnings in onenand_base.c
Hi, On Thu, 19 Apr 2012 13:41:18 +0200 Lukasz Majewski l.majew...@samsung.com wrote: ... This problem has been already resolved by Anatolij: http://patchwork.ozlabs.org/patch/152924/ and ready for u-boot inclusion. Wolfgang's patch is better, it additionally fixes the comment. So it should be applied instead of my patch. Thanks, Anatolij ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] fdt: fix out of tree builds with DT support
Fix: FATAL ERROR: Couldn't open ../arch/arm/dts/tegra20.dtsi: No such file or directory Signed-off-by: Wolfgang Denk w...@denx.de Cc: Simon Glass s...@chromium.org --- dts/Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dts/Makefile b/dts/Makefile index 5792afd..8b13b23 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -36,7 +36,7 @@ $(error Your architecture does not have device tree support enabled. \ Please define CONFIG_ARCH_DEVICE_TREE)) # We preprocess the device tree file provide a useful define -DTS_CPPFLAGS := -DARCH_CPU_DTS=\../arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\ +DTS_CPPFLAGS := -DARCH_CPU_DTS=\$(SRCTREE)/arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\ all: $(obj).depend $(LIB) -- 1.7.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] fdt: avoid bad MAKEALL status
Current versions of dtc always print a message like DTC: dts-dtb on file dt.dtb.tmp which cannot even be suppressed with -qqq. To avoid incorrect MAKEALL status, we manually filter out this message. This is a bit complicated, as we have to make sure to set a correct return code. Also, get rid of the temp file: dtc accepts - for stdin. Signed-off-by: Wolfgang Denk w...@denx.de Cc: Simon Glass s...@chromium.org --- dts/Makefile | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dts/Makefile b/dts/Makefile index 8b13b23..914e479 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -46,9 +46,13 @@ all: $(obj).depend $(LIB) DT_BIN := $(obj)dt.dtb $(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts - cat $ | $(CPP) -P $(DTS_CPPFLAGS) - $@.tmp - $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $@.tmp - rm $@.tmp + rc=$$( \ + cat $ | $(CPP) -P $(DTS_CPPFLAGS) - | \ + { { $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} - 21 ; \ + echo $$? 3 ; } | \ + grep -v '^DTC: dts-dtb on file' ; \ + } 31 ) ; \ + exit $$rc process_lds = \ $(1) | sed -r -n 's/^OUTPUT_$(2)[ (]*([^)]*).*/\1/p' -- 1.7.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] GCC4.6: Squash warnings in onenand_base.c
On Thu, 19 Apr 2012 13:14:17 +0200 Wolfgang Denk w...@denx.de wrote: Fix gcc 4.6 build warnings: onenand_base.c: In function 'onenand_probe': onenand_base.c:2577:6: warning: variable 'maf_id' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk w...@denx.de Cc: Lukasz Majewski l.majew...@samsung.com Cc: Kyungmin Park kyungmin.p...@samsung.com --- drivers/mtd/onenand/onenand_base.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 480ae7a..1d0f196 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c @@ -2574,7 +2574,7 @@ static int onenand_chip_probe(struct mtd_info *mtd) int onenand_probe(struct mtd_info *mtd) { struct onenand_chip *this = mtd-priv; - int maf_id, dev_id, ver_id; + int dev_id, ver_id; int density; int ret; @@ -2582,8 +2582,7 @@ int onenand_probe(struct mtd_info *mtd) if (ret) return ret; - /* Read manufacturer and device IDs from Register */ - maf_id = this-read_word(this-base + ONENAND_REG_MANUFACTURER_ID); + /* Read device IDs from Register */ dev_id = this-read_word(this-base + ONENAND_REG_DEVICE_ID); ver_id = this-read_word(this-base + ONENAND_REG_VERSION_ID); this-technology = this-read_word(this-base + ONENAND_REG_TECHNOLOGY); Tested-by: Lukasz Majewski l.majew...@samsung.com Will this patch be grabbed by Wolfgang directly and applied to -rc3? -- Best regards, Lukasz Majewski Samsung Poland RD Center Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RESEND 1/2] mmc:fix: Set mmc width according to MMC host capabilities
This patch sets the MMC width according to the MMC host capabilities. It turned out, that there are some targets (e.g. GONI), which are able to read data from SPI only at 4 bit mode. This patch restricts the width number according to the MMC host. Signed-off-by: Lukasz Majewski l.majew...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Cc: Andy Fleming aflem...@gmail.com --- drivers/mmc/mmc.c |4 +++- include/mmc.h |3 +++ 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index e70fa9f..618960e 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1199,7 +1199,9 @@ int mmc_startup(struct mmc *mmc) else mmc_set_clock(mmc, 2500); } else { - for (width = EXT_CSD_BUS_WIDTH_8; width = 0; width--) { + width = ((mmc-host_caps MMC_MODE_MASK_WIDTH_BITS) +MMC_MODE_WIDTH_BITS_SHIFT); + for (; width = 0; width--) { /* Set the card to use 4 bit*/ err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_BUS_WIDTH, width); diff --git a/include/mmc.h b/include/mmc.h index f52df70..ee16349 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -47,6 +47,9 @@ #define MMC_MODE_SPI 0x400 #define MMC_MODE_HC0x800 +#define MMC_MODE_MASK_WIDTH_BITS (MMC_MODE_4BIT | MMC_MODE_8BIT) +#define MMC_MODE_WIDTH_BITS_SHIFT 8 + #define SD_DATA_4BIT 0x0004 #define IS_SD(x) (x-version SD_VERSION_SD) -- 1.7.2.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RESEND 2/2] mmc:fix Call mmc_init() when executing mmc_get_dev()
This code adds call to mmc_init(), for partition related commands (e.g. fatls, fatinfo etc.). It is safe to call mmc_init() multiple times since mmc-has_init flag prevents from multiple initialization. The FAT related code calls get_dev high level method and then uses elements from mmc-block_dev, which is uninitialized until the mmc_init (and thereof mmc_startup) is called. This problem appears on boards, which don't use mmc as the default place for envs Signed-off-by: Lukasz Majewski l.majew...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Cc: Andy Fleming aflem...@gmail.com --- drivers/mmc/mmc.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 618960e..84eb4e0 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1305,8 +1305,11 @@ int mmc_register(struct mmc *mmc) block_dev_desc_t *mmc_get_dev(int dev) { struct mmc *mmc = find_mmc_device(dev); + if (!mmc) + return NULL; - return mmc ? mmc-block_dev : NULL; + mmc_init(mmc); + return mmc-block_dev; } #endif -- 1.7.2.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RESEND 0/2] mmc:fix: MMC fixes for generic mmc driver running at GONI
Those two patches have been combined together for easier review. Both fixes corner cases caught on the Samsung's GONI target. Namely: - lack of call to mmc_init with fat handling - Not setting MMC capabilities according to host capabilities Lukasz Majewski (2): mmc:fix: Set mmc width according to MMC host capabilities mmc:fix Call mmc_init() when executing mmc_get_dev() drivers/mmc/mmc.c |9 +++-- include/mmc.h |3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) -- 1.7.2.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] GCC4.6: Squash warnings in onenand_base.c
Dear Lukasz, In message 20120419143837.164bbfed@lmajewski.digital.local you wrote: Tested-by: Lukasz Majewski l.majew...@samsung.com Thanks. Will this patch be grabbed by Wolfgang directly and applied to -rc3? Yes, I will pick it up. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de A wise person makes his own decisions, a weak one obeys public opinion. -- Chinese proverb ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/17] tegra: Add display driver and LCD support for Seaboard
On 15.01.2012 01:47, Simon Glass wrote: This series adds support for the Tegra2x's display peripheral. This supports the LCD display on Seaboard and we use this to enable console output in U-Boot on the LCD. Configuration is via the device tree. Proposed bindings are included in this series. To improve performance two optimisations are offered: 1. The LCD frame buffer is cached, with the cache being flushed after each call puts(). This dramatically increases performance (around 10x). This requires a few additions to the ARM cache support. 2. The console supports scrolling in steps of more than 1 line. This speeds up scrolling output considerably, particularly commands like 'printenv' which display a lot of output. This requires a new CONFIG and a change to the console_scrollup() function. Mayuresh Kulkarni (1): tegra: Enable display/lcd support on Seaboard Simon Glass (15): fdt: Add function to look up a phandle's register address fdt: Add header guard to fdtdec.h fdt: Correct GPIO name access in fdtdec tegra: Add display support to funcmux tegra: fdt: Add LCD definitions for Tegra tegra: Add support for PWFM tegra: Add LCD driver tegra: Add LCD support to Nvidia boards arm: Add control over cachability of memory regions lcd: Add CONFIG_ALIGN_LCD_TO_SECTION to align lcd for MMU lcd: Add support for flushing LCD fb from dcache after update tegra: Align LCD frame buffer to section boundary tegra: Support control of cache settings for LCD tegra: fdt: Add LCD definitions for Seaboard lcd: Add CONSOLE_SCROLL_LINES option to speed console Wei Ni (1): tegra: Add SOC support for display/lcd README | 16 + arch/arm/cpu/armv7/cache_v7.c | 11 + arch/arm/cpu/armv7/tegra2/Makefile |1 + arch/arm/cpu/armv7/tegra2/display.c | 271 +++ arch/arm/cpu/armv7/tegra2/funcmux.c | 39 ++ arch/arm/cpu/armv7/tegra2/pwfm.c| 40 ++ arch/arm/dts/tegra20.dtsi | 25 + arch/arm/include/asm/arch-tegra2/dc.h | 544 +++ arch/arm/include/asm/arch-tegra2/display.h | 133 ++ arch/arm/include/asm/arch-tegra2/pwfm.h | 54 +++ arch/arm/include/asm/system.h | 30 ++ arch/arm/lib/cache-cp15.c | 62 +++- board/nvidia/common/board.c | 21 +- board/nvidia/dts/tegra2-seaboard.dts| 21 + common/cmd_echo.c |3 +- common/lcd.c| 85 +++- doc/device-tree-bindings/video/nvidia-video.txt | 92 drivers/video/Makefile |1 + drivers/video/tegra.c | 388 include/configs/seaboard.h | 12 +- include/configs/tegra2-common.h |1 + include/fdtdec.h| 17 + include/lcd.h | 11 + lib/fdtdec.c| 15 +- 24 files changed, 1862 insertions(+), 31 deletions(-) create mode 100644 arch/arm/cpu/armv7/tegra2/display.c create mode 100644 arch/arm/cpu/armv7/tegra2/pwfm.c create mode 100644 arch/arm/include/asm/arch-tegra2/dc.h create mode 100644 arch/arm/include/asm/arch-tegra2/display.h create mode 100644 arch/arm/include/asm/arch-tegra2/pwfm.h create mode 100644 doc/device-tree-bindings/video/nvidia-video.txt create mode 100644 drivers/video/tegra.c Hi Simon, I have added your patch sources manually into the Prepare v2012.04-rc1 release, because I got errors at apply. Also I added a device tree source file for Harmony. I tested the device tree source file for Harmony and your patch sources on our Harmony hardware and generated a new patch file: http://poeggi.dotsec.net/nvidia/uboot-lvds-init-patch/0001-Add-display-driver-and-LCD-support-for-Harmony-board.patch I hope it's all okay, this my first patch release. In the display.c source file I implemented a bug fix, because I get garbled images on the LCD without this fix. Greetings Christian Changes: - Add device tree source file for Harmony board - Add bug fix in display.c - Patch based on the Prepare v2012.04-rc1 release --- README |7 + arch/arm/cpu/armv7/cache_v7.c | 11 + arch/arm/cpu/armv7/tegra2/Makefile |1 + arch/arm/cpu/armv7/tegra2/display.c | 282 arch/arm/cpu/armv7/tegra2/funcmux.c | 41 ++ arch/arm/cpu/armv7/tegra2/pwfm.c| 45 ++ arch/arm/dts/tegra20.dtsi | 26 ++ arch/arm/include/asm/arch-tegra2/dc.h | 544 +++ arch/arm/include/asm/arch-tegra2/display.h | 133 ++ arch/arm/include/asm/arch-tegra2/pwfm.h |
[U-Boot] Missing ethernet
I'm trying to update U-boot on my board from v2011.06 to v2011.12 It's an OMAP 3530, much like the BeagleBoard, with SMSC911x networking. U-Boot is working fine on this board, but when I boot Linux, it can no longer find the SMSC device. If I boot the same kernel with the older U-Boot, the SMSC device works perfectly. I've looked through the 'bootm' path and I can't see what might have changed that would cause such behaviour. As far as I can tell, everything else is working in Linux with the new U-Boot, just not the SMSC device. Any clues? Thanks -- Gary Thomas | Consulting for the MLB Associates |Embedded world ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [ARM] [STATUS] **NO** Increasingly high build failures
Dear Albert, In message 4f8ffd0e.60...@aribaud.net you wrote: master) and the right toolchain (gcc version 4.6.1 (Sourcery CodeBench Lite 2011.09-69)), ./MAKEALL arm shows the following: Note: you should run out-of-tree builds; this usually catches a bunch of additional problems. - SUMMARY Boards compiled: 277 Boards with warnings or errors: 28 ( VCMA9 smdk2410 nhk8815 nhk8815_onenand apollon igep0020 igep0030 omap4_panda omap4_sdp4430 omap5_evm s5p_goni smdkc100 s5pc210_universal seaboard ventana balloon3 lubbock palmld palmtc polaris pxa255_idp trizepsiv vpac270_nor_128 vpac270_nor_256 vpac270_ond_256 xaeniax zipitz2 colibri_pxa270 ) -- ... with still 3 build errors, for omap4_panda, omap4_sdp4430 and omap5_evm: 'internal compiler error: in decode_addr_const, at varasm.c:2635', and 57 warnings of which 48 are 'uses variable-size enums yet the output is to use 32-bit enums' and 9 are 'variable [...] set but not used [-Wunused-but-set-variable]' So the only 'issue' is the enums, for which I'll seek a solution. ARM (with the 3 patches I just posted) builds cleanly for me, both with ELDK v5.1 (gcc version 4.6.1 20110627) and with ELDK 5.2 (gcc version 4.6.4 20120303): - SUMMARY Boards compiled: 277 -- Guess I will stick with ELDK :-) Note 2: there are a number of boards that trigger removal warnigns: warning: Please migrate to boards.cfg. Failure to do so will mean removal of your board in the next release. Configuring for smdk6400 board... These are _not_ automatically listed under warnings or errors! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Missing ethernet
On 2012-04-19 06:45, Gary Thomas wrote: I'm trying to update U-boot on my board from v2011.06 to v2011.12 It's an OMAP 3530, much like the BeagleBoard, with SMSC911x networking. U-Boot is working fine on this board, but when I boot Linux, it can no longer find the SMSC device. If I boot the same kernel with the older U-Boot, the SMSC device works perfectly. I've looked through the 'bootm' path and I can't see what might have changed that would cause such behaviour. As far as I can tell, everything else is working in Linux with the new U-Boot, just not the SMSC device. Any clues? Thanks Note: I've verified that it's also not working in v2012.04-rc1 -- Gary Thomas | Consulting for the MLB Associates |Embedded world ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Add support s3c2440 NAND controller
arch/arm/include/asm/arch-s3c24x0/s3c2410.h |4 +- arch/arm/include/asm/arch-s3c24x0/s3c2440.h |4 +- arch/arm/include/asm/arch-s3c24x0/s3c24x0.h | 13 +- drivers/mtd/nand/Makefile |3 +- drivers/mtd/nand/s3c2410_nand.c | 189 --- drivers/mtd/nand/s3c24x0_nand.c | 268 +++ 6 files changed, 283 insertions(+), 198 deletions(-) delete mode 100644 drivers/mtd/nand/s3c2410_nand.c create mode 100644 drivers/mtd/nand/s3c24x0_nand.c diff --git a/arch/arm/include/asm/arch-s3c24x0/s3c2410.h b/arch/arm/include/asm/arch-s3c24x0/s3c2410.h index 4fbdf20..71eb33e 100644 --- a/arch/arm/include/asm/arch-s3c24x0/s3c2410.h +++ b/arch/arm/include/asm/arch-s3c24x0/s3c2410.h @@ -99,9 +99,9 @@ static inline struct s3c24x0_lcd *s3c24x0_get_base_lcd(void) return (struct s3c24x0_lcd *)S3C24X0_LCD_BASE; } -static inline struct s3c2410_nand *s3c2410_get_base_nand(void) +static inline struct s3c24x0_nand *s3c24x0_get_base_nand(void) { -return (struct s3c2410_nand *)S3C2410_NAND_BASE; +return (struct s3c24x0_nand *)S3C2410_NAND_BASE; } static inline struct s3c24x0_uart diff --git a/arch/arm/include/asm/arch-s3c24x0/s3c2440.h b/arch/arm/include/asm/arch-s3c24x0/s3c2440.h index 8c606e3..8b9a5b0 100644 --- a/arch/arm/include/asm/arch-s3c24x0/s3c2440.h +++ b/arch/arm/include/asm/arch-s3c24x0/s3c2440.h @@ -97,9 +97,9 @@ static inline struct s3c24x0_lcd *s3c24x0_get_base_lcd(void) return (struct s3c24x0_lcd *)S3C24X0_LCD_BASE; } -static inline struct s3c2440_nand *s3c2440_get_base_nand(void) +static inline struct s3c24x0_nand *s3c24x0_get_base_nand(void) { -return (struct s3c2440_nand *)S3C2440_NAND_BASE; +return (struct s3c24x0_nand *)S3C2440_NAND_BASE; } static inline struct s3c24x0_uart diff --git a/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h b/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h index ca978c9..d82251d 100644 --- a/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h +++ b/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h @@ -151,20 +151,19 @@ struct s3c24x0_lcd { }; + +struct s3c24x0_nand { #ifdef CONFIG_S3C2410 /* NAND FLASH (see S3C2410 manual chapter 6) */ -struct s3c2410_nand { u32nfconf; u32nfcmd; u32nfaddr; u32nfdata; u32nfstat; u32nfecc; -}; #endif #ifdef CONFIG_S3C2440 /* NAND FLASH (see S3C2440 manual chapter 6) */ -struct s3c2440_nand { u32nfconf; u32nfcont; u32nfcmd; @@ -176,8 +175,14 @@ struct s3c2440_nand { u32nfstat; u32nfstat0; u32nfstat1; -}; +u32 nfmecc0; + u32 nfmecc1; + u32 nfsecc; +u32 nfsblk; +u32 nfeblk; #endif +}; + /* UART (see manual chapter 11) */ diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile index 1d1b628..b080cf7 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -58,7 +58,8 @@ COBJS-$(CONFIG_NAND_MXC) += mxc_nand.o COBJS-$(CONFIG_NAND_MXS) += mxs_nand.o COBJS-$(CONFIG_NAND_NDFC) += ndfc.o COBJS-$(CONFIG_NAND_NOMADIK) += nomadik.o -COBJS-$(CONFIG_NAND_S3C2410) += s3c2410_nand.o +COBJS-$(CONFIG_NAND_S3C2410) += s3c24x0_nand.o +COBJS-$(CONFIG_NAND_S3C2440) += s3c24x0_nand.o COBJS-$(CONFIG_NAND_S3C64XX) += s3c64xx.o COBJS-$(CONFIG_NAND_SPEAR) += spr_nand.o COBJS-$(CONFIG_NAND_OMAP_GPMC) += omap_gpmc.o diff --git a/drivers/mtd/nand/s3c2410_nand.c b/drivers/mtd/nand/s3c2410_nand.c deleted file mode 100644 index e1a459b..000 --- a/drivers/mtd/nand/s3c2410_nand.c +++ /dev/null @@ -1,189 +0,0 @@ -/* - * (C) Copyright 2006 OpenMoko, Inc. - * Author: Harald Welte lafo...@openmoko.org - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -#include common.h - -#include nand.h -#include asm/arch/s3c24x0_cpu.h -#include asm/io.h - -#define S3C2410_NFCONF_EN (115) -#define S3C2410_NFCONF_512BYTE (114) -#define S3C2410_NFCONF_4STEP (113) -#define S3C2410_NFCONF_INITECC (112) -#define S3C2410_NFCONF_nFCE(111) -#define S3C2410_NFCONF_TACLS(x)((x)8) -#define S3C2410_NFCONF_TWRPH0(x) ((x)4) -#define S3C2410_NFCONF_TWRPH1(x) ((x)0) - -#define S3C2410_ADDR_NALE 4 -#define S3C2410_ADDR_NCLE 8 - -#ifdef CONFIG_NAND_SPL - -/* in the early stage of NAND flash booting, printf() is not available */
Re: [U-Boot] Missing ethernet
Gary wrote... I'm trying to update U-boot on my board from v2011.06 to v2011.12 It's an OMAP 3530, much like the BeagleBoard, with SMSC911x networking. So not a BeagleBoard then but something different. Is the board you are using one of the boards supported in the mainline U-Boot tree or is it an out-of-tree port? If it is in mainline then have you chosen the correct configuration to use? I've looked through the 'bootm' path and I can't see what might have changed that would cause such behaviour. As far as I can tell, everything else is working in Linux with the new U-Boot, just not the SMSC device. If you try to use TFTP in U-Boot does that work? If not then I would guess there is a configuration issue with the devices that you have enabled in U-Boot rather than it being an issue with the bootm command. Regards, Andy. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] fdt: avoid bad MAKEALL status
Hi Wolfgang, On Thu, Apr 19, 2012 at 5:36 AM, Wolfgang Denk w...@denx.de wrote: Current versions of dtc always print a message like DTC: dts-dtb on file dt.dtb.tmp which cannot even be suppressed with -qqq. To avoid incorrect MAKEALL status, we manually filter out this message. This is a bit complicated, as we have to make sure to set a correct return code. See the discussion on this patch: http://patchwork.ozlabs.org/patch/149833/ A patch to fix this has now been accepted to dtc. So if you update dtc you should find this message goes away. 3cbf829 dtc: Remove spurious output on stderr Also, get rid of the temp file: dtc accepts - for stdin. Signed-off-by: Wolfgang Denk w...@denx.de Cc: Simon Glass s...@chromium.org --- dts/Makefile | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dts/Makefile b/dts/Makefile index 8b13b23..914e479 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -46,9 +46,13 @@ all: $(obj).depend $(LIB) DT_BIN := $(obj)dt.dtb $(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts - cat $ | $(CPP) -P $(DTS_CPPFLAGS) - $@.tmp - $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $@.tmp - rm $@.tmp + rc=$$( \ + cat $ | $(CPP) -P $(DTS_CPPFLAGS) - | \ + { { $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} - 21 ; \ + echo $$? 3 ; } | \ + grep -v '^DTC: dts-dtb on file' ; \ + } 31 ) ; \ + exit $$rc process_lds = \ $(1) | sed -r -n 's/^OUTPUT_$(2)[ (]*([^)]*).*/\1/p' -- 1.7.7.6 Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] fdt: fix out of tree builds with DT support
Hi Wolfgang, On Thu, Apr 19, 2012 at 5:36 AM, Wolfgang Denk w...@denx.de wrote: Fix: FATAL ERROR: Couldn't open ../arch/arm/dts/tegra20.dtsi: No such file or directory With this problem I have been pursuing include paths in dtc, since then we don't need CPP. This feature is now in dtc: de6b762 dtc: Add -i option to support search paths I have a patch to use that feature, so I will send it to the list. Signed-off-by: Wolfgang Denk w...@denx.de Cc: Simon Glass s...@chromium.org --- dts/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dts/Makefile b/dts/Makefile index 5792afd..8b13b23 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -36,7 +36,7 @@ $(error Your architecture does not have device tree support enabled. \ Please define CONFIG_ARCH_DEVICE_TREE)) # We preprocess the device tree file provide a useful define -DTS_CPPFLAGS := -DARCH_CPU_DTS=\../arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\ +DTS_CPPFLAGS := -DARCH_CPU_DTS=\$(SRCTREE)/arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\ all: $(obj).depend $(LIB) -- 1.7.7.6 Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RESEND 2/2] mmc:fix Call mmc_init() when executing mmc_get_dev()
Hi Lukasz, On Thu, Apr 19, 2012 at 8:39 PM, Lukasz Majewski l.majew...@samsung.com wrote: This code adds call to mmc_init(), for partition related commands (e.g. fatls, fatinfo etc.). It is safe to call mmc_init() multiple times since mmc-has_init flag prevents from multiple initialization. The FAT related code calls get_dev high level method and then uses elements from mmc-block_dev, which is uninitialized until the mmc_init (and thereof mmc_startup) is called. This problem appears on boards, which don't use mmc as the default place for envs Signed-off-by: Lukasz Majewski l.majew...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Cc: Andy Fleming aflem...@gmail.com --- drivers/mmc/mmc.c | 5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 618960e..84eb4e0 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1305,8 +1305,11 @@ int mmc_register(struct mmc *mmc) block_dev_desc_t *mmc_get_dev(int dev) { struct mmc *mmc = find_mmc_device(dev); + if (!mmc) + return NULL; - return mmc ? mmc-block_dev : NULL; + mmc_init(mmc); I'm concerning with this adding init here. Since not every platform mount with emmc as boot device, and what they need is booting fast. If you order them to initialize all mmc/sd at mmc register stage, this adding booting time may not be the one they want to see. For FAT command, I think you could abstract a init method, in which mmc could call its mmc_init(). I previously make a patch for this, don't whether it could fit your need: diff --git a/disk/part.c b/disk/part.c index e4e7997..3d00670 100644 --- a/disk/part.c +++ b/disk/part.c @@ -77,7 +77,7 @@ DECLARE_GLOBAL_DATA_PTR; block_dev_desc_t *get_dev(char* ifname, int dev) { const struct block_drvr *drvr = block_drvr; - block_dev_desc_t* (*reloc_get_dev)(int dev); + block_dev_desc_t* (*reloc_get_dev)(int dev), *dev_desc; char *name; name = drvr-name; @@ -91,8 +91,13 @@ block_dev_desc_t *get_dev(char* ifname, int dev) name += gd-reloc_off; reloc_get_dev += gd-reloc_off; #endif - if (strncmp(ifname, name, strlen(name)) == 0) - return reloc_get_dev(dev); + if (strncmp(ifname, name, strlen(name)) == 0) { + dev_desc = reloc_get_dev(dev); + if (dev_desc dev_desc-dev_init(dev_desc-dev)) + dev_desc = NULL; + + return dev_desc; + } drvr++; } return NULL; diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 1622417..c4c48e7 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1150,6 +1150,7 @@ int mmc_send_if_cond(struct mmc *mmc) return 0; } +static int mmc_dev_init(int dev_num); int mmc_register(struct mmc *mmc) { /* Setup the universal parts of the block interface just once */ @@ -1159,6 +1160,7 @@ int mmc_register(struct mmc *mmc) mmc-block_dev.block_read = mmc_bread; mmc-block_dev.block_write = mmc_bwrite; mmc-block_dev.block_erase = mmc_berase; + mmc-block_dev.dev_init = mmc_dev_init; if (!mmc-b_max) mmc-b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT; @@ -1226,6 +1228,15 @@ int mmc_init(struct mmc *mmc) return err; } +static int mmc_dev_init(int dev_num) +{ + struct mmc *mmc = find_mmc_device(dev_num); + if (!mmc) + return -1; + + return mmc_init(mmc); +} + /* * CPU and board-specific MMC initializations. Aliased function * signals caller to move on diff --git a/include/part.h b/include/part.h index 2864adb..dac2bdd 100644 --- a/include/part.h +++ b/include/part.h @@ -41,6 +41,7 @@ typedef struct block_dev_desc { charvendor [40+1]; /* IDE model, SCSI Vendor */ charproduct[20+1]; /* IDE Serial no, SCSI product */ charrevision[8+1]; /* firmware revision */ + int (*dev_init)(int dev); unsigned long (*block_read)(int dev, unsigned long start, lbaint_t blkcnt, Thanks, Lei Thanks, Lei ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RESEND 1/2] mmc:fix: Set mmc width according to MMC host capabilities
On Thu, Apr 19, 2012 at 8:39 PM, Lukasz Majewski l.majew...@samsung.com wrote: This patch sets the MMC width according to the MMC host capabilities. It turned out, that there are some targets (e.g. GONI), which are able to read data from SPI only at 4 bit mode. This patch restricts the width number according to the MMC host. Signed-off-by: Lukasz Majewski l.majew...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Cc: Andy Fleming aflem...@gmail.com --- drivers/mmc/mmc.c | 4 +++- include/mmc.h | 3 +++ 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index e70fa9f..618960e 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1199,7 +1199,9 @@ int mmc_startup(struct mmc *mmc) else mmc_set_clock(mmc, 2500); } else { - for (width = EXT_CSD_BUS_WIDTH_8; width = 0; width--) { + width = ((mmc-host_caps MMC_MODE_MASK_WIDTH_BITS) + MMC_MODE_WIDTH_BITS_SHIFT); + for (; width = 0; width--) { /* Set the card to use 4 bit*/ err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_BUS_WIDTH, width); diff --git a/include/mmc.h b/include/mmc.h index f52df70..ee16349 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -47,6 +47,9 @@ #define MMC_MODE_SPI 0x400 #define MMC_MODE_HC 0x800 +#define MMC_MODE_MASK_WIDTH_BITS (MMC_MODE_4BIT | MMC_MODE_8BIT) +#define MMC_MODE_WIDTH_BITS_SHIFT 8 + #define SD_DATA_4BIT 0x0004 #define IS_SD(x) (x-version SD_VERSION_SD) -- 1.7.2.3 Acked-by: Lei Wen lei...@marvell.com Thanks, Lei ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] fdt: Adjust Makefile to find .dtsi include files
The device tree compiler now has an option to specify the search path for its files. Use this option when compiling in preference to pre-processing the file. Update Tegra here also to prevent build breakage. This requires a recent dtc (commit de6b762 in git://jdl.com/software/dtc.git). Signed-off-by: Simon Glass s...@chromium.org --- board/nvidia/dts/tegra2-seaboard.dts |2 +- dts/Makefile |8 +++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/board/nvidia/dts/tegra2-seaboard.dts b/board/nvidia/dts/tegra2-seaboard.dts index 6ba3ec4..70df567 100644 --- a/board/nvidia/dts/tegra2-seaboard.dts +++ b/board/nvidia/dts/tegra2-seaboard.dts @@ -1,7 +1,7 @@ /dts-v1/; /memreserve/ 0x1c00 0x0400; -/include/ ARCH_CPU_DTS +/include/ tegra20.dtsi / { model = NVIDIA Seaboard; diff --git a/dts/Makefile b/dts/Makefile index 5792afd..e771498 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -35,8 +35,8 @@ $(if $(CONFIG_ARCH_DEVICE_TREE),,\ $(error Your architecture does not have device tree support enabled. \ Please define CONFIG_ARCH_DEVICE_TREE)) -# We preprocess the device tree file provide a useful define -DTS_CPPFLAGS := -DARCH_CPU_DTS=\../arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\ +# Provide a list of include directories for dtc +DTS_FLAGS := -i $(SRCTREE)/arch/$(ARCH)/dts all: $(obj).depend $(LIB) @@ -46,9 +46,7 @@ all: $(obj).depend $(LIB) DT_BIN := $(obj)dt.dtb $(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts - cat $ | $(CPP) -P $(DTS_CPPFLAGS) - $@.tmp - $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $@.tmp - rm $@.tmp + $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $(DTS_FLAGS) $ process_lds = \ $(1) | sed -r -n 's/^OUTPUT_$(2)[ (]*([^)]*).*/\1/p' -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/3 v4] devkit3250: add Timll DevKit3250 board initial support
This patchset adds generic NXP LPC32XX SoC support and basic support for Embest/Timll DevKit3250 board, which powered by this SoC. The patchset is done on top of u-boot/master branch. The general difference of this resent series from the previous ones is that high speed UART driver was added into support. Changes from v3 to v4 * rebase on recent arm-next branch * add get_ticks() function * update boards.cfg context Changes from v2 to v3 * renamed register structures from *_t to *_regs * renamed clkpwr.c file to clk.c * fixed bi_boot_params initialization * applied some cosmetic fixes Changes from v1 to v2: * setbits_le32() and similar helpers are used * added general arch_cpu_init() routine Vladimir Zapolskiy (3): arm926ejs: add NXP LPC32x0 cpu series support serial: add LPC32X0 high-speed UART devices support devkit3250: add Timll DevKit3250 board initial support MAINTAINERS |4 + arch/arm/cpu/arm926ejs/lpc32xx/Makefile | 45 +++ arch/arm/cpu/arm926ejs/lpc32xx/clk.c | 117 + arch/arm/cpu/arm926ejs/lpc32xx/cpu.c | 70 ++ arch/arm/cpu/arm926ejs/lpc32xx/devices.c | 52 arch/arm/cpu/arm926ejs/lpc32xx/timer.c| 95 ++ arch/arm/include/asm/arch-lpc32xx/clk.h | 170 + arch/arm/include/asm/arch-lpc32xx/config.h| 76 +++ arch/arm/include/asm/arch-lpc32xx/cpu.h | 64 + arch/arm/include/asm/arch-lpc32xx/emc.h | 92 + arch/arm/include/asm/arch-lpc32xx/sys_proto.h | 25 arch/arm/include/asm/arch-lpc32xx/timer.h | 74 +++ arch/arm/include/asm/arch-lpc32xx/uart.h | 114 + arch/arm/include/asm/arch-lpc32xx/wdt.h | 51 board/timll/devkit3250/Makefile | 44 +++ board/timll/devkit3250/devkit3250.c | 65 ++ boards.cfg|1 + drivers/serial/Makefile |1 + drivers/serial/lpc32xx_hsuart.c | 112 include/configs/devkit3250.h | 117 + 20 files changed, 1389 insertions(+), 0 deletions(-) create mode 100644 arch/arm/cpu/arm926ejs/lpc32xx/Makefile create mode 100644 arch/arm/cpu/arm926ejs/lpc32xx/clk.c create mode 100644 arch/arm/cpu/arm926ejs/lpc32xx/cpu.c create mode 100644 arch/arm/cpu/arm926ejs/lpc32xx/devices.c create mode 100644 arch/arm/cpu/arm926ejs/lpc32xx/timer.c create mode 100644 arch/arm/include/asm/arch-lpc32xx/clk.h create mode 100644 arch/arm/include/asm/arch-lpc32xx/config.h create mode 100644 arch/arm/include/asm/arch-lpc32xx/cpu.h create mode 100644 arch/arm/include/asm/arch-lpc32xx/emc.h create mode 100644 arch/arm/include/asm/arch-lpc32xx/sys_proto.h create mode 100644 arch/arm/include/asm/arch-lpc32xx/timer.h create mode 100644 arch/arm/include/asm/arch-lpc32xx/uart.h create mode 100644 arch/arm/include/asm/arch-lpc32xx/wdt.h create mode 100644 board/timll/devkit3250/Makefile create mode 100644 board/timll/devkit3250/devkit3250.c create mode 100644 drivers/serial/lpc32xx_hsuart.c create mode 100644 include/configs/devkit3250.h -- 1.7.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3 v3] serial: add LPC32X0 high-speed UART devices support
This change adds an implementation of high-speed UART found on NXP LPC32X0 SoCs. Such UARTs are enumerated as UART1, UART2 and UART7. Signed-off-by: Vladimir Zapolskiy v...@mleia.com Cc: Albert ARIBAUD albert.u.b...@aribaud.net Acked-by: Marek Vasut marek.va...@gmail.com --- Changes from v2 to v3: * renamed struct hsuart_t to hsuart_regs Changes from v1 to v2: * simplified lpc32xx_hsuart_init() a little * put SoC specific changes into patch 1/3 arch/arm/include/asm/arch-lpc32xx/uart.h | 60 drivers/serial/Makefile |1 + drivers/serial/lpc32xx_hsuart.c | 112 ++ 3 files changed, 173 insertions(+), 0 deletions(-) create mode 100644 drivers/serial/lpc32xx_hsuart.c diff --git a/arch/arm/include/asm/arch-lpc32xx/uart.h b/arch/arm/include/asm/arch-lpc32xx/uart.h index b613df8..ec12893 100644 --- a/arch/arm/include/asm/arch-lpc32xx/uart.h +++ b/arch/arm/include/asm/arch-lpc32xx/uart.h @@ -22,6 +22,66 @@ #include asm/types.h +/* 14-clock UART Registers */ +struct hsuart_regs { + union { + u32 rx; /* Receiver FIFO*/ + u32 tx; /* Transmitter FIFO */ + }; + u32 level; /* FIFO Level Register */ + u32 iir;/* Interrupt ID Register*/ + u32 ctrl; /* Control Register */ + u32 rate; /* Rate Control Register*/ +}; + +/* 14-clock UART Receiver FIFO Register bits */ +#define HSUART_RX_BREAK(1 10) +#define HSUART_RX_ERROR(1 9) +#define HSUART_RX_EMPTY(1 8) +#define HSUART_RX_DATA (0xff 0) + +/* 14-clock UART Level Register bits */ +#define HSUART_LEVEL_TX(0xff 8) +#define HSUART_LEVEL_RX(0xff 0) + +/* 14-clock UART Interrupt Identification Register bits */ +#define HSUART_IIR_TX_INT_SET (1 6) +#define HSUART_IIR_RX_OE (1 5) +#define HSUART_IIR_BRK (1 4) +#define HSUART_IIR_FE (1 3) +#define HSUART_IIR_RX_TIMEOUT (1 2) +#define HSUART_IIR_RX_TRIG (1 1) +#define HSUART_IIR_TX (1 0) + +/* 14-clock UART Control Register bits */ +#define HSUART_CTRL_HRTS_INV (1 21) +#define HSUART_CTRL_HRTS_TRIG_48 (0x3 19) +#define HSUART_CTRL_HRTS_TRIG_32 (0x2 19) +#define HSUART_CTRL_HRTS_TRIG_16 (0x1 19) +#define HSUART_CTRL_HRTS_TRIG_8(0x0 19) +#define HSUART_CTRL_HRTS_EN(1 18) +#define HSUART_CTRL_TMO_16 (0x3 16) +#define HSUART_CTRL_TMO_8 (0x2 16) +#define HSUART_CTRL_TMO_4 (0x1 16) +#define HSUART_CTRL_TMO_DISABLED (0x0 16) +#define HSUART_CTRL_HCTS_INV (1 15) +#define HSUART_CTRL_HCTS_EN(1 14) +#define HSUART_CTRL_HSU_OFFSET(n) ((n) 9) +#define HSUART_CTRL_HSU_BREAK (1 8) +#define HSUART_CTRL_HSU_ERR_INT_EN (1 7) +#define HSUART_CTRL_HSU_RX_INT_EN (1 6) +#define HSUART_CTRL_HSU_TX_INT_EN (1 5) +#define HSUART_CTRL_HSU_RX_TRIG_48 (0x5 2) +#define HSUART_CTRL_HSU_RX_TRIG_32 (0x4 2) +#define HSUART_CTRL_HSU_RX_TRIG_16 (0x3 2) +#define HSUART_CTRL_HSU_RX_TRIG_8 (0x2 2) +#define HSUART_CTRL_HSU_RX_TRIG_4 (0x1 2) +#define HSUART_CTRL_HSU_RX_TRIG_1 (0x0 2) +#define HSUART_CTRL_HSU_TX_TRIG_16 (0x3 0) +#define HSUART_CTRL_HSU_TX_TRIG_8 (0x2 0) +#define HSUART_CTRL_HSU_TX_TRIG_4 (0x1 0) +#define HSUART_CTRL_HSU_TX_TRIG_0 (0x0 0) + /* UART Control Registers */ struct uart_ctrl_regs { u32 ctrl; /* Control Register */ diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile index 616b857..65d0f23 100644 --- a/drivers/serial/Makefile +++ b/drivers/serial/Makefile @@ -29,6 +29,7 @@ COBJS-$(CONFIG_ALTERA_UART) += altera_uart.o COBJS-$(CONFIG_ALTERA_JTAG_UART) += altera_jtag_uart.o COBJS-$(CONFIG_ARM_DCC) += arm_dcc.o COBJS-$(CONFIG_ATMEL_USART) += atmel_usart.o +COBJS-$(CONFIG_LPC32XX_HSUART) += lpc32xx_hsuart.o COBJS-$(CONFIG_MCFUART) += mcfuart.o COBJS-$(CONFIG_NS9750_UART) += ns9750_serial.o COBJS-$(CONFIG_OPENCORES_YANU) += opencores_yanu.o diff --git a/drivers/serial/lpc32xx_hsuart.c b/drivers/serial/lpc32xx_hsuart.c new file mode 100644 index 000..8ce3382 --- /dev/null +++ b/drivers/serial/lpc32xx_hsuart.c @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2011 Vladimir Zapolskiy v...@mleia.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the
[U-Boot] [PATCH 1/3 v9] arm926ejs: add NXP LPC32x0 cpu series support
This change adds initial support for NXP LPC32x0 SoC series. Signed-off-by: Vladimir Zapolskiy v...@mleia.com Cc: Albert ARIBAUD albert.u.b...@aribaud.net Acked-by: Marek Vasut marek.va...@gmail.com --- Changes from v8 to v9: * add get_ticks() function Changes from v7 to v8: * renamed register structures from *_t to *_regs * renamed clkpwr.c file to clk.c * fixed several macro definitions * various cosmetic fixes Changes from v6 to v7: * get use of setbits_le32() and friends * add arch_cpu_init() routine Changes from v5 to v6: * replaced some spaces with tabs in macro declarations * more rules separating 14-clock and ns16650 UARTs in config.h Changes from v4 to v5: * corrected address in GPLv2+ licence header in files Changes from v3 to v4: * extended memory controller definitions are introduced * added print_cpuinfo() function Changes from v2 to v3: * checkpatch.pl reports zero errors and warnings Changes from v1 to v2: * BIT(n) and SBF(s, v) macro are not used anymore * removed NS16550 and 14-clock UART definitions from uart.h * added devices.c file, which contains standard UART preinitialization routine * added get_serial_clock() function, it returns actual frequency of UART clock * __udelay() realization is simplified, no need of interrupt handling arch/arm/cpu/arm926ejs/lpc32xx/Makefile | 45 +++ arch/arm/cpu/arm926ejs/lpc32xx/clk.c | 117 + arch/arm/cpu/arm926ejs/lpc32xx/cpu.c | 70 ++ arch/arm/cpu/arm926ejs/lpc32xx/devices.c | 52 arch/arm/cpu/arm926ejs/lpc32xx/timer.c| 95 ++ arch/arm/include/asm/arch-lpc32xx/clk.h | 170 + arch/arm/include/asm/arch-lpc32xx/config.h| 76 +++ arch/arm/include/asm/arch-lpc32xx/cpu.h | 64 + arch/arm/include/asm/arch-lpc32xx/emc.h | 92 + arch/arm/include/asm/arch-lpc32xx/sys_proto.h | 25 arch/arm/include/asm/arch-lpc32xx/timer.h | 74 +++ arch/arm/include/asm/arch-lpc32xx/uart.h | 54 arch/arm/include/asm/arch-lpc32xx/wdt.h | 51 13 files changed, 985 insertions(+), 0 deletions(-) create mode 100644 arch/arm/cpu/arm926ejs/lpc32xx/Makefile create mode 100644 arch/arm/cpu/arm926ejs/lpc32xx/clk.c create mode 100644 arch/arm/cpu/arm926ejs/lpc32xx/cpu.c create mode 100644 arch/arm/cpu/arm926ejs/lpc32xx/devices.c create mode 100644 arch/arm/cpu/arm926ejs/lpc32xx/timer.c create mode 100644 arch/arm/include/asm/arch-lpc32xx/clk.h create mode 100644 arch/arm/include/asm/arch-lpc32xx/config.h create mode 100644 arch/arm/include/asm/arch-lpc32xx/cpu.h create mode 100644 arch/arm/include/asm/arch-lpc32xx/emc.h create mode 100644 arch/arm/include/asm/arch-lpc32xx/sys_proto.h create mode 100644 arch/arm/include/asm/arch-lpc32xx/timer.h create mode 100644 arch/arm/include/asm/arch-lpc32xx/uart.h create mode 100644 arch/arm/include/asm/arch-lpc32xx/wdt.h diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/Makefile b/arch/arm/cpu/arm926ejs/lpc32xx/Makefile new file mode 100644 index 000..ae1f0a5 --- /dev/null +++ b/arch/arm/cpu/arm926ejs/lpc32xx/Makefile @@ -0,0 +1,45 @@ +# +# (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., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(SOC).o + +COBJS = cpu.o clk.o devices.o timer.o + +SRCS:= $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS:= $(addprefix $(obj),$(COBJS) $(SOBJS)) + +all:$(obj).depend $(LIB) + +$(LIB): $(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/clk.c b/arch/arm/cpu/arm926ejs/lpc32xx/clk.c new file mode 100644 index 000..6f26d62 --- /dev/null +++ b/arch/arm/cpu/arm926ejs/lpc32xx/clk.c @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2011 by Vladimir Zapolskiy v...@mleia.com + * + * This program is free software; you can redistribute it and/or + * modify it under the
[U-Boot] [PATCH 3/3 v6] devkit3250: add Timll DevKit3250 board initial support
This change adds a basic support for Embest/Timll DevKit3250 board, NOR and UART are the only supported peripherals for a moment. The board doesn't require low-level init, because the initial SDRAM and GPIO configuration is performed during kickstart bootloader execution. Signed-off-by: Vladimir Zapolskiy v...@mleia.com Cc: Albert ARIBAUD albert.u.b...@aribaud.net Acked-by: Marek Vasut marek.va...@gmail.com --- Changes from v5 to v6: * update boards.cfg context Changes from v4 to v5: * fixed bi_boot_params initialization * cosmetic changes in board configuration Changes from v3 to v4: * removed dcache flushing from board_init() * tabs instead of spaces in board config file Changes from v2 to v3: * updated a relocation address * combined a record in maintainers file into the patch * use high speed UART2 by default Changes from v1 to v2: * corrected address in GPLv2+ licence header in files * removed clean and distclean targets from board makefile * do not set machine id explicitly, if CONFIG_MACH_TYPE is defined * minor indentation cleanups MAINTAINERS |4 + board/timll/devkit3250/Makefile | 44 + board/timll/devkit3250/devkit3250.c | 65 +++ boards.cfg |1 + include/configs/devkit3250.h| 117 +++ 5 files changed, 231 insertions(+), 0 deletions(-) create mode 100644 board/timll/devkit3250/Makefile create mode 100644 board/timll/devkit3250/devkit3250.c create mode 100644 include/configs/devkit3250.h diff --git a/MAINTAINERS b/MAINTAINERS index 708ded7..35d0a9a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -932,6 +932,10 @@ Sughosh Ganu urwithsugh...@gmail.com hawkboard ARM926EJS (OMAP-L138) +Vladimir Zapolskiy v...@mleia.com + + devkit3250 lpc32xx + - Unknown / orphaned boards: diff --git a/board/timll/devkit3250/Makefile b/board/timll/devkit3250/Makefile new file mode 100644 index 000..ea7827c --- /dev/null +++ b/board/timll/devkit3250/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2011 by Vladimir Zapolskiy v...@mleia.com +# Copyright (C) 2008, Guennadi Liakhovetski l...@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., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +COBJS := devkit3250.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/timll/devkit3250/devkit3250.c b/board/timll/devkit3250/devkit3250.c new file mode 100644 index 000..6b0ec80 --- /dev/null +++ b/board/timll/devkit3250/devkit3250.c @@ -0,0 +1,65 @@ +/* + * Embest/Timll DevKit3250 board support + * + * Copyright (C) 2011 Vladimir Zapolskiy v...@mleia.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include common.h +#include asm/arch/sys_proto.h +#include asm/arch/cpu.h +#include asm/arch/emc.h + +DECLARE_GLOBAL_DATA_PTR; + +static struct emc_regs *emc = (struct emc_regs *)EMC_BASE; + +int board_early_init_f(void) +{ + lpc32xx_uart_init(CONFIG_SYS_LPC32XX_UART); + + return 0; +} + +int
Re: [U-Boot] Missing ethernet
On 2012-04-19 07:53, Andy Pont wrote: Gary wrote... I'm trying to update U-boot on my board from v2011.06 to v2011.12 It's an OMAP 3530, much like the BeagleBoard, with SMSC911x networking. So not a BeagleBoard then but something different. Is the board you are using one of the boards supported in the mainline U-Boot tree or is it an out-of-tree port? If it is in mainline then have you chosen the correct configuration to use? It's my own board, not in the mainline. I've looked through the 'bootm' path and I can't see what might have changed that would cause such behaviour. As far as I can tell, everything else is working in Linux with the new U-Boot, just not the SMSC device. If you try to use TFTP in U-Boot does that work? If not then I would guess there is a configuration issue with the devices that you have enabled in U-Boot rather than it being an issue with the bootm command. As I said, U-Boot works fine. The problem comes when Linux boots. I've bisected it down to this change: commit 81bdc155c72ef9e093b388b90c58d8134d870976 Author: Sanjeev Premi pr...@ti.com Date: Thu Sep 8 10:47:25 2011 -0400 omap: gpio: Use generic API That let me figure out the problem - I had to modify my board code for the new GPIO functions and somehow that's where the problem is. Still working out the details, but now I know where to look. Thanks for the help -- Gary Thomas | Consulting for the MLB Associates |Embedded world ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] i2c driver for arm926ejs - at91sam9m10g45
I'm interested in the i2c driver for the arm926ejs cpu and at91sam9m10g45 board. I'm dealing with the issue that when enabling CONFIG_SOFT_I2C it needs proper definitions for I2C_INIT, I2C_SDA, I2C_READ, etc. and when enabling CONFIG_HARD_I2C the build fails with undefined references: i2c_init, i2c_read, i2c_write, i2c_probe. Can someone please point me in the right direction? Thanks. Wilson ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V4 4/8] imx: nand: Support flash based BBT
On 04/19/2012 03:55 AM, Timo Ketola wrote: Signed-off-by: Timo Ketola t...@exertus.fi --- Changes in v4: - Removed blank lines inside #ifdef - Manipulate 'this-options' with '|=' instead of '=' Changes in v3: - Changed the subject - Changed the BBT pattern offsets (patch 4); They are now zero as in Linux Changes in v2: - Dropped patches 2, 3 and 6 so this one changed from 7 to 4 - Rebased to u-boot-imx next drivers/mtd/nand/mxc_nand.c | 33 + 1 files changed, 33 insertions(+), 0 deletions(-) Acked-by: Scott Wood scottw...@freescale.com -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V4 1/8] i.MX25: esdhc: Add mxc_get_clock infrastructure
On 19/04/2012 10:55, Timo Ketola wrote: Defining CONFIG_FSL_ESDHC brings in a call to get_clocks, so let's implement get_clocks function. This is how it seems to be implemented elsewhere. Signed-off-by: Timo Ketola t...@exertus.fi --- Changes in v4: - Rewrapped commit message Changes in v2: - Rebased to u-boot-imx next arch/arm/cpu/arm926ejs/mx25/generic.c | 27 +++ arch/arm/include/asm/arch-mx25/clock.h | 23 +++ 2 files changed, 50 insertions(+), 0 deletions(-) Acked-by: Stefano Babic sba...@denx.de Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-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 V4 3/8] imx: fec: Resolve speed before configuring gasket
On 19/04/2012 10:55, Timo Ketola wrote: Gasket needs a different configuration for 10BaseT than for higher speeds. Signed-off-by: Timo Ketola t...@exertus.fi --- Acked-by: Stefano Babic sba...@denx.de Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-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 V4 5/8] i.MX25: usb: Set PORTSCx register
On 19/04/2012 10:55, Timo Ketola wrote: The USB controller in i.MX25 has a PORTSCx registers which should be set. In this regard it is similar to the controller in i.MX31. As this file is compiled only with i.MX25 and -31, #ifdef check can be removed. Signed-off-by: Timo Ketola t...@exertus.fi --- Acked-by: Stefano Babic sba...@denx.de Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-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 V4 6/8] imx: usb: There is no such register
On 19/04/2012 10:55, Timo Ketola wrote: The reference manual of i.MX25 (nor i.MX31) does not define such register. This seems to access read only UH2_CAPLENGTH register (if CONFIG_MXC_USB_PORT is zero). Signed-off-by: Timo Ketola t...@exertus.fi --- Changes in v4: - Rewrapped commit message Changes in v2: - New patch in this series drivers/usb/host/ehci-mxc.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c index 7384580..45cbd18 100644 --- a/drivers/usb/host/ehci-mxc.c +++ b/drivers/usb/host/ehci-mxc.c @@ -125,8 +125,6 @@ int ehci_hcd_init(void) hcor = (struct ehci_hcor *)((uint32_t) hccr + HC_LENGTH(ehci_readl(hccr-cr_capbase))); setbits_le32(ehci-usbmode, CM_HOST); - setbits_le32(ehci-control, USB_EN); - __raw_writel(CONFIG_MXC_USB_PORTSC, ehci-portsc); mxc_set_usbcontrol(CONFIG_MXC_USB_PORT, CONFIG_MXC_USB_FLAGS); Acked-by: Stefano Babic sba...@denx.de Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-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 V4 7/8] i.MX2: Include asm/types.h in arch-mx25/imx-regs.h
On 19/04/2012 10:55, Timo Ketola wrote: types.h must be included in imx-regs.h if one wants to include imx-regs.h in a board configuration file. That for one's part is necessary, if one wants to use addresses defined in imx-regs.h. For example, fsl_esdhc.c needs CONFIG_SYS_FSL_ESDHC_ADDR defined and a proper thing is to define it with IMX_MMC_SDHCx_BASE in board configuration file. This patch fixes the build in that case. Signed-off-by: Timo Ketola t...@exertus.fi --- Changes in v4: - Proper fix was found so this patch changes altogether - subject, message and touched file Changes in v2: - New patch in this series arch/arm/include/asm/arch-mx25/imx-regs.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/arch-mx25/imx-regs.h b/arch/arm/include/asm/arch-mx25/imx-regs.h index 7f9449b..cf925d7 100644 --- a/arch/arm/include/asm/arch-mx25/imx-regs.h +++ b/arch/arm/include/asm/arch-mx25/imx-regs.h @@ -34,6 +34,9 @@ #define _IMX_REGS_H #ifndef __ASSEMBLY__ + +#include asm/types.h + #ifdef CONFIG_FEC_MXC extern void mx25_fec_init_pins(void); #endif Acked-by: Stefano Babic sba...@denx.de Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-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 V4 2/8] i.MX25: This architecture has a GPIO4 too
On 19/04/2012 10:55, Timo Ketola wrote: Signed-off-by: Timo Ketola t...@exertus.fi --- Changes in v2: - Dropped patches 2 and 3 so this one changed from 4 to 2 - Rebased to u-boot-imx next - Fixed too long line drivers/gpio/mxc_gpio.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c index df6..3e94ac3 100644 --- a/drivers/gpio/mxc_gpio.c +++ b/drivers/gpio/mxc_gpio.c @@ -40,7 +40,8 @@ static unsigned long gpio_ports[] = { [0] = GPIO1_BASE_ADDR, [1] = GPIO2_BASE_ADDR, [2] = GPIO3_BASE_ADDR, -#if defined(CONFIG_MX51) || defined(CONFIG_MX53) || defined(CONFIG_MX6Q) +#if defined(CONFIG_MX25) || defined(CONFIG_MX51) || defined(CONFIG_MX53) || \ + defined(CONFIG_MX6Q) [3] = GPIO4_BASE_ADDR, #endif #if defined(CONFIG_MX53) || defined(CONFIG_MX6Q) Acked-by: Stefano Babic sba...@denx.de Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-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 V4 8/8] imx: Add u-boot.imx as target for ARM9 i.MX SOCs
On 19/04/2012 10:55, Timo Ketola wrote: Signed-off-by: Timo Ketola t...@exertus.fi --- Changes in v3: - Dropped old patch number 8 imx: nand: Don't invent new... so this one changed from 9 to 8 Changes in v2: - New patch in this series - Add .imx target in the spirit of commit 303838 arch/arm/cpu/arm926ejs/config.mk |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/config.mk b/arch/arm/cpu/arm926ejs/config.mk index ffb2e6c..6a3a1bb 100644 --- a/arch/arm/cpu/arm926ejs/config.mk +++ b/arch/arm/cpu/arm926ejs/config.mk @@ -31,3 +31,9 @@ PLATFORM_CPPFLAGS += -march=armv5te # = PF_RELFLAGS_SLB_AT := $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT) + +ifneq ($(CONFIG_IMX_CONFIG),) + +ALL-y+= $(obj)u-boot.imx + +endif Acked-by: Stefano Babic sba...@denx.de Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-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] U-Boot Digest, Vol 47, Issue 24
-- Message: 54 Date: Thu, 19 Apr 2012 09:13:38 +0200 From: Albert ARIBAUD albert.u.b...@aribaud.net Subject: [U-Boot] [ARM] [STATUS] Increasingly high build failures To: U-Boot@lists.denx.de U-Boot@lists.denx.de Cc: Simon Guinot simon.gui...@sequanux.org Message-ID: 4f8fbb22.5000...@aribaud.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Folks, I just did another round of ./MAKEALL arm with MG/CS 2011.09-69, and the failure rate is rising to say the least, with 277 boards failing out of 278. :( Basically, the issues are, in order of impact: - Now 264 'uses variable-size enums yet the output is to use 32-bit enums' errors. That's a raise! Probably caused by some commonly included .h, but as the issue is at link stage and only refers to library intrinsics, tracing the culprit may take time. However, I cannot keep on ignoring this warning now, and thus I will look for a general solution, probably along the lines of enabling variable-size enums throughout the U-Boot codebase at least for toolchains that complain about it. - 6 warnings are 'ap20.c:44:18: warning: array subscript is above array bounds'. Last changed was in commit 03c609f6. Simon Glass, as you are listed as author of the commit, please have a look. Albert, Looks like you CC'd Simon Guinot instead of Simon Glass. I've CC'd the correct Simon. ;) This change (ap20.c) went in a _long_ time ago, and hasn't produced any warnings until now? As Wolfgang said, what toolset are you using? I tried TOT U-Boot master with gcc 4.4.1, 4.2.2 (ELDK4.2), and 4.6.1, and don't see any warnings at all for ap20.c in any build (Seaboard, Harmony, etc.). Tom - netspace_v2 board causing the only error case: Undefined or unsupported LaCie KW board variant. Simon Guinot, as you are listed as the board maintainer, can you have a look? This pretty much covers the immediate actions, but extrapolating from the situation, I would advise any and all contributors whose first name is Simon and last name initial is G to watch out for issues. :) Amicalement, -- Albert. -- nvpublic ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] U-Boot Digest, Vol 47, Issue 24
Le 19/04/2012 18:59, Tom Warren a écrit : Albert, Looks like you CC'd Simon Guinot instead of Simon Glass. I've CC'd the correct Simon. ;) I actually intended to Cc: both, as I though eache one had something to do. :) This change (ap20.c) went in a _long_ time ago, and hasn't produced any warnings until now? As I said in the followup discussion with Wolfgang, I had a double issue, with the commit I was using and with the toolchain. The only real issue is the enums one, and I am looking into it. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/3 v4] devkit3250: add Timll DevKit3250 board initial support
Hi Vladimir, Le 19/04/2012 16:33, Vladimir Zapolskiy a écrit : This patchset adds generic NXP LPC32XX SoC support and basic support for Embest/Timll DevKit3250 board, which powered by this SoC. The patchset is done on top of u-boot/master branch. The general difference of this resent series from the previous ones is that high speed UART driver was added into support. Applied to u-boot-arm/next, thanks -- and apologies for delaying so much. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [ARM] [STATUS] Increasingly high build failures
Hi Albert, On Thu, Apr 19, 2012 at 12:13 AM, Albert ARIBAUD albert.u.b...@aribaud.net wrote: Folks, I just did another round of ./MAKEALL arm with MG/CS 2011.09-69, and the failure rate is rising to say the least, with 277 boards failing out of 278. :( Basically, the issues are, in order of impact: - Now 264 'uses variable-size enums yet the output is to use 32-bit enums' errors. That's a raise! Probably caused by some commonly included .h, but as the issue is at link stage and only refers to library intrinsics, tracing the culprit may take time. However, I cannot keep on ignoring this warning now, and thus I will look for a general solution, probably along the lines of enabling variable-size enums throughout the U-Boot codebase at least for toolchains that complain about it. - 6 warnings are 'ap20.c:44:18: warning: array subscript is above array bounds'. Last changed was in commit 03c609f6. Simon Glass, as you are listed as author of the commit, please have a look. I don't get this warning, but this is indeed a latent bug. It currently has no effect since no one is using CLOCK_ID_EPCI, CLOCK_ID_SFROM32KHZ. I will submit a patch, which should be fairly safe to commit even at this late stage. - netspace_v2 board causing the only error case: Undefined or unsupported LaCie KW board variant. Simon Guinot, as you are listed as the board maintainer, can you have a look? This pretty much covers the immediate actions, but extrapolating from the situation, I would advise any and all contributors whose first name is Simon and last name initial is G to watch out for issues. :) Amicalement, -- Albert. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/3 v4] devkit3250: add Timll DevKit3250 board initial support
Hi, On 19.04.2012 20:17, Albert ARIBAUD wrote: Hi Vladimir, Le 19/04/2012 16:33, Vladimir Zapolskiy a écrit : This patchset adds generic NXP LPC32XX SoC support and basic support for Embest/Timll DevKit3250 board, which powered by this SoC. The patchset is done on top of u-boot/master branch. The general difference of this resent series from the previous ones is that high speed UART driver was added into support. Applied to u-boot-arm/next, thanks -- and apologies for delaying so much. no problem, thank you a lot. -- With best wishes, Vladimir ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] mkconfig: add support for SPL CPU
Add support for specifying a differnt CPU for main u-boot and SPL u-boot builds. This is done by adding an optional SPL CPU after the main CPU in boards.cfg as follows: normal_cpu:spl_cpu This this case CPU will be set to normal_cpu during the main u-boot build and spl_cpu during the SPL build. Signed-off-by: Allen Martin amar...@nvidia.com --- This is part of my patch series to move all armv4t code out of tegra u-boot to an SPL. I haven't heard any suggestions on how to resolve having a different CPU for the SPL build, so this is my suggestion as a possible solution. boards.cfg |5 + doc/README.SPL | 12 mkconfig | 15 ++- 3 files changed, 31 insertions(+), 1 deletions(-) diff --git a/boards.cfg b/boards.cfg index 3cf75c3..a58cd02 100644 --- a/boards.cfg +++ b/boards.cfg @@ -11,6 +11,11 @@ # Lines starting with '#' are comments. # Blank lines are ignored. # +# The CPU field takes the form: +# cpu[:spl_cpu] +# If spl_cpu is specified the make variable CPU will be set to this +# during the SPL build. +# # The options field takes the form: # board config name[:comma separated config options] # Each config option has the form (value defaults to 1): diff --git a/doc/README.SPL b/doc/README.SPL index 0276953..e4a5ac3 100644 --- a/doc/README.SPL +++ b/doc/README.SPL @@ -66,3 +66,15 @@ CONFIG_SPL_DMA_SUPPORT (drivers/dma/libdma.o) CONFIG_SPL_POST_MEM_SUPPORT (post/drivers/memory.o) CONFIG_SPL_NAND_LOAD (drivers/mtd/nand/nand_spl_load.o) CONFIG_SPL_SPI_LOAD (drivers/mtd/spi/spi_spl_load.o) + + +Normally CPU is assumed to be the same between the SPL and normal +u-boot build. However it is possible to specify a different CPU for +the SPL build for cases where the SPL is expected to run on a +different CPU model from the main u-boot. This is done by specifying +an SPL CPU in boards.cfg as follows: + + normal_cpu:spl_cpu + +This this case CPU will be set to normal_cpu during the main u-boot +build and spl_cpu during the SPL build. diff --git a/mkconfig b/mkconfig index 438530b..82660a6 100755 --- a/mkconfig +++ b/mkconfig @@ -60,6 +60,11 @@ CONFIG_NAME=${1%_config} arch=$2 cpu=$3 +tmp=${cpu#*:} +if [ $tmp != $cpu ] ; then + spl_cpu=$tmp + cpu=${cpu%:*} +fi if [ $4 = - ] ; then board=${BOARD_NAME} else @@ -131,7 +136,15 @@ fi # Create include file for Make # echo ARCH = ${arch}config.mk -echo CPU= ${cpu}config.mk +if [ ! -z $spl_cpu ] ; then + echo 'ifeq ($(CONFIG_SPL_BUILD),y)' config.mk + echo CPU= ${spl_cpu} config.mk + echo else config.mk + echo CPU= ${cpu}config.mk + echo endif config.mk +else + echo CPU= ${cpu}config.mk +fi echo BOARD = ${board} config.mk [ ${vendor} ] echo VENDOR = ${vendor} config.mk -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] tegra: Correct PLL access in ap20.c and clock.c
Correct this warning seen by Albert: ap20.c:44:18: warning: array subscript is above array bounds There is a subtle bug here which currently causes no errors, but might in future if people use PCI or the 32KHz clock. So take the opportunity to correct the logic now. Signed-off-by: Simon Glass s...@chromium.org --- arch/arm/cpu/armv7/tegra2/ap20.c |6 -- arch/arm/cpu/armv7/tegra2/clock.c|2 +- arch/arm/include/asm/arch-tegra2/clock.h |5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/arch/arm/cpu/armv7/tegra2/ap20.c b/arch/arm/cpu/armv7/tegra2/ap20.c index b749821..5eca53b 100644 --- a/arch/arm/cpu/armv7/tegra2/ap20.c +++ b/arch/arm/cpu/armv7/tegra2/ap20.c @@ -40,8 +40,10 @@ static int ap20_cpu_is_cortexa9(void) void init_pllx(void) { - struct clk_rst_ctlr *clkrst = (struct clk_rst_ctlr *)NV_PA_CLK_RST_BASE; - struct clk_pll *pll = clkrst-crc_pll[CLOCK_ID_XCPU]; + struct clk_rst_ctlr *clkrst = + (struct clk_rst_ctlr *)NV_PA_CLK_RST_BASE; + struct clk_pll_simple *pll = + clkrst-crc_pll_simple[CLOCK_ID_XCPU - CLOCK_ID_FIRST_SIMPLE]; u32 reg; /* If PLLX is already enabled, just return */ diff --git a/arch/arm/cpu/armv7/tegra2/clock.c b/arch/arm/cpu/armv7/tegra2/clock.c index 39376ab..d73a53f 100644 --- a/arch/arm/cpu/armv7/tegra2/clock.c +++ b/arch/arm/cpu/armv7/tegra2/clock.c @@ -416,7 +416,7 @@ static struct clk_pll *get_pll(enum clock_id clkid) struct clk_rst_ctlr *clkrst = (struct clk_rst_ctlr *)NV_PA_CLK_RST_BASE; - assert(clock_id_isvalid(clkid)); + assert(clock_id_is_pll(clkid)); return clkrst-crc_pll[clkid]; } diff --git a/arch/arm/include/asm/arch-tegra2/clock.h b/arch/arm/include/asm/arch-tegra2/clock.h index 6b12c76..d29b0ba 100644 --- a/arch/arm/include/asm/arch-tegra2/clock.h +++ b/arch/arm/include/asm/arch-tegra2/clock.h @@ -186,8 +186,9 @@ enum periph_id { /* Mask value for a clock (within PERIPH_REG(id)) */ #define PERIPH_MASK(id) (1 ((id) 0x1f)) -/* return 1 if a PLL ID is in range */ -#define clock_id_isvalid(id) ((id) = CLOCK_ID_FIRST (id) CLOCK_ID_COUNT) +/* return 1 if a PLL ID is in range, and not a simple PLL */ +#define clock_id_is_pll(id) ((id) = CLOCK_ID_FIRST \ + (id) CLOCK_ID_FIRST_SIMPLE) /* PLL stabilization delay in usec */ #define CLOCK_PLL_STABLE_DELAY_US 300 -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [STATUS] v2012.04-rc2 and -rc3 are out
Hi Wolfgang, On Wed, Apr 18, 2012 at 2:10 PM, Wolfgang Denk w...@denx.de wrote: Hi everybody, sorry, I forgot to announce the 2012.04-rc2 pre-release two days ago, so I will atleast announce that we have v2012.04-rc3 now. Please help testing, so we can fix the remaining issues before the release, which I still want to push out April 21, 2012. Thanks to all who helped. Please make sure that all your important bug fixes have been included! This fixes a sandbox problem where we use the wrong parser if someone removes the CONFIG_SYS_HUSH_PARSER option: http://patchwork.ozlabs.org/patch/149810/ These are the run_command_list patches you said you considered to be a bug fix (given that we are on rc3 I prefer that they go in next instead, but it is up to you): http://patchwork.ozlabs.org/patch/149809/ http://patchwork.ozlabs.org/patch/149812/ Here are some tests for run_command_list(): http://patchwork.ozlabs.org/patch/149811/ Patman should have been in this merge window I think: http://patchwork.ozlabs.org/patch/136136/ That's it from me. I will also start a next branch now, so if you have anything pending there, please feel free to send pull requests for next ! Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de There is a time in the tides of men, Which, taken at its flood, leads on to success. On the other hand, don't count on it. - T. K. Lawson ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] fdt: avoid bad MAKEALL status
Dear Simon, In message CAPnjgZ1=Q0=T_vZDZD47h3J65FHitO+0giUkX7pUrECYp=b...@mail.gmail.com you wrote: A patch to fix this has now been accepted to dtc. So if you update dtc you should find this message goes away. 3cbf829 dtc: Remove spurious output on stderr There are many systems out there in the field which are subject to a rigid policy, and only distribution provided packages get provided. Many of the interesting distributions don't have this fix yet; for example, Fedora 16 (dtc-1.3.0-2.fc16.x86_64) or Debian Wheezy (device-tree-compiler 1.3.0-2) bundle DTC version 1.3.0, which is not fixed yet. For the sake of those people I would like to apply this patch. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de The number you have dialed is imaginary. Please divide by 0 and try again. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tegra2: move tegra2 SoC code to arch/arm/cpu/tegra2-common
+Albert Hi Allen, On Wed, Apr 18, 2012 at 3:46 PM, Allen Martin amar...@nvidia.com wrote: In preparation for splitting out the armv4t code from tegra2, move the tegra2 SoC code to arch/arm/cpu/tegra2-common. This code will be compiled armv4t for the arm7tdmi and armv7 for the cortex A9. Signed-off-by: Allen Martin amar...@nvidia.com --- Resending this with git format-patch -M to make it more readable and removing cover letter This is part of an upcoming patch set to move all armv4t code out of tegra2 u-boot and put it into an SPL, but I wanted to get some early feedback on this patch. This moves most of the tegra2 SoC code from arch/arm/cpu/armv7 to a new directory arch/arm/cpu/tegra2-common. This code will be shared between the armv7 and armv4t builds of tegra2. I am not sure whether moving things up a level is OK. It makes some sense to me but is different from what other boards do. Secondly, you will at some point add Tegra 3 support I suppose. In that case much of this code will become common anyway. Should you do that split (tegra-common, tegra2-common) now or later? Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] fdt: fix out of tree builds with DT support
Dear Simon, In message CAPnjgZ2eTmxeeFunjY=3tdwhjb9vjexj7ewcim5lqeu+o35...@mail.gmail.com you wrote: With this problem I have been pursuing include paths in dtc, since then we don't need CPP. This feature is now in dtc: de6b762 dtc: Add -i option to support search paths I have a patch to use that feature, so I will send it to the list. Again, I would like to apply this patch, to fix this problem for the DTV versions that are currently in use in all the major distributions. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Nobody will ever need more than 640k RAM! -- Bill Gates, 1981 Windows 95 needs at least 8 MB RAM. -- Bill Gates, 1996 Nobody will ever need Windows 95. -- logical conclusion ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] fdt: Adjust Makefile to find .dtsi include files
Dear Simon Glass, In message 1334845777-30913-1-git-send-email-...@chromium.org you wrote: The device tree compiler now has an option to specify the search path for its files. Use this option when compiling in preference to pre-processing the file. Update Tegra here also to prevent build breakage. This requires a recent dtc (commit de6b762 in git://jdl.com/software/dtc.git). Signed-off-by: Simon Glass s...@chromium.org --- board/nvidia/dts/tegra2-seaboard.dts |2 +- dts/Makefile |8 +++- 2 files changed, 4 insertions(+), 6 deletions(-) NAK. THis breaks building on all systems that use the distribution-provided DTC with this error: dtc: invalid option -- 'i' Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de What if is a trademark of Hewlett Packard, so stop using it in your sentences without permission, or risk being sued. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] fdt: fix out of tree builds with DT support
Hi Wolfgang, On Thu, Apr 19, 2012 at 11:27 AM, Wolfgang Denk w...@denx.de wrote: Dear Simon, In message CAPnjgZ2eTmxeeFunjY=3tdwhjb9vjexj7ewcim5lqeu+o35...@mail.gmail.com you wrote: With this problem I have been pursuing include paths in dtc, since then we don't need CPP. This feature is now in dtc: de6b762 dtc: Add -i option to support search paths I have a patch to use that feature, so I will send it to the list. Again, I would like to apply this patch, to fix this problem for the DTV versions that are currently in use in all the major distributions. Fair enough. I hope that doesn't preclude us from using new features for too long. Acked-by: Simon Glass s...@chromium.org Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Nobody will ever need more than 640k RAM! -- Bill Gates, 1981 Windows 95 needs at least 8 MB RAM. -- Bill Gates, 1996 Nobody will ever need Windows 95. -- logical conclusion Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] fdt: avoid bad MAKEALL status
On Thu, Apr 19, 2012 at 11:26 AM, Wolfgang Denk w...@denx.de wrote: Dear Simon, In message CAPnjgZ1=Q0=T_vZDZD47h3J65FHitO+0giUkX7pUrECYp=b...@mail.gmail.com you wrote: A patch to fix this has now been accepted to dtc. So if you update dtc you should find this message goes away. 3cbf829 dtc: Remove spurious output on stderr There are many systems out there in the field which are subject to a rigid policy, and only distribution provided packages get provided. Many of the interesting distributions don't have this fix yet; for example, Fedora 16 (dtc-1.3.0-2.fc16.x86_64) or Debian Wheezy (device-tree-compiler 1.3.0-2) bundle DTC version 1.3.0, which is not fixed yet. For the sake of those people I would like to apply this patch. Acked-by: Simon Glass s...@chromium.org Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de The number you have dialed is imaginary. Please divide by 0 and try again. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] fdt: fix out of tree builds with DT support
Dear Simon Glass, In message capnjgz2-kzlw2-wdbk2qmezurjbpzt1vahnxrf7rhz_xfw6...@mail.gmail.com you wrote: Fair enough. I hope that doesn't preclude us from using new features for too long. Thanks. Most distributions appear to pick up such changes not too fast, so we may run into issues here and there. I think we should decide this on a case by case base - here it was a trivial change to the existing code that fixed the problem. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de What the gods would destroy they first submit to an IEEE standards committee. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tegra2: move tegra2 SoC code to arch/arm/cpu/tegra2-common
On Thu, Apr 19, 2012 at 11:27:05AM -0700, Simon Glass wrote: This is part of an upcoming patch set to move all armv4t code out of tegra2 u-boot and put it into an SPL, but I wanted to get some early feedback on this patch. This moves most of the tegra2 SoC code from arch/arm/cpu/armv7 to a new directory arch/arm/cpu/tegra2-common. This code will be shared between the armv7 and armv4t builds of tegra2. I am not sure whether moving things up a level is OK. It makes some sense to me but is different from what other boards do. Agreed I couldn't find any other examples, but AFAIK no other board is trying to do what we do (sharing code between 2 different CPU models). The other options I contemplated were: -Have the armv4t build reach up and over into armv7 -Move the code out to board/nvidia Both of these seemed worse Secondly, you will at some point add Tegra 3 support I suppose. In that case much of this code will become common anyway. Should you do that split (tegra-common, tegra2-common) now or later? I'd like to keep the tegra3 changes separate since that will involve refactoring of much of this code. For the SPL build it's mostly hidden in the config and Makefiles. I thought about doing exactly what you said to reduce the amount of code I needed to pull into the SPL build, but what I found was that because the SPL needs to initialize some regulators, clocks, and pinmux to bring up the A9 and UART it ends up needing much of the tegra2 SoC code, so there's not a lot of opportunity to minize the code set for the SPL build beyond the CONFIG options to disable drivers that area already there. -Allen nvpublic ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
--- Changes for v2: - Coding style cleanup - Remove unnecessary files modification - Remove unnecessary board configuration set Changes for v3: - Coding style cleanup - Move some macro definition from lowlevel_init.S to a new header - Remove some magic bloat with I/O board initialization - Add a pll_delay and replace loop by it - Somme cleanup in the configuration file - Cancel modifications on an SoC specific header - Add my name to copyright --- board/friendlyarm/mini2440/Makefile| 45 ++ board/friendlyarm/mini2440/lowlevel_init.S | 76 ++ board/friendlyarm/mini2440/mini2440.c | 139 ++ board/friendlyarm/mini2440/mini2440.h | 104 ++ boards.cfg |1 + include/configs/mini2440.h | 215 6 files changed, 580 insertions(+) create mode 100644 board/friendlyarm/mini2440/Makefile create mode 100644 board/friendlyarm/mini2440/lowlevel_init.S create mode 100644 board/friendlyarm/mini2440/mini2440.c create mode 100644 board/friendlyarm/mini2440/mini2440.h create mode 100644 include/configs/mini2440.h diff --git a/board/friendlyarm/mini2440/Makefile b/board/friendlyarm/mini2440/Makefile new file mode 100644 index 000..e8d68cb --- /dev/null +++ b/board/friendlyarm/mini2440/Makefile @@ -0,0 +1,45 @@ +# +# (C) Copyright 2012 +# 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 +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +COBJS := mini2440.o +SOBJS := lowlevel_init.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/friendlyarm/mini2440/lowlevel_init.S b/board/friendlyarm/mini2440/lowlevel_init.S new file mode 100644 index 000..f69a08c --- /dev/null +++ b/board/friendlyarm/mini2440/lowlevel_init.S @@ -0,0 +1,76 @@ +/* + * Memory Setup stuff - taken from blob memsetup.S + * + * Copyright (C) 1999 2000 2001 Erik Mouw (j.a.k.m...@its.tudelft.nl) and + * Jan-Derk Bakker (j.d.bak...@its.tudelft.nl) + * + * Modified for the Samsung SMDK2410 by + * (C) Copyright 2002 + * David Mueller, ELSOFT AG, d.muel...@elsoft.ch + * + * (C) Copyright 2012 + * Gabriel Huau cont...@huau-gabriel.fr + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include config.h +#include version.h +#include mini2440.h + +_TEXT_BASE: + .word CONFIG_SYS_TEXT_BASE + +.globl lowlevel_init +lowlevel_init: + /* memory control configuration */ + /* make r0 relative the current location so that it */ + /* reads SMRDATA out of FLASH rather than memory ! */ + ldr r0, =SMRDATA + ldr r1, _TEXT_BASE + sub r0, r0, r1 + ldr r1, =BWSCON /* Bus Width Status Controller */ + add r2, r0, #13*4 +0: + ldr r3, [r0], #4 + str r3, [r1], #4 + cmp r2, r0 + bne 0b + + /* everything is fine now */
Re: [U-Boot] [PATCH V4 3/8] imx: fec: Resolve speed before configuring gasket
On 4/19/2012 1:55 AM, Timo Ketola wrote: Gasket needs a different configuration for 10BaseT than for higher speeds. Signed-off-by: Timo Ketolat...@exertus.fi --- Changes in v4: - Rewrapped commit message Changes in v2: - Dropped patches 2 and 3 so this one changed from 5 to 3 - Rebased to u-boot-imx next - Removed the remove of 'miiphy_duplex' call - Changed 'speed == _100BASET' to 'speed != _10BASET' to not to break _1000BASET - Changed configuration option to put gasket into RMII mode from !CONFIG_MII to CONFIG_RMII. I'm not too sure how this should be done though. !CONFIG_MII is normally used for this but its original purpose was to enable MII *management* interface, I think... drivers/net/fec_mxc.c | 43 --- 1 files changed, 24 insertions(+), 19 deletions(-) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 824a199..48a69d4 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -440,6 +440,22 @@ static int fec_open(struct eth_device *edev) */ writel(readl(fec-eth-ecntrl) | FEC_ECNTRL_ETHER_EN, fec-eth-ecntrl); +#ifdef CONFIG_PHYLIB + if (!fec-phydev) + fec_eth_phy_config(edev); + if (fec-phydev) { + /* Start up the PHY */ + phy_startup(fec-phydev); + speed = fec-phydev-speed; + } else { + speed = _100BASET; + } +#else + miiphy_wait_aneg(edev); + speed = miiphy_speed(edev-name, fec-phy_id); + miiphy_duplex(edev-name, fec-phy_id); +#endif + #if defined(CONFIG_MX25) || defined(CONFIG_MX53) udelay(100); /* @@ -453,9 +469,14 @@ static int fec_open(struct eth_device *edev) while (readw(fec-eth-miigsk_enr) MIIGSK_ENR_READY) udelay(2); -#if !defined(CONFIG_MII) - /* configure gasket for RMII, 50 MHz, no loopback, and no echo */ - writew(MIIGSK_CFGR_IF_MODE_RMII,fec-eth-miigsk_cfgr); +#if defined(CONFIG_RMII) While this change seems to make sense, it could break some boards. Please split out to a separate patch, and leave as !defined(CONFIG_MII) for this patch. Thanks Troy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PULL] u-boot-staging/ma...@denx.de :: FOR u-boot/-next
The following changes since commit fb14b6b2f680363678b4e6a75eb9f3f0d79111fa: Prepare v2012.04-rc3 (2012-04-18 22:52:34 +0200) are available in the git repository at: git://git.denx.de/u-boot-staging.git ma...@denx.de for you to fetch changes up to 02b233ecb129d69f8e234f94fd96a012caed880b: CMD: CONFIG_CMD_SETECPR - CONFIG_CMD_SETEXPR on omap3_logic (2012-04-19 22:01:14 +0200) Marek Vasut (12): AT91: Drop AT91_SPIMUX command from cmd_all CMD: Remove CMD_AUTOSCRIPT, it's not used CMD: Drop CMD_CAN, it's not used CMD: Drop CMD_DCR, it's not used CMD: Drop CONFIG_CMD_DFL, it's not used CMD: Drop CONFIG_CMD_EMMC, it's not used CMD: Fix typo KGBD - KGDB on debris board CMD: Remove CMD_LOG, it's unused HWW1U1A: Fix CMD_SHA1 - CMD_SHA1SUM CMD: Fix typo CMD_FSL - CMD_MFSL in readme CMD: Fix CONFIG_CMD_SAVEBP_WRITE_SIZE - CONFIG_CMD_SPL_WRITE_SIZE CMD: CONFIG_CMD_SETECPR - CONFIG_CMD_SETEXPR on omap3_logic README|2 +- arch/arm/cpu/armv7/omap-common/spl_nand.c |2 +- include/config_cmd_all.h |1 - include/configs/HWW1U1A.h |2 +- include/configs/MBX.h |1 - include/configs/MigoR.h |1 - include/configs/at91sam9m10g45ek.h|1 - include/configs/debris.h |2 +- include/configs/digsy_mtc.h |1 - include/configs/ep8260.h |1 - include/configs/gplugd.h |1 - include/configs/jadecpu.h |1 - include/configs/kilauea.h |1 - include/configs/lwmon5.h |1 - include/configs/makalu.h |1 - include/configs/ms7722se.h|1 - include/configs/ms7750se.h|1 - include/configs/omap3_logic.h |2 +- include/configs/quad100hd.h |1 - include/configs/r2dplus.h |1 - include/configs/sh7757lcr.h |1 - include/configs/sh7785lcr.h |1 - include/configs/u8500_href.h |1 - include/configs/zeus.h|1 - 24 files changed, 5 insertions(+), 24 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Dear Gabriel Huau, --- Changes for v2: - Coding style cleanup - Remove unnecessary files modification - Remove unnecessary board configuration set Changes for v3: - Coding style cleanup - Move some macro definition from lowlevel_init.S to a new header - Remove some magic bloat with I/O board initialization - Add a pll_delay and replace loop by it - Somme cleanup in the configuration file - Cancel modifications on an SoC specific header - Add my name to copyright --- board/friendlyarm/mini2440/Makefile| 45 ++ board/friendlyarm/mini2440/lowlevel_init.S | 76 ++ board/friendlyarm/mini2440/mini2440.c | 139 ++ board/friendlyarm/mini2440/mini2440.h | 104 ++ boards.cfg |1 + include/configs/mini2440.h | 215 6 files changed, 580 insertions(+) create mode 100644 board/friendlyarm/mini2440/Makefile create mode 100644 board/friendlyarm/mini2440/lowlevel_init.S create mode 100644 board/friendlyarm/mini2440/mini2440.c create mode 100644 board/friendlyarm/mini2440/mini2440.h create mode 100644 include/configs/mini2440.h diff --git a/board/friendlyarm/mini2440/Makefile b/board/friendlyarm/mini2440/Makefile new file mode 100644 index 000..e8d68cb --- /dev/null +++ b/board/friendlyarm/mini2440/Makefile @@ -0,0 +1,45 @@ +# +# (C) Copyright 2012 +# 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 +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS:= mini2440.o +SOBJS:= lowlevel_init.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS:= $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/friendlyarm/mini2440/lowlevel_init.S b/board/friendlyarm/mini2440/lowlevel_init.S new file mode 100644 index 000..f69a08c --- /dev/null +++ b/board/friendlyarm/mini2440/lowlevel_init.S @@ -0,0 +1,76 @@ +/* + * Memory Setup stuff - taken from blob memsetup.S + * + * Copyright (C) 1999 2000 2001 Erik Mouw (j.a.k.m...@its.tudelft.nl) and + * Jan-Derk Bakker (j.d.bak...@its.tudelft.nl) + * + * Modified for the Samsung SMDK2410 by + * (C) Copyright 2002 + * David Mueller, ELSOFT AG, d.muel...@elsoft.ch + * + * (C) Copyright 2012 + * Gabriel Huau cont...@huau-gabriel.fr + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include config.h +#include version.h +#include mini2440.h + +_TEXT_BASE: + .word CONFIG_SYS_TEXT_BASE + +.globl lowlevel_init +lowlevel_init: + /* memory control configuration */ + /* make r0 relative the current location so that it */ + /* reads SMRDATA out of FLASH rather than memory ! */ + ldr r0, =SMRDATA + ldr r1, _TEXT_BASE + sub r0, r0, r1 + ldr r1, =BWSCON /* Bus Width Status Controller */ + add r2, r0, #13*4 +0: + ldr r3,
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
On Thu, Apr 19, 2012 at 10:08:47PM +0200, Marek Vasut wrote: Dear Gabriel Huau, --- Changes for v2: - Coding style cleanup - Remove unnecessary files modification - Remove unnecessary board configuration set Changes for v3: - Coding style cleanup - Move some macro definition from lowlevel_init.S to a new header - Remove some magic bloat with I/O board initialization - Add a pll_delay and replace loop by it - Somme cleanup in the configuration file - Cancel modifications on an SoC specific header - Add my name to copyright --- board/friendlyarm/mini2440/Makefile| 45 ++ board/friendlyarm/mini2440/lowlevel_init.S | 76 ++ board/friendlyarm/mini2440/mini2440.c | 139 ++ board/friendlyarm/mini2440/mini2440.h | 104 ++ boards.cfg |1 + include/configs/mini2440.h | 215 6 files changed, 580 insertions(+) create mode 100644 board/friendlyarm/mini2440/Makefile create mode 100644 board/friendlyarm/mini2440/lowlevel_init.S create mode 100644 board/friendlyarm/mini2440/mini2440.c create mode 100644 board/friendlyarm/mini2440/mini2440.h create mode 100644 include/configs/mini2440.h diff --git a/board/friendlyarm/mini2440/Makefile b/board/friendlyarm/mini2440/Makefile new file mode 100644 index 000..e8d68cb --- /dev/null +++ b/board/friendlyarm/mini2440/Makefile @@ -0,0 +1,45 @@ +# +# (C) Copyright 2012 +# 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 +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +COBJS := mini2440.o +SOBJS := lowlevel_init.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/friendlyarm/mini2440/lowlevel_init.S b/board/friendlyarm/mini2440/lowlevel_init.S new file mode 100644 index 000..f69a08c --- /dev/null +++ b/board/friendlyarm/mini2440/lowlevel_init.S @@ -0,0 +1,76 @@ +/* + * Memory Setup stuff - taken from blob memsetup.S + * + * Copyright (C) 1999 2000 2001 Erik Mouw (j.a.k.m...@its.tudelft.nl) and + * Jan-Derk Bakker (j.d.bak...@its.tudelft.nl) + * + * Modified for the Samsung SMDK2410 by + * (C) Copyright 2002 + * David Mueller, ELSOFT AG, d.muel...@elsoft.ch + * + * (C) Copyright 2012 + * Gabriel Huau cont...@huau-gabriel.fr + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include config.h +#include version.h +#include mini2440.h + +_TEXT_BASE: + .word CONFIG_SYS_TEXT_BASE + +.globl lowlevel_init +lowlevel_init: + /* memory control configuration */ + /* make r0 relative the current location so that it */ + /* reads SMRDATA out of FLASH rather than memory ! */ + ldr r0, =SMRDATA +
Re: [U-Boot] [PATCH V4 3/8] imx: fec: Resolve speed before configuring gasket
On 19.04.2012 22:27, Troy Kisky wrote: On 4/19/2012 1:55 AM, Timo Ketola wrote: -#if !defined(CONFIG_MII) - /* configure gasket for RMII, 50 MHz, no loopback, and no echo */ - writew(MIIGSK_CFGR_IF_MODE_RMII,fec-eth-miigsk_cfgr); +#if defined(CONFIG_RMII) While this change seems to make sense, it could break some boards. Please explain how. Every board using fec_mxc define CONFIG_MII - they have to: #ifndef CONFIG_MII #error CONFIG_MII has to be defined! #endif Please split out to a separate patch, and leave as !defined(CONFIG_MII) for this patch. Stefano? -- Timo ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Fix s3c24x0 timer
Timer in s3c24x0 arch very old and use global variable. This patch fix it and use DECLARE_GLOBAL_DATA_PTR diff --git a/arch/arm/cpu/arm920t/s3c24x0/timer.c b/arch/arm/cpu/arm920t/s3c24x0/timer.c index 9571870..3ded465 100644 --- a/arch/arm/cpu/arm920t/s3c24x0/timer.c +++ b/arch/arm/cpu/arm920t/s3c24x0/timer.c @@ -34,20 +34,43 @@ #include asm/io.h #include asm/arch/s3c24x0_cpu.h +#include div64.h -int timer_load_val = 0; -static ulong timer_clk; +DECLARE_GLOBAL_DATA_PTR; -/* macro to read the 16 bit timer */ -static inline ulong READ_TIMER(void) +#define TIMER_PREDIV_2 0 +#define TIMER_PREDIV_4 1 +#define TIMER_PREDIV_8 2 +#define TIMER_PREDIV_16 3 + +/* + * Timer is 16-bit + * So we can have good (small) timer resolution OR good (big) overlap time + * PCLK usualy 66 MHz + * PCLK / 2 / 33 = 1 MHz, 1 uS @ tick, overlap after 65 mS + * PCLK / 4 / 165 = 0.1 MHz ,10 uS @ tick, overlap after 650 mS + * PCLK / 16 / 165 = 0.025 MHz, 40 uS @ tick, overlap after 2,5 S + * ...etc + */ + +#define TIMER_PRESCALER 165 +#define TIMER_PREDIV TIMER_PREDIV_4 //2, 4, 8, 16 + +static inline unsigned long long tick_to_time(unsigned long long tick) { -struct s3c24x0_timers *timers = s3c24x0_get_base_timers(); +tick *= CONFIG_SYS_HZ; +do_div(tick, gd-timer_rate_hz); -return readl(timers-tcnto4) 0x; +return tick; } -static ulong timestamp; -static ulong lastdec; +static inline unsigned long long usec_to_tick(unsigned long long usec) +{ +usec *= gd-timer_rate_hz; +do_div(usec, 100); + +return usec; +} int timer_init(void) { @@ -55,57 +78,47 @@ int timer_init(void) ulong tmr; /* use PWM Timer 4 because it has no output */ -/* prescaler for Timer 4 is 16 */ -writel(0x0f00, timers-tcfg0); -if (timer_load_val == 0) { -/* - * for 10 ms clock period @ PCLK with 4 bit divider = 1/2 - * (default) and prescaler = 16. Should be 10390 - * @33.25MHz and 15625 @ 50 MHz - */ -timer_load_val = get_PCLK() / (2 * 16 * 100); -timer_clk = get_PCLK() / (2 * 16); -} -/* load value for 10 ms timeout */ -lastdec = timer_load_val; -writel(timer_load_val, timers-tcntb4); -/* auto load, manual update of timer 4 */ +/* prescaler for Timer */ +writel(((TIMER_PRESCALER - 1) 8) | (TIMER_PRESCALER - 1), timers-tcfg0); +/* PREDIV */ +writel((readl(timers-tcfg1) ~(0x0F 16)) | (TIMER_PREDIV 16), timers-tcfg1); +/* Reload value */ +writel(0x, timers-tcntb4); +/* auto load, manual update of Timer 4 */ tmr = (readl(timers-tcon) ~0x070) | 0x060; writel(tmr, timers-tcon); -/* auto load, start timer 4 */ +/* auto load, start Timer 4 */ tmr = (tmr ~0x070) | 0x050; writel(tmr, timers-tcon); -timestamp = 0; + +gd-lastinc = 0; +gd-timer_rate_hz = get_PCLK() / (TIMER_PRESCALER * (1 (TIMER_PREDIV + 1))); +gd-tbu = gd-tbl = 0; return (0); } /* - * timer without interrupts + * macro to read the count-down 16 bit timer */ -ulong get_timer(ulong base) +static inline ulong READ_TIMER16(void) { -return get_timer_masked() - base; -} - -void __udelay (unsigned long usec) -{ -ulong tmo; -ulong start = get_ticks(); - -tmo = usec / 1000; -tmo *= (timer_load_val * 100); -tmo /= 1000; +struct s3c24x0_timers *timers = s3c24x0_get_base_timers(); -while ((ulong) (get_ticks() - start) tmo) -/*NOP*/; +return (0x - ((readl(timers-tcnto4) 0x))); } -ulong get_timer_masked(void) +static inline ulong READ_TIMER32(void) { -ulong tmr = get_ticks(); +ulong now = READ_TIMER16(); +ulong tbl = gd-tbl; -return tmr / (timer_clk / CONFIG_SYS_HZ); +if (now = (tbl 0x)) +tbl = (tbl 0x) | now; +else +tbl = ((tbl 0x) | now) + 0x0001; + +return tbl; } void udelay_masked(unsigned long usec) @@ -114,68 +127,71 @@ void udelay_masked(unsigned long usec) ulong endtime; signed long diff; -if (usec = 1000) { -tmo = usec / 1000; -tmo *= (timer_load_val * 100); -tmo /= 1000; -} else { -tmo = usec * (timer_load_val * 100); -tmo /= (1000 * 1000); -} +tmo = usec_to_tick(usec); /* convert usecs to ticks */ endtime = get_ticks() + tmo; do { -ulong now = get_ticks(); -diff = endtime - now; +ulong now = get_ticks(); +diff = endtime - now; } while (diff = 0); } /* - * This function is derived from PowerPC code (read timebase as long long). - * On ARM it just returns the timer value. + * Get the current 64 bit timer tick count */ unsigned long long get_ticks(void) { -ulong now = READ_TIMER(); - -if (lastdec = now) { -/* normal mode */ -timestamp += lastdec - now; -} else { -/* we have an overflow ... */ -timestamp += lastdec + timer_load_val - now; -} -lastdec
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
Dear Gabriel Huau, On Thu, Apr 19, 2012 at 10:08:47PM +0200, Marek Vasut wrote: Dear Gabriel Huau, --- Changes for v2: - Coding style cleanup - Remove unnecessary files modification - Remove unnecessary board configuration set Changes for v3: - Coding style cleanup - Move some macro definition from lowlevel_init.S to a new header - Remove some magic bloat with I/O board initialization - Add a pll_delay and replace loop by it - Somme cleanup in the configuration file - Cancel modifications on an SoC specific header - Add my name to copyright --- board/friendlyarm/mini2440/Makefile| 45 ++ board/friendlyarm/mini2440/lowlevel_init.S | 76 ++ board/friendlyarm/mini2440/mini2440.c | 139 ++ board/friendlyarm/mini2440/mini2440.h | 104 ++ boards.cfg |1 + include/configs/mini2440.h | 215 6 files changed, 580 insertions(+) create mode 100644 board/friendlyarm/mini2440/Makefile create mode 100644 board/friendlyarm/mini2440/lowlevel_init.S create mode 100644 board/friendlyarm/mini2440/mini2440.c create mode 100644 board/friendlyarm/mini2440/mini2440.h create mode 100644 include/configs/mini2440.h diff --git a/board/friendlyarm/mini2440/Makefile b/board/friendlyarm/mini2440/Makefile new file mode 100644 index 000..e8d68cb --- /dev/null +++ b/board/friendlyarm/mini2440/Makefile @@ -0,0 +1,45 @@ +# +# (C) Copyright 2012 +# 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 +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS:= mini2440.o +SOBJS:= lowlevel_init.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS:= $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +## ### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +## ### diff --git a/board/friendlyarm/mini2440/lowlevel_init.S b/board/friendlyarm/mini2440/lowlevel_init.S new file mode 100644 index 000..f69a08c --- /dev/null +++ b/board/friendlyarm/mini2440/lowlevel_init.S @@ -0,0 +1,76 @@ +/* + * Memory Setup stuff - taken from blob memsetup.S + * + * Copyright (C) 1999 2000 2001 Erik Mouw (j.a.k.m...@its.tudelft.nl) and + * Jan-Derk Bakker (j.d.bak...@its.tudelft.nl) + * + * Modified for the Samsung SMDK2410 by + * (C) Copyright 2002 + * David Mueller, ELSOFT AG, d.muel...@elsoft.ch + * + * (C) Copyright 2012 + * Gabriel Huau cont...@huau-gabriel.fr + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include config.h +#include version.h +#include mini2440.h + +_TEXT_BASE: + .word CONFIG_SYS_TEXT_BASE + +.globl lowlevel_init +lowlevel_init: + /* memory control configuration */ + /* make r0
[U-Boot] [PATCH 1/2] arm: fix bootm with device tree
From: Stephen Warren swar...@nvidia.com Commit 0a672d4 arm: Add Prep subcommand support to bootm re-organized do_bootm_linux() for ARM. During the re-organization, the code to pass the device tree to the kernel was removed. Add it back. This restores the ability to boot a kernel using device tree. Signed-off-by: Stephen Warren swar...@nvidia.com --- arch/arm/lib/bootm.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 1c1bee6..95e596a 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -317,6 +317,7 @@ static void boot_jump_linux(bootm_headers_t *images) unsigned long machid = gd-bd-bi_arch_number; char *s; void (*kernel_entry)(int zero, int arch, uint params); + unsigned long r2; kernel_entry = (void (*)(int, int, uint))images-ep; @@ -330,7 +331,15 @@ static void boot_jump_linux(bootm_headers_t *images) ...\n, (ulong) kernel_entry); bootstage_mark(BOOTSTAGE_ID_RUN_OS); announce_and_cleanup(); - kernel_entry(0, machid, gd-bd-bi_boot_params); + +#ifdef CONFIG_OF_LIBFDT + if (images-ft_len) + r2 = images-ft_addr; + else +#endif + r2 = gd-bd-bi_boot_params; + + kernel_entry(0, machid, r2); } /* Main Entry point for arm bootm implementation -- 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/2] arm: restore fdt_fixup_ethernet call to do_bootm_linux
From: Stephen Warren swar...@nvidia.com Commit 0a672d4 arm: Add Prep subcommand support to bootm re-organized do_bootm_linux for ARM. During the re-organization, the call to fdt_fixup_ethernet() was removed. I assume this was useful, so add it back. Signed-off-by: Stephen Warren swar...@nvidia.com --- arch/arm/lib/bootm.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 95e596a..133b555 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -256,6 +256,7 @@ static int create_fdt(bootm_headers_t *images) fdt_chosen(*of_flat_tree, 1); fixup_memory_node(*of_flat_tree); + fdt_fixup_ethernet(*of_flat_tree); fdt_initrd(*of_flat_tree, *initrd_start, *initrd_end, 1); return 0; -- 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] fdt: fix out of tree builds with DT support
On 04/19/2012 12:38 PM, Wolfgang Denk wrote: Dear Simon Glass, In message capnjgz2-kzlw2-wdbk2qmezurjbpzt1vahnxrf7rhz_xfw6...@mail.gmail.com you wrote: Fair enough. I hope that doesn't preclude us from using new features for too long. Thanks. Most distributions appear to pick up such changes not too fast, so we may run into issues here and there. I think we should decide this on a case by case base - here it was a trivial change to the existing code that fixed the problem. The kernel deals with this by packaging a copy of dtc (the source) as part of the kernel source tree. Then, it can upgrade to new features as soon as they're needed without any distro dependency. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V4 3/8] imx: fec: Resolve speed before configuring gasket
On 4/19/2012 1:18 PM, Timo Ketola wrote: On 19.04.2012 22:27, Troy Kisky wrote: On 4/19/2012 1:55 AM, Timo Ketola wrote: -#if !defined(CONFIG_MII) - /* configure gasket for RMII, 50 MHz, no loopback, and no echo */ - writew(MIIGSK_CFGR_IF_MODE_RMII,fec-eth-miigsk_cfgr); +#if defined(CONFIG_RMII) While this change seems to make sense, it could break some boards. Please explain how. Every board using fec_mxc define CONFIG_MII - they have to: #ifndef CONFIG_MII #error CONFIG_MII has to be defined! #endif Does every board that has a gasket define CONFIG_RMII? Or are you saying that every board with a gasket is already broken? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V4 3/8] imx: fec: Resolve speed before configuring gasket
On 4/19/2012 2:13 PM, Troy Kisky wrote: On 4/19/2012 1:18 PM, Timo Ketola wrote: On 19.04.2012 22:27, Troy Kisky wrote: On 4/19/2012 1:55 AM, Timo Ketola wrote: -#if !defined(CONFIG_MII) - /* configure gasket for RMII, 50 MHz, no loopback, and no echo */ - writew(MIIGSK_CFGR_IF_MODE_RMII,fec-eth-miigsk_cfgr); +#if defined(CONFIG_RMII) While this change seems to make sense, it could break some boards. Please explain how. Every board using fec_mxc define CONFIG_MII - they have to: #ifndef CONFIG_MII #error CONFIG_MII has to be defined! #endif Does every board that has a gasket define CONFIG_RMII? Or are you saying that every board with a gasket is already broken? That should be Or are you saying that every board using a reduced pin code is alread broken? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V4 3/8] imx: fec: Resolve speed before configuring gasket
On 4/19/2012 1:55 AM, Timo Ketola wrote: Gasket needs a different configuration for 10BaseT than for higher speeds. Signed-off-by: Timo Ketolat...@exertus.fi --- Changes in v4: - Rewrapped commit message Changes in v2: - Dropped patches 2 and 3 so this one changed from 5 to 3 - Rebased to u-boot-imx next - Removed the remove of 'miiphy_duplex' call - Changed 'speed == _100BASET' to 'speed != _10BASET' to not to break _1000BASET - Changed configuration option to put gasket into RMII mode from !CONFIG_MII to CONFIG_RMII. I'm not too sure how this should be done though. !CONFIG_MII is normally used for this but its original purpose was to enable MII *management* interface, I think... drivers/net/fec_mxc.c | 43 --- 1 files changed, 24 insertions(+), 19 deletions(-) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 824a199..48a69d4 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -440,6 +440,22 @@ static int fec_open(struct eth_device *edev) */ writel(readl(fec-eth-ecntrl) | FEC_ECNTRL_ETHER_EN, fec-eth-ecntrl); +#ifdef CONFIG_PHYLIB + if (!fec-phydev) + fec_eth_phy_config(edev); + if (fec-phydev) { + /* Start up the PHY */ + phy_startup(fec-phydev); + speed = fec-phydev-speed; + } else { + speed = _100BASET; + } +#else + miiphy_wait_aneg(edev); + speed = miiphy_speed(edev-name, fec-phy_id); + miiphy_duplex(edev-name, fec-phy_id); +#endif + #if defined(CONFIG_MX25) || defined(CONFIG_MX53) udelay(100); /* @@ -453,9 +469,14 @@ static int fec_open(struct eth_device *edev) while (readw(fec-eth-miigsk_enr) MIIGSK_ENR_READY) udelay(2); -#if !defined(CONFIG_MII) - /* configure gasket for RMII, 50 MHz, no loopback, and no echo */ - writew(MIIGSK_CFGR_IF_MODE_RMII,fec-eth-miigsk_cfgr); +#if defined(CONFIG_RMII) + if (speed != _10BASET) + /* configure gasket for RMII, 50MHz, no loopback, and no echo */ + writew(MIIGSK_CFGR_IF_MODE_RMII,fec-eth-miigsk_cfgr); + else + /* configure gasket for RMII, 5MHz, no loopback, and no echo */ + writew(MIIGSK_CFGR_IF_MODE_RMII | MIIGSK_CFGR_FRCONT, + fec-eth-miigsk_cfgr); #else /* configure gasket for MII, no loopback, and no echo */ writew(MIIGSK_CFGR_IF_MODE_MII,fec-eth-miigsk_cfgr); @@ -474,22 +495,6 @@ static int fec_open(struct eth_device *edev) } #endif Can you fix 10BASET for non-reduced pin count boards as well? Thanks Troy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] arm: fix bootm with device tree
On 04/19/2012 02:09 PM, Stephen Warren wrote: From: Stephen Warrenswar...@nvidia.com Commit 0a672d4 arm: Add Prep subcommand support to bootm re-organized do_bootm_linux() for ARM. During the re-organization, the code to pass the device tree to the kernel was removed. Add it back. This restores the ability to boot a kernel using device tree. Signed-off-by: Stephen Warrenswar...@nvidia.com Acked-by: Tom Rini tr...@ti.com -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] arm: restore fdt_fixup_ethernet call to do_bootm_linux
On 04/19/2012 02:09 PM, Stephen Warren wrote: From: Stephen Warrenswar...@nvidia.com Commit 0a672d4 arm: Add Prep subcommand support to bootm re-organized do_bootm_linux for ARM. During the re-organization, the call to fdt_fixup_ethernet() was removed. I assume this was useful, so add it back. Signed-off-by: Stephen Warrenswar...@nvidia.com Acked-by: Tom Rini tr...@ti.com -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V2 1/2] arm: fix bootm with device tree
From: Stephen Warren swar...@nvidia.com Commit 0a672d4 arm: Add Prep subcommand support to bootm re-organized do_bootm_linux() for ARM. During the re-organization, the code to pass the device tree to the kernel was removed. Add it back. This restores the ability to boot a kernel using device tree. Signed-off-by: Stephen Warren swar...@nvidia.com Acked-by: Tom Rini tr...@ti.com --- v2: Fix a build warning --- arch/arm/lib/bootm.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 1c1bee6..cba457f 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -317,6 +317,7 @@ static void boot_jump_linux(bootm_headers_t *images) unsigned long machid = gd-bd-bi_arch_number; char *s; void (*kernel_entry)(int zero, int arch, uint params); + unsigned long r2; kernel_entry = (void (*)(int, int, uint))images-ep; @@ -330,7 +331,15 @@ static void boot_jump_linux(bootm_headers_t *images) ...\n, (ulong) kernel_entry); bootstage_mark(BOOTSTAGE_ID_RUN_OS); announce_and_cleanup(); - kernel_entry(0, machid, gd-bd-bi_boot_params); + +#ifdef CONFIG_OF_LIBFDT + if (images-ft_len) + r2 = (unsigned long)images-ft_addr; + else +#endif + r2 = gd-bd-bi_boot_params; + + kernel_entry(0, machid, r2); } /* Main Entry point for arm bootm implementation -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V2 2/2] arm: restore fdt_fixup_ethernet call to do_bootm_linux
From: Stephen Warren swar...@nvidia.com Commit 0a672d4 arm: Add Prep subcommand support to bootm re-organized do_bootm_linux for ARM. During the re-organization, the call to fdt_fixup_ethernet() was removed. I assume this was useful, so add it back. Signed-off-by: Stephen Warren swar...@nvidia.com Acked-by: Tom Rini tr...@ti.com --- arch/arm/lib/bootm.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index cba457f..599547d 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -256,6 +256,7 @@ static int create_fdt(bootm_headers_t *images) fdt_chosen(*of_flat_tree, 1); fixup_memory_node(*of_flat_tree); + fdt_fixup_ethernet(*of_flat_tree); fdt_initrd(*of_flat_tree, *initrd_start, *initrd_end, 1); return 0; -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] yaffs2 u-boot patching support
On Mon, Apr 16, 2012 at 04:32:07PM +1200, Charles Manning wrote: Hello ubooters and yaffsers I was commissioned to refresh yaffs2 in u-boot and add a mechanism to support dynamic yaffs partition set up (way simpler than screwing around with mtd part) and manual configuration. Rather than do this as a once off, I set this scripting up so that this can be done at any time (painlessly I hope) to bring in the fresh code (as per Linux patching). Just to put this out there, if you're not submitting patches to get the code into git, should the current support in-tree be removed? -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] Add support for MINI2440 (s3c2440). Documentation about the product can be found on: http://www.friendlyarm.net/products/mini2440
On Thu, Apr 19, 2012 at 10:45:21PM +0200, Marek Vasut wrote: Dear Gabriel Huau, On Thu, Apr 19, 2012 at 10:08:47PM +0200, Marek Vasut wrote: Dear Gabriel Huau, --- Changes for v2: - Coding style cleanup - Remove unnecessary files modification - Remove unnecessary board configuration set Changes for v3: - Coding style cleanup - Move some macro definition from lowlevel_init.S to a new header - Remove some magic bloat with I/O board initialization - Add a pll_delay and replace loop by it - Somme cleanup in the configuration file - Cancel modifications on an SoC specific header - Add my name to copyright --- board/friendlyarm/mini2440/Makefile| 45 ++ board/friendlyarm/mini2440/lowlevel_init.S | 76 ++ board/friendlyarm/mini2440/mini2440.c | 139 ++ board/friendlyarm/mini2440/mini2440.h | 104 ++ boards.cfg |1 + include/configs/mini2440.h | 215 6 files changed, 580 insertions(+) create mode 100644 board/friendlyarm/mini2440/Makefile create mode 100644 board/friendlyarm/mini2440/lowlevel_init.S create mode 100644 board/friendlyarm/mini2440/mini2440.c create mode 100644 board/friendlyarm/mini2440/mini2440.h create mode 100644 include/configs/mini2440.h diff --git a/board/friendlyarm/mini2440/Makefile b/board/friendlyarm/mini2440/Makefile new file mode 100644 index 000..e8d68cb --- /dev/null +++ b/board/friendlyarm/mini2440/Makefile @@ -0,0 +1,45 @@ +# +# (C) Copyright 2012 +# 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 +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +COBJS := mini2440.o +SOBJS := lowlevel_init.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +## ### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +## ### diff --git a/board/friendlyarm/mini2440/lowlevel_init.S b/board/friendlyarm/mini2440/lowlevel_init.S new file mode 100644 index 000..f69a08c --- /dev/null +++ b/board/friendlyarm/mini2440/lowlevel_init.S @@ -0,0 +1,76 @@ +/* + * Memory Setup stuff - taken from blob memsetup.S + * + * Copyright (C) 1999 2000 2001 Erik Mouw (j.a.k.m...@its.tudelft.nl) and + * Jan-Derk Bakker (j.d.bak...@its.tudelft.nl) + * + * Modified for the Samsung SMDK2410 by + * (C) Copyright 2002 + * David Mueller, ELSOFT AG, d.muel...@elsoft.ch + * + * (C) Copyright 2012 + * Gabriel Huau cont...@huau-gabriel.fr + * + * 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