]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
10 years agomicroblaze: Enable buffer write for NOR flashes
Michal Simek [Tue, 21 Jan 2014 06:26:58 +0000 (07:26 +0100)]
microblaze: Enable buffer write for NOR flashes

It speeds up writing a lot.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agomicroblaze: Report priviledged or stack protection exception
Michal Simek [Mon, 20 Jan 2014 20:17:07 +0000 (21:17 +0100)]
microblaze: Report priviledged or stack protection exception

Just list one more exception.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agomicroblaze: Show u-boot banner
Michal Simek [Mon, 20 Jan 2014 20:05:47 +0000 (21:05 +0100)]
microblaze: Show u-boot banner

It is nice to see u-boot version.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agocommon: Add new clk command
Michal Simek [Thu, 21 Nov 2013 21:39:02 +0000 (13:39 -0800)]
common: Add new clk command

Command provides just dump subcommand for showing clock
frequencies in a soc.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Stefano Babic <sbabic@denx.de>
10 years agoARM: tegra: fix "bootp" issue for Tegra124 too
Jim Lin [Fri, 24 Jan 2014 19:46:19 +0000 (12:46 -0700)]
ARM: tegra: fix "bootp" issue for Tegra124 too

Fix the timeout issue after running "bootp" command in U-Boot console.

TXFIFOTHRES bits of TXFILLTUNING register should be set to 0x10 after a
controller reset and before RUN bit is set (per technical reference
manual).

Signed-off-by: Jim Lin <jilin@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: add Venice2 (Tegra124) board
Tom Warren [Fri, 24 Jan 2014 19:46:18 +0000 (12:46 -0700)]
ARM: tegra: add Venice2 (Tegra124) board

These are the board files for Venice2 (Tegra124), plus the AS3722 PMIC
files. PMIC init will be moved to pmic_common_init later.

This builds/boots on Venice2, SPI/MMC/USB/I2C all work. Audio, display
and WB/LP0 are not supported yet.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: add DT files for Tegra124 and Venice2
Tom Warren [Fri, 24 Jan 2014 19:46:17 +0000 (12:46 -0700)]
ARM: tegra: add DT files for Tegra124 and Venice2

These are fairly complete, and near-clones of Tegra114 Venice, with an
additional I2C port, and MMC address changes for Tegra124.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: add common (shared) CPU files
Tom Warren [Fri, 24 Jan 2014 19:46:16 +0000 (12:46 -0700)]
ARM: tegra: add common (shared) CPU files

These files are used by both SPL and main U-Boot.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: Add CPU (armv7) files for Tegra124
Tom Warren [Fri, 24 Jan 2014 19:46:15 +0000 (12:46 -0700)]
ARM: tegra: Add CPU (armv7) files for Tegra124

These files are for code that runs on the CPU (A15) on Tegra124 boards.
At this time, there is no A15-specific code here. The warmboot/LP0 files
aren't included as that code hasn't been ported yet.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: add SPL/AVP (arm720t) CPU files for Tegra124
Tom Warren [Fri, 24 Jan 2014 19:46:14 +0000 (12:46 -0700)]
ARM: tegra: add SPL/AVP (arm720t) CPU files for Tegra124

This provides SPL support for Tegra124 boards - AVP early init, plus
CPU (A15) init/jump to main U-Boot.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: add/edit headers for Tegra124
Tom Warren [Fri, 24 Jan 2014 19:46:13 +0000 (12:46 -0700)]
ARM: tegra: add/edit headers for Tegra124

These headers define the Tegra124 hardware. Add them to the usual
place.

Add Tegra124 chip ID/SKU ID definitions to common headers.

There's no real HW change on Tegra124 for 90% of the toys, so it might
make sense for a future patch to unify some of the content of these
files in a common location.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: fix a typo in the tegra114.dtsi
Stephen Warren [Fri, 24 Jan 2014 19:46:12 +0000 (12:46 -0700)]
ARM: tegra: fix a typo in the tegra114.dtsi

The reg property for node spi@7000d800 was wrong. Fix it to match the
HW. This change was verified against the Linux kernel.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: only build __pinmux_nand() when it's needed
Tom Warren [Fri, 24 Jan 2014 19:46:11 +0000 (12:46 -0700)]
ARM: tegra: only build __pinmux_nand() when it's needed

__pinmux_nand() won't compile if PERIPH_ID_NDFLASH isn't defined.
Prevent this from causing build problems on newer SoCs without NAND
support (or without SW support for NAND yet), but preventing
compilation unless the function will actually be used, i.e. when
CONFIG_TEGRA_NAND is defined.

Signed-off-by: Tom Warren <twarren@nvidia.com>
[swarren, rewrote commit description, moved ifdef around whole function
rather than just body]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: remove a conditional for CSITE rate
Stephen Warren [Fri, 24 Jan 2014 19:46:10 +0000 (12:46 -0700)]
ARM: tegra: remove a conditional for CSITE rate

There's already an SoC-specific conditional in cpu.h to determine the
PLLP rate. Define the CSITE clock rate inside the same conditional, so
that we can remove a conditional from clock_enable_coresight(). This
means one less place to update the code for new SoCs.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: enable PLLX only once it's been fully configured
Stephen Warren [Fri, 24 Jan 2014 19:46:09 +0000 (12:46 -0700)]
ARM: tegra: enable PLLX only once it's been fully configured

This programming sequence is correct per Jimmy Zhang, and makes sense
too!

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: pass just partition ID to power_partition()
Stephen Warren [Fri, 24 Jan 2014 19:46:08 +0000 (12:46 -0700)]
ARM: tegra: pass just partition ID to power_partition()

Pass just the partition ID to power_partition(), rather than also passing
the partition's status register mask too. This makes it simpler to get
call-sites correct, since they don't need to pass two different values
that define the same thing and must match.

Consequently, we can remove the mask definitions from pmc.h.

Suggested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: misc cleanups triggered by Tegra124 review
Stephen Warren [Fri, 24 Jan 2014 19:46:07 +0000 (12:46 -0700)]
ARM: tegra: misc cleanups triggered by Tegra124 review

Use a named constant for the PLL lock bit in enable_cpu_clocks().

Construct the complete value of pmc_pwrgate_toggle, rather than doing a
read-modify-write; the register is simple enough and doesn't need to
maintain state between operations.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agommc: tegra: support Tegra124
Stephen Warren [Fri, 24 Jan 2014 19:46:06 +0000 (12:46 -0700)]
mmc: tegra: support Tegra124

Tegra124's MMC controller is very similar to earlier SoC generations,
and can be supported by the same driver.

However, there are some non-backwards-compatible HW differences, and
hence a new DT compatible value must be used to describe the HW. This
patch updates the driver to support that new compatible value.

That said, the HW differences are only relevant when enabling certain
high-performance transfer modes. Since the driver is currently very
simple and doesn't enable those modes, we don't actually need to address
any of these HW differences in the code yet, hence the simple nature of
this patch.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: don't exceed AVP limits when configuring PLLP
Jimmy Zhang [Fri, 24 Jan 2014 17:37:36 +0000 (10:37 -0700)]
ARM: tegra: don't exceed AVP limits when configuring PLLP

Based on the Tegra TRM, the system clock (which is the AVP clock) can
run up to 275MHz. On power on, the default sytem clock source is set to
PLLP_OUT0. In function clock_early_init(), PLLP_OUT0 will be set to
408MHz which is beyond system clock's upper limit.

The fix is to set the system clock to CLK_M before initializing PLLP,
and then switch back to PLLP_OUT4, which has an appropriate divider
configured, after PLLP has been configured

Implement this logic in new function tegra30_set_up_pllp(),
which sets up PLLP and all PLLP_OUT* dividers, and handles the AVP
clock switching. Remove the duplicate PLLP setup from pllx_set_rate()
and adjust_pllp_out_freqs().

Signed-off-by: Jimmy Zhang <jimmzhang@nvidia.com>
[swarren, significantly refactored the change]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: amend pmc.h for Tegra114+
Stephen Warren [Fri, 24 Jan 2014 17:23:02 +0000 (10:23 -0700)]
ARM: tegra: amend pmc.h for Tegra114+

Tegra114 and later's PMC module removes the pwrgate_timer_on register
and replaces it with a clamp_status register. Adjust pmc.h to reflect
this, and update any code affected by the change.

The cpu.c change in this patch was extracted from a much larger patch
by Jimmy Zhang. The pmc.h change was written from scratch, but inspired
by related changes made by Tom Warren.

There could well be other differences in the PMC register set for chips
after Tegra20/30. However, they don't affect the code in U-Boot at
present, so I haven't attempted an exhaustive update of pmc.h.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: implement MASK_BITS_31_29
Tom Warren [Fri, 24 Jan 2014 17:16:22 +0000 (10:16 -0700)]
ARM: tegra: implement MASK_BITS_31_29

Some clock sources have 3-bit muxes in bits 31:29. Implement core
support for this mux field.

Signed-off-by: Tom Warren <twarren@nvidia.com>
[swarren, extracted from a larger patch by Tom]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: MASK_BITS_ no longer needs specific values
Stephen Warren [Fri, 24 Jan 2014 17:16:21 +0000 (10:16 -0700)]
ARM: tegra: MASK_BITS_ no longer needs specific values

Since all code that sets or interprets MASK_BITS_* now uses the enums
to define/compare the values, there is no need for MASK_BITS_* to have
a specific integer value. In fact, having a specific integer value may
encourage people to hard-code those values, or interpret the values in
incorrect ways.

As such, remove the logic that assigns a specific value to the enum
values in order to make it completely clear that it's just an enum, not
something that directly represents some integer value.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: use MASK_BITS_* macros everywhere
Stephen Warren [Fri, 24 Jan 2014 17:16:20 +0000 (10:16 -0700)]
ARM: tegra: use MASK_BITS_* macros everywhere

Not all code that set or interpreted "mux_bits" was using the named
macros, but rather some was simply using hard-coded integer constants.
This makes it hard to determine which pieces of code are affected by
changes to those constants.

Replace the integer constants with the equivalent macro definitions so
that everything is nicely tied together.

Note that I'm not convinced all the code was using the correct integer
constants, and hence I'm not convinced that all the code is now using
the desired macros. However, this change is a purely mechanical
replacement and should have no functional change. Fixing any bugs will
come later, separately.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: rename OUT_CLK_SOURCE_*
Stephen Warren [Fri, 24 Jan 2014 17:16:19 +0000 (10:16 -0700)]
ARM: tegra: rename OUT_CLK_SOURCE_*

OUT_CLK_SOURCE_ are currently named after the number of bits the mask
they represent includes. However, bit count is not the only possible
variable; bit position may also vary. Rename OUT_CLK_SOURCE_ to
OUT_CLK_SOURCE_31_30_ and OUT_CLK_SOURCE4_ to OUT_CLK_SOURCE_31_28 to
more completely describe exactly what they represent, without having to
go look up the definitions.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: rename MASK_BITS_29_28 to MASK_BITS_31_28
Stephen Warren [Fri, 24 Jan 2014 17:16:18 +0000 (10:16 -0700)]
ARM: tegra: rename MASK_BITS_29_28 to MASK_BITS_31_28

The only place where the MASK_BITS_* values are used is in
adjust_periph_pll(), which interprets the value 4 (old MASK_BITS_29_28,
new MASK_BITS_31_28) as being associated with mask OUT_CLK_SOURCE4_MASK,
i.e. bits 31:28. Rename the MASK_BITS_ macro to reflect how it's actually
implemented.

Note that no Tegra clock register actually uses all of bits 31:28 as
the mux field. Rather, bits 30:28, 29:28, or 28 are used. However, in
those cases, nothing is stored in the bits above the mux field, so it's
safe to pretend that the mux field extends all the way to the end of the
register. As such, the U-Boot clock driver is currently a bit lazy, and
doesn't distinguish between 31:28, 30:28, 29:28 and 28; it just lumps
them all together and pretends they're all 31:28. This patch doesn't
cause this issue; it was pre-existing. Hopefully, future patches will
clean this up.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: deduplicate MASK_BITS_xxx clock mux enum
Tom Warren [Fri, 24 Jan 2014 17:16:17 +0000 (10:16 -0700)]
ARM: tegra: deduplicate MASK_BITS_xxx clock mux enum

The enum used to define the set of register bits used to represent a
clock's input mux, MUX_BITS_*, is defined separately for each SoC at
present. Move this definition to a common location to ease fixing up
some issues with the definition, and the code that uses it.

Signed-off-by: Tom Warren <twarren@nvidia.com>
[swarren, extracted from a larger patch by Tom]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: clear $usb_need_init each boot
Stephen Warren [Thu, 23 Jan 2014 20:17:05 +0000 (13:17 -0700)]
ARM: tegra: clear $usb_need_init each boot

$usb_need_init prevents "usb start" from being run multiple times for
each boot attempt, i.e. once for USB storage, another for PXE, and
another for DHCP. However, the flag that's used to determine when to run
"usb start" is never cleared, so a subsequent "boot" command will never
probe for a freshly plugged in USB device. Fix this so that new USB
devices will be probed once per boot attempt.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: set env vars to indicate Cardhu A04 support
Stephen Warren [Thu, 23 Jan 2014 20:17:01 +0000 (13:17 -0700)]
ARM: tegra: set env vars to indicate Cardhu A04 support

The U-Boot "cardhu" build supports only revision 4 of the Cardhu board
and later compatible revisions. Hence, set $board_name in the default
environment to "cardhu-a04" rather than just "cardhu".

The Linux kernel has separate DTs for Cardhu A02 and A04, although the
former isn't really supported any more. Consequently, the kernel DT file
that matches the U-Boot cardhu build is "tegra30-cardhu-a04.dtb" rather
than "tegra30-cardhu.dtb". Set the $fdtfile default environment variable
to reflect this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: accept any SKU ID for most chips
Stephen Warren [Wed, 22 Jan 2014 00:19:19 +0000 (17:19 -0700)]
ARM: tegra: accept any SKU ID for most chips

For Tegra20, the SKU ID actually impacts how U-Boot programs the chip,
and hence we need to explicitly know about each and every SKU ID in order
to operate correctly.

However, for Tegra30/114, this isn't the case. Rather than forcing each
new user with a different SKU to manually add their SKU ID into the code,
simply accept any SKU ID.

If U-Boot ever starts e.g. programming maximal CPU clocks etc., we'll
need to undo this, or make the default case map to conservative defaults,
but for now it's likely the path to least support cost.

Reported-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agodriver/ifc:Change accessor function to take care of endianness
Prabhakar Kushwaha [Sat, 18 Jan 2014 06:58:30 +0000 (12:28 +0530)]
driver/ifc:Change accessor function to take care of endianness

IFC registers can be of type Little Endian or big Endian depending upon
Freescale SoC. Here SoC defines the register type of IFC IP.

So update acessor functions with common IFC acessor functions to take care
both type of endianness.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Acked-by: York Sun <yorksun@freescale.com>
10 years agokmp204x: initial support for PCIe FPGA configuration
Valentin Longchamp [Mon, 27 Jan 2014 10:49:12 +0000 (11:49 +0100)]
kmp204x: initial support for PCIe FPGA configuration

The PEXHC PCIe configuration mechanism ensures that the FPGA get
configured at power-up. Since all the PCIe devices should be configured
when the kernel start, u-boot has to take care that the FPGA gets
configured also in other reset scenarios, mostly because of possible
configuration change.

The used mechanism is taken from the km_kirkwood design and adapted to
the kmp204x case (slightly different HW and PCIe configuration).

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agokmp204x: enable support for SPANSION SPI NOR
Valentin Longchamp [Mon, 27 Jan 2014 10:49:11 +0000 (11:49 +0100)]
kmp204x: enable support for SPANSION SPI NOR

The new prototype and the final series was moved from Micron to Spansion
to have a better reset sequence that is easier to support.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agoKM: add the KM_UBI_PART_BOOT_OPTS #define
Valentin Longchamp [Mon, 27 Jan 2014 10:49:10 +0000 (11:49 +0100)]
KM: add the KM_UBI_PART_BOOT_OPTS #define

This define can be used if the ubi boot partition (defined for all
Keymile boards with KM_UBI_PARTITION_NAME_BOOT #define to ubi0) needs
some additionnal boot options.

This is the case for the kmp204x boards since u-boot does not support
NAND Flash subpage accesses on this platform, an additionnal argument
that defines the VID offstet must be given to the kernel.

The UBI cmd line option now looks like this "ubi.mtd=ubi0,2048" on this
platform.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agokmp204x: update I2C field of RCW
Valentin Longchamp [Mon, 27 Jan 2014 10:49:09 +0000 (11:49 +0100)]
kmp204x: update I2C field of RCW

On the previous HW revision (now unsupported), there was a need for
external DMA signals and thus the I2C3/4 signals were used
DMA1_DONE/ACK/REQ.

These signals now are configured as GPIO[16:19].

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agokmp204x: add support for the kmcoge4 board
Valentin Longchamp [Mon, 27 Jan 2014 10:49:08 +0000 (11:49 +0100)]
kmp204x: add support for the kmcoge4 board

The kmcoge4 board is the product board derived from the kmlion1
prototype. The main difference between the 2 boards is that the kmcoge4
does not configure the Local Bus controller for LCS2.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
[York Sun: Minor change to boards.cfg to keep targets in order]
Signed-off-by: York Sun <yorksun@freescale.com>
10 years agokmp204x: implement workaround for A-006559
Valentin Longchamp [Mon, 27 Jan 2014 10:49:07 +0000 (11:49 +0100)]
kmp204x: implement workaround for A-006559

According to the errata, some bits of an undocumented register in the
DCSR must be set for every core in order to avoid a possible data or
instruction corruption.

This is required for the 2.0 revision of the P2041 that should be used
as soon as available in our design.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agokmp204x: I2C deblocking support
Rainer Boschung [Mon, 3 Feb 2014 07:45:40 +0000 (08:45 +0100)]
kmp204x: I2C deblocking support

This patch adds support for using some GPIOs that are connected to the
I2C bus to force the bus lines state and perform some bus deblocking
sequences.

The KM common deblocking algorithm from board/keymile/common/common.c is
used. The GPIO lines used for deblocking the I2C bus are some external
GPIOs provided by the QRIO CPLD:
  - SCL = GPIOA_20
  - SDA = GPIOA_21

The QRIO GPIOs act in an open-drain-like manner, for 0 the line is
driven low and for 1 the GPIO is set as input and the line gets
pulled-up.

Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agokmp204x: introduce QRIO GPIO functions
Valentin Longchamp [Mon, 27 Jan 2014 10:49:05 +0000 (11:49 +0100)]
kmp204x: introduce QRIO GPIO functions

The QRIO GPIO functions can be of general interest. They are thus added
to a qrio.c and their prototype are available from kmp204x.h. The QRIO
prst function are also included in this file, as well as the functions
required for the I2C deblocking support (open-drain).

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
[York Sun: Remove extra blank line in board/keymile/kmp204x/qrio.c]
Signed-off-by: York Sun <yorksun@freescale.com>
10 years agokmp204x: support for QRIO1 bootcounter
Rainer Boschung [Mon, 27 Jan 2014 10:49:04 +0000 (11:49 +0100)]
kmp204x: support for QRIO1 bootcounter

Make use of the QRIO1 32bit register at 0x20 as bootcounter register
Check for BOOTCOUNT_MAGIC pattern when before bootcounter value is read

Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
[York Sun: Minor change to commit message]
Signed-off-by: York Sun <yorksun@freescale.com>
10 years agopowerpc/t104xrdb: Add basic ethernet support
Priyanka Jain [Thu, 30 Jan 2014 06:00:04 +0000 (11:30 +0530)]
powerpc/t104xrdb: Add basic ethernet support

This covers only non-L2 switch ethernet interfaces i.e.
RGMII and SGMII interface for both T1040RDB and T1042RDB_PI

T1040RDB is configured as serdes protocol 0x66 which can
support following interfaces
    2 RGMIIS on DTSEC4, DTSEC5
    1 SGMII on DTSEC3

T1042RDB_PI is configured as serdes protocol 0x06 which can
support following interfaces
    2 RGMIIS on DTSEC4, DTSEC5

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
[York Sun: Minor change in commit message]
Signed-off-by: York Sun <yorksun@freescale.com>
10 years agopowerpc/usb: Enable dual phy for T1040
Nikhil Badola [Mon, 27 Jan 2014 09:51:58 +0000 (15:21 +0530)]
powerpc/usb: Enable dual phy for T1040

Define CONFIG_SYS_FSL_USB_DUAL_PHY_ENABLE macro for enabling dual
phy in t1040

Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agopowerpc/t104xrdb: Update T1042RDB.h in config folder
Prabhakar Kushwaha [Mon, 27 Jan 2014 09:11:55 +0000 (14:41 +0530)]
powerpc/t104xrdb: Update T1042RDB.h in config folder

Add usb2 node entry to hwconfig default

Remove DDR controller interleaving from hwconfig

Move SPI related macros out of "#ifdef CONFIG_SPIFLASH"

Add CONFIG_SYS_CSPR2_EXT to make CPLD accessible in u-boot

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
[York Sun: Fix commit message]
Signed-off-by: York Sun <yorksun@freescale.com>
10 years agopowerpc/t104xrdb: Update T1040RDB.h in config folder
Priyanka Jain [Mon, 27 Jan 2014 08:37:11 +0000 (14:07 +0530)]
powerpc/t104xrdb: Update T1040RDB.h in config folder

Add usb2 node entry in "hwconfig string"

Remove controller interleaving from hwconfig string as T1040
has only one DDR conroller

SPI related macros which were earlier under #ifdef CONFIG_SPIFLASH
are move outside so that they are defined for all cases as these
macros are also used by other u-boot code

Add CONFIG_SYS_CSPR2_EXT to make CPLD accessible

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
[York Sun: Minor change to commit message]
Signed-off-by: York Sun <yorksun@freescale.com>
10 years agoboards/t1040qds: Adds ethernet support for T1040
Prabhakar Kushwaha [Mon, 27 Jan 2014 10:25:20 +0000 (15:55 +0530)]
boards/t1040qds: Adds ethernet support for T1040

Enable entherent for T1040QDS. It enables FM1@DTSEC3, FM1@DTSEC4, FM1@DTSEC5
    Define MDIO related configs
    Added eth.c file
    Update t1040.c to support RGMII and SGMII
    Update t1040qds.c to support ethernet
    Define the PHY address

Signed-off-by: Arpit Goel <B44344@freescale.com>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@freescale.com>
Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
[York Sun: remove dash from commit message]
Signed-off-by: York Sun <yorksun@freescale.com>
10 years agopowerpc/mpc85xx: Update serdes protocols for T1040
Prabhakar Kushwaha [Fri, 24 Jan 2014 12:21:50 +0000 (17:51 +0530)]
powerpc/mpc85xx: Update serdes protocols for T1040

T1040 has only one SerDes block. so update the code accordingly.

Also, add support of SerDes Protocol 0x00, 0x06, 0x40, 0x69 0x85,
0xA7 and 0xAA

Signed-off-by: Arpit Goel <B44344@freescale.com>
Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agopowerpc/mpc85xx:Fix README to show correct flash memory map
Prabhakar Kushwaha [Sat, 25 Jan 2014 06:41:23 +0000 (12:11 +0530)]
powerpc/mpc85xx:Fix README to show correct flash memory map

Due to increased size of u-boot, FMAN ucode start address has been shifted
by 256KB causing a overlap with rootfs start address.

Update rootfs start address to reflect correct memory map.

Also fix minor typo in README

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agodriver/fsl_pci:Update print to display PCIe generation
Prabhakar Kushwaha [Sat, 25 Jan 2014 07:23:32 +0000 (12:53 +0530)]
driver/fsl_pci:Update print to display PCIe generation

Current print only display width of PCIe device. Add print to display
PCIe generation supported by the device.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agopowerpc/mpc85xx: Update LIODNs for T1040
poonam aggrwal [Thu, 23 Jan 2014 20:54:59 +0000 (02:24 +0530)]
powerpc/mpc85xx: Update LIODNs for T1040

Removed LIODNs for RMAN, RIO, 10G. T1040 has 10 QMAN portals so assigned
LIODNs accordingly.

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agoconfig: trats: trats2: extend dfu_alt_info by env update settings
Przemyslaw Marczak [Wed, 22 Jan 2014 11:02:47 +0000 (12:02 +0100)]
config: trats: trats2: extend dfu_alt_info by env update settings

This change allows updating environment stored on MMC by dfu or thor.

New setting:
- "params.bin mmc 0x38 0x8"

File params.bin can be generated by: tools/mkenvimage.
e.g. ./mkenvimage -s 4096 -o params.bin <env_text_file>

Every new env variable in text file should start with a new line.

Sample env text file:
- board/samsung/common/dfu_sample_env.txt

Requirements:
- file name: "params.bin"
- file size: 4096 Bytes - the same as CONFIG_ENV_SIZE.
  Other size will cause CRC miscalculation at boot.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
CC: Piotr Wilczek <p.wilczek@samsung.com>
CC: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agouniversal: add LCD download menu support
Przemyslaw Marczak [Wed, 22 Jan 2014 10:24:20 +0000 (11:24 +0100)]
universal: add LCD download menu support

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agotrats2: add LCD download menu support
Przemyslaw Marczak [Wed, 22 Jan 2014 10:24:19 +0000 (11:24 +0100)]
trats2: add LCD download menu support

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agotrats: add LCD download menu support
Przemyslaw Marczak [Wed, 22 Jan 2014 10:24:18 +0000 (11:24 +0100)]
trats: add LCD download menu support

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agosamsung: misc: Add LCD download menu.
Przemyslaw Marczak [Wed, 22 Jan 2014 10:24:17 +0000 (11:24 +0100)]
samsung: misc: Add LCD download menu.

This simple LCD menu allows run one of download mode on device
without writing on console or for fast and easy upgrade.

This feature check user keys combination at boot:
- power key + volume up - download menu
- power key + volume down - thor mode (without menu)

New configs:
- CONFIG_LCD_MENU
- CONFIG_LCD_MENU_BOARD

For proper effect this feature needs following definitions:

Power key:
- KEY_PWR_PMIC_NAME - (string) pmic which supports power key check

Register address:
- KEY_PWR_STATUS_REG
- KEY_PWR_INTERRUPT_REG

Register power key mask:
- KEY_PWR_STATUS_MASK
- KEY_PWR_INTERRUPT_MASK

Gpio numbers:
- KEY_PWR_INTERRUPT_MASK
- KEY_VOL_DOWN_GPIO

Functions needs to be called:
- keys_init() - for set proper gpio direction
- check_boot_mode() - menu - main function

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agosamsung: boards: update display configs with 16bpp mode.
Przemyslaw Marczak [Wed, 22 Jan 2014 10:24:16 +0000 (11:24 +0100)]
samsung: boards: update display configs with 16bpp mode.

16 bpp mode is required by LCD console mode.
This change updates exynos board files.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agovideo: exynos: fimd: add support for various display color modes
Przemyslaw Marczak [Wed, 22 Jan 2014 10:24:15 +0000 (11:24 +0100)]
video: exynos: fimd: add support for various display color modes

Now fimd BPP color mode depends on vl_bpp value in struct "panel_info".

There is only 16BPP mode check, default mode is 24BPP.
Other fimd modes are usually unneeded and also needs some fimd driver
modifications and tests.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agolib: tizen: change Tizen logo with the new one.
Przemyslaw Marczak [Fri, 29 Nov 2013 17:30:43 +0000 (18:30 +0100)]
lib: tizen: change Tizen logo with the new one.

Changes:
- check image bpp instead of resolution when returns logo address
- remove 32bpp logo
- add 16bpp logo in two formats: bmp and gzipped bmp
- init logo address with "0" for unsupported bpp mode
- update boards configs with proper image size for gunzip
- extend structure vidinfo by two fields: logo_x_offset and logo_y_offset.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Tested-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agocommon: lcd.c: fix data abort exception when try to access bmp header
Przemyslaw Marczak [Wed, 22 Jan 2014 10:24:13 +0000 (11:24 +0100)]
common: lcd.c: fix data abort exception when try to access bmp header

Changes:
- le16_to_cpu() to get_unaligned_le16()
- le32_to_cpu() to get_unaligned_le32()
when access fields in struct bmp header.

This changes avoids data abort exception caused by unaligned data access.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agosamsung: common: Add file for common functions, draw_logo() cleanup.
Przemyslaw Marczak [Wed, 22 Jan 2014 10:24:12 +0000 (11:24 +0100)]
samsung: common: Add file for common functions, draw_logo() cleanup.

Changes:

new file:
- board/samsung/common/misc.c
  depends on: CONFIG_MISC_COMMON
- move draw_logo() to misc.c

configs: trats, trats2, universal:
- enable CONFIG_MISC_COMMON,
- enable CONFIG_MISC_INIT_R,
- add misc_init_r() and call draw_logo() in it.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agotrats2: Code cleanup.
Przemyslaw Marczak [Wed, 22 Jan 2014 10:24:11 +0000 (11:24 +0100)]
trats2: Code cleanup.

Remove wrong and unused env variables
Trats2 is not as GT-I8800.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agos5p: gpio: change gpio coding method for s5p gpio.
Przemyslaw Marczak [Wed, 22 Jan 2014 10:24:10 +0000 (11:24 +0100)]
s5p: gpio: change gpio coding method for s5p gpio.

Old s5p gpio coding method was not clean and was not working properly
for all parts and banks. New method is clean and easy to extend.

Gpio coding mask:
0x000000ff - pin number
0x00ffff00 - bank offset
0xff000000 - part number

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agosmdk5250: Remove 'board_usb_vbus_init()' function
Vivek Gautam [Fri, 3 Jan 2014 10:40:53 +0000 (16:10 +0530)]
smdk5250: Remove 'board_usb_vbus_init()' function

Previously as a part of moving the VBUS gpio support to device tree
following patch removed this and added relevant support in driver:
4a271cb exynos: usb: Switch USB VBUS GPIOs to be device tree configured

Recent changes for common board file migration for exynos platform
added it again. So removing it now.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Cc: Julius Werner <jwerner@chromium.org>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoexynos5250: usb: Fix VBus gpio numbers for ehci and xhci controllers
Vivek Gautam [Fri, 3 Jan 2014 10:40:52 +0000 (16:10 +0530)]
exynos5250: usb: Fix VBus gpio numbers for ehci and xhci controllers

The gpio_*() apis require the exact gpio line number to deduce
the gpio bank and the gpio pin addresses.
So fix the gpio number for VBUS used for EHCI ports as well as
XHCI ports on exynos5250 boards.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Cc: Julius Werner <jwerner@chromium.org>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoboard: nios2: Check if flash is configured before calling early_flash_cmd_reset()
Ezequiel Garcia [Tue, 28 Jan 2014 10:19:06 +0000 (07:19 -0300)]
board: nios2: Check if flash is configured before calling early_flash_cmd_reset()

If CONFIG_CFI_FLASH_MTD is not defined, then we shouldn't perform the
flash early reset.

This commit fixes the following build error:

  nios2-generic.c: In function `__early_flash_cmd_reset':
  nios2-generic.c:23: error: `AMD_CMD_RESET' undeclared (first use in this function)
  nios2-generic.c:23: error: (Each undeclared identifier is reported only once
  nios2-generic.c:23: error: for each function it appears in.)
  nios2-generic.c:24: error: `FLASH_CMD_RESET' undeclared (first use in this function)

which was introduced by:

  commit a113fb39df43546c704aa8eba55720da9a9dfedd
  Author: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
  Date:   Fri Dec 20 18:34:53 2013 -0300

  board: nios2: Add CONFIG_CFI_FLASH_MTD guard to flash.h header include

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Cc: Thomas Chou <thomas@wytron.com.tw>
Reported-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
10 years agosandbox: Use system headers first for sandbox's os.c in a different way
Masahiro Yamada [Tue, 26 Nov 2013 07:13:59 +0000 (16:13 +0900)]
sandbox: Use system headers first for sandbox's os.c in a different way

Commit cbe5cdfcd changed config.mk and arch/sandbox/cpu/Makefile
to use -idirafter instead of -I and remove -nostdinc.

But
 * Sandbox-specific code dirties config.mk
 * os.c is compiled without such compiler flags as:
      -Wall -Wstrict-prototypes -Wno-format-security
      -fno-builtin -ffreestanding -fno-stack-protector
      -fstack-usage -Wno-format-nonliteral

This commit use -idirafter and remove the -nostdinc
differently and more simply.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agoMerge branch 'u-boot-ti/master' into 'u-boot-arm/master'
Albert ARIBAUD [Wed, 29 Jan 2014 13:07:50 +0000 (14:07 +0100)]
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'

10 years agonds32: add support for leopard and orca board boot flow auto detect
rick [Fri, 24 Jan 2014 09:14:28 +0000 (17:14 +0800)]
nds32: add support for leopard and orca board boot flow auto detect

hardware difference between leopard and orca as below:

flash setting     leoaprd     orca
bank size         32MB        64MB
bus width         32-bits     16-bits

Signed-off-by: rick <rick@andestech.com>
Signed-off-by: Kuan-Yu Kuo <ken.kuoky@gmail.com>
10 years agoMerge branch 'u-boot-arm/next' into 'u-boot-arm/master'
Albert ARIBAUD [Tue, 28 Jan 2014 10:25:28 +0000 (11:25 +0100)]
Merge branch 'u-boot-arm/next' into 'u-boot-arm/master'

10 years agoboards.cfg: Keep the entries sorted
Fabio Estevam [Sat, 25 Jan 2014 20:42:39 +0000 (18:42 -0200)]
boards.cfg: Keep the entries sorted

Run "tools/reformat.py -i -d '-' -s 8 <boards.cfg >boards0.cfg && mv boards0.cfg boards.cfg"
in order to keep the entries sorted.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agoboard_r - fixup functions table after relocation
Alexey Brodkin [Mon, 20 Jan 2014 10:30:39 +0000 (14:30 +0400)]
board_r - fixup functions table after relocation

This is only required for "PIC" relocation and doesn't apply to modern
"PIE" relocation which does data relocation as well as code.

"init_sequence_r" is just an array that consists of compile-time
adresses of init functions. Since this is basically an array of integers
(pointers to "void" to be more precise) it won't be modified during
relocation - it will be just copied to new location as it is.

As a consequence on execution after relocation "initcall_run_list" will
be jumping to pre-relocation addresses. As long as we don't overwrite
pre-relocation memory area init calls are executed correctly. But still
it is dangerous because after relocation we don't expect initially used
memory to stay untouched.

Cc: Tom Rini <trini@ti.com>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Doug Anderson <dianders@chromium.org>
Cc: Thomas Langer <thomas.langer@lantiq.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
10 years agoarm: am43xx: Add USB spl boot support
Dan Murphy [Thu, 16 Jan 2014 17:23:31 +0000 (11:23 -0600)]
arm: am43xx: Add USB spl boot support

Add the USB host boot support for the am43xx evm
Add the macros to boot from a usb drive in uBoot

Signed-off-by: Dan Murphy <dmurphy@ti.com>
10 years agospl: common: Support for USB MSD FAT image loading
Dan Murphy [Thu, 16 Jan 2014 17:23:30 +0000 (11:23 -0600)]
spl: common: Support for USB MSD FAT image loading

Add SPL support to be able to detect a USB Mass Storage device
connected to a USB host.  Once a USB Mass storage device is detected
the SPL will load the u-boot.img from a FAT partition to target address.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
10 years agospl: common: Move FAT funcs to a common file
Dan Murphy [Thu, 16 Jan 2014 17:23:29 +0000 (11:23 -0600)]
spl: common: Move FAT funcs to a common file

Move the FAT functions to a common location for reuse.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
10 years agopowerpc: mpc5xxx: remove redundant CONFIG_MPC5xxx definition
Masahiro Yamada [Thu, 16 Jan 2014 02:03:07 +0000 (11:03 +0900)]
powerpc: mpc5xxx: remove redundant CONFIG_MPC5xxx definition

We do not have to define CONFIG_MPC5xxx in board config headers
(and start.S) because it is defined in arch/powerpc/cpu/mpc5xxx/config.mk.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agoboard: delete meaningless serial.h
Masahiro Yamada [Wed, 15 Jan 2014 09:00:25 +0000 (18:00 +0900)]
board: delete meaningless serial.h

Delete some serial.h files, whole code in which is surrounded by
  #if 0 ... #endif

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Stefan Roese <sr@denx.de>
10 years agosandbox: fix the return type of os_free() function
Masahiro Yamada [Wed, 15 Jan 2014 04:06:41 +0000 (13:06 +0900)]
sandbox: fix the return type of os_free() function

The function os_free() returns nothing.
Its return type should be "void" rather than "void *".

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agoARM: merge commonly-defined PLATFORM_RELFLAGS
Masahiro Yamada [Wed, 15 Jan 2014 02:00:45 +0000 (11:00 +0900)]
ARM: merge commonly-defined PLATFORM_RELFLAGS

Before this commit, all arch/arm/cpu/${CPU}/config.mk except ARMv8
had the same option:
$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))

This commit moves it into arch/arm/config.mk.

If the compiler does not support the option,
it is ignored by $(call cc-option,...).
So this commit gives no harm to ARMv8.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agopowerpc: mpc86xx: move CONFIG_MPC86xx definition to CPU config.mk
Masahiro Yamada [Wed, 15 Jan 2014 01:14:21 +0000 (10:14 +0900)]
powerpc: mpc86xx: move CONFIG_MPC86xx definition to CPU config.mk

Define CONFIG_MPC86xx in arch/powerpc/cpu/mpc86xx/config.mk
because all target boards with mpc86xx cpu define it.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agopowerpc: mpc85xx: move CONFIG_MPC85xx definition to CPU config.mk
Masahiro Yamada [Wed, 15 Jan 2014 01:14:07 +0000 (10:14 +0900)]
powerpc: mpc85xx: move CONFIG_MPC85xx definition to CPU config.mk

Define CONFIG_MPC85xx in arch/powerpc/cpu/mpc85xx/config.mk
because all target boards with mpc85xx cpu define it.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agopowerpc: mpc824x: remove redundant CONFIG_MPC824X definition
Masahiro Yamada [Wed, 15 Jan 2014 01:13:49 +0000 (10:13 +0900)]
powerpc: mpc824x: remove redundant CONFIG_MPC824X definition

We do not have to define CONFIG_MPC824X in board config headers
because it is defined in arch/powerpc/cpu/mpc824x/config.mk.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agopowerpc: mpc5xx: remove redundant CONFIG_5xx definition
Masahiro Yamada [Wed, 15 Jan 2014 01:13:00 +0000 (10:13 +0900)]
powerpc: mpc5xx: remove redundant CONFIG_5xx definition

We do not have to define CONFIG_5xx in a source file
because it is defined in arch/powerpc/cpu/mpc5xx/config.mk.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agopowerpc: mpc512x: remove redundant CONFIG_MPC512X definition
Masahiro Yamada [Wed, 15 Jan 2014 01:11:28 +0000 (10:11 +0900)]
powerpc: mpc512x: remove redundant CONFIG_MPC512X definition

We do not have to define CONFIG_MPC512X in board config headers
because it is defined in arch/powerpc/cpu/mpc512x/config.mk.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agopowerpc: mpc8xx: remove redundant CONFIG_8xx definition
Masahiro Yamada [Tue, 14 Jan 2014 08:26:43 +0000 (17:26 +0900)]
powerpc: mpc8xx: remove redundant CONFIG_8xx definition

We do not have to define CONFIG_8xx in source files
because it is defined in arch/powerpc/cpu/mpc8xx/config.mk

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agopowerpc: mpc83xx: remove redundant CONFIG_MPC83xx definition
Masahiro Yamada [Tue, 14 Jan 2014 08:26:17 +0000 (17:26 +0900)]
powerpc: mpc83xx: remove redundant CONFIG_MPC83xx definition

We do not have to define CONFIG_MPC83xx in board config headers
because it is defined in arch/powerpc/cpu/mpc83xx/config.mk.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agopowerpc: ppc4xx: remove redundant CONFIG_4xx definition
Masahiro Yamada [Tue, 14 Jan 2014 08:24:35 +0000 (17:24 +0900)]
powerpc: ppc4xx: remove redundant CONFIG_4xx definition

We do not have to define CONFIG_4xx in board config headers
because it is defined in arch/powerpc/cpu/ppc4xx/config.mk.

include/configs/JSE.h defines "CONFIG_4x", not "CONFIG_4xx".
I believe it is a typo because "CONFIG_4x" is not used at all
in other files.
So, I also deleted "CONFIG_4x" in include/configs/JSE.h.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agoboard: tec-ng: Do not make directories in a board Makefile
Masahiro Yamada [Tue, 14 Jan 2014 01:55:02 +0000 (10:55 +0900)]
board: tec-ng: Do not make directories in a board Makefile

Commit e5c5301f refactored the build system not to make
directories in board makefiles.
But commit 8f380381 create directories again in
board/avionic-design/tec-ng/Makefile.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Alban Bedel <alban.bedel@avionic-design.de>
10 years agodrivers: delete unused header files
Masahiro Yamada [Wed, 8 Jan 2014 11:11:48 +0000 (20:11 +0900)]
drivers: delete unused header files

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agoinclude: delete unused header files
Masahiro Yamada [Wed, 8 Jan 2014 11:11:27 +0000 (20:11 +0900)]
include: delete unused header files

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agoboard: delete unused header files
Masahiro Yamada [Wed, 8 Jan 2014 11:11:02 +0000 (20:11 +0900)]
board: delete unused header files

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Matthias Fuchs <matthias.fuchs@esd.eu>
10 years agox86: delete unused header files
Masahiro Yamada [Wed, 8 Jan 2014 11:10:46 +0000 (20:10 +0900)]
x86: delete unused header files

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agopowerpc: delete unused header files
Masahiro Yamada [Wed, 8 Jan 2014 11:10:33 +0000 (20:10 +0900)]
powerpc: delete unused header files

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agoblackfin: delete unused header files
Masahiro Yamada [Wed, 8 Jan 2014 11:10:15 +0000 (20:10 +0900)]
blackfin: delete unused header files

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agoavr32: delete unused header files
Masahiro Yamada [Wed, 8 Jan 2014 11:09:13 +0000 (20:09 +0900)]
avr32: delete unused header files

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agoavr32: move CONFIG_AVR32 definition to arch/avr32/config.mk
Masahiro Yamada [Mon, 6 Jan 2014 06:45:09 +0000 (15:45 +0900)]
avr32: move CONFIG_AVR32 definition to arch/avr32/config.mk

Like other architectures, CONFIG_AVR32 can be defined
in arch/avr32/config.mk rather than board header files.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Andreas Bießmann <andreas.devel@googlemail.com>
Acked-by: Andreas Bießmann <andreas.devel@googlemail.com>
10 years agoRemove obsolete _LINUX_CONFIG_H macro
Masahiro Yamada [Mon, 6 Jan 2014 06:39:48 +0000 (15:39 +0900)]
Remove obsolete _LINUX_CONFIG_H macro

Commit 643aae1406c93ddc64fcf8c136b47cdffd9c8ccd
deleted include/linux/config.h but missed to
delete _LINUX_CONFIG_H macro.
It is no longer used at all.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agotools: move kermit files to tools/kermit directory
Masahiro Yamada [Tue, 24 Dec 2013 06:30:39 +0000 (15:30 +0900)]
tools: move kermit files to tools/kermit directory

The script files, define2mk.sed and make-asm-offsets
are used to create autoconf.mk and asm-offsets.h
while build.

Whereas README, dot.kermrc, flash_param, send_cmd, send_image
are files useful for kermit.

We should not put files which have the totally different purpose
into the same directory.

This commit creates a new directory, tools/kermit,
and move kermit files into it.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Wolfgang Denk <wd@denx.de>
10 years agocosmetic: tools/scripts/README: insert only one space between words
Masahiro Yamada [Tue, 24 Dec 2013 05:59:19 +0000 (14:59 +0900)]
cosmetic: tools/scripts/README: insert only one space between words

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agolib: fix return codes when CONFIG_SYS_VSNPRINTF is enabled
Darwin Rambo [Thu, 19 Dec 2013 23:14:19 +0000 (15:14 -0800)]
lib: fix return codes when CONFIG_SYS_VSNPRINTF is enabled

When CONFIG_SYS_VSNPRINTF is enabled, it protects print operations
such as sprintf, snprintf, vsnprintf, etc., from buffer overflows.
But vsnprintf_internal includes the terminating NULL character in
the calculation of number of characters written. This affects sprintf
and snprintf return values. Fix this issue by setting pointer 'str'
back to the location of the '\0'.

Signed-off-by: Darwin Rambo <drambo@broadcom.com>
Reviewed-by: Steve Rae <srae@broadcom.com>
10 years agolib: time: add weak timer_init() function
Darwin Rambo [Thu, 19 Dec 2013 23:06:12 +0000 (15:06 -0800)]
lib: time: add weak timer_init() function

If timer_init() is made a weak stub function, then it allows us to
remove several empty timer_init functions for those boards that
already have a timer initialized when u-boot starts. Architectures
that use the timer framework may also remove the need for timer.c.

Signed-off-by: Darwin Rambo <drambo@broadcom.com>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
10 years agoam43xx_evm.h: Correct SPL max size
Tom Rini [Mon, 20 Jan 2014 13:40:07 +0000 (08:40 -0500)]
am43xx_evm.h: Correct SPL max size

Upon further inspection of relevant parts of the architecture, the
maximum SPL binary size is 220KiB.

Cc: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
10 years agoDRA7: add ABB setup for MPU voltage domain
Nishanth Menon [Tue, 14 Jan 2014 18:27:29 +0000 (12:27 -0600)]
DRA7: add ABB setup for MPU voltage domain

Patch adds modification to shared omap5 abb_setup() function, and
proper registers definitions needed for ABB setup sequence. ABB is
initialized for MPU voltage domain at OPP_NOM.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>