Commit graph

14274 commits

Author SHA1 Message Date
Sascha Hauer
9499f30f5e mtd: remove unused debug defines
MTD_DEBUG was only used by the i.MX Nand driver and is now unused.
Remove the mtd specific debug defines.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-17 12:05:48 +01:00
Sascha Hauer
d4d667c0d0 mtd: nand-imx: remove/replace debug print
The relevant informations which command is sent for which page
is already contained in the informations imx_nand_command() prints, so
remove the debug prints in send_cmd and send_addr (which only exist for
v1/v2 controllers, not for v3). Also use dev_dbg to print debug
informations instead of MTD_DEBUG.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-17 12:05:48 +01:00
Sascha Hauer
ba62a5bc7d mtd: nand-imx: remove dead code
Neither CONFIG_MXC_NAND_LOW_LEVEL_ERASE nor CONFIG_MTD_NAND_MXC_FORCE_CE
are defined anywhere, remove the code inside the ifdefs.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-17 12:05:48 +01:00
Sascha Hauer
a391fc06f4 mtd: nand-imx: Fix correct_data return value for v2/v3 controllers
The correct return value for a uncorrectable page is -EBADMSG, not -1
(which is -EPERM). Also the max_bitflips returned shall be the bitflips
per ecc step, not per page.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-17 12:05:48 +01:00
Sascha Hauer
a420bad17b mtd: nand-imx: Fix v1 controller ECC code
The driver returns wrong values for the ECC correction. For 2k pages
the controller reads and corrects in chunks of 512 bytes. The ECC status
register values are overwritten with each each new chunk read, so after
reading for chunks the .correct callback wil only return the ECC errors
for the last 512 byte chunk. ECC errors in the other three chunks remain
undetected.
Fix this by accumulating the ECC status while reading the chunks and
return the accumulated value in the .correct callback. Also return
-EBADMSG for a bad message and not -1.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-17 12:00:08 +01:00
Andrey Smirnov
12728df947 common: Add EPROBE_DEFER to strerror
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-17 08:23:05 +01:00
Andrey Smirnov
ce20b192f1 i.MX6: PL310: Adjust settings for performance
According to commit f6b6f3c7b2bb7d6277801882afdced6f2b10fc17 from
git://git.freescale.com/imx/uboot-imx.git:

	Also set Prefetch offset to 15, since it improves
	memcpy performance by 35%. Don't enable Incr double
	Linefill enable since it adversely affects memcpy
	performance by about 32MB/s and reads by 90MB/s. Tested
	with 4K to 16MB sized src and dst aligned buffer.

This commit ports those chagnes from U-Boot.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-17 08:23:05 +01:00
Andrey Smirnov
5127d80137 i.MX6: Apply PL310 errata base on PL310's revision
I.MX6Q Plus parts have r3p2 revision of PL310 so double linefill
errata no longer applies for all of the i.MX6Q SoCs. Change the code to
use PL310's revision inforation to determine if workaround needs to be
applied.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-17 08:23:05 +01:00
Andrey Smirnov
1414c55f82 L2x0: i.MX6: Replace magic numbers with constants
Use constants instead of magic numbers for PL301 registers bits in
imx6_mmu_init()

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-17 08:23:05 +01:00
Andrey Smirnov
f65c093abc i.MX6: Apply errata 845369 workaround
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-17 08:23:05 +01:00
Andrey Smirnov
1d6283d6c1 ARM: Add errata 845369 workaround
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-17 08:23:05 +01:00
Andrey Smirnov
9791ea8f11 i.MX: Add revision detection for i.MX6D/Q Plus
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-17 08:23:05 +01:00
Andrey Smirnov
679388f83f fec_imx: Unregister MDIO when probe fails
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-17 08:23:05 +01:00
Andrey Smirnov
6282c74a9c fec_imx: Deallocate DMA buffers when probe fails
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-17 08:23:05 +01:00
Andrey Smirnov
57ab72c903 fec_imx: Implement reset timeout
Don't wait for more than one second for IP block to finish resetting. If
the block is dead it makes more sence to continue execution in hopes
that the rest of the processor is fine, rather than spin indefinetly
inside of the fec_probe function

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-17 08:22:57 +01:00
Sascha Hauer
0832e4008f ARM: i.MX27: Fix gpt compatible for latest device trees
In v4.2-rc3 the "fsl,imx1-gpt" compatible was replaced with
"fsl,imx21-gpt" so i.MX27 currently ends up without clocksource. Fix
this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-16 09:29:33 +01:00
Andrey Smirnov
5d60aa5269 fec_imx: Use FEC_ECNTRL_RESET instead of a magic number
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-16 08:23:46 +01:00
Andrey Smirnov
b0b00ad859 fec_imx: Free phy_reset GPIO if when probe fails
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-16 08:23:46 +01:00
Andrey Smirnov
a0847ec06e fec_imx: Deallocate I/O resources if probe fails
Add a proper check for I/O memory resource allocation failure and
replace dev_request_mem_region with dev_request_mem_resource so it would
be possible to correctly deallocate device's I/O resources when probe
fails.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-16 08:23:46 +01:00
Andrey Smirnov
f136e568db fec_imx: Deallocate clocks when probe fails
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-16 08:23:46 +01:00
Andrey Smirnov
f88e78572b clk-imx6: Call clk_enable on mmdc_ch0_axi_podf
Call clk_enable on mmdc_ch0_axi_podf in order to properly increase
reference counters for all of the nodes in this particular clock
path. Otherwise it becomes possible for peripherals, located on other
branches stemming from "periph", to shut down the whole clock tree (up
to "pll2_bus") when they try to manage their own local clocks.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-16 08:23:46 +01:00
Andrey Smirnov
4249f24e2c i.MX6: dts: Include local .dtsi's last
Make sure that Barebox specific .dtsi files are included after .dtsi
files imported from Linux kernel. This way those local .dtsi files can
reference phandles defined in Linux kernel files.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-16 08:23:46 +01:00
Sascha Hauer
fdac29be62 mtd: Introduce mtd_check_pattern
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-15 11:29:27 +01:00
Sascha Hauer
30750ef990 mtd: rename mtd_all_ff -> mtd_buf_all_ff
To make clear this function checks a given buffer and not data on a mtd
device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-15 11:29:27 +01:00
Sascha Hauer
1eee78b580 mtd: Introduce function to get mtd type string
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-15 11:29:26 +01:00
Sascha Hauer
ca6aceb807 mtd: mtdpart: Add oob_read function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-15 11:29:26 +01:00
Sascha Hauer
40ee3002bb mtd: nand: Add option to print bbt in nand command
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-15 08:56:53 +01:00
Sascha Hauer
172af2a30c mtd: Add support for marking blocks as good
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-15 08:56:53 +01:00
Sascha Hauer
a0fa6e1d2b Merge branch 'for-next/squashfs' 2016-03-11 10:49:50 +01:00
Sascha Hauer
251ae23e9f Merge branch 'for-next/mtd' 2016-03-11 10:49:50 +01:00
Sascha Hauer
034d4ddcb6 Merge branch 'for-next/misc' 2016-03-11 10:49:50 +01:00
Sascha Hauer
7991fe1b8e Merge branch 'for-next/mips' 2016-03-11 10:49:49 +01:00
Sascha Hauer
d59330da2c Merge branch 'for-next/input' 2016-03-11 10:49:49 +01:00
Sascha Hauer
66037e9ed9 Merge branch 'for-next/imx' 2016-03-11 10:49:49 +01:00
Sascha Hauer
fbd757cb7f Merge branch 'for-next/hab' 2016-03-11 10:49:49 +01:00
Sascha Hauer
bdb6edc067 Merge branch 'for-next/dts' 2016-03-11 10:49:49 +01:00
Sascha Hauer
690ec1804c Merge branch 'for-next/driver' 2016-03-11 10:49:48 +01:00
Sascha Hauer
d69ea86d79 Merge branch 'for-next/doc' 2016-03-11 10:49:43 +01:00
Sascha Hauer
09c1f8244d Merge branch 'for-next/crypto' 2016-03-11 10:49:35 +01:00
Sascha Hauer
c41f840f4b Merge branch 'for-next/caam' 2016-03-11 10:49:35 +01:00
Sascha Hauer
330dc0a6b7 Merge branch 'for-next/bbu' 2016-03-11 10:49:35 +01:00
Sascha Hauer
aaad4dad23 Merge branch 'for-next/arm' 2016-03-11 10:49:34 +01:00
Sascha Hauer
e809777b95 Merge branch 'for-next/am335x' 2016-03-11 10:49:34 +01:00
Markus Pargmann
0240fd3f84 fastboot: Add a ARM Barebox filetype handler
This will automatically call barebox_update for the transfered file if
it is an ARM Barebox image and the destination file is defined by some
update handler.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-11 08:06:05 +01:00
Sascha Hauer
1d8493e63b Release v2016.03.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-10 10:50:39 +01:00
Sascha Hauer
0ee69c9501 USB: imx-usb-phy: Fix uninitialized use of variable
ret may no be initialized in the error path when clk_get fails. Fix it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-10 10:38:52 +01:00
Aleksey Kuleshov
092479d7da ehci-hcd: preserve DTC in QH for interrupt transactions
In Linux ehci-q Data Toggle Control bit for interrupt transactions
is preserved in Queue Head (EHCI 3.6.2). So don't set 14's bit in
qh_endpt1 and don't manage toggle bit anywhere in int transactions.

This fixes an idle issue for USB keyboards, where keys
were physically changed but barebox haven't seen them in polling
until the next USB keyboard polling occurs.

Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-10 10:01:09 +01:00
Aleksey Kuleshov
9b6fd6edf1 ehci-hcd: remove useless timeout
This is just a regular iteration loop so no timeout needed

Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-10 10:00:24 +01:00
Aleksey Kuleshov
504c511e4a usb_kbd: lock is useless since pollers are atomic
Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-10 10:00:01 +01:00
Aleksey Kuleshov
b73e1479d6 usb_kbd: use async polling instead of regular polling
This fixes the overpolling of USB keyboard which
causes slowdown of entier barebox by using periodic
polling occuting once per some milliseconds.

Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-10 10:00:01 +01:00