summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aca7771)
raw | patch | inline | side by side (parent: aca7771)
author | Keerthy <j-keerthy@ti.com> | |
Mon, 16 Sep 2019 20:13:36 +0000 (20:13 +0000) | ||
committer | Suman Anna <s-anna@ti.com> | |
Mon, 23 Sep 2019 01:47:30 +0000 (20:47 -0500) |
Add a new .device_is_enabled() platform data callback ops to both
the OMAP IOMMU and remoteproc devices to check if the corresponding
omap_device/hwmod is already enabled. This helps the OMAP IOMMU and
remoteproc drivers to figure out if the corresponding processors
have already been loaded and booted by bootloaders.
Signed-off-by: Keerthy <j-keerthy@ti.com>
[s-anna@ti.com: minor cleanups]
Signed-off-by: Suman Anna <s-anna@ti.com>
the OMAP IOMMU and remoteproc devices to check if the corresponding
omap_device/hwmod is already enabled. This helps the OMAP IOMMU and
remoteproc drivers to figure out if the corresponding processors
have already been loaded and booted by bootloaders.
Signed-off-by: Keerthy <j-keerthy@ti.com>
[s-anna@ti.com: minor cleanups]
Signed-off-by: Suman Anna <s-anna@ti.com>
arch/arm/mach-omap2/pdata-quirks.c | patch | blob | history | |
include/linux/platform_data/iommu-omap.h | patch | blob | history | |
include/linux/platform_data/remoteproc-omap.h | patch | blob | history |
index 9b6aec1fef88ac37300a6daf8226a0e019195a01..26695fa2c9b71980590e55b8d987fe0973e46c28 100644 (file)
static struct of_dev_auxdata omap_auxdata_lookup[];
static struct twl4030_gpio_platform_data twl_gpio_auxdata;
+static bool __maybe_unused omap_device_is_enabled(struct platform_device *pdev)
+{
+ struct omap_device *od = to_omap_device(pdev);
+
+ if (od->_state == OMAP_DEVICE_STATE_ENABLED)
+ return true;
+ else
+ return false;
+}
+
#if IS_ENABLED(CONFIG_OMAP_IOMMU)
+
int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, bool request,
u8 *pwrst);
#else
static struct omap_rproc_pdata omap4_ipu_dsp_pdata = {
.device_enable = omap_rproc_device_enable,
.device_shutdown = omap_rproc_device_shutdown,
+ .device_is_enabled = omap_device_is_enabled,
};
#endif
.deassert_reset = omap_device_deassert_hardreset,
.device_enable = omap_device_enable,
.device_idle = omap_device_idle,
+ .device_is_enabled = omap_device_is_enabled,
};
#endif
.assert_reset = omap_device_assert_hardreset,
.deassert_reset = omap_device_deassert_hardreset,
.device_enable = omap_device_enable,
+ .device_is_enabled = omap_device_is_enabled,
.device_idle = omap_device_idle,
.set_pwrdm_constraint = omap_iommu_set_pwrdm_constraint,
};
index 6669dc9394daafd33547d2fcc4e4a750687630ac..1ce96b23c55d271292466f831649801fe24917d4 100644 (file)
int (*assert_reset)(struct platform_device *pdev, const char *name);
int (*deassert_reset)(struct platform_device *pdev, const char *name);
int (*device_enable)(struct platform_device *pdev);
+ bool (*device_is_enabled)(struct platform_device *pdev);
int (*device_idle)(struct platform_device *pdev);
int (*set_pwrdm_constraint)(struct platform_device *pdev, bool request,
u8 *pwrst);
diff --git a/include/linux/platform_data/remoteproc-omap.h b/include/linux/platform_data/remoteproc-omap.h
index 55e3c007e264f2f3591283be422e6c54594e070a..e1b255ca350361e4d01d86b46e6067289b602f0e 100644 (file)
* struct omap_rproc_pdata - omap remoteproc's platform data
* @device_enable: omap-specific handler for enabling a device
* @device_shutdown: omap-specific handler for shutting down a device
+ * @device_is_enabled: omap-specific handler to check if device is booted
*/
struct omap_rproc_pdata {
int (*device_enable)(struct platform_device *pdev);
int (*device_shutdown)(struct platform_device *pdev);
+ bool (*device_is_enabled)(struct platform_device *pdev);
};
#endif /* _PLAT_REMOTEPROC_H */