atheros: add AR2316 and AR2318 SoCs detection
[openwrt/svn-archive/archive.git] / target / linux / atheros / patches-3.14 / 100-board.patch
index 4cc0246e8555b53573e68a8ed20573f3d8eaa4fa..efbc241a172e2ba4b5bee74e4c35c9735c84e230 100644 (file)
 +
 --- /dev/null
 +++ 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
 + * License.  See the file "COPYING" in the main directory of this archive
 +      /* Detect the hardware based on the device ID */
 +      devid = ar231x_read_reg(AR2315_SREV) & AR2315_REV_CHIP;
 +      switch (devid) {
++      case 0x91:      /* Need to check */
++              ar231x_devtype = DEV_TYPE_AR2318;
++              break;
 +      case 0x90:
-+      case 0x91:
 +              ar231x_devtype = DEV_TYPE_AR2317;
 +              break;
++      case 0x87:
++              ar231x_devtype = DEV_TYPE_AR2316;
++              break;
++      case 0x86:
 +      default:
 +              ar231x_devtype = DEV_TYPE_AR2315;
 +              break;
 +#endif        /* __ASM_MACH_AR231X_H */
 --- /dev/null
 +++ b/arch/mips/ar231x/devices.h
-@@ -0,0 +1,38 @@
+@@ -0,0 +1,39 @@
 +#ifndef __AR231X_DEVICES_H
 +#define __AR231X_DEVICES_H
 +
 +      DEV_TYPE_AR2315,
 +      DEV_TYPE_AR2316,
 +      DEV_TYPE_AR2317,
++      DEV_TYPE_AR2318,
 +
 +      DEV_TYPE_UNKNOWN
 +};
 +#endif
 --- /dev/null
 +++ b/arch/mips/ar231x/devices.c
-@@ -0,0 +1,180 @@
+@@ -0,0 +1,181 @@
 +#include <linux/kernel.h>
 +#include <linux/init.h>
 +#include <linux/serial.h>
 +      [DEV_TYPE_AR2315] = "Atheros AR2315",
 +      [DEV_TYPE_AR2316] = "Atheros AR2316",
 +      [DEV_TYPE_AR2317] = "Atheros AR2317",
++      [DEV_TYPE_AR2318] = "Atheros AR2318",
 +      [DEV_TYPE_UNKNOWN] = "Atheros (unknown)",
 +};
 +