Commit graph

1588 commits

Author SHA1 Message Date
Filipe Laíns
235e8cf62b
cpu: add a few missing GCC toolchains
This names are used by Arch Linux for eg.

Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-09 15:58:33 +01:00
Florent Kermarrec
5ebdfd9307 liblitesdcard/sdcard: clamp divider value. 2020-07-09 13:09:36 +02:00
enjoy-digital
23085cffea
Merge pull request #584 from ozbenh/memtest
Memtest/memspeed improvements
2020-07-09 12:54:42 +02:00
Florent Kermarrec
5c332e4b58 cores/dma: add stream.last support on WishboneDMAReader. 2020-07-09 12:18:09 +02:00
Benjamin Herrenschmidt
83d24d087d memspeed: Write a fixed value
Otherwise we have at least an extra addition in the loop
which squews the result compared to the read loop.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-07-08 17:13:37 +10:00
Florent Kermarrec
b54b3b3362 interconnect/avalon: minor cleanup, remove max on SyncFIFO depth. 2020-07-08 07:53:42 +02:00
Benjamin Herrenschmidt
c0b948d4f9 memtest: Fix memspeed access size
The move to libbase reverted the type of the pointer
from long to int.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-07-08 13:21:45 +10:00
Benjamin Herrenschmidt
798b3d7ba4 memtest: Fix integer size/type printf errors
In a couple of places, memtest uses %x to print a pointer which
is illegal (and could be problematic on 64-bit). Use %p instead.

Additionally, use %ld when printing longs

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-07-08 13:17:48 +10:00
Florent Kermarrec
8af4e05c7f software/litesdcard: use new clocking and use slow clock during initialization. 2020-07-07 19:59:50 +02:00
Florent Kermarrec
52f36b1257 integration/soc/sdcard: cleanup emulator integration, fix sim. 2020-07-07 15:05:07 +02:00
Florent Kermarrec
7602977c16 integration/soc: move pads.rst control to PHY. 2020-07-07 14:58:06 +02:00
Florent Kermarrec
23dfefb9be software/liblitesdcard: improve sdcard_init and handle errors. 2020-07-07 11:03:26 +02:00
Florent Kermarrec
8d76509032 litesdcard: use new Block2Mem/Mem2Block DMAs. 2020-07-07 09:24:08 +02:00
Gabriel Somlo
6fdb36b84a liblitesdcard/sdcard: adjust card-ready timeout
Testing on nexys4ddr and rocket, approximately 12 iterations of the
timeout loop (using `busy_wait(1)`) are needed to receive a "ready"
response from the SDcard, assuming a "warm" reset where the card has
already been previously initialized.

If the SDcard is ejected and re-inserted, or if the board is "cold-reset"
(e.g., reprogrammed via openocd vs. a simple push of the reset button),
it takes approximately 450 iterations before the SDCard responds with a
"ready" message.

In either case, a timeout of 10 is insufficient. This patch increases
the busy-wait to 10, and the timeout loop counter to 128, which should
cover most cases.

Additionally, make a few minor cosmetic improvements.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
2020-07-06 17:38:07 -04:00
Florent Kermarrec
e473c6f29e liblitesdcard/sdcard: add timeout when waiting card to be ready. 2020-07-06 20:07:20 +02:00
Florent Kermarrec
31d4d7c22c liblitesdcard/sdcard: use new SDClocker enable CSR. 2020-07-06 18:59:28 +02:00
Florent Kermarrec
f0a97791a9 interconnect/csr_bus: move/rewrite paged access warning.
Was incorrectly triggered with csr_data_width=32.
2020-07-06 12:26:24 +02:00
Florent Kermarrec
9e46195299 interconnect/csr_bus: remove 64-bit CSR bus alignment support (no longer supported in SoCs). 2020-07-06 09:51:32 +02:00
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
e6b94b1663 interconnect/stream: allow empty description/payload on Endpoint. 2020-07-03 19:29:05 +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
2c53f9b2ff interconnect/stream: add ClockDomainCrossing wrapper around AsyncFIFO. 2020-07-03 14:39:31 +02:00
Florent Kermarrec
23a95bea1d integration/soc/etherbone: always run ethcore in eth_tx clock domain and remove clock_domain parameter.
This avoid issues when sys_clk_freq < eth_tx clock like sys_clk_freq < 125MHz with 1Gbps link.
2020-07-02 11:38:54 +02:00
Pawel Sagan
16a0aebcad i2s: Fix the incorrect TX fifo almost empty offset 2020-07-01 13:32:53 +02:00
Florent Kermarrec
8f204e7797 sdcard: rename cd_sdcard to cd_sd to avoid unnecessary clock domain. 2020-07-01 12:50:24 +02:00
Florent Kermarrec
42bfb90f14 liblitesdcard/sdcard: add SDCARD_MULTIPLE_BLOCK_SUPPORT define. 2020-07-01 12:40:23 +02:00
Florent Kermarrec
e492e96bf7 integration/soc/add_sdcard: update SDEmulator. 2020-07-01 12:39:56 +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
9256a4db6d minor change in BP top module 2020-06-28 13:10:24 -04:00
sadullah
7c83a1b858 syn with master blackparrot, upgrade BP to IMA 2020-06-28 13:07:59 -04:00
enjoy-digital
dae23f2a82
Merge pull request #576 from betrusted-io/deprecate_slave
Deprecate slave terminology
2020-06-27 09:35:04 +02:00
Florent Kermarrec
1e605fb23d liblitesdcard/sdcard: update with litesdcard. 2020-06-26 20:10:10 +02:00
Florent Kermarrec
34e9d12ef2 interconnect/axi/AXIStreamInterface: add tuser support. 2020-06-26 08:36:16 +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
dfa3768d0e integration/soc/add_sdcard: remove sdclk. 2020-06-25 11:12:17 +02:00
bunnie
0b4c5059f2 Deprecate slave terminology
http://oshwa.org/a-resolution-to-redefine-spi-signal-names
2020-06-25 17:12:12 +08:00
Florent Kermarrec
9a27465d1d cores/clock/S6DCM: add expose_drp.
From LiteSDCard SDClockerS6.
2020-06-25 10:11:42 +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
fd4765e159 integration/soc: replace SDDataReader/SDDataWriter with DMAs. 2020-06-24 12:23:35 +02:00
Florent Kermarrec
bc64e35480 soc/cores: add simple DMA with WishboneDMAReader/WishboneDMAWriter. 2020-06-24 12:22:44 +02:00
Florent Kermarrec
64589cfd2b soc/cores/uart/FT245: only use Asynchronous FIFO (Synchronous FIFO requires a software configuration). 2020-06-23 16:53:17 +02:00
Florent Kermarrec
0780b629a9 soc/cores/usb_fifo: cleanup and reduce fifo_depth (provide similar throughput when used as UART). 2020-06-23 16:51:24 +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
02908c51b3 cpu/lm32: fix config include paths.
Was broken since the switch to python data modules.
2020-06-23 09:47:04 +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
Florent Kermarrec
5b2f9c244d cores/cpu/microwatt: revert setup stack and fix missing subi %r1,%r1,0x100 (thanks ozbenh).
Tested with powerpc64le-buildroot-linux-gnu-gcc.br_real (Buildroot 2020.02-00011-g7ea8a52) 8.4.0.
2020-06-22 17:09:55 +02:00
Florent Kermarrec
0c0689f444 wishbone/DownConverter: fix read datapath when access is skipped because sel = 0.
We also need to shift dat_r when acess is skipped.
2020-06-22 13:37:14 +02:00
Florent Kermarrec
84617b585b cores/cpu/microwatt: temporary revert crt0.S/setup stack.
lxsim --cpu-type=microwatt --cpu-variant=standard+ghdl no longer working otherwise.
2020-06-22 11:36:19 +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
b0b37b4cb9 soc/cores/spi: make cs/loopback CSR optional.
Useful for API retro-compatibility.
2020-06-19 14:17:30 +02:00
Florent Kermarrec
05cb5f96a1 bios/boot: rewrite ROM boot description. 2020-06-18 12:56:29 +02:00
enjoy-digital
bdcccb9216
Merge pull request #569 from gsomlo/gls-mor1kx-data-init
cpu/mor1kx: fix .data initialization (follow-up to PR #567)
2020-06-18 08:43:20 +02:00
Gabriel Somlo
9ad45a6932 liblitesdcard/[spi]sdcard: avoid redundant (re-)initialization 2020-06-17 17:21:33 -04:00
Gabriel Somlo
e96cfbbc83 cpu/mor1kx: fix .data initialization (follow-up to PR #567) 2020-06-16 20:28:57 -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
27fcddb209 soc_core: Increase sram size default to 8k. 2020-06-15 21:18:26 +02: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
a086237a07
Merge pull request #564 from shenki/microwatt-updates
Microwatt updates
2020-06-10 14:53:09 +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
Florent Kermarrec
d45cfc1e15 software/libbase/progress: avoid \t in progress bar, reduce HASHES_PER_LINE. 2020-06-10 09:16:06 +02:00
Florent Kermarrec
5beba178f2 software/libsdcard/spisdcard: add and use busy_wait_us to optimize speed. 2020-06-10 09:15:12 +02:00
Florent Kermarrec
dae15511a4 bios/boot/copy_image_from_sdcard_to_ram: use chunks of 32KB to increase speed. 2020-06-10 08:21:54 +02:00
Florent Kermarrec
d294e0f1de bios/boot: add progress bar to copy_image_from_flash_to_ram, use uint32_t in flash/sdcard functions. 2020-06-10 08:12:12 +02:00
Florent Kermarrec
99f40fecaa libase/progress: move __div64_32, do_div to div64.h/c as it was in Barebox. 2020-06-10 07:47:21 +02:00
Florent Kermarrec
96fc96eccd software/liblitesdcard: remove read_block prototype, minor cleanup. 2020-06-10 07:40:08 +02:00
Joel Stanley
748dcc1c26 microwatt: Add mmu.vhdl 2020-06-10 12:30:52 +09:30
Joel Stanley
b57fc8702a microwatt: Update IRQ signal in wrapper 2020-06-10 12:30:52 +09:30
Joel Stanley
68d2aa45fa microwatt: Add icache flush 2020-06-10 12:30:49 +09:30
Joel Stanley
e6909e2978 microwatt: Implement boot helper 2020-06-10 11:23:22 +09:30
Gabriel Somlo
5575a921d0 liblitesdcard: maintain unix newline convention across all source files 2020-06-09 14:09:35 -04:00
Florent Kermarrec
fe9b42facf bios/boot: use progress bar in copy_image_from_sdcard_to_ram. 2020-06-09 20:00:32 +02:00
Florent Kermarrec
21b9239dc0 libbase: add progress bar (from Barebox). 2020-06-09 20:00:05 +02:00
Florent Kermarrec
32ebbc7761 software/liblitesdcard: add retries when setting card to Idle. 2020-06-09 19:59:38 +02:00
Florent Kermarrec
04d0ba6187 software/liblitesdcard/sdcard: add FatFs disk functions. 2020-06-09 17:58:43 +02:00
Florent Kermarrec
e27ed657e9 software/liblitesdcard/spisdcard: rename #defines and allow external definition. 2020-06-09 13:50:28 +02:00
Florent Kermarrec
a9e8860e49 software/liblitesdcard: create fat directory for FatFs files. 2020-06-09 13:44:26 +02:00
Florent Kermarrec
f1aba7e45c sofware/liblitesdcard: enable Long Filename (LFN). 2020-06-09 13:35:14 +02:00
Florent Kermarrec
fb282d1a72 software/libsdcard: rewrite/simplify SPISDCard/FatFs support and only keep SDCard ver2.00+ compatibility. 2020-06-09 12:50:56 +02:00
Gabriel Somlo
78e3f25157 liblitesdcard: convert all sources to unix style newlines (cosmetic)
Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
2020-06-06 13:24:29 -04:00
Florent Kermarrec
c1806eba11 software/liblitesdcard: remove unsused functions with FF_FS_READONLY. 2020-06-05 23:25:54 +02:00
Florent Kermarrec
f9b43c81cc software/liblitesdcard: switch to FatFs for sdcardboot. 2020-06-05 21:20:19 +02:00
Florent Kermarrec
f972c8e45e software/liblitesdcard: base it on FatFs generic example code + LiteX's SPIMaster specific functions. 2020-06-05 16:27:38 +02:00
Florent Kermarrec
5b908983a2 software/liblitesdcard: add FatFs files.
To avoid maintaining our own code and support all Fat filesystems, let's just use FatFs library.
2020-06-05 16:26:58 +02:00
Florent Kermarrec
7d141258be software/liblitesdcard/spisdcard: simplify/rewrite for consistency with the others parts of the project.
- Improve code readability, remove un-needed or duplicate comments.
- Only use a spi_xfer function for both write/read.
- Set the SDCard to low clk freq before init and increase it when initialized.
2020-06-05 12:46:23 +02:00
Florent Kermarrec
860ac1e212 software/liblitesdcard: add copyrights to spisdcard/fat16. 2020-06-04 12:14:54 +02:00
Florent Kermarrec
0ec50881f0 software/liblitesdcard/sdcard: simplify readSector. 2020-06-04 11:55:25 +02:00
Florent Kermarrec
8c6f74d483 software/liblitesdcard: fat16 boot working with both SPI and SD modes. 2020-06-04 11:40:42 +02:00
Florent Kermarrec
bdaf6ff2dd software/liblitesdcard: move fat16 code to separate file to avoid duplication. 2020-06-03 23:16:13 +02:00
Florent Kermarrec
4b3c5203ed software/bios/libsdcard: add initial boot from sdcard with litescard, rename spisdcardboot command to sdcardboot. 2020-06-03 20:03:18 +02:00
Florent Kermarrec
b30e3353b5 soc/add_sdcard: use SDClockerS7 for 7-Series and SDClockerGen for others devices. 2020-06-03 18:37:08 +02:00
Jan Kowalewski
eceee7e4c4 litex/soc/software/liblitespi: fix names associated with PHY CSRs 2020-06-03 15:37:06 +02:00
Florent Kermarrec
997a17b933 soc/add_sdcard: add minimal SDClockerECP5 on ECP5. 2020-06-03 14:34:59 +02:00
Florent Kermarrec
9a026c09f9 soc/add_sdcard: remove limitation to 7-Series but only add clocker for it. 2020-06-03 13:47:39 +02:00
Florent Kermarrec
c311f98cfa soc/add_sdcard: emulator clocking moved to litesdcard. 2020-06-03 13:43:44 +02:00
Florent Kermarrec
382f239e74 software/libsdcard: keep SDCARD_DEBUG enabled for now, fix typos. 2020-06-03 13:38:34 +02:00
Florent Kermarrec
20bbdaaf6b soc/add_sdcard: remove Timer (unused). 2020-06-03 13:13:07 +02:00
Florent Kermarrec
ab447df922 software/liblitesdcard: review/simplify (code is over-complicated, revert part of the old code and write a minimal test for now). 2020-06-03 13:12:45 +02:00
Florent Kermarrec
ee4056cfec software/liblitesdcard: remove sdtimer functions (unused).
sdtimer was used to evaluate performance but is no longer used.
2020-06-03 11:11:45 +02:00
Florent Kermarrec
55723f138b software/liblitedram: revert sdrsw() in sdrlevel: this is still required for sdrlevel command. 2020-06-02 16:14:53 +02:00
enjoy-digital
ddcf68c062
Merge pull request #553 from ozbenh/sim-autoinit
sdram: Unconditionally switch to SW control before inits
2020-06-02 15:49:00 +02:00
Mateusz Holenko
f1e7d73e48 bios: boot: Boot linux on mor1kx with external device tree and rootfs 2020-06-02 14:57:48 +02:00
Tim Ansell
77139289f8
Merge pull request #552 from ozbenh/memspeed-long
sdram: Use unsigned long for memory test
2020-06-01 15:23:03 -07:00
Benjamin Herrenschmidt
6239eac130 sdram: Use unsigned long for memory test
This makes it twice as fast on 64-bit CPUs when using a 64-bit bus :-)

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-06-02 08:08:42 +10:00
enjoy-digital
a116578c82
Merge pull request #550 from antmicro/jboc/spd-read
bios/litedram: Add command to verify SPD contents with the one used during generation
2020-06-01 21:17:40 +02:00
Benjamin Herrenschmidt
4a6256a50d sdram: Unconditionally switch to SW control before inits
This will allow the controller to default to HW control which means
the sim model can be used without specific initializations

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-06-01 23:44:09 +10:00
enjoy-digital
5cc7a98845
Merge pull request #547 from gsomlo/gls-fix-sdcard-status
soc/software/litesdcard: update for response register back to 128 bits
2020-06-01 11:37:05 +02:00
Florent Kermarrec
395af900fd interconnect/wishbone/DownConverter: skip accesses on slave when sel==0 and simplify.
Improve efficiency for 64-bit CPU accessing only the 32-bit LSBs/MSBs.
2020-06-01 11:06:23 +02:00
Florent Kermarrec
511832a911 soc/interconnect/axi: generate wishbone.sel for reads. 2020-06-01 10:58:45 +02:00
Florent Kermarrec
4f82a36afd soc/software: only keep 32-bit CSR alignment support.
64-bit support was added for 64-bit CPU because of limitation of the hardware
on CSR accesses. Now that the Wihhbone2CSR bus handles wishbone.sel, this is no
longer required.
2020-06-01 10:01:14 +02:00
Gabriel Somlo
28290efd00 soc/software/litesdcard: update for response register back to 128 bits
The additional (17th) byte returned via the response register was
ignored by software (bios and kernel), so LiteSDCard was updated
to only return the (original, useful) 128 bits.

This patch updates the LiteSDCard code in the LiteX bios to only
expect those 128 bits, and to do so in a manner that's portable
across CSR data widths and alignments.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
2020-05-30 18:12:51 -04:00
Florent Kermarrec
759367752c wishbone/wishbone2csr: use wishbone.sel on CSR write.
CSR write is only done if wishbone.sel != 0. This should avoid the need for 64-bit
CSR alignment on 64-bit CPUs since a 64-bit Wishbone write access targeting only the
32-bit LSB or MSB will be splitted in 2x32-bit accesses: one with sel=0xf, one with sel=0.
2020-05-30 15:22:02 +02:00
Florent Kermarrec
b1ec092e88 soc/software/litesdcard: use new send register to send command and remove CSR8_CMD_FIX. 2020-05-29 20:15:02 +02:00
Florent Kermarrec
55c7461e7b bios/cmds/cmd_litesdcard: rewrite comments/descriptions. 2020-05-29 18:51:24 +02:00
Florent Kermarrec
6cb03963f3 bios/main: replace / with -. 2020-05-29 18:40:54 +02:00
enjoy-digital
5dd5f97b88
Merge pull request #545 from gsomlo/gls-fix-mmptr
csr: fix simple accessor alignment
2020-05-29 18:32:30 +02:00
Gabriel Somlo
3e1b17d459 csr: fix simple accessor alignment
MMPTR should always follow CSR alignment, NOT CSR data width.
(the latter merely indicates how many bits within a MMPTR are
actually populated).

Fixup for commit #4a5072a.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
2020-05-29 12:03:05 -04:00