9
0
Fork 0
Commit Graph

3685 Commits

Author SHA1 Message Date
Sascha Hauer e5374fa4d4 Merge branch 'for-next/squashfs' 2016-11-14 12:35:50 +01:00
Sascha Hauer f772aa92c2 Merge branch 'for-next/misc' 2016-11-14 12:35:49 +01:00
Sascha Hauer 6b00efcb0f Merge branch 'for-next/imx' 2016-11-14 12:35:47 +01:00
Andrey Smirnov a4e1f15b6b pinctrl: Add provisions to control GPIO pin direction
Some SoC (of which Vybrid is a one example) relegate GPIO direction
control to their pinmux IP block, instead of having that functionality
within GPIO IP. Add provisions to control that aspect of pinmux to
support such SoCs.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-11-14 08:57:57 +01:00
Andrey Smirnov 3dc136ef87 i.MX: Add DEBUG_LL hooks for VF610
Add code to support DEBUG_LL functionality on VF610/Vybrid platform.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-11-11 08:57:25 +01:00
Sascha Hauer ee69c58841 clk: add clock command completion
This adds tab completion for the clk_* commands.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-11-08 18:34:23 +01:00
Sascha Hauer 36be2505d6 serial: i.MX uart: Allow DTE mode in lowlevel code
Some consoles must be configured for DTE mode. Allow to set this
in lowlevel code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-11-08 13:11:45 +01:00
Antony Pavlov e6876cde69 command.h: drop unused Struct_Section attribute
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-11-08 08:54:52 +01:00
Alexander Kurz a3390e16ed mfd: mc13892: more descriptive charger register defines
Make access to the mc13892 charger parameter voltage, current and max power
dissipation readable in terms of millivolts, milliamps and milliwatts.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-11-07 08:54:31 +01:00
Enrico Jorns 9bcbb51263 Add filetype and detection for squashfs images
This adds `filetype_squashfs` to the list of known filetypes and adds a
detection for squashfs files to file_detect_type(). This currently
matches on the `hsqs` start sequence of an image file.

Additionally, the newly introduced filetype is registered as the type of
the squashfs_driver which allows, for example, to mount squashfs without
the need to specify a type parameter.

This changes enable booting a squashfs with the simple `boot` command
pointing to the location (device) that holds the squashfs.

Note that booting with blspec is limited as the current squashfs driver
is not capable of handling symbolic links.

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-24 08:14:41 +02:00
Sascha Hauer eca7871bce complete: Add completion for nv and globalvar commands
The 'nv' command is often used to create a nv variable
for an existing global variable, so add a command completion
function for this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-18 22:45:32 +02:00
Sascha Hauer 57aac5f1ff linux/list.h: Add missing include
linux/list.h needs linux/kernel.h for container_of(). Add it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-18 14:34:05 +02:00
Sascha Hauer 440783f886 Merge branch 'for-next/usb' 2016-10-10 08:31:08 +02:00
Sascha Hauer 385c95c60b Merge branch 'for-next/ubi' 2016-10-10 08:31:08 +02:00
Sascha Hauer bfdb14c7da Merge branch 'for-next/misc' 2016-10-10 08:31:07 +02:00
Sascha Hauer 081554dca9 phy: Introduce to_usbphy conversion function
The generic phy support layer has the necessary list handling
and phy retrieval functions, so we should reuse them for usb
phys. This adds a phy_to_usbphy() conversion function which
drivers can implement which attach to the generic phy layer
and are really usb phys.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-29 14:00:33 +02:00
Sascha Hauer 850557842f phy: Introduce of_phy_get_by_phandle
Currently generic phy support assumes that the standard phy binding from
dts/Bindings/phy/phy-bindings.txt is used. This adds a helper function
which can be used to retrieve a phy when this standard binding is not
used.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-29 13:58:32 +02:00
Sascha Hauer 7c9708a5c6 usb: ehci: forward phy given in registration data to host
Allow to pass a phy in the registration data and forward it to
the usb_host structure.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-29 13:57:14 +02:00
Sascha Hauer 0408cb01fa usb: Add usb phy to usb host
Add a struct usb_phy * member to struct usb_host. Also, call
usb_phy_notify_connect() / usb_phy_notify_disconnect() when there
are connection changes on the root hub.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-29 13:57:14 +02:00
Giorgio Dal Molin fc428987c8 mtd: ubi: add API call to rename volumes.
Signed-off-by: Giorgio Dal Molin <iw3gtf@arcor.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-27 08:15:32 +02:00
Marc Kleine-Budde cc532a3f73 boot: add framework for redundant boot scenarios
There are several use cases where a redundant Linux system is needed. The
barebox bootchooser framework provides the building blocks to model different
use cases without the need to start from the scratch over and over again.

The bootchooser works on abstract boot targets, each with a set of properties
and implements an algorithm which selects the highest priority target to boot.

See the documentation contained in this patch for more information.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:44:23 +02:00
Sascha Hauer 6d8beeaad1 globalvar: introduce globalvar_add_simple_bitmask
Using the just introduced param_bitmask this adds the corresponding
globalvar convenience function.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:35:00 +02:00
Sascha Hauer 18697b7afc param: introduce param_bitmask
param_bitmask behaves similar to an enum, except that with a bitmask
multiple values can be specified. On the command line the bits are
represented as a space separated list of strings. In memory a
unsigned long * is used as backend storage, this can be modified
using the regular bitmap functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:32:00 +02:00
Enrico Jorns 841d83ff0a net: add linux.bootarg parameter from ifup call
This sets a `ip=dhcp` or
`ip=<clientip>:<serverip>:<gatewayip>:<netmaskip>::<iface>:` bootarg for
the network device upon execution of 'ifup'. This is the only point
where we can distinguish between a static ip and a dhcp-based network
setup and thus set a valid bootarg options as it will be required for
nfs boot, for example.

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:30:38 +02:00
Sascha Hauer d60230bded convert users to %pI4
Convert users of ip_to_string() and print_IPaddr() to %pI4 and
remove the now unused functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:30:38 +02:00
Sascha Hauer 8776eca37a globalvar: sync with nvvars
This patch fixes the behaviour when a driver creates a globalvar using
globalvar_add_simple_[string|int|bool|enum|ip]) *after* nvvars are
initialized and this globalvar is overwritten with a nvvar. Currently
this fix is not needed because all globalvars are registered before the
nvvars are initialized.

We have two different typed of globalvars. The first type, here referred
to as qualified globalvars, has a backend variable storage (the ones
created with globalvar_add_simple_[string|int|bool|enum|ip]), the other
created with globalvar_add_simple only has a dynamically allocted string
as backend.

Normally during startup of barebox the qualified globalvars are
registered and during load of nvvars are synced with the values from the
nvvars. Everything works fine in this case. However, when during nvvar
initialisation a globalvar for a nvvar does not exist, then it is
registered as unqualified globalvar. When then later some driver wants
to register a qualified globalvar for which a unqualified globalvar
already exists, it will get a -EEXIST. This is not the expected
behaviour. Instead, the current unqualified globalvar should be removed,
recreated as qualified globalvar and then afterwards synced with the
corresponding nvvar. This behaviour is fixed with this patch.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:30:28 +02:00
Sascha Hauer 5126579f97 globalvar: Move static inline functions to common/
These functions will get bigger in the next patch which disqualifies
them as static inline functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 11:30:23 +02:00
Sascha Hauer 0f5b72a110 mtd: ubi: introduce barebox specific ioctl to get ubi_num
Code wishing to manipulate ubi devices from outside the ubi
layer needs the ubi_num as reference. Add an ioctl to get
the ubi_num from a filedescriptor.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 09:42:02 +02:00
Sascha Hauer 85dccb9298 mtd: ubi: Add API calls to create/remove volumes
Currently we use a ioctl API to create/remove ubi volumes. This
means we always have to carry all function code for ubi volume
manipulation when the ioctl is compiled in.
This adds a function API to create/remove volumes so that the linker
can throw the unused code away later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-22 09:39:55 +02:00
Sascha Hauer f4714e5f6a Merge branch 'for-next/video' 2016-09-13 14:56:07 +02:00
Sascha Hauer 074a8fdc92 Merge branch 'for-next/socfpga' 2016-09-13 14:56:06 +02:00
Sascha Hauer dd534571bd Merge branch 'for-next/misc' 2016-09-13 14:56:05 +02:00
Sascha Hauer 6b8ae8f2e1 Merge branch 'for-next/menu' 2016-09-13 14:56:05 +02:00
Alexander Kurz f6ebdf2194 Add i.MX50 support
Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-12 08:23:09 +02:00
Aleksey Kuleshov bf2abf9050 rework menu so that it can support multiline titles
Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-09-05 08:26:47 +02:00
Philipp Zabel da03ce9c18 video: add VPL ioctl to get bus format
The i.MX specific DI_MODE VPL ioctl already allows to query the encoder
input bus format. This patch also allows non-i.MX specific encoder drivers
to report their input bus format.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-25 08:28:40 +02:00
Philipp Zabel 1be6d321ef video: switch to media bus formats
V4L2 pixel formats are supposed to describe video frames in memory. To
describe the pixel format on the hardware bus between display interface
and encoders, use media bus formats, which are more expressive.

This allows to get rid of the custom GBR24 and LVDS666 fourccs.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-25 08:28:40 +02:00
Sascha Hauer cae9515d05 mtd: nand: add ONFI timing mode to nand_timings converter
Ported from Linux commit 974647e:
| Add a converter to retrieve NAND timings from an ONFI NAND timing mode.
| At the moment, only SDR NAND timings are supported.
|
| Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
| Signed-off-by: Brian Norris <computersforpeace@gmail.com>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-18 16:16:27 +02:00
Sascha Hauer bb25c7f528 mtd: nand: define struct nand_timings
Ported from Linux commit bb5fd0b6da:

|  Define a struct containing the standard NAND timings as described in NAND
|  datasheets.
|
|  Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
|  Signed-off-by: Brian Norris <computersforpeace@gmail.com>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-18 16:16:04 +02:00
Alexander Kurz d3c3e40355 mfd mc13xxx: add MC13892_REVISION_2_4
An MC13892CJ having REV[4:0]=0x14 can be found in the kindle-d01100.
Add the revision to the list to support this device.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-18 09:15:28 +02:00
Steffen Trumtrar 1047fa8ab4 filetype: add new filetype for SoCFPGA xload image
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-18 08:19:25 +02:00
Sascha Hauer 94b1e5a321 Merge branch 'for-next/nv' 2016-08-03 08:08:23 +02:00
Sascha Hauer 7a51da5ff1 Merge branch 'for-next/net' 2016-08-03 08:08:23 +02:00
Sascha Hauer b927df0329 Merge branch 'for-next/misc' 2016-08-03 08:08:23 +02:00
Sascha Hauer 14e04d019b Merge branch 'for-next/imx' 2016-08-03 08:08:23 +02:00
Alexander Kurz 28a0baffb9 ARM i.MX31: add SPI support
The i.MX31 SPI interface was refered by freescale as spi_ver_0_4 in one
of their older vendor extended linux releases. spi_ver_0_4 differs only
in minor aspects to spi_ver_0_7 (i.MX35) which is already supported by
barebox.
Regarding barebox, the differences boil down to the location and length
of the CHIP SELECT and BIT COUNT/BURST LENGTH elements of CONREG. The
spi_ver_0_4 variant is limited to single word bursts with a maximum of
32 bits_per_word.

Add support for the i.MX31 SPI interface to the barebox spi_ver_0_7
implementation.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-08-03 07:30:41 +02:00
Sascha Hauer 89c8ac578f boot: Move code to common/
Normally code in commands/ shall only do the option parsing whereas the
functionality shall be in common/ to make the code usable from C aswell.
Do this in the boot code aswell, move it to common/boot.c and add the
function prototypes to include/boot.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:35 +02:00
Sascha Hauer bf07b3411a bootentries: Move struct bootentries to include/boot.h
The boot function prototypes are declared in include/blspec.h. Move them
to include/boot.h where they belong.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:35 +02:00
Sascha Hauer 86a4036ba2 blspec: Make blspec_boot static
Since blspec_boot is now only used locally we can make it static. Move
it up to avoid a static declaration.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:35 +02:00
Sascha Hauer e113fa5f1d blspec: separate bootentries from blspec entries
This completes the separation of the blspec code from the boot
code. With this the boot code only handles generic boot entries
of type struct bootentry which are embedded into the type
(blspec/bootscript) specific structs.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:35 +02:00
Sascha Hauer ff6bc08801 bootentries: Add title/description
We currently have to special case blspec entries vs. boot scripts
in the common boot code since we want to print different informations
about them. This adds a 'title' and 'description' which can be filled
in with different information by bootscripts and blspec entries and
so we get rid of the special handling.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:35 +02:00
Sascha Hauer 0d054f3303 blspec: factor out a struct bootentry
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:35 +02:00
Sascha Hauer dbc1894b42 blpec: rename struct lspec -> bootentries
The code in common/boot.c collects the different boot entries in
lists of type struct blspec, eventhough many of them may not be
bootloader spec entries but for example boot scripts. This is the first
step of separating the data structures from boot entries and bootloader
spec: As struct blspec is merely a container for collecting boot entries
We simply rename struct blspec to struct bootentries. No functional change.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:34 +02:00
Sascha Hauer 4d85cb974a include: Move bulk of boot.h to bootm.h
The majority of the stuff currently in include/boot.h is about bootm
code implemented common/bootm.c. To be more consistent move it to a
new file include/bootm.h.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-26 08:31:31 +02:00
Sascha Hauer bf1b4877bc blspec: remove unused function prototype
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-22 14:43:19 +02:00
Sascha Hauer 333378d4e4 blspec: Remove once/default handling
This is widely unused and in the way of subsequent cleanups. If you are
indeed using it please complain on the list, we'll find a solution to
add it back in a different way.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-22 14:41:35 +02:00
Sascha Hauer 7c76559023 blspec: remove unused blspec_boot_devicename
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-22 13:23:38 +02:00
Sascha Hauer 3fadbdae1f nv: Save nv variables on shutdown
With this patch nv variables are automatically saved whenever barebox
shuts down (that is 'reset' is executed or a kernel is started). With
this the additional 'saveenv' step becomes unnecessary.

The nv variables are stored in the environment and the estasblished
behaviour is that files in the environment must be manually saved
using 'saveenv'. This behaviour shall be kept for now, so this patch
cannot just call 'saveenv' since that would save the modified
environment files aswell. Instead we read the environment from the
device, modifiy the nv variables and save the environment back.

Since this changes a long existing behaviour messages are printed the
first time a nv variable is modified and during shutdown when the
variables are actually saved.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-22 12:27:22 +02:00
Sascha Hauer ea0e077ed6 printk: Fix pr_cont
pr_cont is meant to continue a line, so do not printf the prefix given
with pr_fmt() again.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-22 12:02:19 +02:00
Sascha Hauer 5ed70d2fa2 net: eth: add name to struct eth_device
Using dev_name often is not a good idea since it's a statically
allocated string which gets overwritten by later calls to dev_name.
Add a devname string to struct eth_device to have the name available
for later use.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-14 22:24:53 +02:00
Sascha Hauer 8b3244d3a8 net: introduce for_each_netdev iterator
for_each_netdev is nicer to read. Also export the list of network
devices since it will be used by code outside of net/eth.c in later
patches.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-14 22:24:19 +02:00
Sascha Hauer ca95c2bab9 Merge branch 'for-next/video' 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 202cda9475 Merge branch 'for-next/nvdevvars' 2016-07-11 07:58:34 +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
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 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
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
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
Sascha Hauer 699b4f8025 Introduce non volatile device variables
Non volatile device variables are used to make device parameters
persistent. They are like normal non volatile variables, but set
the values of the device parameters with the corresponding name.
Every nv variable beginning with nv.dev is a non volatile device
variable. They have the form nv.dev.<devname>.<paramname> and act
on the parameter <paramname> of the device named <devname>.

The non volatile device variables are designated for example for
video modes, ethernet device ip addresses or mtd partitioning.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 10:09:29 +02:00
Alexander Shiyan e5c6340f42 net: smc911x: Add parsing devicetree options
This patch adds parsing basic devicetree options for the smc911x driver:
reg-io-width, reg-shift and smsc,force-(in/ex)ternal-phy, which makes
driver usable for most DTS-based boards.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-05 09:02:41 +02:00
Alexander Shiyan 341aca3762 Add more files to .gitignore
This patch adds more generated files to ignore list.
...
shc@shc /home/git/barebox-github $ git status
На ветке imx51
Неотслеживаемые файлы:
  (используйте «git add <файл>…», чтобы добавить в то, что будет включено в коммит)

        common/barebox_default_env
        common/barebox_default_env.h
        include/asm
        scripts/basic/docproc

ничего не добавлено в коммит, но есть неотслеживаемые файлы (используйте "git add", чтобы отслеживать их)

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-05 09:02:40 +02:00
Andrey Smirnov aa750244ee video/edid: Move int_sqrt() out
Move int_sqrt() out of drivers/video/edid.c so that it is availible to
other parts of Barebox.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-30 08:33:53 +02:00
Andrey Smirnov 927176bc16 GUI: Add code to draw simple graphics
Add code to draw simple graphics, namely lines(solid or dashed) and
circles.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-30 08:33:53 +02:00
Andrey Smirnov 0cd1a51924 GUI: Add a function to draw vertical/horizontal bars
Add a function to draw solid vertical or horizontal bars.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-30 08:33:53 +02:00
Sascha Hauer db17be7f34 Merge branch 'for-next/mtd' 2016-06-14 09:13:41 +02:00
Sascha Hauer 6bfb591cc1 Merge branch 'for-next/misc' 2016-06-14 09:13:41 +02:00
Sascha Hauer 336dcea5a1 Merge branch 'for-next/mips' 2016-06-14 09:13:41 +02:00
Sascha Hauer 2b948a834c Merge branch 'for-next/bootm' 2016-06-14 09:13:35 +02:00
Sascha Hauer 5f987cd3f7 Merge branch 'for-next/aiodev' 2016-06-14 09:13:26 +02:00
Antony Pavlov 5253099564 MIPS: ath79: dts: sync clk stuff with linux v4.7-rc2
Please see these linux kernel ath79 commits:

    commit 1e6a3492e7bb12aa8ee26050ff6829c39ebaa152
    Author: Antony Pavlov <antonynpavlov@gmail.com>
    Date:   Thu Mar 17 06:34:17 2016 +0300

        MIPS: dts: qca: introduce AR9331 devicetree

    commit 5ae5c452e3361612cd8182eb8bdfecf0ebf42288
    Author: Antony Pavlov <antonynpavlov@gmail.com>
    Date:   Thu Mar 17 06:34:18 2016 +0300

        MIPS: ath79: update devicetree clock support for AR9331

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-14 08:39:55 +02:00
Trent Piepho edb96cf3d7 mci: Fix version numbers again
The SD and eMMC version numbers are a pain to print and sort, since
they are inconsistent in if a two digit minor version shdoulde be
treated as a single number or as minor and micro version numbers.

This allows version 1.10 and 4.5 and 4.41, where 41 is less than 5.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-07 08:06:43 +02:00
Lucas Stach ef7b17a2a1 nvvar: add missing static inline stubs
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-30 07:02:14 +02:00
Lucas Stach 8e5e3965bd globalvar: add missing static inline stubs
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-30 07:02:14 +02:00
Yegor Yefremov 61ddbd3520 crypto: add CRC32 digest
CRC32 digest can be used to check CRC32 hashes in FIT images etc.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-25 10:41:30 +02:00
Andrey Smirnov a6c67f15ac syscon: Do not return NULL when driver is not selected
Both syscon_base_lookup_by_pdevname() and
syscon_base_lookup_by_phandle(), when implemented, do not return NULL,
so none of the code using those function is written to check for that.

Change returns to ERR_PTR(-ENOSYS), to avoid having that problem.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-18 07:47:51 +02:00
Sascha Hauer 914480a542 drivers: Introduce AIODEV subsystem
AIODEV/Aiodevice is a analog I/O framework that can be thought of as a
simplified hybrid between 'hwmon' and 'IIO' subsystems of Linux kernel

This commit is very heavily based on 'iodevice' framework proposal
written by Sascha Hauer.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-18 07:47:46 +02:00
Sascha Hauer 6922e0f005 bootm: Add verify mode "available"
The verify "available" mode checks whatever is available in the
booted image, so when an image has a signature, it is checked and
must be correct and when an image is hashed, it is also checked
for correctness.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-10 16:02:13 +02:00
Sascha Hauer 7839011f61 bootm: Move bootm options to common/Kconfig
bootm has a C API, so the bootm options have to depend on the
option providing the bootm code (CONFIG_BOOTM), not on the
option providing the command (CONFIG_CMD_BOOTM). Fixing the
dependencies makes it possible to fully use bootm from C without
enabling the bootm command support.
This also removes the CMD_ prefix from the options which means
we have to update the defconfigs aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-10 14:51:58 +02:00
Sascha Hauer 18ea7385fb mtd: nand: Enable subpage reads
Until now we did not support subpage reads for smaller binary sizes.
Scanning UBI volumes on large page NANDs can be painfully slow,
subpage reads can speed this up significantly, so enable subpage reads.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-10 08:20:43 +02:00
Sascha Hauer ec21c89112 mtd: nand: Pass page argument to read_subpage hook
Similar to what the kernel does in e004debda (mtd: nand: add "page" argument for
read_subpage hook).

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-05-10 08:18:39 +02:00
Sascha Hauer 06f5a7c9ad Merge branch 'for-next/ubiformat' 2016-05-09 08:50:02 +02:00
Sascha Hauer 5c83ce6091 Merge branch 'for-next/pci' 2016-05-09 08:49:50 +02:00
Sascha Hauer 4cb8e17aa3 Merge branch 'for-next/misc' 2016-05-09 08:49:43 +02:00
Sascha Hauer 854df603da Merge branch 'for-next/include-pdata' 2016-05-09 08:49:42 +02:00
Sascha Hauer 55aca0a48c Merge branch 'for-next/include-cleanup' 2016-05-09 08:49:42 +02:00