diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2017-09-18 09:46:46 -0400 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2017-10-19 17:48:58 -0400 |
commit | d1d285972e24b63eeee8118359dcd4c451b295c5 (patch) | |
tree | a33ed7e53b926934070934972f86463838c2f721 | |
parent | 8d50e9476bb4aea53fca12637e71d950deafdf37 (diff) |
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 4e18111ff38f0664 ("devicetree:
bindings: Remove deprecated properties").
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r-- | drivers/clocksource/sh_cmt.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c index 61a922509706..89c514cf59a4 100644 --- a/drivers/clocksource/sh_cmt.c +++ b/drivers/clocksource/sh_cmt.c | |||
@@ -946,14 +946,6 @@ static const struct of_device_id sh_cmt_of_table[] __maybe_unused = { | |||
946 | }; | 946 | }; |
947 | MODULE_DEVICE_TABLE(of, sh_cmt_of_table); | 947 | MODULE_DEVICE_TABLE(of, sh_cmt_of_table); |
948 | 948 | ||
949 | static int sh_cmt_parse_dt(struct sh_cmt_device *cmt) | ||
950 | { | ||
951 | struct device_node *np = cmt->pdev->dev.of_node; | ||
952 | |||
953 | return of_property_read_u32(np, "renesas,channels-mask", | ||
954 | &cmt->hw_channels); | ||
955 | } | ||
956 | |||
957 | static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev) | 949 | static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev) |
958 | { | 950 | { |
959 | unsigned int mask; | 951 | unsigned int mask; |
@@ -968,15 +960,7 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev) | |||
968 | 960 | ||
969 | id = of_match_node(sh_cmt_of_table, pdev->dev.of_node); | 961 | id = of_match_node(sh_cmt_of_table, pdev->dev.of_node); |
970 | cmt->info = id->data; | 962 | cmt->info = id->data; |
971 | 963 | cmt->hw_channels = cmt->info->channels_mask; | |
972 | /* prefer in-driver channel configuration over DT */ | ||
973 | if (cmt->info->channels_mask) { | ||
974 | cmt->hw_channels = cmt->info->channels_mask; | ||
975 | } else { | ||
976 | ret = sh_cmt_parse_dt(cmt); | ||
977 | if (ret < 0) | ||
978 | return ret; | ||
979 | } | ||
980 | } else if (pdev->dev.platform_data) { | 964 | } else if (pdev->dev.platform_data) { |
981 | struct sh_timer_config *cfg = pdev->dev.platform_data; | 965 | struct sh_timer_config *cfg = pdev->dev.platform_data; |
982 | const struct platform_device_id *id = pdev->id_entry; | 966 | const struct platform_device_id *id = pdev->id_entry; |