summaryrefslogtreecommitdiffstats
path: root/sdcard.v
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-10-26 20:21:37 -0700
committerH. Peter Anvin <hpa@zytor.com>2014-02-10 18:07:48 -0800
commite69da0a4a4fd2e6bbad9803f47c601cf6111b23e (patch)
tree25dbc3992463cc139f0bc84fe9faafb0f0f4cbfa /sdcard.v
parent0a6b56adaea142c7186017fa1dd9d9083ff31fea (diff)
downloadabc8000-e69da0a4a4fd2e6bbad9803f47c601cf6111b23e.tar.gz
abc8000-e69da0a4a4fd2e6bbad9803f47c601cf6111b23e.tar.xz
abc8000-e69da0a4a4fd2e6bbad9803f47c601cf6111b23e.zip
sdcard: avoid warnings by declaring the SD pins inout
Declare the SD pins as "inout" all the way into the sdcard module to avoid compiler warnings. No functional change.
Diffstat (limited to 'sdcard.v')
-rw-r--r--sdcard.v9
1 files changed, 5 insertions, 4 deletions
diff --git a/sdcard.v b/sdcard.v
index 7806e1c..a2b5f05 100644
--- a/sdcard.v
+++ b/sdcard.v
@@ -21,10 +21,10 @@ module sdcard (
input rst_n, // Global reset
input clk, // CPU clk (25 MHz)
- output sd_cs_n, // SD card CS# (CD, DAT3)
- output sd_di, // SD card DI (MOSI, CMD)
- output sd_clk, // SD card CLK (SCLK)
- input sd_do, // SD card SO (MISO, DAT0)
+ inout sd_cs_n, // SD card CS# (CD, DAT3)
+ inout sd_di, // SD card DI (MOSI, CMD)
+ inout sd_clk, // SD card CLK (SCLK)
+ inout sd_do, // SD card SO (MISO, DAT0)
input sd_cd_n, // SD socket CD# (Card Detect) switch
input sd_we_n, // SD socket WE# (Write Enable) switch
@@ -87,6 +87,7 @@ module sdcard (
assign sd_di = ~sd_cd_n ? sd_data_out : 1'bz;
assign sd_clk = ~sd_cd_n ? sd_clk_out : 1'bz;
assign sd_cs_n = ~sd_cd_n ? sd_cs_n_reg : 1'bz;
+ assign sd_do = 1'bz; // Always an input
// If we try an action while a bus transaction is in progress,
// wait. The register sd_cmd_ok is used to prevent WAIT# from