Macpaul Lin [Mon, 11 Apr 2011 20:45:32 +0000 (20:45 +0000)]
cmd_ide: enhance new feature "CONFIG_IDE_AHB"
Although most IDE controller is designed to be connected to PCI bridge,
there are still some IDE controller support AHB interface for SoC design.
The driver implementation of these IDE-AHB controllers differ from other
IDE-PCI controller, some additional registers and commands access is required
during CMD/DATA I/O. Hence a configuration "CONFIG_IDE_AHB" in cmd_ide.c is
required to be defined to support these kinds of SoC controllers. Such as
Faraday's FTIDE020 series and Global Unichip's UINF-0301.
Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Mike Frysinger [Fri, 8 Apr 2011 12:23:30 +0000 (12:23 +0000)]
zlib: split up to match original source tree
While looking to upgrade to zlib-1.2.5, the current mondo merge of
multiple files into a single was making things way more difficult
than it should have been. Hard to pick out what has been changed
to port it to U-Boot, been removed as useless, and bug fixes added
after the fact.
So split the single file up into the original file names, and merge
non-essential changes back from the original tree (for some reason,
style in code in a bunch of places was changed to U-Boot style even
though this isn't "U-Boot" code).
The original build style is retained -- we have a single zlib.c that
includes all the other files, and that is the only file we compile.
Scott Wood [Wed, 6 Apr 2011 13:31:37 +0000 (13:31 +0000)]
Handle most LDSCRIPT setting centrally
Currently, some linker scripts are found by common code in config.mk.
Some are found using CONFIG_SYS_LDSCRIPT, but the code for that is
sometimes in arch config.mk and sometimes in board config.mk. Some
are found using an arch-specific rule for looking in CPUDIR, etc.
Further, the powerpc config.mk rule relied on CONFIG_NAND_SPL
when it really wanted CONFIG_NAND_U_BOOT -- which covered up the fact
that not all NAND_U_BOOT builds actually wanted CPUDIR/u-boot-nand.lds.
Replace all of this -- except for a handful of boards that are actually
selecting a linker script in a unique way -- with centralized ldscript
finding.
If board code specifies LDSCRIPT, that will be used.
Otherwise, if CONFIG_SYS_LDSCRIPT is specified, that will be used.
If neither of these are specified, then the central config.mk will
check for the existence of the following, in order:
$(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds (only if CONFIG_NAND_U_BOOT)
$(TOPDIR)/$(CPUDIR)/u-boot-nand.lds (only if CONFIG_NAND_U_BOOT)
$(TOPDIR)/board/$(BOARDDIR)/u-boot.lds
$(TOPDIR)/$(CPUDIR)/u-boot.lds
Some boards (sc3, cm5200, munices) provided their own u-boot.lds that
were dead code, because they were overridden by a CPUDIR u-boot.lds under
the old powerpc rules. These boards' own u-boot.lds have bitrotted and
no longer work -- these lds files have been removed.
Signed-off-by: Scott Wood <scottwood@freescale.com> Tested-by: Graeme Russ <graeme.russ@gmail.com>
Thomas Herzmann [Thu, 9 Dec 2010 10:02:09 +0000 (11:02 +0100)]
keymile boards: support of boardId / hwkey lists
In order to support boardId / hwkey lists, the u-boot default
environment has been updated: Added a script checkboardidlist
which checks the list of boardId / hwkey if the boadrId / hwkey
of the IVM is included in that list. This feature is used if you
got different HW variants but you only want to create one boot
package. E.g. supx5 board series.
Holger Brunck [Fri, 4 Mar 2011 13:56:27 +0000 (14:56 +0100)]
ppc, arm: rework and enhance keymile-common.h
Add:
- introduce "bootrunner" environment variable
This allows to execute consecutive different commands
specified in the list "subbootcmd". If one command fails
the command serie will stop.
- introduce environment variable "develop", "ramfs" and "release"
Each variable is one way to boot our linux. "develop" is for
development purpose and boots the SW via NFS. "release" is for
booting the linux image from flash, "ramfs" allows to load an SW
image via tftp into ram and executes from there
- introduce "addmem" variable, this command adds the used memory
for linux to the bootargs
- introduce "addvar" variable, this command adress for the /var
directory to the kernel command line
- introduce "setramfspram" and "setrootfsaddr" these calculation
were done if "ramfs" was used (only for debugging)
- introduce "tftpramfs" used for "ramfs" to load the image into
RAM (only for debugging)
Remove unneeded stuff:
- CONFIG_IO_MUXING is obsolete for keymile boards
- CONFIG_KM_DEF_ENV_PRIVATE is also obsolete
- define CONFIG_SYS_TEXT_BASE in board configs only
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Wolfgang Denk <wd@denx.de>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
keymile, common: add setting of some environment variables
This patch adds last_stage_init to all keymile boards. And
in the last stage init some environment variables for u-boot
were set. Currently these are pnvramaddr, pram and var address.
Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Kim Phillips <kim.phillips@freescale.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Wolfgang Denk <wd@denx.de>
cc: Kim Phillips <kim.phillips@freescale.com>
Normaly the PIGGY_MAC_ADRESS can be read directly from the
IVM on keymile boards. On mgcoge3 it differs. Because there
are two piggy boards deployed the second MAC adress must be
calculated with the IVM mac adress and an offset. This patch
allows to set such a offset in the board config.
Heiko Schocher [Tue, 8 Mar 2011 09:53:51 +0000 (10:53 +0100)]
arm, keymile: updates for the arm based boards from keymile
define KM_IVM_BUS and KM_ENV_BUS macros
KM_IVM_BUS is used to define the EEprom_ivm environment variable.
These macros allow the reuse of these I2C addresses in other code
locations.
remove unneeded code
On first HW versions the BOCO FPGA was behind a MUX device. These
HW versions are not supported anymore. And therefore this code can
be removed.
added LED initialization for SUEN3
The bootstat LED required to be initialized so to have a green
colour after start-up.
define CONFIG_SYS_TEXT_BASE
This is needed by the relocation code and is not the same for
our ARM BEC and thus needs to be defined.
remove memsize variable
An environment variable for memsize is not needed.
this can be get via the board info struct.
remove unneeded double access to bi_dram[i].size field
Heiko Schocher [Tue, 8 Mar 2011 09:51:15 +0000 (10:51 +0100)]
keymile, common; fix i2c deblocking support
This patch fix the i2c deblocking facility with the i2c HW-Controller.
The required delays for byte reading, the enhanced criteria for stop
the dummy read and required 5 start/stop sequences are added.
Add i2c deblocking before ivm eeprom read.
Improve i2c deblocking sequence by respecting stop hold time.
Cleaned function for deblocking. Have now one function i2c_make_abort()
available for bitbang, mpc82xx and mpc83xx harware controller.
Heiko Schocher [Tue, 8 Mar 2011 09:47:39 +0000 (10:47 +0100)]
ppc, 8321: cleanup tuxa1, tuda1 and suvd3 support
For the kmsupx5 a new header file was introduced km8321-common.h.
Now the common stuff from tuxa1, tuda1 and suvd3 was removed and
the new header file included.
The defines CONFIG_SYS_PIGGY_BASE and CONFIG_SYS_PIGGY_SIZE are
confusing. Because they actually describe the KMBEC FPGA values.
The KMBEC FPGA can be PRIO on kmeter1 or upio on mgcoge. Therefore
all the defines were renamed.
remove unneeded variable CONFIG_KM_DEF_NETDEV, as it is
already declared in keymile-common.h
Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Kim Phillips <kim.phillips@freescale.com>
cc: Kim Phillips <kim.phillips@freescale.com>
cc: Wolfgang Denk <wd@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Heiko Schocher [Tue, 22 Feb 2011 08:34:33 +0000 (09:34 +0100)]
km_arm: change some register values for SDRAM initialization
These new values are:
- enables UART0 and UART1 pins in MPP
- define some L2 cache settings
- changes a SDRAM timing to better fit the hardware
- removed three writes that were the same as the reset values
Heiko Schocher [Tue, 22 Feb 2011 08:13:00 +0000 (09:13 +0100)]
km-arm: i2c support for suenx based boards
This patch renames the suen3 defines and functions to KM_KIRKWOOD
which is more generic and more precise, because these values
and functions where used by all suenX boards and not only suen3.
Heiko Schocher [Tue, 22 Feb 2011 07:58:19 +0000 (08:58 +0100)]
ppc: add support for ppc based board mgcoge2ne
The mgcoge2 board from keymile deploys two different processors.
An ARM based Kirkwood for the "unit" part of the SW and a PPC for
the "ne" part of the SW. Therefore in Linux and U-Boot the names
for the board are mgcoge2un and mgcoge2ne. This patch adds the
mgcoge2ne part of the board. The ppc part of mgboge2 is quite
similar to mgcoge, therefore a generic header km82xx-common.h
was introduced to collect all similiarities. Currently the only
difference is that mgcoge2ne has a 64 MB numonyx NOR flash with
a single die. The mgcoge has a dual die flash 2*32MB from spansion.
Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
mpc832x: add support for mpc8321 based tuda1 board
This board is similar to suvd3 board. So most initialisation topics
are taken from suvd3 (UART1, Ethernet, piggy PHY, flash, ram) only the
application specific chip selects differ.
mpc832x: add support for mpc8321 based tuxa1 board
This board is similar to suvd3 board. So most initialisation topics
are taken from suvd3 (UART1, Ethernet, piggy PHY, flash, ram) only the
application specific chip selects differ.
Holger Brunck [Mon, 14 Mar 2011 15:01:04 +0000 (16:01 +0100)]
arm, ppc: rework environment variables for keymile boards
This patch reworks all headerfiles for keymile boards. Furthermore
the environment variables are refactored.
Changes:
- introduce km-powerpc.h file and extract ppc specific parts to it
- move ARM specific options and vaiables to km_arm.h
- sort the environment variables to logical groups
- enhance the description of the environment variables
- remove KM specific HW key and board id from kernel command line
Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Kim Phillips <kim.phillips@freescale.com>
cc: Kim Phillips <kim.phillips@freescale.com>
cc: Wolfgang Denk <wd@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Heiko Schocher [Tue, 15 Mar 2011 15:52:29 +0000 (16:52 +0100)]
keymile: Fix Coding style issues for keymile boards.
- use I/O accessors
-> For accessing the FPGA therefore a struct km_bec_fpga
is introduced.
- no longer externs needed
- to defines, that only select functions, don;t assign a
numeric value
- Codingstyle changes to prevent checkpatch errors/warnings
Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Kim Phillips <kim.phillips@freescale.com>
cc: Kim Phillips <kim.phillips@freescale.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
Holger Brunck [Mon, 14 Mar 2011 14:31:19 +0000 (15:31 +0100)]
arm, keymile: rename MACH_SUEN3 to MACH_KM_KIRKWOOD
The MACH_TYPE SUEN3 is now to specific for keymile boards, because
other boards similar to suen3 will follow. So the MACH_SUEN3 was renamed
to MACH_KM_KIRKWOOD.
Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
Jason Liu [Tue, 22 Mar 2011 01:32:31 +0000 (01:32 +0000)]
fsl_esdhc: Fix multi-block read restriction on i.MX53 eSDHCv2
For freescale i.MX53 eSDHCv2, when using CMD12, cmdtype need
to be set to ABORT, otherwise, next read command will hang.
This is a software Software Restrictions in i.MX53 reference manual:
29.7.8 Multi-block Read
For pre-defined multi-block read operation, that is,the number of blocks
to read has been defined by previous CMD23 for MMC, or pre-defined number
of blocks in CMD53 for SDIO/SDCombo,or whatever multi-block read without
abort command at card side, an abort command, either automatic or manual
CMD12/CMD52, is still required by ESDHC after the pre-defined number of
blocks are done, to drive the internal state machine to idle mode. In this
case, the card may not respond to this extra abort command and ESDHC will
get Response Timeout. It is recommended to manually send an abort command
with RSPTYP[1:0] both bits cleared.
Timur Tabi [Mon, 11 Apr 2011 19:18:22 +0000 (14:18 -0500)]
powerpc: use 'video-mode' environment variable to configure DIU
Use the 'video-mode' environment variable (for Freescale chips that have a
DIU display controller) to designate the full video configuration. Previously,
the DIU driver used the 'monitor' variable, and it was used only to determine
the output video port.
The old definition of the "monitor" environment variable only determines
which video port to use for output. This variable was set to a number (0,
1, or sometimes 2) to specify a DVI, LVDS, or Dual-LVDS port. The
resolution was hard-coded into board-specific code. The Linux command-line
arguments needed to be hard-coded to the proper video definition string.
Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
Timur Tabi [Mon, 21 Mar 2011 21:38:49 +0000 (16:38 -0500)]
video: parse the video-mode environment variable
Add function video_get_video_mode(), which parses the "video-mode" environment
variable and returns each of its components. The format matches the video=
command-line option used for Linux:
<driver> The video driver, ignored by U-Boot
<xres> The X resolution (in pixels) to use.
<yres> The Y resolution (in pixels) to use.
<depth> The color depth (in bits) to use.
<freq> The frequency (in Hz) to use.
<options> A comma-separated list of device-specific options
There seems to be tools producing incorrect 'end of bitmap data'
markers '0100' in a RLE bitmap. Drawing such bitmaps can result
in overwriting memory above the frame buffer. E.g. on MPC5121e
based boards this memory can contain U-Boot environment.
We may not rely on the correct end of bitmap data marker 0001
only, but also have to check whether we are going to draw a
valid frame buffer scan line.
The patch provides a fix by maintaining a pixel counter
which is incremented by the amount of pixels we are going
to draw. If the counter exceeds frame buffer pixels limit
we stop the drawing with the error message.
Stefan Bigler [Fri, 8 Apr 2011 14:24:08 +0000 (16:24 +0200)]
i2c: add i2c deblock sequence before and after every mux config
To make sure that the mux can be configured a deblocking sequence
is done before the mux configuration. After the mux switch the new leaf
of, the i2c tree must be again deblocked.
Kim Phillips [Tue, 5 Apr 2011 07:15:14 +0000 (07:15 +0000)]
common: add a grepenv command
u-boot environments, esp. when boards are shared across multiple
users, can get pretty large and time consuming to visually parse.
The grepenv command this patch adds can be used in lieu of printenv
to facilitate searching. grepenv works like printenv but limits
its output only to environment strings (variable name and value
pairs) that match the user specified substring.
the following examples are on a board with a 5313 byte environment
that spans multiple screen pages:
Example 1: summarize ethernet configuration:
=> grepenv eth TSEC
etact=FM1@DTSEC2
eth=FM1@DTSEC4
ethact=FM1@DTSEC2
eth1addr=00:E0:0C:00:8b:01
eth2addr=00:E0:0C:00:8b:02
eth3addr=00:E0:0C:00:8b:03
eth4addr=00:E0:0C:00:8b:04
eth5addr=00:E0:0C:00:8b:05
eth6addr=00:E0:0C:00:8b:06
eth7addr=00:E0:0C:00:8b:07
eth8addr=00:E0:0C:00:8b:08
eth9addr=00:E0:0C:00:8b:09
ethaddr=00:E0:0C:00:8b:00
netdev=eth0
uprcw=setenv ethact $eth;setenv filename p4080ds/R_PPSXX_0xe/rcw_0xe_2sgmii_rev2_high.bin;setenv start 0xe8000000;protect off all;run upimage;protect on all
upuboot=setenv ethact $eth;setenv filename u-boot.bin;setenv start eff80000;protect off all;run upimage;protect on all
upucode=setenv ethact $eth;setenv filename fsl_fman_ucode_P4080_101_6.bin;setenv start 0xef000000;protect off all;run upimage;protect on all
usdboot=setenv ethact $eth;tftp 1000000 $dir/$bootfile;tftp 2000000 $dir/initramfs.cpio.gz.uboot;tftp c00000 $dir/p4080ds-usdpaa.dtb;setenv bootargs root=/dev/ram rw console=ttyS0,115200 $othbootargs;bootm 10000002000000 c00000;
=>
Example 2: detect unused env vars:
=> grepenv etact
etact=FM1@DTSEC2
=>
Example 3: reveal hardcoded variables; e.g., for fdtaddr:
Kim Phillips [Mon, 4 Apr 2011 15:17:45 +0000 (15:17 +0000)]
env: fix env var autocompletion
commit 560d424b6d7cd4205b062ad95f1b104bd4f8bcc3 "env: re-add
support for auto-completion" fell short of its description -
the 'used' logic in hmatch_r was reversed - 'used' is 0 if
the hash table entry is not used, or -1 if deleted. This
patch makes hmatch_r actually match on valid ('used') entries,
instead of skipping them and failing to match anything.
typing 'printenv tft' and hitting 'tab' now displays valid
choices for variable names.
Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Cc: Mike Frysinger <vapier@gentoo.org> Tested-by: Mike Frysinger <vapier@gentoo.org>
Minkyu Kang [Sun, 24 Apr 2011 22:22:34 +0000 (22:22 +0000)]
Don't grab memory for LCD if FB address is defined
If FB address is defined specific address then don't grab memory for LCD
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com> Cc: Albert Aribaud <albert.aribaud@free.fr> Cc: Wolfgang Denk <wd@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Kim Phillips <kim.phillips@freescale.com> Cc: Andy Fleming <afleming@gmail.com> Cc: Kumar Gala <kumar.gala@freescale.com>
This patch defines all the needed symbols in the header file
and removes the now-unused config.mk in board directory.
Changes to board C file as requested.
nhk8815: remove platform.S, which was unused at link time
This source file, which I got by the vendor in their own port,
was not actually executing because lib-based compilation
didn't call lowlevel_init (we have CONFIG_SKIP_LOWLEVEL_INIT).
With the change to object-based linking, an undefined symbol in
this file started hitting in the final link.
Signed-off-by: Alessandro Rubini <rubini@unipv.it> Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
Eric Benard [Sun, 3 Apr 2011 06:35:54 +0000 (06:35 +0000)]
cpu9260: update board support
- update to new relocation code
- switch to boards.cfg
- get rid of LEGACY (still a little hack in .h to compile)
- add nand boot configuration
- boot tested for the following configurations :
9260 (64MB RAM & nor boot)
9260_nand (64MB RAM & nand boot)
9G20_128M (128MB RAM & nor boot)
9G20_nand_128M (128MB RAM & nand boot)
(nor boot is using lowlevel init)
ARMV7: OMAP3: Add support for Comelit DIG297 board
Board support for the DIG297 board manufactured by Comelit Group SpA.
It is a custom board based on the BeagleBoard <http://beagleboard.org/> by
Texas Instruments.
The board support is based on the BeagleBoard implementation.
Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it> Cc: Wolfgang Denk <wd@denx.de> Cc: Albert Aribaud <albert.aribaud@free.fr> Cc: Sandeep Paulraj <s-paulraj@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Removed boot_flash_* extern variables.
boot_flash_type was totally unused. The other ones were actually constants, so
they have been replaced with #defines in the board config files.
Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it> Cc: Wolfgang Denk <wd@denx.de> Cc: Albert Aribaud <albert.aribaud@free.fr> Cc: Sandeep Paulraj <s-paulraj@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Alexander Holler [Tue, 19 Apr 2011 13:30:35 +0000 (09:30 -0400)]
omap3_beagle: enable EHCI and USB storage.
The reset sequence/configuration for ehci is highly board specific,
so this will be done in the source for the board, instead of
introducing several CONFIG_* which would be needed to make those
few lines in beagle.c usable across different OMAP boards.
Signed-off-by: Alexander Holler <holler@ahsoftware.de> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Macpaul Lin [Sun, 20 Mar 2011 23:44:06 +0000 (23:44 +0000)]
ftpmu010: fix relocation and enhance features
1. ftpmu010.h: fix and add definitions
Enhanced for more features and asm related support
according to datasheet.
Note:
- FTPMU010_PDLLCR0_HCLKOUTDIS is "incorrect" in datasheet.
- FTPMU010_PDLLCR0_DLLFRANG is only 1 bit at bit #19. (not 20-19)
- FTPMU010_PDLLCR0_HCLKOUTDIS is 4 bits at bit #20. (not 24-21)
2. ftpmu010.c: enhance features and fix relocation
- The following functions is added for pmu features.
ftpmu010_mfpsr_select_dev()
ftpmu010_sdramhtc_set()
- This patch also fix the declare statement for relocation.
Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Lei Wen [Wed, 13 Apr 2011 18:18:31 +0000 (23:48 +0530)]
mv_i2c: use structure to replace the direclty define
Add i2c_clk_enable in the cpu specific code, since previous platform it,
while new platform don't need. In the pantheon and armada100 platform,
this function is defined as NULL one.