Lines Matching +full:switch +full:- +full:frequency +full:- +full:hz

22 #include <linux/posix-timers.h>
46 * Period in femtoseconds (10^-15 s)
58 * uv_mmtimer_ioctl - ioctl interface for /dev/uv_mmtimer
68 * %MMTIMER_GETOFFSET - Should return the offset (relative to the start
71 * %MMTIMER_GETRES - Returns the resolution of the clock in femto (10^-15)
74 * %MMTIMER_GETFREQ - Copies the frequency of the clock in Hz to the address
77 * %MMTIMER_GETBITS - Returns the number of bits in the clock's counter
79 * %MMTIMER_MMAPAVAIL - Returns 1 if registers can be mmap'd into userspace
81 * %MMTIMER_GETCOUNTER - Gets the current value in the counter and places it
89 switch (cmd) { in uv_mmtimer_ioctl()
105 case MMTIMER_GETRES: /* resolution of the clock in 10^-15 s */ in uv_mmtimer_ioctl()
108 ret = -EFAULT; in uv_mmtimer_ioctl()
111 case MMTIMER_GETFREQ: /* frequency in Hz */ in uv_mmtimer_ioctl()
115 ret = -EFAULT; in uv_mmtimer_ioctl()
130 ret = -EFAULT; in uv_mmtimer_ioctl()
133 ret = -ENOTTY; in uv_mmtimer_ioctl()
140 * uv_mmtimer_mmap - maps the clock's registers into userspace
151 if (vma->vm_end - vma->vm_start != PAGE_SIZE) in uv_mmtimer_mmap()
152 return -EINVAL; in uv_mmtimer_mmap()
154 if (vma->vm_flags & VM_WRITE) in uv_mmtimer_mmap()
155 return -EPERM; in uv_mmtimer_mmap()
158 return -ENOSYS; in uv_mmtimer_mmap()
160 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); in uv_mmtimer_mmap()
163 uv_mmtimer_addr &= ~(PAGE_SIZE - 1); in uv_mmtimer_mmap()
166 if (remap_pfn_range(vma, vma->vm_start, uv_mmtimer_addr >> PAGE_SHIFT, in uv_mmtimer_mmap()
167 PAGE_SIZE, vma->vm_page_prot)) { in uv_mmtimer_mmap()
169 return -EAGAIN; in uv_mmtimer_mmap()
183 * uv_mmtimer_init - device initialization routine
191 return -1; in uv_mmtimer_init()
198 printk(KERN_ERR "%s: unable to determine clock frequency\n", in uv_mmtimer_init()
200 return -1; in uv_mmtimer_init()
210 return -1; in uv_mmtimer_init()