project/bcm63xx/u-boot.git
12 years agopowerpc/mpc85xx: Fix a bug introduced by CONFIG_PPC_SPINTABLE_COMPATIBLE
York Sun [Thu, 8 Nov 2012 12:33:39 +0000 (12:33 +0000)]
powerpc/mpc85xx: Fix a bug introduced by CONFIG_PPC_SPINTABLE_COMPATIBLE

Fix a bug introduced by this patch
powerpc/mpc85xx: Temporary fix for spin table backward compatibility

Should have checked both CONFIG_PPC_SPINTABLE_COMPATIBLE and CONFIG_MP in
cpu_init.c.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agopowerpc/85xx: update the work-around for P4080 erratum SERDES-9
Timur Tabi [Thu, 1 Nov 2012 08:20:22 +0000 (08:20 +0000)]
powerpc/85xx: update the work-around for P4080 erratum SERDES-9

The documented work-around for P4080 erratum SERDES-9 has been updated.
It is now compatible with the work-around for erratum A-4580.

This requires adding a few bitfield macros for the BnTTLCRy0 register.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agopowerpc/p4080ds: fix PCI-e x8 link training down failure
Yuanquan Chen [Mon, 26 Nov 2012 23:49:45 +0000 (23:49 +0000)]
powerpc/p4080ds: fix PCI-e x8 link training down failure

Due to SerDes configuration error, if we set the PCI-e controller link width
as x8 in RCW and add a narrower width(such as x4, x2 or x1) PCI-e device to
PCI-e slot, it fails to train down to the PCI-e device's link width. According
to p4080ds errata PCIe-A003, we reset the PCI-e controller link width to x4 in
u-boot. Then it can train down to x2 or x1 width to make the PCI-e link between
RC and EP.

Signed-off-by: Yuanquan Chen <B41889@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agopowerpc/corenet_ds: move SATA config to board configuration
Zang Roy-R61911 [Mon, 26 Nov 2012 00:05:38 +0000 (00:05 +0000)]
powerpc/corenet_ds: move SATA config to board configuration

board configuration file is included before asm/config_mpc85xx.h.
however, CONFIG_FSL_SATA_V2 is defined in asm/config_mpc85xx.h.
it will never take effective in the board configuration file for
this kind of code :

 #ifdef CONFIG_FSL_SATA_V2
 ...
 #endif

To solve this problem, move CONFIG_FSL_SATA_V2 to board
configuration header file.

This patch reverts Timur's
commit:3e0529f742e893653848494ffb9f7cd0d91304bf

Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agopowerpc/85xx: implement check for erratum A-004580 work-around
Timur Tabi [Thu, 1 Nov 2012 08:20:23 +0000 (08:20 +0000)]
powerpc/85xx: implement check for erratum A-004580 work-around

The work-around for erratum A-004580 ("Internal tracking loop can falsely
lock causing unrecoverable bit errors") is implemented via the PBI
(pre-boot initialization code, typically attached to the RCW binary).
This is because the work-around is easier to implement in PBI than in
U-Boot itself.

It is still useful, however, for the 'errata' command to tell us whether
the work-around has been applied.  For A-004580, we can do this by verifying
that the values in the specific registers that the work-around says to
update.

This change requires access to the SerDes lane sub-structure in
serdes_corenet_t, so we make it a named struct.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agopowerpc/mpc8xxx: take fdt_fixup_crypto_node() off the checkstack list
Kim Phillips [Wed, 31 Oct 2012 11:09:26 +0000 (11:09 +0000)]
powerpc/mpc8xxx: take fdt_fixup_crypto_node() off the checkstack list

by moving compat_strlist into the .bss section.

0xfe004d80 fdt_fixup_crypto_node [u-boot]: 264

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agopowerpc/mpc85xx: Temporary fix for spin table backward compatibility
York Sun [Sun, 28 Oct 2012 08:12:54 +0000 (08:12 +0000)]
powerpc/mpc85xx: Temporary fix for spin table backward compatibility

Once u-boot sets the spin table to cache-enabled memory, old kernel which
uses cache-inhibit mapping without coherence will not work properly. We
use this temporary fix until kernel has updated its spin table code.
For now this fix is activated by default. To disable this fix for new
kernel, set environmental variable "spin_table_compat=no". After kernel
has updated spin table code, this default shall be changed.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agopowerpc/P2041RDB: Fix Flash address LAW address
York Sun [Fri, 26 Oct 2012 16:40:15 +0000 (16:40 +0000)]
powerpc/P2041RDB: Fix Flash address LAW address

P2041RDB uses common corenet TLB and LAW. However it doesn't have promjet
connector. It is necessary to use the same base address for correct LAW
address. An offset is added for NOR flash.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agopowerpc/corenet_ds: Update DDR timing for single-rank DIMMs
York Sun [Fri, 26 Oct 2012 16:40:14 +0000 (16:40 +0000)]
powerpc/corenet_ds: Update DDR timing for single-rank DIMMs

Single rank UDIMM timing has been verified with HMT325U7BFR8C-H9 for speed
800, 900, 1000, 1200, 1300MT/s.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agopowerpc/85xx: implement check for erratum A-004849 work-around
Timur Tabi [Thu, 25 Oct 2012 12:40:00 +0000 (12:40 +0000)]
powerpc/85xx: implement check for erratum A-004849 work-around

The work-around for erratum A-004849 ("CoreNet fabric (CCF) can exhibit a
deadlock under certain traffic patterns causing the system to hang") is
implemented via the PBI (pre-boot initialization code, typically attached
to the RCW binary).  This is because the work-around is easier to implement
in PBI than in U-Boot itself.

It is still useful, however, for the 'errata' command to tell us whether
the work-around has been applied.  For A-004849, we can do this by verifying
that the values in the specific registers that the work-around says to
update.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agopowerpc/85xx: add support for the Freescale P5040DS Superhydra reference board
Timur Tabi [Tue, 23 Oct 2012 09:40:22 +0000 (09:40 +0000)]
powerpc/85xx: add support for the Freescale P5040DS Superhydra reference board

The P5040DS reference board (a.k.a "Superhydra") is an enhanced version of
P3041DS/P5020DS ("Hydra") reference board.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agopowerpc/85xx/p5040: add CONFIG_SYS_PPC64, del CONFIG_SYS_FSL_ELBC_MULTIBIT_ECC
Timur Tabi [Tue, 23 Oct 2012 10:48:09 +0000 (10:48 +0000)]
powerpc/85xx/p5040: add CONFIG_SYS_PPC64, del CONFIG_SYS_FSL_ELBC_MULTIBIT_ECC

The P5040 has an e5500 core, so CONFIG_SYS_PPC64 should be defined in
config_mpc85xx.h.  This macro was absent in the initial P5040 patch because
it crossed paths with the patch that introduced the macro.

Also delete CONFIG_SYS_FSL_ELBC_MULTIBIT_ECC, since it's not used in the
upstream U-Boot.  It's a holdover from the SDK.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agopowerpc/qoriq: Move FMAN microcode location
York Sun [Fri, 19 Oct 2012 08:35:12 +0000 (08:35 +0000)]
powerpc/qoriq: Move FMAN microcode location

Move FMAN microcude from 0xEF000000 to 0xEFF40000 to free up the beginning
of this virtual bank so that this bank can store RCW or be used together
with other banks to store large images.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years ago8xxx: Change all 8*xx_DDR addresses to 8xxx
Andy Fleming [Wed, 24 Oct 2012 00:03:46 +0000 (19:03 -0500)]
8xxx: Change all 8*xx_DDR addresses to 8xxx

There were a number of shared files that were using
CONFIG_SYS_MPC85xx_DDR_ADDR, or CONFIG_SYS_MPC86xx_DDR_ADDR, and
several variants (DDR2, DDR3). A recent patchset added
85xx-specific ones to code which was used by 86xx systems.
After reviewing places where these constants were used, and
noting that the type definitions of the pointers assigned to
point to those addresses were the same, the cleanest approach
to fixing this problem was to unify the namespace for the
85xx, 83xx, and 86xx DDR address definitions.

This patch does:

s/CONFIG_SYS_MPC8.xx_DDR/CONFIG_SYS_MPC8xxx_DDR/g

All 85xx, 86xx, and 83xx have been built with this change.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Tested-by: Andy Fleming <afleming@freescale.com>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
12 years agoRemove obsolete header file
Pantelis Antoniou [Wed, 28 Nov 2012 02:43:54 +0000 (02:43 +0000)]
Remove obsolete header file

usbdescriptors.h conflicts with linux/usb/ch9.h
Remove it.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-nand-flash
Tom Rini [Mon, 26 Nov 2012 21:53:33 +0000 (14:53 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-nand-flash

12 years agonand: Add torture feature
Benoît Thébaudeau [Fri, 16 Nov 2012 19:20:54 +0000 (20:20 +0100)]
nand: Add torture feature

This patch adds a NAND Flash torture feature, which is useful as a block stress
test to determine if a block is still good and reliable (or should be marked as
bad), e.g. after a write error.

This code is ported from mtd-utils' lib/libmtd.c.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Scott Wood <scottwood@freescale.com>
[scottwood@freescale.com: removed unnec. ifdef and unwrapped error strings]
Signed-off-by: Scott Wood <scottwood@freescale.com>
12 years agonand: Fix nand_erase_opts() offset check
Benoît Thébaudeau [Mon, 5 Nov 2012 10:16:15 +0000 (10:16 +0000)]
nand: Fix nand_erase_opts() offset check

NAND Flash is erased by blocks, not by pages.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Scott Wood <scottwood@freescale.com>
12 years agonand: Clean up nand_util
Benoît Thébaudeau [Mon, 5 Nov 2012 10:15:46 +0000 (10:15 +0000)]
nand: Clean up nand_util

This patch cleans up nand_util.c:
 - Fix tabs.
 - Fix typos.
 - Remove space character before opening parenthesis in function calls.
 - Fix comments.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Scott Wood <scottwood@freescale.com>
12 years agonand: Move the sub-page read support enable to a flag
Joe Hershberger [Mon, 5 Nov 2012 06:46:31 +0000 (06:46 +0000)]
nand: Move the sub-page read support enable to a flag

Use a flag instead of a hard-coded macro so that sub-page reads can be
enabled in other cases (such as on-die ecc).

This is the same as a5ff4f102937a3492bca4a9ff0c341d78813414c in Linux

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
12 years agodriver/mtd:IFC NAND:Initialise internal SRAM before any write
Prabhakar Kushwaha [Wed, 12 Sep 2012 22:26:05 +0000 (22:26 +0000)]
driver/mtd:IFC NAND:Initialise internal SRAM before any write

IFC-1.1.0 uses 28nm techenology for SRAM. This tech has known limitaion for
SRAM i.e. "byte select" is not supported. Hence Read Modify Write is
implemented in IFC for any "system side write" into sram buffer. Reading an
uninitialized memory results in ECC Error from sram wrapper.

Hence we must initialize/prefill SRAM buffer by any data before writing
anything in SRAM from system side. To initialize SRAM user can use "READID"
NAND command with read bytes equal to SRAM size. It will be a one time
activity post boot

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
[scottwood@freescale.com: fix fsl_ifc_sram_init prototype]
Signed-off-by: Scott Wood <scottwood@freescale.com>
12 years agoREADME: Reference nand monitor commands in U-Boot README
Karl O. Pinc [Fri, 3 Aug 2012 05:57:21 +0000 (05:57 +0000)]
README: Reference nand monitor commands in U-Boot README

Reference nand monitor commands in U-Boot README

Signed-off-by: Karl O. Pinc <kop@meme.com>
12 years agonand/fsl: add NAND_NO_SUBPAGE_WRITE to eLBC and IFC drivers
Scott Wood [Fri, 2 Nov 2012 23:41:35 +0000 (18:41 -0500)]
nand/fsl: add NAND_NO_SUBPAGE_WRITE to eLBC and IFC drivers

These controllers can only do hardware ECC on full page transfers.

Signed-off-by: Scott Wood <scottwood@freescale.com>
12 years agopowerpc/mpc85xx/p2020rdb-pca: Use L2 SRAM for SPL boot
Scott Wood [Fri, 12 Oct 2012 23:02:24 +0000 (18:02 -0500)]
powerpc/mpc85xx/p2020rdb-pca: Use L2 SRAM for SPL boot

This allows DDR configuration to be deferred to the final U-Boot image,
which is able to make use of SPD data.  The SPL itself cannot use SPD due
to code size constraints.  It previously used fixed register values for
DDR configuration, and those values did not work on the p2020rdb-pca
board I tested with.  It's possible that different revisions of the board
require different settings.  Using SPD eliminates that problem.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Andy Fleming <afleming@freescale.com>
12 years agopowerpc/mpc85xx/p1_p2_rdb_pc: clean up memory map
Scott Wood [Wed, 3 Oct 2012 00:35:18 +0000 (19:35 -0500)]
powerpc/mpc85xx/p1_p2_rdb_pc: clean up memory map

- Sort by address, and fix column alignment

- Don't label things as localbus that aren't.  Instead, put chipselect
  info at the end of the description for localbus windows.  Note that
  NAND/NOR have their chipselects swapped when booting from NAND, and CS2
  can be either PMC or VSC7385 depending on hwconfig.

- Shrink NAND to the 32K that's actually mapped in the localbus

- Assign an address and size to L2 SRAM.  Remove the similarly named
  but unintelligible "L2 SDRAM(REV.)".

- Remove the untrue comment about L1 stack being mapped with TLB0.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Andy Fleming <afleming@freescale.com>
12 years agopowerpc/mpc85xx/p1_p2_rdb_pc: convert from nand_spl to new spl
Scott Wood [Fri, 21 Sep 2012 21:31:00 +0000 (16:31 -0500)]
powerpc/mpc85xx/p1_p2_rdb_pc: convert from nand_spl to new spl

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Andy Fleming <afleming@freescale.com>
12 years agospl/nand: config symbol documentation
Scott Wood [Fri, 21 Sep 2012 23:35:27 +0000 (18:35 -0500)]
spl/nand: config symbol documentation

Document parameters used for specifying the NAND image to be loaded.

Also fix the definition of CONFIG_SPL_NAND_SIMPLE -- it's only
nand_spl_simple.c, not the entire nand directory.  The word "simple" is
there for a reason.  :-)

Signed-off-by: Scott Wood <scottwood@freescale.com>
---
v2: updated for makefile changes earlier in patchset

12 years agospl/nand: introduce CONFIG_SPL_NAND_DRIVERS, _BASE, and _ECC.
Scott Wood [Fri, 21 Sep 2012 00:09:07 +0000 (19:09 -0500)]
spl/nand: introduce CONFIG_SPL_NAND_DRIVERS, _BASE, and _ECC.

Some small SPLs do not use nand_base.c, and a subset of those also
require a special driver.  Some SPLs need software ECC but others can't
fit it.

All existing boards that specify CONFIG_SPL_NAND_SUPPORT have these
symbols added to preserve existing behavior.

Signed-off-by: Scott Wood <scottwood@freescale.com>
--
v2: use positive logic for including bits of NAND, rather than
a MINIMAL symbol that excludes things.

12 years agopowerpc/mpc85xx/p1_p2_rdb_pc: new SPL support
Scott Wood [Fri, 21 Sep 2012 00:05:12 +0000 (19:05 -0500)]
powerpc/mpc85xx/p1_p2_rdb_pc: new SPL support

Introduces CONFIG_SPL_RELOC_TEXT_BASE and CONFIG_SPL_RELOC_STACK.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Andy Fleming <afleming@freescale.com>
12 years agospl/85xx: new SPL support
Scott Wood [Fri, 21 Sep 2012 00:02:18 +0000 (19:02 -0500)]
spl/85xx: new SPL support

Update CONFIG_RAMBOOT and CONFIG_NAND_SPL references to accept CONFIG_SPL
and CONFIG_SPL_BUILD, respectively.  CONFIG_NAND_SPL can be removed once
the last mpc85xx nand_spl target is gone.

CONFIG_RAMBOOT will need to remain for other use cases, but it doesn't
seem right to overload it for meaning SPL as well as nand_spl does.  Even
if it's somewhat appropriate for the main u-boot, the SPL itself isn't
(necessarily) ramboot, and we don't have separate configs for SPL and
main u-boot.  It was also inconsistent, as other platforms such as
mpc83xx didn't use CONFIG_RAMBOOT in this way.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Andy Fleming <afleming@freescale.com>
12 years agospl/powerpc: introduce CONFIG_SPL_INIT_MINIMAL
Scott Wood [Thu, 20 Sep 2012 21:35:21 +0000 (16:35 -0500)]
spl/powerpc: introduce CONFIG_SPL_INIT_MINIMAL

cpu_init_nand.c is renamed to spl_minimal.c as it is not really NAND-specific.

Signed-off-by: Scott Wood <scottwood@freescale.com>
---
v2: factor out START, and change cpu_init_nand.c to spl_minimal.c
Cc: Andy Fleming <afleming@freescale.com>
12 years agopowerpc/mpc85xx: consistently use COBJS-y
Scott Wood [Tue, 25 Sep 2012 23:17:45 +0000 (18:17 -0500)]
powerpc/mpc85xx: consistently use COBJS-y

A subsequent patch will conditionalize some of the files that are
currently unconditional.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Andy Fleming <afleming@freescale.com>
12 years agospl/mpc85xx: rename cpu_init_nand.c to spl_minimal.c
Scott Wood [Thu, 20 Sep 2012 21:35:21 +0000 (16:35 -0500)]
spl/mpc85xx: rename cpu_init_nand.c to spl_minimal.c

There is nothing really NAND-specific about this file.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Andy Fleming <afleming@freescale.com>
12 years agospl: include resetvec and lib8xxx
Scott Wood [Wed, 19 Sep 2012 22:56:39 +0000 (17:56 -0500)]
spl: include resetvec and lib8xxx

The toplevel makefile hardcodes this stuff, so spl/Makefile needs to as well.

Signed-off-by: Scott Wood <scottwood@freescale.com>
12 years agospl/mpc85xx: move udelay to cpu code
Scott Wood [Sat, 18 Aug 2012 00:46:29 +0000 (19:46 -0500)]
spl/mpc85xx: move udelay to cpu code

It applies to non-Freescale 85xx boards as well as Freescale boards,
so it doesn't belong in board/freescale.  Plus, it needs to come out
of nand_spl if it's to be used by the new SPL.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Andy Fleming <afleming@freescale.com>
12 years agopowerpc/mpc8xxx: move LAW code into arch/powerpc/cpu/mpc8xxx
Scott Wood [Fri, 17 Aug 2012 21:17:50 +0000 (16:17 -0500)]
powerpc/mpc8xxx: move LAW code into arch/powerpc/cpu/mpc8xxx

It's arch code and not a driver, so move it where it belongs.  When it
originally went into drivers/misc there was no 8xxx CPU directory.

This will make new-SPL support a little easier since we can keep the CPU
stuff together and not need to pull stuff in from drivers/misc.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Andy Fleming <afleming@freescale.com>
12 years agopowerpc/mpc85xx: fix TLB alignment
Scott Wood [Thu, 20 Sep 2012 23:34:49 +0000 (18:34 -0500)]
powerpc/mpc85xx: fix TLB alignment

In the RAMBOOT/SPL case we were creating a TLB entry starting at
CONFIG_SYS_MONITOR_BASE, and just hoping that the base was properly
aligned for the TLB entry size.  This turned out to not be the case
with NAND SPL because the main U-Boot starts at an offset into the image
in order to skip the SPL itself.

Fix the TLB entry to always start at a proper alignment.  We still assume that
CONFIG_SYS_MONITOR_BASE doesn't start immediately before a large-page boundary
thus requiring multiple TLB entries.

Signed-off-by: Scott Wood <scottwood@frescale.com>
Cc: Andy Fleming <afleming@freescale.com>
12 years agopowerpc: change .fixup test to a GCC version test
Scott Wood [Fri, 21 Sep 2012 00:10:01 +0000 (19:10 -0500)]
powerpc: change .fixup test to a GCC version test

This was introduced by commit 244615197469dd6fe75ae082f38424b97c79aeaf, but it
fails in a minimal SPL build where the only thing in arch/powerpc/lib is
cache.c, which apparently doesn't generate any fixup records.

The problem is reported to occur with GCC 3.x, so insist on GCC 4.0 or newer.
Patterned after checkthumb as suggested by Tom Rini.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Tom Rini <trini@ti.com>
--
v2: test gcc version instead of testing nothing

12 years agospl: introduce CONFIG_SPL_TARGET
Scott Wood [Fri, 21 Sep 2012 21:27:32 +0000 (16:27 -0500)]
spl: introduce CONFIG_SPL_TARGET

Currently the SPL target is specified in a CPU-specific makefile
fragment.  While some targets may need something more complicated than a
simple target name, targets which don't need this shouldn't have to provide a makefile fragment just for this.

Signed-off-by: Scott Wood <scottwood@freescale.com>
---
v2: Removed default target as it's been pointed out to me how existing platforms
cause the SPL to be built.

12 years agospl: rename u-boot-pad.bin to u-boot-with-spl.bin
Scott Wood [Wed, 19 Sep 2012 22:45:41 +0000 (17:45 -0500)]
spl: rename u-boot-pad.bin to u-boot-with-spl.bin

Signed-off-by: Scott Wood <scottwood@freescale.com>
12 years agoAdd u-boot-pad.bin target to the Makefile
José Miguel Gonçalves [Wed, 19 Sep 2012 01:25:26 +0000 (01:25 +0000)]
Add u-boot-pad.bin target to the Makefile

Samsung's S3C24XX SoCs need this in order to generate a binary image
with a padded SPL concatenated with U-Boot.

Signed-off-by: José Miguel Gonçalves <jose.goncalves@inov.pt>
[scottwood@freescale.com: fixed prereq of u-boot.ubl]
Signed-off-by: Scott Wood <scottwood@freescale.com>
--
v2: Removed spl/ prefix from u-boot.ubl prerequisite.

12 years agopowerpc/mpc85xx: add comma before "already enabled"
Scott Wood [Tue, 30 Oct 2012 00:00:41 +0000 (19:00 -0500)]
powerpc/mpc85xx: add comma before "already enabled"

Now outputs like this:

L2:    512 KB already enabled, moving to 0xf8f80000

rather than this:

L2:    512 KB already enabledmoving to 0xf8f80000

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Andy Fleming <afleming@gmail.com>
12 years agopowerpc/mpc85xx: move debug tlb entry after TLB is in known state
Scott Wood [Fri, 26 Oct 2012 00:27:41 +0000 (19:27 -0500)]
powerpc/mpc85xx: move debug tlb entry after TLB is in known state

Previously, in many if not all configs we were creating overlapping TLB entries
which is illegal.  This caused a crash during boot when moving p2020rdb NAND SPL
into L2 SRAM.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Prabhakar Kushwaha <prabhakar@freescale.com>
Cc: Andy Fleming <afleming@freescale.com>
--
Prabhakar, please test that debug still works.

12 years agoserial/ns16550: wait for TEMT before initializing
Scott Wood [Tue, 18 Sep 2012 23:19:05 +0000 (18:19 -0500)]
serial/ns16550: wait for TEMT before initializing

TEMT is set when the transmitter is totally empty and all output has
finished.

This prevents output problems (including a loss of synchronization
observed on p2020 that persisted for quite a while) if SPL has output
still on its way out.

Signed-off-by: Scott Wood <scottwood@freescale.com>
--
v2: fixed typo in subject, and explained what the bit does in the changelog

12 years agoserial/ns16550: don't build serial_ns16550 with MIN_FUNCTIONS
Scott Wood [Tue, 16 Oct 2012 20:43:15 +0000 (15:43 -0500)]
serial/ns16550: don't build serial_ns16550 with MIN_FUNCTIONS

CONFIG_NS16550_MIN_FUNCTIONS is used by small SPLs to gain access to basic
ns16550 output code without pulling in things not needed by the SPL.

This previously only worked with non-MULTI configs.  Recently MULTI was
made mandatory, and MIN_FUNCTIONS fails like this:

drivers/serial/libserial.o: In function `calc_divisor.clone.0':
serial_ns16550.c:(.text.calc_divisor.clone.0+0x24): undefined reference to `get_bus_freq'
drivers/serial/libserial.o: In function `_serial_getc':
(.text._serial_getc+0x30): undefined reference to `NS16550_getc'
drivers/serial/libserial.o: In function `_serial_tstc':
(.text._serial_tstc+0x30): undefined reference to `NS16550_tstc'
drivers/serial/libserial.o: In function `_serial_setbrg':
(.text._serial_setbrg+0x3c): undefined reference to `NS16550_reinit'
make[1]: *** [/tmp/u-boot/spl/u-boot-spl] Error 1
make: *** [/tmp/u-boot/spl/u-boot-spl.bin] Error 2

With MIN_FUNCTIONS we don't need anything from this file, so don't build
it.  The conditional needs to be in the file itself rather than the
makefile, because the config symbols are only imported to the makefiles
once, not separately for the SPL phase of the build.

Signed-off-by: Scott Wood <scottwood@freescale.com>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-fdt
Tom Rini [Tue, 20 Nov 2012 17:46:30 +0000 (10:46 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-fdt

12 years agoMerge branch 'next'
Gerald Van Baren [Tue, 20 Nov 2012 00:26:35 +0000 (19:26 -0500)]
Merge branch 'next'

12 years agousb: r8a6659: Fix build by missing of parenthesis
Nobuhiro Iwamatsu [Thu, 15 Nov 2012 05:56:04 +0000 (14:56 +0900)]
usb: r8a6659: Fix build by missing of parenthesis

By commit c7e3b2b5, this was chanded to support multiple controllers.
But this has missing of parenthesis. This commit fix it.

-----
r8a66597-hcd.c: In function ‘usb_lowlevel_init’:
r8a66597-hcd.c:911:52: error: expected declaration specifiers before ‘)’
token
r8a66597-hcd.c:935:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or‘__attribute__’ before ‘{’ token
r8a66597-hcd.c:939:1: error: expected ‘{’ at end of input
-----

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
CC: Lucas Stach <dev@lynxeye.de>
12 years agousb: r8a66597: Switched from variable to only macro
Nobuhiro Iwamatsu [Tue, 20 Mar 2012 20:23:29 +0000 (20:23 +0000)]
usb: r8a66597: Switched from variable to only macro

Some variables are initialized with a value defined by macro.
This was changed to use the macro directly. And the variable not to
use deleted it.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
12 years agoomap3_beagle: use new MUSB intstead of the old one
Ilya Yanok [Tue, 6 Nov 2012 13:48:31 +0000 (13:48 +0000)]
omap3_beagle: use new MUSB intstead of the old one

Enable using of new MUSB framework on Beagle.

NOTE! This is not just a change of backend code: top-level behavior
is also changed, we now use USB device port for USB Ethernet instead
of serial.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agoomap3_beagle: add musb-new init
Ilya Yanok [Tue, 6 Nov 2012 13:48:30 +0000 (13:48 +0000)]
omap3_beagle: add musb-new init

Add initialization for new MUSB framework.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agomusb-new: omap2plus backend driver
Ilya Yanok [Tue, 6 Nov 2012 13:48:29 +0000 (13:48 +0000)]
musb-new: omap2plus backend driver

Backend driver for MUSB OTG controllers found on TI OMAP2/3/4
(tested only on OMAP3 Beagle).

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agoam3517_evm: switch to musb-new
Ilya Yanok [Tue, 6 Nov 2012 13:48:28 +0000 (13:48 +0000)]
am3517_evm: switch to musb-new

Use new musb framework instead of the old one on AM3517_EVM.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agoOMAP3: am35x: add musb functions
Ilya Yanok [Tue, 6 Nov 2012 13:48:27 +0000 (13:48 +0000)]
OMAP3: am35x: add musb functions

AM35XX specific functions for integrated USB PHY/MUSB IP.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agoOMAP3: am35x_def.h: add USB defines
Ilya Yanok [Tue, 6 Nov 2012 13:48:26 +0000 (13:48 +0000)]
OMAP3: am35x_def.h: add USB defines

Add defines for MUSB IP block on AM35X SoCs.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agomusb-new: am35x backend driver
Ilya Yanok [Tue, 6 Nov 2012 13:48:25 +0000 (13:48 +0000)]
musb-new: am35x backend driver

Backend driver for MUSB OTG controllers found on TI AM35x.

It seems that on AM35X interrupt status registers can be updated
_before_ core registers. As we don't use true interrupts in U-Boot
and poll interrupt status registers instead this can result in
interrupt handler being called with non-updated core registers.
This confuses the code and result in hanged transfers.
Add a small delay in am35x_interrupt as a workaround.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agoam335x_evm: enable both musb gadget and host
Ilya Yanok [Tue, 6 Nov 2012 13:48:24 +0000 (13:48 +0000)]
am335x_evm: enable both musb gadget and host

Enable musb gadget in Ethernet mode on port 0 and
musb host on port1.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agoam33xx: init OTG hardware and new musb gadget driver
Ilya Yanok [Tue, 6 Nov 2012 13:48:23 +0000 (13:48 +0000)]
am33xx: init OTG hardware and new musb gadget driver

AM33xx has support for dual port MUSB OTG controller. This patch
adds initialization for the controller using new MUSB gadget
driver and ether gadget.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agomusb-new: dsps backend driver
Ilya Yanok [Tue, 6 Nov 2012 13:48:22 +0000 (13:48 +0000)]
musb-new: dsps backend driver

Backend driver for MUSB OTG controllers found on TI AM33xx and
TI81xx SoCs (tested with AM33xx only).

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agomusb-new: port of Linux musb driver
Ilya Yanok [Tue, 6 Nov 2012 13:48:21 +0000 (13:48 +0000)]
musb-new: port of Linux musb driver

Existing U-Boot musb driver has no support for the new gadget framework
and also seems to have other limitations. As gadget framework is ported
from Linux it seems pretty natural to port musb gadget driver as well.

This driver supports both host and peripheral modes.

This is not a replacement for current musb driver (at least now) as
there are still some consumers of the old UDC interface.

No DMA operation support included, CONFIG_MUSB_PIO_ONLY should be
defined.

Virtual root hub device is not implemented.

Known problems: with no devices connected usb_lowlevel_start() fails.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agousb: use linux/usb/ch9.h instead of usbdescriptors.h
Ilya Yanok [Tue, 6 Nov 2012 13:48:20 +0000 (13:48 +0000)]
usb: use linux/usb/ch9.h instead of usbdescriptors.h

Linux usb/ch9.h seems to have all the same information (and more)
as usbdescriptors.h so use the former instead of the later one.

As a consequense of this change USB_SPEED_* values don't correspond
directly to EHCI speed encoding anymore, I've added necessary
recoding in EHCI driver. Also there is no point to put speed into
pipe anymore so it's removed and a bunch of host drivers fixed to
look at usb_device->speed instead.

Old usbdescriptors.h included is not removed as it seems to be
used by old USB device code.

This makes usb.h and usbdevice.h incompatible. Fortunately the
only place that tries to include both are the old MUSB code and
it needs usb.h only for USB_DMA_MINALIGN used in aligned attribute
on musb_regs structure but this attribute seems to be unneeded
(old MUSB code doesn't support any DMA at all).

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agolinux/usb/ch9.h: update with the version from Linux tree
Ilya Yanok [Tue, 6 Nov 2012 13:48:19 +0000 (13:48 +0000)]
linux/usb/ch9.h: update with the version from Linux tree

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agoUSB: add arrow key support to usb_kbd
Allen Martin [Tue, 6 Nov 2012 21:26:03 +0000 (13:26 -0800)]
USB: add arrow key support to usb_kbd

Check for scancodes for arrow keys and map them to ^F/^B, ^N/^P.
Control characters are used instead of ANSI sequence because the
queueing code in usb_kbd doesn't handle the data increase when one
keypress generates 3 keycodes.  The real fix is to convert this driver
to use the input subsystem and queue, but this allows arrow keys to
work until this driver is converted.

Signed-off-by: Allen Martin <amartin@nvidia.com>
12 years agotegra: Enable USB keyboard
Allen Martin [Wed, 24 Oct 2012 08:32:06 +0000 (08:32 +0000)]
tegra: Enable USB keyboard

Enable USB keyboard for seaboard and ventana

Signed-off-by: Allen Martin <amartin@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
12 years agotegra: move TEGRA_DEVICE_SETTINGS to tegra-common-post.h
Allen Martin [Wed, 24 Oct 2012 08:32:05 +0000 (08:32 +0000)]
tegra: move TEGRA_DEVICE_SETTINGS to tegra-common-post.h

Move environment settings for stdin/stdout/stderr to
tegra-common-post.h and generate them automaticaly based on input
device selection.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
12 years agoUSB: make usb_kbd obey USB DMA alignment requirements
Allen Martin [Wed, 24 Oct 2012 08:32:04 +0000 (08:32 +0000)]
USB: make usb_kbd obey USB DMA alignment requirements

Change usb_kbd driver to obey alignment requirements for USB DMA on
the buffer used for data transfer.  This is necessary for
architectures that enable dcache and enable USB DMA.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
12 years agoboards: remove the no longer used CONFIG_EHCI_DCACHE
Jeroen Hofstee [Mon, 22 Oct 2012 20:35:46 +0000 (22:35 +0200)]
boards: remove the no longer used CONFIG_EHCI_DCACHE

CONFIG_EHCI_DCACHE was removed by commit b8adb12
"USB: Drop cache flush bloat in EHCI-HCD". Remove the defines from
the boards configs as well.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
cc: Marek Vasut <marex@denx.de>
cc: Stefan Roese <sr@denx.de>
cc: Tom Rini <trini@ti.com>
cc: Wolfgang Denk <wd@denx.de>
cc: Thierry Reding <thierry.reding@avionic-design.de>
cc: Tom Warren <twarren@nvidia.com>
cc: Stephen Warren <swarren@nvidia.com>
cc: Stefano Babic <sbabic@denx.de>

12 years agoMerge branch 'master' of git://git.denx.de/u-boot-video
Tom Rini [Mon, 19 Nov 2012 16:28:04 +0000 (09:28 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-video

12 years agoMerge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging
Tom Rini [Mon, 19 Nov 2012 16:27:18 +0000 (09:27 -0700)]
Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging

12 years agocmd_mmc.c: Fix typo, "dislay" -> "display"
Robert P. J. Day [Sun, 11 Nov 2012 03:24:44 +0000 (03:24 +0000)]
cmd_mmc.c: Fix typo, "dislay" -> "display"

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
12 years agomx53loco: Fix build error when CONFIG_VIDEO is disabled
Vikram Narayanan [Sat, 10 Nov 2012 02:32:46 +0000 (02:32 +0000)]
mx53loco: Fix build error when CONFIG_VIDEO is disabled

The inclusion of LCD patch into mx53loco breaks the build when
CONFIG_VIDEO is disabled. Fix this by splitting the video
related stuff to a new file.

Also rename the function lcd_iomux to setup_iomux_lcd to make the
namings aligned with the other iomux functions.

Signed-off-by: Vikram Narayanan <vikram186@gmail.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
12 years agomx51evk: Fix build error when CONFIG_VIDEO is disabled
Vikram Narayanan [Sat, 10 Nov 2012 02:28:52 +0000 (02:28 +0000)]
mx51evk: Fix build error when CONFIG_VIDEO is disabled

The inclusion of LCD patch into mx51evk breaks the build when
CONFIG_VIDEO is disabled. Fix this by splitting the video related
stuff to a new file.

Also rename the function lcd_iomux to setup_iomux_lcd to make the
namings aligned with the other iomux functions.

Signed-off-by: Vikram Narayanan <vikram186@gmail.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
12 years agofs/fs.c: do_fsload: measure throughput
Andreas Bießmann [Wed, 14 Nov 2012 12:32:37 +0000 (13:32 +0100)]
fs/fs.c: do_fsload: measure throughput

This patch adds time measurement and throughput calculation for
all supported load commands.

The output of ext2load changes from

---8<---
1830666 bytes read
--->8---

to

---8<---
1830666 bytes read in 237 ms (7.4 MiB/s)
--->8---

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
[agust: rebased and revised commit log]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
12 years agofs: zfs: fix illegal use of fp
Alejandro Mery [Wed, 31 Oct 2012 08:21:33 +0000 (08:21 +0000)]
fs: zfs: fix illegal use of fp

the upcoming sunxi (allwinner a10/a13) platform enables zfs
by default, and using linaro's hf -msoft-float makes the build
fail because this u64 division.

Signed-off-by: Alejandro Mery <amery@geeks.cl>
Acked-by: Stefan Roese <sr@denx.de>
12 years agoVideo: fix compiler warnings in bus_vcxk
Jens Scharsig (BuS Elektronik) [Wed, 14 Nov 2012 00:10:20 +0000 (00:10 +0000)]
Video: fix compiler warnings in bus_vcxk

if a board uses the vcxk driver option CONFIG_SYS_VCXK_DOUBLEBUFFERD,
compilier shows warnings. This patch will fix it.

Signed-off-by: Jens Scharsig (BuS Elektronik) <esw@bus-elektronik.de>
12 years agoM68K: eb_cpu5282: general update and enhanced board support
Jens Scharsig (BuS Elektronik) [Tue, 30 Oct 2012 00:46:05 +0000 (00:46 +0000)]
M68K: eb_cpu5282: general update and enhanced board support

- update clock settings for higher perfomance
- change standard baud rate to 115200
- fix flash base address
- remove unused defines
- add I2C support
- switch form board dependent flash to cfi
- remove board dependent flash code
- use sdram bank 0 instead of bank 1 on boot
- enable on board frame buffer instead external
- remove fake mac address form config
- add watchdog support
- add status led support

Signed-off-by: Jens Scharsig (BuS Elektronik) <esw@bus-elektronik.de>
[agust: fixed small style issues and build warning]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
12 years agoarm:universal_c210:pmic: Adjust C210 Universal target platform board to new PMIC...
Łukasz Majewski [Tue, 13 Nov 2012 03:22:17 +0000 (03:22 +0000)]
arm:universal_c210:pmic: Adjust C210 Universal target platform board to new PMIC framework

Move pmic_init() function call from board_init() to power_init_board()
to work with new PMIC/POWER framework.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
12 years agoarm:goni:pmic: Adjust GONI target platform board to new PMIC framework
Łukasz Majewski [Tue, 13 Nov 2012 03:22:16 +0000 (03:22 +0000)]
arm:goni:pmic: Adjust GONI target platform board to new PMIC framework

Move pmic_init() function call from board_init() to power_init_board()
to work with new PMIC/POWER framework.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
12 years agopower:pmic: Rename CONFIG_DIALOG_PMIC defines to CONFIG_DIALOG_POWER
Łukasz Majewski [Tue, 13 Nov 2012 03:22:15 +0000 (03:22 +0000)]
power:pmic: Rename CONFIG_DIALOG_PMIC defines to CONFIG_DIALOG_POWER

Rename CONFIG_DIALOG_PMIC to CONFIG_DIALOG_POWER

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Stefano Babic <sbabic@denx.de>
12 years agopower:pmic: Rename CONFIG_PMIC* defines to CONFIG_POWER
Łukasz Majewski [Tue, 13 Nov 2012 03:22:14 +0000 (03:22 +0000)]
power:pmic: Rename CONFIG_PMIC* defines to CONFIG_POWER

Rename all CONFIG_PMIC* defines to CONFIG_POWER*

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Stefano Babic <sbabic@denx.de>
12 years agopower:pmic: Rename ./drivers/power/pmic_* to ./drivers/power/power_* files
Łukasz Majewski [Tue, 13 Nov 2012 03:22:13 +0000 (03:22 +0000)]
power:pmic: Rename ./drivers/power/pmic_* to ./drivers/power/power_* files

Rename pmic/power related files at ./drivers/power directory

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Stefano Babic <sbabic@denx.de>
12 years agopmic: Extend PMIC framework to support battery related commands
Łukasz Majewski [Tue, 13 Nov 2012 03:22:12 +0000 (03:22 +0000)]
pmic: Extend PMIC framework to support battery related commands

Two extra commands:
"pmic name bat state" and "pmic name bat charge" has been added to
pmic framework. Those provides state display and charge capabilities
to named batteries.

The pmic_core.c file has been refactored to more consistent name scheme.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Stefano Babic <sbabic@denx.de>
12 years agoarm:trats:pmic: Support for charging battery at Samsung's TRATS board
Łukasz Majewski [Tue, 13 Nov 2012 03:22:11 +0000 (03:22 +0000)]
arm:trats:pmic: Support for charging battery at Samsung's TRATS board

The battery connected to Samsung's Trats development board is now
charged when voltage drops below threshold.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
12 years agoarm:trats:pmic: Power consumption reduction state for Samsung's TRATS board
Łukasz Majewski [Tue, 13 Nov 2012 03:22:10 +0000 (03:22 +0000)]
arm:trats:pmic: Power consumption reduction state for Samsung's TRATS board

When charging battery is necessary, the development board needs to
be turned into low power mode for better efficiency.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
12 years agopmic:max8997: Support for MAX8997 internal charger control
Łukasz Majewski [Tue, 13 Nov 2012 03:22:09 +0000 (03:22 +0000)]
pmic:max8997: Support for MAX8997 internal charger control

Support for MAX8997 built-in charger.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Stefano Babic <sbabic@denx.de>
12 years agoarm:trats:pmic: Enable battery support at Samsung's TRATS board
Łukasz Majewski [Tue, 13 Nov 2012 03:22:08 +0000 (03:22 +0000)]
arm:trats:pmic: Enable battery support at Samsung's TRATS board

Support for TRATS battery has been added. It is treated as a "normal"
power related device and thereof controlled by pmic/power subsystem.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
12 years agoarm:trats:pmic: Enable fuel-gauge (MAX17042) at Samsung's TRATS board
Łukasz Majewski [Tue, 13 Nov 2012 03:22:07 +0000 (03:22 +0000)]
arm:trats:pmic: Enable fuel-gauge (MAX17042) at Samsung's TRATS board

FG IC built into the MAX8997 device (compliant to MAX17042) is enabled
at TRATS.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
12 years agoarm:trats:pmic: Enable MUIC (MAX8997) at Samsung's TRATS board
Łukasz Majewski [Tue, 13 Nov 2012 03:22:06 +0000 (03:22 +0000)]
arm:trats:pmic: Enable MUIC (MAX8997) at Samsung's TRATS board

MUIC IC built into the MAX8997 device is enabled at TRATS.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
12 years agoarm:trats:pmic: Default PMIC(MAX8997) initialization for Samsung's TRATS board
Łukasz Majewski [Tue, 13 Nov 2012 03:22:05 +0000 (03:22 +0000)]
arm:trats:pmic: Default PMIC(MAX8997) initialization for Samsung's TRATS board

Default PMIC (MAX8997) initialization for Samsung's TRATS development board.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
12 years agopmic:max8997: Function for calculating LDO internal register value
Łukasz Majewski [Tue, 13 Nov 2012 03:22:04 +0000 (03:22 +0000)]
pmic:max8997: Function for calculating LDO internal register value

Function for calculating LDO internal register value from passed micro
Volt.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Stefano Babic <sbabic@denx.de>
12 years agopmic:fuel-gauge: Support for MAX17042 fuel-gauge
Łukasz Majewski [Tue, 13 Nov 2012 03:22:03 +0000 (03:22 +0000)]
pmic:fuel-gauge: Support for MAX17042 fuel-gauge

Support for MAX17042 fuel-gauge (FG), which is built into the MAX8997
power management device.
Special file - fg_battery_cell_params.h with cells characteristics
added.

The FG device will work with redesigned PMIC framework.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Stefano Babic <sbabic@denx.de>
12 years agopmic:muic: Support for MUIC built into MAX8997 device
Łukasz Majewski [Tue, 13 Nov 2012 03:22:02 +0000 (03:22 +0000)]
pmic:muic: Support for MUIC built into MAX8997 device

Support for MUIC (Micro USB Integrated Circuit) built into the MAX8997
power management device.

The MUIC device will work with redesigned PMIC framework.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Stefano Babic <sbabic@denx.de>
12 years agopmic:battery: Support for Trats Battery at PMIC framework
Łukasz Majewski [Tue, 13 Nov 2012 03:22:01 +0000 (03:22 +0000)]
pmic:battery: Support for Trats Battery at PMIC framework

Trats battery is now treated in the same way as other power related
devices. This approach allows for more unified handling of all devices
responsible for power management.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Stefano Babic <sbabic@denx.de>
12 years agopmic: Extend struct pmic to support battery and charger related operations
Łukasz Majewski [Tue, 13 Nov 2012 03:22:00 +0000 (03:22 +0000)]
pmic: Extend struct pmic to support battery and charger related operations

Now it is possible to provide specific function per PMIC/power
device instance.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agopmic: Move pmic related code to ./drivers/power directory
Łukasz Majewski [Tue, 13 Nov 2012 03:21:59 +0000 (03:21 +0000)]
pmic: Move pmic related code to ./drivers/power directory

The PMIC framework has been moved to its more natural place
./drivers/power from ./drivers/misc directory.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agopmic:chrg: Common information about charger and battery (power_chrg.h)
Łukasz Majewski [Tue, 13 Nov 2012 03:21:58 +0000 (03:21 +0000)]
pmic:chrg: Common information about charger and battery (power_chrg.h)

New power_chrg.h file has been added to "bind" together common
information about charging battery available in the system.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Stefano Babic <sbabic@denx.de>
12 years agopmic: Enable power_board_init() support at TRATS
Łukasz Majewski [Tue, 13 Nov 2012 03:21:57 +0000 (03:21 +0000)]
pmic: Enable power_board_init() support at TRATS

Enable support for power_board_init() method at TRATS board.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
12 years agopmic: Introduce power_init_board() method at ./lib/board.c file
Łukasz Majewski [Tue, 13 Nov 2012 03:21:56 +0000 (03:21 +0000)]
pmic: Introduce power_init_board() method at ./lib/board.c file

It is necessary to introduce a new system wide function- power_init_board()

It turns out, that power initialization must be done as early as possible.
In the case of PMIC framework redesign, which aims to support multiple
instances of PMIC devices the initialization shall be performed just
after malloc configuration.

The power_init_board function is a weak function with default implementation.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agopmic: Extend PMIC framework to support multiple instances of PMIC devices
Łukasz Majewski [Tue, 13 Nov 2012 03:21:55 +0000 (03:21 +0000)]
pmic: Extend PMIC framework to support multiple instances of PMIC devices

The PMIC framework has been extended to support multiple instances of
the variety of devices responsible for power management.
This change allows supporting of e.g. fuel gauge, charger, MUIC (Micro USB
Interface Circuit).
Power related includes have been moved to ./include/power directory.
This is a first of a series of patches - in the future "pmic" will be
replaced with "power".

Two important issues:
1. The PMIC needs to be initialized just after malloc is configured
2. It uses list to hold information about available PMIC devices

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Stefano Babic <sbabic@denx.de>
12 years agopmic:max8997: Switch the MAX8997 PMIC to be used with multibus I2C
Łukasz Majewski [Tue, 13 Nov 2012 03:21:54 +0000 (03:21 +0000)]
pmic:max8997: Switch the MAX8997 PMIC to be used with multibus I2C

PMIC MAX8997 is now ready to work with single and multibus soft I2C
implementation.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>