DECLARE_GLOBAL_DATA_PTR;
+/* control register */
+#define ALTERA_TIMER_CONT BIT(1) /* Continuous mode */
+#define ALTERA_TIMER_START BIT(2) /* Start timer */
+#define ALTERA_TIMER_STOP BIT(3) /* Stop timer */
+
struct altera_timer_regs {
u32 status; /* Timer status reg */
u32 control; /* Timer control reg */
unsigned long clock_rate;
};
-/* control register */
-#define ALTERA_TIMER_CONT BIT(1) /* Continuous mode */
-#define ALTERA_TIMER_START BIT(2) /* Start timer */
-#define ALTERA_TIMER_STOP BIT(3) /* Stop timer */
-
static int altera_timer_get_count(struct udevice *dev, unsigned long *count)
{
struct altera_timer_platdata *plat = dev->platdata;
};
static const struct udevice_id altera_timer_ids[] = {
- { .compatible = "altr,timer-1.0", },
- { }
+ { .compatible = "altr,timer-1.0" },
+ {}
};
U_BOOT_DRIVER(altera_timer) = {