Commit graph

13407 commits

Author SHA1 Message Date
Antony Pavlov
e40e6e479c MIPS: ath79: use gpiolib
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-23 10:28:03 +02:00
Antony Pavlov
495f0034b7 MIPS: refactor SBL start.S code
This commit removes code duplication by using
MIPS PBL macros in the SBL start.S file.

One of the side effects of this patch is that
the only <asm/pbl_macros.h> header file is depends
on the <generated/utsrelease.h> header file.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-23 10:26:37 +02:00
Antony Pavlov
35a0f20255 MIPS: PBL: Add missing pieces for xz compressed PBL image
Also ignore piggy.shipped binary (CONFIG_IMAGE_COMPRESSION_NONE=y).

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-21 08:21:50 +02:00
Antony Pavlov
072a4af454 MIPS: mach-ath79: make ar71xx_regs.h assembler-tolerant
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-21 08:21:49 +02:00
Uwe Kleine-König
36152c5aa5 video: imx: assert that image buffer doesn't cross a 4 MiB boundary
The reference manual (for the i.MX25 in my case) states:

	This field must start at a location that enables a complete
	picture to be stored in a 4 Mbyte memory boundary (A [21:0]). A
	[31:22] has a fixed value for a picture’s image.

Check this condition for user-supplied framebuffer values and enforce it
for driver-allocated buffers.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-21 08:08:09 +02:00
Lucas Stach
342891feed passwd: avoid NULL ptr usage
Fixes
common/password.c: In function 'check_passwd':
common/password.c:292:4: warning: reading through null pointer (argument 3)
    pr_err("No such digest: %s\n", PASSWD_SUM);

if no algo is enabled in which case PASSWD_SUM is defined to NULL.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-14 07:59:11 +02:00
Lucas Stach
15c41beb5b ARM: add implementation for dma_alloc_writecombine for !CONFIG_MMU
This fixes build failures in builds without MMU support by providing
a fallback implementation.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-14 07:59:11 +02:00
Lucas Stach
b654946ebc net: e1000: correct function signature of set_ethaddr
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-09 08:44:52 +02:00
Sascha Hauer
bf62a6e2d8 of_fix_tree: Print error message
When a of_fixup handler fails add a meaningful error message so
that the user gets a clue what might have gone wrong.

Suggested-by: Enrico Joerns <ejo@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-08 15:48:44 +02:00
Lucas Stach
200ba6cdee reset-source: add stub for of_get_reset_source_priority
Allow drivers to build even if reset source support isn't built in.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-04 08:02:18 +02:00
Lucas Stach
e38c778b9a wd: add stub for of_get_watchdog_priority
Allow drivers to build even if WD core isn't enabled.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-04 08:02:18 +02:00
Lucas Stach
6e5b9b5ffd mfd: da9053: remove references to nonexistent cdev member
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-04 08:02:18 +02:00
Peter Mamonov
2b016bf078 ata: ide-sff: fix integer overflow in ata_wait_ready()
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-04 07:38:57 +02:00
Sascha Hauer
069031f8ce Merge branch 'for-next/usb' 2015-09-01 09:43:55 +02:00
Sascha Hauer
f4f0bc9091 Merge branch 'for-next/socfpga' 2015-09-01 09:43:55 +02:00
Sascha Hauer
67e0a30e77 Merge branch 'for-next/restart' 2015-09-01 09:43:55 +02:00
Sascha Hauer
b7ab2081b1 Merge branch 'for-next/param' 2015-09-01 09:43:55 +02:00
Sascha Hauer
e582374ce3 Merge branch 'for-next/of_path' 2015-09-01 09:43:54 +02:00
Sascha Hauer
60fc3e99b5 Merge branch 'for-next/mtd' 2015-09-01 09:43:54 +02:00
Sascha Hauer
69dccb494a Merge branch 'for-next/misc' 2015-09-01 09:43:54 +02:00
Sascha Hauer
049fb66d21 Merge branch 'for-next/login' 2015-09-01 09:43:54 +02:00
Sascha Hauer
feeb128788 Merge branch 'for-next/imx' 2015-09-01 09:43:54 +02:00
Sascha Hauer
fae6eea0e6 Merge branch 'for-next/gpio' 2015-09-01 09:43:53 +02:00
Sascha Hauer
f387bc96bb Merge branch 'for-next/fb-imx-ipu-v3' 2015-09-01 09:43:53 +02:00
Sascha Hauer
b6b7203aca Merge branch 'for-next/fb' 2015-09-01 09:43:53 +02:00
Sascha Hauer
2df4ac1f8d Merge branch 'for-next/arm-l2x0' 2015-09-01 09:43:53 +02:00
Sascha Hauer
60e8d75715 Release v2015.09.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-01 09:17:52 +02:00
Sascha Hauer
2b53005fe1 ARM: do not ignore data aborts initially
arm_ignore_data_abort can be set to nonzero to ignore data aborts. The
default should be not to ignore data aborts. Fix this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-01 09:12:03 +02:00
Sascha Hauer
1a17643433 ARM: dts: directly point to partitions in the barebox,environment binding
We can now directly point to the partitions in the barebox,environment
binding. Convert some boards over to it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-01 08:14:29 +02:00
Sascha Hauer
35eb06510b of_path: Allow pointing directly to the partition
We could only point to partitions in the device tree by using
&norflash, "partname:barebox-environment". Allow to point to the
partition directly without having to parse the partition labels.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-01 08:07:04 +02:00
Sascha Hauer
3f68a7698d cdev: Add function to find cdev by device_node
This adds a device_node member to struct cdev and a function
to find a cdev by device_node.
This also removes the setting of cdev->dev->device_node in
the of partition parser. We must not set the device since it
may not refer to a partition but to a whole device with partitions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-01 07:43:16 +02:00
Sascha Hauer
746a5530be spi: i.MX: optimize transfers for ECSPI v2.3
Instead of writing one word to the txfifo and then wait until
one is received in the rxfifo we can write until the txfifos
are not full and read as long the rxfifos contain data. This
makes transfers for the m25p80 driver around 7 times faster
here.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-31 17:12:38 +02:00
Sascha Hauer
ff5660c2bb spi: i.MX: create SoC specific transfer functions
There are SoC specific ways to optimize transfers. Make the way free
to implement these by creating SoC specific transfer functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-31 17:12:33 +02:00
Sascha Hauer
cd4df8f82b spi: i.MX: use start mode control bit
The i.MX SPI controller in version 2.3 can immediately start a transfer
when the txfifo is written to. In this mode we no longer have to trigger
the transfer with the xch bit which makes the code a bit simpler.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-31 17:12:28 +02:00
Sascha Hauer
dfd536eb32 commands: ubiformat: Document -y option
This was missing in the help text.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-28 12:04:41 +02:00
Sascha Hauer
fe36276112 boot command: Allow to enable watchdog
Enabling the watchdog before booting the kernel is a common usecase.
Add an option to the boot command and also add a global variable for
it to make it configurable easily.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-28 12:04:41 +02:00
Sascha Hauer
aba382e7af watchdog: Fix static inline ops
...by actually making them static inline.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-28 12:04:40 +02:00
Sascha Hauer
311f02fbe4 mtd: spi-nor: mostly drop lock/unlock code
The lock/unlock code is broken beyond repair.

First of all the algorithm doesn't work properly. SPI NOR flashes
can only protect a certain amount of blocks from the end of the device
which is incompatible to the protect(start,len) API we have. The
algorithm tries to be clever by doing protection only when it does
not protect unrelated blocks and unprotection only when it does not
unprotect unrelated blocks. This breaks for example when some code
protects the last blocks (which may contain the bootloader), then
protects the blocks before the last ones (which may contain the
environment). Then if we try to overwrite the bootloader this won't
work since it would unprotect the environment aswell, so the driver
will not unprotect anything resulting in a failed erase/write later.

Then the protection behaviour is different between different flashes.
Some have three protection bits, some have four. For some the smallest
protection are is 1/16 of the device, others have 1/256 or 1/64. Some
have a bit which selects the lower area instead of upper area for
protection. The position of this bit differs on different flashes.

This patch removes the lock code completely and always unprotects
the whole device. This way we can unprotect a device for writing to
it and never protect it again.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-28 11:11:46 +02:00
Lucas Stach
89ca3fcaad ARM: imx53: vincell: guard board initcall
Make sure that the initcall only executes on the expected board.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-28 08:59:22 +02:00
Sascha Hauer
ce36b4a05e reset-source: Add some debugging aids
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-28 08:35:51 +02:00
Juergen Borleis
87af8d8dd4 mfd: da9053: add da9053 watchdog and system restart driver
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-28 08:35:51 +02:00
Philipp Zabel
96786e4dad mfd: da9063: add da9063 watchdog and system restart driver
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2015-08-28 08:35:51 +02:00
Sascha Hauer
460cc82191 login: explain PASSWORD_DEFAULT option
This option looks like it takes the default password, but instead
it takes a filename of a file which contains the password encoded
with the selected password digest.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-28 08:00:30 +02:00
Sascha Hauer
2b5bdb47cf crypto: fix selecting of digests
SHA1 is meant as a boolean option which is true when sha1 support is available.
This works because the providers (DIGEST_SHA1_GENERIC and DIGEST_SHA1_ARM) have
a 'select SHA1'. However, consumers like the sha1sum command do a 'select SHA1'
to enable SHA1 support. This of course does not work; selecting SHA1 will not
select any of the SHA1 providers.

This is broken for all digest consumers. We have to explicitly select a digest
provider, that is DIGEST_*_GENERIC to enable the corresponding digest.

This means now we will always have the generic digest in the binary, even
when an optimized one is enabled. There is no sane way in Kconfig to
"select provider for feature xy", so let's live with the overhead in the binary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-28 08:00:30 +02:00
Sascha Hauer
3e361f3764 login: check return value of digest_alloc
digest_alloc can fail, check the return value.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-28 08:00:30 +02:00
Sascha Hauer
40596b856f login: cleanup password code
- make some locally used functions static
- remove read_passwd which is unused
- some refactoring to make code pathes clearer

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-28 08:00:30 +02:00
Sascha Hauer
90e766a78f login: rework login mechanism
We used to have the login functionality in the /env/bin/init script.
This is hard to review and it's too easy to break the login functionality
with changes to this script. Move the places to ask for a password to
C code where we have only a few places where we have to ask for a password.
Mainly these are run_shell() and the menutree command.

This patch introduces a login() function which will only return if the correct
password has been entered. Following calls will return immediately without
asking for a password again.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-28 08:00:27 +02:00
Sascha Hauer
4a7534bf07 reset-source: Allow different priorities
Different devices may report the reset source with different levels
of certainty. For example a SoC may see a power-on reset, but this
may only be because an external PMIC has power cycled the SoC. This
means the PMIC knows the real reason better and thus the reset reason
from the PMIC should be preferred.

This patch introduces priorities for the reset_source to handle the
above scenario. Also add a of_get_reset_source_priority() function
to retrieve the desired priority from the device tree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-28 07:18:14 +02:00
Sascha Hauer
ff2a4a0a13 reset-source: Use globalvar_add_simple_enum
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-27 21:37:07 +02:00
Sascha Hauer
62fe28cf0b watchdog: Give watchdogs a name
This adds a dev and name member to struct watchdog which helps distinguishing
between different watchdogs. Also add some debugging aids.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-08-27 21:37:07 +02:00