2005-04-16 22:20:36 +00:00
|
|
|
#ifndef __ASM_SH_PROCESSOR_H
|
|
|
|
#define __ASM_SH_PROCESSOR_H
|
|
|
|
|
2007-11-10 11:01:51 +00:00
|
|
|
#include <asm/cpu-features.h>
|
2008-06-03 09:48:54 +00:00
|
|
|
#include <asm/segment.h>
|
2008-09-17 14:24:02 +00:00
|
|
|
#include <asm/cache.h>
|
2007-11-10 11:01:51 +00:00
|
|
|
|
2007-11-11 09:11:18 +00:00
|
|
|
#ifndef __ASSEMBLY__
|
2005-04-16 22:20:36 +00:00
|
|
|
/*
|
|
|
|
* CPU type and hardware bug flags. Kept separately for each CPU.
|
|
|
|
*
|
|
|
|
* Each one of these also needs a CONFIG_CPU_SUBTYPE_xxx entry
|
2006-02-01 11:06:02 +00:00
|
|
|
* in arch/sh/mm/Kconfig, as well as an entry in arch/sh/kernel/setup.c
|
2005-04-16 22:20:36 +00:00
|
|
|
* for parsing the subtype in get_cpu_subtype().
|
|
|
|
*/
|
|
|
|
enum cpu_type {
|
|
|
|
/* SH-2 types */
|
2007-06-08 02:55:28 +00:00
|
|
|
CPU_SH7619,
|
2006-11-05 07:18:08 +00:00
|
|
|
|
|
|
|
/* SH-2A types */
|
2008-11-28 13:48:20 +00:00
|
|
|
CPU_SH7201, CPU_SH7203, CPU_SH7206, CPU_SH7263, CPU_MXG,
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
/* SH-3 types */
|
2006-09-27 08:38:11 +00:00
|
|
|
CPU_SH7705, CPU_SH7706, CPU_SH7707,
|
|
|
|
CPU_SH7708, CPU_SH7708S, CPU_SH7708R,
|
2007-03-27 09:13:51 +00:00
|
|
|
CPU_SH7709, CPU_SH7709A, CPU_SH7710, CPU_SH7712,
|
2007-12-26 02:45:06 +00:00
|
|
|
CPU_SH7720, CPU_SH7721, CPU_SH7729,
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
/* SH-4 types */
|
|
|
|
CPU_SH7750, CPU_SH7750S, CPU_SH7750R, CPU_SH7751, CPU_SH7751R,
|
2007-11-07 02:05:32 +00:00
|
|
|
CPU_SH7760, CPU_SH4_202, CPU_SH4_501,
|
2006-11-20 05:14:29 +00:00
|
|
|
|
|
|
|
/* SH-4A types */
|
2009-03-03 06:40:25 +00:00
|
|
|
CPU_SH7763, CPU_SH7770, CPU_SH7780, CPU_SH7781, CPU_SH7785, CPU_SH7786,
|
2009-04-16 05:40:56 +00:00
|
|
|
CPU_SH7723, CPU_SH7724, CPU_SHX3,
|
2006-12-11 11:28:03 +00:00
|
|
|
|
|
|
|
/* SH4AL-DSP types */
|
2008-02-08 08:31:24 +00:00
|
|
|
CPU_SH7343, CPU_SH7722, CPU_SH7366,
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2007-11-09 08:08:54 +00:00
|
|
|
/* SH-5 types */
|
|
|
|
CPU_SH5_101, CPU_SH5_103,
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
/* Unknown subtype */
|
|
|
|
CPU_SH_NONE
|
|
|
|
};
|
|
|
|
|
2008-09-17 14:24:02 +00:00
|
|
|
/*
|
|
|
|
* TLB information structure
|
|
|
|
*
|
|
|
|
* Defined for both I and D tlb, per-processor.
|
|
|
|
*/
|
|
|
|
struct tlb_info {
|
|
|
|
unsigned long long next;
|
|
|
|
unsigned long long first;
|
|
|
|
unsigned long long last;
|
|
|
|
|
|
|
|
unsigned int entries;
|
|
|
|
unsigned int step;
|
|
|
|
|
|
|
|
unsigned long flags;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct sh_cpuinfo {
|
|
|
|
unsigned int type;
|
|
|
|
int cut_major, cut_minor;
|
|
|
|
unsigned long loops_per_jiffy;
|
|
|
|
unsigned long asid_cache;
|
|
|
|
|
|
|
|
struct cache_info icache; /* Primary I-cache */
|
|
|
|
struct cache_info dcache; /* Primary D-cache */
|
|
|
|
struct cache_info scache; /* Secondary cache */
|
|
|
|
|
|
|
|
/* TLB info */
|
|
|
|
struct tlb_info itlb;
|
|
|
|
struct tlb_info dtlb;
|
|
|
|
|
|
|
|
unsigned long flags;
|
|
|
|
} __attribute__ ((aligned(L1_CACHE_BYTES)));
|
|
|
|
|
|
|
|
extern struct sh_cpuinfo cpu_data[];
|
|
|
|
#define boot_cpu_data cpu_data[0]
|
|
|
|
#define current_cpu_data cpu_data[smp_processor_id()]
|
|
|
|
#define raw_current_cpu_data cpu_data[raw_smp_processor_id()]
|
|
|
|
|
2008-11-26 06:47:44 +00:00
|
|
|
#define cpu_sleep() __asm__ __volatile__ ("sleep" : : : "memory")
|
|
|
|
#define cpu_relax() barrier()
|
|
|
|
|
2007-11-11 09:11:18 +00:00
|
|
|
/* Forward decl */
|
2008-09-04 09:53:58 +00:00
|
|
|
struct seq_operations;
|
|
|
|
|
|
|
|
extern struct pt_regs fake_swapper_regs;
|
2006-09-27 09:33:49 +00:00
|
|
|
|
2006-12-25 01:19:56 +00:00
|
|
|
/* arch/sh/kernel/setup.c */
|
|
|
|
const char *get_cpu_subtype(struct sh_cpuinfo *c);
|
2008-09-04 09:53:58 +00:00
|
|
|
extern const struct seq_operations cpuinfo_op;
|
2006-12-25 01:19:56 +00:00
|
|
|
|
2007-11-10 11:39:56 +00:00
|
|
|
#ifdef CONFIG_VSYSCALL
|
|
|
|
int vsyscall_init(void);
|
|
|
|
#else
|
|
|
|
#define vsyscall_init() do { } while (0)
|
|
|
|
#endif
|
|
|
|
|
2007-11-11 09:11:18 +00:00
|
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
|
|
|
|
#ifdef CONFIG_SUPERH32
|
|
|
|
# include "processor_32.h"
|
|
|
|
#else
|
|
|
|
# include "processor_64.h"
|
|
|
|
#endif
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
#endif /* __ASM_SH_PROCESSOR_H */
|