raspberrypi: frequencies imposed by the firmware are now used by default for all board models

This commit is contained in:
Calin Crisan 2016-06-12 21:34:30 +03:00
parent 33043ef7a5
commit ae439f579b
5 changed files with 20 additions and 20 deletions

View File

@ -1,8 +0,0 @@
arm_freq=700
core_freq=250
sdram_freq=400
over_voltage=0
gpu_mem=128
gpu_mem_256=128
gpu_mem_512=128

View File

@ -17,6 +17,7 @@
import logging import logging
import os.path import os.path
import subprocess
from config import additional_config from config import additional_config
@ -53,12 +54,26 @@ OVERCLOCK = {
800: '800|250|400|0', 800: '800|250|400|0',
900: '900|250|450|0', 900: '900|250|450|0',
950: '950|250|450|0', 950: '950|250|450|0',
1000: '1000|500|600|6' 1000: '1000|500|600|6',
1001: '1001|300|450|6'
} }
def _is_pi_zero():
try:
subprocess.check_call('grep -q "^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]09[0-9a-fA-F]$" /proc/cpuinfo', shell=True)
return True
except:
return False
def _get_board_settings(): def _get_board_settings():
gpu_mem = 128 gpu_mem = 128
camera_led = True camera_led = True
if _is_pi_zero():
arm_freq = 1001
else:
arm_freq = 700 arm_freq = 700
if os.path.exists(CONFIG_TXT): if os.path.exists(CONFIG_TXT):
@ -268,7 +283,8 @@ def overclock():
('800|250|400|0', 'modest (800/250/400/0)'), ('800|250|400|0', 'modest (800/250/400/0)'),
('900|250|450|0', 'medium (900/250/450/0)'), ('900|250|450|0', 'medium (900/250/450/0)'),
('950|250|450|0', 'high (950/250/450/0)'), ('950|250|450|0', 'high (950/250/450/0)'),
('1000|500|600|6', 'turbo (1000/500/600/6)') ('1000|500|600|6', 'turbo (1000/500/600/6)'),
('1001|300|450|6', 'PiZero (1000/300/450/6)'),
], ],
'section': 'expertSettings', 'section': 'expertSettings',
'advanced': True, 'advanced': True,

View File

@ -1,6 +0,0 @@
arm_freq=900
core_freq=250
sdram_freq=450
over_voltage=0
gpu_mem=128

View File

@ -60,7 +60,7 @@ OVERCLOCK = {
def _get_board_settings(): def _get_board_settings():
gpu_mem = 128 gpu_mem = 128
camera_led = True camera_led = True
arm_freq = 700 arm_freq = 1001
if os.path.exists(CONFIG_TXT): if os.path.exists(CONFIG_TXT):
logging.debug('reading board settings from %s' % CONFIG_TXT) logging.debug('reading board settings from %s' % CONFIG_TXT)

View File

@ -1,2 +0,0 @@
gpu_mem=128