add emmc dummy peripheral
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 5 Aug 2018 10:44:18 +0000 (11:44 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 5 Aug 2018 10:44:18 +0000 (11:44 +0100)
docs/AddingPeripherals.mdwn
src/bsv/Makefile.peripherals.template
src/bsv/Makefile.template

index a781c905fef4b26ef6a9ec7b2fff71cf6166ca2c..a93f74cb21ff161162d3fdb921b95fd637ad4940 100644 (file)
@@ -1123,6 +1123,36 @@ The last remaining task will therefore be to create an interim emmc
 
 ## Creating the dummy emmc peripheral
 
+Adding the actual peripheral is done in a different repository,
+shakti-peripherals, which can be cloned with:
+
+    $ git clone gitolite3@libre-riscv.org:shakti-peripherals.git
+
+or public:
+
+    $ git clone git://libre-riscv.org/shakti-peripherals.git
+
+Here, what we will do is take a straight copy of
+src/peripherals/sdmmc/sdcard\_dummy.bsv and call it
+src/peripherals/emmc/emmc\_dummy.bsv.  Then replace all occurrences
+of "sdcard" with "emmc" and also update the SDBUSWIDTH from 4 to 8.
+Whilst this appears wasteful it is by far the simplest and quickest
+way to get working code, that should definitely, definitely be
+re-factored later.
+
+The next stage is to return to the pinmux repository and add the
+import of the new emmc subdirectory to the BSVINCDIR in both
+src/bsv/Makefile.template and Makefile.peripherals.template:
+
+    BSVINCDIR:= $(BSVINCDIR):../../../src/peripherals/src/peripherals/spi
+    BSVINCDIR:= $(BSVINCDIR):../../../src/peripherals/src/peripherals/sdmmc
+    BSVINCDIR:= $(BSVINCDIR):../../../src/peripherals/src/peripherals/emmc
+    BSVINCDIR:= $(BSVINCDIR):../../../src/peripherals/src/peripherals/flexbus
+
+Really these should also be auto-generated.  Testing through compiling
+can now take place.
+
+
 # Conclusion
 
 This is not a small project, by any means.  However the payoff in saved
index 7e901cdc67894cc0412838b21e27bcd5c3c6a759..23c90f6ee958a2d7b8affebb96606870ace82318 100644 (file)
@@ -25,6 +25,7 @@ BSVINCDIR:= $(BSVINCDIR):../../../shakti-peripherals/src/peripherals/pwm
 BSVINCDIR:= $(BSVINCDIR):../../../shakti-peripherals/src/peripherals/qspi
 BSVINCDIR:= $(BSVINCDIR):../../../shakti-peripherals/src/peripherals/spi
 BSVINCDIR:= $(BSVINCDIR):../../../shakti-peripherals/src/peripherals/sdmmc
+BSVINCDIR:= $(BSVINCDIR):../../../shakti-peripherals/src/peripherals/emmc
 BSVINCDIR:= $(BSVINCDIR):../../../shakti-peripherals/src/peripherals/flexbus
 BSVINCDIR:= $(BSVINCDIR):../../../shakti-peripherals/src/peripherals/jtagdtm
 BSVINCDIR:= $(BSVINCDIR):../../../shakti-peripherals/src/peripherals/uart
index 7d7f8215bcf340b75fd64f454da92d0d1e475243..ab58b51fdd626215f17dac3df727907bd22a16ac 100644 (file)
@@ -25,6 +25,7 @@ BSVINCDIR:= $(BSVINCDIR):../../../src/peripherals/src/peripherals/pwm
 BSVINCDIR:= $(BSVINCDIR):../../../src/peripherals/src/peripherals/qspi
 BSVINCDIR:= $(BSVINCDIR):../../../src/peripherals/src/peripherals/spi
 BSVINCDIR:= $(BSVINCDIR):../../../src/peripherals/src/peripherals/sdmmc
+BSVINCDIR:= $(BSVINCDIR):../../../src/peripherals/src/peripherals/emmc
 BSVINCDIR:= $(BSVINCDIR):../../../src/peripherals/src/peripherals/flexbus
 BSVINCDIR:= $(BSVINCDIR):../../../src/peripherals/src/peripherals/jtagdtm
 BSVINCDIR:= $(BSVINCDIR):../../../src/peripherals/src/peripherals/uart