drivers: fpga: replace runtime checks with buildtime asserts in iCE40
Replace NULL checks for the set and clear registers with BUILD_ASSERTs in the iCE40 device instantiation. Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
This commit is contained in:
parent
07b7802460
commit
53ae195f0d
2 changed files with 16 additions and 14 deletions
|
@ -16,6 +16,10 @@ test_spi_fpga_ice40_gpio: ice40@0 {
|
|||
load-mode-bitbang;
|
||||
cdone-gpios = <&test_gpio 0 0>;
|
||||
creset-gpios = <&test_gpio 0 0>;
|
||||
clk-gpios = <&test_gpio 0 0>;
|
||||
pico-gpios = <&test_gpio 0 0>;
|
||||
gpios-set-reg = <0>;
|
||||
gpios-clear-reg = <0>;
|
||||
config-delay-us = <3900>;
|
||||
};
|
||||
|
||||
|
@ -28,9 +32,5 @@ test_spi_fpga_ice40_spi: ice40@1 {
|
|||
|
||||
cdone-gpios = <&test_gpio 0 0>;
|
||||
creset-gpios = <&test_gpio 0 0>;
|
||||
clk-gpios = <&test_gpio 0 0>;
|
||||
pico-gpios = <&test_gpio 0 0>;
|
||||
gpios-set-reg = <0>;
|
||||
gpios-clear-reg = <0>;
|
||||
config-delay-us = <3900>;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue