2015-09-01 |
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>
Sascha Hauer
committed
on 1 Sep 2015
|
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>
Sascha Hauer
committed
on 1 Sep 2015
|
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>
Sascha Hauer
committed
on 1 Sep 2015
|
2015-08-31 |
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>
Sascha Hauer
committed
on 31 Aug 2015
|
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>
Sascha Hauer
committed
on 31 Aug 2015
|
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>
Sascha Hauer
committed
on 31 Aug 2015
|
2015-08-28 |
commands: ubiformat: Document -y option
...
This was missing in the help text.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 28 Aug 2015
|
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>
Sascha Hauer
committed
on 28 Aug 2015
|
watchdog: Fix static inline ops
...
...by actually making them static inline.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 28 Aug 2015
|
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>
Sascha Hauer
committed
on 28 Aug 2015
|
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>
Lucas Stach
authored
on 27 Aug 2015
Sascha Hauer
committed
on 28 Aug 2015
|
reset-source: Add some debugging aids
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 28 Aug 2015
|
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>
Juergen Borleis
authored
on 25 Jun 2015
Sascha Hauer
committed
on 28 Aug 2015
|
mfd: da9063: add da9063 watchdog and system restart driver
...
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Philipp Zabel
authored
on 11 Jun 2015
Sascha Hauer
committed
on 28 Aug 2015
|
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>
Sascha Hauer
committed
on 28 Aug 2015
|
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>
Sascha Hauer
committed
on 28 Aug 2015
|
login: check return value of digest_alloc
...
digest_alloc can fail, check the return value.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 28 Aug 2015
|
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>
Sascha Hauer
committed
on 28 Aug 2015
|
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>
Sascha Hauer
committed
on 28 Aug 2015
|
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>
Sascha Hauer
committed
on 28 Aug 2015
|
2015-08-27 |
reset-source: Use globalvar_add_simple_enum
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 27 Aug 2015
|
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>
Sascha Hauer
committed
on 27 Aug 2015
|
watchdog: Allow multiple watchdogs
...
Put watchdogs on a list to allow multiple watchdogs. Add a priority
field to be able to pick the highest priority watchdog.
This patch also provides a of_get_watchdog_priority() function to
allow configuring the watchdog priority from the device tree.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 27 Aug 2015
|
restart: replace reset_cpu with registered restart handlers
...
This replaces the reset_cpu() function which every SoC or board must
provide with registered handlers. This makes it possible to have multiple
reset functions for boards which have multiple ways to reset the machine.
Also boards which have no way at all to reset the machine no longer
have to provide a dummy reset_cpu() function.
The problem this solves is that some machines have external PMICs or
similar to reset the system which have to be preferred over the
internal SoC reset, because the PMIC can reset not only the SoC but also
the external devices.
To pick the right way to reset a machine each handler has a priority. The
default priority is 100 and all currently existing restart handlers are
registered with this priority. of_get_restart_priority() allows to retrieve
the priority from the device tree which makes it possible for boards to
give certain restart handlers a higher priority in order to use this one
instead of the default one.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 27 Aug 2015
|
2015-08-26 |
mtd: m25p80: make it possible to use large blocks if desired
...
Some SPI NOR flashes support 4K erase blocks. 4K erase blocks do not
work with UBIFS which needs a minimum erase block size of 15360 bytes.
Also bigger sectors are faster to erase. This patch adds a device tree
option to use the bigger blocks instead of the default 4K blocks.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Sascha Hauer
committed
on 26 Aug 2015
|
ARM: pfla02: Add notice about the used environment partition
...
Also, use the barebox partition on mmc2.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Philipp Zabel
authored
on 31 Aug 2013
Sascha Hauer
committed
on 26 Aug 2015
|
ARM: pfla02: Add module revison detection
...
The pin SD4_DAT4 until SD4_DAT7 are used as revison control.
The pins will be internally pulled up so we read a 1111 for revison 1.
For revison two the first pin (bit) is pulled down (see schematic pfla-02
page 4 "SDIO, NAND-Flash".
On Module rev 1 the pins are connected to the NAND but we have only 8bit NAND
also the i.MX6 only can handle 8bit NAND flashs.
Revisions:
Rev 1: 0xF
Rev 2: 0xE
.
.
.
Rev 15: 0x1
Rev 16: 0x0
Signed-off-by: Christian Hemp <c.hemp@phytec.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Christian Hemp
authored
on 4 Oct 2013
Sascha Hauer
committed
on 26 Aug 2015
|
usb: ehci: prevent bad PORTSC register access
...
1. The 'index' of ehci_submit_root() is not always > 0.
e.g.
While it gets invoked from usb_get_descriptor(),
the 'index' is always a '0'. (See ch.9 of USB2.0)
2. The PORTSC register is not always required, and thus it
should only report a port error when necessary.
It would cause a port scan failure if the ehci_submit_root()
always gets terminated by a port error.
Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com>
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Kuo-Jung Su
authored
on 25 Aug 2015
Sascha Hauer
committed
on 26 Aug 2015
|
usb: ehci: replace multiple use of le16_to_cpu(req->index) with variable
...
This is part of U-Boot commit:
7d9aa8f usb: Add new command to set USB 2.0 port test modes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Kuo-Jung Su
authored
on 25 Aug 2015
Sascha Hauer
committed
on 26 Aug 2015
|
usb: ehci-hcd: initialize ehci->qh_list[] with zeros
...
Without this initialization ehci->qh_list[0].qh_endpt2 is left uninitialized,
which causes problems with some EHCI host controllers.
Das u-boot uses the same strategy:
static int ehci_common_init(struct ehci_ctrl *ctrl, uint tweaks)
{
...
qh_list = &ctrl->qh_list;
/* Set head of reclaim list */
memset(qh_list, 0, sizeof(*qh_list));
qh_list->qh_link = cpu_to_hc32((unsigned long)qh_list | QH_LINK_TYPE_QH);
qh_list->qh_endpt1 = cpu_to_hc32(QH_ENDPT1_H(1) |
QH_ENDPT1_EPS(USB_SPEED_HIGH));
qh_list->qh_overlay.qt_next = cpu_to_hc32(QT_NEXT_TERMINATE);
qh_list->qh_overlay.qt_altnext = cpu_to_hc32(QT_NEXT_TERMINATE);
qh_list->qh_overlay.qt_token =
cpu_to_hc32(QT_TOKEN_STATUS(QT_TOKEN_STATUS_HALTED));
...
}
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Peter Mamonov
authored
on 25 Aug 2015
Sascha Hauer
committed
on 26 Aug 2015
|