Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284731
b: refs/heads/master
c: 6903bb4
h: refs/heads/master
i:
  284729: 1ea2947
  284727: 104d781
v: v3
  • Loading branch information
Gabor Juhos authored and Ralf Baechle committed Dec 7, 2011
1 parent b464a6d commit ff88481
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 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: 67b0f0f1b355df293f92069a0409452c9e24370b
refs/heads/master: 6903bb49da18e0bf3e2909e6b1342ee9a26b78ff
24 changes: 17 additions & 7 deletions trunk/arch/mips/ath79/dev-ar913x-wmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ static struct ath9k_platform_data ath79_wmac_data;

static struct resource ath79_wmac_resources[] = {
{
.start = AR913X_WMAC_BASE,
.end = AR913X_WMAC_BASE + AR913X_WMAC_SIZE - 1,
/* .start and .end fields are filled dynamically */
.flags = IORESOURCE_MEM,
}, {
.start = ATH79_CPU_IRQ_IP2,
Expand All @@ -43,18 +42,29 @@ static struct platform_device ath79_wmac_device = {
},
};

void __init ath79_register_wmac(u8 *cal_data)
static void __init ar913x_wmac_setup(void)
{
if (cal_data)
memcpy(ath79_wmac_data.eeprom_data, cal_data,
sizeof(ath79_wmac_data.eeprom_data));

/* reset the WMAC */
ath79_device_reset_set(AR913X_RESET_AMBA2WMAC);
mdelay(10);

ath79_device_reset_clear(AR913X_RESET_AMBA2WMAC);
mdelay(10);

ath79_wmac_resources[0].start = AR913X_WMAC_BASE;
ath79_wmac_resources[0].end = AR913X_WMAC_BASE + AR913X_WMAC_SIZE - 1;
}

void __init ath79_register_wmac(u8 *cal_data)
{
if (soc_is_ar913x())
ar913x_wmac_setup();
else
BUG();

if (cal_data)
memcpy(ath79_wmac_data.eeprom_data, cal_data,
sizeof(ath79_wmac_data.eeprom_data));

platform_device_register(&ath79_wmac_device);
}

0 comments on commit ff88481

Please sign in to comment.