Francois Retief [Mon, 26 Oct 2015 10:32:25 +0000 (12:32 +0200)]
sparc: Update the maintainer for SPARC architecture
Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
Francois Retief [Sat, 24 Oct 2015 21:14:55 +0000 (23:14 +0200)]
sparc: Fix broken files during license changes
Fixes broken search and replaced license changes in
files cpu/leon3/start.S and include/asm/winmacro.h
from commit
1a4596601fd395f3afb8f82f3f840c5e00bdd57a
Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
Series-to: u-boot
Series-cc: Tom Rini <trini@konsulko.com>
Series-version: 2
Cover-letter:
sparc: Updates to SPARC architecture in preperation for generic board
This patch series is a backlog of preparation work for upcomming
generic board changes.
I first want to get these reviewed and submitted to mainline before
sending out more patches.
END
Fabio Estevam [Thu, 12 Nov 2015 14:30:19 +0000 (12:30 -0200)]
board_init: Change the logic to setup malloc_base
Prior to commit
5ba534d247d418 ("arm: Switch 32-bit ARM to using generic
global_data setup") we used to have assembly code that configured the
malloc_base address.
Since this commit we use the board_init_f_mem() function in C to setup
malloc_base address.
In board_init_f_mem() there was a deliberate choice to support only
early malloc() or full malloc() in SPL, but not both.
Adapt this logic to allow both to be used, one after the other, in SPL.
This issue has been observed in a Congatec board, where we need to
retrieve the manufacturing information from the SPI NOR (the SPI API
calls malloc) prior to configuring the DRAM. In this case as malloc_base
was not configured we always see malloc to fail.
With this change we are able to use malloc in SPL prior to DRAM gets
initialized.
Also update the CONFIG_SYS_SPL_MALLOC_START entry in the README file.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Thu, 12 Nov 2015 20:59:35 +0000 (15:59 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-tegra
Vignesh R [Thu, 22 Oct 2015 06:00:53 +0000 (11:30 +0530)]
am43xx_evm: Add DFU support for qspi flash
This adds support to update firmware on qspi flash present on
am437x-sk-evm and am43xx-epos-evm via DFU.
On device:
=> setenv dfu_alt_info ${dfu_alt_info_qspi}
=> dfu 0 sf 0:0
On host:
$ sudo dfu-util -l
$ sudo dfu-util -D u-boot.bin -a u-boot.bin
Signed-off-by: Vignesh R <vigneshr@ti.com>
Michal Simek [Mon, 9 Nov 2015 09:45:07 +0000 (10:45 +0100)]
spl: Add support for CONFIG_OF_EMBED=y
CONFIG_OF_EMBED=y is the option which is here only for testing purpose
and shouldn't be enabled by default as is describe at:
"dts: Add a comment about CONFIG_OF_EMBED being for local use"
(sha1:
3d3f60cb7a6bb6c338e00a9769fa918a8536096c)
But still enabling this option locally shouldn't end up with compilation
error when you build SPL. This patch fix it.
Compilation error:
lib/built-in.o: In function `fdtdec_setup':
/mnt/disk/u-boot/lib/fdtdec.c:1246: undefined reference to
`__dtb_dt_begin'
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reported-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Guillaume REMBERT [Sun, 8 Nov 2015 14:37:15 +0000 (14:37 +0000)]
openrisc: updating build tools naming convention
Dear u-boot community,
I just made a small change on the openrisc-generic platform
configuration to take in account the new naming convention (or1k instead
of or32, so the build process gets fine).
Could you take care to review and approve the following patch, please?
Kind regards,
Andy Fleming [Wed, 4 Nov 2015 21:55:27 +0000 (15:55 -0600)]
Fix trini email in the get_maintainer.pl script
Looks like one spot got missed. Probably due to the backslash.
Signed-off-by: Andy Fleming <afleming@gmail.com>
Vincent BENOIT [Mon, 2 Nov 2015 17:50:23 +0000 (18:50 +0100)]
pengwyn: nand and ethernet fixes
-> Add National instrument ethernet transceiver configuration used (DP83848)
-> Change cpsw slave phy address
-> modify nand configuration to use the correct ECC and correct nand features
Fabio Estevam [Sun, 1 Nov 2015 15:18:27 +0000 (13:18 -0200)]
block: ahci: Remove dead code
CONFIG_AHCI_SETFEATURES_XFER is not selected by any user, so delete
the dead code.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Peng Fan [Fri, 30 Oct 2015 09:30:02 +0000 (17:30 +0800)]
common: Simplify get_clocks() #ifdef
get_clocks is wrapped by CONFIG_FSL_CLK and CONFIG_M68K in seperate
piece code. They can be merged into one snippet.
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: "angelo@sysam.it" <angelo@sysam.it>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: "Andreas Bießmann" <andreas.devel@googlemail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Angelo Dureghello <angelo@sysam.it>
Matwey V. Kornilov [Thu, 29 Oct 2015 18:54:15 +0000 (21:54 +0300)]
configs: Use config_distro_defaults.h in ti_armv7_common.h
CONFIG_BOOTDELAY is defined in config_distro_defaults.h
Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
[trini: Drop omap3_logic.h settings which were a warning and no longer
correct usage].
Signed-off-by: Tom Rini <trini@konsulko.com>
Dirk Eibach [Thu, 29 Oct 2015 12:51:27 +0000 (13:51 +0100)]
i2c: Fix pca953x endianess issue
By reading 2 consecutive bytes from i2c to an u16 value
we have an endianess issue.
Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Dirk Eibach [Wed, 28 Oct 2015 10:46:39 +0000 (11:46 +0100)]
i2c: soft_i2c: Fix bus indizes
Since busses are sorted in alphabetical order, introducing more
than nine busses led to unexpected behaviour.
Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Dirk Eibach [Wed, 28 Oct 2015 10:46:38 +0000 (11:46 +0100)]
board: gdsys: Enable osd on output only
Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Dirk Eibach [Wed, 28 Oct 2015 10:46:37 +0000 (11:46 +0100)]
board: gdsys: Add osdsize command
osdsize adjusts the gdsys IHS osd dimensions in characters.
Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Dirk Eibach [Wed, 28 Oct 2015 10:46:36 +0000 (11:46 +0100)]
hrcon: Add fan controllers
Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Dirk Eibach [Wed, 28 Oct 2015 10:46:35 +0000 (11:46 +0100)]
hrcon: Add support for the DH variant
hrcon DH(dual head) has two video outputs per FPGA.
Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Dirk Eibach [Wed, 28 Oct 2015 10:46:34 +0000 (11:46 +0100)]
hrcon: Fix videoboard i2c setup
- i2c addresses for the videoboard port expanders were
wrong.
- the fpga reset signal was not initialized.
Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Dirk Eibach [Wed, 28 Oct 2015 10:46:33 +0000 (11:46 +0100)]
hrcon: Use generic ioep-fpga support
The strider platform moved some generic code into ioep-fpga.c.
Make use of that on hrcon platform.
Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Dirk Eibach [Wed, 28 Oct 2015 10:46:32 +0000 (11:46 +0100)]
mpc83xx: Add strider board
The gdsys strider board is based on a Freescale MPC8308 SOC.
It boots from NOR-Flash, kernel and rootfs are stored on
SD-Card.
On board peripherals include:
- 1x 10/100 Mbit/s Ethernet (optional)
- Lattice ECP3 FPGA connected via eLBC
Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
[trini: Drop setting CONFIG_SYS_GENERIC_BOARD, this is always true now]
Signed-off-by: Tom Rini <trini@konsulko.com>
Dirk Eibach [Wed, 28 Oct 2015 10:46:31 +0000 (11:46 +0100)]
hrcon: Remove CH7301 configuration
hrcon has no CH7301 DVI-transmitter.
Probably not removed when copying from iocon.
Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Reinhard Pfau [Wed, 28 Oct 2015 10:46:30 +0000 (11:46 +0100)]
iocon: reset FPGAs in last_stage_init()
- Reset FPGAs in last_stage_init()
Signed-off-by: Reinhard Pfau <pfau@gdsys.de>
Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Dirk Eibach [Wed, 28 Oct 2015 10:46:29 +0000 (11:46 +0100)]
controlcenterd: Disable sideband clocks
Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Dirk Eibach [Wed, 28 Oct 2015 10:46:28 +0000 (11:46 +0100)]
dlvision-10g: Support displayport
Support dlvision-10g hardware with displayport output.
Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Dirk Eibach [Wed, 28 Oct 2015 10:46:27 +0000 (11:46 +0100)]
board: gdsys: Consider DP501 limits on link training
DP501 only supports DP 1.1a.
Limit settings for link bandwidth and lane count to
values allowed by DP 1.1a.
Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Dirk Eibach [Wed, 28 Oct 2015 10:46:26 +0000 (11:46 +0100)]
board: gdsys: Increase DP501 I2C retry interval
With Club 3D dual link adapter there are AUX-channel timeouts
when EDID is read. Increasing retry interval time to max (400us)
fixes this.
Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Reviewed-by: Heiko Schocher <hs@denx.de>
Dirk Eibach [Wed, 28 Oct 2015 10:46:25 +0000 (11:46 +0100)]
board: gdsys: Configure DP501 SPDIF input
Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Reviewed-by: Heiko Schocher <hs@denx.de>
Dirk Eibach [Wed, 28 Oct 2015 10:46:24 +0000 (11:46 +0100)]
i2c: ihs_i2c: Fix hold_bus control
Bus has to be held for repeated start regardless of
read/write access.
Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Acked-by: Heiko Schocher <hs@denx.de>
Dirk Eibach [Wed, 28 Oct 2015 10:46:23 +0000 (11:46 +0100)]
i2c: ihs_i2c: Use macro bestpractices
Reinhard Pfau complained that macros in ihs_i2c do not follow best practices.
Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Acked-by: Heiko Schocher <hs@denx.de>
Dirk Eibach [Wed, 28 Oct 2015 10:46:22 +0000 (11:46 +0100)]
i2c: ihs_i2c: Dual channel support
Support two i2c masters per FPGA.
Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Acked-by: Heiko Schocher <hs@denx.de>
Prabhakar Kushwaha [Sun, 25 Oct 2015 07:48:54 +0000 (13:18 +0530)]
driver: net: Fix pointer conversion warnings for xilinx_zynqmp_ep
Fix below warnings happening for xilinx_zynqmp_ep_defconfig
drivers/net/zynq_gem.c: In function ‘zynq_gem_init’:
drivers/net/zynq_gem.c:330:7: warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]
((u32)(priv->rxbuffers) +
^
In file included from drivers/net/zynq_gem.c:19:0:
drivers/net/zynq_gem.c:336:10: warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]
writel((u32)priv->rx_bd, ®s->rxqbase);
^
./arch/arm/include/asm/io.h:146:34: note: in definition of macro ‘writel’
#define writel(v,c) ({ u32 __v = v; __iowmb(); __arch_putl(__v,c); __v; })
^
drivers/net/zynq_gem.c: In function ‘zynq_gem_send’:
drivers/net/zynq_gem.c:399:9: warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]
writel((u32)priv->tx_bd, ®s->txqbase);
^
./arch/arm/include/asm/io.h:146:34: note: in definition of macro ‘writel’
#define writel(v,c) ({ u32 __v = v; __iowmb(); __arch_putl(__v,c); __v; })
^
drivers/net/zynq_gem.c:404:22: warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]
priv->tx_bd->addr = (u32)ptr;
^
drivers/net/zynq_gem.c:409:9: warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]
addr = (u32) ptr;
^
drivers/net/zynq_gem.c:414:9: warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]
addr = (u32)priv->rxbuffers;
^
drivers/net/zynq_gem.c: In function ‘zynq_gem_recv’:
drivers/net/zynq_gem.c:454:31: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]
net_process_received_packet((u8 *)addr, frame_len);
^
drivers/net/zynq_gem.c: In function ‘zynq_gem_initialize’:
drivers/net/zynq_gem.c:533:35: warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]
priv->rx_bd = (struct emac_bd *)((u32)bd_space + BD_SEPRN_SPACE);
^
drivers/net/zynq_gem.c:533:16: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]
priv->rx_bd = (struct emac_bd *)((u32)bd_space + BD_SEPRN_SPACE);
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Prabhakar Kushwaha [Sun, 25 Oct 2015 07:48:41 +0000 (13:18 +0530)]
driver: usb: Fix pointer conversion warnings for hikey
Fix below compilation warings happening for hikey_defconfig
drivers/usb/eth/smsc95xx.c:698:56: warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]
debug("** %s(), len %d, buf %#x\n", __func__, length, (int)msg);
^
include/common.h:109:26: note: in definition of macro ‘debug_cond’
printf(pr_fmt(fmt), ##args); \
^
drivers/usb/eth/smsc95xx.c:698:2: note: in expansion of macro ‘debug’
debug("** %s(), len %d, buf %#x\n", __func__, length, (int)msg);
^
drivers/usb/eth/smsc95xx.c:718:2: warning: format ‘%u’ expects argument of
type ‘unsigned int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
debug("Tx: len = %u, actual = %u, err = %d\n",
^
drivers/usb/eth/smsc95xx.c: In function ‘smsc95xx_recv’:
drivers/usb/eth/smsc95xx.c:802:19: warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]
cur_buf_align = (int)buf_ptr - (int)recv_buf;
^
drivers/usb/eth/smsc95xx.c:802:34: warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]
cur_buf_align = (int)buf_ptr - (int)recv_buf;
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Prabhakar Kushwaha [Sun, 25 Oct 2015 07:48:25 +0000 (13:18 +0530)]
driver: dwmmc: Fix pointer conversion warnings for hikey
Fix below compilation warings happening for hikey_defconfig
drivers/mmc/dw_mmc.c: In function ‘dwmci_set_idma_desc’:
drivers/mmc/dw_mmc.c:43:20: warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]
desc->next_addr = (unsigned int)desc + sizeof(struct dwmci_idmac);
^
drivers/mmc/dw_mmc.c: In function ‘dwmci_prepare_data’:
drivers/mmc/dw_mmc.c:61:35: warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]
dwmci_writel(host, DWMCI_DBADDR, (unsigned int)cur_idmac);
^
drivers/mmc/dw_mmc.c:73:9: warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]
(u32)bounce_buffer + (i * PAGE_SIZE));
^
CC drivers/mmc/hi6220_dw_mmc.o
drivers/mmc/hi6220_dw_mmc.c: In function ‘hi6220_dwmci_add_port’:
drivers/mmc/hi6220_dw_mmc.c:51:17: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]
host->ioaddr = (void *)regbase;
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Prabhakar Kushwaha [Sun, 25 Oct 2015 07:48:12 +0000 (13:18 +0530)]
driver: gpio: hikey: Fix pointer conversion warnings for hikey
Fix below compilation warnings-
drivers/gpio/hi6220_gpio.c: In function ‘hi6220_gpio_probe’:
drivers/gpio/hi6220_gpio.c:82:15: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]
bank->base = (u8 *)plat->base;
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Siarhei Siamashka [Wed, 28 Oct 2015 04:24:16 +0000 (06:24 +0200)]
mmc: Use lldiv() for 64-bit division in write_raw_image()
This fixes compilation problems when using a hardfloat toolchain on
ARM, which manifest themselves as "libgcc.a(_udivmoddi4.o) uses
VFP register arguments, u-boot does not".
These problems have been reported in the U-Boot mailing list:
http://lists.denx.de/pipermail/u-boot/2015-October/230314.html
http://lists.denx.de/pipermail/u-boot/2015-October/231908.html
Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Patrick Delaunay [Tue, 27 Oct 2015 10:00:28 +0000 (11:00 +0100)]
uuid: add selection by string for known partition type GUID
short strings can be used in type parameter of gpt command
to replace the guid string for the types known by u-boot
partitions = name=boot,size=0x6bc00,type=data; \
name=root,size=0x7538ba00,type=linux;
gpt write mmc 0 $partitions
and they are also used to display the type of partition
in "part list" command
Partition Map for MMC device 0 -- Partition Type: EFI
Part Start LBA End LBA Name
Attributes
Type GUID
Partition GUID
1 0x00000022 0x0000037f "boot"
attrs: 0x0000000000000000
type:
ebd0a0a2-b9e5-4433-87c0-
68b6b72699c7
type: data
guid:
d117f98e-6f2c-d04b-a5b2-
331a19f91cb2
2 0x00000380 0x003a9fdc "root"
attrs: 0x0000000000000000
type:
0fc63daf-8483-4772-8e79-
3d69d8477de4
type: linux
guid:
25718777-d0ad-7443-9e60-
02cb591c9737
Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
Patrick Delaunay [Tue, 27 Oct 2015 10:00:27 +0000 (11:00 +0100)]
gpt: add optional parameter type in gpt command
code under flag CONFIG_PARTITION_TYPE_GUID
add parameter "type" to select partition type guid
example of use with gpt command :
partitions = uuid_disk=${uuid_gpt_disk}; \
name=boot,size=0x6bc00,uuid=${uuid_gpt_boot}; \
name=root,size=0x7538ba00,uuid=${uuid_gpt_root}, \
type=
0fc63daf-8483-4772-8e79-
3d69d8477de4;
gpt write mmc 0 $partitions
Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
Patrick Delaunay [Tue, 27 Oct 2015 10:00:26 +0000 (11:00 +0100)]
part:efi: add GUID for linux file system data
Previously, Linux used the same GUID for the data partitions as Windows
(Basic data partition:
EBD0A0A2-B9E5-4433-87C0-
68B6B72699C7).
This created problems when dual-booting Linux and Windows in UEFI-GPT
Setup, so a new GUID (Linux filesystem data:
0FC63DAF-8483-4772-8E79-
3D69D8477DE4) was defined jointly by GPT fdisk
and GNU Parted developers.
Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
Cheng Gu [Fri, 23 Oct 2015 21:48:01 +0000 (21:48 +0000)]
pci: fix checking PCI_REGION_MEM in pci_hose_phys_to_bus()
When converting between PCI bus and phys addresses, a two pass search
was introduced with preference to non-PCI_REGION_SYS_MEMORY regions.
See commit
2d43e873a29ca4959ba6a30fc7fb396d3fd0dccf.
However, since PCI_REGION_MEM is defined as 0, the if statement was
always asserted true: ((flags & PCI_REGION_MEM) == PCI_REGION_MEM)
This patch uses PCI_REGION_TYPE bit to check if the region is
PCI_REGION_MEM: ((flags & PCI_REGION_TYPE) == PCI_REGION_MEM)
Signed-off-by: Cheng Gu <chenggu@marvell.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tom Rini [Fri, 23 Oct 2015 13:37:47 +0000 (09:37 -0400)]
include/linux/mtd: Update copyright notices
Condense these updates down to SPDX tags too while doing this. This is
a port of
a1452a3771c4eb85bd779790b040efdc36f4274e from the Linux
Kernel.
Signed-off-by: Tom Rini <trini@konsulko.com>
robertcnelson@gmail.com [Wed, 21 Oct 2015 14:25:55 +0000 (09:25 -0500)]
board/ti/am335x: beaglebone stop muxing i2c1_pin_mux
On the BeagleBone these i2c1 pins are routed to the expanasion header, where
they can be defined as either pr1_usart0_Xxd/pwm0/spi0/i2c1, dont assume i2c1
Fixes: https://e2e.ti.com/support/arm/sitara_arm/f/791/p/313894/
1387696
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
Reported-by: Matthijs van Duin <matthijsvanduin@gmail.com>
CC: Tom Rini <trini@konsulko.com>
Maxime Ripard [Thu, 15 Oct 2015 12:34:22 +0000 (14:34 +0200)]
sunxi: cubietruck: Enable the USB OTG controller
The Cubietruck has a mini-USB connector that can be used to power up the
board and as an OTG connector.
Since we have already some USB host-only ports right beside this one,
enable it in gadget mode
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Maxime Ripard [Thu, 15 Oct 2015 12:34:21 +0000 (14:34 +0200)]
sunxi: A13-Olinuxino: Enable the USB OTG controller
The A13-Olinuxino has a mini-USB connector that can be used to power up
the board and as an OTG connector.
Since we have already some USB host-only ports right beside this one,
enable it in gadget mode
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Maxime Ripard [Thu, 15 Oct 2015 12:34:19 +0000 (14:34 +0200)]
sparse: Rename the file and header
The Android sparse image format is currently supported through a file
called aboot, which isn't really such a great name, since the sparse image
format is only used for transferring data with fastboot.
Rename the file and header to a file called "sparse", which also makes it
consistent with the header defining the image structures.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Maxime Ripard [Thu, 15 Oct 2015 12:34:18 +0000 (14:34 +0200)]
fastboot: nand: Add pre erase and write hooks
Some devices might need to do some per-partition initialization
(ECC/Randomizer settings change for example) before actually accessing it.
Add some hooks before the write and erase operations to let the boards
define what they need to do if needed.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Maxime Ripard [Thu, 15 Oct 2015 12:34:17 +0000 (14:34 +0200)]
fastboot: Implement NAND backend
So far the fastboot code was only supporting MMC-backed devices for its
flashing operations (flash and erase).
Add a storage backend for NAND-backed devices.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Maxime Ripard [Thu, 15 Oct 2015 12:34:16 +0000 (14:34 +0200)]
sparse: Implement several chunks flashing
The fastboot client will split the sparse images into several chunks if the
image that it tries to flash is bigger than what the device can handle.
In such a case, the bootloader is supposed to retain the last offset to
which it wrote to, so that it can resume the writes at the right offset
when flashing the next chunk.
Retain the last offset we used, and use the session ID to know if we need
it or not.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Maxime Ripard [Thu, 15 Oct 2015 12:34:15 +0000 (14:34 +0200)]
fastboot: Implement flashing session counter
The fastboot flash command that writes an image to a partition works in
several steps:
1 - Retrieve the maximum size the device can download through the
"max-download-size" variable
2 - Retrieve the partition type through the "partition-type:%s" variable,
that indicates whether or not the partition needs to be erased (even
though the fastboot client has minimal support for that)
3a - If the image is smaller than what the device can handle, send the image
and flash it.
3b - If the image is larger than what the device can handle, create a
sparse image, and split it in several chunks that would fit. Send the
chunk, flash it, repeat until we have no more data to send.
However, in the 3b case, the subsequent transfers have no particular
identifiers, the protocol just assumes that you would resume the writes
where you left it.
While doing so works well, it also means that flashing two subsequent
images on the same partition (for example because the user made a mistake)
would not work withouth flashing another partition or rebooting the board,
which is not really intuitive.
Since we have always the same pattern, we can however maintain a counter
that will be reset every time the client will retrieve max-download-size,
and incremented after each buffer will be flashed, that will allow us to
tell whether we should simply resume the flashing where we were, or start
back at the beginning of the partition.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Maxime Ripard [Thu, 15 Oct 2015 12:34:14 +0000 (14:34 +0200)]
sparse: Implement storage abstraction
The current sparse image parser relies heavily on the MMC layer, and
doesn't allow any other kind of storage medium to be used.
Rework the parser to support any kind of storage medium, as long as there
is an implementation for it.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Maxime Ripard [Thu, 15 Oct 2015 12:34:13 +0000 (14:34 +0200)]
fastboot: Move fastboot response functions to fastboot core
The functions and a few define to generate a fastboot message to be sent
back to the host were so far duplicated among the users.
Move them all to a common place.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Maxime Ripard [Thu, 15 Oct 2015 12:34:12 +0000 (14:34 +0200)]
sparse: Simplify multiple logic
To check the alignment of the image blocks to the storage blocks, the
current code uses a convoluted syntax, while a simple mod also does the
work.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Maxime Ripard [Thu, 15 Oct 2015 12:34:11 +0000 (14:34 +0200)]
sparse: Refactor chunk parsing function
The chunk parsing code was duplicating a lot of code among the various
chunk types, while all of them could be covered by generic and simple
functions.
Refactor the current code to reuse as much code as possible and hopefully
make the chunk parsing loop more readable and concise.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Maxime Ripard [Thu, 15 Oct 2015 12:34:10 +0000 (14:34 +0200)]
sparse: Move main header parsing to a function of its own
The current sparse image format parser is quite tangled, with a lot of
code duplication.
Start refactoring it by moving the header parsing function to a function
of its own.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Maxime Ripard [Thu, 15 Oct 2015 12:34:09 +0000 (14:34 +0200)]
mtd: uboot: Add meaningful error message
The current error message in get_part if CONFIG_MTDPARTS is disabled is
"offset is not a number" which is confusing and doesn't help at all.
Change that for something that might give a hint on what's going on.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Hannes Petermaier [Tue, 29 Sep 2015 06:43:33 +0000 (08:43 +0200)]
board/BuR/kwb: use bootvx(...) (with bootline feature) instead go(...)
Since we don't have for sure a valid IP-setup during
board_late_init(...) because it maybe allready stored in environment or
not, we cannot form a proper vxWorks bootline at this place.
So we move to the way, forming the bootline just before
executing/launching vxWorks. To do this we use the bootvx command
instead go.
We only have to form the "othbootargs" environment variable, the rest is
done pretty good by the "bootvx" commannd.
Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Stephen Warren [Thu, 12 Nov 2015 15:58:22 +0000 (08:58 -0700)]
ARM: tegra: note that p2371-2180 is Jetson TX1
p2371-2180 is the engineering board name for the Jetson TX1 developer
kit. Update Kconfig description and help text to make this obvious to
everyone.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Tom Warren [Mon, 12 Oct 2015 21:50:54 +0000 (14:50 -0700)]
Tegra: T210: Add QSPI driver
This is the normal Tegra SPI driver modified to work with the
QSPI controller in Tegra210. It does not do 2x/4x transfers
or any other QSPI protocol.
Signed-off-by: Yen Lin <yelin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Alexandre Courbot [Mon, 19 Oct 2015 04:57:03 +0000 (13:57 +0900)]
ARM: tegra: rename GPU functions
Rename GPU functions to less generic names to avoid potential name
collisions.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Alexandre Courbot [Mon, 19 Oct 2015 04:57:02 +0000 (13:57 +0900)]
ARM: tegra: simplify GPU setup
Enable the GPU node in the system-wide ft_system_setup() hook instead of
the board-specific ft_board_hook(). This allows us to enable GPU per SoC
generation instead of per-board as we did initially.
Reported-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Alexandre Courbot [Mon, 19 Oct 2015 04:57:01 +0000 (13:57 +0900)]
ARM: tegra: remove vpr_configured() function
There is no justification for this function, especially in exported
form.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Stephen Warren [Fri, 23 Oct 2015 16:50:53 +0000 (10:50 -0600)]
ARM: tegra: error check Tegra210 XUSB padctl waits
Add code to detect timeouts when waiting for HW events such as PLL
lock done. Any errors are logged and trigger an error return code.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Stephen Warren [Fri, 23 Oct 2015 16:50:52 +0000 (10:50 -0600)]
ARM: tegra: add lane tables to Tegra210 XUSB padctl
Add the tables defining which pads and mux options exist in the Tegra210
XUSB padctl hardware.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Stephen Warren [Fri, 23 Oct 2015 16:50:51 +0000 (10:50 -0600)]
ARM: tegra: switch Tegra210 to common XUSB padctl
This change simply deletes code from the Tegra210 XUSB padctl driver that
is already present in the common XUSB padctl code. Since all the arrays
in tegra210_socdata are empty, this update may leave the Tegra210 XUSB
padctl driver non-functional at run-time. However, (a) this driver is not
used yet so no regression can be observed and (b) the next commit will
immediately fix this up.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Stephen Warren [Fri, 23 Oct 2015 16:50:50 +0000 (10:50 -0600)]
ARM: tegra: parameterize common XUSB code
There are some differences between the Tegra124 and Tegra210 XUSB padctl
code. So far, the common XUSB padctl code only supports Tegra124. Add
some parameters etc. so that it can work for both chips.
This also allows moving Tegra124's process_nodes() into the common file;
something that would have requires edits during the move if done in the
previous commit.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Stephen Warren [Fri, 23 Oct 2015 16:50:49 +0000 (10:50 -0600)]
ARM: tegra: create common XUSB padctl driver file
A fair amount of the XUSB padctl driver will be common between Tegra124
and Tegra210. To avoid cut/paste between the two chips, create a new
file that will contain the common code, and convert the Tegra124 code to
use it. This change doesn't move every last piece of code that can/will be
shared, but rather concentrates on moving code that can be moved with zero
changes, so there are no other diffs mixed in.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Stephen Warren [Fri, 23 Oct 2015 16:50:48 +0000 (10:50 -0600)]
ARM: tegra: clean up XUSB padctl error() calls
This file defines pr_fmt(), so the individual error() calls don't need to
include the prefix in their format strings. Doing so results in duplicate
text in any error messages. Remove the duplication.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Stephen Warren [Fri, 23 Oct 2015 16:50:47 +0000 (10:50 -0600)]
ARM: tegra: rename dummy XUSB padctl implementation
A future patch will soon move some of the XUSB padctl code into a common
file in arch/arm/mach-tegra. Rename the existing dummy XUSB padctl file
to avoid conflicting with that, or being confusing.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Stephen Warren [Mon, 5 Oct 2015 23:02:40 +0000 (17:02 -0600)]
ARM: tegra: enable PCI support of p2371-2180
p2371-2180 has two PCI ports; a regular x4 slot and a x1 M.2 slot. This
patch adds the relevant DT to enable the PCI controller and configure
the XUSB padctl pin muxing, and code to turn on the PCI power and enable
PCI features in U-Boot. I have only tested the x4 slot.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Stephen Warren [Mon, 5 Oct 2015 23:02:39 +0000 (17:02 -0600)]
ARM: tegra: add PCI to Tegra210 SoC DT
Tegra210's PCI controller is largely identical to Tegra124, and hence
shares the same binding. However, it has a unique compatible value due
to the existence of at least one new HW bug that would prevent any driver
for a previous HW version from operating correctly.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Stephen Warren [Mon, 5 Oct 2015 23:00:44 +0000 (17:00 -0600)]
pci: tegra: add/enable support for Tegra210
This needs a separate compatible value from Tegra124 since the new HW
version has bugs that would prevent a driver for previous HW versions
from operating at all.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Stephen Warren [Mon, 5 Oct 2015 23:00:43 +0000 (17:00 -0600)]
pci: tegra: call tegra_pcie_board_init() earlier
The board PCI setup code may control regulators that are required simply
to bring up the PCI controller itself (or PLLs, IOs, ... it uses). Move
the call to this function earlier so that all board-provided resources
are ready early enough for everything to work.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Stephen Warren [Mon, 5 Oct 2015 23:00:42 +0000 (17:00 -0600)]
pci: tegra: implement PCA enable workaround
Tegra210's PCIe controller has a bug that requires the PCA (performance
counter) feature to be enabled. If this isn't done, accesses to device
configuration space will hang the chip for tens of seconds. Implement
the workaround.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Stephen Warren [Mon, 5 Oct 2015 23:00:41 +0000 (17:00 -0600)]
pci: tegra: use #address-/size-cells from DT
The number of cells used by each entry in the DT ranges property is
determined by the #address-cells/#size-cells properties. Fix the code
to respect this.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Stephen Warren [Mon, 5 Oct 2015 23:00:40 +0000 (17:00 -0600)]
pci: tegra: clip RAM size to 32-bits
Tegra peripherals can generally access a 32-bit physical address space,
and I believe this applies to PCIe. Clip the PCI region that refers to
DRAM so it fits into 32-bits to avoid issues.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Stephen Warren [Mon, 5 Oct 2015 22:58:52 +0000 (16:58 -0600)]
ARM: tegra210: implement PLLE init procedure from TRM
Implement the procedure that the TRM mandates to initialize PLLREFE and
PLLE. This makes the PLL actually lock.
Note that this section of the TRM is being cleaned up to remove some
confusion. The set of register accesses in this patch should be final,
although the step numbers/descriptions might still change.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Tom Rini [Thu, 12 Nov 2015 15:48:13 +0000 (10:48 -0500)]
Merge branch 'next' of git://git.denx.de/u-boot-blackfin
Thomas Chou [Tue, 10 Nov 2015 12:36:09 +0000 (20:36 +0800)]
nios2: add 3c120 and 10m50 devboards MAINTAINERS
Add 3c120 and 10m50 devboards MAINTAINERS
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
Thomas Chou [Tue, 10 Nov 2015 23:59:31 +0000 (07:59 +0800)]
nios2: change README.nios2 to use 10m50 as template
The 10m50 devboard becomes the new golden reference design of
Nios II Linux. So change README.nios2 to use 10m50 as template.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
Thomas Chou [Tue, 10 Nov 2015 23:56:04 +0000 (07:56 +0800)]
nios2: rename board nios2-generic to 3c120_devboard
Rename board nios2-generic to 3c120_devboard. Since nios2 is
converted to driver model and device tree control of u-boot,
the nios2-generic board directory is removed. We can rename
the board back to a real board name. Now the boards maintained
in u-boot mainline are the same as Linux kernel, namely 3c120
and 10m50.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Thomas Chou [Mon, 9 Nov 2015 06:45:06 +0000 (14:45 +0800)]
nios2: add 10m50 devboard support
Add 10m50 devboard support. It is based on the Golden Hardware
Reference Design (GHRD), available at,
http://rocketboards.org/foswiki/view/Documentation/
AlteraMAX1010M50RevCDevelopmentKitLinuxSetup
Though we supported only one nios2-generic board in the past. Now,
with the removal of the nios2-generic board dir, adding new nios2
boards to u-boot is easier than before. It should be helpful to
add those boards supported in Linux mainline. There are only two
such nios2 boards, the 3c120 devboard and 10m50 devboard. The
nios2-generic is actually 3c120, and should restore the name. The
10m50 is this one.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Thomas Chou [Mon, 9 Nov 2015 06:36:29 +0000 (14:36 +0800)]
net: altera_tse: add mSG-DMA support
The Modular Scatter-Gather DMA core is a new DMA core to work
with the Altera Triple-Speed Ethernet MegaCore. It replaces the
legacy Scatter-Gather Direct Memory Access (SG-DMA) controller
core. Please find details on the "Embedded Peripherals IP User
Guide" of Altera.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Thomas Chou [Mon, 9 Nov 2015 03:02:15 +0000 (11:02 +0800)]
net: altera_tse: add priv ops to prepare msgdma support
Add priv ops to prepare msgdma support. These ops are dma type
specific.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Thomas Chou [Mon, 9 Nov 2015 00:00:00 +0000 (08:00 +0800)]
net: altera_tse: wait sgdma in altera_tse_recv
Move the sgdma wait from free_pkt to recv. This is the proper
place to wait recv sgdma done.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Thomas Chou [Sun, 8 Nov 2015 02:57:05 +0000 (10:57 +0800)]
net: altera_tse: factor out stop mac func
Factor out the stop mac function to prepare msgdma support.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Thomas Chou [Sun, 8 Nov 2015 03:04:49 +0000 (11:04 +0800)]
net: zap altera_tse_initialize prototypes
Zap the altera_tse_initialize() prototypes, since it is converted
to driver model.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Thomas Chou [Thu, 5 Nov 2015 08:37:33 +0000 (16:37 +0800)]
nios2: nios2-generic: do not allocate rx buf in net.c
Do not allocate rx buf in net.c, because altera_tse allocates
its own rx buf in driver. This can save 6KB memory.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Thomas Chou [Mon, 9 Nov 2015 06:56:02 +0000 (14:56 +0800)]
mtd: add altera quadspi driver
Add Altera Generic Quad SPI Controller support. The controller
converts SPI NOR flash to parallel flash interface. So it is
not like other SPI flash, but rather like CFI flash.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Thomas Chou [Thu, 5 Nov 2015 07:09:57 +0000 (15:09 +0800)]
nios2: add memcpy_fromio and memcpy_toio
Add memcpy_fromio() and memcpy_toio().
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Thomas Chou [Wed, 28 Oct 2015 07:10:39 +0000 (15:10 +0800)]
nios2: use cfi flash driver model
Use cfi flash driver model.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Thomas Chou [Sat, 7 Nov 2015 06:31:08 +0000 (14:31 +0800)]
cfi_flash: convert to driver model
Convert cfi flash to driver model.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Simon Glass <sjg@chromium.org>
Thomas Chou [Sat, 7 Nov 2015 06:20:31 +0000 (14:20 +0800)]
dm: implement a MTD uclass
Implement a Memory Technology Device (MTD) uclass. It should
include most flash drivers in the future. Though no uclass ops
are defined yet, the MTD ops could be used.
The NAND flash driver is based on MTD. The CFI flash and SPI
flash support MTD, too. It should make sense to convert them
to MTD uclass.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Masahiro Yamada [Fri, 6 Nov 2015 13:16:30 +0000 (22:16 +0900)]
ARM: uniphier: drop UniPhier specific SMP code
The latest Linux can directly handle SMP operations for UniPhier SoCs
without any help of U-boot. Drop the relevant code from U-boot.
See commit
b1e4006aeda8c8784029de17d47987c21ea75f6d ("ARM: uniphier:
rework SMP operations to use trampoline code") in Linux Kernel.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Masahiro Yamada [Wed, 4 Nov 2015 12:56:07 +0000 (21:56 +0900)]
ARM: dts: uniphier: add USB xHCI nodes for PH1-Pro5 and ProXstream2
This makes USB3.0 available on new SoCs/boards.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Masahiro Yamada [Wed, 4 Nov 2015 12:56:06 +0000 (21:56 +0900)]
ARM: dts: uniphier: fix interrupt number of USB core for PH1-Pro4
The IRQ is not used in U-Boot, but this would be useful to sync
device trees between Linux and U-Boot.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tom Rini [Tue, 10 Nov 2015 18:38:08 +0000 (13:38 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-arm
Stephen Warren [Mon, 5 Oct 2015 18:09:02 +0000 (12:09 -0600)]
ARM: tegra: enable CONFIG_SYS_NONCACHED_MEMORY everywhere
Now that we have solved the problems that prevented this feature from
being enabled, enable it everywhere.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Stephen Warren [Mon, 5 Oct 2015 18:09:01 +0000 (12:09 -0600)]
ARM: tegra: add custom MMU setup on ARMv8
This sets up a fine-grained page table, which is a requirement for
noncached_init() to operate correctly.
MMU setup code currently exists in a number of places:
- A version in the core ARMv8 support code that sets up page tables that
use very large block sizes that CONFIG_SYS_NONCACHED_MEMORY doesn't
support.
- Enhanced versions for fsl-lsch3 and zynmq that set up finer grained
page tables.
Ideally, rather than duplicating the MMU setup code yet again this patch
would instead consolidate all the different routines into the core ARMv8
code so that it supported all use-cases. However, this will require
significant effort since there appear to be a number of discrepancies[1]
between different versions of the code, and between the defines/values by
some copies of the MMU setup code use and the architectural MMU
documentation. Some reverse engineering will be required to determine the
intent of the current code.
[1] For example, in the core ARMv8 MMU setup code, three defines named
TCR_EL[123]_IPS_BITS exist, but only one of them sets the IPS field and
the others set a different field (T1SZ) in the page tables. As far as I
can tell so far, there should be no need to set different values per
exception level nor to modify the T1SZ field at all, since TTBR1 shouldn't
be enabled anyway. Another example is inconsistent values for *_VA_BITS
between the current core ARMv8 MMU setup code and the various SoC-
specific MMU setup code. Another example is that asm/armv8/mmu.h's value
for SECTION_SHIFT doesn't match asm/system.h's MMU_SECTION_SHIFT;
research is needed to determine which code relies on which of those
values and why, and whether fixing the incorrect value will cause any
regression.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Stephen Warren [Mon, 5 Oct 2015 18:09:00 +0000 (12:09 -0600)]
armv8: allow custom MMU setup routines on ARMv8
In order for noncached_init() to operate correctly, SoCs must set up a
custom page table with fine-grained (2MiB) sections, which can be
configured from noncached_init().
This is currently performed by arch/arm/cpu/armv8/{fsl-lsch3,zynqmp}/cpu.c
by cut/pasting and re-implementing mmu_setup, enable_caches(), etc. There
are some other reasons for the duplication there though, such as enabling
icache early, and enabling dcaching earlier with a different configuration.
This change makes mmu_setup() a weak implementation, so that the MMU setup
code can be replaced without having to duplicate other code that calls it.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Stephen Warren [Mon, 5 Oct 2015 18:08:59 +0000 (12:08 -0600)]
armv8: enable compilation with CONFIG_SYS_NONCACHED_MEMORY
The implementation of noncached_init() uses define MMU_SECTION_SIZE.
Define this on ARM64.
Move the prototype of noncached_{init,alloc}() to a location that
doesn't depend on !defined(CONFIG_ARM64).
Note that noncached_init() calls mmu_set_region_dcache_behaviour() which
relies on something having set up translation tables with 2MB block size.
The core ARMv8 MMU setup code does not do this by default, but currently
relies on SoC specific MMU setup code. Be aware of this before enabling
this feature on your platform!
Signed-off-by: Stephen Warren <swarren@nvidia.com>