Paul Gortmaker [Wed, 26 Sep 2012 11:43:54 +0000 (11:43 +0000)]
powerpc: delete Wind River SBC8560/8540 support
The sbc8548/60 (both similar, just variations in UART hardware)
support has been removed from the linux kernel as of v3.6-rc1~132
so lets also now remove it from the u-boot tree as well.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tom Rini [Wed, 17 Oct 2012 16:03:59 +0000 (09:03 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c
Tom Rini [Wed, 17 Oct 2012 15:57:13 +0000 (08:57 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-mips
Marek Vasut [Tue, 9 Oct 2012 07:20:22 +0000 (07:20 +0000)]
fs: fat: Fix mkcksum() function parameters
The mkcksum() function now takes one parameter, the pointer to
11-byte wide character array, which it then operates on.
Currently, the function is wrongly passed (dir_entry)->name, which
is only 8-byte wide character array. Though by further inspecting
the dir_entry structure, it can be noticed that the name[8] entry
is immediatelly followed by ext[3] entry. Thus, name[8] and ext[3]
in the dir_entry structure actually work as this 11-byte wide array
since they're placed right next to each other by current compiler
behavior.
Depending on this is obviously wrong, thus fix this by correctly
passing both (dir_entry)->name and (dir_entry)->ext to the mkcksum()
function and adjust the function appropriately.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@ti.com>
Stephen Warren [Mon, 8 Oct 2012 08:14:40 +0000 (08:14 +0000)]
disk: part_dos: print partition UUID in partition list
This information may be useful to compare against command "part uuid",
or if you want to manually paste the information into the kernel
command-line.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
[trini: print_one_part / print_part_dos output strings didn't quite
match before the changes]
Signed-off-by: Tom Rini <trini@ti.com>
Stephen Warren [Mon, 8 Oct 2012 08:14:38 +0000 (08:14 +0000)]
disk: part_dos: checkpatch cleanups
Minor cleanups required so later patches don't trigger checkpatch.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Stephen Warren [Mon, 8 Oct 2012 08:14:37 +0000 (08:14 +0000)]
disk: part_efi: set bootable flag in partition objects
A partition is considered bootable if it either has the "legacy BIOS
bootable" flag set, or if the partition type UUID matches the standard
"system" type.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Stephen Warren [Mon, 8 Oct 2012 08:14:36 +0000 (08:14 +0000)]
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>
Stephen Warren [Mon, 8 Oct 2012 08:14:35 +0000 (08:14 +0000)]
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>
Stephen Warren [Mon, 8 Oct 2012 08:14:34 +0000 (08:14 +0000)]
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>
Stephen Warren [Mon, 8 Oct 2012 08:14:33 +0000 (08:14 +0000)]
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>
Stephen Warren [Mon, 8 Oct 2012 08:14:32 +0000 (08:14 +0000)]
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>
Stephen Warren [Mon, 8 Oct 2012 07:45:54 +0000 (07:45 +0000)]
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>
Pavel Herrmann [Sun, 7 Oct 2012 05:56:14 +0000 (05:56 +0000)]
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>
Pavel Herrmann [Sun, 7 Oct 2012 05:56:13 +0000 (05:56 +0000)]
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>
Pavel Herrmann [Tue, 9 Oct 2012 07:10:08 +0000 (07:10 +0000)]
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>
Pavel Herrmann [Tue, 9 Oct 2012 07:06:25 +0000 (07:06 +0000)]
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>
Pavel Herrmann [Sun, 7 Oct 2012 05:56:10 +0000 (05:56 +0000)]
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>
Pavel Herrmann [Sun, 7 Oct 2012 05:56:09 +0000 (05:56 +0000)]
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>
Pavel Herrmann [Tue, 9 Oct 2012 07:04:39 +0000 (07:04 +0000)]
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>
Pavel Herrmann [Sun, 7 Oct 2012 05:56:07 +0000 (05:56 +0000)]
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>
Pavel Herrmann [Tue, 9 Oct 2012 07:01:56 +0000 (07:01 +0000)]
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>
Pavel Herrmann [Sun, 7 Oct 2012 05:56:05 +0000 (05:56 +0000)]
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>
Marek Vasut [Sat, 6 Oct 2012 14:07:06 +0000 (14:07 +0000)]
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>
Marek Vasut [Mon, 8 Oct 2012 11:36:39 +0000 (11:36 +0000)]
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>
Marek Vasut [Sat, 6 Oct 2012 14:07:04 +0000 (14:07 +0000)]
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>
Marek Vasut [Sat, 6 Oct 2012 14:07:03 +0000 (14:07 +0000)]
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>
Marek Vasut [Sat, 6 Oct 2012 14:07:02 +0000 (14:07 +0000)]
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>
Marek Vasut [Sat, 6 Oct 2012 14:07:01 +0000 (14:07 +0000)]
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>
Stefan Roese [Wed, 19 Sep 2012 03:18:53 +0000 (03:18 +0000)]
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>
Nobuhiro Iwamatsu [Tue, 17 Apr 2012 16:41:14 +0000 (16:41 +0000)]
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>
Joe Hershberger [Mon, 15 Oct 2012 15:29:25 +0000 (15:29 +0000)]
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>
Joe Hershberger [Mon, 15 Oct 2012 15:29:24 +0000 (15:29 +0000)]
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>
Daniel Schwierzeck [Tue, 16 Oct 2012 13:02:08 +0000 (15:02 +0200)]
MIPS: qemu_mips.h: cleanup coding style and checkpatch.pl issues
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Zhi-zhou Zhang [Tue, 16 Oct 2012 13:02:08 +0000 (15:02 +0200)]
MIPS: add board qemu-mips64 support
Both big-endian and little-endian are tested with below commands:
Rom version: (Default, Now we config it as rom version)
qemu-system-mips64el -M mips -bios u-boot.bin -cpu MIPS64R2-generic -nographic
qemu-system-mips64 -M mips -bios u-boot.bin -cpu MIPS64R2-generic -nographic
Ram version:
qemu-system-mips64el -M mips -cpu MIPS64R2-generic -kernel u-boot -nographic
qemu-system-mips64 -M mips -cpu MIPS64R2-generic -kernel u-boot -nographic
Signed-off-by: Zhizhou Zhang <etou.zh@gmail.com>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Zhi-zhou Zhang [Tue, 16 Oct 2012 13:02:08 +0000 (15:02 +0200)]
MIPS: qemu_mips: move CONFIG_SYS_TEXT_BASE to qemu-mips.h
We define CONFIG_SYS_TEXT_BASE in board's specified header file.
So config.mk is useless, then remove it.
Signed-off-by: Zhizhou Zhang <etou.zh@gmail.com>
Zhi-zhou Zhang [Tue, 16 Oct 2012 13:02:08 +0000 (15:02 +0200)]
MIPS: add support for 64 bit addressing
Prepare for upcoming mips64 support. This patch add mips64 address
support.
Signed-off-by: Zhizhou Zhang <etou.zh@gmail.com>
[daniel.schwierzeck@gmail.com: prefer _MIPS_SZLONG in posix_types.h to fix some warnings]
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Zhi-zhou Zhang [Tue, 16 Oct 2012 13:02:08 +0000 (15:02 +0200)]
MIPS: don't use camel-case style
Replace camel-case style with upper-case style globally.
Signed-off-by: Zhizhou Zhang <etou.zh@gmail.com>
Eric Nelson [Sun, 23 Sep 2012 10:12:56 +0000 (10:12 +0000)]
i2c_probe: update for use in scripting
Allow the use of an I2C address to test and return success
if one or more devices is found.
This allows device presence to alter the flow of a script.
e.g.
if i2c probe 0x04 ; then
echo found Hannstar touch ;
fi
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
York Sun [Sun, 16 Sep 2012 08:02:30 +0000 (08:02 +0000)]
common/i2c: Add i2c write command
Add i2c write command to write data from memory to i2c devices.
Signed-off-by: York Sun <yorksun@freescale.com>
Tetsuyuki Kobayashi [Thu, 13 Sep 2012 19:08:05 +0000 (19:08 +0000)]
i2c: sh_i2c: use setbits/clrbits macro
Use setbits/clrbits macro when read-modify-write register.
Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Tetsuyuki Kobayashi [Thu, 13 Sep 2012 19:08:04 +0000 (19:08 +0000)]
arm: rmobile: kzm9g: enable I2C2
Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Tetsuyuki Kobayashi [Thu, 13 Sep 2012 19:08:03 +0000 (19:08 +0000)]
arm: rmobile: kzm9g: enable I2C1
Supply clock to I2C1 and release resetting.
Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Tetsuyuki Kobayashi [Thu, 13 Sep 2012 19:08:01 +0000 (19:08 +0000)]
i2c: sh_i2c.c: check error in i2c_read and i2c_write
Before this patch, i2c_{read,write} always returned 0.
Check TACK in i2c_raw_{read,write} so that i2c_{read,write} return non-zero when error.
Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Tetsuyuki Kobayashi [Thu, 13 Sep 2012 19:08:00 +0000 (19:08 +0000)]
i2c: sh_i2c: enable i2c_probe
Before this patch i2c_probe() always returned 0 and "i2c probe" command did not work properly.
Modify i2c_set_addr() to check TACK when waiting DTE and make i2c_probe() call this function.
Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Tetsuyuki Kobayashi [Thu, 13 Sep 2012 19:07:59 +0000 (19:07 +0000)]
i2c: sh_i2c.c: support I2C2, I2C3 and I2C4
sh_i2c.c support I2C0 and I2C1. This patch extends it to I2C4.
Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Tetsuyuki Kobayashi [Thu, 13 Sep 2012 19:07:58 +0000 (19:07 +0000)]
i2c: sh_i2c.c: adjust for SH73A0
Adjust i2c_raw_read() in sh_i2c.c to work for SH73A0.
After this patch, "i2c md" and "i2c mw" command on U-Boot work properly on KZM-A9-GT board.
Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Tetsuyuki Kobayashi [Thu, 13 Sep 2012 19:07:57 +0000 (19:07 +0000)]
i2c: sh_i2c.c: correct BUSY bit define in ICSR
Correct BUSY bit define in ICSR from (1<<3) to (1<<4).
Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Tetsuyuki Kobayashi [Thu, 13 Sep 2012 19:07:56 +0000 (19:07 +0000)]
i2c: sh_i2c.c: support iccl and icch extension
R-mobile SoC (at least SH73A0) has extension bits to store 8th bit of iccl and icch.
This patch add support for the extentin bits.
Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Tom Rini [Mon, 15 Oct 2012 20:37:22 +0000 (13:37 -0700)]
Merge branch 'agust@denx.de-next' of git://git.denx.de/u-boot-staging
Joe Hershberger [Fri, 12 Oct 2012 10:23:37 +0000 (10:23 +0000)]
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>
Marek Vasut [Sat, 6 Oct 2012 14:05:01 +0000 (14:05 +0000)]
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>
Marek Vasut [Sat, 6 Oct 2012 14:05:00 +0000 (14:05 +0000)]
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>
Marek Vasut [Sat, 6 Oct 2012 14:04:59 +0000 (14:04 +0000)]
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>
Marek Vasut [Sat, 6 Oct 2012 14:04:58 +0000 (14:04 +0000)]
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>
Fabio Estevam [Sun, 30 Sep 2012 05:07:10 +0000 (05:07 +0000)]
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>
Fabio Estevam [Tue, 25 Sep 2012 08:43:57 +0000 (08:43 +0000)]
mx6qsabreauto: Add Ethernet support
mx6qsabreauto has a AR8031 Gigabit PHY.
Add support for it.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Benoît Thébaudeau [Mon, 20 Aug 2012 09:00:57 +0000 (09:00 +0000)]
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>
Benoît Thébaudeau [Tue, 14 Aug 2012 08:43:07 +0000 (08:43 +0000)]
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>
Benoît Thébaudeau [Tue, 14 Aug 2012 11:03:59 +0000 (11:03 +0000)]
mx35: Define MAX and AIPS registers
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Benoît Thébaudeau [Tue, 14 Aug 2012 08:43:29 +0000 (08:43 +0000)]
mx31: Add more CCM access macros
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Benoît Thébaudeau [Tue, 14 Aug 2012 05:19:12 +0000 (05:19 +0000)]
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>
Otavio Salvador [Wed, 26 Sep 2012 11:37:01 +0000 (11:37 +0000)]
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>
Benoît Thébaudeau [Thu, 27 Sep 2012 10:28:29 +0000 (10:28 +0000)]
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>
Benoît Thébaudeau [Thu, 27 Sep 2012 10:28:09 +0000 (10:28 +0000)]
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>
Benoît Thébaudeau [Thu, 27 Sep 2012 10:27:57 +0000 (10:27 +0000)]
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>
Benoît Thébaudeau [Thu, 27 Sep 2012 10:27:44 +0000 (10:27 +0000)]
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>
Benoît Thébaudeau [Thu, 27 Sep 2012 10:27:28 +0000 (10:27 +0000)]
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>
Benoît Thébaudeau [Thu, 27 Sep 2012 10:27:14 +0000 (10:27 +0000)]
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>
Benoît Thébaudeau [Thu, 27 Sep 2012 10:26:54 +0000 (10:26 +0000)]
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>
Benoît Thébaudeau [Thu, 27 Sep 2012 10:24:37 +0000 (10:24 +0000)]
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>
Benoît Thébaudeau [Thu, 27 Sep 2012 10:24:13 +0000 (10:24 +0000)]
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>
Benoît Thébaudeau [Thu, 27 Sep 2012 10:23:58 +0000 (10:23 +0000)]
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>
Benoît Thébaudeau [Thu, 27 Sep 2012 10:23:42 +0000 (10:23 +0000)]
mx5 clocks: Simplify imx_get_cspiclk()
The code handling the dividers was duplicated for each possible input clock, and
this function can benefit from the newly introduced get_standard_pll_sel_clk()
function instead of duplicating this mux handling code.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Benoît Thébaudeau [Thu, 27 Sep 2012 10:23:23 +0000 (10:23 +0000)]
mx5 clocks: Fix get_uart_clk()
This function returned
66500000 instead of the correct lp_apm clock frequency if
the CCM.CSCMR1.uart_clk_sel mux is set to 3.
This patch fixes this issue by introducing the get_standard_pll_sel_clk()
function that will be used by future patches to handle identical muxes used by
many other clocks.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Benoît Thébaudeau [Thu, 27 Sep 2012 10:23:08 +0000 (10:23 +0000)]
mx5 clocks: Fix get_ipg_per_clk()
This fixes the "IPG PERCLK" frequency printed by the clocks command. The issue
was that get_ipg_per_clk() used periph_clk instead of lp_apm in the case
CCM.CBCMR.perclk_lp_apm_sel is set.
It also fixes I²C support.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Benoît Thébaudeau [Thu, 27 Sep 2012 10:22:51 +0000 (10:22 +0000)]
mx5 clocks: Fix get_periph_clk()
In the case periph_clk comes from periph_apm_clk, the latter is selected by the
CCM.CBCMR.periph_apm_sel mux, which can source the lp_apm clock from its
input ♯2. get_periph_clk() returned 0 instead of the lp_apm clock frequency in
this case.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Benoît Thébaudeau [Thu, 27 Sep 2012 10:22:37 +0000 (10:22 +0000)]
mx5 clocks: Fix get_lp_apm()
If CCM.CCSR.lp_apm is set, the lp_apm clock is not necessarily 32768 Hz x 1024.
In that case:
- on i.MX51, this clock comes from the output of the FPM,
- on i.MX53, this clock comes from the output of PLL4.
This patch fixes the code accordingly.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Benoît Thébaudeau [Thu, 27 Sep 2012 10:22:22 +0000 (10:22 +0000)]
mx5 clocks: Add and use CCSR definitions
This fixes config_pll_clk(), which used 0x20 instead of 0x200 for PLL4_CLOCK.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Benoît Thébaudeau [Fri, 28 Sep 2012 07:09:03 +0000 (07:09 +0000)]
mx51: Fix USB PHY clocks
The i.MX51 has a single USB PHY clock, while the i.MX53 has two. These 3 clocks
have different clock gate control bit-fields.
The existing code was correct only for i.MX53, so this patch fixes the i.MX51
use case.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Jana Rapava <fermata7@gmail.com>
Cc: Wolfgang Grandegger <wg@denx.de>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Benoît Thébaudeau [Thu, 27 Sep 2012 10:21:22 +0000 (10:21 +0000)]
mx5: Fix clock gate values
The clock gate values are 2-bit bit-fields. Hence, setting or clearing only one
of these bits like what was done is wrong and can lead to unpredictable behavior
depending on the original value of these bit-fields.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Benoît Thébaudeau [Thu, 27 Sep 2012 10:21:00 +0000 (10:21 +0000)]
mx5: Use explicit clock gate names
Use clock gate definitions having names showing clearly the gated clock instead
of names giving only a register field index.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Benoît Thébaudeau [Thu, 27 Sep 2012 10:20:33 +0000 (10:20 +0000)]
mx5 clocks: Cleanup
Clean up the i.MX5 clock driver:
- Use readl() and writel() instead of their __raw_ counterparts.
- Use the clr/setbits_le32() family of macros rather than expanding code.
- Use accessor macros for bit-fields instead of _MASK and _OFFSET.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Benoît Thébaudeau [Thu, 27 Sep 2012 10:19:58 +0000 (10:19 +0000)]
mx5/6: Define default SoC input clock frequencies
Define default SoC input clock frequencies for i.MX5/6 in order to get rid of
duplicated definitions.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Jason Liu <r64343@freescale.com>
Cc: Matt Sealey <matt@genesi-usa.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Matthias Weisser [Mon, 24 Sep 2012 02:46:53 +0000 (02:46 +0000)]
imx: Use MXC_I2C_CLK in imx i2c driver
i2c didn't work on imx25 due to missing MXC_IPG_PERCLK. Now using
MXC_I2C_CLK on all imx systems using i2c.
Signed-off-by: Matthias Weisser <weisserm@arcor.de>
Acked-by: Stefano Babic <sbabic@denx.de>
Eric Benard [Sun, 23 Sep 2012 02:03:05 +0000 (02:03 +0000)]
mx25: add CPU revision 1.2
tested on a MCIMX257CJM4A which now reports :
CPU: Freescale i.MX25 rev1.2 at 399 MHz
Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Fabio Estevam [Mon, 24 Sep 2012 08:09:33 +0000 (08:09 +0000)]
mx6q: Add basic support for mx6qsabreauto
mx6qsabreauto is a board based on mx6q SoC with the following features:
- 2GB of DDR3
- 2 USB ports
- 1 HDMI output port
- SPI NOR
- 2 LVDS LCD ports
- Gigabit Ethernet
- Camera
- eMMC and SD card slot
- Multichannel Audio
- CAN
- SATA
- NAND
- PCIE
- Video Input
Add very basic support for it.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Fabio Estevam [Mon, 24 Sep 2012 08:09:32 +0000 (08:09 +0000)]
configs: mx6: Add a common config file
Add a common mx6 config file that can be shared between some mx6 boards.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Eric Nelson [Tue, 18 Sep 2012 15:26:32 +0000 (15:26 +0000)]
i.MX6: get rid of redundant struct src_regs (dupe of struct src)
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Eric Nelson [Wed, 19 Sep 2012 08:32:31 +0000 (08:32 +0000)]
i.MX6: define struct iomuxc and IOMUX_GPR2 register bitfields
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Eric Nelson [Wed, 19 Sep 2012 08:29:46 +0000 (08:29 +0000)]
i.MX6: Add ANATOP_PFD_480 bitfield constants
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Eric Nelson [Fri, 21 Sep 2012 11:41:42 +0000 (11:41 +0000)]
i.MX6: define IOMUX_GPR3 register bitfields
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Eric Nelson [Wed, 19 Sep 2012 08:33:50 +0000 (08:33 +0000)]
i.MX6: define bitfields for CHSCCDR register
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Eric Nelson [Mon, 17 Sep 2012 10:20:50 +0000 (10:20 +0000)]
i.MX6: change register name for CCM_CHSCCDR to match ref. manual
Register CCM_CHSCCDR (offset 0x34 in CCM) is named CCM_CHSCCDR in
reference manual, but was named chscdr in struct mxc_ccm_reg.
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Eric Nelson [Fri, 21 Sep 2012 07:33:51 +0000 (07:33 +0000)]
i.MX6: provide functional names for CCM_CCGR0-CCGR6 bit fields
Add meaningful constants for each clock channels and use them for
enabling and disabling i.MX6 clocks.
Includes an update to enable/disable the IPU1 clock in
drivers/video/ipu_common to remove IMX5x register access
when used on i.MX6 as discussed in V1:
http://patchwork.ozlabs.org/patch/185129/
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Fabio Estevam [Tue, 18 Sep 2012 09:27:49 +0000 (09:27 +0000)]
mx6qsabresd: Add 8-bit USDHC support
USDHC3 has 8 pins wired in mx6qsabresd. Configure the extra pins.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Fabio Estevam [Tue, 18 Sep 2012 17:24:23 +0000 (17:24 +0000)]
mx6qsabresd: Add Ethernet support
mx6qsabresd has a AR8031 Gigabit PHY.
Add support for it.
Also increase CONFIG_SYS_MALLOC_LEN so that FEC buffer allocation does not fail.
Tested on 1Gbp and 100Mbps networks.
Suggested-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
Fabio Estevam [Thu, 13 Sep 2012 03:18:20 +0000 (03:18 +0000)]
mx6: Add basic support for mx6qsabresd board.
mx6qsabresd is a board based on mx6q SoC with the following features:
- 1GB of DDR3
- 1 USB OTG port
- 1 HDMI output port
- SPI NOR
- LVDS panel
- Gigabit Ethernet
- Camera Connector
- eMMC and SD card slot
- Audio
Add very basic support for it.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Fabio Estevam [Thu, 13 Sep 2012 03:18:19 +0000 (03:18 +0000)]
mx6q: Factor out common DDR3 init code
Factor out common DDR3 initialization code, allowing easier maintainance of such
scripts.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Lukasz Dalek [Tue, 2 Oct 2012 22:51:06 +0000 (00:51 +0200)]
pxa: Add code to examine cpu model and revision
Add function which return CPU model and revision which can be used for
cpu detection.
Signed-off-by: Lukasz Dalek <luk0104@gmail.com>