drm/v3d: Add support for V3D v4.2.
No compatible string for it yet, just the version-dependent changes. They've now tied the hub and the core interrupt lines into a single interrupt line coming out of the block. It also turns out I made a mistake in modeling the V3D v3.3 and v4.1 bridge as a part of V3D itself -- the bridge is going away in favor of an external reset controller in a larger HW module. v2: Use consistent checks for whether we're on 4.2, and fix a leak in an error path. v3: Use more general means of determining if the current 4.2 changes are in place, as apparently other platforms may switch back (noted by Dave). Update the binding doc. v4: Improve error handling for IRQ init. Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20190308174336.7866-2-eric@anholt.net Reviewed-by: Dave Emett <david.emett@broadcom.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/reset.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/sched/signal.h>
|
||||
@@ -70,7 +71,7 @@ v3d_idle_gca(struct v3d_dev *v3d)
|
||||
}
|
||||
|
||||
static void
|
||||
v3d_reset_v3d(struct v3d_dev *v3d)
|
||||
v3d_reset_by_bridge(struct v3d_dev *v3d)
|
||||
{
|
||||
int version = V3D_BRIDGE_READ(V3D_TOP_GR_BRIDGE_REVISION);
|
||||
|
||||
@@ -90,6 +91,15 @@ v3d_reset_v3d(struct v3d_dev *v3d)
|
||||
V3D_TOP_GR_BRIDGE_SW_INIT_1_V3D_CLK_108_SW_INIT);
|
||||
V3D_BRIDGE_WRITE(V3D_TOP_GR_BRIDGE_SW_INIT_1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
v3d_reset_v3d(struct v3d_dev *v3d)
|
||||
{
|
||||
if (v3d->reset)
|
||||
reset_control_reset(v3d->reset);
|
||||
else
|
||||
v3d_reset_by_bridge(v3d);
|
||||
|
||||
v3d_init_hw_state(v3d);
|
||||
}
|
||||
|
Reference in New Issue
Block a user