@@ -18,27 +18,6 @@ pub use priority::Priority;
18
18
#[ derive( Clone , Debug , PartialEq , Eq ) ]
19
19
#[ non_exhaustive]
20
20
pub struct Riscv {
21
- /// Indicate the ID of the CLIC peripheral (if present).
22
- #[ cfg_attr(
23
- feature = "serde" ,
24
- serde( default , skip_serializing_if = "Option::is_none" )
25
- ) ]
26
- pub clic : Option < String > ,
27
-
28
- /// Indicate the ID of the CLINT peripheral (if present).
29
- #[ cfg_attr(
30
- feature = "serde" ,
31
- serde( default , skip_serializing_if = "Option::is_none" )
32
- ) ]
33
- pub clint : Option < String > ,
34
-
35
- /// Indicate the ID of the PLIC peripheral (if present).
36
- #[ cfg_attr(
37
- feature = "serde" ,
38
- serde( default , skip_serializing_if = "Option::is_none" )
39
- ) ]
40
- pub plic : Option < String > ,
41
-
42
21
/// Core interrupt enumeration values
43
22
#[ cfg_attr(
44
23
feature = "serde" ,
@@ -64,9 +43,6 @@ pub struct Riscv {
64
43
/// Builder for [`Riscv`]
65
44
#[ derive( Clone , Debug , Default , PartialEq , Eq ) ]
66
45
pub struct RiscvBuilder {
67
- clic : Option < String > ,
68
- clint : Option < String > ,
69
- plic : Option < String > ,
70
46
core_interrupts : Option < Vec < Interrupt > > ,
71
47
priorities : Option < Vec < Priority > > ,
72
48
harts : Option < Vec < Hart > > ,
@@ -75,9 +51,6 @@ pub struct RiscvBuilder {
75
51
impl From < Riscv > for RiscvBuilder {
76
52
fn from ( riscv : Riscv ) -> Self {
77
53
Self {
78
- clic : riscv. clic ,
79
- clint : riscv. clint ,
80
- plic : riscv. plic ,
81
54
core_interrupts : Some ( riscv. core_interrupts ) ,
82
55
priorities : Some ( riscv. priorities ) ,
83
56
harts : Some ( riscv. harts ) ,
@@ -86,24 +59,6 @@ impl From<Riscv> for RiscvBuilder {
86
59
}
87
60
88
61
impl RiscvBuilder {
89
- /// Set the ID of the CLIC peripheral
90
- pub fn clic ( mut self , clic : Option < String > ) -> Self {
91
- self . clic = clic;
92
- self
93
- }
94
-
95
- /// Set the ID of the CLINT peripheral
96
- pub fn clint ( mut self , clint : Option < String > ) -> Self {
97
- self . clint = clint;
98
- self
99
- }
100
-
101
- /// Set the ID of the PLIC peripheral
102
- pub fn plic ( mut self , plic : Option < String > ) -> Self {
103
- self . plic = plic;
104
- self
105
- }
106
-
107
62
/// Set the core interrupt enumeration values
108
63
pub fn core_interrupts ( mut self , core_interrupts : Vec < Interrupt > ) -> Self {
109
64
self . core_interrupts = Some ( core_interrupts) ;
@@ -125,9 +80,6 @@ impl RiscvBuilder {
125
80
/// Validate and build a [`Riscv`].
126
81
pub fn build ( self , lvl : ValidateLevel ) -> Result < Riscv , SvdError > {
127
82
let riscv = Riscv {
128
- clic : self . clic ,
129
- clint : self . clint ,
130
- plic : self . plic ,
131
83
core_interrupts : self
132
84
. core_interrupts
133
85
. ok_or_else ( || BuildError :: Uninitialized ( "core_interrupts" . to_string ( ) ) ) ?,
@@ -155,15 +107,6 @@ impl Riscv {
155
107
builder : RiscvBuilder ,
156
108
lvl : ValidateLevel ,
157
109
) -> Result < ( ) , SvdError > {
158
- if builder. clic . is_some ( ) {
159
- self . clic = builder. clic ;
160
- }
161
- if builder. clint . is_some ( ) {
162
- self . clint = builder. clint ;
163
- }
164
- if builder. plic . is_some ( ) {
165
- self . plic = builder. plic ;
166
- }
167
110
if let Some ( core_interrupts) = builder. core_interrupts {
168
111
self . core_interrupts = core_interrupts;
169
112
}
0 commit comments