U-Boot
Threads by month
- ----- 2025 -----
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2000 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
March 2012
- 179 participants
- 561 discussions

Re: [U-Boot] Does U-boot supports Spansion S29GL01GS NOR Flash?
by Balaji Sivakumar, ERS, HCLTech 11 Mar '12
by Balaji Sivakumar, ERS, HCLTech 11 Mar '12
11 Mar '12
Hi Wolf,
Thanks for your responses.
Board is same like IMX6q sabelite board, only difference is we have Spansion Nor Flash S29GL01GS in our board,
which is connected via WEIM Bus Chip slect 0 and Data bus is 16 bit(D16-D31).
I have weim bus io mux config and cs0 initialization in mx6q_saberlite_board.c file and also i have added the Flash base address as WEIM_CS0_BASE_ADDR, Flash width as FLASH_CFI_16 bit,Max sector details(1024), Max Bank(1) etc in the config file.
You have mentioned memory map in your mail, is that what i mentioned above in the config file.
Thanks ,
ShivBalaji
________________________________________
From: Wolfgang Denk [wd(a)denx.de]
Sent: Sunday, March 11, 2012 12:40 AM
To: Balaji Sivakumar, ERS, HCLTech
Cc: u-boot(a)lists.denx.de
Subject: Re: [U-Boot] Does U-boot supports Spansion S29GL512P NOR Flash?
Dear Balaji Sivakumar,
In message <loom.20120310T113930-255(a)post.gmane.org> you wrote:
>
> I am Balaji. am using IMX6 base custom board. In my board am using S29GL01G
> NOR Flash to srore u-boot and kernel. I understand from the data sheet this
> NOR Flash is CFI based on. So i have added Configurations for CFI Flash driver.
Thi sis of course only part of the configuration that is needed.
> Currently am loading the U-boot into DDR3 and able to excute U-boot test
> commands. When i put flinfo , am getting "missing or unknow flash type" and
> while loading the u-boot it is printing as " Unknown flash on BANK 1 - Size -
> 0MB". So am not sure what am missing here or i have to add anything extra in
> teh config file. Please request you to check and provide your suggestion.
For example, you must also set up the memory controller and memory map
as needed for your board.
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: wd(a)denx.de
A dog always bit deepest on the veterinary hand.
- Terry Pratchett, _Wyrd Sisters_
::DISCLAIMER::
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.
-----------------------------------------------------------------------------------------------------------------------
2
2
(This series has trivial conflicts with the generic board series in the
arch/xxx/config.mk additions and also in that they both add
include/linux/sections.h. I original had this series first in my list,
but the generic board series now also applies directly to master, so I
will leave this one as is until I know what ordering is required.)
This is the second patch series aiming to unify the various board.c files
in each architecture into a single one. This series implements a generic
relocation feature, which is the bridge between board_init_f() and
board_init_r(). It then moves ARM over to use this framework, as an
example.
On ARM the relocation code is duplicated for each CPU yet it
is the same. We can bring this up to the arch level. But since (I believe)
Elf relocation is basically the same process for all archs, there is no
reason not to bring it up to the generic level.
Each architecture which uses this framework needs to provide a function
called arch_elf_relocate_entry() which processes a single relocation
entry. This is a static inline function to reduce code size overhead.
For ARM, a new arch/arm/lib/proc.S file is created, which holds generic
ARM assembler code (things that cannot be written in C and are common
functions used by all ARM CPUs). This helps reduce duplication. Interrupt
handling code and perhaps even some startup code can move there later.
It may be useful for other architectures with a lot of different CPUs
to have a similar file.
Code size on my ARMv7 system increases by 54 bytes with generic
relocation. This overhead is mostly just literal pool access and setting
up to call the relocated U-Boot at the end.
On my system, execution time increases from 10.8ms to 15.6ms due to the
less efficient C implementations of the copy and zero loops. If execution
time is of concern, you can define CONFIG_USE_ARCH_MEMSET and
CONFIG_USE_ARCH_MEMCPY to reduce it. For me this reduces relocation time
to 5.4ms, i.e. twice as fast as the old system.
To address the build failure in tx25 I have split out the memset()/memcpy()
functions into their own file. I believe this is somewhat justified by the
fact that they are now used for relocation, independently of what other
part of U-Boot may or may not use the string functions. The problem with
linking with the whole string.o object file is that the code size is too
large for highly-constrained SPL builds which don't have
-ffunction-sections defined.
Changes in v2:
- Add README file for relocation
- Add function comments
- Import asm-generic/sections.h from Linux and add U-Boot extras
- Make relocation symbols global so we can use them outside start.S
- Move reloc.c into common/
- Squash generic link symbols patch into generic relocation patch
- Use CONFIG_SYS_SKIP_RELOC instead of CONFIG_SYS_LEGACY_BOARD
- Use an inline relocation function to reduce code size
- Use memset, memcpy instead of inline code
Changes in v3:
- Rebase to master
- Remove the 'reloc' tag from each commit
Changes in v4:
- Add new patch to fix davinci build warnings
- Add new patch to fix smdk6400 with generic relocation
- Add new patch to separate out memcpy(), memset()
- Capital D on Define of CONFIG_SYS_SKIP_RELOC commit message
- Put start_call_board_init_r() into each start.S, sadly
- Rebase to master, also bring in ARM master
- Remove proc.S file from Makefiles
- Split out board changes into separate patches
- Split out change to move relocation symbols to top of start.S files
- Split out hawkboard changes into new patch
- Split out mx31pdk changes into new patch
- Split out start_call_board_init_r() addition into new patch
- Split out tx25 changes into new patch
- Update start.S pruning to fit with early patches
- Use renamed start_call_board_init_r() function
Simon Glass (13):
Define CONFIG_SYS_SKIP_RELOC for all archs
Add generic relocation feature
arm: Export and promote relocation symbols
arm: Add start_call_board_init_r() to each start.S
Move memcpy(), memset() into new lib/membasic.c
arm: Add explicit __image_copy_end symbol for ARM926EJ-S
davinci: Use correct #ifdef around gdata/bdata
tx25: Modify to work with generic relocation
hawkboard: Modify to work with generic relocation
mx31pdk: Modify to work with generic relocation
smdk6400: Modify to work with generic relocation
arm: Move over to generic relocation
arm: Remove unused code in start.S
README | 4 +
arch/arm/cpu/arm1136/start.S | 142 +++--------------
arch/arm/cpu/arm1176/start.S | 221 +++-----------------------
arch/arm/cpu/arm720t/start.S | 136 +++-------------
arch/arm/cpu/arm920t/start.S | 144 +++--------------
arch/arm/cpu/arm925t/start.S | 144 +++--------------
arch/arm/cpu/arm926ejs/davinci/spl.c | 2 +
arch/arm/cpu/arm926ejs/start.S | 157 ++++---------------
arch/arm/cpu/arm926ejs/u-boot.lds | 2 +
arch/arm/cpu/arm946es/start.S | 139 +++--------------
arch/arm/cpu/arm_intcm/start.S | 144 +++--------------
arch/arm/cpu/armv7/start.S | 142 +++--------------
arch/arm/cpu/ixp/start.S | 136 +++-------------
arch/arm/cpu/lh7a40x/start.S | 133 +++-------------
arch/arm/cpu/pxa/start.S | 147 +++---------------
arch/arm/cpu/s3c44b0/start.S | 136 +++-------------
arch/arm/cpu/sa1100/start.S | 133 +++-------------
arch/arm/include/asm/reloc.h | 56 +++++++
arch/avr32/config.mk | 3 +
arch/blackfin/config.mk | 3 +
arch/m68k/config.mk | 3 +
arch/microblaze/config.mk | 3 +
arch/mips/config.mk | 3 +
arch/nds32/config.mk | 3 +
arch/nios2/config.mk | 3 +
arch/powerpc/config.mk | 3 +
arch/sandbox/config.mk | 3 +
arch/sh/config.mk | 3 +
arch/sparc/config.mk | 3 +
arch/x86/config.mk | 3 +
board/davinci/da8xxevm/u-boot-spl-hawk.lds | 1 +
common/Makefile | 4 +
common/reloc.c | 121 +++++++++++++++
doc/README.relocation | 87 +++++++++++
include/asm-generic/sections.h | 92 +++++++++++
include/configs/hawkboard.h | 2 +
include/configs/tx25.h | 2 +
include/reloc.h | 17 ++-
lib/Makefile | 1 +
lib/membasic.c | 103 +++++++++++++
lib/string.c | 71 ---------
nand_spl/board/freescale/mx31pdk/Makefile | 6 +
nand_spl/board/freescale/mx31pdk/u-boot.lds | 1 +
nand_spl/board/karo/tx25/Makefile | 11 ++-
nand_spl/board/karo/tx25/u-boot.lds | 1 +
nand_spl/board/samsung/smdk6400/Makefile | 11 ++
46 files changed, 924 insertions(+), 1761 deletions(-)
create mode 100644 arch/arm/include/asm/reloc.h
create mode 100644 common/reloc.c
create mode 100644 doc/README.relocation
create mode 100644 include/asm-generic/sections.h
create mode 100644 lib/membasic.c
--
1.7.7.3
8
47

11 Mar '12
Sometimes we want to be sure that the output FIFO has fully drained (e.g.
because we are about to reset or the port or reset the board). Add a
function for this.
Signed-off-by: Simon Glass <sjg(a)chromium.org>
---
Changes in v2:
- Add function to drain the ns16550's FIFO
drivers/serial/ns16550.c | 11 +++++++++++
include/ns16550.h | 3 +++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 0c23955..a082112 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -6,6 +6,7 @@
#include <config.h>
#include <ns16550.h>
+#include <common.h>
#include <watchdog.h>
#include <linux/types.h>
#include <asm/io.h>
@@ -115,4 +116,14 @@ int NS16550_tstc(NS16550_t com_port)
return (serial_in(&com_port->lsr) & UART_LSR_DR) != 0;
}
+/* Wait for the UART's output buffer and holding register to drain */
+void NS16550_drain(NS16550_t regs)
+{
+ u32 mask = UART_LSR_TEMT | UART_LSR_THRE;
+
+ /* Wait for the UART to finish sending */
+ while ((serial_in(®s->lsr) & mask) != mask)
+ udelay(100);
+}
+
#endif /* CONFIG_NS16550_MIN_FUNCTIONS */
diff --git a/include/ns16550.h b/include/ns16550.h
index e9d2eda..16b3828 100644
--- a/include/ns16550.h
+++ b/include/ns16550.h
@@ -166,4 +166,7 @@ void NS16550_init(NS16550_t com_port, int baud_divisor);
void NS16550_putc(NS16550_t com_port, char c);
char NS16550_getc(NS16550_t com_port);
int NS16550_tstc(NS16550_t com_port);
+
+/* Wait for the UART's output buffer and holding register to drain */
+void NS16550_drain(NS16550_t regs);
void NS16550_reinit(NS16550_t com_port, int baud_divisor);
--
1.7.7.3
5
21
Hi,
All along, I have been thinking is: to run an u-boot binary on a board,
two steps are required:
(1) configure u-boot
(2) cross-compile the source.
I was a bit confused when I was told the followings:
To run binary code, you do not need to create any specific images.
Just load the raw binary file to the right address, and start it at
it's entry point address using "go".
How could the code be run without first going through cross-compilation?
Could someone please help to clarify this?
Thanks,
Ivan
1
0
Hi all,
the u-boot-avr32/master needed a rebase cause of some unmerged (and
unneeded) patches already applied. Especially the 'atngw100: Use virtual
address in CONFIG_ENV_ADDR' [1] was one of them. So if someone else uses
u-boot-avr32 repository please rebase ;)
There are two patches pending from Sven Schnelle since October last year:
http://patchwork.ozlabs.org/patch/120993/
http://patchwork.ozlabs.org/patch/120992/
Both are working and could go in 2012.0{3,4}. Wolfgang are you willing
to grab them for this release?
Both of them are delegated to Reinhard on patchwork. Could I take them
directly or is some administrative interaction necessary to mark them as
accepted?
regards
Andreas Bießmann
[1] http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/66904
2
3
Hi,
In U-boot I am not seeing the support for Spansion S29GL512P NOR flash.
This chip is CFI compliant so I believe the common CFI driver should work
with this chip.
Does U-boot supports S29GL512P NOR flash or I have to implement the
functionality to support S29GL512P?
If anyone has tried with S29GL512P NOR flash please share the experiecne.
Thanks & Regards,
Prakash
6
30
Signed-off-by: Andreas Bießmann <andreas.devel(a)googlemail.com>
---
doc/git-mailrc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/doc/git-mailrc b/doc/git-mailrc
index 96f1d86..bc5a814 100644
--- a/doc/git-mailrc
+++ b/doc/git-mailrc
@@ -51,7 +51,7 @@ alias tegra uboot, Simon Glass <sjg(a)chromium.org>, Tom Warren <twarren@
alias tegra2 tegra
alias ti uboot, Sandeep Paulraj <s-paulraj(a)ti.com>, Tom Rini <trini(a)ti.com>
-alias avr32 uboot, reinhardm
+alias avr32 uboot, Andreas Bießmann <andreas.devel(a)googlemail.com>
alias bfin uboot, vapier
alias blackfin bfin
--
1.7.9.1
1
0

[U-Boot] Error while Readin Flash Info(flinfo) in U-boot - Help
by Balaji Sivakumar, ERS, HCLTech 10 Mar '12
by Balaji Sivakumar, ERS, HCLTech 10 Mar '12
10 Mar '12
Hi Stefan,
I am Balaji. am using IMX6 base custom board. In my board am using S29GL01G NOR Flash to store u-boot and kernel. I understand from the data sheet this NOR Flash is CFI supported one. So i have added Configurations for CFI Flash driver. Currently am loading the U-boot into DDR3 and able to excute U-boot test commands. When i put flinfo , am getting "missing or unknow flash type" and while loading the u-boot it is printing as " Unknown flash on BANK 1 - Size - 0MB". So am not sure what am missing here or i have to add anything extra in the config file. Please request you to check and provide your suggestion.
Thanks ,
ShivBalaji
________________________________________
From: u-boot-bounces(a)lists.denx.de [u-boot-bounces(a)lists.denx.de] On Behalf Of u-boot-request(a)lists.denx.de [u-boot-request(a)lists.denx.de]
Sent: Saturday, March 10, 2012 4:30 PM
To: u-boot(a)lists.denx.de
Subject: U-Boot Digest, Vol 46, Issue 17
Send U-Boot mailing list submissions to
u-boot(a)lists.denx.de
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.denx.de/mailman/listinfo/u-boot
or, via email, send a message with subject or body 'help' to
u-boot-request(a)lists.denx.de
You can reach the person managing the list at
u-boot-owner(a)lists.denx.de
When replying, please edit your Subject line so it is more specific
than "Re: Contents of U-Boot digest..."
Today's Topics:
1. Re: [PATCH v8] usb: align buffers at cacheline (Marek Vasut)
2. Re: [PATCH] PowerPC: enable the SATA for p1/p2 rdb-pc
platform (Tabi Timur-B04825)
3. Re: [PATCH 4/7] i.MX28: Enable additional DRAM address bits
(Stefano Babic)
4. Re: AVR32 status (Wolfgang Denk)
5. Re: (no subject) (Simon Glass)
6. Re: ubifsmount reports "Error reading superblock", but linux
can mount FS (Wolfgang Denk)
7. A few things for the release? (Simon Glass)
8. adding new command in u-boot (Haneef hawk21)
9. Re: adding new command in u-boot (Anatolij Gustschin)
10. [PATCH 2/2] omap3: fix NAND for tam3517 boards (Stefano Babic)
11. [PATCH 1/2] omap3: fix NAND for mcx board (Stefano Babic)
12. Re: [PATCH 1/2] omap3: fix NAND for mcx board (Tom Rini)
13. Re: [PATCH 1/2] omap3: fix NAND for mcx board (Stefano Babic)
14. Re: [PATCH 2/2] tegra: Enable pre-console putc() for Tegra
boards (Stephen Warren)
15. Re: A few things for the release? (Dirk Behme)
16. Re: ubifsmount reports "Error reading superblock", but linux
can mount FS (Alex Zeffertt)
17. Re: [PATCH 2/2] tegra: Enable pre-console putc() for Tegra
boards (Simon Glass)
18. Re: [PATCH 2/2] tegra: Enable pre-console putc() for Tegra
boards (Simon Glass)
19. [PATCH v2 1/4] ns16550: Add function to drain serial output
(Simon Glass)
20. [PATCH v2 2/4] Enable printf() console if pre-console putc()
is available (Simon Glass)
21. [PATCH v2 3/4] tegra: Implement pre-console putc() for fdt
warning (Simon Glass)
22. [PATCH v2 4/4] tegra: Enable pre-console putc() for Tegra
boards (Simon Glass)
23. Re: [PATCH v2 1/4] ns16550: Add function to drain serial
output (Tom Warren)
24. Re: [PATCH v2 1/4] ns16550: Add function to drain serial
output (Stephen Warren)
25. Re: [PATCH v2 1/4] ns16550: Add function to drain serial
output (Simon Glass)
26. Re: [PATCH v2 1/4] ns16550: Add function to drain serial
output (Tom Warren)
27. Re: [PATCH v2 1/4] ns16550: Add function to drain serial
output (Simon Glass)
28. Re: [PATCH v2 1/4] ns16550: Add function to drain serial
output (Stephen Warren)
29. pull request for u-boot-tegra/master (Tom Warren)
30. Re: DEVELOPER's MEETING (Fabio Estevam)
31. Re: [PATCH resend] ARMV7/Vexpress: add missing get_ticks()
and get_tbclk() (Matt Waddel)
32. Re: [PATCH v2 3/4] tegra: Implement pre-console putc() for
fdt warning (Wolfgang Denk)
33. Re: [PATCH v2 1/4] ns16550: Add function to drain serial
output (Wolfgang Denk)
34. Re: [PATCH v2 1/4] ns16550: Add function to drain serial
output (Wolfgang Denk)
35. Re: pull request for u-boot-tegra/master (Wolfgang Denk)
36. Re: DEVELOPER's MEETING (Wolfgang Denk)
37. Re: [PATCH] arm: Don't use printf() in SPL builds (Sughosh Ganu)
38. Re: Does U-boot supports Spansion S29GL512P NOR Flash?
(Balaji Sivakumar)
----------------------------------------------------------------------
Message: 1
Date: Fri, 9 Mar 2012 13:03:31 +0100
From: Marek Vasut <marex(a)denx.de>
Subject: Re: [U-Boot] [PATCH v8] usb: align buffers at cacheline
To: puneets <puneets(a)nvidia.com>
Cc: "u-boot(a)lists.denx.de" <u-boot(a)lists.denx.de>, Tom Warren
<TWarren(a)nvidia.com>, "trini(a)ti.com" <trini(a)ti.com>
Message-ID: <201203091303.31631.marex(a)denx.de>
Content-Type: Text/Plain; charset="us-ascii"
Dear puneets,
> Hi Marek,
>
> On Thursday 08 March 2012 07:42 PM, Marek Vasut wrote:
> > Dear puneets,
> >
> >> Hi Marek,
> >>
> >> On Thursday 08 March 2012 03:36 AM, Marek Vasut wrote:
> >>> Dear puneets,
> >>>
> >>>> Hi Mike,
> >>>>
> >>>> On Tuesday 06 March 2012 08:37 AM, Mike Frysinger wrote:
> >>>>> * PGP Signed by an unknown key
> >>>>>
> >>>>> On Monday 05 March 2012 09:46:21 Puneet Saxena wrote:
> >>>>>> As DMA expects the buffers to be equal and larger then
> >>>>>> cache lines, This aligns buffers at cacheline.
> >>>>>
> >>>>> i don't think this statement is true. DMA doesn't care about
> >>>>> alignment (well, some do, but it's not related to cache lines but
> >>>>> rather some other restriction in the peripheral DMA itself). what
> >>>>> does matter is that cache operations operate on cache lines and not
> >>>>> individual bytes. hence the core arm code was updated to warn when
> >>>>> someone told it to invalidate X bytes but the hardware literally
> >>>>> could not, so it had to invalidate X + Y bytes.
> >>>>
> >>>> Agreed, Will update the commit message in next patchset.
> >>>>
> >>>>>> --- a/drivers/usb/host/ehci-hcd.c
> >>>>>> +++ b/drivers/usb/host/ehci-hcd.c
> >>>>>>
> >>>>>> static void flush_invalidate(u32 addr, int size, int flush)
> >>>>>> {
> >>>>>>
> >>>>>> + /*
> >>>>>> + * Size is the bytes actually moved during transaction,
> >>>>>> + * which may not equal to the cache line. This results
> >>>>>> + * stop address passed for invalidating cache may not be
> >
> > aligned.
> >
> >>>>>> + * Therfore making size as multiple of cache line size.
> >>>>>> + */
> >>>>>> + size = ALIGN(size, ARCH_DMA_MINALIGN);
> >>>>>> +
> >>>>>>
> >>>>>> if (flush)
> >>>>>>
> >>>>>> flush_dcache_range(addr, addr + size);
> >>>>>>
> >>>>>> else
> >>>>>
> >>>>> i think this is wrong and merely hides the errors from higher up
> >>>>> instead of fixing them. the point of the warning was to tell you
> >>>>> that the code was invalidating *too many* bytes. this code still
> >>>>> invalidates too many bytes without any justification as for why it's
> >>>>> OK to do here. further, this code path only matters to the
> >>>>> invalidation logic, not the flush logic. -mike
> >>>>
> >>>> The sole purpose of this patch to remove the warnings as start/stop
> >>>> address sent for invalidating
> >>>> is unaligned. Without this patch code works fine but with lots of
> >>>> spew...Which we don't want and discussed
> >>>> in earlier thread which Simon posted. Please have a look on following
> >>>> link.
> >>>>
> >>>> As I understood, you agree that we need to align start/stop buffer
> >>>> address and also agree that
> >>>> to align stop address we need to align size as start address is
> >>>> already aligned.
> >>>> Now, "why its OK to do here"?
> >>>> We could have aligned the size in two places, cache_qtd() and
> >>>> cache_qh() but then we need to place alignment check
> >>>> at all the places where size is passed. So I thought better Aligning
> >>>> at flush_invalidate() and "ALIGN" macro does not
> >>>> increase the size if size is already aligned.
> >>>
> >>> Actually I have to agree with Mike here. Can you please remove that
> >>> ALIGN() (and all others you might have added)? If it does spew, that's
> >>> ok and it tells us something is wrong in the USB core subsystem. Such
> >>> stuff can be fixed in subsequent patch.
> >>
> >> Sorry, I could not understand "(and all others you might have added)".
> >> Do you want me remove any HACK in the patch which is using ALIGN or
> >> making stop address
> >
> > No, only such hacks where it's certain they will either invalidate or
> > flush some areas that weren't allocated for them, like this ALIGN you
> > did here. This can cause trouble that will be very hard to find.
> >
> >> aligned? The patch has only the above line to make stop address align
> >> and rest of the code makes
> >> start address align. Just to confirm, you are fine with the start
> >> address alignment code in the patch?
> >
> > The start address alignment you do also aligns the end to the cacheline,
> > doesn't it? (at least that's what I believe the macro is supposed to
> > do).
>
> Yes, start address alignment also aligns start address at the cache
> line. So, removing
> stop address alignment code as depicted above, should make this patch
> acceptable?
>
Puneet, it's not a problem of acceptability, it's a problem of breaking uboot
;-) Acceptability goes only after it we are sure doesn't break anything. The
cache stuff is really fragile so we need to be very careful, please understand
and let's figure this out together, I feel we're really close.
And yes, I believe removing such dangerous ALIGN() calls will be the last fix
necessary, unless something other pops up.
Best regards,
Marek Vasut
------------------------------
Message: 2
Date: Fri, 9 Mar 2012 12:40:35 +0000
From: Tabi Timur-B04825 <B04825(a)freescale.com>
Subject: Re: [U-Boot] [PATCH] PowerPC: enable the SATA for p1/p2
rdb-pc platform
To: Huang Changming-R66093 <r66093(a)freescale.com>
Cc: "u-boot(a)lists.denx.de" <u-boot(a)lists.denx.de>, Andy Fleming
<afleming(a)gmail.com>
Message-ID:
<CAOZdJXWKdgCPW_UDqP1qhBxVBikfR_2Uqkufu2_Q_f_0qnH9SQ(a)mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
On Fri, Mar 9, 2012 at 1:54 AM, <Chang-Ming.Huang(a)freescale.com> wrote:
> -#define CONFIG_SATA_SIL3114
> +#define CONFIG_SATA_SIL
This is not "enabling" SATA. This is choosing the correct driver.
You can only use the word "enable" if the feature was intentionally
disabled before, e.g. because the driver did not exist yet.
Your patch description is fine. The subject line, however, is wrong.
--
Timur Tabi
Linux kernel developer at Freescale
------------------------------
Message: 3
Date: Fri, 09 Mar 2012 14:39:29 +0100
From: Stefano Babic <sbabic(a)denx.de>
Subject: Re: [U-Boot] [PATCH 4/7] i.MX28: Enable additional DRAM
address bits
To: Marek Vasut <marex(a)denx.de>
Cc: u-boot(a)lists.denx.de
Message-ID: <4F5A0811.8090506(a)denx.de>
Content-Type: text/plain; charset=ISO-8859-1
On 26/02/2012 23:15, Marek Vasut wrote:
> Signed-off-by: Marek Vasut <marex(a)denx.de>
> ---
Applied to u-boot-imx, thanks.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office(a)denx.de
=====================================================================
------------------------------
Message: 4
Date: Fri, 09 Mar 2012 14:47:49 +0100
From: Wolfgang Denk <wd(a)denx.de>
Subject: Re: [U-Boot] AVR32 status
To: Andreas Bie?mann <andreas.devel(a)googlemail.com>
Cc: u-boot(a)lists.denx.de
Message-ID: <20120309134749.CAAF9202D70(a)gemini.denx.de>
Content-Type: text/plain; charset=UTF-8
Dear Andreas,
In message <4F59BA55.9050306(a)googlemail.com> you wrote:
>
> There are two patches pending from Sven Schnelle since October last year:
> http://patchwork.ozlabs.org/patch/120993/
> http://patchwork.ozlabs.org/patch/120992/
>
> Both are working and could go in 2012.0{3,4}. Wolfgang are you willing
> to grab them for this release?
Yes, that's perfectly fine with me.
> Both of them are delegated to Reinhard on patchwork. Could I take them
> directly or is some administrative interaction necessary to mark them as
> accepted?
You can reassign to yourself, or just apply directly. Patchwork does
not really care about assignments...
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: wd(a)denx.de
The universe does not have laws - it has habits, and habits can be
broken.
------------------------------
Message: 5
Date: Fri, 9 Mar 2012 05:59:53 -0800
From: Simon Glass <sjg(a)chromium.org>
Subject: Re: [U-Boot] (no subject)
To: Wolfgang Denk <wd(a)denx.de>
Cc: u-boot(a)lists.denx.de
Message-ID:
<CAPnjgZ1Drbv8uDWjeDkXsaujPMNnwKMtb7JpCiEHArYOB6y=zQ(a)mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Hi Wolfgang,
On Thu, Mar 8, 2012 at 12:16 AM, Wolfgang Denk <wd(a)denx.de> wrote:
> Dear Simon Glass,
>
> In message <CAPnjgZ2tGqTRfFOaKyySUrQxMO3_4qfX7ewg-XFUcuqZtP=6Ew(a)mail.gmail.com> you wrote:
>>
>> > ?01/10 Simon Glass ? ? ? ?[U-Boot] [PATCH v2 8/8] sandbox: Add > basic command line parsing
>> > http://article.gmane.org/gmane.comp.boot-loaders.u-boot/122324
>>
>> Mike expanded this one significantly - I just acked it. Might stretch
>> the definition of 'inside merge window'?
>
> Initial patch was within merge window; we usually accapt updates, so
> why not here.
OK. It will be good to have this in.
>
>> Yes I just cleaned up mine...it would be nice if you could select
>> multiple patches at the top level and perform actions on them.
>
> See the "Create bundle" function - eventually this is what you are
> looking for?
Yes I can create a bundle, just not sure how I can then mark
everything in the bundle as 'archived' or change its state.
Regards,
Simon
>
> 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: wd(a)denx.de
> A modem is a baudy house.
------------------------------
Message: 6
Date: Fri, 09 Mar 2012 15:02:16 +0100
From: Wolfgang Denk <wd(a)denx.de>
Subject: Re: [U-Boot] ubifsmount reports "Error reading superblock",
but linux can mount FS
To: Alex Zeffertt <azeffertt(a)cambridgesys.com>
Cc: u-boot(a)lists.denx.de, Stefan Roese <sr(a)denx.de>
Message-ID: <20120309140216.E2949202D70(a)gemini.denx.de>
Content-Type: text/plain; charset=UTF-8
Dear Alex,
In message <CANNiwJKREXiOBfiA_1v_-QGMoV_A59Ce0ADcVfK1xLMFkReFgw(a)mail.gmail.com> you wrote:
>
> > Can you please try out and test what happens when you increase the
> > size of the malloc arena? "include/configs/openrd.h" includes
> > "include/configs/mv-common.h" which sets CONFIG_SYS_MALLOC_LEN to
> > 1 MiB - try changing it to 4 MiB.
>
> Thanks Wolfgang, that worked! Is there any reason why you would not
> set this variable to the maximum possible. ...
Define "maximum possible". The more memory we reserve here, the less
will be available for loading Linux and root filesystem images and
such. So it's always a compromize: make it as big as needed, but not
(much) bigger.
> ... For example, is this
> memory available to the kernel after it is booted? ...
When the kernel boots, all of U-Boot is gone. The kernel has no idea
of how U-Boot used the memory; all such information is gone, too.
> ... How do you know
> how big this might need to be in order to mount a filesystem that
> "needs recovery"?
I don't know of ways to determine this in advance. Eventually all we
can do is thry what you did: increase the malloc arena when it turns
out to be too small.
If you are willing to invest a little more time, it would be
interesting to test how much memory is actually needed on your system.
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: wd(a)denx.de
In the realm of scientific observation, luck is granted only to those
who are prepared. - Louis Pasteur
------------------------------
Message: 7
Date: Fri, 9 Mar 2012 06:32:44 -0800
From: Simon Glass <sjg(a)chromium.org>
Subject: [U-Boot] A few things for the release?
To: U-Boot Mailing List <u-boot(a)lists.denx.de>
Message-ID:
<CAPnjgZ3J2Tpfa9=ftH_wS50jDsZdK404StC0aYMEfwqYuK3+gg(a)mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Hi,
I have a few more series that I hope will go in this time.
1. I think bootstage is ready
http://patchwork.ozlabs.org/bundle/sjg/bootstage/
2. The generic board init series needs some updates to create
asm/sections.h for each architecture. This changes quite a few
patches, plus there is one that I can drop since Mike fixed s520_timer
already. So I will resend the whole series today. The is enabled only
by a config option.
3. For generic relocation, there is the issue of creating
lib/membasic.c (which is safe I think, but changes things for
everyone) versus using -ffunction-sections and possibly breaking some
boards. The latter solution is probably preferred in the long term,
but I'm not sure if Albert is keep on this happening now. See here for
details:
http://patchwork.ozlabs.org/patch/142216/
Albert, can you please take a look?
4. I have created a bundle for the ARM link-script series as it is today:
http://patchwork.ozlabs.org/bundle/sjg/lds/
Albert you had some comments, the latest of which I answered here:
http://patchwork.ozlabs.org/patch/142254/
Regadrs,
Simon
------------------------------
Message: 8
Date: Fri, 9 Mar 2012 19:29:03 +0530
From: Haneef hawk21 <haneef.hawk21(a)gmail.com>
Subject: [U-Boot] adding new command in u-boot
To: u-boot(a)lists.denx.de
Message-ID:
<CAEwP+aEx15aZh2i2ye1C4gdsZKES_OBTitr6HoCbghUxV0EdKg(a)mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Hi,
I am trying to create a new command that would be used to do custom
tests like mm, md, mtest all at once by calling their do_** function.
So I tried to create a simple command initially to print some message
and print bdinfo in the hush:
I did the following
created a file in common/cmd_myprint.c
the file looks like this
#include <command.h>
#include <common.h>
int do_myprint(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
printf("U-Boot Test");
do_bdinfo(NULL, 0, 0, NULL);
return 0;
}
U_BOOT_CMD(
myprint, 1, 1, do_myprint,
"print message",
""
);
------------------------------
then i added this in makefile
as
COBJS-y += cmd_myprint.o
this got compiled without any problem and even got the hush prompt
but when i gave help command i did not see my command listed there.
please help me in solving this issue.
Thanks,
haneef
------------------------------
Message: 9
Date: Fri, 9 Mar 2012 16:19:51 +0100
From: Anatolij Gustschin <agust(a)denx.de>
Subject: Re: [U-Boot] adding new command in u-boot
To: Haneef hawk21 <haneef.hawk21(a)gmail.com>
Cc: u-boot(a)lists.denx.de
Message-ID: <20120309161951.3fd9362c@wker>
Content-Type: text/plain; charset=US-ASCII
Hi,
On Fri, 9 Mar 2012 19:29:03 +0530
Haneef hawk21 <haneef.hawk21(a)gmail.com> wrote:
> Hi,
>
> I am trying to create a new command that would be used to do custom
> tests like mm, md, mtest all at once by calling their do_** function.
Can't you just put needed commands in a script and run it?
...
> U_BOOT_CMD(
> myprint, 1, 1, do_myprint,
> "print message",
> ""
> );
...
> this got compiled without any problem and even got the hush prompt
> but when i gave help command i did not see my command listed there.
Try to pass a help string as the sixth argument of U_BOOT_CMD().
BR,
Anatolij
------------------------------
Message: 10
Date: Fri, 9 Mar 2012 16:58:41 +0100
From: Stefano Babic <sbabic(a)denx.de>
Subject: [U-Boot] [PATCH 2/2] omap3: fix NAND for tam3517 boards
To: u-boot(a)lists.denx.de
Message-ID: <1331308721-20849-2-git-send-email-sbabic(a)denx.de>
commit 4fee6c2f295f932b8febdc7ce8731ba045695fa5
nand: make 1-bit software ECC configurable
breaks boards using Software ECC and requires that
CONFIG_MTD_ECC_SOFT is set to have the previous
behavior. Fix for tam3517 based boards.
Signed-off-by: Stefano Babic <sbabic(a)denx.de>
Tom Rini <trini(a)ti.com>
---
include/configs/tam3517-common.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h
index 4c4321d..aaf9afe 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -293,6 +293,7 @@
#define CONFIG_MTD_PARTITIONS
#define CONFIG_MTD_DEVICE
#define CONFIG_CMD_MTDPARTS
+#define CONFIG_MTD_ECC_SOFT
/* Setup MTD for NAND on the SOM */
#define MTDIDS_DEFAULT "nand0=omap2-nand.0"
--
1.7.5.4
------------------------------
Message: 11
Date: Fri, 9 Mar 2012 16:58:40 +0100
From: Stefano Babic <sbabic(a)denx.de>
Subject: [U-Boot] [PATCH 1/2] omap3: fix NAND for mcx board
To: u-boot(a)lists.denx.de
Message-ID: <1331308721-20849-1-git-send-email-sbabic(a)denx.de>
commit 4fee6c2f295f932b8febdc7ce8731ba045695fa5
nand: make 1-bit software ECC configurable
breaks boards using Software ECC and requires that
CONFIG_MTD_ECC_SOFT is set to have the previous
behavior. Fix for mcx board.
Signed-off-by: Stefano Babic <sbabic(a)denx.de>
Tom Rini <trini(a)ti.com>
---
include/configs/mcx.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/configs/mcx.h b/include/configs/mcx.h
index 1315c3c..d9bb700 100644
--- a/include/configs/mcx.h
+++ b/include/configs/mcx.h
@@ -140,6 +140,7 @@
#define CONFIG_MTD_PARTITIONS
#define CONFIG_MTD_DEVICE
#define CONFIG_CMD_MTDPARTS
+#define CONFIG_MTD_ECC_SOFT
#undef CONFIG_CMD_FLASH /* flinfo, erase, protect */
#undef CONFIG_CMD_FPGA /* FPGA configuration Support */
--
1.7.5.4
------------------------------
Message: 12
Date: Fri, 9 Mar 2012 09:09:54 -0700
From: Tom Rini <trini(a)ti.com>
Subject: Re: [U-Boot] [PATCH 1/2] omap3: fix NAND for mcx board
To: Stefano Babic <sbabic(a)denx.de>
Cc: u-boot(a)lists.denx.de
Message-ID: <20120309160954.GB11879@bill-the-cat>
Content-Type: text/plain; charset=us-ascii
On Fri, Mar 09, 2012 at 04:58:40PM +0100, Stefano Babic wrote:
> commit 4fee6c2f295f932b8febdc7ce8731ba045695fa5
> nand: make 1-bit software ECC configurable
>
> breaks boards using Software ECC and requires that
> CONFIG_MTD_ECC_SOFT is set to have the previous
> behavior. Fix for mcx board.
>
> Signed-off-by: Stefano Babic <sbabic(a)denx.de>
> Tom Rini <trini(a)ti.com>
The generic NAND commit has been reverted for some time now, please
re-test your boards against current mainline. Thanks!
--
Tom
------------------------------
Message: 13
Date: Fri, 09 Mar 2012 17:19:22 +0100
From: Stefano Babic <sbabic(a)denx.de>
Subject: Re: [U-Boot] [PATCH 1/2] omap3: fix NAND for mcx board
To: Tom Rini <trini(a)ti.com>
Cc: u-boot(a)lists.denx.de
Message-ID: <4F5A2D8A.2040503(a)denx.de>
Content-Type: text/plain; charset=ISO-8859-1
On 09/03/2012 17:09, Tom Rini wrote:
> On Fri, Mar 09, 2012 at 04:58:40PM +0100, Stefano Babic wrote:
>
>> commit 4fee6c2f295f932b8febdc7ce8731ba045695fa5
>> nand: make 1-bit software ECC configurable
>>
>> breaks boards using Software ECC and requires that
>> CONFIG_MTD_ECC_SOFT is set to have the previous
>> behavior. Fix for mcx board.
>>
>> Signed-off-by: Stefano Babic <sbabic(a)denx.de>
>> Tom Rini <trini(a)ti.com>
>
> The generic NAND commit has been reverted for some time now, please
> re-test your boards against current mainline. Thanks!
Thanks Tom ! Please drop my patches, they are not necessary.
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office(a)denx.de
=====================================================================
------------------------------
Message: 14
Date: Fri, 09 Mar 2012 09:57:06 -0700
From: Stephen Warren <swarren(a)wwwdotorg.org>
Subject: Re: [U-Boot] [PATCH 2/2] tegra: Enable pre-console putc() for
Tegra boards
To: Simon Glass <sjg(a)chromium.org>
Cc: linux-tegra(a)vger.kernel.org, U-Boot Mailing List
<u-boot(a)lists.denx.de>, Tom Warren <twarren(a)nvidia.com>
Message-ID: <4F5A3662.3040009(a)wwwdotorg.org>
Content-Type: text/plain; charset=ISO-8859-1
On 03/08/2012 07:52 PM, Simon Glass wrote:
> This is used to display panic messages before the console is active.
>
> Signed-off-by: Simon Glass <sjg(a)chromium.org>
I applied both these patches on top of u-boot-tegra/master, built for
Ventana, and loaded/ran u-boot.bin, and don't see any useful serial
output; there's a bit of periodic binary spew. u-boot-dtb.bin works as
expected.
So, these patches don't appear to solve the problem.
------------------------------
Message: 15
Date: Fri, 09 Mar 2012 18:35:27 +0100
From: Dirk Behme <dirk.behme(a)googlemail.com>
Subject: Re: [U-Boot] A few things for the release?
To: u-boot(a)lists.denx.de
Message-ID: <4F5A3F5F.7020508(a)googlemail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 09.03.2012 15:32, Simon Glass wrote:
> Hi,
>
> I have a few more series that I hope will go in this time.
>
> 1. I think bootstage is ready
>
> http://patchwork.ozlabs.org/bundle/sjg/bootstage/
>
> 2. The generic board init series needs some updates to create
> asm/sections.h for each architecture. This changes quite a few
> patches, plus there is one that I can drop since Mike fixed s520_timer
> already. So I will resend the whole series today. The is enabled only
> by a config option.
>
> 3. For generic relocation, there is the issue of creating
> lib/membasic.c (which is safe I think, but changes things for
> everyone) versus using -ffunction-sections and possibly breaking some
> boards. The latter solution is probably preferred in the long term,
> but I'm not sure if Albert is keep on this happening now. See here for
> details:
>
> http://patchwork.ozlabs.org/patch/142216/
>
> Albert, can you please take a look?
>
> 4. I have created a bundle for the ARM link-script series as it is today:
>
> http://patchwork.ozlabs.org/bundle/sjg/lds/
>
> Albert you had some comments, the latest of which I answered here:
>
> http://patchwork.ozlabs.org/patch/142254/
Using the nice subject ;)
5. I'm still hoping that we could get
http://patchwork.ozlabs.org/patch/136789/
into 2012.0{3,4}.
Best regards
Dirk
------------------------------
Message: 16
Date: Fri, 9 Mar 2012 18:10:04 +0000
From: Alex Zeffertt <azeffertt(a)cambridgesys.com>
Subject: Re: [U-Boot] ubifsmount reports "Error reading superblock",
but linux can mount FS
To: Wolfgang Denk <wd(a)denx.de>, u-boot(a)lists.denx.de
Message-ID:
<CANNiwJLjE1vzPPCPC_-mJE_fZKKKSrrN=6f5YTC7cW51ZNiFPg(a)mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
On 9 March 2012 14:02, Wolfgang Denk <wd(a)denx.de> wrote:
> In message <CANNiwJKREXiOBfiA_1v_-QGMoV_A59Ce0ADcVfK1xLMFkReFgw(a)mail.gmail.com> you wrote:
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?... ?How do you know
>> how big this might need to be in order to mount a filesystem that
>> "needs recovery"?
>
> I don't know of ways to determine this in advance. ?Eventually all we
> can do is thry what you did: increase the malloc arena when it turns
> out to be too small.
>
> If you are willing to invest a little more time, it would be
> interesting to test how much memory is actually needed on your system.
>
I know that 1MiB was too little and 4MiB was enough. However, I don't
know whether a filesystem corruption could occur that caused
ubifsmount to require more than 4MiB. For that reason I made the
malloc area 64MiB. This is half my total RAM, which leaves the other
half for downloading images.
Regards,
Alex
------------------------------
Message: 17
Date: Fri, 9 Mar 2012 10:24:41 -0800
From: Simon Glass <sjg(a)chromium.org>
Subject: Re: [U-Boot] [PATCH 2/2] tegra: Enable pre-console putc() for
Tegra boards
To: Stephen Warren <swarren(a)wwwdotorg.org>
Cc: linux-tegra(a)vger.kernel.org, U-Boot Mailing List
<u-boot(a)lists.denx.de>, Tom Warren <twarren(a)nvidia.com>
Message-ID:
<CAPnjgZ2CnV8LjOJQx3Y-5fP=+xBPa7eAiikBNnJypDq7r1JLWg(a)mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Hi Stephen,
On Fri, Mar 9, 2012 at 8:57 AM, Stephen Warren <swarren(a)wwwdotorg.org> wrote:
> On 03/08/2012 07:52 PM, Simon Glass wrote:
>> This is used to display panic messages before the console is active.
>>
>> Signed-off-by: Simon Glass <sjg(a)chromium.org>
>
> I applied both these patches on top of u-boot-tegra/master, built for
> Ventana, and loaded/ran u-boot.bin, and don't see any useful serial
> output; there's a bit of periodic binary spew. u-boot-dtb.bin works as
> expected.
I don't have a ventana but I think Seaboard is equivalent. I will test
on that and figure out what piece is missing.
>
> So, these patches don't appear to solve the problem.
They do in our tree, but I will take a look.
Regards,
Simon
------------------------------
Message: 18
Date: Fri, 9 Mar 2012 12:32:04 -0800
From: Simon Glass <sjg(a)chromium.org>
Subject: Re: [U-Boot] [PATCH 2/2] tegra: Enable pre-console putc() for
Tegra boards
To: Stephen Warren <swarren(a)wwwdotorg.org>
Cc: U-Boot Mailing List <u-boot(a)lists.denx.de>, Tom Warren
<twarren(a)nvidia.com>
Message-ID:
<CAPnjgZ2nAgGTYvanYSUHBzXYBqHY_1j12ApToqGgUbHzQ1Oy3Q(a)mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
-linux-tegra
Hi Stephen,
On Fri, Mar 9, 2012 at 8:57 AM, Stephen Warren <swarren(a)wwwdotorg.org> wrote:
> On 03/08/2012 07:52 PM, Simon Glass wrote:
>> This is used to display panic messages before the console is active.
>>
>> Signed-off-by: Simon Glass <sjg(a)chromium.org>
>
> I applied both these patches on top of u-boot-tegra/master, built for
> Ventana, and loaded/ran u-boot.bin, and don't see any useful serial
> output; there's a bit of periodic binary spew. u-boot-dtb.bin works as
> expected.
>
> So, these patches don't appear to solve the problem.
You are seeing the output, but since it resets the ns16550 on every
character we are just emitting garbage. I should have pushed back on
just having a board_pre_console_panic() as it would be easier. Anyway,
given that this is what we have, we need a function to drain the FIFO.
Also printf() is silently skipped without a console, so we need to
stop that happening as well.
I will send a new series with those two new patches and dealing with
Mike's comments. It seems to work fine for me on Seaboard.
Regards,
Simon
------------------------------
Message: 19
Date: Fri, 9 Mar 2012 12:32:55 -0800
From: Simon Glass <sjg(a)chromium.org>
Subject: [U-Boot] [PATCH v2 1/4] ns16550: Add function to drain serial
output
To: U-Boot Mailing List <u-boot(a)lists.denx.de>
Cc: Tom Warren <twarren(a)nvidia.com>
Message-ID: <1331325178-14634-1-git-send-email-sjg(a)chromium.org>
Sometimes we want to be sure that the output FIFO has fully drained (e.g.
because we are about to reset or the port or reset the board). Add a
function for this.
Signed-off-by: Simon Glass <sjg(a)chromium.org>
---
Changes in v2:
- Add function to drain the ns16550's FIFO
drivers/serial/ns16550.c | 11 +++++++++++
include/ns16550.h | 3 +++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 0c23955..a082112 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -6,6 +6,7 @@
#include <config.h>
#include <ns16550.h>
+#include <common.h>
#include <watchdog.h>
#include <linux/types.h>
#include <asm/io.h>
@@ -115,4 +116,14 @@ int NS16550_tstc(NS16550_t com_port)
return (serial_in(&com_port->lsr) & UART_LSR_DR) != 0;
}
+/* Wait for the UART's output buffer and holding register to drain */
+void NS16550_drain(NS16550_t regs)
+{
+ u32 mask = UART_LSR_TEMT | UART_LSR_THRE;
+
+ /* Wait for the UART to finish sending */
+ while ((serial_in(®s->lsr) & mask) != mask)
+ udelay(100);
+}
+
#endif /* CONFIG_NS16550_MIN_FUNCTIONS */
diff --git a/include/ns16550.h b/include/ns16550.h
index e9d2eda..16b3828 100644
--- a/include/ns16550.h
+++ b/include/ns16550.h
@@ -166,4 +166,7 @@ void NS16550_init(NS16550_t com_port, int baud_divisor);
void NS16550_putc(NS16550_t com_port, char c);
char NS16550_getc(NS16550_t com_port);
int NS16550_tstc(NS16550_t com_port);
+
+/* Wait for the UART's output buffer and holding register to drain */
+void NS16550_drain(NS16550_t regs);
void NS16550_reinit(NS16550_t com_port, int baud_divisor);
--
1.7.7.3
------------------------------
Message: 20
Date: Fri, 9 Mar 2012 12:32:56 -0800
From: Simon Glass <sjg(a)chromium.org>
Subject: [U-Boot] [PATCH v2 2/4] Enable printf() console if
pre-console putc() is available
To: U-Boot Mailing List <u-boot(a)lists.denx.de>
Cc: Tom Warren <twarren(a)nvidia.com>
Message-ID: <1331325178-14634-2-git-send-email-sjg(a)chromium.org>
At present we skip printf() if there is no hope of it making it to the
console. But this check ignores CONFIG_PRE_CONSOLE_PUTC at present.
Add a check for that also.
Signed-off-by: Simon Glass <sjg(a)chromium.org>
---
Changes in v2:
- Allow printf() output to make it to pre-console putc()
common/console.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/common/console.c b/common/console.c
index 1d9fd7f..38d7094 100644
--- a/common/console.c
+++ b/common/console.c
@@ -447,7 +447,7 @@ int vprintf(const char *fmt, va_list args)
uint i;
char printbuffer[CONFIG_SYS_PBSIZE];
-#ifndef CONFIG_PRE_CONSOLE_BUFFER
+#if !defined(CONFIG_PRE_CONSOLE_BUFFER) && !defined(CONFIG_PRE_CONSOLE_PUTC)
if (!gd->have_console)
return 0;
#endif
--
1.7.7.3
------------------------------
Message: 21
Date: Fri, 9 Mar 2012 12:32:57 -0800
From: Simon Glass <sjg(a)chromium.org>
Subject: [U-Boot] [PATCH v2 3/4] tegra: Implement pre-console putc()
for fdt warning
To: U-Boot Mailing List <u-boot(a)lists.denx.de>
Cc: Stephen Warren <swarren(a)nvidia.com>, Tom Warren
<twarren(a)nvidia.com>
Message-ID: <1331325178-14634-3-git-send-email-sjg(a)chromium.org>
When there is not device tree file available to U-Boot, we panic.
Implement board_pre_console_putc() so that this panic will be displayed
on the serial console.
Signed-off-by: Simon Glass <sjg(a)chromium.org>
---
Changes in v2:
- Tidy up casting in board_pre_console_putc()
- Use 'const' for uart_reg_addr
arch/arm/cpu/armv7/tegra2/board.c | 61 +++++++++++++++++++++++++++++++++++++
1 files changed, 61 insertions(+), 0 deletions(-)
diff --git a/arch/arm/cpu/armv7/tegra2/board.c b/arch/arm/cpu/armv7/tegra2/board.c
index 77a627d..0517d72 100644
--- a/arch/arm/cpu/armv7/tegra2/board.c
+++ b/arch/arm/cpu/armv7/tegra2/board.c
@@ -23,9 +23,11 @@
#include <common.h>
#include <asm/io.h>
+#include <ns16550.h>
#include "ap20.h"
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
+#include <asm/arch/gpio.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/tegra2.h>
#include <asm/arch/pmc.h>
@@ -37,6 +39,7 @@ enum {
UARTA = 1 << 0,
UARTB = 1 << 1,
UARTD = 1 << 3,
+ UART_ALL = 0xf,
UART_COUNT = 4,
};
@@ -149,3 +152,61 @@ void enable_caches(void)
dcache_enable();
}
#endif
+
+
+/*
+ * Possible UART locations: we ignore UARTC at 0x70006200 and UARTE at
+ * 0x70006400, since we don't have code to init them
+ */
+static const u32 uart_reg_addr[] = {
+ NV_PA_APB_UARTA_BASE,
+ NV_PA_APB_UARTB_BASE,
+ NV_PA_APB_UARTD_BASE,
+ 0
+};
+
+#ifdef CONFIG_PRE_CONSOLE_PUTC
+/*
+ * This is called when we have no console. About the only reason that this
+ * happen is if we don't have a valid fdt. So we don't know what kind of
+ * Tegra board we are. We blindly try to print a message every which way we
+ * know.
+ */
+void board_pre_console_putc(int ch)
+{
+ int uart_ids = UART_ALL; /* turn it all on! */
+ const u32 *uart_addr;
+ int clock_freq, multiplier, baudrate, divisor;
+
+ /* Try to enable all possible UARTs */
+ setup_uarts(uart_ids);
+
+ /*
+ * Seaboard has a UART switch on PI3. We might be a Seaboard,
+ * so flip it!
+ */
+#ifdef CONFIG_SPI_UART_SWITCH
+ gpio_direction_output(GPIO_PI3, 0);
+#endif
+
+ /*
+ * Now send the string out all the Tegra UARTs. We don't try all
+ * possible configurations, but this could be added if required.
+ */
+ clock_freq = CONFIG_DEFAULT_NS16550_CLK;
+ multiplier = CONFIG_DEFAULT_NS16550_MULT;
+ baudrate = CONFIG_BAUDRATE;
+ divisor = (clock_freq + (baudrate * (multiplier / 2))) /
+ (multiplier * baudrate);
+
+ for (uart_addr = uart_reg_addr; *uart_addr; uart_addr++) {
+ NS16550_t regs = (NS16550_t)*uart_addr;
+
+ NS16550_init(regs, divisor);
+ NS16550_putc(regs, ch);
+ if (ch == '\n')
+ NS16550_putc(regs, '\r');
+ NS16550_drain(regs);
+ }
+}
+#endif
--
1.7.7.3
------------------------------
Message: 22
Date: Fri, 9 Mar 2012 12:32:58 -0800
From: Simon Glass <sjg(a)chromium.org>
Subject: [U-Boot] [PATCH v2 4/4] tegra: Enable pre-console putc() for
Tegra boards
To: U-Boot Mailing List <u-boot(a)lists.denx.de>
Cc: Stephen Warren <swarren(a)nvidia.com>, Tom Warren
<twarren(a)nvidia.com>
Message-ID: <1331325178-14634-4-git-send-email-sjg(a)chromium.org>
This is used to display panic messages before the console is active.
Signed-off-by: Simon Glass <sjg(a)chromium.org>
---
include/configs/tegra2-common.h | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/include/configs/tegra2-common.h b/include/configs/tegra2-common.h
index 837f859..368f3eb 100644
--- a/include/configs/tegra2-common.h
+++ b/include/configs/tegra2-common.h
@@ -68,11 +68,18 @@
*/
#define V_NS16550_CLK 216000000 /* 216MHz (pllp_out0) */
+/* Default serial clock and multiplier */
+#define CONFIG_DEFAULT_NS16550_CLK V_NS16550_CLK
+#define CONFIG_DEFAULT_NS16550_MULT 16
+
#define CONFIG_SYS_NS16550
#define CONFIG_SYS_NS16550_SERIAL
#define CONFIG_SYS_NS16550_REG_SIZE (-4)
#define CONFIG_SYS_NS16550_CLK V_NS16550_CLK
+/* We use this for a warning message when no device tree is present */
+#define CONFIG_PRE_CONSOLE_PUTC
+
/*
* select serial console configuration
*/
--
1.7.7.3
------------------------------
Message: 23
Date: Fri, 9 Mar 2012 12:59:38 -0800
From: Tom Warren <TWarren(a)nvidia.com>
Subject: Re: [U-Boot] [PATCH v2 1/4] ns16550: Add function to drain
serial output
To: Simon Glass <sjg(a)chromium.org>, U-Boot Mailing List
<u-boot(a)lists.denx.de>
Message-ID:
<5FBF8E85CA34454794F0F7ECBA79798F37971BC0CD(a)HQMAIL04.nvidia.com>
Content-Type: text/plain; charset="us-ascii"
Simon,
> -----Original Message-----
> From: Simon Glass [mailto:sjg@chromium.org]
> Sent: Friday, March 09, 2012 1:33 PM
> To: U-Boot Mailing List
> Cc: Tom Warren; Stephen Warren; Simon Glass
> Subject: [PATCH v2 1/4] ns16550: Add function to drain serial output
This patch series (v2, 1-4) works for me on my Seaboard - I get a message about 'No valid fdt found', etc.
So:
Tested-by: Tom Warren <twarren(a)nvidia.com>
Acked-by: Tom Warren <twarren(a)nvidia.com>
If no one objects, I'll apply this series, and Stephen's 'Makefile: fdt: Make the final build result be u-boot.bin' patch (which also works OK, BTW) to my previous pull request and resend to Albert.
Tom
--
nvpublic
>
> Sometimes we want to be sure that the output FIFO has fully drained (e.g.
> because we are about to reset or the port or reset the board). Add a
> function for this.
>
> Signed-off-by: Simon Glass <sjg(a)chromium.org>
> ---
> Changes in v2:
> - Add function to drain the ns16550's FIFO
>
> drivers/serial/ns16550.c | 11 +++++++++++
> include/ns16550.h | 3 +++
> 2 files changed, 14 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index
> 0c23955..a082112 100644
> --- a/drivers/serial/ns16550.c
> +++ b/drivers/serial/ns16550.c
> @@ -6,6 +6,7 @@
>
> #include <config.h>
> #include <ns16550.h>
> +#include <common.h>
> #include <watchdog.h>
> #include <linux/types.h>
> #include <asm/io.h>
> @@ -115,4 +116,14 @@ int NS16550_tstc(NS16550_t com_port)
> return (serial_in(&com_port->lsr) & UART_LSR_DR) != 0; }
>
> +/* Wait for the UART's output buffer and holding register to drain */
> +void NS16550_drain(NS16550_t regs) {
> + u32 mask = UART_LSR_TEMT | UART_LSR_THRE;
> +
> + /* Wait for the UART to finish sending */
> + while ((serial_in(®s->lsr) & mask) != mask)
> + udelay(100);
> +}
> +
> #endif /* CONFIG_NS16550_MIN_FUNCTIONS */ diff --git a/include/ns16550.h
> b/include/ns16550.h index e9d2eda..16b3828 100644
> --- a/include/ns16550.h
> +++ b/include/ns16550.h
> @@ -166,4 +166,7 @@ void NS16550_init(NS16550_t com_port, int baud_divisor);
> void NS16550_putc(NS16550_t com_port, char c); char NS16550_getc(NS16550_t
> com_port); int NS16550_tstc(NS16550_t com_port);
> +
> +/* Wait for the UART's output buffer and holding register to drain */
> +void NS16550_drain(NS16550_t regs);
> void NS16550_reinit(NS16550_t com_port, int baud_divisor);
> --
> 1.7.7.3
------------------------------
Message: 24
Date: Fri, 09 Mar 2012 14:00:56 -0700
From: Stephen Warren <swarren(a)wwwdotorg.org>
Subject: Re: [U-Boot] [PATCH v2 1/4] ns16550: Add function to drain
serial output
To: Simon Glass <sjg(a)chromium.org>
Cc: U-Boot Mailing List <u-boot(a)lists.denx.de>, Tom Warren
<twarren(a)nvidia.com>
Message-ID: <4F5A6F88.6020503(a)wwwdotorg.org>
Content-Type: text/plain; charset=ISO-8859-1
On 03/09/2012 01:32 PM, Simon Glass wrote:
> Sometimes we want to be sure that the output FIFO has fully drained (e.g.
> because we are about to reset or the port or reset the board). Add a
> function for this.
>
> Signed-off-by: Simon Glass <sjg(a)chromium.org>
The series,
Tested-by: Stephen Warren <swarren(a)wwwdotorg.org>
Tom,
I'm OK with you adding these patches to u-boot-tegra/master and sending
a pull request for that. Just please put these patches before any that
actually enable CONFIG_OF_CONTROL for any boards, so there's never a
window of broken commits.
I think it'd be nice at this stage to also drop the commit that turns
Ventana into a DT board, since re-using the Seaboard .dts file for
Ventana isn't correct. However, IIRC that commit was added to WAR some
build issue with Simon's patch series? If that's still a problem, then
I'm OK with converting Ventana if we have to, but we'll need to be very
careful that tegra-seaboard.dts doesn't add stuff that'll fail on, or
damage, Ventana.
------------------------------
Message: 25
Date: Fri, 9 Mar 2012 13:08:33 -0800
From: Simon Glass <sjg(a)chromium.org>
Subject: Re: [U-Boot] [PATCH v2 1/4] ns16550: Add function to drain
serial output
To: Stephen Warren <swarren(a)wwwdotorg.org>
Cc: U-Boot Mailing List <u-boot(a)lists.denx.de>, Tom Warren
<twarren(a)nvidia.com>
Message-ID:
<CAPnjgZ2U_Aobrj4YGTFzJVJ2xRhaZ9E9Jo0tj7Whnb7ECnZL1A(a)mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Hi,
On Fri, Mar 9, 2012 at 1:00 PM, Stephen Warren <swarren(a)wwwdotorg.org> wrote:
> On 03/09/2012 01:32 PM, Simon Glass wrote:
>> Sometimes we want to be sure that the output FIFO has fully drained (e.g.
>> because we are about to reset or the port or reset the board). Add a
>> function for this.
>>
>> Signed-off-by: Simon Glass <sjg(a)chromium.org>
>
> The series,
>
> Tested-by: Stephen Warren <swarren(a)wwwdotorg.org>
>
> Tom,
>
> I'm OK with you adding these patches to u-boot-tegra/master and sending
> a pull request for that. Just please put these patches before any that
> actually enable CONFIG_OF_CONTROL for any boards, so there's never a
> window of broken commits.
>
> I think it'd be nice at this stage to also drop the commit that turns
> Ventana into a DT board, since re-using the Seaboard .dts file for
> Ventana isn't correct. However, IIRC that commit was added to WAR some
> build issue with Simon's patch series? If that's still a problem, then
> I'm OK with converting Ventana if we have to, but we'll need to be very
> careful that tegra-seaboard.dts doesn't add stuff that'll fail on, or
> damage, Ventana.
A few points:
1. Yes you can drop the Ventana commit and I agree it is a good idea.
We should have a real Ventana .dts file I think. Ventana should built
ok without a device tree now. The problem was in my clock.c patch.
2. I have held off responding to Stephen's patch on the ML to see what
other say. My view is that it is controversial since it changes the
so-far accepted meaning of u-boot.bin and the behaviour of the U-Boot
Makefile. Plus it is not really necessary as a means of informing the
user since we put the pre-console putc() for exactly this problem. So
I would rather leave Stephen's patch out at until people have time to
decide that I am wrong about it. We already have CONFIG_OF_EMBED to
build the fdt into u-boot.bin. Grant Likely had big reservations about
this feature - let's not bring it in by stealth.
Regards,
Simon
------------------------------
Message: 26
Date: Fri, 9 Mar 2012 13:23:31 -0800
From: Tom Warren <TWarren(a)nvidia.com>
Subject: Re: [U-Boot] [PATCH v2 1/4] ns16550: Add function to drain
serial output
To: Simon Glass <sjg(a)chromium.org>, Stephen Warren
<swarren(a)wwwdotorg.org>
Cc: U-Boot Mailing List <u-boot(a)lists.denx.de>
Message-ID:
<5FBF8E85CA34454794F0F7ECBA79798F37971BC0D6(a)HQMAIL04.nvidia.com>
Content-Type: text/plain; charset="us-ascii"
Simon/Stephen,
> -----Original Message-----
> From: sjg(a)google.com [mailto:sjg@google.com] On Behalf Of Simon Glass
> Sent: Friday, March 09, 2012 2:09 PM
> To: Stephen Warren
> Cc: U-Boot Mailing List; Tom Warren
> Subject: Re: [PATCH v2 1/4] ns16550: Add function to drain serial output
>
> Hi,
>
> On Fri, Mar 9, 2012 at 1:00 PM, Stephen Warren <swarren(a)wwwdotorg.org>
> wrote:
> > On 03/09/2012 01:32 PM, Simon Glass wrote:
> >> Sometimes we want to be sure that the output FIFO has fully drained (e.g.
> >> because we are about to reset or the port or reset the board). Add a
> >> function for this.
> >>
> >> Signed-off-by: Simon Glass <sjg(a)chromium.org>
> >
> > The series,
> >
> > Tested-by: Stephen Warren <swarren(a)wwwdotorg.org>
> >
> > Tom,
> >
> > I'm OK with you adding these patches to u-boot-tegra/master and
> > sending a pull request for that. Just please put these patches before
> > any that actually enable CONFIG_OF_CONTROL for any boards, so there's
> > never a window of broken commits.
> >
> > I think it'd be nice at this stage to also drop the commit that turns
> > Ventana into a DT board, since re-using the Seaboard .dts file for
> > Ventana isn't correct. However, IIRC that commit was added to WAR some
> > build issue with Simon's patch series? If that's still a problem, then
> > I'm OK with converting Ventana if we have to, but we'll need to be
> > very careful that tegra-seaboard.dts doesn't add stuff that'll fail
> > on, or damage, Ventana.
>
> A few points:
>
> 1. Yes you can drop the Ventana commit and I agree it is a good idea.
> We should have a real Ventana .dts file I think. Ventana should built ok
> without a device tree now. The problem was in my clock.c patch.
>
> 2. I have held off responding to Stephen's patch on the ML to see what other
> say. My view is that it is controversial since it changes the so-far
> accepted meaning of u-boot.bin and the behaviour of the U-Boot Makefile.
> Plus it is not really necessary as a means of informing the user since we
> put the pre-console putc() for exactly this problem. So I would rather leave
> Stephen's patch out at until people have time to decide that I am wrong
> about it. We already have CONFIG_OF_EMBED to build the fdt into u-boot.bin.
> Grant Likely had big reservations about this feature - let's not bring it in
> by stealth.
>
I see now why it's so hard to find custodians for the U-Boot repos. :/
I've done as Stephen requested and re-ordered the commits so his Makefile fix comes before the config file changes to add CONFIG_OF_CONTROL to Seaboard and Ventana.
I've left the Ventana change that uses the Seaboard .dts file in, as I think it can easily be edited to use a Ventana-specific dts file just as soon as one of you finds one and submits a patch for it. For now, the Seaboard .dts just works.
I've pushed my latest changes to u-boot-tegra/master, and I'm going to let it percolate over the weekend. I'd have liked to get a pull request in to Albert today, before the ARM HEAD moves again, but I'm not going sweat to it since there doesn't seem to be a consensus on how to proceed here. IMO, I see no problem with putting these patches in as they stand, since I've tested them to work OK on Seaboard and Ventana, other (non-DT) Tegra2 boards build fine, and anything here that needs to change can always be edited with a future patch. But I'm going to head out early (it's my birthday today), and pick this up again next week.
Tom
--
nvpublic
> Regards,
> Simon
------------------------------
Message: 27
Date: Fri, 9 Mar 2012 13:29:16 -0800
From: Simon Glass <sjg(a)chromium.org>
Subject: Re: [U-Boot] [PATCH v2 1/4] ns16550: Add function to drain
serial output
To: Tom Warren <TWarren(a)nvidia.com>
Cc: U-Boot Mailing List <u-boot(a)lists.denx.de>
Message-ID:
<CAPnjgZ34SjYWv1A-yZ9Y5BaXPZs3hY8W6OCuLtux5hpqkVykvQ(a)mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Hi Stephen,
On Fri, Mar 9, 2012 at 1:23 PM, Tom Warren <TWarren(a)nvidia.com> wrote:
> Simon/Stephen,
>
>> -----Original Message-----
>> From: sjg(a)google.com [mailto:sjg@google.com] On Behalf Of Simon Glass
>> Sent: Friday, March 09, 2012 2:09 PM
>> To: Stephen Warren
>> Cc: U-Boot Mailing List; Tom Warren
>> Subject: Re: [PATCH v2 1/4] ns16550: Add function to drain serial output
>>
>> Hi,
>>
>> On Fri, Mar 9, 2012 at 1:00 PM, Stephen Warren <swarren(a)wwwdotorg.org>
>> wrote:
>> > On 03/09/2012 01:32 PM, Simon Glass wrote:
>> >> Sometimes we want to be sure that the output FIFO has fully drained (e.g.
>> >> because we are about to reset or the port or reset the board). Add a
>> >> function for this.
>> >>
>> >> Signed-off-by: Simon Glass <sjg(a)chromium.org>
>> >
>> > The series,
>> >
>> > Tested-by: Stephen Warren <swarren(a)wwwdotorg.org>
>> >
>> > Tom,
>> >
>> > I'm OK with you adding these patches to u-boot-tegra/master and
>> > sending a pull request for that. Just please put these patches before
>> > any that actually enable CONFIG_OF_CONTROL for any boards, so there's
>> > never a window of broken commits.
>> >
>> > I think it'd be nice at this stage to also drop the commit that turns
>> > Ventana into a DT board, since re-using the Seaboard .dts file for
>> > Ventana isn't correct. However, IIRC that commit was added to WAR some
>> > build issue with Simon's patch series? If that's still a problem, then
>> > I'm OK with converting Ventana if we have to, but we'll need to be
>> > very careful that tegra-seaboard.dts doesn't add stuff that'll fail
>> > on, or damage, Ventana.
>>
>> A few points:
>>
>> 1. Yes you can drop the Ventana commit and I agree it is a good idea.
>> We should have a real Ventana .dts file I think. Ventana should built ok
>> without a device tree now. The problem was in my clock.c patch.
>>
>> 2. I have held off responding to Stephen's patch on the ML to see what other
>> say. My view is that it is controversial since it changes the so-far
>> accepted meaning of u-boot.bin and the behaviour of the U-Boot Makefile.
>> Plus it is not really necessary as a means of informing the user since we
>> put the pre-console putc() for exactly this problem. So I would rather leave
>> Stephen's patch out at until people have time to decide that I am wrong
>> about it. We already have CONFIG_OF_EMBED to build the fdt into u-boot.bin.
>> Grant Likely had big reservations about this feature - let's not bring it in
>> by stealth.
>>
>
> I see now why it's so hard to find custodians for the U-Boot repos. :/
>
> I've done as Stephen requested and re-ordered the commits so his Makefile fix comes before the config file changes to add CONFIG_OF_CONTROL to Seaboard and Ventana.
>
> I've left the Ventana change that uses the Seaboard .dts file in, as I think it can easily be edited to use a Ventana-specific dts file just as soon as one of you finds one and submits a patch for it. For now, the Seaboard .dts just works.
>
> I've pushed my latest changes to u-boot-tegra/master, and I'm going to let it percolate over the weekend. I'd have liked to get a pull request in to Albert today, before the ARM HEAD moves again, but I'm not going sweat to it since there doesn't seem to be a consensus on how to proceed here. IMO, I see no problem with putting these patches in as they stand, since I've tested them to work OK on Seaboard and Ventana, other (non-DT) Tegra2 boards build fine, and anything here that needs to change can always be edited with a future patch. But I'm going to head out early (it's my birthday today), and pick this up again next week.
Happy Birthday Tom!
Stephen, what you do you about leaving out your Makefile patch for
now? It is (I think) the only controversial part of this, and is not
needed to make all this work...
Regards,
Simon
>
> Tom
>
> --
> nvpublic
>> Regards,
>> Simon
------------------------------
Message: 28
Date: Fri, 09 Mar 2012 14:40:17 -0700
From: Stephen Warren <swarren(a)wwwdotorg.org>
Subject: Re: [U-Boot] [PATCH v2 1/4] ns16550: Add function to drain
serial output
To: Simon Glass <sjg(a)chromium.org>
Cc: U-Boot Mailing List <u-boot(a)lists.denx.de>, Tom Warren
<TWarren(a)nvidia.com>
Message-ID: <4F5A78C1.1030405(a)wwwdotorg.org>
Content-Type: text/plain; charset=ISO-8859-1
On 03/09/2012 02:29 PM, Simon Glass wrote:
> On Fri, Mar 9, 2012 at 1:23 PM, Tom Warren <TWarren(a)nvidia.com> wrote:
>> sjg(a)google.com wrote at Friday, March 09, 2012 2:09 PM:
...
>>> 2. I have held off responding to Stephen's patch on the ML to see what other
>>> say. My view is that it is controversial since it changes the so-far
>>> accepted meaning of u-boot.bin and the behaviour of the U-Boot Makefile.
>>> Plus it is not really necessary as a means of informing the user since we
>>> put the pre-console putc() for exactly this problem. So I would rather leave
>>> Stephen's patch out at until people have time to decide that I am wrong
>>> about it. We already have CONFIG_OF_EMBED to build the fdt into u-boot.bin.
>>> Grant Likely had big reservations about this feature - let's not bring it in
>>> by stealth.
I don't quite see how this is bringing the feature in by stealth; the
exact same set of files (one with and without appended DTB already in
place) is still available, just under filenames that are likely to cause
less surprise to the user.
...
> Stephen, what you do you about leaving out your Makefile patch for
> now? It is (I think) the only controversial part of this, and is not
> needed to make all this work...
Yes, I'm happy with that. The issue I had was the surprising result of
U-Boot hanging without giving any clues why, and that's addressed by the
messages that are now printed with your latest patches.
While I still like the patch to rename the files in the top-level
Makefile, I do agree that including it in a pull request without more
widespread discussion and agreement is not a good idea.
BTW, happy birthday Tom.
------------------------------
Message: 29
Date: Fri, 9 Mar 2012 14:39:00 -0800
From: Tom Warren <TWarren(a)nvidia.com>
Subject: [U-Boot] pull request for u-boot-tegra/master
To: Albert ARIBAUD <albert.u.boot(a)aribaud.net>
Cc: U-Boot Mailing List <u-boot(a)lists.denx.de>, Stephen Warren
<swarren(a)nvidia.com>
Message-ID:
<5FBF8E85CA34454794F0F7ECBA79798F37971BC102(a)HQMAIL04.nvidia.com>
Content-Type: text/plain; charset="us-ascii"
Albert,
Please pull u-boot-tegra/master into arm master. Thanks!
The following changes since commit 32ec258f829808dd7cf74fd83ba999fdaaeab715:
IXP: Fix GPIO_INT_ACT_LOW_SET() (2012-03-08 08:11:45 +0100)
are available in the git repository at:
git://git.denx.de/u-boot-tegra master
Simon Glass (26):
fdt: Add fdtdec_find_aliases() to deal with alias nodes
fdt: Add tests for fdtdec
fdt: Tidy up a few fdtdec problems
fdt: Add functions to access phandles, arrays and bools
fdt: Add basic support for decoding GPIO definitions
arm: fdt: Add skeleton device tree file from kernel
tegra: fdt: Add Tegra2x device tree file from kernel
tegra: fdt: Add device tree file for Tegra2 Seaboard from kernel
fdt: Add staging area for device tree binding documentation
fdt: Add tegra-usb bindings file from linux
tegra: fdt: Add additional USB binding
tegra: fdt: Add clock bindings
tegra: fdt: Add clock bindings for Tegra2 Seaboard
tegra: usb: fdt: Add additional device tree definitions for USB ports
tegra: usb: fdt: Add USB definitions for Tegra2 Seaboard
usb: Add support for txfifo threshold
tegra: fdt: Add function to return peripheral/clock ID
tegra: usb: Add support for Tegra USB peripheral
tegra: usb: Add USB support to nvidia boards
tegra: usb: Add common USB defines for tegra2 boards
tegra: usb: Enable USB on Seaboard
tegra: fdt: Enable FDT support for Seaboard
ns16550: Add function to drain serial output
Enable printf() console if pre-console putc() is available
tegra: Implement pre-console putc() for fdt warning
tegra: Enable pre-console putc() for Tegra boards
Tom Warren (2):
arm: Tegra2: Fix ELDK42 gcc failure with inline asm stack pointer load
tegra: fdt: Enable FDT support for Ventana
README | 3 +
arch/arm/cpu/armv7/tegra2/Makefile | 4 +-
arch/arm/cpu/armv7/tegra2/ap20.c | 10 +-
arch/arm/cpu/armv7/tegra2/board.c | 61 +++
arch/arm/cpu/armv7/tegra2/clock.c | 58 +++
arch/arm/cpu/armv7/tegra2/config.mk | 2 +
arch/arm/cpu/armv7/tegra2/usb.c | 460 ++++++++++++++++++++
arch/arm/dts/skeleton.dtsi | 13 +
arch/arm/dts/tegra20.dtsi | 188 ++++++++
arch/arm/include/asm/arch-tegra2/clock.h | 13 +
arch/arm/include/asm/arch-tegra2/tegra2.h | 2 +
arch/arm/include/asm/arch-tegra2/usb.h | 252 +++++++++++
board/nvidia/common/board.c | 12 +
board/nvidia/common/board.h | 6 +
board/nvidia/dts/tegra2-seaboard.dts | 74 ++++
board/nvidia/seaboard/seaboard.c | 6 +
common/console.c | 2 +-
doc/device-tree-bindings/README | 17 +
.../clock/nvidia,tegra20-car.txt | 207 +++++++++
doc/device-tree-bindings/usb/tegra-usb.txt | 25 +
drivers/serial/ns16550.c | 11 +
drivers/usb/host/Makefile | 1 +
drivers/usb/host/ehci-hcd.c | 7 +
drivers/usb/host/ehci-tegra.c | 62 +++
drivers/usb/host/ehci.h | 6 +-
include/configs/seaboard.h | 12 +
include/configs/tegra2-common.h | 17 +
include/configs/ventana.h | 5 +
include/fdtdec.h | 155 +++++++-
include/ns16550.h | 3 +
lib/Makefile | 1 +
lib/fdtdec.c | 285 ++++++++++++-
lib/fdtdec_test.c | 226 ++++++++++
33 files changed, 2188 insertions(+), 18 deletions(-)
create mode 100644 arch/arm/cpu/armv7/tegra2/usb.c
create mode 100644 arch/arm/dts/skeleton.dtsi
create mode 100644 arch/arm/dts/tegra20.dtsi
create mode 100644 arch/arm/include/asm/arch-tegra2/usb.h
create mode 100644 board/nvidia/dts/tegra2-seaboard.dts
create mode 100644 doc/device-tree-bindings/README
create mode 100644 doc/device-tree-bindings/clock/nvidia,tegra20-car.txt
create mode 100644 doc/device-tree-bindings/usb/tegra-usb.txt
create mode 100644 drivers/usb/host/ehci-tegra.c
create mode 100644 lib/fdtdec_test.c
--
nvpublic
------------------------------
Message: 30
Date: Fri, 9 Mar 2012 20:33:05 -0300
From: Fabio Estevam <festevam(a)gmail.com>
Subject: Re: [U-Boot] DEVELOPER's MEETING
To: Wolfgang Denk <wd(a)denx.de>
Cc: u-boot(a)lists.denx.de
Message-ID:
<CAOMZO5BgTUYSH9MFSbFkZf4Dx8O-VeiUW46WErQgLa07_gGZHw(a)mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
Hi Wolfgang,
On Thu, Mar 8, 2012 at 9:16 AM, Wolfgang Denk <wd(a)denx.de> wrote:
> Hi,
>
> I was just thinking if this year's Libre Software Meeting (LSM - from
> 7th to 12th July in Geneva, Switzerland) would be a suitable event to
> arrange a meeting of some U-Boot developers?
What about arranging the U-boot meeting at ELCE ?
https://events.linuxfoundation.org/events/embedded-linux-conference-europe
Regards,
Fabio Estevam
------------------------------
Message: 31
Date: Fri, 09 Mar 2012 17:11:00 -0700
From: Matt Waddel <matt.waddel(a)linaro.org>
Subject: Re: [U-Boot] [PATCH resend] ARMV7/Vexpress: add missing
get_ticks() and get_tbclk()
To: u-boot(a)lists.denx.de
Message-ID: <4F5A9C14.5000004(a)linaro.org>
Content-Type: text/plain; charset=ISO-8859-1
On 02/22/2012 07:56 AM, walimis wrote:
> From: Liming Wang <walimisdev(a)gmail.com>
>
> commit f31a911fe (arm, post: add missing post_time_ms for arm)
> enables get_ticks and get_tbclk for all arm based boards,
> arm/vexpress also needs these functions to work.
>
> Signed-off-by: Liming Wang <walimisdev(a)gmail.com>
Acked-by: Matt.Waddel(a)linaro.org
> ---
> board/armltd/vexpress/ca9x4_ct_vxp.c | 10 ++++++++++
> 1 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/board/armltd/vexpress/ca9x4_ct_vxp.c b/board/armltd/vexpress/ca9x4_ct_vxp.c
> index da6f14d..0b36d12 100644
> --- a/board/armltd/vexpress/ca9x4_ct_vxp.c
> +++ b/board/armltd/vexpress/ca9x4_ct_vxp.c
> @@ -226,3 +226,13 @@ void lowlevel_init(void)
> ulong get_board_rev(void){
> return readl((u32 *)SYS_ID);
> }
> +
> +unsigned long long get_ticks(void)
> +{
> + return get_timer(0);
> +}
> +
> +ulong get_tbclk (void)
> +{
> + return (ulong)CONFIG_SYS_HZ;
> +}
------------------------------
Message: 32
Date: Sat, 10 Mar 2012 09:16:20 +0100
From: Wolfgang Denk <wd(a)denx.de>
Subject: Re: [U-Boot] [PATCH v2 3/4] tegra: Implement pre-console
putc() for fdt warning
To: Simon Glass <sjg(a)chromium.org>
Cc: U-Boot Mailing List <u-boot(a)lists.denx.de>, Stephen Warren
<swarren(a)nvidia.com>, Tom Warren <twarren(a)nvidia.com>
Message-ID: <20120310081620.CB434202C07(a)gemini.denx.de>
Content-Type: text/plain; charset=UTF-8
Dear Simon Glass,
In message <1331325178-14634-3-git-send-email-sjg(a)chromium.org> you wrote:
> When there is not device tree file available to U-Boot, we panic.
> Implement board_pre_console_putc() so that this panic will be displayed
> on the serial console.
...
> +void board_pre_console_putc(int ch)
> +{
...
> + for (uart_addr = uart_reg_addr; *uart_addr; uart_addr++) {
> + NS16550_t regs = (NS16550_t)*uart_addr;
> +
> + NS16550_init(regs, divisor);
> + NS16550_putc(regs, ch);
> + if (ch == '\n')
> + NS16550_putc(regs, '\r');
> + NS16550_drain(regs);
Why is this needed for every output character?
Actually, why is it needed at all?
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: wd(a)denx.de
All a hacker needs is a tight PUSHJ, a loose pair of UUOs, and a warm
place to shift.
------------------------------
Message: 33
Date: Sat, 10 Mar 2012 09:19:23 +0100
From: Wolfgang Denk <wd(a)denx.de>
Subject: Re: [U-Boot] [PATCH v2 1/4] ns16550: Add function to drain
serial output
To: Simon Glass <sjg(a)chromium.org>
Cc: U-Boot Mailing List <u-boot(a)lists.denx.de>, Tom Warren
<twarren(a)nvidia.com>
Message-ID: <20120310081923.BB158202C07(a)gemini.denx.de>
Content-Type: text/plain; charset=UTF-8
Dear Simon Glass,
In message <1331325178-14634-1-git-send-email-sjg(a)chromium.org> you wrote:
> Sometimes we want to be sure that the output FIFO has fully drained (e.g.
> because we are about to reset or the port or reset the board). Add a
Seems there is one unintentional "or".
> function for this.
>
> Signed-off-by: Simon Glass <sjg(a)chromium.org>
> ---
> Changes in v2:
> - Add function to drain the ns16550's FIFO
>
> drivers/serial/ns16550.c | 11 +++++++++++
> include/ns16550.h | 3 +++
> 2 files changed, 14 insertions(+), 0 deletions(-)
I dislike this. This is mostly dead code, enabled for eveybody where
it just increases the memory footprint for no use.
Also I do not understand why it would be needed at all. We did not
have such a requirement for any system before, so I feel you must be
doing something wrong, or at least very exotic.
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: wd(a)denx.de
Extreme feminine beauty is always disturbing.
-- Spock, "The Cloud Minders", stardate 5818.4
------------------------------
Message: 34
Date: Sat, 10 Mar 2012 09:20:28 +0100
From: Wolfgang Denk <wd(a)denx.de>
Subject: Re: [U-Boot] [PATCH v2 1/4] ns16550: Add function to drain
serial output
To: Tom Warren <TWarren(a)nvidia.com>
Cc: U-Boot Mailing List <u-boot(a)lists.denx.de>
Message-ID: <20120310082028.0F896202C07(a)gemini.denx.de>
Content-Type: text/plain; charset=UTF-8
Dear Tom Warren,
In message <5FBF8E85CA34454794F0F7ECBA79798F37971BC0CD(a)HQMAIL04.nvidia.com> you wrote:
>
> If no one objects, I'll apply this series, and Stephen's 'Makefile: fdt: Make the final build result be u-boot.bin' patch (which also works OK, BTW) to my previous pull request and resend to Albert.
I do object. This affects common code.
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: wd(a)denx.de
"On two occasions I have been asked [by members of Parliament!],
'Pray, Mr. Babbage, if you put into the machine wrong figures, will
the right answers come out?' I am not able rightly to apprehend the
kind of confusion of ideas that could provoke such a question."
- Charles Babbage
------------------------------
Message: 35
Date: Sat, 10 Mar 2012 09:25:33 +0100
From: Wolfgang Denk <wd(a)denx.de>
Subject: Re: [U-Boot] pull request for u-boot-tegra/master
To: Albert ARIBAUD <albert.u.boot(a)aribaud.net>
Cc: U-Boot Mailing List <u-boot(a)lists.denx.de>, Stephen Warren
<swarren(a)nvidia.com>, Tom Warren <TWarren(a)nvidia.com>
Message-ID: <20120310082533.D3252202C07(a)gemini.denx.de>
Content-Type: text/plain; charset=UTF-8
Dear Albert,
In message <5FBF8E85CA34454794F0F7ECBA79798F37971BC102(a)HQMAIL04.nvidia.com> Tom Warren wrote:
>
> Please pull u-boot-tegra/master into arm master. Thanks!
Please do NOT pull this.
> ns16550: Add function to drain serial output
> Enable printf() console if pre-console putc() is available
> tegra: Implement pre-console putc() for fdt warning
> tegra: Enable pre-console putc() for Tegra boards
I'm not OK with these patches yet. Also, they affect common code.
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: wd(a)denx.de
Never underestimate the power of human stupidity when it comes to
using technology they don't understand.
------------------------------
Message: 36
Date: Sat, 10 Mar 2012 09:31:44 +0100
From: Wolfgang Denk <wd(a)denx.de>
Subject: Re: [U-Boot] DEVELOPER's MEETING
To: Fabio Estevam <festevam(a)gmail.com>
Cc: u-boot(a)lists.denx.de
Message-ID: <20120310083144.A54B8202C07(a)gemini.denx.de>
Content-Type: text/plain; charset=UTF-8
Dear Fabio,
In message <CAOMZO5BgTUYSH9MFSbFkZf4Dx8O-VeiUW46WErQgLa07_gGZHw(a)mail.gmail.com> you wrote:
>
> > I was just thinking if this year's Libre Software Meeting (LSM - from
> > 7th to 12th July in Geneva, Switzerland) would be a suitable event to
> > arrange a meeting of some U-Boot developers?
There were a number of reasons that made me looking at this: Geneva is pretty
much central in Europe and easy to reach, and there are no other
interesting (at least to me) events around this time.
> What about arranging the U-boot meeting at ELCE ?
> https://events.linuxfoundation.org/events/embedded-linux-conference-europe
ELCE always manages to fall close to other events like trade shows.
For example this autumn's ELCE (November 5-7) kind of collides with
electronica 2012 in Munich (Nov 13-16).
But I'm open to suggestions / opinions.
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: wd(a)denx.de
The software required `Windows 95 or better', so I installed Linux.
------------------------------
Message: 37
Date: Sat, 10 Mar 2012 14:03:45 +0530
From: Sughosh Ganu <urwithsughosh(a)gmail.com>
Subject: Re: [U-Boot] [PATCH] arm: Don't use printf() in SPL builds
To: Simon Glass <sjg(a)chromium.org>
Cc: Tom Rini <trini(a)ti.com>, U-Boot Mailing List
<u-boot(a)lists.denx.de>, Heiko Schocher <hs(a)denx.de>, Christian Riesch
<christian.riesch(a)omicron.at>
Message-ID: <20120310083345.GA6861@Hardy>
Content-Type: text/plain; charset="us-ascii"
hi Simon,
On Sat Mar 03, 2012 at 12:33:15PM -0800, Simon Glass wrote:
> raise() likes to call printf() if it is available, but in SPL builds it
> either is not available, or adds a large chunk to the resulting image
> size.
>
> So don't call it even if it is available.
>
> This change reduces SPL size from 10KB to 6.3KB on hawkboard, for
> example, using generic relocation.
>
> Signed-off-by: Simon Glass <sjg(a)chromium.org>
> ---
> arch/arm/lib/eabi_compat.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c
> index 2028dbd..44eebe0 100644
> --- a/arch/arm/lib/eabi_compat.c
> +++ b/arch/arm/lib/eabi_compat.c
> @@ -13,7 +13,8 @@
>
> int raise (int signum)
> {
> -#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
> + /* Even if printf() is available, it's large. Punt it for SPL builds */
> +#if !defined(CONFIG_SPL_BUILD)
> printf("raise: Signal # %d caught\n", signum);
> #endif
I tested with this change on hawkboard, and after applying this
change, the spl size increase is 412 bytes against the 4k increase
that we get with libcommon changes introduced. So this patch works
fine.
Can you please check if libcommon support is needed for the
cam_enc_4xx board -- your relocation patch series did not add
CONFIG_SPL_LIBCOMMON_SUPPORT to this board. This will affect my
patch to initialise gd and bd objects for hawkboard. Please let me
know, and i will spin a patch accordingly.
-sughosh
------------------------------
Message: 38
Date: Sat, 10 Mar 2012 10:47:35 +0000 (UTC)
From: Balaji Sivakumar <balajisk(a)hcl.com>
Subject: Re: [U-Boot] Does U-boot supports Spansion S29GL512P NOR
Flash?
To: u-boot(a)lists.denx.de
Message-ID: <loom.20120310T113930-255(a)post.gmane.org>
Content-Type: text/plain; charset=us-ascii
Stefan Roese <sr <at> denx.de> writes:
>
> Hi Prakash,
>
> On Friday 09 April 2010 07:26:37 prakash bedge wrote:
> > In U-boot I am not seeing the support for Spansion S29GL512P NOR flash.
> >
> > This chip is CFI compliant so I believe the common CFI driver should work
> > with this chip.
> >
> > Does U-boot supports S29GL512P NOR flash or I have to implement the
> > functionality to support S29GL512P?
> >
> > If anyone has tried with S29GL512P NOR flash please share the experiecne.
>
> This chip is currently supported by the common CFI NOR FLASH driver. So it
> should just work for your board as well.
>
> Cheers,
> Stefan
>
> --
> DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office <at> denx.de
>
Hi Stefan,
I am Balaji. am using IMX6 base custom board. In my board am using S29GL01G
NOR Flash to srore u-boot and kernel. I understand from the data sheet this
NOR Flash is CFI based on. So i have added Configurations for CFI Flash driver.
Currently am loading the U-boot into DDR3 and able to excute U-boot test
commands. When i put flinfo , am getting "missing or unknow flash type" and
while loading the u-boot it is printing as " Unknown flash on BANK 1 - Size -
0MB". So am not sure what am missing here or i have to add anything extra in
teh config file. Please request you to check and provide your suggestion.
Thanks,
Balaji S
------------------------------
_______________________________________________
U-Boot mailing list
U-Boot(a)lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
End of U-Boot Digest, Vol 46, Issue 17
**************************************
::DISCLAIMER::
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.
-----------------------------------------------------------------------------------------------------------------------
1
0

09 Mar '12
When there is not device tree file available to U-Boot, we panic.
Implement board_pre_console_putc() so that this panic will be displayed
on the serial console.
Signed-off-by: Simon Glass <sjg(a)chromium.org>
---
arch/arm/cpu/armv7/tegra2/board.c | 58 +++++++++++++++++++++++++++++++++++++
1 files changed, 58 insertions(+), 0 deletions(-)
diff --git a/arch/arm/cpu/armv7/tegra2/board.c b/arch/arm/cpu/armv7/tegra2/board.c
index 349d50e..4ca1e1f 100644
--- a/arch/arm/cpu/armv7/tegra2/board.c
+++ b/arch/arm/cpu/armv7/tegra2/board.c
@@ -23,9 +23,11 @@
#include <common.h>
#include <asm/io.h>
+#include <ns16550.h>
#include "ap20.h"
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
+#include <asm/arch/gpio.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/tegra2.h>
#include <asm/arch/pmc.h>
@@ -37,6 +39,7 @@ enum {
UARTA = 1 << 0,
UARTB = 1 << 1,
UARTD = 1 << 3,
+ UART_ALL = 0xf,
UART_COUNT = 4,
};
@@ -149,3 +152,58 @@ void enable_caches(void)
dcache_enable();
}
#endif
+
+
+/*
+ * Possible UART locations: we ignore UARTC at 0x70006200 and UARTE at
+ * 0x70006400, since we don't have code to init them
+ */
+static u32 uart_reg_addr[] = {
+ NV_PA_APB_UARTA_BASE,
+ NV_PA_APB_UARTB_BASE,
+ NV_PA_APB_UARTD_BASE,
+ 0
+};
+
+#ifdef CONFIG_PRE_CONSOLE_PUTC
+/*
+ * This is called when we have no console. About the only reason that this
+ * happen is if we don't have a valid fdt. So we don't know what kind of
+ * Tegra board we are. We blindly try to print a message every which way we
+ * know.
+ */
+void board_pre_console_putc(int ch)
+{
+ int uart_ids = UART_ALL; /* turn it all on! */
+ u32 *uart_addr;
+ int clock_freq, multiplier, baudrate, divisor;
+
+ /* Try to enable all possible UARTs */
+ setup_uarts(uart_ids);
+
+ /*
+ * Seaboard has a UART switch on PI3. We might be a Seaboard,
+ * so flip it!
+ */
+#ifdef CONFIG_SPI_UART_SWITCH
+ gpio_direction_output(GPIO_PI3, 0);
+#endif
+
+ /*
+ * Now send the string out all the Tegra UARTs. We don't try all
+ * possible configurations, but this could be added if required.
+ */
+ clock_freq = CONFIG_DEFAULT_NS16550_CLK;
+ multiplier = CONFIG_DEFAULT_NS16550_MULT;
+ baudrate = CONFIG_BAUDRATE;
+ divisor = (clock_freq + (baudrate * (multiplier / 2))) /
+ (multiplier * baudrate);
+
+ for (uart_addr = uart_reg_addr; *uart_addr; uart_addr++) {
+ NS16550_init((NS16550_t)*uart_addr, divisor);
+ NS16550_putc((NS16550_t)*uart_addr, ch);
+ if (ch == '\n')
+ NS16550_putc((NS16550_t)*uart_addr, '\r');
+ }
+}
+#endif
--
1.7.7.3
4
6

[U-Boot] ubifsmount reports "Error reading superblock", but linux can mount FS
by Alex Zeffertt 09 Mar '12
by Alex Zeffertt 09 Mar '12
09 Mar '12
Hi u-booters,
I have a short script in my u-boot environment which chooses which of
two ubifs partitions to boot
by attempting to read a release file in each one.
Unfortunately, after an unclean shutdown sometimes the ubifsmount
fails. (By "unclean shutdown"
I mean that the board was power cycled while doing some low bandwidth logging.)
The strange thing is that Linux has no problem mounting the partition
as its root filesystem. This is
very confusing because it looks like the ubifs implementation in
u-boot is just a copy of the one in Linux.
Has anyone else seen this problem?
Regards,
Alex
PS My kernel is linux-3.0.0/armv5tel and the full u-boot trace is below:
> U-Boot 2011.06 (Feb 10 2012 - 12:29:06)
> OpenRD-Base
> SoC: Kirkwood 88F6281_A1
> DRAM: 128 MiB
> NAND: 512 MiB
> *** Warning - bad CRC, using default environment
> In: serial
> Out: serial
> Err: serial
> Net: egiga0
> 88E6351 Initialized on egiga0
> Hit any key to stop autoboot: 0
> Creating 1 MTD partitions on "nand0":
> 0x000001000000-0x000010000000 : "mtd=2"
> UBI: attaching mtd1 to ubi0
> UBI: physical eraseblock size: 131072 bytes (128 KiB)
> UBI: logical eraseblock size: 126976 bytes
> UBI: smallest flash I/O unit: 2048
> UBI: sub-page size: 512
> UBI: VID header offset: 2048 (aligned 2048)
> UBI: data offset: 4096
> UBI: attached mtd1 to ubi0
> UBI: MTD device name: "mtd=2"
> UBI: MTD device size: 240 MiB
> UBI: number of good PEBs: 1913
> UBI: number of bad PEBs: 7
> UBI: max. allowed volumes: 128
> UBI: wear-leveling threshold: 4096
> UBI: number of internal volumes: 1
> UBI: number of user volumes: 1
> UBI: available PEBs: 0
> UBI: total number of reserved PEBs: 1913
> UBI: number of PEBs reserved for bad PEB handling: 19
> UBI: max/mean erase counter: 7/1
> UBIFS: recovery needed
> Error reading superblock on volume 'ubi:rootfs'!
> UBI: mtd1 is detached from ubi0
3
9