• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/arch/powerpc/sysdev/

Lines Matching refs:gtm

70 struct gtm {
90 struct gtm *gtm = NULL;
93 list_for_each_entry(gtm, &gtms, list_node) {
94 spin_lock_irq(&gtm->lock);
96 for (i = 0; i < ARRAY_SIZE(gtm->timers); i++) {
97 if (!gtm->timers[i].requested) {
98 gtm->timers[i].requested = true;
99 spin_unlock_irq(&gtm->lock);
100 return &gtm->timers[i];
104 spin_unlock_irq(&gtm->lock);
107 if (gtm)
115 * @gtm: specific GTM, pass here GTM's device_node->data
123 struct gtm_timer *gtm_get_specific_timer16(struct gtm *gtm,
131 spin_lock_irq(&gtm->lock);
133 if (gtm->timers[timer].requested)
136 ret = &gtm->timers[timer];
140 spin_unlock_irq(&gtm->lock);
156 spin_lock_irq(&tmr->gtm->lock);
158 spin_unlock_irq(&tmr->gtm->lock);
169 struct gtm *gtm = tmr->gtm;
170 int num = tmr - &gtm->timers[0];
182 prescaler = gtm->clock / frequency;
204 spin_lock_irqsave(&gtm->lock, flags);
226 spin_unlock_irqrestore(&gtm->lock, flags);
305 struct gtm *gtm = tmr->gtm;
306 int num = tmr - &gtm->timers[0];
309 spin_lock_irqsave(&gtm->lock, flags);
314 spin_unlock_irqrestore(&gtm->lock, flags);
368 if (!of_device_is_compatible(np, "fsl,cpm2-gtm")) {
380 for_each_compatible_node(np, NULL, "fsl,gtm") {
382 struct gtm *gtm;
386 gtm = kzalloc(sizeof(*gtm), GFP_KERNEL);
387 if (!gtm) {
393 spin_lock_init(&gtm->lock);
400 gtm->clock = *clock;
402 for (i = 0; i < ARRAY_SIZE(gtm->timers); i++) {
412 gtm->timers[i].irq = irq.start;
413 gtm->timers[i].gtm = gtm;
416 gtm->regs = of_iomap(np, 0);
417 if (!gtm->regs) {
423 gtm_set_shortcuts(np, gtm->timers, gtm->regs);
424 list_add(&gtm->list_node, &gtms);
427 np->data = gtm;
432 kfree(gtm);