linux/drivers/clocksource/timer-pxa.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * arch/arm/mach-pxa/time.c
 *
 * PXA clocksource, clockevents, and OST interrupt handlers.
 * Copyright (c) 2007 by Bill Gatliff <[email protected]>.
 *
 * Derived from Nicolas Pitre's PXA timer handler Copyright (c) 2001
 * by MontaVista Software, Inc.  (Nico, your code rocks!)
 */

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/clk.h>
#include <linux/clockchips.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/sched/clock.h>
#include <linux/sched_clock.h>

#include <clocksource/pxa.h>

#include <asm/div64.h>

#define OSMR0
#define OSMR1
#define OSMR2
#define OSMR3

#define OSCR
#define OSSR
#define OWER
#define OIER

#define OSSR_M3
#define OSSR_M2
#define OSSR_M1
#define OSSR_M0

#define OIER_E0

/*
 * This is PXA's sched_clock implementation. This has a resolution
 * of at least 308 ns and a maximum value of 208 days.
 *
 * The return value is guaranteed to be monotonic in that range as
 * long as there is always less than 582 seconds between successive
 * calls to sched_clock() which should always be the case in practice.
 */

#define timer_readl(reg)
#define timer_writel(val, reg)

static void __iomem *timer_base;

static u64 notrace pxa_read_sched_clock(void)
{}


#define MIN_OSCR_DELTA

static irqreturn_t
pxa_ost0_interrupt(int irq, void *dev_id)
{}

static int
pxa_osmr0_set_next_event(unsigned long delta, struct clock_event_device *dev)
{}

static int pxa_osmr0_shutdown(struct clock_event_device *evt)
{}

#ifdef CONFIG_PM
static unsigned long osmr[4], oier, oscr;

static void pxa_timer_suspend(struct clock_event_device *cedev)
{}

static void pxa_timer_resume(struct clock_event_device *cedev)
{}
#else
#define pxa_timer_suspend
#define pxa_timer_resume
#endif

static struct clock_event_device ckevt_pxa_osmr0 =;

static int __init pxa_timer_common_init(int irq, unsigned long clock_tick_rate)
{}

static int __init pxa_timer_dt_init(struct device_node *np)
{}
TIMER_OF_DECLARE(pxa_timer, "marvell,pxa-timer", pxa_timer_dt_init);

/*
 * Legacy timer init for non device-tree boards.
 */
void __init pxa_timer_nodt_init(int irq, void __iomem *base)
{}