linux-stable/drivers/clk/microchip/clk-core.h
Thomas Gleixner 04dc82e116 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 445
Based on 1 normalized pattern(s):

  this program is free software you can distribute 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 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

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 24 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Armijn Hemel <armijn@tjaldur.nl>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190531190115.872212424@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-05 17:37:18 +02:00

76 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_*/