When the system/bus clock frequency is an exact power-of-2 multiple of
the desired sdcard frequency, we can drive the latter at the "maximum"
speed via the "perfect" divider. That sometimes turns out too fast, so
in order to be conservative, we double the divider, thus halving the
resulting sdclock.
This allows the Linux driver in single-block mode (cmd17-only) to
operate solidly, without running into timeouts from LiteSDCard FSMs.
FIXME: multi-block (cmd18) transfers still time out, so revisit this
after some additional debugging.
Use irqs dict and "rise", "fall" strings instead of Enums:
Ex: pads=Signal(8), irqs={} : 8-bit Input, No IRQ.
pads=Signal(8), irqs={0: "rise", 7: "fall"}: 8-bit Input, rising IRQ on 0, falling IRQ on 1.
Also simplify the logic.
Change wording of demo README to make it more clear what the process is
and how things related. This should help the newcomer and it still
usefull for the triained.
Change the command example to be more copy paste friendly.
Fixes#814
In order for mor1kx to run an SMP kernel shadow registers must be
enabled. This patch adds two new variants:
- linux+smp - basic linux + smp support
- linux+smp+fpu - linux with FPU and smp support
puts() and putsnonl() are very similar, and can share code.
Reduce code size by making the former call the latter.
Impact for a RISC-V build:
$ size console.o.orig console.o
text data bss dec hex filename
868 0 12 880 370 console.o.orig
832 0 12 844 34c console.o
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
When building with --cpu-type=mor1kx:
litex/soc/software/bios/readline.c: In function 'readline':
litex/soc/software/bios/readline.c:271:3: warning: case label value exceeds maximum value for type [-Wswitch-outside-range]
271 | case KEY_END:
| ^~~~
litex/soc/software/bios/readline.c:297:3: warning: case label value exceeds maximum value for type [-Wswitch-outside-range]
297 | case KEY_DEL:
| ^~~~
litex/soc/software/bios/readline.c:281:3: warning: case label value exceeds maximum value for type [-Wswitch-outside-range]
281 | case DEL:
| ^~~~
The C standard does not specify the signedness of "char", hence this
depends on the implementation. On e.g. RISC-V, "char" is unsigned, but
on OpenRISC, it is signed.
Fix this by making the "ichar" variable explicitly unsigned.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
When building the linux-on-litex-vexriscv documentation with Sphinx
v1.8.5:
Sphinx error:
master file linux-on-litex-vexriscv/build/orangecrab/doc/contents.rst not found
The default value of "master_doc" was changed from "contents" to "index"
in Sphinx v2[1]. As the LiteX doc system creates "index.rst", it thus
fails to build with Sphinx v1.x.
Explicitly configure "master_doc" to "index", to make it work with all
versions of Sphinx, regardless of the default.
[1] https://www.sphinx-doc.org/ca/latest/usage/configuration.html?highlight=master_doc
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>