Commit Graph

18047 Commits

Author SHA1 Message Date
Stephen Warren
13bf2f55d9 disk: part_efi: print raw partition attributes
When printing the EFI partition table, print the raw attributes. Convert
struct gpt_entry_attributes to a union to allow raw access.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
2012-10-17 07:59:10 -07:00
Stephen Warren
1c8346ab38 disk: part_efi: add new partition attribute definitions
Add no_block_io_protocol and legacy_bios_bootable attribute definitions.
These are sourced from UEFI Spec 2.3, page 105, table 19. Credits to the
libparted source for the specification pointer.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
2012-10-17 07:59:10 -07:00
Stephen Warren
f07cd2c4c7 disk: part_efi: print partition UUIDs
When printing the partition table, print the partition type UUID and the
individual partition UUID. Do this unconditionally, since partition UUIDs
are useful.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
2012-10-17 07:59:10 -07:00
Stephen Warren
788a8c1fc9 disk: part_efi: re-order partition list printf, change case
The partition name is a long variable-length string. Move it last on
the line to ensure consistent layout and that the entries align with
the "header" line. Also, surround it in quotes, so if it's empty, it's
obvious that something is still being printed.

Also, change the case of the LBA numbers; lower-case looks nicer in my
opinion, and will be more consistent with the UUID printing that is
added later in this series.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
2012-10-17 07:59:10 -07:00
Stephen Warren
38a3021edc disk: part_efi: remove indent level from loop
Simplify the partition printing loop in print_part_efi() to bail out
early when the first invalid partition is found, rather than indenting
the whole body of the loop. This simplifies later patches.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
2012-10-17 07:59:10 -07:00
Stephen Warren
71bba424ad disk: get_device_and_partition() return value fixes
When no valid partitions are found, guarantee that we return -1. This
most likely already happens, since the most recent get_partition_info()
will have returned an error. However, it's best to be explicit.

Remove an unnecessary assignment of ret=0 in the success case; this value
is over-written with the processed partition ID later.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
2012-10-17 07:59:09 -07:00
Pavel Herrmann
8af4472a77 remove unnecessary includes from cmd_ide.c
mpc8xx and mpc5xxx specific includes in cmd_ide.c are not required, remove them.

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
2012-10-17 07:59:09 -07:00
Pavel Herrmann
21d2bf426f split PCS440EP specific code from cmd_ide.c
Move specific ide_input_data and friends to board-specific file.

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
2012-10-17 07:59:09 -07:00
Pavel Herrmann
4d1361d867 split AU1X00 specific code from cmd_ide.c
move special case of ide_swap_read() for AU1X00 SoC into SoC-specific directory.

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
2012-10-17 07:59:09 -07:00
Pavel Herrmann
0a4a64c079 move CPC45 ide_led to the same file as other IDE hooks
Keep all IDE-related hooks and overrides in a single file, to avoid confusion

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
2012-10-17 07:59:09 -07:00
Pavel Herrmann
19be2ea2ef make ide_led() a weak alias
Make ide_led() a weak alias instead of global/local function/empty macro
based on CONFIG_IDE_LED value and/or board-specific CONFIGs, to get rid of
board-specific code in cmd_ide.c
Define dummy values to get rid of compoler errors in case where ide_led()
used to be an empty macro

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
2012-10-17 07:59:09 -07:00
Pavel Herrmann
28920b1fd2 split CPC45 board-specific IDE functions from cmd_ide.c
Move input_data() and friends to board/cpc45/ide.c, as overrides for weak
aliases in cmd_ide.c

note: checkpatch emits warnings about using volatile

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
2012-10-17 07:59:08 -07:00
Pavel Herrmann
f5b82c0f9c change all versions of input_data() and output_data() to global weak aliases
This changes input_data() and friends from static function to global symbols
under weak alias, to enable board specific overrides (and therefore get rid of
board-specific code in cmd_ide.c)
Also declare ide_bus_offset in the header file, so other files can use
ATA_CURR_BASE as well.

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
2012-10-17 07:59:08 -07:00
Pavel Herrmann
e4148c1165 split IVM power hooks from cmd_ide.c
Move power control code from ide_reset() into IVM-specific IDE reset code.

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
2012-10-17 07:59:08 -07:00
Pavel Herrmann
8d1165e11a split mpc8xx hooks from cmd_ide.c
move most of mpc8xx hooks from cmd_ide.c into ide_preinit() and newly created
ide_init_postreset() (invoked after calling ide_reset after ide_preinit),
some cleanup to make checkpatch happy, enable IDE init hooks in configs of
affected boards.
confusingly, these hooks are used by more than just mpc8xx-based boards, and
therefore are placed in arch/ppc/lib/

note: checkpatch still emits warnings about using volatile

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
2012-10-17 07:59:08 -07:00
Pavel Herrmann
94fa029a6d remove CONFIG_SC3 from cmd_ide.c
There is no difference in codepath with CONFIG_SC3 enabled, so just remove it

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
2012-10-17 07:59:08 -07:00
Marek Vasut
eb1f09e007 kerneldoc: stdio: tmpl: Add stdio template
Add STDIO documentation template.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Tom Rini <trini@ti.com>
[trini: Fix DOCBOOKS line as we don't have linker_lists yet]
Signed-off-by: Tom Rini <trini@ti.com>
2012-10-17 07:58:44 -07:00
Marek Vasut
9cd2b9e47e kerneldoc: Annotate drivers/serial/serial.c
Add kerneldoc annotations into serial core.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Tom Rini <trini@ti.com>
2012-10-17 07:58:43 -07:00
Marek Vasut
dee1941604 serial: Reorder get_current()
Reorder the get_current() function to make it a bit more readable.
The code does not grow and there is minor change in the code logic,
where dev != NULL is now checked in any case.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Tom Rini <trini@ti.com>
2012-10-17 07:55:51 -07:00
Marek Vasut
6d93e25806 serial: Reorder serial_assign()
Reorder serial_assign() function to get rid of the extra level of
indentation. Also, adjust the return value to be -EINVAL instead of
positive one to be more consistent.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Tom Rini <trini@ti.com>
2012-10-17 07:55:50 -07:00
Marek Vasut
ec3fd68952 serial: Use default_serial_puts() in drivers
Replace the in-place ad-hoc implementation of serial_puts() within
the drivers with default_serial_puts() call. This cuts down on the
code duplication quite a bit.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Tom Rini <trini@ti.com>
2012-10-17 07:55:50 -07:00
Marek Vasut
bfb7d7a3d6 serial: Implement default_serial_puts()
U-Boot contains a lot of duplicit implementations of serial_puts()
call which just pipes single characters into the port in loop. Implement
function that does this behavior into common code, so others can make
easy use of it.

This function is called default_serial_puts() and it's sole purpose
is to call putc() in loop on the whole string passed to it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Tom Rini <trini@ti.com>
2012-10-17 07:55:50 -07:00
Stefan Roese
bfa5b71408 mpc82xx: Remove BMW board port
As the board seems to be unmaintained for some time, lets remove
the support in mainline completely.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: James F. Dougherty <jfd@broadcom.com>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
2012-10-17 07:55:50 -07:00
Nobuhiro Iwamatsu
6abcf2d531 nds32: Change macro from BOARD_LATE_INIT to CONFIG_BOARD_LATE_INIT
With almost all the architecture and board BOARD_LATE_INIT does not use.
CONFIG_BOARD_LATE_INIT is used instead.
This changed CONFIG_BOARD_LATE_INIT from BOARD_LATE_INIT.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
CC: Macpaul Lin <macpaul@andestech.com>
[trini: Fixup for context changes]
Signed-off-by: Tom Rini <trini@ti.com>
2012-10-17 07:55:50 -07:00
Joe Hershberger
74620e1c94 tools/env: Improve debug prints
Provide more information when using redundant environments
Consistently print debug info to stderr

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-10-16 08:47:27 -07:00
Joe Hershberger
ce2f580017 tools/env: Fix variable delete operation
Fix crash introduced by a073d63a36524453a817ab029fad5b188f46127e
when attempting to delete a variable.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-10-16 08:47:27 -07:00
Tom Rini
bd23b22bad Merge branch 'agust@denx.de-next' of git://git.denx.de/u-boot-staging 2012-10-15 13:37:22 -07:00
Joe Hershberger
06134211ee tools/env: Fix build failure from missing header include
This was introduced in:
8679d0ffdcc0beafea8e6942c0c67cf859afa18e -
	COMMON: Use __stringify() instead of MK_STR()

The header is now needed since common.h is not included in this tool.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-10-15 13:36:48 -07:00
Marek Vasut
34e24b620a kerneldoc: Add myself to the git-mailrc for kerneldoc
Add entry for kerneldoc into the git-mailrc pointing to the U-Boot ML
and myself.

Signed-off-by: Marek Vasut <marex@denx.de>
2012-10-15 11:54:15 -07:00
Marek Vasut
95d45a91d7 kerneldoc: Implement "Example" section handling
The default kernel-doc strips starting spaces from every single
line in the Example section. This makes the code look bad. Thus,
implement special handling for this section.

Signed-off-by: Marek Vasut <marex@denx.de>
2012-10-15 11:54:15 -07:00
Marek Vasut
8d5d89e21d kerneldoc: Add nicer CSS stylesheet for HTML docs
Import basic CSS stylesheet for the HTML documentation. The base for
the stylesheet is taken from:

	http://ds9a.nl/docbook/minimal-page.html

I customized the CSS a bit further, for example to add curvy corners
to example section and change the tint of gray. The HTML documentation
does not look that crude anymore.

Signed-off-by: Marek Vasut <marex@denx.de>
2012-10-15 11:54:15 -07:00
Marek Vasut
30ff89189b kerneldoc: Implant DocBook from Linux kernel
Pull slightly modified version of Documentation/DocBook, the related perl
script scripts/kernel-doc and the scripts/docproc.c from Linux kernel and
implant it into U-Boot. This will allow smooth generation of kerneldoc
style documentation.

It was necessary to modify the DocBook/Makefile to work with U-Boot build
system. The changes were only minor though and involved replacing the kbuild
specific parts.

It was also necessary to replace use of variables like KERNEL_VERSION with
U_BOOT_VERSION, strings like Linux kernel with U-Boot Bootloader etc. so
the generated result actually matches.

Finally, it was necessary to adjust docproc.c, since the documentation in
U-Boot is located in doc/DocBook instead of Documentation/DocBook as is in
case of the Linux kernel.

Some parts of the DocBook Makefile are unused, but to allow easier sync with
Linux kernel, these parts are still left in. The targets enabled now are
"htmldocs" "pdfdocs" "psdocs" "xmldocs" and "cleandocs" to remove the results
of documentation build.

Linux scripts/docproc.c:
commit f0f3ca8d967462dafb815412b14ca3339b9817a6
Date:   Wed Jun 15 11:53:13 2011 +0200

Linux scripts/kernel-doc:
commit 1b40c1944db445c1de1c47ffd8cd426167f488e8
Date:   Sun Aug 12 10:46:15 2012 +0200

Linux Documentation/DocBook:
commit bb8187d35f820671d6dd76700d77a6b55f95e2c5
Date:   Thu May 17 19:06:13 2012 -0400

Signed-off-by: Marek Vasut <marex@denx.de>
2012-10-15 11:54:14 -07:00
Fabio Estevam
c50204a517 configs: mx6qsabre_common.h: Use default clock definitions
Since commit 50d4a707f0 (mx5/6: Define default SoC input clock frequencies)
we can use the default clock values.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2012-10-15 11:54:14 -07:00
Fabio Estevam
fe5ebe97fa mx6qsabreauto: Add Ethernet support
mx6qsabreauto has a AR8031 Gigabit PHY.

Add support for it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2012-10-15 11:54:14 -07:00
Benoît Thébaudeau
85d993cef9 mx25: Clean up lowlevel_init
Clean up mx25 lowlevel_init:
 - Add comments.
 - Do not use write32 repeatedly with the same value in order not to increase
   code size.
 - Make register values configurable.
 - Use macro parameters with default values instead of literal constants.
 - Use defined macros instead of duplicating code.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: John Rigby <jcrigby@gmail.com>
Cc: Matthias Weisser <weisserm@arcor.de>
2012-10-15 11:54:14 -07:00
Benoît Thébaudeau
9e0081d573 mx31: Fix PDR0_CSI_PODF
The CSI PODF bit-field used by the previous code for the i.MX31 CCM PDR0
register is actually composed of two bit-fields: one pre-divider and one
post-divider. This patch fixes the CCM access macros and the code using them
accordingly.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
2012-10-15 11:54:14 -07:00
Benoît Thébaudeau
b809b3ac13 mx35: Define MAX and AIPS registers
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
2012-10-15 11:54:14 -07:00
Benoît Thébaudeau
df7e420bbd mx31: Add more CCM access macros
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
2012-10-15 11:54:13 -07:00
Benoît Thébaudeau
dd227b6ea0 mx5: Optimize lowlevel_init code size
Optimize mx5 lowlevel_init.S code size:
 - Compute values at compile time rather than at runtime where possible.
 - Assign r4 to hold the zero value rather than setting registers to 0 again and
   again.
 - Associate a function to setup_pll rather than expanding its large macro code
   multiple times.
 - Allocate constant values in section only if used.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Tested-by: Stefano Babic <sbabic@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
2012-10-15 11:54:13 -07:00
Otavio Salvador
51535d9f6f mx6qsabreauto: Use ttymxc3 as console
The mx6qsabreauto console is different than mx6qsabresd so the console
configuration is now set in the board file.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Stefano Babic <sbabic@denx.de>
2012-10-15 11:54:13 -07:00
Benoît Thébaudeau
6be5800504 mx25: Fix eSDHC support
The MMC driver appropriate for the i.MX25 is fsl_esdhc, which has nothing to do
with mxcmmc.

Also, each eSDHC instance has a dedicated clock, so gd->sdhc_clk must be set
accordingly. This is good for the case only a single SDHC instance is used
(initialization made with fsl_esdhc_mmc_init()). A future patch will fix the
multi-instance use case (initialization made directly with
fsl_esdhc_initialize()).

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Eric Bénard <eric@eukrea.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
2012-10-15 11:54:13 -07:00
Benoît Thébaudeau
f7542638c7 mx25: Define cpu_eth_init() only if needed
The FEC is the only SoC Ethernet support available on i.MX25, so define
cpu_eth_init() only for it instead of returning a misleading success code.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
2012-10-15 11:54:13 -07:00
Benoît Thébaudeau
9baefa465d mx25: Clean up clocks API
Use the standard mxc_get_clock() instead of exporting internal functions and
using literal constant values.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
2012-10-15 11:54:13 -07:00
Benoît Thébaudeau
17c7cf71b4 mx25 clocks: Fix MXC_FEC_CLK
mxc_get_clock(MXC_FEC_CLK) should return the IPG clock, not the AHB clock.

Also, imx_get_fecclk() was correct but reimplemented the calculation of the IPG
clock, so remove the duplicated code.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
2012-10-15 11:54:13 -07:00
Benoît Thébaudeau
c3b5189031 mx25: Define more standard clocks
Define AHB, IPG and CSPI clocks.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
2012-10-15 11:54:12 -07:00
Benoît Thébaudeau
fac7c817c3 mx25: Clean up clock calculations
Avoid possible overflow in clock calculations, and do not waste calls to lldiv()
to divide simple ulongs.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
2012-10-15 11:54:12 -07:00
Benoît Thébaudeau
3c76add262 mx25: Fix decode_pll
The MFN bit-field of the PLL registers represents a signed value. See the
reference manual.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
2012-10-15 11:54:12 -07:00
Benoît Thébaudeau
323846561a mx5/6 clocks: Fix SDHC clocks
The i.MX5 eSDHC clocks were considered as coming from the IPG clock although
they have dedicated clock paths.

Also, on i.MX5/6, each SDHC instance has a dedicated clock, so gd->sdhc_clk must
be set accordingly. This is good for the case only a single SDHC instance is
used (initialization made with fsl_esdhc_mmc_init()). A future patch will fix
the multi-instance use case (initialization made directly with
fsl_esdhc_initialize()).

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Eric Bénard <eric@eukrea.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
2012-10-15 11:54:12 -07:00
Benoît Thébaudeau
be2f93b1ea mx51: Fix I2C clock ID check
There are only 2 I²C instances on i.MX51, but 3 on i.MX53.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
2012-10-15 11:54:12 -07:00
Benoît Thébaudeau
d5fe220df4 mx5 clocks: Fix MXC_FEC_CLK
The FEC clock does not come from PLL1, but from the IPG clock. The previous code
was even inconsistent with itself, returning the IPG clock as expected for
imx_get_fecclk(), but the PLL1 clock for mxc_get_clock(MXC_FEC_CLK).

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
2012-10-15 11:54:12 -07:00