diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-21 16:40:26 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-21 16:40:26 (GMT) |
commit | f8b71a3a92d69cb1c9c2162f9235d3dd550e4aa0 (patch) | |
tree | d0853186f33314a6e45903876d0e94d1619fcca9 /include/asm-sparc/timer.h | |
parent | 42a77a1b8fe4fd78cf8d8fccbaac918bbe888192 (diff) | |
parent | e4f25060b87a627f5cda84b8134911d43c919458 (diff) | |
download | linux-fsl-qoriq-f8b71a3a92d69cb1c9c2162f9235d3dd550e4aa0.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: (44 commits)
sparc: Remove Sparc's asm-offsets for sclow.S
sparc64: Update defconfig.
sparc64: Add Niagara2 RNG driver.
sparc64: Add missing hypervisor service group numbers.
sparc64: Remove 4MB and 512K base page size options.
sparc64: Convert to generic helpers for IPI function calls.
sparc: Use new '%pS' infrastructure to print symbols.
sparc32: fix init.c allnoconfig build error
sparc64: Config category "Processor type and features" absent
sparc: arch/sparc/kernel/apc.c to unlocked_ioctl
sparc: join the remaining header files
sparc: merge header files with trivial differences
sparc: when header files are equal use asm-sparc version
sparc: copy sparc64 specific files to asm-sparc
sparc: Merge asm-sparc{,64}/asi.h
sparc: export openprom.h to userspace
sparc: Merge asm-sparc{,64}/types.h
sparc: Merge asm-sparc{,64}/termios.h
sparc: Merge asm-sparc{,64}/termbits.h
sparc: Merge asm-sparc{,64}/setup.h
...
Diffstat (limited to 'include/asm-sparc/timer.h')
-rw-r--r-- | include/asm-sparc/timer.h | 113 |
1 files changed, 6 insertions, 107 deletions
diff --git a/include/asm-sparc/timer.h b/include/asm-sparc/timer.h index d909565..475baa0 100644 --- a/include/asm-sparc/timer.h +++ b/include/asm-sparc/timer.h @@ -1,109 +1,8 @@ -/* - * timer.h: Definitions for the timer chips on the Sparc. - * - * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) - */ - - -#ifndef _SPARC_TIMER_H -#define _SPARC_TIMER_H - -#include <asm/system.h> /* For SUN4M_NCPUS */ -#include <asm/sun4paddr.h> -#include <asm/btfixup.h> - -/* Timer structures. The interrupt timer has two properties which - * are the counter (which is handled in do_timer in sched.c) and the limit. - * This limit is where the timer's counter 'wraps' around. Oddly enough, - * the sun4c timer when it hits the limit wraps back to 1 and not zero - * thus when calculating the value at which it will fire a microsecond you - * must adjust by one. Thanks SUN for designing such great hardware ;( - */ - -/* Note that I am only going to use the timer that interrupts at - * Sparc IRQ 10. There is another one available that can fire at - * IRQ 14. Currently it is left untouched, we keep the PROM's limit - * register value and let the prom take these interrupts. This allows - * L1-A to work. - */ - -struct sun4c_timer_info { - __volatile__ unsigned int cur_count10; - __volatile__ unsigned int timer_limit10; - __volatile__ unsigned int cur_count14; - __volatile__ unsigned int timer_limit14; -}; - -#define SUN4C_TIMER_PHYSADDR 0xf3000000 -#ifdef CONFIG_SUN4 -#define SUN_TIMER_PHYSADDR SUN4_300_TIMER_PHYSADDR +#ifndef ___ASM_SPARC_TIMER_H +#define ___ASM_SPARC_TIMER_H +#if defined(__sparc__) && defined(__arch64__) +#include <asm-sparc/timer_64.h> #else -#define SUN_TIMER_PHYSADDR SUN4C_TIMER_PHYSADDR +#include <asm-sparc/timer_32.h> +#endif #endif - -/* A sun4m has two blocks of registers which are probably of the same - * structure. LSI Logic's L64851 is told to _decrement_ from the limit - * value. Aurora behaves similarly but its limit value is compacted in - * other fashion (it's wider). Documented fields are defined here. - */ - -/* As with the interrupt register, we have two classes of timer registers - * which are per-cpu and master. Per-cpu timers only hit that cpu and are - * only level 14 ticks, master timer hits all cpus and is level 10. - */ - -#define SUN4M_PRM_CNT_L 0x80000000 -#define SUN4M_PRM_CNT_LVALUE 0x7FFFFC00 - -struct sun4m_timer_percpu_info { - __volatile__ unsigned int l14_timer_limit; /* Initial value is 0x009c4000 */ - __volatile__ unsigned int l14_cur_count; - - /* This register appears to be write only and/or inaccessible - * on Uni-Processor sun4m machines. - */ - __volatile__ unsigned int l14_limit_noclear; /* Data access error is here */ - - __volatile__ unsigned int cntrl; /* =1 after POST on Aurora */ - __volatile__ unsigned char space[PAGE_SIZE - 16]; -}; - -struct sun4m_timer_regs { - struct sun4m_timer_percpu_info cpu_timers[SUN4M_NCPUS]; - volatile unsigned int l10_timer_limit; - volatile unsigned int l10_cur_count; - - /* Again, this appears to be write only and/or inaccessible - * on uni-processor sun4m machines. - */ - volatile unsigned int l10_limit_noclear; - - /* This register too, it must be magic. */ - volatile unsigned int foobar; - - volatile unsigned int cfg; /* equals zero at boot time... */ -}; - -extern struct sun4m_timer_regs *sun4m_timers; - -#define SUN4D_PRM_CNT_L 0x80000000 -#define SUN4D_PRM_CNT_LVALUE 0x7FFFFC00 - -struct sun4d_timer_regs { - volatile unsigned int l10_timer_limit; - volatile unsigned int l10_cur_countx; - volatile unsigned int l10_limit_noclear; - volatile unsigned int ctrl; - volatile unsigned int l10_cur_count; -}; - -extern struct sun4d_timer_regs *sun4d_timers; - -extern __volatile__ unsigned int *master_l10_counter; -extern __volatile__ unsigned int *master_l10_limit; - -/* FIXME: Make do_[gs]ettimeofday btfixup calls */ -BTFIXUPDEF_CALL(int, bus_do_settimeofday, struct timespec *tv) -#define bus_do_settimeofday(tv) BTFIXUP_CALL(bus_do_settimeofday)(tv) - -#endif /* !(_SPARC_TIMER_H) */ |