• Home
  • Raw
  • Download

Lines Matching refs:pmc_data

51 	struct pmc_data *pmc_data = data;  in of_clk_hw_pmc_get()  local
55 if (idx < pmc_data->ncore) in of_clk_hw_pmc_get()
56 return pmc_data->chws[idx]; in of_clk_hw_pmc_get()
59 if (idx < pmc_data->nsystem) in of_clk_hw_pmc_get()
60 return pmc_data->shws[idx]; in of_clk_hw_pmc_get()
63 if (idx < pmc_data->nperiph) in of_clk_hw_pmc_get()
64 return pmc_data->phws[idx]; in of_clk_hw_pmc_get()
67 if (idx < pmc_data->ngck) in of_clk_hw_pmc_get()
68 return pmc_data->ghws[idx]; in of_clk_hw_pmc_get()
71 if (idx < pmc_data->npck) in of_clk_hw_pmc_get()
72 return pmc_data->pchws[idx]; in of_clk_hw_pmc_get()
83 struct pmc_data *pmc_data_allocate(unsigned int ncore, unsigned int nsystem, in pmc_data_allocate()
88 struct pmc_data *pmc_data; in pmc_data_allocate() local
90 pmc_data = kzalloc(struct_size(pmc_data, hwtable, num_clks), in pmc_data_allocate()
92 if (!pmc_data) in pmc_data_allocate()
95 pmc_data->ncore = ncore; in pmc_data_allocate()
96 pmc_data->chws = pmc_data->hwtable; in pmc_data_allocate()
98 pmc_data->nsystem = nsystem; in pmc_data_allocate()
99 pmc_data->shws = pmc_data->chws + ncore; in pmc_data_allocate()
101 pmc_data->nperiph = nperiph; in pmc_data_allocate()
102 pmc_data->phws = pmc_data->shws + nsystem; in pmc_data_allocate()
104 pmc_data->ngck = ngck; in pmc_data_allocate()
105 pmc_data->ghws = pmc_data->phws + nperiph; in pmc_data_allocate()
107 pmc_data->npck = npck; in pmc_data_allocate()
108 pmc_data->pchws = pmc_data->ghws + ngck; in pmc_data_allocate()
110 return pmc_data; in pmc_data_allocate()