| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Port an extremely abridged version of power management/power domain
code from Linux as a dependency of i.MX7D PCIe work. Currenlty only
bare minimum of functionality is implemented.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Add code needed to implement regulator_set_voltage(). Currently only
bare minmum needed for ANATOP driver (added in follow up commit) is
supported.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
In order to be able to port Linux driver relying on this API, port
various regmap related regulator function to Barebox.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
To simplify porting kernel code, port a very basic struct
regulator_desc and convert all of the code to use it.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The only information used from cellinfo field is whenever flash is SLC
or MLC, therefore eliminate it completely. This patch is based on Linux
commit 7db906b79f69.
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Linux commit e80eba758151 adapted for Barebox:
None of the existing drivers are overloading the ->scan_bbt()
method, let's get rid of it and replace calls to ->scan_bbt()
by nand_create_bbt() ones.
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Linux commit 17799359e7b adapted for Barebox:
This implementation detail is no longer needed outside of nand_bbt.c.
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Linux commit 5961ad2cb4dd adapted for Barebox:
Now that the last user of NAND_BBT_SCANALLPAGES has been removed, let's
kill this peculiar BBT feature flag.
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Linux commit a8c65d504e0b modified for Barebox:
nand_bch_init() requires several arguments which could directly be deduced
from the mtd device. Get rid of those useless parameters.
nand_bch_init() is also requiring the caller to provide a proper eccbytes
value, while this value could be deduced from the ecc.size and
ecc.strength value. Fallback to eccbytes calculation when it is set to 0.
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Relevant part of Linux commit dad2256269cb:
NAND_BBT_SCANEMPTY is a strange, badly-supported option with omap as its
single remaining user.
NAND_BBT_SCANEMPTY was likely used by accident in omap2[1]. And anyway,
omap2 doesn't scan the chip for bad blocks (courtesy of
NAND_SKIP_BBTSCAN), and so its use of this option is irrelevant.
This patch drops the NAND_BBT_SCANEMPTY option.
[1] http://lists.infradead.org/pipermail/linux-mtd/2012-July/042902.html
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Linux commit b32843b772db adapted for Barebox:
nand_base.c shouldn't have to know the implementation details of
nand_bbt's in-memory BBT. Specifically, nand_base shouldn't perform the
bit masking and shifting to isolate a BBT entry.
Instead, just move some of the BBT code into a new nand_markbad_bbt()
interface. This interface allows external users (i.e., nand_base) to
mark a single block as bad in the BBT. Then nand_bbt will take care of
modifying the in-memory BBT and updating the flash-based BBT (if
applicable).
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Don't hardcode grouping data into 4-byte words in print_hex_dump()
implementation and instead pass 'groupsize' to memory_display(), since
that's what that parameter is for.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since version v2018.08.0 some shared copies of gcc routines got added to
barebox so that archs don't need to have their own copy inside their
lib. The arch I am working on atm also needs support for muldi3 which is
not present as a generic version right now.
This patch adds the generic version from latest linux v4.20 to barebox
and lets the archs select it in their Kconfig so they don't need to
provide it themself.
Signed-off-by: Martin Hofmann <martin.hofmann_at_mni.thm.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| |
| | |
Linux has them in include/linux/time64.h and they are useful for
making (especially microsecond) use readable such as in read*_poll_timeout.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The basic DT is upstream now, so we can now reuse this in Barebox.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Closer to Linux kernel implementation and needed for imx8mq
composite clock.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
To make it reusable in a composite clock.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
To make it reusable in a composite clock.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch revises the bits for register MC13892_POWER_MISC.
- Added definition for one missing bit (0).
- Changed the name for bit 21 for accordance with the datasheet.
- Updated affected board that uses these definitions.
- Replaced spaces with tabs for the remaining bits.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Unlike LCD type information, IP address as well as netmaks are not
stored in an easily usable format in RAVE SP EEPROM. In order to obtain
them we need to issue a special command to RAVE SP. For that purpose add
device "sp" and expose that data as a device parameters (sp.ipaddr and
sp.netmask, correspondingly)
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We used to pass the message type ("INFO", "FAIL", "OKAY") as strings
to fastboot_tx_print(). Change this to a enum type. This allows
fastboot_tx_print() to react on the message type in the next step.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add a flag to sort directory entries before recursing into them.
Since this part of lib/ is used inside barebox as well as in
scripts/bareboxenv.c, we cannot easily use stringlists from lib/, which
would have made the code a bit nicer.
Signed-off-by: Florian Bäuerle <florian.baeuerle@allegion.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds device tree support to the davinci-emac driver.
This needs some changes to the driver as the device has four different
resources. Three of them are merged into a single resource in the
dts files with the node providing offsets for the different resources
to base address. The mdio node is found separately in the dts, so we
have to split this out to a different driver. Since this driver has been
unused previously, we do not bother maintaining two different probe
methods and remove platform probe support at the same time.
Signed-off-by: Heinrich Toews <heinrich.toews@wago.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The resolv() function used to return the IP address. When net_udp_new()
fails we return an error code though which the callers of resolv() take
as an IP address. This is wrong of course and we could return 0 in this
case. Instead we return an error code and pass the resolved IP as a
pointer which allows us to return proper error codes.
This patch also adds error messages and error returns to the various
callers of resolv() which used to just continue with a zero IP and
let the user figure out what went wrong.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| | |
nvmem_device_cell_read() and nvmem_device_cell_write() are exported, so
add a prototype to the header file.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It's only used in the !OFTREE stub functions, so can be safely removed.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch is based on a vendor patch in U-Boot, taken from
https://portland.source.codeaurora.org/patches/external/imxsupport/uboot-imx/imx_v2016.03_4.1.15_2.0.0_ga/HAB-238-Run-RNG-self-test-for-impacted-i.MX-chips.zip
| HAB-238 Run RNG self test for impacted i.MX chips
|
| Patch is only applicable to imx_v2016.03_4.1.15_2.0.0_ga branch of u-boot.
| Please adapt the patch for your respective release version.
|
| Background:
| Few i.MX chips which have HAB 4.2.3 or beyond, have oberserved following
| warning message generated by HAB due to incorrect implementation of drng
| self test in boot ROM.
|
| Event |0xdb|0x0024|0x42| SRCE Field: 69 30 e1 1d
| | | | | STS = HAB_WARNING (0x69)
| | | | | RSN = HAB_ENG_FAIL (0x30)
| | | | | CTX = HAB_CTX_ENTRY (0xE1)
| | | | | ENG = HAB_ENG_CAAM (0x1D)
| | | | | Evt Data (hex):
| | | | | 00 08 00 02 40 00 36 06 55 55 00 03 00 00 00 00
| | | | | 00 00 00 00 00 00 00 00 00 00 00 01
|
| It is recommended to run this rng self test before any RNG related crypto
| implementations are done.
|
[...]
|
| Signed-off-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Currently known impacted chips, as determined by NXP, include:
* i.MX6DQ+ silicon revision 1.1
* i.MX6DQ silicon revision 1.6
* i.MX6DLS silicon revision 1.4
* i.MX6SX silicon revision 1.4
* i.MX6UL silicon revision 1.2
* i.MX67SD silicon revision 1.3
Port the RNG software self-test from this patch to barebox. It can be
enabled by selecting CRYPTO_DEV_FSL_CAAM_RNG_SELF_TEST in Kconfig.
The original patch included a command line utility to run the self-test,
but we choose a different approach here, and run the software self-test
automatically when the respective HAB events indicating a RNG ROM
self-test failure are found when running habv4_get_status(). Note that
habv4_get_status() must be called by the board code before the CAAM
device driver is probed for this mechanism to work.
Until now there are at least two such known events. The first event was
observed on an i.MX6Solo, silicon revision 1.4; the second event is
mentioned in the original patch description given above. When an event
occured, habv4_get_status() tests if it is one of those known events,
and if so, indicates to the CAAM driver to run the software self-test.
In this case, printing the respective HAB warning is suppressed to
prevent confusion; the software self-test itself will error out in case
of recurring RNG self-test failure.
Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| |
| | |
- Move struct clk_onecell_data outside of CONFIG_COMMON_CLK_OF_PROVIDER
- Provide static inline wrapper for of_clk_add_provider()
- Provide static inline wrapper for of_clk_src_onecell_get()
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
pr_memory_display is a memory_display variant that takes a MSG_*
loglevel priority with which the hexdump is printed. Like the
normal pr_* function this is optimized out when the priority is
below the compile time priority.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
It's where the kernel has the print_hex_dump prototypes aswell, it's a
better match for these.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The levels of pr_emerg() and pr_cont() are both set to 0. When pr_cont()
is used to continue a previous line, and colored console output is
enabled, this can result in garbled log messages being printed, e.g.:
ERROR: HABv4: -------- HAB warning Event 0 --------
ERROR: HABv4: event data:
ERROR: HABv4: dbEMERG: 00EMERG: 24EMERG: 42EMERG: 69EMERG: 30EMERG: e1EMERG: 1d
ERROR: HABv4: 00EMERG: 04EMERG: 00EMERG: 02EMERG: 40EMERG: 00EMERG: 36EMERG: 06
ERROR: HABv4: 55EMERG: 55EMERG: 00EMERG: 03EMERG: 00EMERG: 00EMERG: 00EMERG: 00
ERROR: HABv4: 00EMERG: 00EMERG: 00EMERG: 00EMERG: 00EMERG: 00EMERG: 00EMERG: 00
ERROR: HABv4: 00EMERG: 00EMERG: 00EMERG: 01EMERG:
ERROR: HABv4: Status: Operation completed with warning (0x69)
Note the additional "EMERG: " in front of each continuation, which is
inserted by pr_cont(buf) being expanded to pr_printk(0, buf). These
additional strings show up in deep red on the console (which is not
supported in Git commit messages…). One might argue that this is the
same color as the "ERROR: " prefix, but when pr_cont() is used with
pr_notice() and pr_warning(), which are printed in blue and yellow
respectively, at least then the change in color would lead to additional
confusion.
The log level argument to pr_printk is defined as int, so we can solve
this by defining the level for pr_cont() to -1, which is not used for
any loglevel:
ERROR: HABv4: -------- HAB warning Event 0 --------
ERROR: HABv4: event data:
ERROR: HABv4: db 00 24 42 69 30 e1 1d
ERROR: HABv4: 00 04 00 02 40 00 36 06
ERROR: HABv4: 55 55 00 03 00 00 00 00
ERROR: HABv4: 00 00 00 00 00 00 00 00
ERROR: HABv4: 00 00 00 01
ERROR: HABv4: Status: Operation completed with warning (0x69)
Fixes: 0fcefdd9369050f35a88b41dcd42cc5a3c6c6b33 ("printk: Add pr_cont")
Fixes: ea0e077ed65a003e4d7a1e023aee38cbe2d14898 ("printk: Fix pr_cont")
Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use global variable dfu_function to autostart DFU. As similar code
is used to start multifunction gadget using command, move common
code to common/usbgadget.c and consolidate it.
It turned out that '-s' option of usbgadget command does nothing,
so remove its help text and make it function as '-a'.
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ci_udc_unregister() used to unregister "the controller". Since we
may register multiple chipidea devices we called ci_udc_unregister()
for each of them. This led to messages like:
ERROR: imx-usb 53f80000.usb: gadget not registered.
Fix this by returning the registered controller. This allows us to call
ci_udc_unregister() only when we actually registered one before.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
An ehci can be registered with ehci_register which is passed a struct
device_d *. In that case the priv pointer may already be used by the
caller, so we must not use it in the ehci code. At least for the Atmel
ehci driver this fixes a bug, here dev->priv is set two times to
different values.
Since we need dev->priv in the ehci code to get the controller in
ehci_detect() we can no longer implement that without the help of the
caller, hence we eport ehci_detect() and epect it to be called by
the code which registers a ehci host.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ehci_register() allocates data and registers a ehci host. Add
ehci_unregister() to properly halt the controller and to free the memory
again.. To do so, change ehci_register() to return the ehci host rather
than an error code.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
We have usb_register_host() which puts a new host on the list
of hosts we should also have the opposite which removes the
host from the list again.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of just creating a simple PHY device for every child of MDIO
bus node, add code to check if any of them have "compatible" property
set, as well as code to create a proper platform device for such
cases.
This change is useful for when MDIO bus and some of Ethernet ports are
connected to a switch or some other MDIO device that doesn't behave
like a generic PHY and can't be probed via its PHY ID.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|