]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
10 years agoimx: mx25pdk: Convert to iomux-v3
Benoît Thébaudeau [Fri, 3 May 2013 10:32:14 +0000 (10:32 +0000)]
imx: mx25pdk: Convert to iomux-v3

There is no change of behavior, even if some pad control values could probably
be simplified.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
10 years agoimx: iomux-v3: Add iomux-mx25.h
Benoît Thébaudeau [Fri, 3 May 2013 10:32:13 +0000 (10:32 +0000)]
imx: iomux-v3: Add iomux-mx25.h

Allow usage of the imx-common/iomux-v3.h framework by including pad settings for
the i.MX25. The content of the file is taken from Linux kernel at commit
267dd34, plus the required changes to make it work in U-Boot.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
10 years agoarm: mx5: Add support for DENX M53EVK
Marek Vasut [Thu, 25 Apr 2013 10:16:03 +0000 (10:16 +0000)]
arm: mx5: Add support for DENX M53EVK

Add basic support for the DENX M53EVK board. Currently supported is:
MMC (incl. booting)
NAND (incl. booting)
Ethernet, I2C, USB, SATA, RTC.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
10 years agoarm: mx5: Add NAND clock handling
Marek Vasut [Sun, 21 Apr 2013 05:52:26 +0000 (05:52 +0000)]
arm: mx5: Add NAND clock handling

Augment the MX5 clock code with function to enable and configure
NFC clock. This is necessary to get NFC working on MX5.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
10 years agoarm: mx5: Add SPL support code to MX5
Marek Vasut [Sun, 21 Apr 2013 05:52:25 +0000 (05:52 +0000)]
arm: mx5: Add SPL support code to MX5

Fix minor adjustments needed to get SPL framework building on MX5.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
10 years agoarm: imx: Pack u-boot.bin into uImage for SPL
Marek Vasut [Sun, 21 Apr 2013 05:52:24 +0000 (05:52 +0000)]
arm: imx: Pack u-boot.bin into uImage for SPL

The U-Boot SPL can parse the uImage format and gather information from
it about the payload. Make use of this and wrap u-boot.bin into uImage
format. The benefit is the SPL will know the size of the payload
instead of using fixed size of the payload defined at compile time.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
10 years agonand: Add SPL_NAND support to mxc_nand_spl
Marek Vasut [Sun, 21 Apr 2013 05:52:23 +0000 (05:52 +0000)]
nand: Add SPL_NAND support to mxc_nand_spl

Add support for generic NAND SPL via the SPL framework into the
mxc_nand_spl driver. This is basically just a simple rename and
publication of the already implemented functions. To avoid the
bare-bones functions getting in the way of the NAND_SPL, build
them only if CONFIG_SPL_FRAMEWORK is not defined.

Also make sure the requested payload is aligned to full pages,
otherwise this simple driver fails to load the last page.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
Acked-by: Scott Wood <scottwood@freescale.com>
10 years agoimx: Align the imximage header and payload to multiples of 4k
Marek Vasut [Sun, 21 Apr 2013 05:52:22 +0000 (05:52 +0000)]
imx: Align the imximage header and payload to multiples of 4k

The MX53 ROM loads the data from NAND in multiples of pages and
supports maximum page size of 4k. Thus, align the image and header
to 4k to be safe from ROM bugs.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
10 years agomxs: spl_mem_init: Change EMI port priority
Fabio Estevam [Fri, 3 May 2013 04:37:13 +0000 (04:37 +0000)]
mxs: spl_mem_init: Change EMI port priority

FSL bootlets code set the PORT_PRIORITY_ORDER field of register HW_EMI_CTRL
as 0x2, which means:

PORT0231 = 0x02 Priority Order: AXI0, AHB2, AHB3, AHB1

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agomxs: spl_mem_init: Skip the initialization of some DRAM_CTL registers
Fabio Estevam [Fri, 3 May 2013 04:37:12 +0000 (04:37 +0000)]
mxs: spl_mem_init: Skip the initialization of some DRAM_CTL registers

HW_DRAM_CTL27, HW_DRAM_CTL28 and HW_DRAM_CTL35 are not initialized as per
FSL bootlets code.

mx23 Reference Manual mark HW_DRAM_CTL27 and HW_DRAM_CTL28 as "reserved".

HW_DRAM_CTL8 is setup as the last element.

So skip the initialization of these DRAM_CTL registers.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agomxs: spl_mem_init: Remove erroneous DDR setting
Fabio Estevam [Fri, 3 May 2013 04:37:11 +0000 (04:37 +0000)]
mxs: spl_mem_init: Remove erroneous DDR setting

On mx23 there is no 'DRAM init complete' in register HW_DRAM_CTL18.

Remove this erroneous setting.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agomxs: spl_mem_init: Fix comment about start bit
Fabio Estevam [Fri, 3 May 2013 04:37:10 +0000 (04:37 +0000)]
mxs: spl_mem_init: Fix comment about start bit

Start bit is part of HW_DRAM_CTL8 register, so  fix the comment.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agomx23_olinuxino: Fix DDR pin iomux settings
Fabio Estevam [Fri, 3 May 2013 04:37:09 +0000 (04:37 +0000)]
mx23_olinuxino: Fix DDR pin iomux settings

Change MUX_CONFIG_EMI to use the same drive strength as the bootlets code from
Freescale, which results in much better stability.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agomx23evk: Fix DDR pin iomux settings
Fabio Estevam [Fri, 3 May 2013 04:37:08 +0000 (04:37 +0000)]
mx23evk: Fix DDR pin iomux settings

Change MUX_CONFIG_EMI to use the same drive strength as the bootlets code from
Freescale, which results in much better stability.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agomx23: Fix pad voltage selection bit
Fabio Estevam [Fri, 3 May 2013 04:37:07 +0000 (04:37 +0000)]
mx23: Fix pad voltage selection bit

On mx23 the pad voltage selection bit needs to be always '0', since '1' is a
reserved value.

For example:

Pin 108, EMI_A06 pin voltage selection:
0= 1.8V (mDDR) or 2.5V (DDR1);
1= reserved.

Fix the pad voltage definitions for the mx23 case.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
10 years agoP1022DS: Set CONFIG_SPL_MAX_SIZE directly
Tom Rini [Fri, 3 May 2013 13:19:43 +0000 (09:19 -0400)]
P1022DS: Set CONFIG_SPL_MAX_SIZE directly

With the u-boot-with-spl.bin rule calling $(OBJCOPY) with
CONFIG_SPL_PAD_TO, and CONFIG_SPL_PAD_TO defaulting to
CONFIG_SPL_MAX_SIZE we cannot use math here, so set it to 4096 rather
than 4 * 1024.

Signed-off-by: Tom Rini <trini@ti.com>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Tom Rini [Thu, 2 May 2013 23:54:32 +0000 (19:54 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

10 years agopowerpc/85xx: set USB2 default mode to 'device' for (super)hydra boards
Shaohui Xie [Mon, 25 Mar 2013 07:30:15 +0000 (07:30 +0000)]
powerpc/85xx: set USB2 default mode to 'device' for (super)hydra boards

The Hydra and Superhydra (P3041DS, P5020DS, and P5040DS) boards have a
second USB port that can be configured in either host, peripheral (aka
device), or OTG (on-the-go) mode.  When configured in host mode, if
the port is connected to another USB host, damage to the board can
occur.

To avoid this, we change the default setting to peripheral mode.  Ideally,
we'd set it to OTG mode, but currently there is no OTG support for
these boards.

Setting the hwconfig variable will also update the device tree, and so
Linux will configure the port for peripheral mode as well.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Timur Tabi <timur@tabi.org>
Signed-off-by: Andy Fleming <afleming@freescale.com>
10 years agopowerpc/p1_p2_rdb_pc: Add a pin to reset the DDR chip for P1021RDB-PC
Xu Jiucheng [Mon, 25 Mar 2013 07:30:13 +0000 (07:30 +0000)]
powerpc/p1_p2_rdb_pc: Add a pin to reset the DDR chip for P1021RDB-PC

When P1021RDB-PC reboot system, the board will hung at uboot DDR
configuration. For P1021RDB-PC DDR reset pin is multiplex with
QE, so uboot will reserve this pin for QE and skip DDR reset.
Other platforms without QE will do this reset. This patch adds
a slight code to reset DDR chip by QE CE_PB8 pin for NAND and
NOR FLASH boot. For booting from SPI FALSH and SD card, it
seems possible to use the rom on chip to write to the GPIO
pins before configuring the DDR.

Signed-off-by: Xu Jiucheng <B37781@freescale.com>
Signed-off-by: Xie Xiaobo <X.Xie@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
10 years agopowerpc/mpc85xx: Changed LIODN offset values
Cristian Sovaiala [Mon, 25 Mar 2013 07:30:12 +0000 (07:30 +0000)]
powerpc/mpc85xx: Changed LIODN offset values

Extending LIODN offset range from 1-5 to 1-10
While using a qman portal with a higher index the LIODN offset
is incorrectly set, thus extending the range of offsets covers
all 10 qman portals

Signed-off-by: Cristian Sovaiala <cristian.sovaiala@freescale.com>
Acked-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
10 years agopowerpc/mpc85xx: Extend workaround for erratum DDR_A003 to other SoCs
York Sun [Mon, 25 Mar 2013 07:30:11 +0000 (07:30 +0000)]
powerpc/mpc85xx: Extend workaround for erratum DDR_A003 to other SoCs

Erratum DDR_A003 applies to P5020, P3041, P4080, P3060, P2041, P5040.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
10 years agopowerpc/p1010rdb: add readme document for p1010rdb
Shengzhou Liu [Mon, 25 Mar 2013 07:30:10 +0000 (07:30 +0000)]
powerpc/p1010rdb: add readme document for p1010rdb

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
10 years agopowerpc/p1010rdb: Change flexcan compatible string
Shengzhou Liu [Mon, 25 Mar 2013 07:30:09 +0000 (07:30 +0000)]
powerpc/p1010rdb: Change flexcan compatible string

Change flexcan compatible string from "fsl,flexcan-v1.0"
to "fsl,p1010-flexcan" to match the device tree.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
10 years agopowerpc/85xx: add SerDes bank 4 lanes
Timur Tabi [Mon, 25 Mar 2013 07:30:08 +0000 (07:30 +0000)]
powerpc/85xx: add SerDes bank 4 lanes

Only some chips have four SerDes banks, so don't define lanes for a bank
that doesn't exist.

Signed-off-by: Timur Tabi <timur@tabi.org>
Signed-off-by: Andy Fleming <afleming@freescale.com>
10 years agoqoriq/p1_p2_rdb_pc: USB device-tree fixups for P1020
Zhicheng Fan [Mon, 25 Mar 2013 07:30:07 +0000 (07:30 +0000)]
qoriq/p1_p2_rdb_pc: USB device-tree fixups for P1020

Resolve P1020 second USB controller multiplexing with eLBC
         - mandatory to mention USB2 in hwconfig string to select it
           over eLBC, otherwise USB2 node is removed
         - works only for SPI and SD boot

Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Zhicheng Fan <B32736@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
10 years agodoc/ramboot.mpc85xx: Documented the RAMBOOT for MPC85xx
Poonam Aggrwal [Mon, 25 Mar 2013 07:30:06 +0000 (07:30 +0000)]
doc/ramboot.mpc85xx: Documented the RAMBOOT for MPC85xx

There could be scenarios where the user would like to manually(via JTAG)
configure the DDR/L2SRAM and load the bootloader binary onto DDR/L2SRAM.
This document explains thse usecases and the detailed explanation of what needs
to be done to use it.

Most of the code from CONFIG_SYS_RAMBOOT will be used except for small changes
of CCSRBAR etc.

The changes are not very large, but it is good to document them so that user
can get it working at once.

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
10 years agopowerpc/mpc85xx:IFC Errata A003399 is not valid for BSC913x
Prabhakar Kushwaha [Wed, 20 Mar 2013 18:36:06 +0000 (18:36 +0000)]
powerpc/mpc85xx:IFC Errata A003399 is not valid for BSC913x

As per Errata list of BSC9131 and BSC9132, IFC Errata A003399 is no more
valid. So donot compile its workaround.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
10 years agompc85xx: Fix a compiler warning when CONFIG_WATCHDOG is turned on
Horst Kronstorfer [Wed, 13 Mar 2013 10:14:05 +0000 (10:14 +0000)]
mpc85xx: Fix a compiler warning when CONFIG_WATCHDOG is turned on

cpu.c:288:2:
warning: implicit declaration of function 'reset_85xx_watchdog'
[-Wimplicit-function-declaration]

Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
10 years agopowerpc/85xx: Add workaround for errata USB-14 (enable on P204x/P3041/P50x0)
Xulei [Mon, 11 Mar 2013 17:56:34 +0000 (17:56 +0000)]
powerpc/85xx: Add workaround for errata USB-14 (enable on P204x/P3041/P50x0)

On P204x/P304x/P50x0 Rev1.0, USB transmit will result in false internal
multi-bit ECC errors, which has impact on performance, so software should
disable all ECC reporting from USB1 and USB2.

In formal release document, the errata number should be USB14 instead of USB138.

Signed-off-by: xulei <Lei.Xu@freescale.com>
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: xulei <B33228@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
10 years agopowerpc/b4860qds: Add the tlb entries for SRIO interfaces
Liu Gang [Thu, 7 Mar 2013 22:41:02 +0000 (22:41 +0000)]
powerpc/b4860qds: Add the tlb entries for SRIO interfaces

Add the tlb entries based on the configuration of the SRIO interfaces.
Every SRIO interface has 256M space:

#define CONFIG_SYS_SRIO1_MEM_VIRT   0xa0000000
#define CONFIG_SYS_SRIO1_MEM_PHYS   0xc20000000ull

#define CONFIG_SYS_SRIO2_MEM_VIRT   0xb0000000
#define CONFIG_SYS_SRIO2_MEM_PHYS   0xc30000000ull

Signed-off-by: Liu Gang <Gang.Liu@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
10 years agofman/mEMAC: set SETSP bit in IF_MODE regisgter for RGMII speed
Zang Roy-R61911 [Mon, 4 Mar 2013 03:59:20 +0000 (03:59 +0000)]
fman/mEMAC: set SETSP bit in IF_MODE regisgter for RGMII speed

Some legacy RGMII phys don't have in band signaling for the
speed information. so set the RGMII MAC mode according to
the speed got from PHY.

Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Reported-by: John Traill <john.traill@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
10 years agopowerpc/mpc85xx: set clock-frequency for T4/B4 clockgen node
Tang Yuantian [Thu, 28 Feb 2013 23:24:34 +0000 (23:24 +0000)]
powerpc/mpc85xx: set clock-frequency for T4/B4 clockgen node

For T4/B4, the clockgen node compatible string is updated to version 2.
Add clock-frequency setting for this new version.

Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
10 years agopowerpc/b4860: Adding workaround errata A-005871
Shengzhou Liu [Wed, 27 Feb 2013 21:56:54 +0000 (21:56 +0000)]
powerpc/b4860: Adding workaround errata A-005871

Per the latest errata updated, B4860/B4420 Rev 1.0 has also
errata A-005871, so adding define A-005871 for B4 SoCs.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
10 years agopowerpc/b4: Fix the wrong register offset of B4 PCIE module
Liu Gang [Mon, 25 Feb 2013 00:14:17 +0000 (00:14 +0000)]
powerpc/b4: Fix the wrong register offset of B4 PCIE module

B4420/B4860 PCIE can not work because of the wrong definition of
the PCIE register offset in the file:
arch/powerpc/include/asm/immap_85xx.h

Add the judgement of B4420/B4860 to make the register offset to:
#define CONFIG_SYS_MPC85xx_PCIE1_OFFSET         0x200000

Signed-off-by: Liu Gang <Gang.Liu@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
10 years agopowerpc/p1022ds: Add support for NAND and NAND boot using SPL
Matthew McClintock [Mon, 18 Feb 2013 10:02:19 +0000 (10:02 +0000)]
powerpc/p1022ds: Add support for NAND and NAND boot using SPL

Add defines needed to access NAND, remove second flash bank that is
actually connected to NAND.

Add nand booting support for P1022DS with hardcoded DDR config using
SPL framework from 2011

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
Signed-off-by: Jiang Yutang <b14898@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andy Fleming <afleming@freescale.com>
10 years agopowerpc/mpc85xx: add setting of clock-frequency for mpic node
Dongsheng.wang@freescale.com [Wed, 30 Jan 2013 18:51:52 +0000 (18:51 +0000)]
powerpc/mpc85xx: add setting of clock-frequency for mpic node

Set the device tree property associated with the mpic source
frequency. The frequency is used for mpic timer.

Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
10 years agopowerpc/mpc85xx: Add revision properties in portal device tree node 'pme'
Jeffrey Ladouceur [Fri, 25 Jan 2013 10:38:53 +0000 (10:38 +0000)]
powerpc/mpc85xx: Add revision properties in portal device tree node 'pme'

The 'fsl,pme-rev1' and 'fsl-pme-rev2' properties have been added to the
pme portal node. This is required for software to determine which version
of PME hardware is present and take appropriate actions.
These properties are a direct reflection of the corresponding ccsr pme
register value.

Also removed unnecessary static global variables.

Signed-off-by: Jeffrey Ladouceur <Jeffrey.Ladouceur@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
10 years agoboard/freescale/common/cds_pci_ft.c: Fix rotate wrong cells in interrupt-map property
Jiang Bin [Mon, 19 Nov 2012 22:31:24 +0000 (22:31 +0000)]
board/freescale/common/cds_pci_ft.c: Fix rotate wrong cells in interrupt-map property

For linux 3.x, the size of each item in interrupt-map property is 9 not 7.
Don't use the static value and calculate the size with following cells:
PCI #address-cells, PCI #interrupt-cells,
PIC address, PIC #address-cells, PIC #interrupt-cells.

Signed-off-by: Bin Jiang <bin.jiang@windriver.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc5xxx
Tom Rini [Thu, 2 May 2013 20:21:20 +0000 (16:21 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc5xxx

10 years agompc5200: a3m071/a4m2k: Miscellaneous updates and fixes
Stefan Roese [Thu, 25 Apr 2013 23:20:23 +0000 (23:20 +0000)]
mpc5200: a3m071/a4m2k: Miscellaneous updates and fixes

The changes to a3m071/a4m2k in summary are:
- Enable CAN1 on I2C in GPS Port Configuration
- Enable SPI on PSC2
- Activate network console
- New flash partitioning
- Fix some typos
- Pass host name to Linux
- Change rootfs to squashfs,jffs2
- Enable UBI/UBIFS support
- Enable FIT support

Signed-off-by: Stefan Roese <sr@denx.de>
10 years agompc5200: a3m071/a4m2k: Fix problem with increased global_data struct
Stefan Roese [Thu, 25 Apr 2013 23:10:02 +0000 (23:10 +0000)]
mpc5200: a3m071/a4m2k: Fix problem with increased global_data struct

The v2013.04 release has this patch set included:

5cb48582 "Add architecture-specific global data"

With this, the global_data struct is now common and new variables
have been added. Resulting in a bigger struct. Unfortunately the
currently allocated 128 bytes are just a bit too small for this
new struct.

This patch now uses the automatically generated struct size instead to
not run into this problem again.

Please note that this problem might hit some other platforms which
currently reserve a tight space of 128 bytes for the global_data
struct!

Signed-off-by: Stefan Roese <sr@denx.de>
10 years agompc5200: a3m071/a4m2k: Enable flash verify option
Stefan Roese [Thu, 4 Apr 2013 03:55:42 +0000 (03:55 +0000)]
mpc5200: a3m071/a4m2k: Enable flash verify option

Signed-off-by: Stefan Roese <sr@denx.de>
10 years agompc512x: remove dead code
Anatolij Gustschin [Sat, 30 Mar 2013 09:26:36 +0000 (09:26 +0000)]
mpc512x: remove dead code

The prt_mpc512x_clks() function isn't referenced
anywhere and its prototype is wrong. Remove it.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
10 years agoomap5_uevm: Enable redundant MMC environment
Tom Rini [Tue, 30 Apr 2013 20:04:17 +0000 (16:04 -0400)]
omap5_uevm: Enable redundant MMC environment

Cc: Sricharan R <r.sricharan@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
10 years agomx28evk: Guard NAND-related ENV defines with CONFIG_ENV_IS_IN_NAND
Tom Rini [Tue, 30 Apr 2013 20:00:15 +0000 (16:00 -0400)]
mx28evk: Guard NAND-related ENV defines with CONFIG_ENV_IS_IN_NAND

The redundancy related defines are only correct for NAND, so guard all
of that area with CONFIG_ENV_IS_IN_NAND

Cc: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Tom Rini <trini@ti.com>
10 years agoenv_mmc: add support for redundant environment
Michael Heimpold [Wed, 10 Apr 2013 10:36:19 +0000 (10:36 +0000)]
env_mmc: add support for redundant environment

This patch add support for storing the environment redundant on
mmc devices. Substantially it re-uses the logic from the NAND implementation,
that means using an incremental counter for marking newer data.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
10 years agolib: consolidate hang()
Andreas Bießmann [Thu, 18 Apr 2013 22:48:50 +0000 (22:48 +0000)]
lib: consolidate hang()

Delete all occurrences of hang() and provide a generic function.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
[trini: Modify check around puts() in hang.c slightly]
Signed-off-by: Tom Rini <trini@ti.com>
10 years agotx25: add CONFIG_SPL_LIBGENERIC_SUPPORT
Andreas Bießmann [Thu, 18 Apr 2013 22:48:49 +0000 (22:48 +0000)]
tx25: add CONFIG_SPL_LIBGENERIC_SUPPORT

In order to use the generic hang() later on pull libgeneric in SPL.
This has no impact on the SPL size.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
10 years agomx31pdk: add CONFIG_SPL_LIBGENERIC_SUPPORT
Andreas Bießmann [Thu, 18 Apr 2013 22:48:48 +0000 (22:48 +0000)]
mx31pdk: add CONFIG_SPL_LIBGENERIC_SUPPORT

In order to use the generic hang() later on pull libgeneric in SPL.
This has no impact on the SPL size.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
10 years agonios2: fix style in board.c.
Andreas Bießmann [Thu, 18 Apr 2013 22:48:47 +0000 (22:48 +0000)]
nios2: fix style in board.c.

Make nios2's board.c checkpatch clean.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
10 years agomicroblaze: fix style in board.c
Andreas Bießmann [Thu, 18 Apr 2013 22:48:46 +0000 (22:48 +0000)]
microblaze: fix style in board.c

Make microblaze's board.c checkpatch clean.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Reviewed-by: Michal Simek <monstr@monstr.eu>
10 years agopart/dev_desc: Add log2 of blocksize to block_dev_desc data struct
Egbert Eich [Tue, 9 Apr 2013 21:11:56 +0000 (21:11 +0000)]
part/dev_desc: Add log2 of blocksize to block_dev_desc data struct

log2 of the device block size serves as the shift value used to calculate
the block number to read in file systems when implementing avaiable block
sizes.
It is needed quite often in file systems thus it is pre-calculated and
stored in the block device descriptor.

Signed-off-by: Egbert Eich <eich@suse.com>
10 years agofs/fat: Don't multiply fatsize with sector size
Egbert Eich [Tue, 9 Apr 2013 21:11:55 +0000 (21:11 +0000)]
fs/fat: Don't multiply fatsize with sector size

Bugfix:
Here at this place we need the fat size in sectors not bytes.
This was found during code review when adding support for storage
devices with blocksizes != 512.

Signed-off-by: Egbert Eich <eich@suse.com>
10 years agodisk/iso: Add Support for block sizes > 512 byte to ISO partition support
Egbert Eich [Tue, 9 Apr 2013 21:11:54 +0000 (21:11 +0000)]
disk/iso: Add Support for block sizes > 512 byte to ISO partition support

For ISO we check the block size of the device if this is != the CD sector
size we assume that the device has no ISO partition.

Signed-off-by: Egbert Eich <eich@suse.com>
10 years agodisk/gpt: Fix GPT partition handling for blocksize != 512
Egbert Eich [Tue, 9 Apr 2013 06:03:36 +0000 (06:03 +0000)]
disk/gpt: Fix GPT partition handling for blocksize != 512

Disks beyond 2T in size use blocksizes of 4096 bytes. However a lot of
code in u-boot  still assumes a 512 byte blocksize.
This patch fixes the handling of GPTs.

Signed-off-by: Egbert Eich <eich@suse.com>
10 years agodisk/part_dos: check harder for partition table
Egbert Eich [Tue, 9 Apr 2013 05:46:14 +0000 (05:46 +0000)]
disk/part_dos: check harder for partition table

Devices that used to have a whole disk FAT filesystem but got then
partitioned will most likely still have a FAT or FAT32 signature
in the first sector as this sector does not get overwritten by
a partitioning tool (otherwise the tool would risk to kill the mbr).

The current partition search algorithm will erronously detects such
a device as a raw FAT device.

Instead of looking for the FAT or FAT32 signatures immediately we
use the same algorithm as used by the Linux kernel and first check
for a valid boot indicator flag on each of the 4 partitions.
If the value of this flag is invalid for the first entry we then
do the raw partition check.
If the flag for any higher partition is wrong we assume the device
is neiter a MBR nor PBR device.

Signed-off-by: Egbert Eich <eich@suse.com>
10 years agommc: Define a constant for the maximum block size
Simon Glass [Wed, 3 Apr 2013 08:54:30 +0000 (08:54 +0000)]
mmc: Define a constant for the maximum block size

The number 512 appears quite a bit in the mmc code. Add a constant for this
so that it can be used here and in other parts of the code (e.g. SPL code
which loads from mmc).

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@google.com>
10 years agoamcc-common.h: enable support for "env grep", "setexpr", and regex.
Wolfgang Denk [Sat, 23 Mar 2013 23:50:38 +0000 (23:50 +0000)]
amcc-common.h: enable support for "env grep", "setexpr", and regex.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
10 years agoamcc-common.h: minor white space cleanup
Wolfgang Denk [Sat, 23 Mar 2013 23:50:37 +0000 (23:50 +0000)]
amcc-common.h: minor white space cleanup

Align some comments.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
10 years agom28evk: enable "env grep" and regexp support
Wolfgang Denk [Sat, 23 Mar 2013 23:50:36 +0000 (23:50 +0000)]
m28evk: enable "env grep" and regexp support

Signed-off-by: Wolfgang Denk <wd@denx.de>
Conflicts:
include/configs/m28evk.h

10 years agom28evk: white space cleanup
Wolfgang Denk [Sat, 23 Mar 2013 23:50:35 +0000 (23:50 +0000)]
m28evk: white space cleanup

Change all "#define<TAB>" sequences into "#define<SPACE>"

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
10 years agosetexpr: add regex substring matching and substitution
Wolfgang Denk [Sat, 23 Mar 2013 23:50:34 +0000 (23:50 +0000)]
setexpr: add regex substring matching and substitution

Add "setexpr name gsub r s [t]" and "setexpr name sub r s [t]"
commands which implement substring matching for the regular
expression <r> in the string <t>, and substitution of the string <s>.
The result is assigned to the environment variable <name>.  If <t> is
not supplied, the previous value of <name> is used instead.  "gsub"
performs global substitution, while "sub" will replace only the first
substring.

Both commands are closely modeled after the gawk functions with the
same names.

Examples:

- Generate broadcast address by substituting the last two numbers of
  the IP address by "255.255":

   => print ipaddr
ipaddr=192.168.1.104
=> setexpr broadcast sub "(.*\\.).*\\..*" "\\1255.255" $ipaddr
broadcast=192.168.255.255

- Depending on keyboard configuration (German vs. US keyboard) a
  barcode scanner may initialize the MAC address as C0:E5:4E:02:06:DC
  or as C0>E5>4E>02>06>DC.  Make sure we always have a correct value:

=> print ethaddr
ethaddr=C0>E5>4E>02>06>DC
=> setexpr ethaddr gsub > :
ethaddr=C0:E5:4E:02:06:DC

- Do the same, but substitute one step at a time in a loop until no
  futher matches:

=> setenv ethaddr C0>E5>4E>02>06>DC
=> while setexpr ethaddr sub > :
> do
> echo -----
> done
ethaddr=C0:E5>4E>02>06>DC
-----
ethaddr=C0:E5:4E>02>06>DC
-----
ethaddr=C0:E5:4E:02>06>DC
-----
ethaddr=C0:E5:4E:02:06>DC
-----
ethaddr=C0:E5:4E:02:06:DC
-----
C0:E5:4E:02:06:DC: No match
=> print ethaddr
ethaddr=C0:E5:4E:02:06:DC

etc.

To enable this feature, the CONFIG_REGEX option has to be defined in
the board config file.

Signed-off-by: Wolfgang Denk <wd@denx.de>
10 years agosetexpr: simplify code, improve help message
Wolfgang Denk [Sat, 23 Mar 2013 23:50:33 +0000 (23:50 +0000)]
setexpr: simplify code, improve help message

Simplify the argument checking for the "setexpr" command.  This is
done mainly to make future extensions easier.

Also improve the help message for the one argument version of the
command - this does not "load an address", but a value, which in
this context may be a plain number or a pointer dereference.

Signed-off-by: Wolfgang Denk <wd@denx.de>
10 years ago"env grep" - add support for regular expression matches
Wolfgang Denk [Sat, 23 Mar 2013 23:50:32 +0000 (23:50 +0000)]
"env grep" - add support for regular expression matches

When CONFIG_REGEX is enabled, the new option "-e" becomes available
which causes regular expression matches to be used.  This allows for
example things like these:

- print all MAC addresses:

=> env grep -e eth.*addr
eth1addr=00:10:ec:80:c5:15
ethaddr=00:10:ec:00:c5:15

- print all variables that have at least 2 colons in their value:

=> env grep -v -e :.*:
addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off
panic=1
eth1addr=00:10:ec:80:c5:15
ethaddr=00:10:ec:00:c5:15
ver=U-Boot 2013.04-rc1-00289-g497746b-dirty (Mar 22 2013 - 12:50:25)

etc.

Signed-off-by: Wolfgang Denk <wd@denx.de>
10 years agoAdd SLRE - Super Light Regular Expression library
Wolfgang Denk [Sat, 23 Mar 2013 23:50:31 +0000 (23:50 +0000)]
Add SLRE - Super Light Regular Expression library

Downloaded from http://slre.sourceforge.net/
and adapted for U-Boot environment.

Used to implement regex operations on environment variables.
Code size is ~ 3.5 KiB on PPC.

To enable this code, define the  CONFIG_REGEX  option in your board
config file.

Note:  There are more recent versions of the SLRE library available at
http://slre.googlecode.com ; unfortunately, the new code has a heavily
reorked API which makes it less usable for our purposes:
- the return code is strings, which are more difficult to process
- we don't get any information any more which sub-string of the data
  was matched by the given regex
- it is much more cumbersome to work with arbitrary expressions, where
  for example the number of substrings for capturing are not known at
  compile time
Also, there does not seem to be any real changes or improvements of
the functionality.

Because of this, we deliberately stick with the older code.

Note 2: the test code (built when SLRE_TEST is defined) was modified
to allow for more extensive testing; now we can test the regexp
matching on all lines on a text file (instead of the whole data in the
file as a single block).

Signed-off-by: Wolfgang Denk <wd@denx.de>
10 years ago"env grep" - add options to grep in name, value, or both.
Wolfgang Denk [Sat, 23 Mar 2013 23:50:30 +0000 (23:50 +0000)]
"env grep" - add options to grep in name, value, or both.

Add options to "env grep" command:

-n : search only the envrironment variable names
-v : search only their values
-b : search both names and values (= default)

An option "--" will stop parsing options, so to print variables that
contain the striing "- " please use:

env grep -- "- "

Or to print all environment varioables which have a '-' in their name,
use:

env grep -n -- -

Signed-off-by: Wolfgang Denk <wd@denx.de>
10 years ago"env grep" - reimplement command using hexport_r()
Wolfgang Denk [Sat, 23 Mar 2013 23:50:29 +0000 (23:50 +0000)]
"env grep" - reimplement command using hexport_r()

Also drop hstrstr_r() which is not needed any more.
The new code is way more flexible.

Signed-off-by: Wolfgang Denk <wd@denx.de>
10 years agohashtable: preparations to use hexport_r() for "env grep"
Wolfgang Denk [Sat, 23 Mar 2013 23:50:28 +0000 (23:50 +0000)]
hashtable: preparations to use hexport_r() for "env grep"

The output of "env grep" is unsorted, and printing is done by a
private implementation to parse the hash table.  We have all the
needed code in place in hexport_r() alsready, so let's use this
instead.  Here we prepare the code for this, without any functional
changes yet.

Signed-off-by: Wolfgang Denk <wd@denx.de>
10 years agospl_mmc: cleanup variable types
Peter Korsgaard [Thu, 21 Mar 2013 04:55:17 +0000 (04:55 +0000)]
spl_mmc: cleanup variable types

block_read returns unsigned long, so it doesn't make sense to check for
< 0. and neither does marking the header structure as const and then
casting away the constness to load data into it.

Also cleanup some unneeded pointer casting while we're at it.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agosandbox: config: Enable CONFIG_FIT and CONFIG_CMD_FIT
Simon Glass [Sat, 20 Apr 2013 08:42:52 +0000 (08:42 +0000)]
sandbox: config: Enable CONFIG_FIT and CONFIG_CMD_FIT

Enable these options to use FITs on sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: fs: Add support for saving files to host filesystem
Simon Glass [Sat, 20 Apr 2013 08:42:51 +0000 (08:42 +0000)]
sandbox: fs: Add support for saving files to host filesystem

This allows write of files from the host filesystem in sandbox. There is
currently no concept of overwriting the file and removing its existing
contents - all writing is done on top of what is there. This means that
writing 10 bytes to the start of a 1KB file will only update those 10
bytes, not truncate the file to 10 byte slong.

If the file does not exist it is created.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agofs: Add support for saving data to filesystems
Simon Glass [Sat, 20 Apr 2013 08:42:50 +0000 (08:42 +0000)]
fs: Add support for saving data to filesystems

Add a new method for saving that filesystems can implement. This mirrors the
existing load method.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Support 'source' command
Simon Glass [Sat, 20 Apr 2013 08:42:49 +0000 (08:42 +0000)]
sandbox: Support 'source' command

Enhance the source command to work with sandbox, by using map_sysmem() to
convert a ulong address into a pointer.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Allow -c argument to provide a command list
Simon Glass [Sat, 20 Apr 2013 08:42:48 +0000 (08:42 +0000)]
sandbox: Allow -c argument to provide a command list

This allows passing of entire scripts to sandbox with the -c argument,
which is useful for testing. Commands can be delimited with a newline
or semicolon.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agoRevert "fdt- Tell the FDT library where the device tree is"
Simon Glass [Sat, 20 Apr 2013 08:42:47 +0000 (08:42 +0000)]
Revert "fdt- Tell the FDT library where the device tree is"

This reverts commit 3b73459ea3421e9f8c6c8c62e1d3fe458ca5bc56.

In practice it doesn't seem like a good idea to make the the working
FDT point to the control FDT. Now that we can access the control FDT
using the 'fdt' command, there is no need for this feature. Remove it.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agofdt: Skip checking FDT if the pointer is NULL
Simon Glass [Sat, 20 Apr 2013 08:42:46 +0000 (08:42 +0000)]
fdt: Skip checking FDT if the pointer is NULL

If we have no FDT, don't attempt to read from it. This allows sandbox to
run without an FDT if required.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: fdt: Support fdt command for sandbox
Simon Glass [Sat, 20 Apr 2013 08:42:45 +0000 (08:42 +0000)]
sandbox: fdt: Support fdt command for sandbox

By using map_sysmem() we can get the fdt command to work correctly with
sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agofdt: Allow fdt command to check and update control FDT
Simon Glass [Sat, 20 Apr 2013 08:42:44 +0000 (08:42 +0000)]
fdt: Allow fdt command to check and update control FDT

There is an existing fdt command to deal with the working FDT. Enhance this
to support the control FDT also (CONFIG_OF_CONTROL).

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agoAdd getenv_hex() to return an environment variable as hex
Simon Glass [Sat, 20 Apr 2013 08:42:43 +0000 (08:42 +0000)]
Add getenv_hex() to return an environment variable as hex

This conversion is required in a number of places in U-Boot. Add a
standard function to provide this feature, so we avoid all the different
variations in the way it is coded.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agofdt: Add a parameter to fdt_valid()
Simon Glass [Sat, 20 Apr 2013 08:42:42 +0000 (08:42 +0000)]
fdt: Add a parameter to fdt_valid()

At present this only checks working_fdt, but we want to check other FDTs
also. So add the FDT to check as a parameter to fdt_valid().

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Add CONFIG_OF_HOSTFILE to read FDT from host file
Simon Glass [Sat, 20 Apr 2013 08:42:41 +0000 (08:42 +0000)]
sandbox: Add CONFIG_OF_HOSTFILE to read FDT from host file

With sandbox it is tricky to add an FDT to the image at build time (or
later) since we build an ELF file, not a plain binary, and the address
space of the whole U-Boot is not accessible in the emulated memory map
of sandbox.

Sandbox can read files directly from the host, though, so add an option
to read an FDT from a host file on start-up.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Switch over to generic board
Simon Glass [Fri, 26 Apr 2013 02:53:43 +0000 (02:53 +0000)]
sandbox: Switch over to generic board

Add generic board support for sandbox. and remove the old board init code.

Select CONFIG_SYS_GENERIC_BOARD for sandbox now that this is supported.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agosandbox: Provide a way to map from host RAM to U-Boot RAM
Simon Glass [Sat, 20 Apr 2013 08:42:37 +0000 (08:42 +0000)]
sandbox: Provide a way to map from host RAM to U-Boot RAM

In many cases, pointers to memory are passed around, and these pointers
refer to U-Boot memory, not host memory. This in itself is not a
problem.

However, in a few places, we cast that pointer back to a ulong (being
a U-Boot memory address). It is possible to convert many of these cases
to avoid this. However there are data structures (e.g. struct
bootm_headers) which use pointers. We could with a lot of effort adjust
the structs and all code that uses them to use ulong instead of pointers.

This seems like an unacceptable cost, since our objective with sandbox
is to minimise the impact on U-Boot code while maximising the features
available to sandbox.

Therefore, create a map_to_sysmem() function which converts from a
pointer to a U-Boot address. This can be used sparingly when needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agoTrigger generic board error only when building
Simon Glass [Sat, 20 Apr 2013 08:42:36 +0000 (08:42 +0000)]
Trigger generic board error only when building

At present the generic board error can occur when configuring U-Boot, or
during distclean, but this is incorrect. The existing autoconf.mk may come
from an earlier U-Boot configuration which is about to be overwritten.

Make the error conditional so that it will only be triggered when we are
actually building U-Boot.

This avoids a problem where the system is being reconfigured to remove
CONFIG_SYS_GENERIC_BOARD on an architecture that does not support it.
Currently this will print an error and require the manual removal of
include/autoconf.mk.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Tom Rini [Tue, 30 Apr 2013 13:58:28 +0000 (09:58 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

10 years agoMerge branch 'microblaze' of git://www.denx.de/git/u-boot-microblaze
Tom Rini [Tue, 30 Apr 2013 13:58:03 +0000 (09:58 -0400)]
Merge branch 'microblaze' of git://www.denx.de/git/u-boot-microblaze

10 years agopost: fix I2C POST failure for devices in CONFIG_SYS_POST_I2C_IGNORES
Anatolij Gustschin [Mon, 15 Apr 2013 04:01:07 +0000 (04:01 +0000)]
post: fix I2C POST failure for devices in CONFIG_SYS_POST_I2C_IGNORES

Devices in CONFIG_SYS_POST_I2C_IGNORES list may be absent
and the rule is not to report I2C POST failure for devices
in this list. Currently this doesn't work since probing for
these devices isn't done and thus they are not marked as
successfully probed. Ignore optional devices when checking
for devices that didn't respond.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
10 years agoi2c: zynq: Add support for Xilinx Zynq
Michal Simek [Mon, 22 Apr 2013 13:21:33 +0000 (15:21 +0200)]
i2c: zynq: Add support for Xilinx Zynq

Support Xilinx Zynq i2c controller.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agommc: Add support for Xilinx Zynq sdhci controller
Michal Simek [Mon, 22 Apr 2013 12:56:49 +0000 (14:56 +0200)]
mmc: Add support for Xilinx Zynq sdhci controller

Add support for SD, MMC and eMMC card on Xilinx Zynq.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agonet: gem: Add support for phy autodetection
Michal Simek [Mon, 22 Apr 2013 12:41:09 +0000 (14:41 +0200)]
net: gem: Add support for phy autodetection

Autodetect phy if phyaddress is setup to -1.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agonet: gem: Preserve clk on emio interface
David Andrey [Fri, 5 Apr 2013 15:24:24 +0000 (17:24 +0200)]
net: gem: Preserve clk on emio interface

Avoid overwriting GEMx_RCLK_CTRL and GEMx_CLK_CTRL
if the Ethernet interface is connect on EMIO

Do not enable emio for this standard board configuration for now.

Signed-off-by: David Andrey <david.andrey@netmodule.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agonet: gem: Pass phy address to init
David Andrey [Thu, 4 Apr 2013 17:13:07 +0000 (19:13 +0200)]
net: gem: Pass phy address to init

Pass the PHY address to the driver init to
allow parallel use of both interfaces

Signed-off-by: David Andrey <david.andrey@netmodule.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agozynq: Move macros to hardware.h
Michal Simek [Fri, 12 Apr 2013 14:33:08 +0000 (16:33 +0200)]
zynq: Move macros to hardware.h

Add all fixed addresses to hardware.h and change petalinux
configuration to support this.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agonet: gem: Fix gem driver on 1Gbps LAN
Michal Simek [Mon, 15 Oct 2012 12:01:23 +0000 (14:01 +0200)]
net: gem: Fix gem driver on 1Gbps LAN

The whole driver used 100Mbps because of zc702 rev B.
Fix problem with not setup proper clock for gem1.
This is generic approach for clk setup.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agonet: gem: Do not initialize BDs again
Michal Simek [Thu, 24 Jan 2013 12:04:12 +0000 (13:04 +0100)]
net: gem: Do not initialize BDs again

BDs can be correctly setup just once and init function
performs only phy autodetection and enabling RX/TX.
RX/TX are disabled in halt function.

This patch solves the problem with repeatable tftp transfers.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agonet: gem: Simplify return path in zynq_gem_recv
Michal Simek [Fri, 25 Jan 2013 07:24:18 +0000 (08:24 +0100)]
net: gem: Simplify return path in zynq_gem_recv

Remove one return from the code.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agonet: gem: Remove WRAP bit from TX buffer description
Michal Simek [Wed, 17 Oct 2012 09:03:40 +0000 (11:03 +0200)]
net: gem: Remove WRAP bit from TX buffer description

Removing this bit causes that frame is sent only once.
(With wrap big one packet has been sent several times
which dramatically decrease throughput)

TRM: (Table 16-3: Tx Buffer Descriptor Entry)

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agonet: phy: Define Marvell 88e1518 phy
Michal Simek [Mon, 15 Oct 2012 12:03:00 +0000 (14:03 +0200)]
net: phy: Define Marvell 88e1518 phy

This phy is used on zedboard (xilinx zynq platform).

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agozynq: Move scutimer baseaddr to hardware.h
Michal Simek [Fri, 12 Apr 2013 14:21:26 +0000 (16:21 +0200)]
zynq: Move scutimer baseaddr to hardware.h

Move baseaddr to hardware.h to be shared between
configurations.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
10 years agoarm: zynq: Rename XPSS_ prefix to ZYNQ_ for hardcoded SoC addresses
Michal Simek [Tue, 23 Apr 2013 09:35:18 +0000 (11:35 +0200)]
arm: zynq: Rename XPSS_ prefix to ZYNQ_ for hardcoded SoC addresses

XPSS prefix was used in past and it is obsolete for quite
some time. Let's use correct SoC name which is Zynq.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>