9
0
Fork 0
Commit Graph

14674 Commits

Author SHA1 Message Date
iw3gtf@arcor.de 87c6a88f2a video/backlight-pwm: fix the value of 'brightness_max'.
The field pwm_backlight->backlight.brightness_max should be the maximum
allowed brightness value for the backlight, not the max index of the
array 'pwm_backlight->levels[]'.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-15 08:07:14 +02:00
iw3gtf@arcor.de c27b1a93ce video/backlight-pwm: fixed a loop index going out of range.
In the function pwm_backlight_parse_dt() the last iteration of the for
loop accessed memory past the end of the array 'pwm_backlight->levels[]'
because of a wrong test ( '<=' instead of '<').

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-15 08:07:14 +02:00
Sascha Hauer 7be6d29724 Revert "mci: imx-esdhc: Remove excess function"
This reverts commit 8a6896971d.

With this patch it's no longer possible to call detect on the
physical device which is necessary for example to make environment
on MMC work. Unlike the commit message for 8a6896971d claims
mci_detect_card() is not called from mci_register().

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-14 14:37:51 +02:00
Sascha Hauer ca95c2bab9 Merge branch 'for-next/video' 2016-07-11 07:58:34 +02:00
Sascha Hauer 50543054eb Merge branch 'for-next/ubi' 2016-07-11 07:58:34 +02:00
Sascha Hauer e77acea709 Merge branch 'for-next/state' 2016-07-11 07:58:34 +02:00
Sascha Hauer 4daa7a20c9 Merge branch 'for-next/omap' 2016-07-11 07:58:34 +02:00
Sascha Hauer 202cda9475 Merge branch 'for-next/nvdevvars' 2016-07-11 07:58:34 +02:00
Sascha Hauer bb73cb9427 Merge branch 'for-next/mtd' 2016-07-11 07:58:33 +02:00
Sascha Hauer f64075972b Merge branch 'for-next/misc' 2016-07-11 07:58:33 +02:00
Sascha Hauer e54183d6d4 Merge branch 'for-next/mips' 2016-07-11 07:58:33 +02:00
Sascha Hauer e2da792a52 Merge branch 'for-next/imx' 2016-07-11 07:58:33 +02:00
Sascha Hauer 1f3959944e Merge branch 'for-next/dts' 2016-07-11 07:58:32 +02:00
Sascha Hauer 3203cdfa7b Merge branch 'for-next/arm64' 2016-07-11 07:58:32 +02:00
Sascha Hauer 28d7f7878c Merge branch 'for-next/arm' 2016-07-11 07:58:32 +02:00
Sascha Hauer 4a0041b48d Release v2016.07.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-11 07:55:17 +02:00
Alexander Kurz 4f0abb8db0 ARM i.MX35: Add support for the Amazon Kindle3
The Amazon Model No. D00901 Kindle3 is an E-Book reader based on the
i.MX35 SOC. The device boots in internal boot mode from a build-in eMMC,
alternatively the device may be set into USB-downloader mode when the
Vol+ key is pressed on startup.

Add support for this device and make barebox a drop-in replacement for
the factory shipped u-boot image.
Constraints for the use as drop-in replacement:
- imximg header (offset 0x400) has a maximum size of 2kB minus 16 byte
  since the last 16 bytes are used to store a vendor specific hardware
  desctription identifier
- the bootloader space (application plus env) is limited to 256kB minus
  16 bytes when installed with offset of 4kB (the u-boot offset was 3kB).
  A vendor specific device identifier is stored in the gap between
  application and kernel. The vendor specific identifiers should not
  be overwritten.

Notable features:
- Support for eMMC, USB, UART, I2C, SPI and Keys (except keyboard)
- Full support for vendor specific ATAGs
- usbserial barebox console access by pressing Select button at startup,
  alternatively full console support on connector J14.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-11 07:51:44 +02:00
Uwe Kleine-König a157195b73 ARM: imx_defconfig: enable NAND_IMX_BBM and NAND_ALLOW_ERASE_BAD
The first is important for imx systems with NAND. The second is a useful
debug aid that doesn't change behaviour without being explicitly enabled
at runtime. So both should be safe.

The other changes result from MFD_MC13XXX and SPI_IMX being selected by
MACH_PCM038 since 4bd07a1039 ("arm: imx: select MFD_MC13XXX for all
boards that need it") and a move of a few Kconfig definitions in
7839011f61 ("bootm: Move bootm options to common/Kconfig").

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-11 07:49:23 +02:00
Uwe Kleine-König 034c16f54e mtd: nand: imx-bbm: use raw reading when checking for factory BBM
This is necessary to prevent the imx_nand_bbm command to bail out
on ECC errors which leaves the device without BBT.

Also simplify buffer management: Use on-stack buffer instead of malloc.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-11 07:48:42 +02:00
Michael Grzeschik e703d1ed73 state: also append backend storage stridesize
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-08 08:59:31 +02:00
Markus Pargmann 46f26c0dee docs: Add/Update state documentation
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-08 08:59:31 +02:00
Markus Pargmann c999b507da state: Refactor state framework
The state framework grew organically over the time. Unfortunately the
architecture and abstractions disappeared during this period.

This patch refactors the framework to recreate the abstractions. The
main focus was the backend with its storage. The main use-case was to
offer better NAND support with less erase cycles and interchangeable
data formats (dtb,raw).

The general architecture now has a backend which consists of a data
format and storage. The storage consists of multiple storage buckets
each holding exactly one copy of the state data. A data format describes
a data serialization for the state framework. This can be either dtb or
raw. A storage bucket is a storage location which is used to store any
data. There is a (new) circular type which writes changes behind the
last written data and therefore reduces the number of erases. The other
type is a direct bucket which writes directly to a storage offset for
all non-erase storage.

Furthermore this patch splits up all classes into different files in a
subdirectory.

This is currently all in one patch as I can't see a good way to split
the changes up without having a non-working state framework in between.

The following diagram shows the new architecture roughly:

           .----------.
           |  state   |
           '----------'
                 |
                 |
                 v
  .----------------------------.
  |       state_backend        |
  |----------------------------|
  | + state_load(*state);      |
  | + state_save(*state);      |
  | + state_backend_init(...); |
  |                            |
  |                            |
  '----------------------------'
    |            |                   The format describes
    |            |                   how the state data
    |            '------------->     is serialized
    |   .--------------------------------------------.
    |   |      state_backend_format <INTERFACE>      |
    |   |--------------------------------------------|
    |   | + verify(*format, magic, *buf, len);       |
    |   | + pack(*format, *state, **buf, len);       |
    |   | + unpack(*format, *state, *buf, len);      |
    |   | + get_packed_len(*format, *state);         |
    |   | + free(*format);                           |
    |   '--------------------------------------------'
    |              ^                      ^
    |              *                      *
    |              *                      *
    |   .--------------------. .--------------------.
    |   | backend_format_dtb | | backend_format_raw |
    |   '--------------------' '--------------------'
    |
    |
    |
    v
.----------------------------------------------------------.
|                  state_backend_storage                   |
|----------------------------------------------------------|
| + init(...);                                             |
| + free(*storage);                                        |
| + read(*storage, *format, magic, **buf, *len, len_hint); |
| + write(*storage, *buf, len);                            |
| + restore_consistency(*storage, *buf, len);              |
'----------------------------------------------------------'
                              |
     The backend storage is responsible to manage multiple
     data copies and distribute them onto several buckets.
     Read data is verified against the given format to
     ensure that the read data is correct.
                              |
                              |
                              |
                              |
                              |
                              v
        .------------------------------------------.
        | state_backend_storage_bucket <INTERFACE> |
        |------------------------------------------|
        | + init(*bucket);                         |
        | + write(*bucket, *buf, len);             |
        | + read(*bucket, **buf, len_hint);        |
        | + free(*bucket);                         |
        '------------------------------------------'
                      ^     ^      ^
                     *      *       *
                    *       *        *
 A storage bucket represents*exactly one data copy at one
 data location. A circular b*cket writes any new data to
 the end of the bucket (for *educed erases on NAND). A
 direct bucket directly writ*s at one location.
               *            *             *
              *             *              *
             *              *               *
 .-----------------------.  *  .-------------------------.
 | backend_bucket_direct |  *  | backend_bucket_circular |
 '-----------------------'  *  '-------------------------'
             ^              *               ^
             |              *               |
             |              *               |
             |              *               |
             |  .-----------------------.   |
             '--| backend_bucket_cached |---'
                '-----------------------'
             A backend_bucket_cached is a transparent
             bucket that directly uses another bucket
             as backend device and caches all accesses.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-08 08:59:31 +02:00
Markus Pargmann 3d33f178cc libfile: Change write_full to be have const buf
write() uses a const pointer so write_full should do the same.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-08 08:59:31 +02:00
Alexander Shiyan 9d7abf2792 mfd: mc13xxx: VGEN1 and VGEN2 voltage bits positioned in "Regulator Setting 0" register
The bits VGEN10-11 and VGEN20-22 is positioned in the Regulator Setting 0
register. This patch fixes these definitions and board (Efika MX), which
uses this voltages.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:48:58 +02:00
Lucas Stach 01cbfdfb3f ubifs: check return pointer properly
ubifs_iget() returns error codes encoded in the pointer,
so the NULL check will never be true.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:45:35 +02:00
Lucas Stach b06ecabed9 ARM: i.MX: iim: fix potential out of bounds array access
The check is off-by-one.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:44:46 +02:00
Lucas Stach 435ec2679e commands: menu: check return pointer properly
The called functions return error codes encoded in the pointer,
so the NULL check will never be true.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:44:32 +02:00
Lucas Stach 6974c69d06 compiler: avoid redefining symbols when running with checker
Avoid redefining __user and __kernel if running with a checker
enabled.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:44:11 +02:00
Lucas Stach 5455354846 clk: fix misleading indenting
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:36:49 +02:00
Lucas Stach aab6861314 imx-bbu-nand-fcb: avoid double free of dbbt_entries
The error path properly frees them already.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:36:31 +02:00
Lucas Stach ff06cdf26d imx-bbu-nand-fcb: don't drop error return code
bit_to_flip might be negative if any uncorrectable bitflips
occured. Use int instead of unsigned type in order to properly
propagate the error.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:36:31 +02:00
Lucas Stach 81a54afd22 USB: gadget: composite: avoid possible NULL ptr dereference
Check if g is valid before trying to dereference it.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:35:53 +02:00
Antony Pavlov ad30a80ddb MIPS: csrc-r4k: get cp0 counter rate from devicetree
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:29:54 +02:00
Antony Pavlov adce981d24 of: base: import of_get_cpu_node() from linux-v4.7-rc2
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:29:54 +02:00
Ronald Zachariah 3dc604d636 fs: ext4: fix symlink read function
From U-Boot commit:

| commit 37f23885e4905ff500a8524328aa3084ac11cdb4
| Author: Ronald Zachariah <rozachar@cisco.com>
| Date:   Thu Apr 28 07:08:34 2016 +0200
|
|     fs: ext4: fix symlink read function
|
|     The function ext4fs_read_symlink was unable to handle a symlink
|     which had target name of exactly 60 characters.
|
|     Signed-off-by: Ronald Zachariah <rozachar@cisco.com>
|     Signed-off-by: Stefan Roese <sr@denx.de>
|     Reviewed-by: Stephen Warren <swarren@nvidia.com>
|     Cc: Tom Rini <trini@konsulko.com>

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:18:28 +02:00
Enrico Jorns 90326eba5a vsprintf: fix handling of strp arg in asprintf
strp argument was ignored but should be forwarded to vasprintf() call in
order to make this funktion work as expected.

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:16:41 +02:00
Sascha Hauer 8c8b38efbb ARM: i.MX: karo-tx6: Add support for the 512MiB i.MX6s variant
This adds support for the TX6S-8x35 board variant.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 16:27:20 +02:00
Sascha Hauer ecc8f4e63a dts: update to v4.7-rc4
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 16:26:11 +02:00
Sascha Hauer 56442fa7b8 dts: update to v4.7-rc3
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 16:26:05 +02:00
Raphael Poggi b7d0c04c86 Documentation: add aarch64-qemu-virt board doc.
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:50 +02:00
Raphael Poggi 940511012a uimage: add define for ARM64 architecture
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:50 +02:00
Raphael Poggi 10bf671754 arm: include: swab: use rigth assembly for armv8
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:50 +02:00
Raphael Poggi ac04e93326 arm: boards: add mach-qemu and virt64 board
Introduce mach-qemu and add qemu virt64 board which emulates arm64 board.

Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:49 +02:00
Raphael Poggi 7cc98fbb61 arm: cpu: add basic arm64 mmu support
This commit adds basic mmu support, ie:
        - DMA cache handling is not supported
        - Remapping memory region also

The current mmu setting is:
        - 4KB granularity
        - 3 level lookup (skipping L0)
        - 33 bits per VA

This is based on coreboot and u-boot mmu configuration.

Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:49 +02:00
Raphael Poggi ada79ea079 arm: cpu: disable code portion in armv8 case
Enclosed by #if directive OMAP specific code
and mmu_disable (ARMv8 code will implemented it somewhere else).

Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:49 +02:00
Raphael Poggi 9159f08ae7 arm: cpu: cpuinfo: add armv8 support
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:49 +02:00
Raphael Poggi c606a266b7 arm: include: system_info: add armv8 identification
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:49 +02:00
Raphael Poggi 9ff1fbde76 arm: include: bitops: arm64 use generic __fls
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:49 +02:00
Raphael Poggi a5501914e6 arm: include: system: add arm64 helper functions
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:49 +02:00
Raphael Poggi 928cc6f4ee arm: cpu: add arm64 specific code
This patch adds arm64 specific codes, which are:
	- exception support
	- cache support
	- rework Makefile to support arm64

Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:48 +02:00