Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166115
b: refs/heads/master
c: 439a330
h: refs/heads/master
i:
  166113: 76bfcb7
  166111: de65b4e
v: v3
  • Loading branch information
Nicolas Ferre authored and Russell King committed Sep 21, 2009
1 parent 1685d5e commit 65f948a
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 378ac65e6c6779c526c9016cafb61d84ff9cbecd
refs/heads/master: 439a33074c7d0895dd1e13ac354b8b4505d3ea43
55 changes: 55 additions & 0 deletions trunk/arch/arm/mach-at91/at91sam9rl_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,61 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
#endif


/* --------------------------------------------------------------------
* AC97
* -------------------------------------------------------------------- */

#if defined(CONFIG_SND_ATMEL_AC97C) || defined(CONFIG_SND_ATMEL_AC97C_MODULE)
static u64 ac97_dmamask = DMA_BIT_MASK(32);
static struct ac97c_platform_data ac97_data;

static struct resource ac97_resources[] = {
[0] = {
.start = AT91SAM9RL_BASE_AC97C,
.end = AT91SAM9RL_BASE_AC97C + SZ_16K - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = AT91SAM9RL_ID_AC97C,
.end = AT91SAM9RL_ID_AC97C,
.flags = IORESOURCE_IRQ,
},
};

static struct platform_device at91sam9rl_ac97_device = {
.name = "atmel_ac97c",
.id = 0,
.dev = {
.dma_mask = &ac97_dmamask,
.coherent_dma_mask = DMA_BIT_MASK(32),
.platform_data = &ac97_data,
},
.resource = ac97_resources,
.num_resources = ARRAY_SIZE(ac97_resources),
};

void __init at91_add_device_ac97(struct ac97c_platform_data *data)
{
if (!data)
return;

at91_set_A_periph(AT91_PIN_PD1, 0); /* AC97FS */
at91_set_A_periph(AT91_PIN_PD2, 0); /* AC97CK */
at91_set_A_periph(AT91_PIN_PD3, 0); /* AC97TX */
at91_set_A_periph(AT91_PIN_PD4, 0); /* AC97RX */

/* reset */
if (data->reset_pin)
at91_set_gpio_output(data->reset_pin, 0);

ac97_data = *data;
platform_device_register(&at91sam9rl_ac97_device);
}
#else
void __init at91_add_device_ac97(struct ac97c_platform_data *data) {}
#endif


/* --------------------------------------------------------------------
* LCD Controller
* -------------------------------------------------------------------- */
Expand Down
10 changes: 10 additions & 0 deletions trunk/arch/arm/mach-at91/board-sam9rlek.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,14 @@ static struct atmel_lcdfb_info __initdata ek_lcdc_data;
#endif


/*
* AC97
* reset_pin is not connected: NRST
*/
static struct ac97c_platform_data ek_ac97_data = {
};


/*
* LEDs
*/
Expand Down Expand Up @@ -299,6 +307,8 @@ static void __init ek_board_init(void)
at91_add_device_mmc(0, &ek_mmc_data);
/* LCD Controller */
at91_add_device_lcdc(&ek_lcdc_data);
/* AC97 */
at91_add_device_ac97(&ek_ac97_data);
/* Touch Screen Controller */
at91_add_device_tsadcc();
/* LEDs */
Expand Down

0 comments on commit 65f948a

Please sign in to comment.