| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
From 5e87dc2c24051c2cd2985e513c5a825d51d9bb00 Mon Sep 17 00:00:00 2001
From: Clement Leger <clement.leger@kalray.eu>
Date: Tue, 5 Sep 2017 10:37:23 +0200
Subject: [PATCH] Phy: Check NULL bus case and undetected phy via of
phy_device_connect can be called with NULL miibus for automatic match
with the phy described in the device tree. In the case where the phy
was not detected for some unknown reason, the next calls will be done
with a NULL bus. This will lead to undefined behavior and more probably
crashes.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
current code will crash if DT has no PHY entry. With this patch
we will test if parent exist, before testing the parent device node.
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
support it
Older versions of the ONFI spec do not support get/set features, so
do not call these commands when they are not available.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Older versions of the ONFI spec do not support get/set features, so
do not call these commands when they are not available.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| |
| | |
This commit adds the return value of the failing function to one message
and makes the other unique.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
we need it at least for QCA AR9344
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
|commit 37786c7fee40771d13901de129af7e084ed48b55
|Author: Kevin Cernekee <cernekee@gmail.com>
|Date: Thu Apr 9 13:05:14 2015 -0700
|
| of: Add helper function to check MMIO register endianness
|
| SoC peripherals can come in several different flavors:
|
| - little-endian: registers always need to be accessed in LE mode (so the
| kernel should perform a swap if the CPU is running BE)
|
| - big-endian: registers always need to be accessed in BE mode (so the
| kernel should perform a swap if the CPU is running LE)
|
| - native-endian: the bus will automatically swap accesses, so the kernel
| should never swap
|
| Introduce a function that checks an OF device node to see whether it
| contains a "big-endian" or "native-endian" property. For the former case,
| always return true. For the latter case, return true iff the kernel was
| built for BE (implying that the BE MMIO accessors do not perform a swap).
| Otherwise return false, assuming LE registers.
|
| LE registers are assumed by default because most existing drivers (libahci,
| serial8250, usb) always use readl/writel in the absence of instructions
| to the contrary, so that will be our fallback.
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
the same as for usb gadget autostarter.
|commit 2b9bcff79a02f770fa730e2689ba35cc03c0da7d
|Author: Sascha Hauer <s.hauer@pengutronix.de>
|Date: Fri Jan 20 10:03:45 2017 +0100
|
| usb: gadget: properly release f_multi_opts
|
| The usbgadget commands uses statically allocated f_multi_opts and passes
| this to usb_multi_register(). These f_multi_opts are of course no
| longer valid when we leave the usbgadget command. Luckily we do not use
| the data after we left the usbgadget command, so this never has been a
| problem. However, f_multi_opts has some allocated members which we can
| not free anymore on gadget unregistration because we no longer have the
| pointer to them.
|
| Fix this by adding a release function to struct f_multi_opts. This way
| we can allocate all memory dynamically and properly free it when not
| used anymore.
|
| Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The function imx_clk_cpu takes a const char *parent_name as second
paramter. The implementation introduced in commit 9a89ed9d281e then
uses the address of this function parameter to assign clk.parent_names.
This is an address on the stack that is saved in the clk tree and of
course this is easily overwritten by later execution paths of barebox.
Without this fix the clk_dump command reproducibly crashes on i.MX7
(which is the only SoC that makes use of imx_clk_cpu()).
Fixes: 9a89ed9d281e ("clk: imx: Add clk-cpu support")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If there is a problem STAT_RR might never be set which results in an endless loop.
Break out after 10 µs with -ETIMEOUT instead.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
This makes it possible that the xchg_single callbacks return an error code that
is then passed to the caller of spi_transfer. There is no change in behaviour
intended as up to now the callbacks always return 0.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Based on the linux kernel version of the same driver.
Needs to adjust clock names as the clock names used in the device tree
does not match the clocknames used in platform_data.
The clocknames in the device tree are not unique, so it was
not an option to rename the clocks.
It boots and the driver is discovered - no further testing done.
$ devinfo fff78000.gadget
Resources:
num: 0
name: /ahb/apb/gadget@fff78000
start: 0xfff78000
size: 0x00004000
Driver: at91_udc
Bus: platform
Parameters:
vbus: 1 (type: bool)
Device node: /ahb/apb/gadget@fff78000
gadget@fff78000 {
compatible = "atmel,at91sam9263-udc";
reg = <0xfff78000 0x4000>;
interrupts = <0x18 0x4 0x2>;
clocks = <0x26 0x27>;
clock-names = "pclk", "hclk";
status = "okay";
atmel,vbus-gpio = <0x28 0x19 0x0>;
};
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some boards use "have_intensity_bit". To support this the
syntax for lcd_wiring_mode was extended to include this info.
This is an extension compared to the documented bindings,
and an extension the kernel does not support (yet).
The binding documents that there can be more than one gpio to
power on/off the display but current implmentation supports only
one gpio. There are no users that requires more than one gpio
so this is good enough.
The clk name used for hclk differs from device trees and
platform data. We could rename the clocl used in platform data
but the name "hclk" is not unique.
Configure clockname based on configuration method.
Devicetree => hclk
Platform data => hck1
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Keep atmel_lcdc_register() readable by separating out
pdata handling in a helper function
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Simplify board specific code by specifying the power_control
gpio direct in platform data.
Move registration of the GPIO to the driver so we no longer
need to duplicate this for each board.
As an intended side-effect there is no longer
any references to platform_data outside atmel_lcdc_register()
so remove it from struct atmel_lcdfb_info
The implementation assumes that GPIO=0 is the same as no power control.
This prevents us from using any GPIO=0 for power control,
but this is not considered a problem for current users.
Future DT users will not have this limitation.
This commit include a fix so we will actually power
down if requested. Previously this was hardcoded to ON.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Copy lcd_wiring_mode and have_intensity_bit to
atmel_lcdfb_info to minimize dependency on the
atmel_lcdfb_platform_data.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| |
| | |
Copy dmacon + lcdcon2 to atmel_lcdfb_info to minimize
dependency on the atmel_lcdfb_platform_data.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
| |
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Cc: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Do not fix modes. Instead set any sync polarity passed through
VPL_PREPARE and fb_videomode.
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Minimum pixel clock period is 6.5 nS for DPI. Remove modes with
lower pixel clock period. Also sort modes in decreasing order
because currently first resolution in list is picked.
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
| |
| |
| |
| |
| | |
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Move common check to tc_aux_i2c_xfer
Remove duplicated check from tc_aux_i2c_write
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Do not fail on newer DPCD revision. Assume it backwards compatible.
Try to fall back to supported data rate in case display reports too
high data rate.
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
Display should support lower lane count for backward compatibility
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
First four bytes should go to DP0_AUXWDATA0. Due to bug if
len > 4 first four bytes was writen to DP0_AUXWDATA1 and all
data get shifted by 4 bytes. Fix it.
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fields in HTIM01 and HTIM02 regs should be even.
Recomended thresh_dly value is max_tu_symbol.
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Remove shift from TU_SIZE_RECOMMENDED define as it used to
calculate max_tu_symbols.
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Desktop displays do not always support E-DDC. So do not fall on
EDID segment index write operation.
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
DT format is ACKed now without "offset" parameter.
Make sure barebox driver will work with it properly.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Just add the defines.
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We have kept the EXT_CSD registers which were added in the 5.1 spec
separately for no good reason. Order the EXT_CSD defines by register
number instead. Also we had some duplicates, for these consistently
use the names from the 5.1 spec.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Adds support to the driver to enable VBAT regulator at init time.
This is similar to ba14301e0356 ("fbdev/ssd1307fb: add support to enable
VBAT") and cfc5b2b551d8 ("fbdev/ssd1307fb: fix optional VBAT support")
in Linux kernel.
Signed-off-by: Bastian Stender <bst@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Don't spam the output with rate propagation messages. It isn't done
for any other clock.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For the dual-channel mode to work correctly, both channels need to be
muxed to the same DI and both clock branches need to be configured
correctly.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Same as in the Linux kernel. Failure to enable ASSR isn't a critical
failure and can happen in normal use.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Remove what looks like unused leftover from analogous Linux kernel
code.
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This patch is providing an optional power off handler
which will configure standby state of the PMIC to disable all power lines.
In my power consumption test on RIoTBoard, I got the following results:
power off without this patch: 320 mA
power off with this patch: 2 mA
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
|
|\ \ \ \ |
|