-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 231880 b: refs/heads/master c: f5b35d0 h: refs/heads/master v: v3
- Loading branch information
Gabor Juhos
authored and
Ralf Baechle
committed
Jan 18, 2011
1 parent
a3546d6
commit fb93fcf
Showing
7 changed files
with
93 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: aa6695ec8b51da7aaa245310073ddd39a306a77f | ||
refs/heads/master: f5b35d0b16a08e6c1e7c8a41fa87ad10cf9aefa4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* Atheros AR913X SoC built-in WMAC device support | ||
* | ||
* Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
* Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License version 2 as published | ||
* by the Free Software Foundation. | ||
*/ | ||
|
||
#include <linux/init.h> | ||
#include <linux/delay.h> | ||
#include <linux/irq.h> | ||
#include <linux/platform_device.h> | ||
#include <linux/ath9k_platform.h> | ||
|
||
#include <asm/mach-ath79/ath79.h> | ||
#include <asm/mach-ath79/ar71xx_regs.h> | ||
#include "dev-ar913x-wmac.h" | ||
|
||
static struct ath9k_platform_data ar913x_wmac_data; | ||
|
||
static struct resource ar913x_wmac_resources[] = { | ||
{ | ||
.start = AR913X_WMAC_BASE, | ||
.end = AR913X_WMAC_BASE + AR913X_WMAC_SIZE - 1, | ||
.flags = IORESOURCE_MEM, | ||
}, { | ||
.start = ATH79_CPU_IRQ_IP2, | ||
.end = ATH79_CPU_IRQ_IP2, | ||
.flags = IORESOURCE_IRQ, | ||
}, | ||
}; | ||
|
||
static struct platform_device ar913x_wmac_device = { | ||
.name = "ath9k", | ||
.id = -1, | ||
.resource = ar913x_wmac_resources, | ||
.num_resources = ARRAY_SIZE(ar913x_wmac_resources), | ||
.dev = { | ||
.platform_data = &ar913x_wmac_data, | ||
}, | ||
}; | ||
|
||
void __init ath79_register_ar913x_wmac(u8 *cal_data) | ||
{ | ||
if (cal_data) | ||
memcpy(ar913x_wmac_data.eeprom_data, cal_data, | ||
sizeof(ar913x_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); | ||
|
||
platform_device_register(&ar913x_wmac_device); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Atheros AR913X SoC built-in WMAC device support | ||
* | ||
* Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
* Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License version 2 as published | ||
* by the Free Software Foundation. | ||
*/ | ||
|
||
#ifndef _ATH79_DEV_AR913X_WMAC_H | ||
#define _ATH79_DEV_AR913X_WMAC_H | ||
|
||
void ath79_register_ar913x_wmac(u8 *cal_data); | ||
|
||
#endif /* _ATH79_DEV_AR913X_WMAC_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters