Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76079
b: refs/heads/master
c: 64d8105
h: refs/heads/master
i:
  76077: a2ec9d1
  76075: d9c497a
  76071: a0e6aa2
  76063: cc6e726
v: v3
  • Loading branch information
Haavard Skinnemoen committed Jan 25, 2008
1 parent 2eb5b2b commit 7879dae
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f4c41b2689eec03bd4f8145a08903862673e002b
refs/heads/master: 64d81052671bc2e66efd46251883f5e8e3043db9
5 changes: 5 additions & 0 deletions trunk/arch/avr32/boards/atstk1000/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,9 @@ config BOARD_ATSTK1000_J2_RGB

endchoice

config BOARD_ATSTK1000_EXTDAC
bool
depends on !BOARD_ATSTK1002_SW1_CUSTOM && !BOARD_ATSTK1002_SW3_CUSTOM
default y

endif # stk 1002
28 changes: 12 additions & 16 deletions trunk/arch/avr32/boards/atstk1000/atstk1002.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,16 @@ static struct eth_platform_data __initdata eth_data[2] = {
},
};

#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",
Expand Down Expand Up @@ -140,9 +138,8 @@ static void __init set_hw_addr(struct platform_device *pdev)
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;
Expand All @@ -160,7 +157,7 @@ static void __init at73c213_set_clk(struct at73c213_board_info *info)
}

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);
Expand All @@ -169,8 +166,12 @@ static void __init at73c213_set_clk(struct at73c213_board_info *info)
err_gclk:
return;
}
#endif
#endif
#else
static void __init atstk1002_setup_extdac(void)
{

}
#endif /* CONFIG_BOARD_ATSTK1000_EXTDAC */

void __init setup_board(void)
{
Expand Down Expand Up @@ -239,12 +240,7 @@ static int __init atstk1002_init(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;
}
Expand Down

0 comments on commit 7879dae

Please sign in to comment.