1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-19 14:08:17 +02:00
OpenWrt Source Repository https://openwrt.org/
Go to file
Adrian Schmutzler ebc090e420 ath79: reduce spi-max-frequency to 50 MHz
The introduction of ebf0d8dadeca ("ath79: add new ar934x spi driver")
made the SPI memory unusable on devices with very high spi-max-frequency
(104 MHz).

Here's how the actual clock is calculated: (AHB_CLK/((CLOCK_DIVIDER+1)*2))
where AHB_CLK is a fixed clock (e.g. 200MHz on AR9331) and CLOCK_DIVIDER
is the parameter we can set. Highest clock according to this formula is
AHB_CLK/2 (100MHz, but that didn't work in device tests).
The next possible value is AHB_CLK/4 (50MHz). Speeds between 50 MHz and
100 MHz will be rounded down, so using values higher than 50 MHz does
not provide any benefit.

Consequently, this patch reduces spi-max-frequency for all devices with
values higher than 50 MHz to 50 MHz (effectively, this only affects
devices with 104 MHz before this patch).

Tested on GL.inet GL-AR150:
Boot fails with 104 MHz but is successful with both 50 MHz and 80 MHz
(fast-read), where the latter two yield identical read speeds.

Fixes: ebf0d8dadeca ("ath79: add new ar934x spi driver")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-02-27 12:14:09 +01:00
.github
config base-files: add all buildinfo with INCLUDE_CONFIG 2020-02-27 12:14:09 +01:00
include kernel: bump 4.19 to 4.19.106 2020-02-24 19:11:36 +01:00
package base-files: add all buildinfo with INCLUDE_CONFIG 2020-02-27 12:14:09 +01:00
scripts scripts/arm-magic.sh: switch to /bin/sh 2020-01-02 23:59:20 +01:00
target ath79: reduce spi-max-frequency to 50 MHz 2020-02-27 12:14:09 +01:00
toolchain toolchain/binutils: Add binutils 2.34 2020-02-22 16:38:41 +01:00
tools tools/bison: Update to 3.5.1 2020-02-19 22:02:47 +01:00
.gitattributes
.gitignore gitignore: ignore patches in OpenWrt root directory 2019-11-06 00:27:55 +01:00
BSDmakefile
Config.in
feeds.conf.default
LICENSE
Makefile build: add buildinfo as single Makefile target 2019-10-17 14:01:33 +02:00
README build: switch to Python 3 2019-07-26 08:09:16 +02:00
rules.mk rules.mk: remove "$(STAGING_DIR)/include" 2019-11-02 20:51:56 +01:00

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------

This is the buildsystem for the OpenWrt Linux distribution.

To build your own firmware you need a Linux, BSD or MacOSX system (case
sensitive filesystem required). Cygwin is unsupported because of the lack
of a case sensitive file system.

You need gcc, binutils, bzip2, flex, python3.5+, perl, make, find, grep, diff,
unzip, gawk, getopt, subversion, libz-dev and libc headers installed.

1. Run "./scripts/feeds update -a" to obtain all the latest package definitions
defined in feeds.conf / feeds.conf.default

2. Run "./scripts/feeds install -a" to install symlinks for all obtained
packages into package/feeds/

3. Run "make menuconfig" to select your preferred configuration for the
toolchain, target system & firmware packages.

4. Run "make" to build your firmware. This will download all sources, build
the cross-compile toolchain and then cross-compile the Linux kernel & all
chosen applications for your target system.

Sunshine!
	Your OpenWrt Community
	http://www.openwrt.org