summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | net: fec_imx: Drop extra indentation level by exiting earlyAndrey Smirnov2018-09-191-26/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop extra indentation level by exiting early which also allows us to check for bd_status & FEC_RBD_EMPTY instead of !(bd_status & FEC_RBD_EMPTY). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/mtd'Sascha Hauer2018-10-092-66/+63
|\ \ \ \ \
| * | | | | mtd: do not attach already attached UBISascha Hauer2018-10-081-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in mtd_detect we do not check if the mtd is already attached to UBI. If it is we get the error: ERROR: ubi: mtd0 is already attached to ubi0 Check before trying to attach it to avoid this message. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | mtd: mtdraw: fix wrong alignment checkSascha Hauer2018-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The write offset must be raw page size aligned on entry, not page size aligned. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | mtd: mtdraw: replace "block" with "page"Sascha Hauer2018-09-251-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the code says "block" it actually means "page" as this is what the code handles. Rename the functions and variable names accordingly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | mtd: mtdraw: fail when writing failsSascha Hauer2018-09-241-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When writing a block fails then fail the whole write process. There's no point in returning the written bytes so far as this would only indicate the caller to write the remaining bytes again which would then fail. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | mtd: mtdraw: add raw page size to private dataSascha Hauer2018-09-241-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The raw page size is used many times in the driver, so add a variable to the private data instead of calculating it each time again. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | mtd: mtdraw: pass mtdraw aroundSascha Hauer2018-09-211-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass mtdraw around internally instead of mtd. mtd can be accessed easily from mtdraw, so we can also drop to_mtd(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | mtd: mtdraw: do not write empty buffersSascha Hauer2018-09-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a page is completely 0xff then do not write it since users expect pages to be writable when they are empty. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | mtd: mtdraw: use dev_* for printingSascha Hauer2018-09-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a struct device_d *, so use dev_* for printing instead of printf. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | mtd: mtdraw: Simplify error pathSascha Hauer2018-09-211-9/+7
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do not need a printf when writing fails, it's the callers job to report this. Remove printf and simplify the error path a bit. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/misc'Sascha Hauer2018-10-0910-33/+132
|\ \ \ \ \
| * | | | | digest.h: Sync hash_algo values with kernelSascha Hauer2018-10-081-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | enum hash_algo is exported from the Kernel, so sync it with the numbers that are exported. Since we have barebox specific extensions to the hash_algo list add a big comment and put the extenstions at the end. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | usb: gadget: fastboot: fix downloading files of wMaxPacketSize bytesSascha Hauer2018-10-021-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | File transfers with sizes of exact multiples of wMaxPacketSize up to EP_BUFFER_SIZE do not work. For a typical scenario that would be files of 512, 1024 ... 3584 bytes. This happens because we unconditionally put EP_BUFFER_SIZE into the initial request length. For non wMaxPacketSize aligned lengths this works well because the transfer is completed with a short packet. For wMaxPacketSize aligned lengths there is no short packet though, so the transfer never completes. Instead we have to put the file size into the initial request length. Some controllers like the DWC3 do not work when the request length is not aligned to wMaxPacketSize, so we align up to wMaxPacketSize like done in U-Boot. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reported-by: Gavin Schenk <g.schenk@eckelmann.de> Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
| * | | | | .gitignore: Add .bin.gen.S files found firmware/Andrey Smirnov2018-09-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | environment: Do not use environment when overlapping with other partitionsSascha Hauer2018-09-262-1/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Environment partitions are usually specified with their hardcoded offset and size, either in the device tree or the board file. These partitions potentially overlap with other partitions read from the partition table. Overlapping partitions for sure have bad effects. Be more friendly to our users and warn them when such a situation occurs and stop using that partition for storing the environment. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | environment: Allow default env path to be NULLSascha Hauer2018-09-212-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several places assume that the default environment path cannot be NULL. Allow NULL here without crashing. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | kfifo: roundup fifo size to next power of twoSascha Hauer2018-09-211-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Comments in include/kfifo.h state that the FIFO size will be rounded up to the next power of two, but so far we haven't actually done this, probably because we didn't have roundup_pow_of_two() back then when kfifo support was added. Fix that now and do what the comments state. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | memtest: Make use of resource_size()Andrey Smirnov2018-09-192-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | memtest: Adjust code for 64-bit architecturesAndrey Smirnov2018-09-192-18/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make use of %pa specifier to avoid warnings when building against 64-bit CPU (specifically AArch64) as well as adjust a number of patterns to be 64-bits wide. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | usb: gadget: fastboot: detect device if not presentSascha Hauer2018-09-181-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a device file is not present when the fastboot gadget is created then try to detect it before we fail. It may be that we want to write to a device that we haven't used before. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | checkpatch: don't check TODO file presenceAntony Pavlov2018-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit b3baf2d86149 ("TODO: remove unused file") drops the TODO file. Alas scripts/checkpatch.pl checks TODO file presence in top_of_kernel_tree(). Without TODO checkpatch.pl exits with 'Must be run from the top-level dir. of a kernel tree'. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | | Merge branch 'for-next/imx'Sascha Hauer2018-10-0946-537/+1857
|\ \ \ \ \ \
| * | | | | | i.MX: Add support for ZII's i.MX7D-based RPU2 boardAndrey Smirnov2018-10-089-0/+732
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: i.MX7: bbu: Add I2C and SPI handlerAndrey Smirnov2018-10-082-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: i.MX7: bbu: Add MMC boot handlerAndrey Smirnov2018-10-082-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | i.MX7D: DCD: Create shared DDR configuration headerAndrey Smirnov2018-10-082-78/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a shared DDR configuration header based on configuration used by i.MX7D SabreSD board. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: freescale-mx7-sabresd: Make use of imx7d_barebox_entry()Andrey Smirnov2018-10-081-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: i.MX: esdctl: Add memory size detection for i.MX7DAndrey Smirnov2018-10-084-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: rdu1: Remove now redundant RAVE SP properties/nodesAndrey Smirnov2018-10-081-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove RAVE SP properties/nodes that are now availible from upstream Linux DTS files. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: rdu2: Remove now redundant RAVE SP properties/nodesAndrey Smirnov2018-10-081-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove RAVE SP properties/nodes that are now availible from upstream Linux DTS files. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | imx-bbu-nand-fcb: Workaround ROM checking fingerprint before correcting bitflipsSascha Hauer2018-09-251-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FCB block is protected with a ECC code which can correct 1bit errors and detect 2bit errors. This works fine for all fields except the fingerprint marker (Containing "FCB") and the version field. Here the ROM chooses to check the correct value of the fields *before* running the ECC correction. Thus a FCB is not used by the ROM anymore when it has a bitflip in the fingerprint or version. For us this means we have to rewrite the FCB in this case, so reject the faulty FCB in read_fcb_hamming_13_8() which triggers a rewrite during the check operation. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | imx-bbu-nand-fcb: Workaround ROM not being able to handle bad blocks properlySascha Hauer2018-09-251-7/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When reading a firmware image the ROM only checks for a bad block when advancing the read position, but not if the initial block is good. Hence we cannot directly point to the first firmware block, but must instead point to the first *good* firmware block. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | imx-bbu-nand-fcb: Improve error messageSascha Hauer2018-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When printing that a FCB is not readable it's interesting to know which one is not readable. Print the block number in the message. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: i.MX8MQ: Add node for CPU thermal sensorAndrey Smirnov2018-09-241-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | aiodev: Port Linux driver for i.MX8MQ CPU thermal sensorAndrey Smirnov2018-09-243-0/+272
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is a minimal port of the corresponding driver that can be found in Linux kernel (drivers/thermal/qoriq_thermal.c). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | clk: i.MX8MQ: Add missing IMX8MQ_CLK_TMU_ROOT clockAndrey Smirnov2018-09-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing IMX8MQ_CLK_TMU_ROOT clock needed for CPU thermal sensor. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: nxp-imx8mq-evk: Make use of memory size detection codeAndrey Smirnov2018-09-243-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: i.MX: esdctl: Add memory size detection for i.MX8MQAndrey Smirnov2018-09-243-0/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add memory size detection for i.MX8MQ. Only basic LPDDR4 configurations are supported for now. Support for other types of memory can be added later once we have any boards that use it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: nxp-imx8mq-evk: Add FEC's PHY configuration codeAndrey Smirnov2018-09-242-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add appropriate DT and PHY fixup code needed for i.MX8MQ EVK board. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: nxp-imx8mq-evk: Add missing compatibility checkAndrey Smirnov2018-09-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing compatibility check to imx8mq_evk_mem_init() to prevent it from being executed for other i.MX8MQ boards. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: i.MX8MQ: Configure FEC1 clocksAndrey Smirnov2018-09-241-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Select proper parents as well as rates for FEC1 related clocks. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: i.MX8MQ: Configure USDHC1,2 clocksAndrey Smirnov2018-09-241-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Select appropriate parents as well as clock rates for USDHC1 and USDHC2 related clocks. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: i.MX8MQ: Add missing node for ECSPI1Andrey Smirnov2018-09-241-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add node for ECSPI1 that is missing from imx8mq.dtsi Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | clk: i.MX8MQ: Bump refcounters of various important clocksAndrey Smirnov2018-09-241-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump refcounters of various important clocks in order to make sure their parents are not disabled during clock re-configuration added by commits that follow. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | .gitignore: Add .bin.gen.S files found firmware/Andrey Smirnov2018-09-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: i.MX: Add ZII SCU3 ESB boardAndrey Smirnov2018-09-244-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add ZII SCU3 ESB board, which is i.MX51 based and similar enought to RDU1 that it can be handled by the same image (different DT). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: i.MX: Add ZII SCU2 Mezz BoardAndrey Smirnov2018-09-244-5/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add ZII SCU2 Mezz Board. Which is a i.MX51 based board that is similar enough to RDU1 that they both can be handled by a single image (type can be detected at runtime). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: zii-vf610-dev: Convert SPU3 to use upstream DTSAndrey Smirnov2018-09-245-150/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ARM: zii-vf610-dev: Convert CFU1 to use upstream DTSAndrey Smirnov2018-09-245-216/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>