mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 02:17:36 -04:00
clk-core is a confusingly generic name, since it is only used by a single platform and it uses very similar naming to the "soft" IP cores for use in FPGA fabric (CoreClock or similar is what that would be called, although nothing like that exists right now) that the FPGA business unit produces. Rename it to clk-pic32, matching the prefix used by most functions in the driver. As far as I can tell, impact on whatever users may (or may not...) exist for the platform is minimal as it's built-in only and the functions are called directly from clk-pic32mzda.c Reviewed-by: Brian Masney <bmasney@redhat.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
77 lines
2.1 KiB
C
77 lines
2.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Purna Chandra Mandal,<purna.mandal@microchip.com>
|
|
* Copyright (C) 2015 Microchip Technology Inc. All rights reserved.
|
|
*/
|
|
#ifndef __MICROCHIP_CLK_PIC32_H_
|
|
#define __MICROCHIP_CLK_PIC32_H_
|
|
|
|
#include <linux/clk-provider.h>
|
|
|
|
/* PIC32 clock data */
|
|
struct pic32_clk_common {
|
|
struct device *dev;
|
|
void __iomem *iobase;
|
|
spinlock_t reg_lock; /* clock lock */
|
|
};
|
|
|
|
/* System PLL clock */
|
|
struct pic32_sys_pll_data {
|
|
struct clk_init_data init_data;
|
|
const u32 ctrl_reg;
|
|
const u32 status_reg;
|
|
const u32 lock_mask;
|
|
};
|
|
|
|
/* System clock */
|
|
struct pic32_sys_clk_data {
|
|
struct clk_init_data init_data;
|
|
const u32 mux_reg;
|
|
const u32 slew_reg;
|
|
const u32 *parent_map;
|
|
const u32 slew_div;
|
|
};
|
|
|
|
/* Reference Oscillator clock */
|
|
struct pic32_ref_osc_data {
|
|
struct clk_init_data init_data;
|
|
const u32 ctrl_reg;
|
|
const u32 *parent_map;
|
|
};
|
|
|
|
/* Peripheral Bus clock */
|
|
struct pic32_periph_clk_data {
|
|
struct clk_init_data init_data;
|
|
const u32 ctrl_reg;
|
|
};
|
|
|
|
/* External Secondary Oscillator clock */
|
|
struct pic32_sec_osc_data {
|
|
struct clk_init_data init_data;
|
|
const u32 enable_reg;
|
|
const u32 status_reg;
|
|
const u32 enable_mask;
|
|
const u32 status_mask;
|
|
const unsigned long fixed_rate;
|
|
};
|
|
|
|
extern const struct clk_ops pic32_pbclk_ops;
|
|
extern const struct clk_ops pic32_sclk_ops;
|
|
extern const struct clk_ops pic32_sclk_no_div_ops;
|
|
extern const struct clk_ops pic32_spll_ops;
|
|
extern const struct clk_ops pic32_roclk_ops;
|
|
extern const struct clk_ops pic32_sosc_ops;
|
|
|
|
struct clk *pic32_periph_clk_register(const struct pic32_periph_clk_data *data,
|
|
struct pic32_clk_common *core);
|
|
struct clk *pic32_refo_clk_register(const struct pic32_ref_osc_data *data,
|
|
struct pic32_clk_common *core);
|
|
struct clk *pic32_sys_clk_register(const struct pic32_sys_clk_data *data,
|
|
struct pic32_clk_common *core);
|
|
struct clk *pic32_spll_clk_register(const struct pic32_sys_pll_data *data,
|
|
struct pic32_clk_common *core);
|
|
struct clk *pic32_sosc_clk_register(const struct pic32_sec_osc_data *data,
|
|
struct pic32_clk_common *core);
|
|
|
|
#endif /* __MICROCHIP_CLK_PIC32_H_*/
|