summaryrefslogtreecommitdiff
path: root/rcc
diff options
context:
space:
mode:
Diffstat (limited to 'rcc')
-rw-r--r--rcc/rcc_enums.h.j25
-rw-r--r--rcc/rcc_reg.h5
2 files changed, 10 insertions, 0 deletions
diff --git a/rcc/rcc_enums.h.j2 b/rcc/rcc_enums.h.j2
index a4965b0..5694525 100644
--- a/rcc/rcc_enums.h.j2
+++ b/rcc/rcc_enums.h.j2
@@ -15,5 +15,10 @@ namespace rcc {
rcc->{{ bus.split('_')[0] }}ENR{{ bus.split('_')[1] if '_' in bus else '' }} |= dev;
}
+ template <typename T>
+ void disable(const T& rcc, {{ bus }}_dev dev) {
+ rcc->{{ bus.split('_')[0] }}ENR{{ bus.split('_')[1] if '_' in bus else '' }} &= ~(dev);
+ }
+
{% endfor %}
}
diff --git a/rcc/rcc_reg.h b/rcc/rcc_reg.h
index d5f8b68..7663739 100644
--- a/rcc/rcc_reg.h
+++ b/rcc/rcc_reg.h
@@ -204,4 +204,9 @@ class RCC_t : public mmio_ptr<T> {
void enable(Bus dev) const {
rcc::enable(*this, dev);
}
+
+ template <typename Bus>
+ void disable(Bus dev) const {
+ rcc::disable(*this, dev);
+ }
};