Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 720c3bb8 authored by Rob Clark's avatar Rob Clark
Browse files

drm/msm: drop _clk suffix from clk names



Suggested by Rob Herring.  We still support the old names for
compatibility with downstream android dt files.

Cc: Rob Herring <robh@kernel.org>
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
Reviewed-by: default avatarEric Anholt <eric@anholt.net>
Acked-by: default avatarRob Herring <robh@kernel.org>
parent 4e09b95d
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -11,9 +11,9 @@ Required properties:
- clocks: device clocks
- clocks: device clocks
  See ../clocks/clock-bindings.txt for details.
  See ../clocks/clock-bindings.txt for details.
- clock-names: the following clocks are required:
- clock-names: the following clocks are required:
  * "core_clk"
  * "core"
  * "iface_clk"
  * "iface"
  * "mem_iface_clk"
  * "mem_iface"


Example:
Example:


@@ -27,9 +27,9 @@ Example:
		interrupts = <GIC_SPI 80 0>;
		interrupts = <GIC_SPI 80 0>;
		interrupt-names = "kgsl_3d0_irq";
		interrupt-names = "kgsl_3d0_irq";
		clock-names =
		clock-names =
		    "core_clk",
		    "core",
		    "iface_clk",
		    "iface",
		    "mem_iface_clk";
		    "mem_iface";
		clocks =
		clocks =
		    <&mmcc GFX3D_CLK>,
		    <&mmcc GFX3D_CLK>,
		    <&mmcc GFX3D_AHB_CLK>,
		    <&mmcc GFX3D_AHB_CLK>,
+19 −0
Original line number Original line Diff line number Diff line
@@ -91,6 +91,25 @@ module_param(dumpstate, bool, 0600);
 * Util/helpers:
 * Util/helpers:
 */
 */


struct clk *msm_clk_get(struct platform_device *pdev, const char *name)
{
	struct clk *clk;
	char name2[32];

	clk = devm_clk_get(&pdev->dev, name);
	if (!IS_ERR(clk) || PTR_ERR(clk) == -EPROBE_DEFER)
		return clk;

	snprintf(name2, sizeof(name2), "%s_clk", name);

	clk = devm_clk_get(&pdev->dev, name2);
	if (!IS_ERR(clk))
		dev_warn(&pdev->dev, "Using legacy clk name binding.  Use "
				"\"%s\" instead of \"%s\"\n", name, name2);

	return clk;
}

void __iomem *msm_ioremap(struct platform_device *pdev, const char *name,
void __iomem *msm_ioremap(struct platform_device *pdev, const char *name,
		const char *dbgname)
		const char *dbgname)
{
{
+1 −0
Original line number Original line Diff line number Diff line
@@ -318,6 +318,7 @@ static inline int msm_debugfs_late_init(struct drm_device *dev) { return 0; }
static inline void msm_rd_dump_submit(struct msm_gem_submit *submit) {}
static inline void msm_rd_dump_submit(struct msm_gem_submit *submit) {}
#endif
#endif


struct clk *msm_clk_get(struct platform_device *pdev, const char *name);
void __iomem *msm_ioremap(struct platform_device *pdev, const char *name,
void __iomem *msm_ioremap(struct platform_device *pdev, const char *name,
		const char *dbgname);
		const char *dbgname);
void msm_writel(u32 data, void __iomem *addr);
void msm_writel(u32 data, void __iomem *addr);
+3 −4
Original line number Original line Diff line number Diff line
@@ -560,8 +560,7 @@ static irqreturn_t irq_handler(int irq, void *data)
}
}


static const char *clk_names[] = {
static const char *clk_names[] = {
		"core_clk", "iface_clk", "rbbmtimer_clk", "mem_clk",
	"core", "iface", "rbbmtimer", "mem", "mem_iface", "alt_mem_iface",
		"mem_iface_clk", "alt_mem_iface_clk",
};
};


int msm_gpu_init(struct drm_device *drm, struct platform_device *pdev,
int msm_gpu_init(struct drm_device *drm, struct platform_device *pdev,
@@ -625,13 +624,13 @@ int msm_gpu_init(struct drm_device *drm, struct platform_device *pdev,


	/* Acquire clocks: */
	/* Acquire clocks: */
	for (i = 0; i < ARRAY_SIZE(clk_names); i++) {
	for (i = 0; i < ARRAY_SIZE(clk_names); i++) {
		gpu->grp_clks[i] = devm_clk_get(&pdev->dev, clk_names[i]);
		gpu->grp_clks[i] = msm_clk_get(pdev, clk_names[i]);
		DBG("grp_clks[%s]: %p", clk_names[i], gpu->grp_clks[i]);
		DBG("grp_clks[%s]: %p", clk_names[i], gpu->grp_clks[i]);
		if (IS_ERR(gpu->grp_clks[i]))
		if (IS_ERR(gpu->grp_clks[i]))
			gpu->grp_clks[i] = NULL;
			gpu->grp_clks[i] = NULL;
	}
	}


	gpu->ebi1_clk = devm_clk_get(&pdev->dev, "bus_clk");
	gpu->ebi1_clk = msm_clk_get(pdev, "bus");
	DBG("ebi1_clk: %p", gpu->ebi1_clk);
	DBG("ebi1_clk: %p", gpu->ebi1_clk);
	if (IS_ERR(gpu->ebi1_clk))
	if (IS_ERR(gpu->ebi1_clk))
		gpu->ebi1_clk = NULL;
		gpu->ebi1_clk = NULL;