Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
8e46695
Documentation
arch
alpha
arc
arm
arm64
avr32
blackfin
c6x
cris
frv
h8300
hexagon
ia64
m32r
m68k
metag
microblaze
mips
mn10300
nios2
openrisc
parisc
powerpc
s390
score
sh
sparc
tile
um
unicore32
x86
boot
configs
crypto
entry
events
ia32
include
asm
crypto
fpu
numachip
trace
uv
xen
Kbuild
a.out-core.h
acenv.h
acpi.h
agp.h
alternative-asm.h
alternative.h
amd_nb.h
apb_timer.h
apic.h
apic_flat_64.h
apicdef.h
apm.h
arch_hweight.h
archrandom.h
asm-offsets.h
asm.h
atomic.h
atomic64_32.h
atomic64_64.h
barrier.h
bios_ebda.h
bitops.h
boot.h
bootparam_utils.h
bug.h
bugs.h
cache.h
cacheflush.h
calgary.h
ce4100.h
checksum.h
checksum_32.h
checksum_64.h
clocksource.h
cmdline.h
cmpxchg.h
cmpxchg_32.h
cmpxchg_64.h
compat.h
cpu.h
cpu_device_id.h
cpufeature.h
cpufeatures.h
cpumask.h
crash.h
current.h
debugreg.h
delay.h
desc.h
desc_defs.h
device.h
disabled-features.h
div64.h
dma-mapping.h
dma.h
dmi.h
dwarf2.h
e820.h
edac.h
efi.h
elf.h
emergency-restart.h
entry_arch.h
espfix.h
exec.h
fb.h
fixmap.h
floppy.h
frame.h
ftrace.h
futex.h
gart.h
genapic.h
geode.h
hardirq.h
highmem.h
hpet.h
hugetlb.h
hw_breakpoint.h
hw_irq.h
hypertransport.h
hypervisor.h
i8259.h
ia32.h
ia32_unistd.h
idle.h
imr.h
inat.h
inat_types.h
init.h
insn.h
inst.h
intel-family.h
intel-mid.h
intel_mid_vrtc.h
intel_pmc_ipc.h
intel_pt.h
intel_punit_ipc.h
intel_scu_ipc.h
intel_telemetry.h
io.h
io_apic.h
iomap.h
iommu.h
iommu_table.h
iosf_mbi.h
ipi.h
irq.h
irq_regs.h
irq_remapping.h
irq_vectors.h
irq_work.h
irqdomain.h
irqflags.h
ist.h
jump_label.h
kasan.h
kaslr.h
kbdleds.h
kdebug.h
kexec-bzimage64.h
kexec.h
kgdb.h
kmap_types.h
kmemcheck.h
kprobes.h
kvm_emulate.h
kvm_guest.h
kvm_host.h
kvm_page_track.h
kvm_para.h
lguest.h
lguest_hcall.h
linkage.h
livepatch.h
local.h
local64.h
mach_timer.h
mach_traps.h
math_emu.h
mc146818rtc.h
mce.h
microcode.h
microcode_amd.h
microcode_intel.h
misc.h
mmconfig.h
mmu.h
mmu_context.h
mmx.h
mmzone.h
mmzone_32.h
mmzone_64.h
module.h
mpspec.h
mpspec_def.h
mpx.h
mshyperv.h
msi.h
msidef.h
msr-index.h
msr-trace.h
msr.h
mtrr.h
mutex.h
mutex_32.h
mutex_64.h
mwait.h
nmi.h
nops.h
numa.h
numa_32.h
olpc.h
olpc_ofw.h
page.h
page_32.h
page_32_types.h
page_64.h
page_64_types.h
page_types.h
paravirt.h
paravirt_types.h
parport.h
pat.h
pci-direct.h
pci-functions.h
pci.h
pci_64.h
pci_x86.h
percpu.h
perf_event.h
perf_event_p4.h
pgalloc.h
pgtable-2level.h
pgtable-2level_types.h
pgtable-3level.h
pgtable-3level_types.h
pgtable.h
pgtable_32.h
pgtable_32_types.h
pgtable_64.h
pgtable_64_types.h
pgtable_types.h
pkeys.h
platform_sst_audio.h
pm-trace.h
pmc_atom.h
pmc_core.h
pmem.h
posix_types.h
preempt.h
probe_roms.h
processor-cyrix.h
processor-flags.h
processor.h
prom.h
proto.h
ptrace.h
pvclock-abi.h
pvclock.h
qrwlock.h
qspinlock.h
qspinlock_paravirt.h
realmode.h
reboot.h
reboot_fixups.h
required-features.h
rio.h
rmwcc.h
rtc.h
rwsem.h
seccomp.h
sections.h
segment.h
serial.h
setup.h
setup_arch.h
shmparam.h
sigcontext.h
sigframe.h
sighandling.h
signal.h
simd.h
smap.h
smp.h
sparsemem.h
special_insns.h
spinlock.h
spinlock_types.h
sta2x11.h
stackprotector.h
stacktrace.h
string.h
string_32.h
string_64.h
suspend.h
suspend_32.h
suspend_64.h
svm.h
swiotlb.h
switch_to.h
sync_bitops.h
sys_ia32.h
syscall.h
syscalls.h
sysfb.h
tce.h
text-patching.h
thread_info.h
time.h
timer.h
timex.h
tlb.h
tlbflush.h
topology.h
trace_clock.h
traps.h
tsc.h
uaccess.h
uaccess_32.h
uaccess_64.h
unaligned.h
unistd.h
uprobes.h
user.h
user32.h
user_32.h
user_64.h
vdso.h
vga.h
vgtod.h
virtext.h
vm86.h
vmx.h
vsyscall.h
vvar.h
word-at-a-time.h
x2apic.h
x86_init.h
xor.h
xor_32.h
xor_64.h
xor_avx.h
uapi
kernel
kvm
lguest
lib
math-emu
mm
net
oprofile
pci
platform
power
purgatory
ras
realmode
tools
um
video
xen
.gitignore
Kbuild
Kconfig
Kconfig.cpu
Kconfig.debug
Makefile
Makefile.um
Makefile_32.cpu
xtensa
.gitignore
Kconfig
block
certs
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.get_maintainer.ignore
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
REPORTING-BUGS
Breadcrumbs
linux
/
arch
/
x86
/
include
/
asm
/
intel-mid.h
Blame
Blame
Latest commit
History
History
177 lines (146 loc) · 4.98 KB
Breadcrumbs
linux
/
arch
/
x86
/
include
/
asm
/
intel-mid.h
Top
File metadata and controls
Code
Blame
177 lines (146 loc) · 4.98 KB
Raw
/* * intel-mid.h: Intel MID specific setup code * * (C) Copyright 2009 Intel Corporation * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. */ #ifndef _ASM_X86_INTEL_MID_H #define _ASM_X86_INTEL_MID_H #include <linux/sfi.h> #include <linux/pci.h> #include <linux/platform_device.h> extern int intel_mid_pci_init(void); extern int intel_mid_pci_set_power_state(struct pci_dev *pdev, pci_power_t state); #define INTEL_MID_PWR_LSS_OFFSET 4 #define INTEL_MID_PWR_LSS_TYPE (1 << 7) extern int intel_mid_pwr_get_lss_id(struct pci_dev *pdev); extern int get_gpio_by_name(const char *name); extern void intel_scu_device_register(struct platform_device *pdev); extern int __init sfi_parse_mrtc(struct sfi_table_header *table); extern int __init sfi_parse_mtmr(struct sfi_table_header *table); extern int sfi_mrtc_num; extern struct sfi_rtc_table_entry sfi_mrtc_array[]; /* * Here defines the array of devices platform data that IAFW would export * through SFI "DEVS" table, we use name and type to match the device and * its platform data. */ struct devs_id { char name[SFI_NAME_LEN + 1]; u8 type; u8 delay; void *(*get_platform_data)(void *info); /* Custom handler for devices */ void (*device_handler)(struct sfi_device_table_entry *pentry, struct devs_id *dev); }; #define sfi_device(i) \ static const struct devs_id *const __intel_mid_sfi_##i##_dev __used \ __attribute__((__section__(".x86_intel_mid_dev.init"))) = &i /** * struct mid_sd_board_info - template for SD device creation * @name: identifies the driver * @bus_num: board-specific identifier for a given SD controller * @max_clk: the maximum frequency device supports * @platform_data: the particular data stored there is driver-specific */ struct mid_sd_board_info { char name[SFI_NAME_LEN]; int bus_num; unsigned short addr; u32 max_clk; void *platform_data; }; /* * Medfield is the follow-up of Moorestown, it combines two chip solution into * one. Other than that it also added always-on and constant tsc and lapic * timers. Medfield is the platform name, and the chip name is called Penwell * we treat Medfield/Penwell as a variant of Moorestown. Penwell can be * identified via MSRs. */ enum intel_mid_cpu_type { /* 1 was Moorestown */ INTEL_MID_CPU_CHIP_PENWELL = 2, INTEL_MID_CPU_CHIP_CLOVERVIEW, INTEL_MID_CPU_CHIP_TANGIER, }; extern enum intel_mid_cpu_type __intel_mid_cpu_chip; /** * struct intel_mid_ops - Interface between intel-mid & sub archs * @arch_setup: arch_setup function to re-initialize platform * structures (x86_init, x86_platform_init) * * This structure can be extended if any new interface is required * between intel-mid & its sub arch files. */ struct intel_mid_ops { void (*arch_setup)(void); }; /* Helper API's for INTEL_MID_OPS_INIT */ #define DECLARE_INTEL_MID_OPS_INIT(cpuname, cpuid) \ [cpuid] = get_##cpuname##_ops /* Maximum number of CPU ops */ #define MAX_CPU_OPS(a) (sizeof(a)/sizeof(void *)) /* * For every new cpu addition, a weak get_<cpuname>_ops() function needs be * declared in arch/x86/platform/intel_mid/intel_mid_weak_decls.h. */ #define INTEL_MID_OPS_INIT { \ DECLARE_INTEL_MID_OPS_INIT(penwell, INTEL_MID_CPU_CHIP_PENWELL), \ DECLARE_INTEL_MID_OPS_INIT(cloverview, INTEL_MID_CPU_CHIP_CLOVERVIEW), \ DECLARE_INTEL_MID_OPS_INIT(tangier, INTEL_MID_CPU_CHIP_TANGIER) \ }; #ifdef CONFIG_X86_INTEL_MID static inline enum intel_mid_cpu_type intel_mid_identify_cpu(void) { return __intel_mid_cpu_chip; } static inline bool intel_mid_has_msic(void) { return (intel_mid_identify_cpu() == INTEL_MID_CPU_CHIP_PENWELL); } #else /* !CONFIG_X86_INTEL_MID */ #define intel_mid_identify_cpu() 0 #define intel_mid_has_msic() 0 #endif /* !CONFIG_X86_INTEL_MID */ enum intel_mid_timer_options { INTEL_MID_TIMER_DEFAULT, INTEL_MID_TIMER_APBT_ONLY, INTEL_MID_TIMER_LAPIC_APBT, }; extern enum intel_mid_timer_options intel_mid_timer_options; /* * Penwell uses spread spectrum clock, so the freq number is not exactly * the same as reported by MSR based on SDM. */ #define FSB_FREQ_83SKU 83200 #define FSB_FREQ_100SKU 99840 #define FSB_FREQ_133SKU 133000 #define FSB_FREQ_167SKU 167000 #define FSB_FREQ_200SKU 200000 #define FSB_FREQ_267SKU 267000 #define FSB_FREQ_333SKU 333000 #define FSB_FREQ_400SKU 400000 /* Bus Select SoC Fuse value */ #define BSEL_SOC_FUSE_MASK 0x7 /* FSB 133MHz */ #define BSEL_SOC_FUSE_001 0x1 /* FSB 100MHz */ #define BSEL_SOC_FUSE_101 0x5 /* FSB 83MHz */ #define BSEL_SOC_FUSE_111 0x7 #define SFI_MTMR_MAX_NUM 8 #define SFI_MRTC_MAX 8 extern void intel_scu_devices_create(void); extern void intel_scu_devices_destroy(void); /* VRTC timer */ #define MRST_VRTC_MAP_SZ 1024 /* #define MRST_VRTC_PGOFFSET 0xc00 */ extern void intel_mid_rtc_init(void); /* The offset for the mapping of global gpio pin to irq */ #define INTEL_MID_IRQ_OFFSET 0x100 #endif /* _ASM_X86_INTEL_MID_H */
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
You can’t perform that action at this time.