bios: Fix build when ethphy is present but ethmac is not.
authorAmbroz Bizjak <ambrop7@gmail.com>
Wed, 12 Jun 2019 23:02:22 +0000 (01:02 +0200)
committerGitHub <noreply@github.com>
Wed, 12 Jun 2019 23:02:22 +0000 (01:02 +0200)
While testing my Ethernet DMA, I renamed the `ethmac` module to `ethmac_dma` so that it wouldn't be used from the BIOS, but I got an undefined reference to `eth_init` because `bios.c` checks different CSR defines than the code that defines `eth_init`.

litex/soc/software/bios/main.c

index 204410f19db2c11881cb6f9eaba9df4a3e47285a..606d3dd085b2a83afeb9994b5fef624b1c4edb48 100644 (file)
@@ -433,7 +433,7 @@ int main(int i, char **c)
        printf("\n");
 
        printf("--========= \e[1mPeripherals init\e[0m ===========--\n");
-#ifdef CSR_ETHPHY_CRG_RESET_ADDR
+#ifdef CSR_ETHMAC_BASE
        eth_init();
 #endif
 #ifdef CSR_SDRAM_BASE