},
 };
 
-#ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM
-#ifndef CONFIG_BOARD_ATSTK1002_SW3_CUSTOM
+#ifdef CONFIG_BOARD_ATSTK1000_EXTDAC
 static struct at73c213_board_info at73c213_data = {
        .ssc_id         = 0,
        .shortname      = "AVR32 STK1000 external DAC",
 };
 #endif
-#endif
 
 #ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM
 static struct spi_board_info spi0_board_info[] __initdata = {
-#ifndef CONFIG_BOARD_ATSTK1002_SW3_CUSTOM
+#ifdef CONFIG_BOARD_ATSTK1000_EXTDAC
        {
                /* AT73C213 */
                .modalias       = "at73c213",
        clk_put(pclk);
 }
 
-#ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM
-#ifndef CONFIG_BOARD_ATSTK1002_SW3_CUSTOM
-static void __init at73c213_set_clk(struct at73c213_board_info *info)
+#ifdef CONFIG_BOARD_ATSTK1000_EXTDAC
+static void __init atstk1002_setup_extdac(void)
 {
        struct clk *gclk;
        struct clk *pll;
        }
 
        at32_select_periph(GPIO_PIN_PA(30), GPIO_PERIPH_A, 0);
-       info->dac_clk = gclk;
+       at73c213_data.dac_clk = gclk;
 
 err_set_clk:
        clk_put(pll);
 err_gclk:
        return;
 }
-#endif
-#endif
+#else
+static void __init atstk1002_setup_extdac(void)
+{
+
+}
+#endif /* CONFIG_BOARD_ATSTK1000_EXTDAC */
 
 void __init setup_board(void)
 {
 #endif
 
        atstk1000_setup_j2_leds();
-
-#ifndef CONFIG_BOARD_ATSTK1002_SW3_CUSTOM
-#ifndef CONFIG_BOARD_ATSTK1002_SW1_CUSTOM
-       at73c213_set_clk(&at73c213_data);
-#endif
-#endif
+       atstk1002_setup_extdac();
 
        return 0;
 }