projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d5ca3f
)
liblitesdcard/spisdcard: streamline initialization (cosmetic).
author
Gabriel Somlo
<gsomlo@gmail.com>
Sun, 14 Jun 2020 01:34:11 +0000
(21:34 -0400)
committer
Gabriel Somlo
<gsomlo@gmail.com>
Mon, 15 Jun 2020 19:24:40 +0000
(15:24 -0400)
litex/soc/software/liblitesdcard/spisdcard.c
patch
|
blob
|
history
diff --git
a/litex/soc/software/liblitesdcard/spisdcard.c
b/litex/soc/software/liblitesdcard/spisdcard.c
index 19cbaf7afafed03f9dc9d4147ac8e762b90b0963..510c34fe7a8f2ba128bdff88543d0e4899c9d412 100644
(file)
--- a/
litex/soc/software/liblitesdcard/spisdcard.c
+++ b/
litex/soc/software/liblitesdcard/spisdcard.c
@@
-276,14
+276,9
@@
DSTATUS disk_status(uint8_t drv) {
}
DSTATUS disk_initialize(uint8_t drv) {
- uint8_t r;
-
- if (drv) return RES_NOTRDY;
-
- r = spisdcard_init();
+ if (drv) return STA_NOINIT;
+ spisdcardstatus = spisdcard_init() ? 0 : STA_NOINIT;
spisdcard_deselect();
-
- spisdcardstatus = r ? 0 : STA_NOINIT;
return spisdcardstatus;
}