9
0
Fork 0
Commit Graph

3664 Commits

Author SHA1 Message Date
Andrey Smirnov a8b41f2c72 clk: Make COMMON_CLK_OF_PROVIDER depend on OFTREE
Make COMMON_CLK_OF_PROVIDER depend on OFTREE, this way checking for:

	defined(CONFIG_OFTREE) && defined(CONFIG_COMMON_CLK_OF_PROVIDER)

can be simplified to just:

	defined(CONFIG_COMMON_CLK_OF_PROVIDER)

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-09 08:13:38 +01:00
Andrey Smirnov b5ea2c6acc clk: Port two helper functions from Linux
Port of_clk_get_parent_count() and of_clk_parent_fill() from Linux.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-09 08:13:38 +01:00
Andrey Smirnov 943a9eeac4 regmap: Implement syscon_node_to_regmap()
Implement syscon_node_to_regmap() to simplify porting kernel code.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-09 08:13:38 +01:00
Sascha Hauer 4afb09cc67 Merge branch 'for-next/net' 2017-02-13 09:26:04 +01:00
Sascha Hauer 5a30fae8c7 Merge branch 'for-next/mvebu' 2017-02-13 09:26:04 +01:00
Sascha Hauer 30139163b7 Merge branch 'for-next/imx' 2017-02-13 09:26:04 +01:00
Sascha Hauer bb1a6a2fd3 Merge branch 'for-next/efi' 2017-02-13 09:26:04 +01:00
Sascha Hauer 857f69ba8c ARM: start: Fix image size calculation
In barebox_non_pbl_start() we do not run at the address we are linked
at, so we must read linker variables using ld_var(). Since ld_var()
current is not available on arm64 we create two zero sized arrays,
one at the begin of the image and one at the end. The difference
between both is the image size we are looking for.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-08 12:03:20 +01:00
Sascha Hauer 2225c194ed clk: Add support for shared gates
Sometimes a single software control knob controls multiple gates
in hardware. This patch adds support for shared gates which help
coping this situation. The first gate is registered with the hardware
gate as usual, the others are registered as shared gates which does
not have hardware control itself, but only switches the real hardware
gate.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-06 07:34:03 +01:00
Sascha Hauer bea07a6881 clk: implement CLK_OPS_PARENT_ENABLE
Some clocks may only be modified when their parent clocks are enabled.
The kernel has the CLK_OPS_PARENT_ENABLE flag for this purpose.
Implement it for barebox aswell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-06 07:31:12 +01:00
Michael Olbrich 39db674c45 output: use '[0m' to reset colors
'[m' is supposed to have the same effect as '[0m'. However, some EFI
implementations seem to ignore '[m', so use '[0m' everywhere to avoid
rendering issues.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-24 09:34:11 +01:00
Sascha Hauer 25342f997f regulator: Add pfuze driver
This is not yet a regulator driver, only the register map is
exported as /dev/pfuze* so the registers can be accessed for
debugging purposes.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-20 09:10:31 +01:00
Juergen Borleis ea55770308 ARM: i.MX: Add i.MX7 base architecture support
Signed-off-by Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-20 09:10:30 +01:00
Sascha Hauer 6e9a87b394 mci: Allow to partition eMMC boot partitions
So far the eMMC boot partitions cannot be partitioned from the
device tree. Since they are often 4MiB in size they are big enough
to hold a barebox image and the environment. Add partition parsing
to the boot partitions to allow this usecase.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-19 15:21:33 +01:00
Sascha Hauer fc10539f7d usb: imx: Make usb-misc multi instance safe
i.MX7 has two usbmisc devices, so we cannot use global instance
variables anymore. Create a driver private data struct for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-19 15:16:30 +01:00
Uwe Kleine-König 08dd5af735 of: provide for_each_matching_node_from
This is for_each_matching_node for a given root similar to the other
..._from functions.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-17 07:56:27 +01:00
Uwe Kleine-König 4878ad3512 net/phy: marvell: rename 88E1545 to 88E1540
The Linux driver calls it 88E1540 so do it here, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-13 07:54:10 +01:00
Sascha Hauer dcedcec375 Merge branch 'for-next/vybrid' 2017-01-12 07:13:47 +01:00
Sascha Hauer 08c62ae2fa Merge branch 'for-next/truncate' 2017-01-11 19:00:04 +01:00
Sascha Hauer e05529dd8b Merge branch 'for-next/misc' 2017-01-11 19:00:03 +01:00
Sascha Hauer 005a81e173 Merge branch 'for-next/i2c' 2017-01-11 19:00:02 +01:00
Andrey Smirnov 10a7436e51 clk: Port of_clk_set_defaults()
Port of_clk_set_defautls() from Linux kernel in order to support DT
configurations that require it (e. g. Vybrid).

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-11 08:07:00 +01:00
Teresa Remmet a6785bae3b devfs: Add optional truncate callback for device files
Not all device files have trivial fix device sizes like static
ubi volumes. Here the device file size equals the image size it contains.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-11 08:06:48 +01:00
Sascha Hauer c757c67642 menu: sanitize menu_add_title
passing a string to menu_add_title() which then gets free by this
function is just plain ugly. Pass it a const char * which gets
duplicated in menu_add_title() when necessary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-10 08:27:33 +01:00
Andrey Smirnov 8f154474fa regmap: Add regmap_write_bits() function
Add code implementing a simple version of regmap_write_bits().

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-10 08:27:33 +01:00
Lucas Stach 37a37dff18 devparam: add static inline dummy for dev_add_param_bitmask
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-09 13:41:13 +01:00
Lucas Stach 3f41339844 nvvar: add static inline dummy for nvvar_save
Just as the other NVVAR functions, when support for NVVAR isn't
compiled in.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-09 13:41:13 +01:00
Uwe Kleine-König 49a968b555 i2c: algo-bit: remove prototype for non-existing function
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-11-17 07:58:51 +01:00
Sascha Hauer 8eb1fb3519 Merge branch 'for-next/vybrid' 2016-11-14 12:37:20 +01:00
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