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

Commit d1d28597 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Daniel Lezcano
Browse files

clocksource/drivers/sh_cmt: Remove unused "renesas, channels-mask" handling



The in-driver channel configuration in sh_cmt_info.channels_mask is now
always set for all CMT devices instantiated from DT.

Hence the "renesas,channels-mask" property is no longer checked, and its
handling can be removed, cfr. commit 4e18111f ("devicetree:
bindings: Remove deprecated properties").

Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent 8d50e947
Loading
Loading
Loading
Loading
+1 −17
Original line number Diff line number Diff line
@@ -946,14 +946,6 @@ static const struct of_device_id sh_cmt_of_table[] __maybe_unused = {
};
MODULE_DEVICE_TABLE(of, sh_cmt_of_table);

static int sh_cmt_parse_dt(struct sh_cmt_device *cmt)
{
	struct device_node *np = cmt->pdev->dev.of_node;

	return of_property_read_u32(np, "renesas,channels-mask",
				    &cmt->hw_channels);
}

static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
{
	unsigned int mask;
@@ -968,15 +960,7 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)

		id = of_match_node(sh_cmt_of_table, pdev->dev.of_node);
		cmt->info = id->data;

		/* prefer in-driver channel configuration over DT */
		if (cmt->info->channels_mask) {
		cmt->hw_channels = cmt->info->channels_mask;
		} else {
			ret = sh_cmt_parse_dt(cmt);
			if (ret < 0)
				return ret;
		}
	} else if (pdev->dev.platform_data) {
		struct sh_timer_config *cfg = pdev->dev.platform_data;
		const struct platform_device_id *id = pdev->id_entry;