diff options
Diffstat (limited to 'sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c')
-rw-r--r-- | sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c b/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c index 56227f948e98..2bcf6ba8da1e 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c @@ -61,17 +61,10 @@ #define HZ2MHZ(freq) ((freq) / (1000 * 1000)) #define MHZ2HZ(freq) ((freq) * (1000 * 1000)) -#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 -#endif #define DEFAULT_CORE_FREQUENCY 250 #define DEFAULT_SDRAM_FREQUENCY 400 #define TRANSITION_LATENCY 1000 @@ -1211,9 +1204,9 @@ bcm2835_cpufreq_identify(driver_t *driver, device_t parent) return; DPRINTF("driver=%p, parent=%p\n", driver, parent); - if (device_find_child(parent, "bcm2835_cpufreq", -1) != NULL) + if (device_find_child(parent, "bcm2835_cpufreq", DEVICE_UNIT_ANY) != NULL) return; - if (BUS_ADD_CHILD(parent, 0, "bcm2835_cpufreq", -1) == NULL) + if (BUS_ADD_CHILD(parent, 0, "bcm2835_cpufreq", DEVICE_UNIT_ANY) == NULL) device_printf(parent, "add child failed\n"); } @@ -1507,20 +1500,6 @@ bcm2835_cpufreq_make_freq_list(device_t dev, struct cf_setting *sets, if (min_freq > cpufreq_lowest_freq) min_freq = cpufreq_lowest_freq; -#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; @@ -1536,7 +1515,6 @@ bcm2835_cpufreq_make_freq_list(device_t dev, struct cf_setting *sets, sets[idx].dev = dev; idx++; } -#endif *count = idx; return (0); |