| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| | |
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| | |
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The pointer to the struct device_d *dev is also saved to the struct mci_host.
Get rid of it.
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is a cut down version of the Linux kernel PCI quirk infrastructure,
which allows to register and execute some fixups before the driver is
loaded.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The document "PCI Bus Binding to: IEEE Std 1275-1994 Standard for Boot
(Initialization Configuration) Firmware" describes how the PCI topology
can be described in the DT, in order to augment the PCI devices with
additional information via DT properties.
This patch links OF nodes to the corresponding PCI devices if they
exist, allowing PCI device drivers to query DT information like any
platform device.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There is no symbol iCONFIG_MCI_INFO, CONFIG_MCI_INFO makes sense here
and matches what was added in the same commit to other drivers.
Fixes: 73b0d228e5b0 ("driver: Attach info callback to device, not to driver")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The driver_d is missing the name property. When the reset driver is used in a
non-of setup, this will result in an error during device_registration where
the dev->name is matched to the driver->name.
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The temperature sensor driver for Freescale i.MX SoCs use internaly the OCOTP character device. If the config IMX_THERMAL is selected the OCOTP config was not selected and comes up with an error during booting.
Signed-off-by: Eugen Wiens <eugen.wiens@jumo.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Replace whitespaces with tabs.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When barebox probes the e1000 driver and the flash on the i210 device is
unprogrammed, the driver assumes the flash has a size of only 4 kiB.
This is annoying because to program the flash an image must be written
that is bigger than 4 kiB. So you first have to flash the first sector
to make barebox detect the right size on the next boot. Then reset the
board to be able to write the remaining data.
To work around that limitation, try to read the actual size from the
device tree. (Note however that barebox' pci code currently doesn't use
the device tree and so currently this try always fails without further
patching.)
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add code to parse "input-enable" and intepret it as SION bit. This is
needed for I2C configuration on i.MX8MQ EVK board.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Select DRIVER_SPI_IMX_2_3 for i.MX8MQ since that is the variant that's
being used
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Looks like that particular chunk of the code have not been built in a
while and bitrotted. Change function parameters appropriately to avoid
breaking the build.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
MMC cards need at least 74 clock pulses before any bus communication
can occur. The i.MX SDHC controller auto-gates the clock when inactive,
so if the SD enumeration is skipped for slots where we know that only a
MMC card can be present (which is possible since
b5289b742a89 "mmc: allow skipping SD card initialization") those
inititialization clock pulses won't be sent out, resulting in command
timeouts when trying to enumerate the card.
Luckily the eSDHC controller has a hardware feature to send out 80
clock pulses. This has been validated to be available by checking the
reference manual back to i.MX25.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With serdev device support added there's now a corner case where:
1. There is a DT node for a serdev device on one of the UARTs
2. There is no driver that binds against serdev device's compatibility
string
with 1 and 2 being true it is possible to end up in a situation where
a particualr UART has not been initalized to any baudrate when
clock_notifier_call_chain() gets called. This effectively translates
to
set_baudrate(uart, 0);
which for LPUART driver result in a division by zero.
To avoid this problem, convert lpuart_serial_setbaudrate() to treat
zero baudrate as a request to disable the UART. While we are at it add
a BUG_ON() to lpuart_setbrg() to simplify finding any future bugs.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When sparse support was (intended to be) made optional it was
effectively unconditionally disabled because
IS_ENABLED(USB_GADGET_FASTBOOT_SPARSE)
always evaluates to 0. To actually make use of the introduced kconfig
symbol the CONFIG_ prefix must not be skipped.
Fixes: f4b5d3eeb607 ("usb: gadget: fastboot: Make sparse support optional")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: Gavin Schenk <g.schenk@eckelmann.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Halt is not automatically executed if we start the kernel.
So, we may have potentially memory corruptions.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently the backlight implementation stretches a brightness change over
a period of 100ms. While this is a fine default for PWM backlights, a user
might wish to change this slew time to meet other constraints or even
completely disable it for some backlight devices.
Add a parameter and provide the default value from the backlight device.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If an attached bb device was removed before the actual mtd device
the code would try due to a missing pointer reset to access
the no more present bb device handle which leads to a page fault.
This bug was made visible by commit "7649473 mtd: nand: remove
automatically created bb devices" which relys on a correct
mtd->cdev_bb handling.
Signed-off-by: Heinrich Toews <heinrich.toews@wago.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
Provide missing .format_mac for i.MX8MQ to prevent driver from
crashing on start.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
On i.MX6 GPMI Nand controller the clock must be disabled during
a rate change. Otherwise glitches on the clock line may occur
which result in errors like:
MXS NAND: Error sending command
MXS NAND: DMA read error
There were previous attempts to fix this. One is in:
54961378f0 imx6: clk: Gate off ENFC clock before setting clock rate
This patch added a clk_disable() right before the rate change. Since
a clk_disable() on a disabled clk is a no-op, the patch added a
clk_enable() to the i.MX6 clk driver in the hope that the clk is
enabled in the nand driver probe and the clk_disable() really takes
place.
This patch doesn't work. First of all it enabled the enfc_podf clk
which was not the one that was actually disabled in the nand driver,
resulting in the nand drivers call to clk_disable() still being a
no-op. Then this patch also only works only on the classic i.MX6 which
was the only one supported at that time, but not on the i.MX6UL, i.MX6SX
and i.MX6SL which have a separate clk driver.
Instead of adding more quirks to the other i.MX6 clk drivers, fix this
in the GPMI driver. We no longer call clk_disable() on a disabled clk,
but instead do a clk_enable() first which makes sure the hardware state
is synchronized to the usage count and the following clk_disable()
is really effective. At the same time we can (and actually must) remove
the quirk in the i.MX6 clk driver.
Also add clk_disable()/clk_enable() around another rate change in the
GPMI driver.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Upstream kernel driver allows specifying EEPROM name via
"zii,eeprom-name" property. Add code to support that in Barebox as
well.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is a backport of patch [1] by Kees Cook
[1] https://lkml.kernel.org/r/20180620182600.GA24297@beast
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Call to dev_dbg in dataflash_read() is located to early, before
command[] is initialize to correct values, so it end up printing
values from previous invocation. Move it such that it prints current
call's values.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Introduce nvmem_cell_get_and_read() that combines getting a NVMEM cell
by name and reading its contents.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
RAVE SP firmware versions found on RDU2 provide decicated bootsource
manipulation commands, which, under the hood, are just thin wrappers
around write/read to a particular location in EEPROM.
Unfortunately, RAVE SP firmware found on RDU1, does not provide any
dedicated bootsource commands and its users are expected to access
EEPROM directly.
In order to avoid having separate code paths for handling those two
cases, convert the code to access EEPROM directly via NVMEM API.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This code should've been removed when the driver was rebased against
latest watchdog plumbing in Barebox.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is needed when host is known to not work properly in high speed
mode.
In linux, chipidea driver supports 'maximum-speed' device tree property.
When that is set to "full-speed", driver sets PFSC bit in PORTSC
register, which disallows use of high speed mode.
This patch implements same support for barebox.
Important technical detail is that PFSC bit is cleared by port reset,
thus setting it has to be done in ehci->init() callback which is called
after ehci_reset().
Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is a minimal port of a kernel commit 6552d3141064 ("backlight:
Add RAVE SP backlight driver"). All of the changes were kept to a
minimum and limited to impedance matching between Barebox/Linux driver
API.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
This is a minimal port of a kernel commit 3b51f47be171 ("nvmem: Add
RAVE SP EEPROM driver"). All of the changes were kept to a minimum and
limited to impedance matching between Barebox/Linux driver API.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
| |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Make of_property_get_value() public, so it can be used in other part
of the system.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Remove an erroneous bch4 string leftover that
leads to a false ecc mode mapping.
BCH4 support was previously removed by Teresa Remmet:
d316cda 'mtd: nand: omap_gpmc: Remove BCH4 support'
Signed-off-by: Heinrich Toews <heinrich.toews@wago.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The eccsteps where set wrong for OMAP_ECC_BCH8_CODE_HW_ROMCODE.
So the ECC was only corrected for the first 512 bytes chunk of a 2k page.
Moved out the ecc step iteration out of the correcting loop to make
it more alike the generic nand functions. And made sure that
the ECC is caclulated for all chunks.
This patch is based on work of Sascha Hauer.
Fixes commit dec7b4d2bf9c ("mtd: nand_omap_gpmc: fix BCH error correction").
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
get_drv_data(..., &data->type) overwrites memory beyond data->type member due
to mismatch of sizeof(enum pca_type) and sizeof(void *) on 64 bit systems.
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
write_buff() uses ~(flash_info.portwidth - 1) to mask lower bits of addr. This
causes higher 32 bits of addr to be discarded on a 64 bit system, since
flash_info.portwidth is 32 bits long (unsigned int) and addr is 64 bits long
(unsigned long).
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
[andrew.smirnov@gmail.com: Rebased to account for move to nvmem]
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|