aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2020-07-08 15:04:43 +0200
committermichael-west <michael.west@ettus.com>2020-07-08 12:50:47 -0700
commitf2f8ca056e04d4c021814c93706a24039821d8b6 (patch)
treeaf3052726c54a64f823b40ed87ca04191005cfa4
parentf9ad947cdc31379a07d4b52509864734b8300208 (diff)
downloaduhd-f2f8ca056e04d4c021814c93706a24039821d8b6.tar.gz
uhd-f2f8ca056e04d4c021814c93706a24039821d8b6.tar.bz2
uhd-f2f8ca056e04d4c021814c93706a24039821d8b6.zip
cores: Remove shutdown function from spi_core_3000
This effectively reverts 0433e74. The set_shutdown() and get_shutdown() API calls do not have a counterpart in simple_spi_core.v, which is typically the HDL endpoint for this core driver, and thus could write to a non-existent register. They are also never used in UHD, nor are they part of the spi_iface interface.
-rw-r--r--host/lib/include/uhdlib/usrp/cores/spi_core_3000.hpp7
-rw-r--r--host/lib/usrp/cores/spi_core_3000.cpp14
2 files changed, 0 insertions, 21 deletions
diff --git a/host/lib/include/uhdlib/usrp/cores/spi_core_3000.hpp b/host/lib/include/uhdlib/usrp/cores/spi_core_3000.hpp
index e0caaa2e7..d08147407 100644
--- a/host/lib/include/uhdlib/usrp/cores/spi_core_3000.hpp
+++ b/host/lib/include/uhdlib/usrp/cores/spi_core_3000.hpp
@@ -35,11 +35,4 @@ public:
//! Set the spi clock divider to something usable
virtual void set_divider(const double div) = 0;
-
- //! Place SPI core in shutdown mode. All attempted SPI transactions are dropped by
- // the core.
- virtual void set_shutdown(const bool shutdown) = 0;
-
- //! Get state of shutdown register
- virtual bool get_shutdown() = 0;
};
diff --git a/host/lib/usrp/cores/spi_core_3000.cpp b/host/lib/usrp/cores/spi_core_3000.cpp
index ad9df68dd..e279ffa66 100644
--- a/host/lib/usrp/cores/spi_core_3000.cpp
+++ b/host/lib/usrp/cores/spi_core_3000.cpp
@@ -37,7 +37,6 @@ public:
, _spi_div_addr(base + 0 * reg_offset)
, _spi_ctrl_addr(base + 1 * reg_offset)
, _spi_data_addr(base + 2 * reg_offset)
- , _spi_shutdown_addr(base + 3 * reg_offset)
, _readback_addr(readback)
{
this->set_divider(DEFAULT_DIVIDER);
@@ -94,17 +93,6 @@ public:
return 0;
}
- void set_shutdown(const bool shutdown)
- {
- _shutdown_cache = shutdown;
- _poke32(_spi_shutdown_addr, _shutdown_cache);
- }
-
- bool get_shutdown()
- {
- return _shutdown_cache;
- }
-
void set_divider(const double div)
{
_div = size_t((div / 2) - 0.5);
@@ -116,10 +104,8 @@ private:
const size_t _spi_div_addr;
const size_t _spi_ctrl_addr;
const size_t _spi_data_addr;
- const size_t _spi_shutdown_addr;
const size_t _readback_addr;
uint32_t _ctrl_word_cache = 0;
- bool _shutdown_cache;
std::mutex _mutex;
size_t _div;
size_t _divider_cache = 0;