Kim Phillips [Wed, 21 Apr 2010 00:37:54 +0000 (19:37 -0500)]
mpc83xx: turn on icache in core initialization to improve u-boot boot time
before, MPC8349ITX boots u-boot in 4.3sec:
column1 is elapsed time since first message
column2 is elapsed time since previous message
column3 is the message
0.000 0.000: U-Boot 2010.03-00126-gfd4e49c (Apr 11 2010 - 17:25:29) MPC83XX
0.000 0.000:
0.000 0.000: Reset Status:
0.000 0.000:
0.032 0.032: CPU: e300c1, MPC8349E, Rev: 1.1 at 533.333 MHz, CSB: 266.667 MHz
0.032 0.000: Board: Freescale MPC8349E-mITX
0.032 0.000: UPMA: Configured for compact flash
0.032 0.000: I2C: ready
0.061 0.028: DRAM: 256 MB (DDR1, 64-bit, ECC off, 266.667 MHz)
1.516 1.456: FLASH: 16 MB
2.641 1.125: PCI: Bus Dev VenId DevId Class Int
2.652 0.011: 00 10 1095 3114 0180 00
2.652 0.000: PCI: Bus Dev VenId DevId Class Int
2.652 0.000: In: serial
2.652 0.000: Out: serial
2.652 0.000: Err: serial
2.682 0.030: Board revision: 1.0 (PCF8475A)
3.080 0.398: Net: TSEC1: No support for PHY id ffffffff; assuming generic
3.080 0.000: TSEC0, TSEC1
4.300 1.219: IDE: Bus 0: .** Timeout **
after, MPC8349ITX boots u-boot in 3.0sec:
0.010 0.010: U-Boot 2010.03-00127-g4b468cc-dirty (Apr 11 2010 - 17:47:29) MPC83XX
0.010 0.000:
0.010 0.000: Reset Status:
0.010 0.000:
0.017 0.007: CPU: e300c1, MPC8349E, Rev: 1.1 at 533.333 MHz, CSB: 266.667 MHz
0.017 0.000: Board: Freescale MPC8349E-mITX
0.038 0.020: UPMA: Configured for compact flash
0.038 0.000: I2C: ready
0.038 0.000: DRAM: 256 MB (DDR1, 64-bit, ECC off, 266.667 MHz)
0.260 0.222: FLASH: 16 MB
1.390 1.130: PCI: Bus Dev VenId DevId Class Int
1.390 0.000: 00 10 1095 3114 0180 00
1.390 0.000: PCI: Bus Dev VenId DevId Class Int
1.400 0.010: In: serial
1.400 0.000: Out: serial
1.400 0.000: Err: serial
1.400 0.000: Board revision: 1.0 (PCF8475A)
1.832 0.432: Net: TSEC1: No support for PHY id ffffffff; assuming generic
1.832 0.000: TSEC0, TSEC1
3.038 1.205: IDE: Bus 0: .** Timeout **
also tested on these boards (albeit with a less accurate
boottime measurement method):
seconds: before after
8349MDS ~2.6 ~2.2
8360MDS ~2.8 ~2.6
8313RDB ~2.5 ~2.3 #nand boot
837xRDB ~3.1 ~2.3
also tested on an 8323ERDB.
v2: also remove the delayed icache enablement assumption in arch ppc's
board.c, and add a CONFIG_MPC83xx define in the ITX config file for
consistency (even though it was already being defined in 83xx'
config.mk).
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Kim Phillips [Thu, 15 Apr 2010 22:36:02 +0000 (17:36 -0500)]
mpc83xx: use "A" nomenclature only on mpc834x and mpc836x families
marketing didn't extend their postpend-with-an-A naming strategy
on rev.2's and higher beyond the first two 83xx families. This
patch stops us from misreporting we're running e.g., on an MPC8313EA,
when such a name doesn't exist.
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Enable eSDHC Clock based on generic CONFIG_FSL_ESDHC define
instead of a platform define. This will enable all the 83xx
platforms to use sdhc_clk based on CONFIG_FSL_ESDHC. It's
the same patch as commit 6b9ea08c5010eab5ad1056bc9bf033afb672d9cc
for the ppc/85xx.
Signed-off-by: Rini <rini@arvoo.nl> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Stefan Roese [Thu, 15 Apr 2010 14:07:28 +0000 (16:07 +0200)]
Move arch/ppc to arch/powerpc
As discussed on the list, move "arch/ppc" to "arch/powerpc" to
better match the Linux directory structure.
Please note that this patch also changes the "ppc" target in
MAKEALL to "powerpc" to match this new infrastructure. But "ppc"
is kept as an alias for now, to not break compatibility with
scripts using this name.
Signed-off-by: Stefan Roese <sr@denx.de> Acked-by: Wolfgang Denk <wd@denx.de> Acked-by: Detlev Zundel <dzu@denx.de> Acked-by: Kim Phillips <kim.phillips@freescale.com> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Anatolij Gustschin <agust@denx.de>
Stefan Roese [Fri, 9 Apr 2010 12:03:59 +0000 (14:03 +0200)]
ppc4xx: Add option for PPC440SPe ports without old Rev. A support
The 440SPe Rev. A is quite old and newer 440SPe boards don't need support
for this CPU revision. Since removing support for this older version
simplifies the creation for newer U-Boot ports, this patch now enables
440SPe > Rev. A support by creating the CONFIG_440SPE_REVA define. By
defining this in the board config header, Rev. A will still be supported.
Otherwise (default for newer board ports), Rev. A will not be supported.
Stefan Roese [Thu, 8 Apr 2010 07:33:13 +0000 (09:33 +0200)]
ppc4xx: alpr: Remove some not needed commands to make image fit again
The latest changes increased the size of the alpr image a bit more.
Now it doesn't fit into the 256k reserved for it. This patch now removes
the commands "loads" and "loadb" which are not needed in the production
systems.
Signed-off-by: Stefan Roese <sr@denx.de> Cc: Pieter Voorthuijsen <pieter.voorthuijsen@prodrive.nl>
Peter Tyser [Tue, 13 Apr 2010 03:28:08 +0000 (22:28 -0500)]
Move architecture-specific includes to arch/$ARCH/include/asm
This helps to clean up the include/ directory so that it only contains
non-architecture-specific headers and also matches Linux's directory
layout which many U-Boot developers are already familiar with.
Peter Tyser [Tue, 13 Apr 2010 03:28:05 +0000 (22:28 -0500)]
Rename lib_generic/ to lib/
Now that the other architecture-specific lib directories have been
moved out of the top-level directory there's not much reason to have the
'_generic' suffix on the common lib directory.
Peter Tyser [Tue, 13 Apr 2010 03:28:03 +0000 (22:28 -0500)]
Change directory-specific CFLAGS to use full path
Previously, a specific file or directory could be compiled with custom
CFLAGS by adding a Makefile variable such as:
CFLAGS_dlmalloc.o = <custom flags for common/dlmalloc.c>
or
CFLAGS_lib = <custom flags for lib directory>
This method breaks down once multiple files or directories share the
same path. Eg FLAGS_fileA = <custom flags> would incorrectly result in
both dir1/fileA.c and dir2/fileA.c being compiled with <custom flags>.
This change allows finer grained control which we need once we move
lib_$ARCH to arch/$ARCH/lib/ and lib_generic/ to lib/. Without this
change all lib/ directories would share the same custom CFLAGS.
Peter Tyser [Tue, 13 Apr 2010 03:28:02 +0000 (22:28 -0500)]
Create CPUDIR variable
The CPUDIR variable points to the location of a target's CPU directory.
Currently, it is set to cpu/$CPU. However, using $CPUDIR will allow for
more flexibility in the future. It lays the groundwork for reorganizing
U-Boot's directory structure to support a layout such as:
arch/$ARCH/cpu/$CPU/* (architecture with multiple CPU types)
arch/$ARCH/cpu/* (architecture with one CPU type)
Peter Tyser [Mon, 5 Apr 2010 03:36:03 +0000 (22:36 -0500)]
mkimage: Fix strict-aliasing compiler warning
Version 4.2.4 of gcc produces the following warnings without this change:
mkimage.c: In function ‘main’:
mkimage.c:204: warning: dereferencing type-punned pointer will break strict-aliasing rules
mkimage.c:222: warning: dereferencing type-punned pointer will break strict-aliasing rules
Peter Tyser [Mon, 5 Apr 2010 03:40:50 +0000 (22:40 -0500)]
cmd_ubi: Fix uninitialized variable warning
gcc 3.4.6 previously reported the following error on many MIPS boards
which utilize UBI:
cmd_ubi.c:193: warning: 'vol' might be used uninitialized in this function
The current code is structured such that 'vol' will never be used when
it is NULL anyway, but gcc isn't smart enough to figure this out.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Stefan Roese <sr@denx.de>
Kim B. Heino [Fri, 12 Mar 2010 13:46:56 +0000 (15:46 +0200)]
USB storage count
Here's another USB storage patch. Currently U-Boot handles storage
devices #0 - #4 as valid devices, even if there is none connected. This
patch fixes usb_stor_get_dev() to check detected device count instead
of MAX-define.
This is very important for ill behaving devices. usb_dev_desc[] can be
partially initialized if device probe fails.
After fixing get_dev() it was easy to fix "usb part" etc commands.
Previously it outputed "Unknown partition table" five times, now it's
"no USB devices available".
Signed-off-by: Kim B. Heino <Kim.Heino@bluegiga.com>
Sergei Shtylyov [Sat, 27 Feb 2010 18:33:21 +0000 (21:33 +0300)]
EHCI: fix port reset reporting
Commit b416191a14770c6bcc6fd67be7decf8159b2baee (Fix EHCI port reset.) didn't
move the code that checked for successful clearing of the port reset bit from
ehci_submit_root(), relying on wait_ms() call instead. The mentioned code also
erroneously reported port reset state when the reset was already completed.
Signed-off-by: Sergei Shtylyov <sshtylyov@mvista.com>
Sergei Shtylyov [Sat, 27 Feb 2010 18:29:42 +0000 (21:29 +0300)]
EHCI: fix root hub device descriptor
On little endian machines, EHCI root hub's USB revision is reported as 0.2 --
cpu_to_le16() was missed in the initializer for the 'bcdUSB' descriptor field.
The same should be done for the 'bcdDevice' field.
Signed-off-by: Sergei Shtylyov <sshtylyov@mvista.com>
Ed Swarthout [Wed, 31 Mar 2010 14:54:28 +0000 (09:54 -0500)]
ati_radeon: return with error when emulator fails
Console was being switched to video even if emulator fails and
causing this hang:
Scanning PCI bus 04
04 00 1095 3132 0104 00
PCIE3 on bus 03 - 04
Video: ATI Radeon video card (1002, 5b60) found @(2:0:0)
videoboot: Booting PCI video card bus 2, function 0, device 0
videoboot: Video ROM failed to map!
640x480x8 31kHz 59Hz
radeonfb: FIFO Timeout !
Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com> Tested-by: Anatolij Gustschin <agust@denx.de>
Thomas Chou [Thu, 1 Apr 2010 03:15:05 +0000 (11:15 +0800)]
cfi_flash: reset timer in flash status check
This patch adds reset_timer() before the flash status check
waiting loop.
Since the timer is basically running asynchronous to the cfi
code, it is possible to call get_timer(0), then only a few
_SYSCLK_ cycles later an interrupt is generated. This causes
timeout even though much less time has elapsed. So the timer
period registers should be reset before get_timer(0) is
called.
There is similar usage in nand_base.c.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Stefan Roese <sr@denx.de>
Timur Tabi [Thu, 1 Apr 2010 15:49:42 +0000 (10:49 -0500)]
p2020ds: add alternate boot bank support using the ngPIXIS FPGA
The Freescale P2020DS board uses a new type of PIXIS FPGA, called the ngPIXIS.
The ngPIXIS has one distinct new feature: the values of the on-board switches
can be selectively overridden with shadow registers. This feature is used to
boot from a different NOR flash bank, instead of having a register dedicated
for this purpose. Because the ngPIXIS is so different from the previous PIXIS,
a new file is introduced: ngpixis.c.
Also update the P2020DS checkboard() function to use the new macros defined
in the header file.
Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Timur Tabi [Wed, 31 Mar 2010 22:44:13 +0000 (17:44 -0500)]
fsl: improve the PIXIS code and fix a few bugs
Refactor and document the Freescale PIXIS code, used on most 85xx and 86xx
boards. This makes the code easier to read and more flexible.
Delete pixis.h, because none of the exported functions were actually being
used by any other file. Make all of the functions in pixis.c 'static'.
Remove "#include pixis.h" from every file that has it.
Remove some unnecessary #includes.
Make 'pixis_base' into a macro, so that we don't need to define it in every
function.
Add "while(1);" loops at the end of functions that reset the board, so that
execution doesn't continue while the reset is in progress.
Replace in_8/out_8 calls with clrbits_8, setbits_8, or clrsetbits_8, where
appropriate.
Replace ulong/uint with their spelled-out equivalents. Remove unnecessary
typecasts, changing the types of some variables if necessary.
Add CONFIG_SYS_PIXIS_VCFGEN0_ENABLE and CONFIG_SYS_PIXIS_VBOOT_ENABLE to make
it easier for specific boards to support variations in the PIXIS registers
sets. No current boards appears to need this feature.
Fix the definition of CONFIG_SYS_PIXIS_VBOOT_MASK for the MPC8610 HPCD.
Apparently, "pixis_reset altbank" has never worked on this board.
Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Kumar Gala [Wed, 31 Mar 2010 04:06:53 +0000 (23:06 -0500)]
85xx: Added various P1012/P1013/P1021/P1022 defines
There are various locations that we have chip specific info:
* Makefile for which ddr code to build
* Added P1012/P1013/P1021/P1022 to cpu_type_list and SVR list
* Added number of LAWs for P1012/P1013/P1021/P1022
* Set CONFIG_MAX_CPUS to 2 for P1021/P1022
* PCI port config
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Signed-off-by: Srikanth Srinivasan <srikanth.srinivasan@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Kumar Gala [Tue, 30 Mar 2010 15:07:12 +0000 (10:07 -0500)]
ppc/8xxx: Delete PCI nodes from device tree if not configured
If the PCI controller wasn't configured or enabled delete from the
device tree (include its alias).
For the case that we didn't even configure u-boot with knowledge of
the controller we can use the fact that the pci_controller pointer
is NULL to delete the node in the device tree. We determine that
a controller was not setup (because of HW config) based on the fact
that cfg_addr wasn't setup.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Mike Frysinger [Wed, 10 Feb 2010 06:20:44 +0000 (01:20 -0500)]
Blackfin: link with normal ABI target
If someone uses the FDPIC toolchain to compile U-Boot, make sure the
linker knows to use the normal ABI target rather than the FDPIC one.
This wasn't needed with older toolchains, but when we fixed the linker
such that the default target changed based on tuple, this broke.
Mike Frysinger [Tue, 19 Jan 2010 20:39:07 +0000 (15:39 -0500)]
Blackfin: drop reference to gd->reloc_off
The reloc_off member no longer exists, so drop it. Also change this
function so that it is always compiled and prevents latent issues like
this in the future.
Reported-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Dave Liu [Fri, 5 Mar 2010 04:22:00 +0000 (12:22 +0800)]
fsl-ddr: Fix the turnaround timing for TIMING_CFG_4
Read-to-read/Write-to-write turnaround for same chip select
of DDR3 memory, BL/2+2 cycles is enough for them at BC4 and
OTF case, BL/2 cycles is enough for fixed BL8.
Cutting down the turnaround from BL/2+4 to BL/2+2 or BL/2
will improve the memory performance.
Jerry Huang [Thu, 18 Mar 2010 20:57:06 +0000 (15:57 -0500)]
fsl_esdhc: Add function to reset the eSDHC controller
To support multiple block read command we must set abort or use auto
CMD12. If we booted from eSDHC controller neither of these are used
and thus we need to reset the controller to allow multiple block read
to function.
Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com> Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Acked-by: Stefano Babic <sbabic@denx.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Previous code was failing when reading back the timer less than
400us after resetting it. This lead nand operations to incorrectly
timeout any now and then. Moreover, writing the load register isn't
immediately reflected in the value register. We must wait for a clock
edge, so read_timer now waits for the value to change at least once,
otherwise nand operation would timeout anyways (though less frequently).
Signed-off-by: Alessandro Rubini <rubini@unipv.it> Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
ep93xx timer: Simplified the timer code by eliminating clk_to_systicks() and
performing (almost) all manipulation of the timer structure in read_timer()
Memory subsystem of S5PC100 handles SROM, SRAM, OneDRAM, OneNand,
NAND Flash, DDRs.
smc.h is a common place for the register description of Memory subsystem
of S5PC100.
Note: Only SROM related registers are descibed now.
Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Joonyoung Shim [Mon, 8 Feb 2010 13:00:52 +0000 (22:00 +0900)]
s3c64xx: Add ifdef at the S3C64XX only codes
The s3c6400.h file is only for S3C64XX cpu and the pheripheral port
address(0x70000000 - 0x7fffffff) exists at only S3C64XX cpu, so they
should be included by only S3C64XX cpu.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Scott McNutt [Thu, 1 Apr 2010 04:00:56 +0000 (00:00 -0400)]
nios2: Reload timer count in reset_timer()
When the timestamp is incremented via interrupt and the interrupt
period is greater than 1 msec, successive calls to get_timer() can
produce inaccurate timing since the interrupts are asynchronous
to the timing loop. For example, with an interrupt period of 10 msec
two successive calls to get_timer() could indicate an elapsed time
of 10 msec after only several hundred usecs -- depending on when
the next interrupt actually occurs. This behavior can cause
reliability issues with components such as CFI and NAND.
This can be remedied by calling reset_timer() prior to establishing
the base timestamp with get_timer(0), provided reset_timer()
resets the hardware timer (rather than simply resetting only the
timestamp). This has the effect of synchronizing the interrupts
(and the advance of the timestamp) with the timing loop.