summaryrefslogtreecommitdiff
path: root/drivers/clk/at91/pmc.h
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2020-05-05 01:37:56 +0300
committerStephen Boyd <sboyd@kernel.org>2020-05-27 06:22:34 +0300
commit7425f246f725e51c8a64802851303d1e2c25abd1 (patch)
treee7cbc9cb371f6c9141a07ae45e0f5172bb5a1a25 /drivers/clk/at91/pmc.h
parente218325ff9c31de191d4a617f8fddd3cf78b5550 (diff)
downloadlinux-7425f246f725e51c8a64802851303d1e2c25abd1.tar.xz
clk: at91: optimize pmc data allocation
Alloc whole data structure in one block. This makes the code shorter, more efficient and easier to extend in following patch. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Link: https://lkml.kernel.org/r/fc6f6d67b8cee0beace4a9d9cca7431e5efa769d.1588630999.git.mirq-linux@rere.qmqm.pl Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/at91/pmc.h')
-rw-r--r--drivers/clk/at91/pmc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h
index 9b8db9cdcda5..fc3ef772b9d9 100644
--- a/drivers/clk/at91/pmc.h
+++ b/drivers/clk/at91/pmc.h
@@ -24,6 +24,8 @@ struct pmc_data {
struct clk_hw **phws;
unsigned int ngck;
struct clk_hw **ghws;
+
+ struct clk_hw *hwtable[];
};
struct clk_range {
@@ -95,7 +97,6 @@ struct clk_pcr_layout {
#define nck(a) (a[ARRAY_SIZE(a) - 1].id + 1)
struct pmc_data *pmc_data_allocate(unsigned int ncore, unsigned int nsystem,
unsigned int nperiph, unsigned int ngck);
-void pmc_data_free(struct pmc_data *pmc_data);
int of_at91_get_clk_range(struct device_node *np, const char *propname,
struct clk_range *range);