atheros: add AR2316 and AR2318 SoCs detection
Tested with AR2315, AR2316 and AR2317 SoCs, not tested with AR2318 but changes seems correct: revision is one more than AR2317. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> SVN-Revision: 42507
This commit is contained in:
parent
c883854f7e
commit
413736e5f8
2 changed files with 13 additions and 5 deletions
|
@ -2096,7 +2096,7 @@
|
||||||
+
|
+
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/arch/mips/ar231x/ar2315.c
|
+++ b/arch/mips/ar231x/ar2315.c
|
||||||
@@ -0,0 +1,556 @@
|
@@ -0,0 +1,562 @@
|
||||||
+/*
|
+/*
|
||||||
+ * This file is subject to the terms and conditions of the GNU General Public
|
+ * This file is subject to the terms and conditions of the GNU General Public
|
||||||
+ * License. See the file "COPYING" in the main directory of this archive
|
+ * License. See the file "COPYING" in the main directory of this archive
|
||||||
|
@ -2622,10 +2622,16 @@
|
||||||
+ /* Detect the hardware based on the device ID */
|
+ /* Detect the hardware based on the device ID */
|
||||||
+ devid = ar231x_read_reg(AR2315_SREV) & AR2315_REV_CHIP;
|
+ devid = ar231x_read_reg(AR2315_SREV) & AR2315_REV_CHIP;
|
||||||
+ switch (devid) {
|
+ switch (devid) {
|
||||||
|
+ case 0x91: /* Need to check */
|
||||||
|
+ ar231x_devtype = DEV_TYPE_AR2318;
|
||||||
|
+ break;
|
||||||
+ case 0x90:
|
+ case 0x90:
|
||||||
+ case 0x91:
|
|
||||||
+ ar231x_devtype = DEV_TYPE_AR2317;
|
+ ar231x_devtype = DEV_TYPE_AR2317;
|
||||||
+ break;
|
+ break;
|
||||||
|
+ case 0x87:
|
||||||
|
+ ar231x_devtype = DEV_TYPE_AR2316;
|
||||||
|
+ break;
|
||||||
|
+ case 0x86:
|
||||||
+ default:
|
+ default:
|
||||||
+ ar231x_devtype = DEV_TYPE_AR2315;
|
+ ar231x_devtype = DEV_TYPE_AR2315;
|
||||||
+ break;
|
+ break;
|
||||||
|
@ -2781,7 +2787,7 @@
|
||||||
+#endif /* __ASM_MACH_AR231X_H */
|
+#endif /* __ASM_MACH_AR231X_H */
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/arch/mips/ar231x/devices.h
|
+++ b/arch/mips/ar231x/devices.h
|
||||||
@@ -0,0 +1,38 @@
|
@@ -0,0 +1,39 @@
|
||||||
+#ifndef __AR231X_DEVICES_H
|
+#ifndef __AR231X_DEVICES_H
|
||||||
+#define __AR231X_DEVICES_H
|
+#define __AR231X_DEVICES_H
|
||||||
+
|
+
|
||||||
|
@ -2795,6 +2801,7 @@
|
||||||
+ DEV_TYPE_AR2315,
|
+ DEV_TYPE_AR2315,
|
||||||
+ DEV_TYPE_AR2316,
|
+ DEV_TYPE_AR2316,
|
||||||
+ DEV_TYPE_AR2317,
|
+ DEV_TYPE_AR2317,
|
||||||
|
+ DEV_TYPE_AR2318,
|
||||||
+
|
+
|
||||||
+ DEV_TYPE_UNKNOWN
|
+ DEV_TYPE_UNKNOWN
|
||||||
+};
|
+};
|
||||||
|
@ -2822,7 +2829,7 @@
|
||||||
+#endif
|
+#endif
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/arch/mips/ar231x/devices.c
|
+++ b/arch/mips/ar231x/devices.c
|
||||||
@@ -0,0 +1,180 @@
|
@@ -0,0 +1,181 @@
|
||||||
+#include <linux/kernel.h>
|
+#include <linux/kernel.h>
|
||||||
+#include <linux/init.h>
|
+#include <linux/init.h>
|
||||||
+#include <linux/serial.h>
|
+#include <linux/serial.h>
|
||||||
|
@ -2931,6 +2938,7 @@
|
||||||
+ [DEV_TYPE_AR2315] = "Atheros AR2315",
|
+ [DEV_TYPE_AR2315] = "Atheros AR2315",
|
||||||
+ [DEV_TYPE_AR2316] = "Atheros AR2316",
|
+ [DEV_TYPE_AR2316] = "Atheros AR2316",
|
||||||
+ [DEV_TYPE_AR2317] = "Atheros AR2317",
|
+ [DEV_TYPE_AR2317] = "Atheros AR2317",
|
||||||
|
+ [DEV_TYPE_AR2318] = "Atheros AR2318",
|
||||||
+ [DEV_TYPE_UNKNOWN] = "Atheros (unknown)",
|
+ [DEV_TYPE_UNKNOWN] = "Atheros (unknown)",
|
||||||
+};
|
+};
|
||||||
+
|
+
|
||||||
|
|
|
@ -382,7 +382,7 @@
|
||||||
else if (pending & CAUSEF_IP2)
|
else if (pending & CAUSEF_IP2)
|
||||||
do_IRQ(AR2315_IRQ_MISC_INTRS);
|
do_IRQ(AR2315_IRQ_MISC_INTRS);
|
||||||
else if (pending & CAUSEF_IP7)
|
else if (pending & CAUSEF_IP7)
|
||||||
@@ -554,3 +558,18 @@ ar2315_plat_setup(void)
|
@@ -560,3 +564,18 @@ ar2315_plat_setup(void)
|
||||||
ar231x_serial_setup(AR2315_UART0, AR2315_MISC_IRQ_UART0,
|
ar231x_serial_setup(AR2315_UART0, AR2315_MISC_IRQ_UART0,
|
||||||
ar2315_apb_frequency());
|
ar2315_apb_frequency());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue