linux/drivers/rtc/rtc-jz4740.c

// SPDX-License-Identifier: GPL-2.0+
/*
 *  Copyright (C) 2009-2010, Lars-Peter Clausen <[email protected]>
 *  Copyright (C) 2010, Paul Cercueil <[email protected]>
 *	 JZ4740 SoC RTC driver
 */

#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_wakeirq.h>
#include <linux/property.h>
#include <linux/reboot.h>
#include <linux/rtc.h>
#include <linux/slab.h>
#include <linux/spinlock.h>

#define JZ_REG_RTC_CTRL
#define JZ_REG_RTC_SEC
#define JZ_REG_RTC_SEC_ALARM
#define JZ_REG_RTC_REGULATOR
#define JZ_REG_RTC_HIBERNATE
#define JZ_REG_RTC_WAKEUP_FILTER
#define JZ_REG_RTC_RESET_COUNTER
#define JZ_REG_RTC_SCRATCHPAD
#define JZ_REG_RTC_CKPCR

/* The following are present on the jz4780 */
#define JZ_REG_RTC_WENR
#define JZ_RTC_WENR_WEN

#define JZ_RTC_CTRL_WRDY
#define JZ_RTC_CTRL_1HZ
#define JZ_RTC_CTRL_1HZ_IRQ
#define JZ_RTC_CTRL_AF
#define JZ_RTC_CTRL_AF_IRQ
#define JZ_RTC_CTRL_AE
#define JZ_RTC_CTRL_ENABLE

/* Magic value to enable writes on jz4780 */
#define JZ_RTC_WENR_MAGIC

#define JZ_RTC_WAKEUP_FILTER_MASK
#define JZ_RTC_RESET_COUNTER_MASK

#define JZ_RTC_CKPCR_CK32PULL_DIS
#define JZ_RTC_CKPCR_CK32CTL_EN

enum jz4740_rtc_type {};

struct jz4740_rtc {};

static struct device *dev_for_power_off;

static inline uint32_t jz4740_rtc_reg_read(struct jz4740_rtc *rtc, size_t reg)
{}

static int jz4740_rtc_wait_write_ready(struct jz4740_rtc *rtc)
{}

static inline int jz4780_rtc_enable_write(struct jz4740_rtc *rtc)
{}

static inline int jz4740_rtc_reg_write(struct jz4740_rtc *rtc, size_t reg,
	uint32_t val)
{}

static int jz4740_rtc_ctrl_set_bits(struct jz4740_rtc *rtc, uint32_t mask,
	bool set)
{}

static int jz4740_rtc_read_time(struct device *dev, struct rtc_time *time)
{}

static int jz4740_rtc_set_time(struct device *dev, struct rtc_time *time)
{}

static int jz4740_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{}

static int jz4740_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{}

static int jz4740_rtc_alarm_irq_enable(struct device *dev, unsigned int enable)
{}

static const struct rtc_class_ops jz4740_rtc_ops =;

static irqreturn_t jz4740_rtc_irq(int irq, void *data)
{}

static void jz4740_rtc_poweroff(struct device *dev)
{}

static void jz4740_rtc_power_off(void)
{}

static const struct of_device_id jz4740_rtc_of_match[] =;
MODULE_DEVICE_TABLE(of, jz4740_rtc_of_match);

static void jz4740_rtc_set_wakeup_params(struct jz4740_rtc *rtc,
					 struct device_node *np,
					 unsigned long rate)
{}

static int jz4740_rtc_clk32k_enable(struct clk_hw *hw)
{}

static void jz4740_rtc_clk32k_disable(struct clk_hw *hw)
{}

static int jz4740_rtc_clk32k_is_enabled(struct clk_hw *hw)
{}

static const struct clk_ops jz4740_rtc_clk32k_ops =;

static int jz4740_rtc_probe(struct platform_device *pdev)
{}

static struct platform_driver jz4740_rtc_driver =;

module_platform_driver();

MODULE_AUTHOR();
MODULE_LICENSE();
MODULE_DESCRIPTION();
MODULE_ALIAS();