Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) /* SPDX-License-Identifier: GPL-2.0-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  * (C) 2002 - 2003 Dominik Brodowski <linux@brodo.de>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5)  *  Library for common functions for Intel SpeedStep v.1 and v.2 support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7)  *  BIG FAT DISCLAIMER: Work in progress code. Possibly *dangerous*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) /* processors */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) enum speedstep_processor {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 	SPEEDSTEP_CPU_PIII_C_EARLY = 0x00000001,  /* Coppermine core */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 	SPEEDSTEP_CPU_PIII_C	   = 0x00000002,  /* Coppermine core */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 	SPEEDSTEP_CPU_PIII_T	   = 0x00000003,  /* Tualatin core */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) 	SPEEDSTEP_CPU_P4M	   = 0x00000004,  /* P4-M  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) /* the following processors are not speedstep-capable and are not auto-detected
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)  * in speedstep_detect_processor(). However, their speed can be detected using
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)  * the speedstep_get_frequency() call. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 	SPEEDSTEP_CPU_PM	   = 0xFFFFFF03,  /* Pentium M  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 	SPEEDSTEP_CPU_P4D	   = 0xFFFFFF04,  /* desktop P4  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 	SPEEDSTEP_CPU_PCORE	   = 0xFFFFFF05,  /* Core */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) /* speedstep states -- only two of them */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) #define SPEEDSTEP_HIGH	0x00000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) #define SPEEDSTEP_LOW	0x00000001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) /* detect a speedstep-capable processor */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) extern enum speedstep_processor speedstep_detect_processor(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) /* detect the current speed (in khz) of the processor */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) extern unsigned int speedstep_get_frequency(enum speedstep_processor processor);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) /* detect the low and high speeds of the processor. The callback
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)  * set_state"'s first argument is either SPEEDSTEP_HIGH or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41)  * SPEEDSTEP_LOW; the second argument is zero so that no
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)  * cpufreq_notify_transition calls are initiated.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) extern unsigned int speedstep_get_freqs(enum speedstep_processor processor,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) 	unsigned int *low_speed,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) 	unsigned int *high_speed,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) 	unsigned int *transition_latency,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) 	void (*set_state) (unsigned int state));