| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- /*
- * Copyright (c) 2015 MediaTek Inc.
- * Author: James Liao <jamesjj.liao@mediatek.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
- #include <linux/clk.h>
- #include <linux/kernel.h>
- #include <linux/module.h>
- #include <linux/of.h>
- #include <linux/of_platform.h>
- static const struct of_device_id bring_up_id_table[] = {
- { .compatible = "mediatek,clk-bring-up",},
- { .compatible = "mediatek,mt8163-bring-up",},
- { .compatible = "mediatek,mt8173-bring-up",},
- { },
- };
- MODULE_DEVICE_TABLE(of, bring_up_id_table);
- static int bring_up_probe(struct platform_device *pdev)
- {
- const int NR_CLKS = 300;
- char clk_name_buf[16];
- struct clk *clk;
- int i;
- for (i = 0; i < NR_CLKS; i++) {
- sprintf(clk_name_buf, "%d", i);
- clk = devm_clk_get(&pdev->dev, clk_name_buf);
- if (!IS_ERR(clk))
- clk_prepare_enable(clk);
- }
- return 0;
- }
- static int bring_up_remove(struct platform_device *pdev)
- {
- return 0;
- }
- static struct platform_driver bring_up = {
- .probe = bring_up_probe,
- .remove = bring_up_remove,
- .driver = {
- .name = "bring_up",
- .owner = THIS_MODULE,
- .of_match_table = bring_up_id_table,
- },
- };
- module_platform_driver(bring_up);
|