18f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad/* 28f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. 38f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad * 48f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad * This program is free software; you can redistribute it and/or modify it 58f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad * under the terms and conditions of the GNU General Public License, 68f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad * version 2, as published by the Free Software Foundation. 78f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad * 88f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad * This program is distributed in the hope it will be useful, but WITHOUT 98f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 108f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 118f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad * more details. 128f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad * 138f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad * You should have received a copy of the GNU General Public License 148f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad * along with this program. If not, see <http://www.gnu.org/licenses/>. 158f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad */ 168f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 178f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad#include <linux/clk.h> 188f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad#include <linux/clk-provider.h> 194dd59cdd35506b77ed4ebf4bb90347d7653ba585Thierry Reding#include <linux/export.h> 208f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad#include <linux/slab.h> 218f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad#include <linux/err.h> 228f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 238f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad#include "clk.h" 248f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 258f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwadstatic u8 clk_periph_get_parent(struct clk_hw *hw) 268f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad{ 278f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad struct tegra_clk_periph *periph = to_clk_periph(hw); 288f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad const struct clk_ops *mux_ops = periph->mux_ops; 298f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad struct clk_hw *mux_hw = &periph->mux.hw; 308f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 318f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad mux_hw->clk = hw->clk; 328f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 338f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad return mux_ops->get_parent(mux_hw); 348f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad} 358f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 368f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwadstatic int clk_periph_set_parent(struct clk_hw *hw, u8 index) 378f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad{ 388f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad struct tegra_clk_periph *periph = to_clk_periph(hw); 398f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad const struct clk_ops *mux_ops = periph->mux_ops; 408f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad struct clk_hw *mux_hw = &periph->mux.hw; 418f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 428f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad mux_hw->clk = hw->clk; 438f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 448f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad return mux_ops->set_parent(mux_hw, index); 458f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad} 468f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 478f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwadstatic unsigned long clk_periph_recalc_rate(struct clk_hw *hw, 488f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad unsigned long parent_rate) 498f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad{ 508f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad struct tegra_clk_periph *periph = to_clk_periph(hw); 518f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad const struct clk_ops *div_ops = periph->div_ops; 528f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad struct clk_hw *div_hw = &periph->divider.hw; 538f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 548f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad div_hw->clk = hw->clk; 558f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 568f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad return div_ops->recalc_rate(div_hw, parent_rate); 578f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad} 588f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 598f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwadstatic long clk_periph_round_rate(struct clk_hw *hw, unsigned long rate, 608f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad unsigned long *prate) 618f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad{ 628f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad struct tegra_clk_periph *periph = to_clk_periph(hw); 638f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad const struct clk_ops *div_ops = periph->div_ops; 648f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad struct clk_hw *div_hw = &periph->divider.hw; 658f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 668f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad div_hw->clk = hw->clk; 678f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 688f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad return div_ops->round_rate(div_hw, rate, prate); 698f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad} 708f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 718f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwadstatic int clk_periph_set_rate(struct clk_hw *hw, unsigned long rate, 728f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad unsigned long parent_rate) 738f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad{ 748f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad struct tegra_clk_periph *periph = to_clk_periph(hw); 758f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad const struct clk_ops *div_ops = periph->div_ops; 768f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad struct clk_hw *div_hw = &periph->divider.hw; 778f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 788f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad div_hw->clk = hw->clk; 798f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 808f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad return div_ops->set_rate(div_hw, rate, parent_rate); 818f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad} 828f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 838f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwadstatic int clk_periph_is_enabled(struct clk_hw *hw) 848f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad{ 858f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad struct tegra_clk_periph *periph = to_clk_periph(hw); 868f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad const struct clk_ops *gate_ops = periph->gate_ops; 878f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad struct clk_hw *gate_hw = &periph->gate.hw; 888f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 898f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad gate_hw->clk = hw->clk; 908f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 918f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad return gate_ops->is_enabled(gate_hw); 928f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad} 938f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 948f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwadstatic int clk_periph_enable(struct clk_hw *hw) 958f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad{ 968f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad struct tegra_clk_periph *periph = to_clk_periph(hw); 978f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad const struct clk_ops *gate_ops = periph->gate_ops; 988f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad struct clk_hw *gate_hw = &periph->gate.hw; 998f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 1008f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad gate_hw->clk = hw->clk; 1018f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 1028f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad return gate_ops->enable(gate_hw); 1038f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad} 1048f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 1058f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwadstatic void clk_periph_disable(struct clk_hw *hw) 1068f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad{ 1078f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad struct tegra_clk_periph *periph = to_clk_periph(hw); 1088f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad const struct clk_ops *gate_ops = periph->gate_ops; 1098f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad struct clk_hw *gate_hw = &periph->gate.hw; 1108f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 1118f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad gate_ops->disable(gate_hw); 1128f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad} 1138f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 1148f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwadconst struct clk_ops tegra_clk_periph_ops = { 1158f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad .get_parent = clk_periph_get_parent, 1168f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad .set_parent = clk_periph_set_parent, 1178f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad .recalc_rate = clk_periph_recalc_rate, 1188f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad .round_rate = clk_periph_round_rate, 1198f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad .set_rate = clk_periph_set_rate, 1208f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad .is_enabled = clk_periph_is_enabled, 1218f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad .enable = clk_periph_enable, 1228f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad .disable = clk_periph_disable, 1238f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad}; 1248f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 1254e100354e5b7c8982d1563dca134d375979a8eadSachin Kamatstatic const struct clk_ops tegra_clk_periph_nodiv_ops = { 1268f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad .get_parent = clk_periph_get_parent, 1278f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad .set_parent = clk_periph_set_parent, 1288f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad .is_enabled = clk_periph_is_enabled, 1298f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad .enable = clk_periph_enable, 1308f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad .disable = clk_periph_disable, 1318f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad}; 1328f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 13322e5de816b49f1c75c1f1480a99d1c06d46fbe21Sachin Kamatstatic const struct clk_ops tegra_clk_periph_no_gate_ops = { 134b29f9e926442c35bd42ebd283aaed0de2c4f1477Peter De Schrijver .get_parent = clk_periph_get_parent, 135b29f9e926442c35bd42ebd283aaed0de2c4f1477Peter De Schrijver .set_parent = clk_periph_set_parent, 136b29f9e926442c35bd42ebd283aaed0de2c4f1477Peter De Schrijver .recalc_rate = clk_periph_recalc_rate, 137b29f9e926442c35bd42ebd283aaed0de2c4f1477Peter De Schrijver .round_rate = clk_periph_round_rate, 138b29f9e926442c35bd42ebd283aaed0de2c4f1477Peter De Schrijver .set_rate = clk_periph_set_rate, 139b29f9e926442c35bd42ebd283aaed0de2c4f1477Peter De Schrijver}; 140b29f9e926442c35bd42ebd283aaed0de2c4f1477Peter De Schrijver 1418f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwadstatic struct clk *_tegra_clk_register_periph(const char *name, 1428f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad const char **parent_names, int num_parents, 1438f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad struct tegra_clk_periph *periph, 1445bb9d26700c3db54d5a4346c3b6621b8889f3813Peter De Schrijver void __iomem *clk_base, u32 offset, 145a26a029893096204f08a3ff5e262f99e1a75e273Peter De Schrijver unsigned long flags) 1468f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad{ 1478f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad struct clk *clk; 1488f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad struct clk_init_data init; 149d5ff89a82a6d272d210db68a9487877682c94a24Peter De Schrijver struct tegra_clk_periph_regs *bank; 1505bb9d26700c3db54d5a4346c3b6621b8889f3813Peter De Schrijver bool div = !(periph->gate.flags & TEGRA_PERIPH_NO_DIV); 1515bb9d26700c3db54d5a4346c3b6621b8889f3813Peter De Schrijver 152b29f9e926442c35bd42ebd283aaed0de2c4f1477Peter De Schrijver if (periph->gate.flags & TEGRA_PERIPH_NO_DIV) { 153b29f9e926442c35bd42ebd283aaed0de2c4f1477Peter De Schrijver flags |= CLK_SET_RATE_PARENT; 154b29f9e926442c35bd42ebd283aaed0de2c4f1477Peter De Schrijver init.ops = &tegra_clk_periph_nodiv_ops; 155b29f9e926442c35bd42ebd283aaed0de2c4f1477Peter De Schrijver } else if (periph->gate.flags & TEGRA_PERIPH_NO_GATE) 156b29f9e926442c35bd42ebd283aaed0de2c4f1477Peter De Schrijver init.ops = &tegra_clk_periph_no_gate_ops; 157b29f9e926442c35bd42ebd283aaed0de2c4f1477Peter De Schrijver else 158b29f9e926442c35bd42ebd283aaed0de2c4f1477Peter De Schrijver init.ops = &tegra_clk_periph_ops; 1598f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 1608f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad init.name = name; 161a26a029893096204f08a3ff5e262f99e1a75e273Peter De Schrijver init.flags = flags; 1628f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad init.parent_names = parent_names; 1638f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad init.num_parents = num_parents; 1648f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 165d5ff89a82a6d272d210db68a9487877682c94a24Peter De Schrijver bank = get_reg_bank(periph->gate.clk_num); 166d5ff89a82a6d272d210db68a9487877682c94a24Peter De Schrijver if (!bank) 167d5ff89a82a6d272d210db68a9487877682c94a24Peter De Schrijver return ERR_PTR(-EINVAL); 168d5ff89a82a6d272d210db68a9487877682c94a24Peter De Schrijver 1698f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad /* Data in .init is copied by clk_register(), so stack variable OK */ 1708f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad periph->hw.init = &init; 1718f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad periph->magic = TEGRA_CLK_PERIPH_MAGIC; 1728f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad periph->mux.reg = clk_base + offset; 1738f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad periph->divider.reg = div ? (clk_base + offset) : NULL; 1748f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad periph->gate.clk_base = clk_base; 175d5ff89a82a6d272d210db68a9487877682c94a24Peter De Schrijver periph->gate.regs = bank; 176343a607cb79259429afbb9820bf524d33084e66cPeter De Schrijver periph->gate.enable_refcnt = periph_clk_enb_refcnt; 1778f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 1788f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad clk = clk_register(NULL, &periph->hw); 1798f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad if (IS_ERR(clk)) 1808f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad return clk; 1818f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 1828f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad periph->mux.hw.clk = clk; 1838f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad periph->divider.hw.clk = div ? clk : NULL; 1848f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad periph->gate.hw.clk = clk; 1858f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 1868f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad return clk; 1878f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad} 1888f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 1898f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwadstruct clk *tegra_clk_register_periph(const char *name, 1908f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad const char **parent_names, int num_parents, 1918f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad struct tegra_clk_periph *periph, void __iomem *clk_base, 192a26a029893096204f08a3ff5e262f99e1a75e273Peter De Schrijver u32 offset, unsigned long flags) 1938f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad{ 1948f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad return _tegra_clk_register_periph(name, parent_names, num_parents, 1955bb9d26700c3db54d5a4346c3b6621b8889f3813Peter De Schrijver periph, clk_base, offset, flags); 1968f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad} 1978f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad 1988f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwadstruct clk *tegra_clk_register_periph_nodiv(const char *name, 1998f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad const char **parent_names, int num_parents, 2008f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad struct tegra_clk_periph *periph, void __iomem *clk_base, 2018f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad u32 offset) 2028f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad{ 2035bb9d26700c3db54d5a4346c3b6621b8889f3813Peter De Schrijver periph->gate.flags |= TEGRA_PERIPH_NO_DIV; 2048f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad return _tegra_clk_register_periph(name, parent_names, num_parents, 2055bb9d26700c3db54d5a4346c3b6621b8889f3813Peter De Schrijver periph, clk_base, offset, CLK_SET_RATE_PARENT); 2068f8f484bf355e546c62c47b8a8c8d19b28787798Prashant Gaikwad} 207