Source
x
static inline unsigned long sh_mtu2_read(struct sh_mtu2_channel *ch, int reg_nr)
// SPDX-License-Identifier: GPL-2.0
/*
* SuperH Timer Support - MTU2
*
* Copyright (C) 2009 Magnus Damm
*/
struct sh_mtu2_device;
struct sh_mtu2_channel {
struct sh_mtu2_device *mtu;
unsigned int index;
void __iomem *base;
struct clock_event_device ced;
};
struct sh_mtu2_device {
struct platform_device *pdev;
void __iomem *mapbase;
struct clk *clk;
raw_spinlock_t lock; /* Protect the shared registers */
struct sh_mtu2_channel *channels;
unsigned int num_channels;
bool has_clockevent;
};
/* shared register */
/* channel register */
/* channel register */
/* channel register */
/* channel register */
/* channel register */
/* channel register */
/* channel register */
/* Values 4 to 7 are channel-dependent */