Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171605004
D9640.id25280.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D9640.id25280.diff
View Options
Index: sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c
===================================================================
--- sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c
+++ sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c
@@ -66,16 +66,16 @@
#define HZ2MHZ(freq) ((freq) / (1000 * 1000))
#define MHZ2HZ(freq) ((freq) * (1000 * 1000))
-#ifdef SOC_BCM2836
+#ifdef SOC_BCM2835
+#define OFFSET2MVOLT(val) (1200 + ((val) * 25))
+#define MVOLT2OFFSET(val) (((val) - 1200) / 25)
+#define DEFAULT_ARM_FREQUENCY 700
+#define DEFAULT_LOWEST_FREQ 300
+#else
#define OFFSET2MVOLT(val) (((val) / 1000))
#define MVOLT2OFFSET(val) (((val) * 1000))
#define DEFAULT_ARM_FREQUENCY 600
#define DEFAULT_LOWEST_FREQ 600
-#else
-#define OFFSET2MVOLT(val) (1200 + ((val) * 25))
-#define MVOLT2OFFSET(val) (((val) - 1200) / 25)
-#define DEFAULT_ARM_FREQUENCY 700
-#define DEFAULT_LOWEST_FREQ 300
#endif
#define DEFAULT_CORE_FREQUENCY 250
#define DEFAULT_SDRAM_FREQUENCY 400
@@ -1544,7 +1544,20 @@
if (min_freq > cpufreq_lowest_freq)
min_freq = cpufreq_lowest_freq;
-#ifdef SOC_BCM2836
+#ifdef SOC_BCM2835
+ /* from freq to min_freq */
+ for (idx = 0; idx < *count && freq >= min_freq; idx++) {
+ if (freq > sc->arm_min_freq)
+ volts = sc->max_voltage_core;
+ else
+ volts = sc->min_voltage_core;
+ sets[idx].freq = freq;
+ sets[idx].volts = volts;
+ sets[idx].lat = TRANSITION_LATENCY;
+ sets[idx].dev = dev;
+ freq -= MHZSTEP;
+ }
+#else
/* XXX RPi2 have only 900/600MHz */
idx = 0;
volts = sc->min_voltage_core;
@@ -1560,19 +1573,6 @@
sets[idx].dev = dev;
idx++;
}
-#else
- /* from freq to min_freq */
- for (idx = 0; idx < *count && freq >= min_freq; idx++) {
- if (freq > sc->arm_min_freq)
- volts = sc->max_voltage_core;
- else
- volts = sc->min_voltage_core;
- sets[idx].freq = freq;
- sets[idx].volts = volts;
- sets[idx].lat = TRANSITION_LATENCY;
- sets[idx].dev = dev;
- freq -= MHZSTEP;
- }
#endif
*count = idx;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Sep 13, 2:36 AM (10 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38829934
Default Alt Text
D9640.id25280.diff (1 KB)
Attached To
Mode
D9640: cpufreq for rpi3
Attached
Detach File
Event Timeline
Log In to Comment