summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ARM: i.MX: fix compilation with BBU disabledSascha Hauer2018-08-081-1/+1
| | | | | | Make a static inline wrapper actually static inline. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: mmu: fix cache flushing when replacing a section with a PTELucas Stach2018-07-271-45/+32
| | | | | | | | | | | | | | When replacing a section with a PTE, we must make sure that the newly initialized PTE entries are flushed from the cache before changing the entry in the TTB. Otherwise a L1 TLB miss causes the hardware pagetable walker to walk into a PTE with undefined content, causing exactly that behaviour. Move all the necessary cache flushing to arm_create_pte(), to avoid any caller getting this wrong in the future. Fixes: e3e54c644180 (ARM: mmu: Implement on-demand PTE allocation) Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* i.MX: iomuxv3: restore NO_PAD_CTRL semanticAlexander Kurz2018-07-131-3/+5
| | | | | | | | | | | | | A NO_PAD_CTRL flag used to keep a pad configuration untouched. With commit 094820a63bfd ("i.MX: iomuxv3: Use helper functions in iomux-v3.h") the NO_PAD_CTRL semantic changed to set a pad configurations to zero, which breaks non-DT boards, where NO_PAD_CTRL is freqently used to keep a boot-up default pad configuration, which often is non zero. Restore the old semantic, dont write PAD_CTRL when NO_PAD_CTRL is set. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: imx-image: fix build with OpenSSL 1.1.xLucas Stach2018-07-131-20/+20
| | | | | | | | | | | OpenSSL 1.1.x made some of the types opaque, so peeking inside directly doesn't work anymore. Use the correct accessors instead. I've dropped the algorithm check, as EVP_PKEY_get0_RSA() already verifies that the pubkey is RSA and returns NULL if it isn't. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: MMU: fix arch_remap_range() across section boundariesSascha Hauer2018-07-121-1/+1
| | | | | | | | | | | Fixes: e3e54c6441 ARM: mmu: Implement on-demand PTE allocation PGD_FLAGS_WC_V7 lacks the PMD_TYPE_SECT and PMD_SECT_BUFFERABLE flags. Without them a dma_alloc_writecombine() creates an invalid section when it crosses a section boundary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
* cmdlinepart: Allow empty stringSascha Hauer2018-07-091-0/+3
| | | | | | | | | | | | Currently when cmdlinepart_do_parse() is called with an empty partitions string then an unnamed partition with size 0 is created. This is wrong of course and instead no partition should be created. With this barebox no longer crashes while booting when all partitions are deleted on the commandline using "nand0.partitions=" Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/vfxxx'Sascha Hauer2018-07-098-498/+468
|\
| * VFxxx: DCD: Remove read leveling and gate training delaysAndrey Smirnov2018-06-133-45/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Read leveling delays are being specified as zero, so they are as good as disabled and can be safely dropped. Gate training delay is specified as 4/128 tCK for both data slices. This setting, when applied to Data Byte 1, makes that slice unusable* during POR startup which is somehow is mitigated by double-reset hack in DCD. Dropping gate training delays allows both VF610 Tower board and ZII VF610 Dev board to sucessfully PoR-boot without the need for double resetting of the DDRMC. * The board fails to boot. When examined via JTAG in such a state only even bytes of DDR memory are functional. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * VFxxx: DCD: Remove CR97, CR98 and CR99Andrey Smirnov2018-06-131-3/+0
| | | | | | | | | | | | | | | | | | There's no point enabling write leveling DQS adjustement, while setting offsets for both slices to zero. This code is effectively a no-op, so drop it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * VFxxx: DCD: Drop initialization of CR139 - CR148Andrey Smirnov2018-06-131-8/+0
| | | | | | | | | | | | | | | | | | | | All of those registers contain paramters applicable only to write leveling, gate training and read leveling procedures. They should have no effect on normal mode of operations, so remove them from the common settings file. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * VFxxx: DCD: Remove CR151 initializationAndrey Smirnov2018-06-131-1/+0
| | | | | | | | | | | | | | | | CR151 contains parameters specific to HW gate training and read leveling which are not an officially supported featre of the HW. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * VFxxx: Reconcile shared DDR IOMUX DCD with schematicAndrey Smirnov2018-06-131-19/+19
| | | | | | | | | | | | | | | | | | The only differential signals coming out of DDRMC to the memory chip are CLK, DQS0 and DQS1. There rest of the pins are not, so there should be no reason to configure them as such. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * VFxxx: Initialize IOMUXC_DUMMY_DDRBYTE1/2 in default DDR DCDAndrey Smirnov2018-06-132-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although upstream U-Boot does not initialize this register in vf610-twr code (it does so in code for Phytec's PCM052) multiple revisions of VFxxx Controller Reference Manual state: 5.2.6.1 DUMMY PADS (DDR/QuadSPI) There are two dummy pads that are useful for timing calibration of DDR. These pads are internal only, but there corresponding IOMUX register need to be programmed for correct operation of DDR. These registers are: * IOMUXC_DUMMY_DDRBYTE1 (0x400482DC) * IOMUXC_DUMMY_DDRBYTE2 (0x400482E0) DDR: Dummy pads for DDR must be configured before any DDR I/O transactions are done. These pads simulate the input delay of the I/O buffers from the DRAM devices and DDR configures the delays accordingly. Although current DCD works as is, add writes for those registers for the sake of completness. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * VFxxx: zii-vf610-dev: Drop most custom DDRMC DCD codeAndrey Smirnov2018-06-131-8/+0
| | | | | | | | | | | | | | | | | | Both zii-vf610-dev and vf610-twr boards have same DDR layout. Since provenance of those custom settings is unclear, drop them in favor of what vf610-twr board does. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * VFxxx: Reconcile shared DDR DCD with memory datasheetAndrey Smirnov2018-06-132-5/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the settings for VFxxx boards appear to be in violation of the parameters specified by DDR chip's datasheet, so fix the code to reconcile the differences. The changes are: In vf610-ddr-cr-default.imxcfg: - CR31: t_XSDLL is 468, should be 512 - CR161 t_ODTH8 (R & W) is 2, should be 6 In flash-header-zii-vf610-dev.imxcfg: - CR12: WRLAT is 5, CL is 3,should be 5 and 6 - CR13: t_RC is 6, should be 21 - CR14: use default, more conservative t_FAW of 20 Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * VFxxx: Reconcile shared DDR DCD configuration with U-BootAndrey Smirnov2018-06-132-6/+3
| | | | | | | | | | | | | | | | | | | | U-Boot was originally used as a source of DCD for VFxxx, so update our settings against latest upstream (sha1: b8aa55cb6414e512cce30bb7db3268eea934466d) to reconcile the differences. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * VFxxx: Add common DCD header for common DDR configurationAndrey Smirnov2018-06-134-164/+196
| | | | | | | | | | | | | | | | | | A number of VFxxx boards copy DDR layout/design of vf610-twr board and they all share DDR settings. Move those settings to a common file to avoid code duplication. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * VFxxx: Add common header for DDR clock setting DCDAndrey Smirnov2018-06-133-77/+48
| | | | | | | | | | | | | | | | | | | | VFxxx support code in Barebox is written assuming a particular clock setup in mind and all of the supported boards use it. Move the DCD code responsible for that setup to a shared file to avoid code duplication. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * VFxxx: Add common DDR PHY DCD headerAndrey Smirnov2018-06-134-50/+70
| | | | | | | | | | | | | | | | | | A number of VFxxx boards copy DDR layout/design of vf610-twr board and they all share DDR PHY settings. Move those settings to a common file to avoid code duplication. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * VFxxx: Add common header for DDR IOMUX DCD configurationAndrey Smirnov2018-06-134-100/+119
| | | | | | | | | | | | | | | | | | A number of VFxxx boards copy DDR layout/design of vf610-twr board and they all share IOMUX settings. Move those settings to a common file to avoid code duplication. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * VFxxx: Remove stale code from DCD filesAndrey Smirnov2018-06-132-71/+0
| | | | | | | | | | | | | | | | | | Remove various bits of debug code, commented DCD commands and separators as a small clean-up in preparation for commits that would follow. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/riscv'Sascha Hauer2018-07-0912-120/+201
|\ \
| * | MIPS: Use generic GCC library routines from lib/Antony Pavlov2018-06-296-120/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a port of Linux kernel commit | commit 740129b36faf049e6845819144542a0455e1e285 | Author: Antony Pavlov <antonynpavlov@gmail.com> | Date: Wed Apr 11 08:50:19 2018 +0100 | | MIPS: Use generic GCC library routines from lib/ Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | lib: Add shared copies of some GCC library routinesAntony Pavlov2018-06-296-0/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is based on these linux kernel commits: | commit b35cd9884fa5d81c9d5e7f57c9d03264ae2bd835 | Author: Palmer Dabbelt <palmer@dabbelt.com> | Date: Tue May 23 10:28:26 2017 -0700 | | lib: Add shared copies of some GCC library routines | | commit e3d5980568fdf83c15a5a3c8ddca1590551ab7a2 | Author: Matt Redfearn <matt.redfearn@mips.com> | Date: Wed Apr 11 08:50:17 2018 +0100 | | lib: Rename compiler intrinsic selects to GENERIC_LIB_* Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2018-07-0919-133/+141
|\ \ \
| * | | net: designware: make sure DMA is disabled on kernel start.Oleksij Rempel2018-07-024-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Halt is not automatically executed if we start the kernel. So, we may have potentially memory corruptions. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | drivers: of: Make use of devpath_to_name()Andrey Smirnov2018-06-251-4/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | commands: mmc_extcsd: Make use of devpath_to_name()Andrey Smirnov2018-06-251-3/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | commands: mount: Make use of devpath_to_name()Andrey Smirnov2018-06-251-4/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | fs: devfs-core: Make use of devpath_to_name()Andrey Smirnov2018-06-251-4/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | video: backlight: add slew time parameterLucas Stach2018-06-213-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the backlight implementation stretches a brightness change over a period of 100ms. While this is a fine default for PWM backlights, a user might wish to change this slew time to meet other constraints or even completely disable it for some backlight devices. Add a parameter and provide the default value from the backlight device. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mmc_extcsd command: Add cmd option to set bkops-enableChristoph Fritz2018-06-201-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is for convenience to set bkops-enable (EXT_CSD_BKOPS_EN[163]) on devices which have it not yet activated. Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | nand-bb: mtd_del_bb: fix missing pointer resetHeinrich Toews2018-06-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an attached bb device was removed before the actual mtd device the code would try due to a missing pointer reset to access the no more present bb device handle which leads to a page fault. This bug was made visible by commit "7649473 mtd: nand: remove automatically created bb devices" which relys on a correct mtd->cdev_bb handling. Signed-off-by: Heinrich Toews <heinrich.toews@wago.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | fs: fix memory access via /dev/mem for MIPS64Peter Mamonov2018-06-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lseek checks for non-negative in-memory offsets (addresses), failing otherwise. However negative address 0xffffffffXXXXXXXX is a valid MIPS64 virtual address. Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | scripts: gitignore += omap3-usb-loaderUwe Kleine-König2018-06-141-0/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | TODO: remove unused fileRoland Hieber2018-06-141-110/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This file was last touched in 2014-12, 2010-07 and 2009-12 and has at most historical value. Most of the open tasks are done, if not, they are probably out of date anyway. Signed-off-by: Roland Hieber <r.hieber@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mvebu: create bbu handler for kwb images and use it on cuboxUwe Kleine-König2018-06-134-1/+81
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/mips'Sascha Hauer2018-07-0914-31/+160
|\ \ \ \
| * | | | MIPS: don't include generated header files into MIPS asm filesAntony Pavlov2018-07-021-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch came out of discussions in the 'MIPS parallel build breakage' e-mail thread: http://lists.infradead.org/pipermail/barebox/2018-March/032251.html Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | MIPS: dts: fix dtc unit_address_vs_reg warningAntony Pavlov2018-06-255-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unit number is added to the /memory nodes to fix this dtc warning: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | MIPS: dts: drop skeleton.dtsiAntony Pavlov2018-06-258-23/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on feedback from Sascha: http://lists.infradead.org/pipermail/barebox/2018-April/032694.html " skeleton.dtsi should no longer be used " Several reasons to remove skeleton.dtsi are explained in the linux commit 3ebee5a2e141 ("arm64: dts: kill skeleton.dtsi"). Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | MIPS: dts: dpt-module: add Atheros ART partitionOleksij Rempel2018-06-141-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and define it as source of MAC address for ag71xx driver Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | MIPS: dts: tl_wdr4300: add Atheros ART partitionOleksij Rempel2018-06-141-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and define it as source of MAC address for ag71xx driver Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | MIPS: ath79: provide driver for Atheros ART partitionOleksij Rempel2018-06-142-0/+113
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this partition contains calibration data for WiFi and some board specific data, like MAC address. For now we care only about MAC. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/kill-oftree-f'Sascha Hauer2018-07-097-35/+25
|\ \ \ \ | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | Documentation: explain new way to boot using ATAGsSascha Hauer2018-06-115-18/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | oftree -f is gone and now global.bootm.boot_atag must be set to true if boot using ATAGs is desired. Update the documentation accordingly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | commands: oftree: kill oftree -fSascha Hauer2018-06-111-16/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Being able to free the live device tree seemed like a good idea in the early days of device tree support when the first boards were brought up. It turned out to be illusory that noone stores pointers to the live tree which become invalid when oftree -f is executed. Enough people stumbled upon crashed boards with this option, so remove it finally. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: bootm: Add option boot using ATAGsSascha Hauer2018-06-111-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far we can only force legacy boot using ATAGs by executing 'oftree -f'. Said command is going away as often this command is not safe to call. Add an alternative way using the global.bootm.boot_atag environment variable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/imx8mq'Sascha Hauer2018-07-0929-42/+2457
|\ \ \ \ \
| * | | | | ARM: Introduce imx_v8_defconfigAndrey Smirnov2018-06-151-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to imx_v7_defconfig, add imx_v8_defconfig as a default configuration encompassing all ARMv8 based i.MX SoCs. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>