Mike Frysinger [Sun, 14 Jun 2009 15:03:48 +0000 (11:03 -0400)]
add %.c->%.i and %.c->%.s rules
The Linux kernel has some helper rules which allow you to quickly produce
some of the intermediary files from C source. Specifically, you can
create .i files which is the preprocessed output and you can create .s
files which is the assembler output. This is useful when you are trying
to track down header/macro expansion errors or inline assembly errors.
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Mike Frysinger [Sat, 30 May 2009 05:02:03 +0000 (01:02 -0400)]
make sure toplevel $(SUBDIRS) is always declared
The $(SUBDIRS) variable is only declared when U-Boot has been configured,
but it gets used all the time. In the non-configured case, it is used to
generate a helpful error message, but it needs to be set properly for that
to occur.
Mike Frysinger [Sun, 14 Jun 2009 13:33:00 +0000 (09:33 -0400)]
allow boards to customize compiler options on a per-file/dir basis
With our Blackfin boards, we like to build the compression routines with
-O2 as our tests show a pretty good size/speed tradeoff. For the rest of
U-Boot though, we want to stick with the default -Os as that is mostly
control code. So in our case, we would add a line like so to the board
specific config.mk file:
CFLAGS_lib_generic += -O2
Now all files under lib_generic/ will have -O2 appended to their build.
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Wolfgang Denk [Sun, 14 Jun 2009 18:31:36 +0000 (20:31 +0200)]
Revert "SMC911x driver fixed for NFS boot"
This reverts commit ca9c8a1e10fac01e6a1129f82a7ce18bd818fa43,
which causes compile warnings ("large integer implicitly truncated
to unsigned type") on all systems that use this driver. The warning
results from passing long constants (TX_CFG, RX_CFG) into
smc911x_set_mac_csr() which is declared to accept "unsigned
character" arguments only.
Being close to a release, with nobody available to actually test the
code or the suggested fixes, it seems better to revert the patch.
Peter Tyser [Thu, 21 May 2009 17:10:00 +0000 (12:10 -0500)]
fsl/85xx, 86xx: Sync up DMA code
The following changes were made to sync up the DMA code between the 85xx
and 86xx architectures which will make it easier to break out common
8xxx DMA code:
85xx:
- Don't set STRANSINT and SPCIORDER fields in SATR register. These bits
only have an affect when the SBPATMU bit is set.
- Write 0xffffffff instead of 0xfffffff to clear errors in the DMA
status register. We may as well clear all 32 bits of the register...
86xx:
- Add CONFIG_SYS_MPC86xx_DMA_ADDR define to address DMA registers
- Add clearing of errors in the DMA status register when initializing
the controller
- Clear the channel start bit in the DMA mode register after a transfer
Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Haiying Wang [Wed, 20 May 2009 16:30:41 +0000 (12:30 -0400)]
85xx: Add UEC6 and UEC8 at SGMII mode for MPC8569MDS
On MPC8569MDS board, UCC6 and UCC8 can be configured to work at SGMII mode via
UEM on PB board. Since MPC8569 supports up to 4 Gigabit Ethernet ports, we
disable UEC6 and UEC8 by default.
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Haiying Wang [Thu, 4 Jun 2009 20:12:41 +0000 (16:12 -0400)]
qe: Pass in uec_info struct through uec_initialize
The uec driver contains code to hard code configuration information for the uec
ethernet controllers. This patch creates an array of uec_info structures, which
are then parsed by the corresponding driver instance to determine configuration.
It also creates function uec_standard_init() to initialize all UEC interfaces
for 83xx and 85xx.
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Haiying Wang [Thu, 4 Jun 2009 20:12:40 +0000 (16:12 -0400)]
fsl: Update the number of ethxaddr in reading system eeprom
We support up to 8 mac addresses in system eeprom, so we define the macro
MAX_NUM_PORTS to limit the mac_count to 8, and update the number of ethxaddr
according to mac_count.
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Haiying Wang [Wed, 20 May 2009 16:30:37 +0000 (12:30 -0400)]
85xx: Add RMII support for MPC8569MDS
This patch supports UCC working at RMII mode on PIB board, fixup fdt blob to
support rmii in kernel. It also changes the name of enable_mpc8569mds_qe_mdio to
enalbe_mpc8569mds_qe_uec which is more accurate.
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Haiying Wang [Wed, 20 May 2009 16:30:35 +0000 (12:30 -0400)]
drivers/qe: Add more SNUM number for QE
Some QE chips like 8569 need more SNUM numbers for supporting 4 UECs in RGMII-
1000 mode.
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Haiying Wang [Thu, 21 May 2009 19:34:14 +0000 (15:34 -0400)]
drivers/qe: Change QE RISC ALLOCATION to support 4 RISCs
Also define the QE_RISC_ALLOCATION_RISCs to MACROs instead of using enum, and
define MAX_QE_RISC for QE based silicons.
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Haiying Wang [Wed, 20 May 2009 16:30:29 +0000 (12:30 -0400)]
85xx: Add QE clk support
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Acked-by: Timur Tabi <Timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Kumar Gala [Thu, 21 May 2009 13:36:43 +0000 (08:36 -0500)]
85xx: Always attempt ethernet device tree fixup
Its reasonable that we may have ethernet devices but dont have drivers
or support enabled for them in u-boot and want the device tree fixed up.
Unconditionally calling the ethernet fixup is fine since if we dont have
ethernet nodes that match (or aliases) we will not attempt to do
anything.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Timur Tabi <timur@freescale.com>
The patch adds support for P2020DS reference platform.
DDR3 interface uses hard-coded initialization rather than SPD
for now and was tested at 667Mhz. Some PIXIS register
definitions and associated code sections need to be fixed.
TSEC1/2/3, NOR flash, MAC/SYS ID EEPROM, PCIE1/2/3 are all
tested under u-boot.
Stefan Roese [Tue, 9 Jun 2009 14:57:47 +0000 (16:57 +0200)]
mpc512x: MPC5121ADS: Add NAND support
This patch adds NAND support to the MPC5121ADS board. Please
note that the image size increased since NAND support didn't
fit in the current image size (256k).
Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Wolfgang Denk <wd@denx.de>
Stefan Roese [Tue, 9 Jun 2009 14:57:03 +0000 (16:57 +0200)]
nand/mpc512x: Add MPC512x NAND support (NFC)
This patch adds NAND Flash Controller driver for MPC5121 revision 2.
All device features, except hardware ECC and power management, are
supported.
This NFC driver replaces the one orignally posted by John Rigby:
"[PATCH] Freescale NFC NAND driver"
It's a port of the Linux driver version posted by Piotr Ziecik a few
weeks ago. Using this driver has the following advantages (from my
point of view):
- Compatibility with the Linux NAND driver (e.g. ECC usage)
- Better code quality in general
- Resulting U-Boot image is a bit smaller (approx. 3k)
- Better to sync with newer Linux driver versions
The only disadvantage I can see, is that HW-ECC is not supported right
now. But this could be added later (e.g. port from Linux driver after
it's supported there). Using HW-ECC on the MCP5121 NFC has a general
problem because of the ECC usage in the spare area. This collides with
JFFS2 for example.
Signed-off-by: Stefan Roese <sr@denx.de> Cc: Piotr Ziecik <kosmo@semihalf.com> Cc: Wolfgang Denk <wd@denx.de> Cc: John Rigby <jcrigby@gmail.com> Cc: Scott Wood <scottwood@freescale.com>
Stefan Roese [Thu, 4 Jun 2009 14:55:34 +0000 (16:55 +0200)]
UBI: Add compile-time check for correct malloc area configuration
UBI is quite memory greedy and requires at least approx. 512k of malloc
area. This patch adds a compile-time check, so that boards will not
build with less memory reserved for this area (CONFIG_SYS_MALLOC_LEN).
Vivek Mahajan [Thu, 21 May 2009 12:02:15 +0000 (17:32 +0530)]
mpc8xxx: USB: Removed reenablement of its interface
To prepare for the 85xx USB support, which requires interface enablement
only once in (specified) order, no different than instructions for
enabling the interface under 83xx. It is unknown why the original author
enabled the interface twice (checked for references in errata, etc).
Stefan Roese [Tue, 2 Jun 2009 14:53:16 +0000 (16:53 +0200)]
mpc512x: Use serial_setbrg() in serial_init() to not duplicate the code
This patch removes the duplicated code for baudrate generator configuration
in the PSC serial_init() implementation by calling serial_setbrg() instead
of duplicating the code.
Wolfgang Denk [Sat, 16 May 2009 08:47:45 +0000 (10:47 +0200)]
MPC512x: remove include/mpc512x.h
Move needed definitions (register descriptions etc.) from
include/mpc512x.h into include/asm-ppc/immap_512x.h.
Instead of using a #define'd register offset, use a function that
provides the PATA controller's base address.
All the rest of include/mpc512x.h are register offset definitions
which can be eliminated by proper use of C structures.
There are only a few register offsets remaining that are needed in
cpu/mpc512x/start.S; for these we provide cpu/mpc512x/asm-offsets.h
which is intended as a temporary workaround only. In a later patch
this file will be removed, too, and then auto-generated from the
respective C structs.
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: John Rigby <jcrigby@gmail.com>
Wolfgang Denk [Sat, 16 May 2009 08:47:41 +0000 (10:47 +0200)]
Rename ads5121 board into mpc5121ads
We rename the board so we use a consistent name in U-Boot and in
Linux. Also, we use this opportunity to move the board into the
Freecale vendor directory.
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: John Rigby <jcrigby@gmail.com>
Wolfgang Denk [Sat, 16 May 2009 08:47:38 +0000 (10:47 +0200)]
mpc512x: Move common files to share them by several boards
We will soon see several new MPC521x based boards added. This patch
moves files that are not board specific to a common directory so they
can be shared by all such ports. It also splits off common IDE code
into a new file, cpu/mpc512x/ide.c .
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: John Rigby <jcrigby@gmail.com>
Wolfgang Denk [Sun, 24 May 2009 15:06:54 +0000 (17:06 +0200)]
General help message cleanup
Many of the help messages were not really helpful; for example, many
commands that take no arguments would not print a correct synopsis
line, but "No additional help available." which is not exactly wrong,
but not helpful either.
Commit ``Make "usage" messages more helpful.'' changed this
partially. But it also became clear that lots of "Usage" and "Help"
messages (fields "usage" and "help" in struct cmd_tbl_s respective)
were actually redundant.
This patch cleans this up - for example:
Before:
=> help dtt
dtt - Digital Thermometer and Thermostat
Usage:
dtt - Read temperature from digital thermometer and thermostat.
After:
=> help dtt
dtt - Read temperature from Digital Thermometer and Thermostat
Wolfgang Denk [Sun, 24 May 2009 17:17:29 +0000 (19:17 +0200)]
Make "usage" messages more helpful.
In case of incorrect command invocations U-Boot used to print pretty
useless "usage" messages, for example:
=> nand markbad
Usage:
nand - NAND sub-system
In the result, the user would have to run the "help" command to get
the (available) information about correct command usage. Change this,
so that this information gets always printed.
Note that this changes the user interface of all commands, but
hopefully to the better.
Mike Frysinger [Sun, 24 May 2009 06:26:19 +0000 (02:26 -0400)]
nvedit: speed up printing of environment
The printing code would check the same environment byte multiple times and
write to the console one byte at a time. For some devices (such as the
Blackfin JTAG console which operates in 8 bytes at a time), this is pretty
damned slow. So create a small 16 byte buffer to fill up and send to puts
as needed. In the process, unify the different print functions, shrink
the resulting code (source and compiled), and avoid excess env reads as
those too can be somewhat expensive depending on the board.
Tom Rix [Wed, 20 May 2009 12:55:41 +0000 (07:55 -0500)]
FAT replace compare_sign with strncmp.
The static function compare_sign is only used to compare the fs_type string
and does not do anything more than what strncmp does.
The addition of the trailing '\0' to fs_type, while legal, is not needed
because the it is never printed out and strncmp does not depend on NULL
terminated strings.
Wolfgang Denk [Sun, 17 May 2009 14:01:54 +0000 (16:01 +0200)]
cmd_mtdparts.c: allow to omit definitions for default settings
There is actually no good reason to enforce that all board
configuations must define default settings for "mtdids" and
"mtdparts". Actually this may be difficult to handle, especially on
boards where different sizes of flash chips can be fit, so there is no
real "default" partition map for all boards.
Stefan Roese [Tue, 12 May 2009 12:31:56 +0000 (14:31 +0200)]
cmd_mtdparts: Move to common handling of FLASH devices via MTD layer
This patch removes all references to the direct CFI FLASH interface
(via flash_info[]). Now that all FLASH types currently handled in
mtdparts are available (if selected, see below) via the MTD infrastructure.
This is NOR, NAND and OneNAND right now. This can be achieved by defining
the following options:
CONFIG_MTD_DEVICE (for all FLASH types)
plus
CONFIG_FLASH_CFI_MTD (for NOR FLASH)
So we need to add those defines to the board config headers currently
using the mtdparts commands. This is done via another patch, so
we shouldn't break mtdparts compatibility.
One big advantage from this solution is that the cmd_mtdparts.c is
*much* cleaner now. Lot's of #ifdef's are removed and the code itself
is smaller. Additionally the newly added MDT concatenation feature
can new be used via the mtdparts infrastructure and therefor via
UBI etc.
Signed-off-by: Stefan Roese <sr@denx.de> Cc: Ladislav Michl <ladis@linux-mips.org> Cc: Scott Wood <scottwood@freescale.com>
Stefan Roese [Tue, 12 May 2009 12:31:18 +0000 (14:31 +0200)]
mtd: Introduce CONFIG_MTD_DEVICE to select compilation of mtdcore.o
This new define enables mtdcore.c compilation and with this we can
select the MTD device infrastructure needed for the reworked mtdparts
command.
We now have the 2 MTD infrastructure defines, CONFIG_MTD_DEVICE and
CONFIG_MTD_PARTITIONS. CONFIG_MTD_DEVICE is needed (as explained above)
for the "mtdparts" command and CONFIG_MTD_PARTITIONS is needed for UBI.
Signed-off-by: Stefan Roese <sr@denx.de> Cc: Scott Wood <scottwood@freescale.com>
Stefan Roese [Tue, 12 May 2009 12:32:58 +0000 (14:32 +0200)]
mtd: MTD related config header changes (mtdparts command)
By changing the cmd_mtdparts to only use the MTD infrastructure and
not the direct interface to the CFI NOR FLASH driver we now need
to add the MTD infrastructure to all boards using those mtdparts
commands. This patch adds those components:
CONFIG_MTD_DEVICE (for all FLASH types)
plus
CONFIG_FLASH_CFI_MTD (for NOR FLASH)
To all board maintainers: Please test this on your platforms and
report any problems/issues found. Thanks.
Signed-off-by: Stefan Roese <sr@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Ron Madrid <info@sheldoninst.com> Cc: Georg Schardt <schardt@team-ctech.de> Cc: Michal Simek <monstr@monstr.eu> Cc: Ladislav Michl <ladis@linux-mips.org> Cc: Martin Krause <martin.krause@tqs.de> Cc: Gary Jennejohn <garyj@denx.de> Cc: Ricardo Ribalda <ricardo.ribalda@uam.es>
Stefan Roese [Mon, 11 May 2009 14:03:55 +0000 (16:03 +0200)]
mtd: Update MTD infrastructure to support 64bit device size
This patch brings the U-Boot MTD infrastructure in sync with the current
Linux MTD version (2.6.30-rc3). Biggest change is the 64bit device size
support and a resync of the mtdpart.c file which has seen multiple fixes
meanwhile.
Signed-off-by: Stefan Roese <sr@denx.de> Cc: Scott Wood <scottwood@freescale.com> Cc: Kyungmin Park <kmpark@infradead.org>
Stefan Roese [Tue, 12 May 2009 12:29:39 +0000 (14:29 +0200)]
mtd: Add MTD concat support to concatenate multiple MTD NOR devices
This patch adds concatenation support to the U-Boot MTD infrastructure.
By enabling CONFIG_MTD_CONCAT this MTD CFI wrapper will concatenate
all found NOR devices into one single MTD device. This can be used by
e.g by UBI to access a partition that spans over multiple NOR chips.
Tom Rix [Wed, 3 Jun 2009 01:53:56 +0000 (20:53 -0500)]
ZOOM2 detect the version of the zoom2 board at runtime.
There are currently 3 versions of the zoom2 board.
The production board, that is currently being released.
The beta board, similar in form to the production board but not released.
The alpha board, a set of PCBs with a very limited circulation.
GPIO 94 is used to determine the version of the board. If GPIO 94 is clear,
the board is a production board, otherwise it is a beta board.
The alpha board will likely be mistaken for a beta board. An alpha board
was unavailible for testing.
This has been tested on the beta and production boards.
Signed-off-by: Tom Rix <Tom.Rix@windriver.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tom Rix [Fri, 29 May 2009 23:57:31 +0000 (18:57 -0500)]
OMAP3 Turn on the GPIO bank clocks
The function and interface clocks for each GPIO bank, except the first, must
be explicitly turned on. These are controlled by the config level defines
CONFIG_OMAP3_GPIO_n where n is from 2 to 6.
Signed-off-by: Tom Rix <Tom.Rix@windriver.com> Acked-by: Dirk Behme <dirk.behme@googlemail.com>
Coldfire M5271: Activate u-boot system timer interrupt.
This patch assigns the u-boot system timer interrupt to
interrupt level 3, priority 6. Without this patch the interrupt
will be a level 0, priority 0, which disables it and cause
u-boot functions that relies on the timer (e.g. sleep command)
to never return.
Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
Dirk Behme [Sun, 31 May 2009 10:44:42 +0000 (12:44 +0200)]
OMAP3: Fix CKE1 MUX setting to allow self-refresh
The Beagle rev Cx and Overo boards are using both SDRC CSes. The MUX
setting is needed for the second CS clock signal to allow the 2 RAM
parts to be put in self-refresh correctly. This also works on rev B
Beagle boards with 128M of RAM.
From: Steve Sakoman <steve@sakoman.com>
From: Jean Pihet <jpihet@mvista.com> Signed-off-by: Jean Pihet <jpihet@mvista.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
Tom Rix [Sun, 31 May 2009 10:44:37 +0000 (12:44 +0200)]
ZOOM2 Add serial support.
Zoom2 serial is in general supplied by one of the 4 UARTS on the debug board.
The default serial is from the USB connector on left side of the debug board.
The USB connector will produce 2 of the 4 UARTS. On your host pick the first
enumeration.
The details of the setting of the serial gpmc setup are not available.
The values were provided by another party.
The serial port set up is the same with Zoom1.
Baud rate 115200, 8 bit data, no parity, 1 stop bit, no flow.
Thomas Lange [Sun, 3 May 2009 18:07:33 +0000 (20:07 +0200)]
ARM DaVinci: Reset with watchdog enabled
Once the Davinci watchdog has been enabled, the timeout
value cannot be changed. If the timeout in use is long,
it can take a long time for card to reset. By writing
an invalid service key, we can trigger an immediate reset.