Commit graph

450 commits

Author SHA1 Message Date
Gabriel Somlo
c52731d1f1 liblitesdcard/sdcard: return error code outside '#ifdef SDCARD_DEBUG' 2020-07-04 15:24:05 -04:00
Gabriel Somlo
499d291daa liblitesdcard/sdcard: cosmetic: fix indentation, eliminate redundant counter 2020-07-04 15:22:28 -04:00
Florent Kermarrec
31a9273c6d litesdcard: use new clocker. 2020-07-03 20:06:42 +02:00
Florent Kermarrec
ee8da87e41 liblitesdcard/sdcard: use new register names and new software initalization register. 2020-07-03 19:30:06 +02:00
Florent Kermarrec
2f6b27da23 litelitesdcard/sdcard: remove wait workaround and replace remove SDCARD_MULTIPLE_BLOCK_SUPPORT define (replace it with SDCARD_CMD23_SUPPORT). 2020-07-03 18:48:43 +02:00
Florent Kermarrec
94821cb73c litesdcard: update integration. 2020-07-03 14:57:40 +02:00
Florent Kermarrec
42bfb90f14 liblitesdcard/sdcard: add SDCARD_MULTIPLE_BLOCK_SUPPORT define. 2020-07-01 12:40:23 +02:00
Florent Kermarrec
54598ed2f8 software/bios/Makefile: fix #578 merge. (get back #579). 2020-06-29 17:01:36 +02:00
Florent Kermarrec
7beffba187 software/libbase/memtest: fix bus errors reporting. 2020-06-29 16:46:03 +02:00
sadullah
caf520c854 clean Makefile 2020-06-28 21:23:56 -04:00
sadullah
7c83a1b858 syn with master blackparrot, upgrade BP to IMA 2020-06-28 13:07:59 -04:00
Florent Kermarrec
1e605fb23d liblitesdcard/sdcard: update with litesdcard. 2020-06-26 20:10:10 +02:00
Florent Kermarrec
4094a6ec3a liblitesdcard/sdcard: increase busy_wait and use common timeout. 2020-06-25 20:07:39 +02:00
Florent Kermarrec
e8f84c96a7 liblitesdcard/sdcard: decode cid only when SDCARD_DEBUG is set. 2020-06-25 13:48:49 +02:00
Florent Kermarrec
c07703124f liblitesdcard/sdcard_read: enable multiple block read.
>10MB/s read speed with a 25MHz clock.
2020-06-25 13:46:39 +02:00
Florent Kermarrec
c466900322 software/bios/litesdcard: remove sdcard_set_clk. 2020-06-25 11:12:40 +02:00
Florent Kermarrec
d8aa9a42e4 software/bios/boot: improve printfs. 2020-06-25 09:58:08 +02:00
Florent Kermarrec
55e0193701 software/libase/memtest: improve printfs and add progress bar on data test. 2020-06-25 09:57:29 +02:00
Florent Kermarrec
497413664e libbase/progress: reduce to 40 HASHES_PER_LINE. 2020-06-25 09:56:13 +02:00
Florent Kermarrec
52d7f59af5 software/liblitedram: remove DDRPHY_CMD_DELAY support (no longer useful). 2020-06-25 09:01:33 +02:00
Florent Kermarrec
07f145fdaf software/liblitedram/sdram: remove SRAM hack.
We now have memtest bios functions to test memories and testing SRAM while used by the BIOS is probably not a good idea.
2020-06-25 08:58:01 +02:00
Florent Kermarrec
e2f9a82529 software/libbase/memtest: reorder functions. 2020-06-25 08:47:57 +02:00
Jędrzej Boczar
3b084b284a bios: move memtest from liblitedram to libbase 2020-06-24 14:53:18 +02:00
Florent Kermarrec
3a5aec6933 software/liblitesdcard: simplify, switch to DMAs, remove clocking/test functions. 2020-06-24 12:25:37 +02:00
Florent Kermarrec
d59cec5acc software: use a single crt0 (deprecate crt0-ctr/crt0-xip) and avoid unnecessary defines.
Since https://github.com/enjoy-digital/litex/issues/566, crt0-ctr and crt0-xip are now similiar
so we can get back to a single crt0 and remove the defines that were generated to distinguish
the different cases.

Since LiteX/MiSoC have diverged and are no longer compatible, we also no longer need to generate
the LiteX flag.
2020-06-23 12:41:48 +02:00
Florent Kermarrec
b1fe3140d7 bios/main: enable sdcardboot in boot_sequence with litesdcard. 2020-06-22 21:57:00 +02:00
Florent Kermarrec
847a5fcff4 software/liblitesdcard/sdcard: boot with FatFs working (hacky).
Tested with Linux-on-LiteX-Vexriscv on Trellisboard with 10MHz clock.
2020-06-22 21:33:17 +02:00
Benjamin Herrenschmidt
28ea4b3f4c software/microwatt: Fix copying data to RAM and clearing BSS
This also makes us use the "small" memory model to avoid having to
use more complex constructs and adds the TOC to the linker script

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-06-21 19:35:04 +10:00
Florent Kermarrec
05cb5f96a1 bios/boot: rewrite ROM boot description. 2020-06-18 12:56:29 +02:00
Gabriel Somlo
9ad45a6932 liblitesdcard/[spi]sdcard: avoid redundant (re-)initialization 2020-06-17 17:21:33 -04:00
enjoy-digital
aa0cd21378
Merge pull request #565 from gsomlo/gls-cosmetic-spi-fat
post-FatFs cleanup
2020-06-16 21:49:15 +02:00
Gabriel Somlo
5d9d99c0c2 liblitesdcard/sdcard: streamline initialization (cosmetic)
Also, s/spisdcardstatus/sdcardstatus/g (this is *not* the SPI version).
2020-06-15 15:31:41 -04:00
Gabriel Somlo
c05d0f1966 liblitesdcard/spisdcard: streamline initialization (cosmetic). 2020-06-15 15:24:40 -04:00
Vegard Storheil Eriksen
9c68d71503 bios/linker: Place .data in sram with initial copy in rom. 2020-06-15 16:24:53 +02:00
Vegard Storheil Eriksen
336896603f bios/linker: Place .got in .rodata. 2020-06-15 16:04:02 +02:00
Gabriel Somlo
7d5ca3f926 bios/boot: addresses should use 'unsigned long' 2020-06-13 21:31:49 -04:00
Florent Kermarrec
5ddf350c2d software/spisdcard: reduce SPISDCARD_CLK_FREQ to 16MHz.
25MHz does not seem to work on all boards/configurations, needs to be investigated.
2020-06-11 19:18:32 +02:00
Florent Kermarrec
653edd17ca bios/boot: simplify flashboot (remove specific linux boot).
Storage in SPI Flash is generally limited and booting Linux from it is no longer very useful
since boot from SDCard is now supported. This is in the continuity of the SDCard/Ethernet
simplications to have an easier and more flexible boot scheme.
2020-06-11 13:38:38 +02:00
Florent Kermarrec
7b65a93ca5 bios/boot: add separators, update copyrights. 2020-06-11 13:19:37 +02:00
Florent Kermarrec
f4abdd3f2c bios/boot: make Ethernet boot mode flexible (now also using boot.json similarly to SDCard boot).
Example of boot.json:
{
	"Image":        "0x40000000",
	"rootfs.cpio":  "0x40800000",
	"rv32.dtb":     "0x41000000",
	"emulator.bin": "0x41100000"
}
2020-06-11 13:12:58 +02:00
Florent Kermarrec
c2ae22eeb6 bios/boot: make SDCard boot more flexible using a boot.json file on the SDCard.
The BIOS now reads the boot.json file to know which files need to be copied to RAM and where.
It will fallback to boot.bin is no boot.json is found and boot will fail if neither is found.

Example of boot.json file used to boot Linux-On-LiteX-Vexriscv:
{
	"Image":        "0x40000000",
	"rootfs.cpio":  "0x40800000",
	"rv32.dtb":     "0x41000000",
	"emulator.bin": "0x41100000"
}
2020-06-11 11:26:10 +02:00
Florent Kermarrec
d918c0bb99 software/bios/boot/sdcardboot: let FatFs do the SDCard initialization with disk_initialize. 2020-06-11 08:33:56 +02:00
Florent Kermarrec
5197600812 software/bios/boot: add sdcardboot support for VexRiscv SMP. 2020-06-10 17:39:09 +02:00
Florent Kermarrec
72026d44f7 software/bios/main: clarify address space with @ instead of -. 2020-06-10 15:19:44 +02:00
enjoy-digital
ace81c83ee
Merge pull request #562 from gsomlo/gls-crlf
liblitesdcard: maintain unix newline convention across all source files
2020-06-10 14:40:28 +02:00
Florent Kermarrec
08bef5fc4c software/liblitesdcard/ffconf: enable FF_FS_MINIMIZE and FF_FS_TINY. 2020-06-10 11:46:59 +02:00
Florent Kermarrec
75225e5e33 software/bios/boot: move f_mount to copy_image_from_sdcard_to_ram and force mount. 2020-06-10 11:46:18 +02:00
Florent Kermarrec
59a048b666 software/libliteeth/tftp: switch to progress bar. 2020-06-10 10:00:05 +02:00
Florent Kermarrec
f7e06a7e3f bios/boot/copy_image_from_flash_to_ram: add missing init_progression_bar. 2020-06-10 09:59:38 +02:00
Florent Kermarrec
df9146fb78 soc/spisdcard: use 32-bit SPIMaster and do 32-bit xfers in spisdcardreceive_block to optimize speed. 2020-06-10 09:50:30 +02:00