Quoting Jonas Gorski (2019-05-02 05:26:56) > Add a driver for the gated clock controller found on MIPS based BCM63XX > SoCs. > > Signed-off-by: Jonas Gorski <jonas.gorski@xxxxxxxxx> > --- Applied to clk-next with some extra fixes diff --git a/drivers/clk/bcm/clk-bcm63xx-gate.c b/drivers/clk/bcm/clk-bcm63xx-gate.c index 4fd10645a192..9e1dcd43258c 100644 --- a/drivers/clk/bcm/clk-bcm63xx-gate.c +++ b/drivers/clk/bcm/clk-bcm63xx-gate.c @@ -1,8 +1,7 @@ -/* SPDX-License-Identifier: GPL-2.0 */ +// SPDX-License-Identifier: GPL-2.0 #include <linux/clk-provider.h> #include <linux/init.h> -#include <linux/module.h> #include <linux/of.h> #include <linux/of_device.h> #include <linux/platform_device.h> @@ -20,7 +19,7 @@ struct clk_bcm63xx_hw { struct clk_hw_onecell_data data; }; -const struct clk_bcm63xx_table_entry bcm3368_clocks[] = { +static const struct clk_bcm63xx_table_entry bcm3368_clocks[] = { { .name = "mac", .bit = 3, }, { .name = "tc", .bit = 5, }, { .name = "us_top", .bit = 6, }, @@ -41,7 +40,7 @@ const struct clk_bcm63xx_table_entry bcm3368_clocks[] = { { }, }; -const struct clk_bcm63xx_table_entry bcm6328_clocks[] = { +static const struct clk_bcm63xx_table_entry bcm6328_clocks[] = { { .name = "phy_mips", .bit = 0, }, { .name = "adsl_qproc", .bit = 1, }, { .name = "adsl_afe", .bit = 2, }, @@ -57,7 +56,7 @@ const struct clk_bcm63xx_table_entry bcm6328_clocks[] = { { }, }; -const struct clk_bcm63xx_table_entry bcm6358_clocks[] = { +static const struct clk_bcm63xx_table_entry bcm6358_clocks[] = { { .name = "enet", .bit = 4, }, { .name = "adslphy", .bit = 5, }, { .name = "pcm", .bit = 8, }, @@ -72,7 +71,7 @@ const struct clk_bcm63xx_table_entry bcm6358_clocks[] = { { }, }; -const struct clk_bcm63xx_table_entry bcm6362_clocks[] = { +static const struct clk_bcm63xx_table_entry bcm6362_clocks[] = { { .name = "adsl_qproc", .bit = 1, }, { .name = "adsl_afe", .bit = 2, }, { .name = "adsl", .bit = 3, }, @@ -95,7 +94,7 @@ const struct clk_bcm63xx_table_entry bcm6362_clocks[] = { { }, }; -const struct clk_bcm63xx_table_entry bcm6368_clocks[] = { +static const struct clk_bcm63xx_table_entry bcm6368_clocks[] = { { .name = "vdsl_qproc", .bit = 2, }, { .name = "vdsl_afe", .bit = 3, }, { .name = "vdsl_bonding", .bit = 4, }, @@ -116,7 +115,7 @@ const struct clk_bcm63xx_table_entry bcm6368_clocks[] = { { }, }; -const struct clk_bcm63xx_table_entry bcm63268_clocks[] = { +static const struct clk_bcm63xx_table_entry bcm63268_clocks[] = { { .name = "disable_gless", .bit = 0, }, { .name = "vdsl_qproc", .bit = 1, }, { .name = "vdsl_afe", .bit = 2, }, @@ -225,22 +224,15 @@ static const struct of_device_id clk_bcm63xx_dt_ids[] = { { .compatible = "brcm,bcm6362-clocks", .data = &bcm6362_clocks, }, { .compatible = "brcm,bcm6368-clocks", .data = &bcm6368_clocks, }, { .compatible = "brcm,bcm63268-clocks", .data = &bcm63268_clocks, }, - { }, + { } }; -MODULE_DEVICE_TABLE(of, clk_bcm63xx_dt_ids); - static struct platform_driver clk_bcm63xx = { .probe = clk_bcm63xx_probe, .remove = clk_bcm63xx_remove, .driver = { .name = "bcm63xx-clock", - .of_match_table = of_match_ptr(clk_bcm63xx_dt_ids), + .of_match_table = clk_bcm63xx_dt_ids, }, }; - builtin_platform_driver(clk_bcm63xx); - -MODULE_AUTHOR("Jonas Gorski <jonas.gorski@xxxxxxxxx>"); -MODULE_DESCRIPTION("BCM63XX (MIPS) gated clock controller driver"); -MODULE_LICENSE("GPL");