Do not enforce drivers to provide empty video_set_lut()
if they do not implement indexed color (8 bpp) frame
buffer support. Add default function to the cfb_console
driver and remove empty video_set_lut() functions.
Wolfgang Denk [Thu, 27 May 2010 21:18:36 +0000 (23:18 +0200)]
Makefile/mkconfig: read simple board configurations from boards.cfg
Instead of adding explicit build rules for each and every board to the
top level Makefile (which makes it grow and grow), we now provide a
simple default rule and extend the "mkconfig" script to read board
configurations from a plain text file (table), "boards.cfg".
For simple boards it is now sufficient to add a single line of text to
the "boards.cfg" file, no changes to the top level Makefile are needed
any more.
To make the table better readable, change the notation for unused
fields from "NULL" into "-".
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Mike Frysinger <vapier@gentoo.org>
Wolfgang Denk [Thu, 27 May 2010 21:18:35 +0000 (23:18 +0200)]
Makefile: simplify handling of common board configurations
Many boards don't need any special handling in the Makefile. Try and
provide as generic make rules for these as possible. There are still
many areas where this does not work out really well, but the changes
show the direction we should take, and point out which boards or
architectures need further cleanup.
Wolfgang Denk [Thu, 27 May 2010 21:18:33 +0000 (23:18 +0200)]
Fix printing of make targets, simplify Makefile
Make printing the "board names" more useful. So far, we would get
output like this;
$ ./MAKEALL P2020RDB P2020RDB_NAND P2020RDB_SDCARD P2020RDB_SPIFLASH
Configuring for P1_P2_RDB board...
text data bss dec hex filename
342612 32656 265212 640480 9c5e0 /work/wd/tmp-ppc/u-boot
Configuring for P1_P2_RDB board...
text data bss dec hex filename
343160 32704 265212 641076 9c834 /work/wd/tmp-ppc/u-boot
Configuring for P1_P2_RDB board...
text data bss dec hex filename
341908 32620 265212 639740 9c2fc /work/wd/tmp-ppc/u-boot
Configuring for P1_P2_RDB board...
text data bss dec hex filename
341908 32620 265212 639740 9c2fc /work/wd/tmp-ppc/u-boot
For all build targets the same board name would be printed, which
makes is often pretty difficult to find out which exact build target
caused problems. With this commit, the real make target name gets
printed instead, which is way more useful:
$ ./MAKEALL P2020RDB P2020RDB_NAND P2020RDB_SDCARD P2020RDB_SPIFLASH
Configuring for P2020RDB board...
text data bss dec hex filename
342612 32656 265212 640480 9c5e0 /work/wd/tmp-ppc/u-boot
Configuring for P2020RDB_NAND board...
text data bss dec hex filename
343160 32704 265212 641076 9c834 /work/wd/tmp-ppc/u-boot
Configuring for P2020RDB_SDCARD board...
text data bss dec hex filename
341908 32620 265212 639740 9c2fc /work/wd/tmp-ppc/u-boot
Configuring for P2020RDB_SPIFLASH board...
text data bss dec hex filename
341908 32620 265212 639740 9c2fc /work/wd/tmp-ppc/u-boot
Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Detlev Zundel <dzu@denx.de> Tested-by: Thomas Chou <thomas@wytron.com.tw>
Ron Madrid [Wed, 2 Jun 2010 00:00:49 +0000 (17:00 -0700)]
Update SICRL_USBDR to reflect 4 different settings
This patch changed the SICRL_USBDR define to reflect the 4 different bit
settings for this two-bit field. The four different options are '00', '01',
'10', and '11'. This patch also corrects the config file for SIMPC8313 and
MPC8313ERDB for the appropriate fields. This change only affects the MPC8313
cpu.
Signed-off-by: Ron Madrid <ron_madrid@sbcglobal.net> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Kim Phillips [Fri, 23 Apr 2010 17:20:11 +0000 (12:20 -0500)]
fdt_support: add entry for sec3.1 and fix sec3.3
Add sec3.1 h/w geometry for fdt node fixups.
Also, technically, whilst SEC v3.3 h/w honours the tls_ssl_stream descriptor
type, it lacks the ARC4 algorithm execution unit required to be able
to execute anything meaningful with it. Change the node to agree with
the documentation that declares that the sec3.3 really doesn't have such
a descriptor type.
Reported-by: Haiying Wang <Haiying.Wang@freescale.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Timur Tabi [Thu, 20 May 2010 16:16:16 +0000 (11:16 -0500)]
fsl: rename 'dma' to 'brdcfg1' in the ngPIXIS structure
The ngPIXIS is a board-specific FPGA, but the definition of the registers
is mostly consistent. On boards where it matter, register 9 is called
'brdcfg1' instead of 'dma', so rename the variable in the ngpixis_t
definition.
Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Thomas Chou [Fri, 14 May 2010 22:00:05 +0000 (06:00 +0800)]
nios2: fix div64 issue for gcc4
This patch fixes the run-time error on div64 when built with
gcc4, which was reported by jhwu0625 on nios forum. It merges
math support from libgcc of gcc4. This patch is copied from
nios2-linux.
It works with both gcc3 and gcc4. The old mult.c, divmod.c and
math.h are removed.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Scott McNutt <smcnutt@psyent.com>
Thomas Chou [Fri, 21 May 2010 03:08:03 +0000 (11:08 +0800)]
nios2: fix r15 issue for gcc4
The "-ffixed-r15" option doesn't work well for gcc4. Since we
don't use gp for small data with option "-G0", we can use gp
as global data pointer. This allows compiler to use r15. It
is necessary for gcc4 to work properly.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Scott McNutt <smcnutt@psyent.com>
Thomas Chou [Fri, 30 Apr 2010 03:34:15 +0000 (11:34 +0800)]
nios2: add gpio support to nios2-generic board
This patch adds gpio support of Altera PIO component to the
nios2-generic board. Though it drives only gpio_led at the
moment, it supports bidirectional port to control bit-banging
I2C, NAND flash busy status or button switches, etc.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Tested-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Scott McNutt <smcnutt@psyent.com>
Thomas Chou [Fri, 30 Apr 2010 03:34:13 +0000 (11:34 +0800)]
nios2: add gpio support
This patch adds driver for a trivial gpio core, which is described
in http://nioswiki.com/GPIO. It is used for gpio led and nand flash
interface in u-boot.
When CONFIG_SYS_GPIO_BASE is not defined, board may provide
its own driver.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Tested-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Scott McNutt <smcnutt@psyent.com>
Wolfgang Wegner [Tue, 30 Mar 2010 18:19:50 +0000 (19:19 +0100)]
add CONFIG_SYS_FEC_NO_SHARED_PHY for MCF5445x
This patch adds the possibility to handle seperate PHYs to MCF5445x.
Naming is chosen to resemble the contrary CONFIG_FEC_SHARED_PHY in the
linux kernel.
Signed-off-by: Wolfgang Wegner <w.wegner at astro-kom.de>
Andrew Caldwell [Fri, 7 May 2010 19:10:07 +0000 (15:10 -0400)]
Blackfin: nand: drain the write buffer before returning
The current Blackfin nand write function fills up the write buffer but
returns before it has had a chance to drain. On faster systems, this
isn't a problem as the operation finishes before the ECC registers are
read, but on slower systems the ECC may be incomplete when the core tries
to read it.
So wait for the buffer to drain once we're done writing to it.
Signed-off-by: Andrew Caldwell <Andrew.Caldwell@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
config.mk: use different host compiler for OS X 10.6
Compiling tools subdirectory on Mac OS X 10.6 (Snow Leopard) complains about
wrong syntax in system includes.
In file included from /usr/include/stdio.h:444,
from ../source/u-boot/include/compiler.h:26,
from ../source/u-boot/lib/crc32.c:15:
/usr/include/secure/_stdio.h:46: error: syntax error in macro parameter list
This can be fixed by reverting the workaround for prior OS X releases in
config.mk conditionally for OS X 10.6+.
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
Wolfgang Denk [Fri, 21 May 2010 21:14:53 +0000 (23:14 +0200)]
a320evb: fix udelay / __udelay confusion
Fix the following compiler problems:
arch/arm/cpu/arm920t/a320/liba320.a(timer.o): In function `udelay':
/home/wd/git/u-boot/work/arch/arm/cpu/arm920t/a320/timer.c:160: multiple definition of `udelay'
lib/libgeneric.a(time.o):/home/wd/git/u-boot/work/lib/time.c:34: first defined here
lib/libgeneric.a(time.o): In function `udelay':
time.c:(.text+0x1c): undefined reference to `__udelay'
Mahavir Jain [Fri, 21 May 2010 09:07:48 +0000 (14:37 +0530)]
bugfix: Guruplug: Use standard miiphy
call to reset PHY chip.
Current PHY Software Reset operation in guruplug does not
poll reset bit in control register to go to 0(auto clearing)
for making sure reset was successful.This patch uses standard
miiphy call miiphy_reset to make sure proper PHY reset operation.
commit c7190f028fa950d4d36b6d0b4bb3fc72602ec54c "mpc83xx:
retain POR values of non-configured ACR, SPCR, SCCR, and LCRR
bitfields" incorrectly shifted <register>_<bitfield> (e.g.
ACR_PIPE_DEP) values that were preshifted by their
definition in mpc83xx.h.
this patch removes the unnecessary shifting for the newly
utilized mask values in cpu_init.c, and prevents seemingly
unrelated symptoms such as an mpc8379erdb board from
locking up whilst performing a networking operation,
e.g. a tftp.
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Stefan Roese [Mon, 17 May 2010 08:01:05 +0000 (10:01 +0200)]
UBI: Fix problem in UBI/Linux "compatibility layer"
"down_write_trylock" needs to return 1 instead of 0 for success.
Otherwise copying a block with a read error (e.g. bit-flip on read)
won't work correctly.
Stefan Roese [Mon, 17 May 2010 08:00:51 +0000 (10:00 +0200)]
UBI: Ensure that "background thread" operations are really executed
The current U-Boot UBI implementation is copied from Linux. In this
porting the UBI background thread was not handled correctly. Upon write
operations ubi_wl_flush() makes sure, that all queued operations, like
page-erase, are completed. But this is missing for read operations.
This patch now makes sure that such operations (like scrubbing upon
bit-flip errors) are not queued, but executed directly.
Wolfgang Denk [Mon, 17 May 2010 21:34:18 +0000 (23:34 +0200)]
fsl_diu_fb.c: fix build warnings
Commit 15351855 "fsl-diu: Using I/O accessor to CCSR space" caused a
number of "passing argument 2 of 'out_be32' makes integer from pointer
without a cast" warnings; fix these.
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Dave Liu <daveliu@freescale.com> Cc: Jerry Huang <Chang-Ming.Huang@freescale.com> Cc: Kumar Gala <galak@kernel.crashing.org>
Nick Thompson [Tue, 11 May 2010 10:29:52 +0000 (11:29 +0100)]
Avoid use of divides in print_size
Modification of print_size to avoid use of divides and especially
long long divides. Keep the binary scale factor in terms of bit
shifts instead. This should be faster, since the previous code
gave the compiler no clues that the divides where always powers
of two, preventing optimisation.
Signed-off-by: Nick Thompson <nick.thompson@ge.com> Acked-by: Timur Tabi <timur@freescale.com>
Kim Phillips [Fri, 14 May 2010 18:18:54 +0000 (13:18 -0500)]
mpc83xx: fix NAND bootstrap too big error
commit 167cdad1372917bc11c636c359aad02625291fa9 "SERIAL: Enable
port-mapped access" inadvertently broke 83xx nand boards by
converting NS16550_init to use io accessors, which expanded
the size of the generated code.
this patch fixes the problem by removing icache functions from
the nand builds, which somewhat follows commit 1a2e203b31d33fb720f2cf1033b241ad36ab405a "mpc83xx: turn on icache
in core initialization to improve u-boot boot time"
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Ron Madrid [Mon, 10 May 2010 22:23:20 +0000 (15:23 -0700)]
Removal of checkboard from spl bootstrap build for SIMPC8313
This patch removes the checkboard function from the build of
the 4k bootstrap section for the SIMPC8313 as it is not needed
in the spl build. This will allow > 100 bytes of extra room
for other uses.
Signed-off-by: Ron Madrid <ron_madrid@sbcglobal.net> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Fix MVBLM7 and MVSMR Makefiles for correct out-of-tree building
(create "bootscript.img" in build directory instead of source
directory) and cleanup (remove "bootscript.img" when cleaning up).
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Andre Schwarz <andre.schwarz@matrix-vision.de>
Wolfgang Denk [Sun, 9 May 2010 21:52:59 +0000 (23:52 +0200)]
drivers/mmc/fsl_esdhc.c: fix compiler warnings
Commit 77c1458d caused the following compiler warnings:
fsl_esdhc.c: In function 'esdhc_pio_read_write':
fsl_esdhc.c:142: warning: assignment discards qualifiers from pointer target type
fsl_esdhc.c: In function 'esdhc_setup_data':
fsl_esdhc.c:169: warning: unused variable 'wml_value'
fsl_esdhc.c: In function 'esdhc_pio_read_write':
fsl_esdhc.c:164: warning: control reaches end of non-void function
Fix these.
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Dipen Dudhat <dipen.dudhat@freescale.com> Cc: Andy Fleming <afleming@freescale.com>
York Sun [Fri, 7 May 2010 14:12:01 +0000 (09:12 -0500)]
Enabled support for Rev 1.3 SPD for DDR2 DIMMs
SPD has minor change from Rev 1.2 to 1.3. This patch enables Rev 1.3.
The difference has ben examined and the code is compatible.
Speed bins is not verified on hardware for CL7 at this moment.
This patch also enables SPD Rev 1.x where x is up to "F". According to SPD
spec, the lower nibble is optionally used to determine which additinal bytes
or attribute bits have been defined. Software can safely use defaults. However,
the upper nibble should always be checked.
Signed-off-by: York Sun <yorksun@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Kumar Gala [Tue, 20 Apr 2010 15:21:25 +0000 (10:21 -0500)]
85xx/fsl-sata: Use is_serdes_configured() to determine if SATA is enabled
On the MPC85xx platform if we have SATA its connected on SERDES.
Determing if SATA is enabled via sata_initialize should not be board
specific and thus we move it out of the MPC8536DS board code.
Additionally, now that we have is_serdes_configured() we can determine
if the given SATA port is enabled and error out if its not in the
driver.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Kumar Gala [Tue, 20 Apr 2010 15:21:12 +0000 (10:21 -0500)]
85xx/mpc8536ds: Use is_serdes_configured() to determine of PCIe enabled
The new is_serdes_configured covers a broader range of devices than the
PCI specific code. Use it instead as we convert away from the
is_fsl_pci_cfg() code.
Additionally move to setting LAWs for PCI based on if its configured.
Also updated PCI FDT fixup code to remove PCI controllers from dtb if
they are configured.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Kumar Gala [Tue, 20 Apr 2010 15:20:33 +0000 (10:20 -0500)]
85xx: Add is_serdes_configured() support to MPC8536 SERDES
Add the ability to determine if a given IP block connected on SERDES is
configured. This is useful for things like PCIe and SRIO since they are
only ever connected on SERDES.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Jerry Huang [Thu, 8 Apr 2010 07:56:07 +0000 (15:56 +0800)]
fsl-diu: Using I/O accessor to CCSR space
Using PPC I/O accessor to DIU I/O space instead of directly
read/write. It will prevent the dozen of compiler order issue
and PPC hardware order issue for accessing I/O space.
Using the toolchain(tc-fsl-x86lnx-e500-dp-4.3.74-2.i386.rpm)
can show up the order issue of DIU driver.
Signed-off-by: Dave Liu <daveliu@freescale.com> Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Stefan Roese [Wed, 28 Apr 2010 08:47:36 +0000 (10:47 +0200)]
powerpc: Consolidate bootcount_{store|load} for PowerPC
This patch consolidates bootcount_{store|load} for PowerPC by
implementing a common version in arch/powerpc/lib/bootcount.c. This
code is now used by all PowerPC variants that currently have these
functions implemented.
The functions now use the proper IO-accessor functions to read/write the
values.
This code also supports two different bootcount versions:
a) Use 2 separate words (2 * 32bit) to store the bootcounter
b) Use only 1 word (2 * 16bit) to store the bootcounter
Version b) was already used by MPC5xxx.
Signed-off-by: Stefan Roese <sr@denx.de> Acked-by: Detlev Zundel <dzu@denx.de> Acked-by: Kim Phillips <kim.phillips@freescale.com>
for 83xx parts Cc: Michael Zaidman <michael.zaidman@gmail.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Kim Phillips <kim.phillips@freescale.com> Cc: Anatolij Gustschin <agust@denx.de>
Mike Frysinger [Tue, 20 Apr 2010 09:49:30 +0000 (05:49 -0400)]
compiler.h: add uint typedef
Recent crc changes started using the "uint" type in headers that are used
on the build system. This subsequently broke mingw targets as they do not
provide such a type. So add this basic typedef to compiler.h so that we
do not have to worry about this breaking again in the future.
Add zboot command which takes the address of a bzImage as its first
argument and (optionally) the size of the bzImage as the second argument
(the second argument is needed for older kernels which do not include
the bzImage size in the header)
x86: Provide weak PC/AT compatibility setup function
It is possibly to setup x86 boards to use non-PC/AT configurations. For
example, the sc520 is an x86 CPU with PC/AT and non-PC/AT peripherals.
This function allows the board to set itself up for maximum PC/AT
compatibility just before booting the Linux kernel (the Linux kernel
'just works' if everything is PC/AT compliant)
The x86 architecture exclusively uses Port-Mapped I/O (inb/outb) to access
the 16550 UARTs. This patch mimics how Linux selects between Memory-Mapped
and Port-Mapped I/O. This allows x86 boards to use CONFIG_SERIAL_MUTLI and
drop the custom serial port driver
Currently, the GDT is either located in FLASH or in the non-relocated
U-Boot image in RAM. Both of these locations are unsafe as those
locations can be erased during a U-Boot update. Move the GDT into the
highest available memory location and relocate U-Boot to just below it
Add a parameter to the 32-bit entry to indicate if entry is from Real
Mode or not. If entry is from Real Mode, execute the destructive 'sizer'
routine to determine memory size as we are booting cold and running in
Flash. If not entering from Real Mode, we are executing a U-Boot image
from RAM and therefore the memory size is already known (and running
'sizer' will destroy the running image)
There are now two 32-bit entry points. The first is the 'in RAM' entry
point which exists at the start of the U-Boot binary image. As such,
you can load u-boot.bin in RAM and jump directly to the load address
without needing to calculate any offsets. The second entry point is
used by the real-to-protected mode switch
This patch also changes TEXT_BASE to 0x6000000 (in RAM). You can load
the resulting image at 0x6000000 and simple go 0x6000000 from the u-boot
prompt
Hopefully a later patch will completely elliminate any dependency on
TEXT_BASE like a relocatable linux kernel (perfect world)