9
0
Fork 0
Commit Graph

14385 Commits

Author SHA1 Message Date
Sascha Hauer 940e04d181 ARM: pbl-multi: Fix SDRAM at end of address space
When SDRAM reaches to the end of the address space the comparison
membase + memsize evaluates to 0, so pc - membase < memsize can never
be true. Fix this by substracting membase on both sides of the
comparison.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-04-01 11:40:32 +02:00
Sascha Hauer 7f73e64e8b imd: Add function to read parameters
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-04-01 10:38:55 +02:00
Sascha Hauer b8837986a0 imd: export functions
To make the image metadata API usable for external users export
some functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-04-01 10:38:55 +02:00
Sascha Hauer 439d683051 imd: rename imd_search_validate to imd_get
The name is more suitable for what the function does. Also let the
function return a pointer to the imd data found in the buffer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-04-01 10:38:55 +02:00
Sascha Hauer 82d40a6214 scripts: Add scripts/include/ to include path for target programs
Programs compiled for the target need -I $(srctree)/scripts/include/ to
be able to include for example linux/err.h.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-04-01 10:38:54 +02:00
Sascha Hauer 31f63c9749 imd: string returned from imd_string_data should be const
imd_string_data() returns the original data, so the string should be
const.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-04-01 10:38:54 +02:00
Sascha Hauer 02f826830f mtd: doc3: Fix wrong format specifier
Fixes: 1e009bf mtd: Make erase_info structs 64bit where necessary

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-30 07:53:50 +02:00
Sascha Hauer 76d42c5115 commands: nandtest: Fix wrong format specifier
Fixes: 1e009bf mtd: Make erase_info structs 64bit where necessary

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-30 07:52:30 +02:00
Sascha Hauer 5e335773e0 imd: use struct imd_header * as argument
imd_concat_strings() and imd_string_data() are easier to handle when
they take a struct imd_header * instead of a struct imd_entry_string *.
Change this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-29 10:07:45 +02:00
Alexander Stein 3d32c620f6 ARM i.MX35: Read reset source from CCM
CCM has reset status bits with more detailed information than the
watchdog. Set reset source with higher priority.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-29 09:07:14 +02:00
Sascha Hauer 2ec908609f mtd: nand-imx: fix raw read/write
raw read/write was not possible because we enabled the ECC engine
during driver initialization. To support raw mode we have to disable
the ECC engine dynamically when needed. This has to be done before
the send_page function is called. The places where we have to disable
the ECC engine are not available in the driver, but are buried in the
Nand layer. To make them available we have to implement driver specific
write/read_page functions in which we configure the ECC mode.
This also makes the driver better readable as it makes the detour around
the driver internal data buffer when reading/writing pages unnecessary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-03-17 12:06:48 +01:00
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