Merge b4ed5be2ea ("ARM: dts: gta04: Move model property out of pinctrl node") into android13-5.15-lts
Steps on the way to 5.15.121 Change-Id: Iab912ec64d447f1f0013ed047516af92611d57a4 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -542,7 +542,6 @@
|
||||
"spi_lr_session_done",
|
||||
"spi_lr_overread";
|
||||
clocks = <&iprocmed>;
|
||||
clock-names = "iprocmed";
|
||||
num-cs = <2>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
@@ -737,13 +737,13 @@
|
||||
|
||||
&uart_B {
|
||||
compatible = "amlogic,meson8b-uart";
|
||||
clocks = <&xtal>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>;
|
||||
clocks = <&xtal>, <&clkc CLKID_UART1>, <&clkc CLKID_CLK81>;
|
||||
clock-names = "xtal", "pclk", "baud";
|
||||
};
|
||||
|
||||
&uart_C {
|
||||
compatible = "amlogic,meson8b-uart";
|
||||
clocks = <&xtal>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>;
|
||||
clocks = <&xtal>, <&clkc CLKID_UART2>, <&clkc CLKID_CLK81>;
|
||||
clock-names = "xtal", "pclk", "baud";
|
||||
};
|
||||
|
||||
|
||||
@@ -5,9 +5,11 @@
|
||||
|
||||
#include "omap3-gta04a5.dts"
|
||||
|
||||
&omap3_pmx_core {
|
||||
/ {
|
||||
model = "Goldelico GTA04A5/Letux 2804 with OneNAND";
|
||||
};
|
||||
|
||||
&omap3_pmx_core {
|
||||
gpmc_pins: pinmux_gpmc_pins {
|
||||
pinctrl-single,pins = <
|
||||
|
||||
|
||||
@@ -267,6 +267,12 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dh_mac_eeprom: eeprom@53 {
|
||||
compatible = "atmel,24c02";
|
||||
reg = <0x53>;
|
||||
pagesize = <16>;
|
||||
};
|
||||
};
|
||||
|
||||
<dc {
|
||||
|
||||
@@ -171,12 +171,6 @@
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
eeprom@53 {
|
||||
compatible = "atmel,24c02";
|
||||
reg = <0x53>;
|
||||
pagesize = <16>;
|
||||
};
|
||||
};
|
||||
|
||||
&iwdg2 {
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
interrupt-affinity = <&cpu0>, <&cpu1>;
|
||||
};
|
||||
|
||||
psci {
|
||||
psci: psci {
|
||||
compatible = "arm,psci-0.2";
|
||||
method = "smc";
|
||||
};
|
||||
|
||||
@@ -6,6 +6,18 @@
|
||||
/dts-v1/;
|
||||
#include "sparx5.dtsi"
|
||||
|
||||
&psci {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
enable-method = "spin-table";
|
||||
};
|
||||
|
||||
&cpu1 {
|
||||
enable-method = "spin-table";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -1759,7 +1759,7 @@ static u32 sysc_quirk_dispc(struct sysc *ddata, int dispc_offset,
|
||||
if (!ddata->module_va)
|
||||
return -EIO;
|
||||
|
||||
/* DISP_CONTROL */
|
||||
/* DISP_CONTROL, shut down lcd and digit on disable if enabled */
|
||||
val = sysc_read(ddata, dispc_offset + 0x40);
|
||||
lcd_en = val & lcd_en_mask;
|
||||
digit_en = val & digit_en_mask;
|
||||
@@ -1771,7 +1771,7 @@ static u32 sysc_quirk_dispc(struct sysc *ddata, int dispc_offset,
|
||||
else
|
||||
irq_mask |= BIT(2) | BIT(3); /* EVSYNC bits */
|
||||
}
|
||||
if (disable & (lcd_en | digit_en))
|
||||
if (disable && (lcd_en || digit_en))
|
||||
sysc_write(ddata, dispc_offset + 0x40,
|
||||
val & ~(lcd_en_mask | digit_en_mask));
|
||||
|
||||
|
||||
@@ -702,11 +702,11 @@ struct clk_hw *imx_clk_scu_alloc_dev(const char *name,
|
||||
|
||||
void imx_clk_scu_unregister(void)
|
||||
{
|
||||
struct imx_scu_clk_node *clk;
|
||||
struct imx_scu_clk_node *clk, *n;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < IMX_SC_R_LAST; i++) {
|
||||
list_for_each_entry(clk, &imx_scu_clks[i], node) {
|
||||
list_for_each_entry_safe(clk, n, &imx_scu_clks[i], node) {
|
||||
clk_hw_unregister(clk->hw);
|
||||
kfree(clk);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/media-bus-format.h>
|
||||
#include <linux/minmax.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
@@ -147,6 +149,7 @@ struct tc358768_priv {
|
||||
|
||||
u32 pd_lines; /* number of Parallel Port Input Data Lines */
|
||||
u32 dsi_lanes; /* number of DSI Lanes */
|
||||
u32 dsi_bpp; /* number of Bits Per Pixel over DSI */
|
||||
|
||||
/* Parameters for PLL programming */
|
||||
u32 fbd; /* PLL feedback divider */
|
||||
@@ -279,12 +282,12 @@ static void tc358768_hw_disable(struct tc358768_priv *priv)
|
||||
|
||||
static u32 tc358768_pll_to_pclk(struct tc358768_priv *priv, u32 pll_clk)
|
||||
{
|
||||
return (u32)div_u64((u64)pll_clk * priv->dsi_lanes, priv->pd_lines);
|
||||
return (u32)div_u64((u64)pll_clk * priv->dsi_lanes, priv->dsi_bpp);
|
||||
}
|
||||
|
||||
static u32 tc358768_pclk_to_pll(struct tc358768_priv *priv, u32 pclk)
|
||||
{
|
||||
return (u32)div_u64((u64)pclk * priv->pd_lines, priv->dsi_lanes);
|
||||
return (u32)div_u64((u64)pclk * priv->dsi_bpp, priv->dsi_lanes);
|
||||
}
|
||||
|
||||
static int tc358768_calc_pll(struct tc358768_priv *priv,
|
||||
@@ -329,13 +332,17 @@ static int tc358768_calc_pll(struct tc358768_priv *priv,
|
||||
u32 fbd;
|
||||
|
||||
for (fbd = 0; fbd < 512; ++fbd) {
|
||||
u32 pll, diff;
|
||||
u32 pll, diff, pll_in;
|
||||
|
||||
pll = (u32)div_u64((u64)refclk * (fbd + 1), divisor);
|
||||
|
||||
if (pll >= max_pll || pll < min_pll)
|
||||
continue;
|
||||
|
||||
pll_in = (u32)div_u64((u64)refclk, prd + 1);
|
||||
if (pll_in < 4000000)
|
||||
continue;
|
||||
|
||||
diff = max(pll, target_pll) - min(pll, target_pll);
|
||||
|
||||
if (diff < best_diff) {
|
||||
@@ -417,6 +424,7 @@ static int tc358768_dsi_host_attach(struct mipi_dsi_host *host,
|
||||
priv->output.panel = panel;
|
||||
|
||||
priv->dsi_lanes = dev->lanes;
|
||||
priv->dsi_bpp = mipi_dsi_pixel_format_to_bpp(dev->format);
|
||||
|
||||
/* get input ep (port0/endpoint0) */
|
||||
ret = -EINVAL;
|
||||
@@ -428,7 +436,7 @@ static int tc358768_dsi_host_attach(struct mipi_dsi_host *host,
|
||||
}
|
||||
|
||||
if (ret)
|
||||
priv->pd_lines = mipi_dsi_pixel_format_to_bpp(dev->format);
|
||||
priv->pd_lines = priv->dsi_bpp;
|
||||
|
||||
drm_bridge_add(&priv->bridge);
|
||||
|
||||
@@ -626,6 +634,7 @@ static void tc358768_bridge_pre_enable(struct drm_bridge *bridge)
|
||||
struct tc358768_priv *priv = bridge_to_tc358768(bridge);
|
||||
struct mipi_dsi_device *dsi_dev = priv->output.dev;
|
||||
u32 val, val2, lptxcnt, hact, data_type;
|
||||
s32 raw_val;
|
||||
const struct drm_display_mode *mode;
|
||||
u32 dsibclk_nsk, dsiclk_nsk, ui_nsk, phy_delay_nsk;
|
||||
u32 dsiclk, dsibclk;
|
||||
@@ -719,25 +728,26 @@ static void tc358768_bridge_pre_enable(struct drm_bridge *bridge)
|
||||
|
||||
/* 38ns < TCLK_PREPARE < 95ns */
|
||||
val = tc358768_ns_to_cnt(65, dsibclk_nsk) - 1;
|
||||
/* TCLK_PREPARE > 300ns */
|
||||
val2 = tc358768_ns_to_cnt(300 + tc358768_to_ns(3 * ui_nsk),
|
||||
dsibclk_nsk);
|
||||
val |= (val2 - tc358768_to_ns(phy_delay_nsk - dsibclk_nsk)) << 8;
|
||||
/* TCLK_PREPARE + TCLK_ZERO > 300ns */
|
||||
val2 = tc358768_ns_to_cnt(300 - tc358768_to_ns(2 * ui_nsk),
|
||||
dsibclk_nsk) - 2;
|
||||
val |= val2 << 8;
|
||||
dev_dbg(priv->dev, "TCLK_HEADERCNT: 0x%x\n", val);
|
||||
tc358768_write(priv, TC358768_TCLK_HEADERCNT, val);
|
||||
|
||||
/* TCLK_TRAIL > 60ns + 3*UI */
|
||||
val = 60 + tc358768_to_ns(3 * ui_nsk);
|
||||
val = tc358768_ns_to_cnt(val, dsibclk_nsk) - 5;
|
||||
/* TCLK_TRAIL > 60ns AND TEOT <= 105 ns + 12*UI */
|
||||
raw_val = tc358768_ns_to_cnt(60 + tc358768_to_ns(2 * ui_nsk), dsibclk_nsk) - 5;
|
||||
val = clamp(raw_val, 0, 127);
|
||||
dev_dbg(priv->dev, "TCLK_TRAILCNT: 0x%x\n", val);
|
||||
tc358768_write(priv, TC358768_TCLK_TRAILCNT, val);
|
||||
|
||||
/* 40ns + 4*UI < THS_PREPARE < 85ns + 6*UI */
|
||||
val = 50 + tc358768_to_ns(4 * ui_nsk);
|
||||
val = tc358768_ns_to_cnt(val, dsibclk_nsk) - 1;
|
||||
/* THS_ZERO > 145ns + 10*UI */
|
||||
val2 = tc358768_ns_to_cnt(145 - tc358768_to_ns(ui_nsk), dsibclk_nsk);
|
||||
val |= (val2 - tc358768_to_ns(phy_delay_nsk)) << 8;
|
||||
/* THS_PREPARE + THS_ZERO > 145ns + 10*UI */
|
||||
raw_val = tc358768_ns_to_cnt(145 - tc358768_to_ns(3 * ui_nsk), dsibclk_nsk) - 10;
|
||||
val2 = clamp(raw_val, 0, 127);
|
||||
val |= val2 << 8;
|
||||
dev_dbg(priv->dev, "THS_HEADERCNT: 0x%x\n", val);
|
||||
tc358768_write(priv, TC358768_THS_HEADERCNT, val);
|
||||
|
||||
@@ -753,9 +763,10 @@ static void tc358768_bridge_pre_enable(struct drm_bridge *bridge)
|
||||
dev_dbg(priv->dev, "TCLK_POSTCNT: 0x%x\n", val);
|
||||
tc358768_write(priv, TC358768_TCLK_POSTCNT, val);
|
||||
|
||||
/* 60ns + 4*UI < THS_PREPARE < 105ns + 12*UI */
|
||||
val = tc358768_ns_to_cnt(60 + tc358768_to_ns(15 * ui_nsk),
|
||||
dsibclk_nsk) - 5;
|
||||
/* max(60ns + 4*UI, 8*UI) < THS_TRAILCNT < 105ns + 12*UI */
|
||||
raw_val = tc358768_ns_to_cnt(60 + tc358768_to_ns(18 * ui_nsk),
|
||||
dsibclk_nsk) - 4;
|
||||
val = clamp(raw_val, 0, 15);
|
||||
dev_dbg(priv->dev, "THS_TRAILCNT: 0x%x\n", val);
|
||||
tc358768_write(priv, TC358768_THS_TRAILCNT, val);
|
||||
|
||||
@@ -769,7 +780,7 @@ static void tc358768_bridge_pre_enable(struct drm_bridge *bridge)
|
||||
|
||||
/* TXTAGOCNT[26:16] RXTASURECNT[10:0] */
|
||||
val = tc358768_to_ns((lptxcnt + 1) * dsibclk_nsk * 4);
|
||||
val = tc358768_ns_to_cnt(val, dsibclk_nsk) - 1;
|
||||
val = tc358768_ns_to_cnt(val, dsibclk_nsk) / 4 - 1;
|
||||
val2 = tc358768_ns_to_cnt(tc358768_to_ns((lptxcnt + 1) * dsibclk_nsk),
|
||||
dsibclk_nsk) - 2;
|
||||
val |= val2 << 16;
|
||||
@@ -819,8 +830,7 @@ static void tc358768_bridge_pre_enable(struct drm_bridge *bridge)
|
||||
val = TC358768_DSI_CONFW_MODE_SET | TC358768_DSI_CONFW_ADDR_DSI_CONTROL;
|
||||
val |= (dsi_dev->lanes - 1) << 1;
|
||||
|
||||
if (!(dsi_dev->mode_flags & MIPI_DSI_MODE_LPM))
|
||||
val |= TC358768_DSI_CONTROL_TXMD;
|
||||
val |= TC358768_DSI_CONTROL_TXMD;
|
||||
|
||||
if (!(dsi_dev->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS))
|
||||
val |= TC358768_DSI_CONTROL_HSCKMD;
|
||||
@@ -866,6 +876,44 @@ static void tc358768_bridge_enable(struct drm_bridge *bridge)
|
||||
}
|
||||
}
|
||||
|
||||
#define MAX_INPUT_SEL_FORMATS 1
|
||||
|
||||
static u32 *
|
||||
tc358768_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
|
||||
struct drm_bridge_state *bridge_state,
|
||||
struct drm_crtc_state *crtc_state,
|
||||
struct drm_connector_state *conn_state,
|
||||
u32 output_fmt,
|
||||
unsigned int *num_input_fmts)
|
||||
{
|
||||
struct tc358768_priv *priv = bridge_to_tc358768(bridge);
|
||||
u32 *input_fmts;
|
||||
|
||||
*num_input_fmts = 0;
|
||||
|
||||
input_fmts = kcalloc(MAX_INPUT_SEL_FORMATS, sizeof(*input_fmts),
|
||||
GFP_KERNEL);
|
||||
if (!input_fmts)
|
||||
return NULL;
|
||||
|
||||
switch (priv->pd_lines) {
|
||||
case 16:
|
||||
input_fmts[0] = MEDIA_BUS_FMT_RGB565_1X16;
|
||||
break;
|
||||
case 18:
|
||||
input_fmts[0] = MEDIA_BUS_FMT_RGB666_1X18;
|
||||
break;
|
||||
default:
|
||||
case 24:
|
||||
input_fmts[0] = MEDIA_BUS_FMT_RGB888_1X24;
|
||||
break;
|
||||
};
|
||||
|
||||
*num_input_fmts = MAX_INPUT_SEL_FORMATS;
|
||||
|
||||
return input_fmts;
|
||||
}
|
||||
|
||||
static const struct drm_bridge_funcs tc358768_bridge_funcs = {
|
||||
.attach = tc358768_bridge_attach,
|
||||
.mode_valid = tc358768_bridge_mode_valid,
|
||||
@@ -873,6 +921,11 @@ static const struct drm_bridge_funcs tc358768_bridge_funcs = {
|
||||
.enable = tc358768_bridge_enable,
|
||||
.disable = tc358768_bridge_disable,
|
||||
.post_disable = tc358768_bridge_post_disable,
|
||||
|
||||
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
.atomic_get_input_bus_fmts = tc358768_atomic_get_input_bus_fmts,
|
||||
};
|
||||
|
||||
static const struct drm_bridge_timings default_tc358768_timings = {
|
||||
|
||||
@@ -43,7 +43,7 @@ static const struct drm_gem_object_funcs drm_gem_vram_object_funcs;
|
||||
* the frame's scanout buffer or the cursor image. If there's no more space
|
||||
* left in VRAM, inactive GEM objects can be moved to system memory.
|
||||
*
|
||||
* To initialize the VRAM helper library call drmm_vram_helper_alloc_mm().
|
||||
* To initialize the VRAM helper library call drmm_vram_helper_init().
|
||||
* The function allocates and initializes an instance of &struct drm_vram_mm
|
||||
* in &struct drm_device.vram_mm . Use &DRM_GEM_VRAM_DRIVER to initialize
|
||||
* &struct drm_driver and &DRM_VRAM_MM_FILE_OPERATIONS to initialize
|
||||
@@ -71,7 +71,7 @@ static const struct drm_gem_object_funcs drm_gem_vram_object_funcs;
|
||||
* // setup device, vram base and size
|
||||
* // ...
|
||||
*
|
||||
* ret = drmm_vram_helper_alloc_mm(dev, vram_base, vram_size);
|
||||
* ret = drmm_vram_helper_init(dev, vram_base, vram_size);
|
||||
* if (ret)
|
||||
* return ret;
|
||||
* return 0;
|
||||
@@ -84,7 +84,7 @@ static const struct drm_gem_object_funcs drm_gem_vram_object_funcs;
|
||||
* to userspace.
|
||||
*
|
||||
* You don't have to clean up the instance of VRAM MM.
|
||||
* drmm_vram_helper_alloc_mm() is a managed interface that installs a
|
||||
* drmm_vram_helper_init() is a managed interface that installs a
|
||||
* clean-up handler to run during the DRM device's release.
|
||||
*
|
||||
* For drawing or scanout operations, rsp. buffer objects have to be pinned
|
||||
|
||||
@@ -53,9 +53,13 @@
|
||||
|
||||
#define INTF_SDM845_MASK (0)
|
||||
|
||||
#define INTF_SC7180_MASK BIT(DPU_INTF_INPUT_CTRL) | BIT(DPU_INTF_TE)
|
||||
#define INTF_SC7180_MASK \
|
||||
(BIT(DPU_INTF_INPUT_CTRL) | \
|
||||
BIT(DPU_INTF_TE) | \
|
||||
BIT(DPU_INTF_STATUS_SUPPORTED) | \
|
||||
BIT(DPU_DATA_HCTL_EN))
|
||||
|
||||
#define INTF_SC7280_MASK INTF_SC7180_MASK | BIT(DPU_DATA_HCTL_EN)
|
||||
#define INTF_SC7280_MASK (INTF_SC7180_MASK)
|
||||
|
||||
#define IRQ_SDM845_MASK (BIT(MDP_SSPP_TOP0_INTR) | \
|
||||
BIT(MDP_SSPP_TOP0_INTR2) | \
|
||||
|
||||
@@ -191,17 +191,19 @@ enum {
|
||||
|
||||
/**
|
||||
* INTF sub-blocks
|
||||
* @DPU_INTF_INPUT_CTRL Supports the setting of pp block from which
|
||||
* pixel data arrives to this INTF
|
||||
* @DPU_INTF_TE INTF block has TE configuration support
|
||||
* @DPU_DATA_HCTL_EN Allows data to be transferred at different rate
|
||||
than video timing
|
||||
* @DPU_INTF_INPUT_CTRL Supports the setting of pp block from which
|
||||
* pixel data arrives to this INTF
|
||||
* @DPU_INTF_TE INTF block has TE configuration support
|
||||
* @DPU_DATA_HCTL_EN Allows data to be transferred at different rate
|
||||
* than video timing
|
||||
* @DPU_INTF_STATUS_SUPPORTED INTF block has INTF_STATUS register
|
||||
* @DPU_INTF_MAX
|
||||
*/
|
||||
enum {
|
||||
DPU_INTF_INPUT_CTRL = 0x1,
|
||||
DPU_INTF_TE,
|
||||
DPU_DATA_HCTL_EN,
|
||||
DPU_INTF_STATUS_SUPPORTED,
|
||||
DPU_INTF_MAX
|
||||
};
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
#define INTF_PROG_FETCH_START 0x170
|
||||
#define INTF_PROG_ROT_START 0x174
|
||||
#define INTF_MUX 0x25C
|
||||
#define INTF_STATUS 0x26C
|
||||
|
||||
static const struct dpu_intf_cfg *_intf_offset(enum dpu_intf intf,
|
||||
const struct dpu_mdss_cfg *m,
|
||||
@@ -259,8 +260,13 @@ static void dpu_hw_intf_get_status(
|
||||
struct intf_status *s)
|
||||
{
|
||||
struct dpu_hw_blk_reg_map *c = &intf->hw;
|
||||
unsigned long cap = intf->cap->features;
|
||||
|
||||
if (cap & BIT(DPU_INTF_STATUS_SUPPORTED))
|
||||
s->is_en = DPU_REG_READ(c, INTF_STATUS) & BIT(0);
|
||||
else
|
||||
s->is_en = DPU_REG_READ(c, INTF_TIMING_ENGINE_EN);
|
||||
|
||||
s->is_en = DPU_REG_READ(c, INTF_TIMING_ENGINE_EN);
|
||||
s->is_prog_fetch_en = !!(DPU_REG_READ(c, INTF_CONFIG) & BIT(31));
|
||||
if (s->is_en) {
|
||||
s->frame_count = DPU_REG_READ(c, INTF_FRAME_COUNT);
|
||||
|
||||
@@ -541,6 +541,9 @@ static int dsi_pll_14nm_vco_prepare(struct clk_hw *hw)
|
||||
if (unlikely(pll_14nm->phy->pll_on))
|
||||
return 0;
|
||||
|
||||
if (dsi_pll_14nm_vco_recalc_rate(hw, VCO_REF_CLK_RATE) == 0)
|
||||
dsi_pll_14nm_vco_set_rate(hw, pll_14nm->phy->cfg->min_pll_rate, VCO_REF_CLK_RATE);
|
||||
|
||||
dsi_phy_write(base + REG_DSI_14nm_PHY_PLL_VREF_CFG1, 0x10);
|
||||
dsi_phy_write(cmn_base + REG_DSI_14nm_PHY_CMN_PLL_CNTRL, 1);
|
||||
|
||||
|
||||
@@ -192,15 +192,15 @@ static int sharp_nt_panel_enable(struct drm_panel *panel)
|
||||
}
|
||||
|
||||
static const struct drm_display_mode default_mode = {
|
||||
.clock = 41118,
|
||||
.clock = (540 + 48 + 32 + 80) * (960 + 3 + 10 + 15) * 60 / 1000,
|
||||
.hdisplay = 540,
|
||||
.hsync_start = 540 + 48,
|
||||
.hsync_end = 540 + 48 + 80,
|
||||
.htotal = 540 + 48 + 80 + 32,
|
||||
.hsync_end = 540 + 48 + 32,
|
||||
.htotal = 540 + 48 + 32 + 80,
|
||||
.vdisplay = 960,
|
||||
.vsync_start = 960 + 3,
|
||||
.vsync_end = 960 + 3 + 15,
|
||||
.vtotal = 960 + 3 + 15 + 1,
|
||||
.vsync_end = 960 + 3 + 10,
|
||||
.vtotal = 960 + 3 + 10 + 15,
|
||||
};
|
||||
|
||||
static int sharp_nt_panel_get_modes(struct drm_panel *panel,
|
||||
@@ -280,6 +280,7 @@ static int sharp_nt_panel_probe(struct mipi_dsi_device *dsi)
|
||||
dsi->lanes = 2;
|
||||
dsi->format = MIPI_DSI_FMT_RGB888;
|
||||
dsi->mode_flags = MIPI_DSI_MODE_VIDEO |
|
||||
MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
|
||||
MIPI_DSI_MODE_VIDEO_HSE |
|
||||
MIPI_DSI_CLOCK_NON_CONTINUOUS |
|
||||
MIPI_DSI_MODE_NO_EOT_PACKET;
|
||||
|
||||
@@ -777,21 +777,19 @@ static irqreturn_t sun4i_tcon_handler(int irq, void *private)
|
||||
static int sun4i_tcon_init_clocks(struct device *dev,
|
||||
struct sun4i_tcon *tcon)
|
||||
{
|
||||
tcon->clk = devm_clk_get(dev, "ahb");
|
||||
tcon->clk = devm_clk_get_enabled(dev, "ahb");
|
||||
if (IS_ERR(tcon->clk)) {
|
||||
dev_err(dev, "Couldn't get the TCON bus clock\n");
|
||||
return PTR_ERR(tcon->clk);
|
||||
}
|
||||
clk_prepare_enable(tcon->clk);
|
||||
|
||||
if (tcon->quirks->has_channel_0) {
|
||||
tcon->sclk0 = devm_clk_get(dev, "tcon-ch0");
|
||||
tcon->sclk0 = devm_clk_get_enabled(dev, "tcon-ch0");
|
||||
if (IS_ERR(tcon->sclk0)) {
|
||||
dev_err(dev, "Couldn't get the TCON channel 0 clock\n");
|
||||
return PTR_ERR(tcon->sclk0);
|
||||
}
|
||||
}
|
||||
clk_prepare_enable(tcon->sclk0);
|
||||
|
||||
if (tcon->quirks->has_channel_1) {
|
||||
tcon->sclk1 = devm_clk_get(dev, "tcon-ch1");
|
||||
@@ -804,12 +802,6 @@ static int sun4i_tcon_init_clocks(struct device *dev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sun4i_tcon_free_clocks(struct sun4i_tcon *tcon)
|
||||
{
|
||||
clk_disable_unprepare(tcon->sclk0);
|
||||
clk_disable_unprepare(tcon->clk);
|
||||
}
|
||||
|
||||
static int sun4i_tcon_init_irq(struct device *dev,
|
||||
struct sun4i_tcon *tcon)
|
||||
{
|
||||
@@ -1224,14 +1216,14 @@ static int sun4i_tcon_bind(struct device *dev, struct device *master,
|
||||
ret = sun4i_tcon_init_regmap(dev, tcon);
|
||||
if (ret) {
|
||||
dev_err(dev, "Couldn't init our TCON regmap\n");
|
||||
goto err_free_clocks;
|
||||
goto err_assert_reset;
|
||||
}
|
||||
|
||||
if (tcon->quirks->has_channel_0) {
|
||||
ret = sun4i_dclk_create(dev, tcon);
|
||||
if (ret) {
|
||||
dev_err(dev, "Couldn't create our TCON dot clock\n");
|
||||
goto err_free_clocks;
|
||||
goto err_assert_reset;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1294,8 +1286,6 @@ static int sun4i_tcon_bind(struct device *dev, struct device *master,
|
||||
err_free_dotclock:
|
||||
if (tcon->quirks->has_channel_0)
|
||||
sun4i_dclk_free(tcon);
|
||||
err_free_clocks:
|
||||
sun4i_tcon_free_clocks(tcon);
|
||||
err_assert_reset:
|
||||
reset_control_assert(tcon->lcd_rst);
|
||||
return ret;
|
||||
@@ -1309,7 +1299,6 @@ static void sun4i_tcon_unbind(struct device *dev, struct device *master,
|
||||
list_del(&tcon->list);
|
||||
if (tcon->quirks->has_channel_0)
|
||||
sun4i_dclk_free(tcon);
|
||||
sun4i_tcon_free_clocks(tcon);
|
||||
}
|
||||
|
||||
static const struct component_ops sun4i_tcon_ops = {
|
||||
|
||||
@@ -331,15 +331,21 @@ static void bnxt_re_start_irq(void *handle, struct bnxt_msix_entry *ent)
|
||||
for (indx = 0; indx < rdev->num_msix; indx++)
|
||||
rdev->msix_entries[indx].vector = ent[indx].vector;
|
||||
|
||||
bnxt_qplib_rcfw_start_irq(rcfw, msix_ent[BNXT_RE_AEQ_IDX].vector,
|
||||
false);
|
||||
rc = bnxt_qplib_rcfw_start_irq(rcfw, msix_ent[BNXT_RE_AEQ_IDX].vector,
|
||||
false);
|
||||
if (rc) {
|
||||
ibdev_warn(&rdev->ibdev, "Failed to reinit CREQ\n");
|
||||
return;
|
||||
}
|
||||
for (indx = BNXT_RE_NQ_IDX ; indx < rdev->num_msix; indx++) {
|
||||
nq = &rdev->nq[indx - 1];
|
||||
rc = bnxt_qplib_nq_start_irq(nq, indx - 1,
|
||||
msix_ent[indx].vector, false);
|
||||
if (rc)
|
||||
if (rc) {
|
||||
ibdev_warn(&rdev->ibdev, "Failed to reinit NQ index %d\n",
|
||||
indx - 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1173,12 +1179,6 @@ static int bnxt_re_update_gid(struct bnxt_re_dev *rdev)
|
||||
if (!ib_device_try_get(&rdev->ibdev))
|
||||
return 0;
|
||||
|
||||
if (!sgid_tbl) {
|
||||
ibdev_err(&rdev->ibdev, "QPLIB: SGID table not allocated");
|
||||
rc = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
for (index = 0; index < sgid_tbl->active; index++) {
|
||||
gid_idx = sgid_tbl->hw_id[index];
|
||||
|
||||
@@ -1196,7 +1196,7 @@ static int bnxt_re_update_gid(struct bnxt_re_dev *rdev)
|
||||
rc = bnxt_qplib_update_sgid(sgid_tbl, &gid, gid_idx,
|
||||
rdev->qplib_res.netdev->dev_addr);
|
||||
}
|
||||
out:
|
||||
|
||||
ib_device_put(&rdev->ibdev);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -404,6 +404,9 @@ static irqreturn_t bnxt_qplib_nq_irq(int irq, void *dev_instance)
|
||||
|
||||
void bnxt_qplib_nq_stop_irq(struct bnxt_qplib_nq *nq, bool kill)
|
||||
{
|
||||
if (!nq->requested)
|
||||
return;
|
||||
|
||||
tasklet_disable(&nq->nq_tasklet);
|
||||
/* Mask h/w interrupt */
|
||||
bnxt_qplib_ring_nq_db(&nq->nq_db.dbinfo, nq->res->cctx, false);
|
||||
@@ -411,11 +414,12 @@ void bnxt_qplib_nq_stop_irq(struct bnxt_qplib_nq *nq, bool kill)
|
||||
synchronize_irq(nq->msix_vec);
|
||||
if (kill)
|
||||
tasklet_kill(&nq->nq_tasklet);
|
||||
if (nq->requested) {
|
||||
irq_set_affinity_hint(nq->msix_vec, NULL);
|
||||
free_irq(nq->msix_vec, nq);
|
||||
nq->requested = false;
|
||||
}
|
||||
|
||||
irq_set_affinity_hint(nq->msix_vec, NULL);
|
||||
free_irq(nq->msix_vec, nq);
|
||||
kfree(nq->name);
|
||||
nq->name = NULL;
|
||||
nq->requested = false;
|
||||
}
|
||||
|
||||
void bnxt_qplib_disable_nq(struct bnxt_qplib_nq *nq)
|
||||
@@ -441,6 +445,7 @@ void bnxt_qplib_disable_nq(struct bnxt_qplib_nq *nq)
|
||||
int bnxt_qplib_nq_start_irq(struct bnxt_qplib_nq *nq, int nq_indx,
|
||||
int msix_vector, bool need_init)
|
||||
{
|
||||
struct bnxt_qplib_res *res = nq->res;
|
||||
int rc;
|
||||
|
||||
if (nq->requested)
|
||||
@@ -452,10 +457,17 @@ int bnxt_qplib_nq_start_irq(struct bnxt_qplib_nq *nq, int nq_indx,
|
||||
else
|
||||
tasklet_enable(&nq->nq_tasklet);
|
||||
|
||||
snprintf(nq->name, sizeof(nq->name), "bnxt_qplib_nq-%d", nq_indx);
|
||||
nq->name = kasprintf(GFP_KERNEL, "bnxt_re-nq-%d@pci:%s",
|
||||
nq_indx, pci_name(res->pdev));
|
||||
if (!nq->name)
|
||||
return -ENOMEM;
|
||||
rc = request_irq(nq->msix_vec, bnxt_qplib_nq_irq, 0, nq->name, nq);
|
||||
if (rc)
|
||||
if (rc) {
|
||||
kfree(nq->name);
|
||||
nq->name = NULL;
|
||||
tasklet_disable(&nq->nq_tasklet);
|
||||
return rc;
|
||||
}
|
||||
|
||||
cpumask_clear(&nq->mask);
|
||||
cpumask_set_cpu(nq_indx, &nq->mask);
|
||||
@@ -466,7 +478,7 @@ int bnxt_qplib_nq_start_irq(struct bnxt_qplib_nq *nq, int nq_indx,
|
||||
nq->msix_vec, nq_indx);
|
||||
}
|
||||
nq->requested = true;
|
||||
bnxt_qplib_ring_nq_db(&nq->nq_db.dbinfo, nq->res->cctx, true);
|
||||
bnxt_qplib_ring_nq_db(&nq->nq_db.dbinfo, res->cctx, true);
|
||||
|
||||
return rc;
|
||||
}
|
||||
@@ -1599,7 +1611,7 @@ static int bnxt_qplib_put_inline(struct bnxt_qplib_qp *qp,
|
||||
il_src = (void *)wqe->sg_list[indx].addr;
|
||||
t_len += len;
|
||||
if (t_len > qp->max_inline_data)
|
||||
goto bad;
|
||||
return -ENOMEM;
|
||||
while (len) {
|
||||
if (pull_dst) {
|
||||
pull_dst = false;
|
||||
@@ -1623,8 +1635,6 @@ static int bnxt_qplib_put_inline(struct bnxt_qplib_qp *qp,
|
||||
}
|
||||
|
||||
return t_len;
|
||||
bad:
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
static u32 bnxt_qplib_put_sges(struct bnxt_qplib_hwq *hwq,
|
||||
@@ -2054,7 +2064,7 @@ int bnxt_qplib_create_cq(struct bnxt_qplib_res *res, struct bnxt_qplib_cq *cq)
|
||||
hwq_attr.sginfo = &cq->sg_info;
|
||||
rc = bnxt_qplib_alloc_init_hwq(&cq->hwq, &hwq_attr);
|
||||
if (rc)
|
||||
goto exit;
|
||||
return rc;
|
||||
|
||||
RCFW_CMD_PREP(req, CREATE_CQ, cmd_flags);
|
||||
|
||||
@@ -2095,7 +2105,6 @@ int bnxt_qplib_create_cq(struct bnxt_qplib_res *res, struct bnxt_qplib_cq *cq)
|
||||
|
||||
fail:
|
||||
bnxt_qplib_free_hwq(res, &cq->hwq);
|
||||
exit:
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -2723,11 +2732,8 @@ static int bnxt_qplib_cq_process_terminal(struct bnxt_qplib_cq *cq,
|
||||
|
||||
qp = (struct bnxt_qplib_qp *)((unsigned long)
|
||||
le64_to_cpu(hwcqe->qp_handle));
|
||||
if (!qp) {
|
||||
dev_err(&cq->hwq.pdev->dev,
|
||||
"FP: CQ Process terminal qp is NULL\n");
|
||||
if (!qp)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Must block new posting of SQ and RQ */
|
||||
qp->state = CMDQ_MODIFY_QP_NEW_STATE_ERR;
|
||||
|
||||
@@ -471,7 +471,7 @@ typedef int (*srqn_handler_t)(struct bnxt_qplib_nq *nq,
|
||||
struct bnxt_qplib_nq {
|
||||
struct pci_dev *pdev;
|
||||
struct bnxt_qplib_res *res;
|
||||
char name[32];
|
||||
char *name;
|
||||
struct bnxt_qplib_hwq hwq;
|
||||
struct bnxt_qplib_nq_db nq_db;
|
||||
u16 ring_id;
|
||||
|
||||
@@ -637,6 +637,10 @@ void bnxt_qplib_rcfw_stop_irq(struct bnxt_qplib_rcfw *rcfw, bool kill)
|
||||
struct bnxt_qplib_creq_ctx *creq;
|
||||
|
||||
creq = &rcfw->creq;
|
||||
|
||||
if (!creq->requested)
|
||||
return;
|
||||
|
||||
tasklet_disable(&creq->creq_tasklet);
|
||||
/* Mask h/w interrupts */
|
||||
bnxt_qplib_ring_nq_db(&creq->creq_db.dbinfo, rcfw->res->cctx, false);
|
||||
@@ -645,10 +649,10 @@ void bnxt_qplib_rcfw_stop_irq(struct bnxt_qplib_rcfw *rcfw, bool kill)
|
||||
if (kill)
|
||||
tasklet_kill(&creq->creq_tasklet);
|
||||
|
||||
if (creq->requested) {
|
||||
free_irq(creq->msix_vec, rcfw);
|
||||
creq->requested = false;
|
||||
}
|
||||
free_irq(creq->msix_vec, rcfw);
|
||||
kfree(creq->irq_name);
|
||||
creq->irq_name = NULL;
|
||||
creq->requested = false;
|
||||
}
|
||||
|
||||
void bnxt_qplib_disable_rcfw_channel(struct bnxt_qplib_rcfw *rcfw)
|
||||
@@ -680,9 +684,11 @@ int bnxt_qplib_rcfw_start_irq(struct bnxt_qplib_rcfw *rcfw, int msix_vector,
|
||||
bool need_init)
|
||||
{
|
||||
struct bnxt_qplib_creq_ctx *creq;
|
||||
struct bnxt_qplib_res *res;
|
||||
int rc;
|
||||
|
||||
creq = &rcfw->creq;
|
||||
res = rcfw->res;
|
||||
|
||||
if (creq->requested)
|
||||
return -EFAULT;
|
||||
@@ -692,13 +698,22 @@ int bnxt_qplib_rcfw_start_irq(struct bnxt_qplib_rcfw *rcfw, int msix_vector,
|
||||
tasklet_setup(&creq->creq_tasklet, bnxt_qplib_service_creq);
|
||||
else
|
||||
tasklet_enable(&creq->creq_tasklet);
|
||||
|
||||
creq->irq_name = kasprintf(GFP_KERNEL, "bnxt_re-creq@pci:%s",
|
||||
pci_name(res->pdev));
|
||||
if (!creq->irq_name)
|
||||
return -ENOMEM;
|
||||
rc = request_irq(creq->msix_vec, bnxt_qplib_creq_irq, 0,
|
||||
"bnxt_qplib_creq", rcfw);
|
||||
if (rc)
|
||||
creq->irq_name, rcfw);
|
||||
if (rc) {
|
||||
kfree(creq->irq_name);
|
||||
creq->irq_name = NULL;
|
||||
tasklet_disable(&creq->creq_tasklet);
|
||||
return rc;
|
||||
}
|
||||
creq->requested = true;
|
||||
|
||||
bnxt_qplib_ring_nq_db(&creq->creq_db.dbinfo, rcfw->res->cctx, true);
|
||||
bnxt_qplib_ring_nq_db(&creq->creq_db.dbinfo, res->cctx, true);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -174,6 +174,7 @@ struct bnxt_qplib_creq_ctx {
|
||||
u16 ring_id;
|
||||
int msix_vec;
|
||||
bool requested; /*irq handler installed */
|
||||
char *irq_name;
|
||||
};
|
||||
|
||||
/* RCFW Communication Channels */
|
||||
|
||||
@@ -811,8 +811,7 @@ struct adxl34x *adxl34x_probe(struct device *dev, int irq,
|
||||
AC_WRITE(ac, POWER_CTL, 0);
|
||||
|
||||
err = request_threaded_irq(ac->irq, NULL, adxl34x_irq,
|
||||
IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
|
||||
dev_name(dev), ac);
|
||||
IRQF_ONESHOT, dev_name(dev), ac);
|
||||
if (err) {
|
||||
dev_err(dev, "irq %d busy?\n", ac->irq);
|
||||
goto err_free_mem;
|
||||
|
||||
Reference in New Issue
Block a user