ar71xx: move mach type definitions into a separate include file
authorGabor Juhos <juhosg@openwrt.org>
Sat, 26 Dec 2009 14:19:22 +0000 (14:19 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Sat, 26 Dec 2009 14:19:22 +0000 (14:19 +0000)
SVN-Revision: 18942

26 files changed:
target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap81.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-825-b1.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-generic.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w300nh.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb-4xx.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr841n.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt160nl.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c
target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h [new file with mode: 0644]
target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
target/linux/ar71xx/files/arch/mips/ar71xx/setup.c
target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h

index 24d0022fbdbc0e99e4c7c9d2509068b7a5a05764..0011ba419a021df2ad0322b5b5c548ff3700492b 100644 (file)
@@ -12,9 +12,9 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 
-#include <asm/mips_machine.h>
 #include <asm/mach-ar71xx/ar71xx.h>
 
+#include "machtype.h"
 #include "devices.h"
 #include "dev-m25p80.h"
 #include "dev-ar913x-wmac.h"
index fb5d0533c3c648c0c6342471dc10d3e061c1cdaf..d2cbc218748d05cab94afa2ae51c1727e2d040df 100644 (file)
 #include <linux/spi/spi_gpio.h>
 #include <linux/spi/vsc7385.h>
 
-#include <asm/mips_machine.h>
 #include <asm/mach-ar71xx/ar71xx.h>
 #include <asm/mach-ar71xx/ar91xx_flash.h>
 
+#include "machtype.h"
 #include "devices.h"
 #include "dev-ar913x-wmac.h"
 #include "dev-gpio-buttons.h"
index 8d856122912c5734ff412275d708aa7e774a7a6e..6052e37e53972096e2d5465e1cc62a7204fb8313 100644 (file)
@@ -15,6 +15,7 @@
 #include <asm/mips_machine.h>
 #include <asm/mach-ar71xx/ar71xx.h>
 
+#include "machtype.h"
 #include "devices.h"
 #include "dev-m25p80.h"
 #include "dev-gpio-buttons.h"
index e756487d3673309ffe9df8cae67ad4f34caff9bd..3f1cbeb3f5862a805c8ede18c49296cc0ed46dd9 100644 (file)
@@ -12,9 +12,9 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 
-#include <asm/mips_machine.h>
 #include <asm/mach-ar71xx/ar71xx.h>
 
+#include "machtype.h"
 #include "devices.h"
 #include "dev-m25p80.h"
 #include "dev-ar913x-wmac.h"
index 47a2c01564326879c976abb2a1f263550d7d1ca2..93a01fd773370c8646333667af3a0519e81a4cbc 100644 (file)
@@ -16,9 +16,9 @@
 #include <linux/delay.h>
 #include <linux/rtl8366_smi.h>
 
-#include <asm/mips_machine.h>
 #include <asm/mach-ar71xx/ar71xx.h>
 
+#include "machtype.h"
 #include "devices.h"
 #include "dev-m25p80.h"
 #include "dev-ap94-pci.h"
index c183ba937cecd4798989d949c2e964bab979fa24..49882051e0c760c33be2af1b71ec26c246be917e 100644 (file)
@@ -11,8 +11,8 @@
 
 #include <linux/init.h>
 
-#include <asm/mips_machine.h>
 #include <asm/mach-ar71xx/ar71xx.h>
+#include "machtype.h"
 
 static void __init ar71xx_generic_init(void)
 {
index 6ebfe38dedb27e1adf078aa0d5da0b38b29adbbe..127d90f26ad1258975368167436ae2a1b39191fa 100644 (file)
@@ -11,9 +11,9 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 
-#include <asm/mips_machine.h>
 #include <asm/mach-ar71xx/ar71xx.h>
 
+#include "machtype.h"
 #include "devices.h"
 #include "dev-ar913x-wmac.h"
 #include "dev-gpio-buttons.h"
index 3f394047acd5b0a5ba8ac95ac3bb947d66b5303a..098c1a60608e3dd27d65be72e24fb660e0c0e989 100644 (file)
@@ -12,9 +12,9 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 
-#include <asm/mips_machine.h>
 #include <asm/mach-ar71xx/ar71xx.h>
 
+#include "machtype.h"
 #include "devices.h"
 #include "dev-m25p80.h"
 #include "dev-ar913x-wmac.h"
index 10cdf5d2fa09f0715c1a3656747d981451b02125..0f70d9525b888cd367a8af251bb67d8c3b176e5c 100644 (file)
@@ -9,9 +9,9 @@
  *  by the Free Software Foundation.
  */
 
-#include <asm/mips_machine.h>
 #include <asm/mach-ar71xx/ar71xx.h>
 
+#include "machtype.h"
 #include "devices.h"
 #include "dev-m25p80.h"
 #include "dev-gpio-buttons.h"
index 34d264cc053d741035dcede963a81c1bf3700761..aad5d0af94ced81298eb843783516e0ecf8d4256 100644 (file)
@@ -19,9 +19,9 @@
 #include <linux/i2c-gpio.h>
 #include <linux/i2c/pcf857x.h>
 
-#include <asm/mips_machine.h>
 #include <asm/mach-ar71xx/ar71xx.h>
 
+#include "machtype.h"
 #include "devices.h"
 #include "dev-pb42-pci.h"
 #include "dev-gpio-buttons.h"
index 8f89c43743f891ed5ef40486e966ef25118d1cd0..8b6f34e960caf60e31f83b4bacb91d476fff1099 100644 (file)
 #include <linux/spi/flash.h>
 #include <linux/spi/mmc_spi.h>
 
-#include <asm/mips_machine.h>
 #include <asm/mach-ar71xx/ar71xx.h>
 #include <asm/mach-ar71xx/pci.h>
 
+#include "machtype.h"
 #include "devices.h"
 #include "dev-gpio-buttons.h"
 #include "dev-leds-gpio.h"
index 3dfc006907d748f80407b31c243da25ce87d3b98..00e90da07966adc23c3545474c4e4f180ee1f7dc 100644 (file)
@@ -12,9 +12,9 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 
-#include <asm/mips_machine.h>
 #include <asm/mach-ar71xx/ar71xx.h>
 
+#include "machtype.h"
 #include "devices.h"
 #include "dev-m25p80.h"
 #include "dev-ar913x-wmac.h"
index baaa2a9bdc628ec65d98955f83aeb80ae4c04712..f34a4ab61300be6912e8934448092c859e1f5676 100644 (file)
@@ -11,9 +11,9 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 
-#include <asm/mips_machine.h>
 #include <asm/mach-ar71xx/ar71xx.h>
 
+#include "machtype.h"
 #include "devices.h"
 #include "dev-m25p80.h"
 #include "dev-ar913x-wmac.h"
index 850cc818175823f29759171aa1bd0bfbb66313f9..ecedbb5a82309c165fc260fabfc26dac845924ee 100644 (file)
@@ -11,9 +11,9 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 
-#include <asm/mips_machine.h>
 #include <asm/mach-ar71xx/ar71xx.h>
 
+#include "machtype.h"
 #include "devices.h"
 #include "dev-m25p80.h"
 #include "dev-ap91-pci.h"
index bc900a5814e11454fd026be3748b4bbf62de8af6..a0a4dda84cc78ea5e48e32fbceef95c3b2b1f0e4 100644 (file)
@@ -11,9 +11,9 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 
-#include <asm/mips_machine.h>
 #include <asm/mach-ar71xx/ar71xx.h>
 
+#include "machtype.h"
 #include "devices.h"
 #include "dev-m25p80.h"
 #include "dev-gpio-buttons.h"
index 35ab8ba7217856870dfe4ffc7c294630f169bf15..55fde5cb3aaa9ccc879fd353a05ddc34e69ee011 100644 (file)
@@ -11,9 +11,9 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 
-#include <asm/mips_machine.h>
 #include <asm/mach-ar71xx/ar71xx.h>
 
+#include "machtype.h"
 #include "devices.h"
 #include "dev-m25p80.h"
 #include "dev-ar913x-wmac.h"
index 478b919c6c07ee4f4265b726d3c38ba53b314d53..1a63b99d6ac0f0c6d79d5ee526185c8127d29a6d 100644 (file)
@@ -10,9 +10,9 @@
  *  by the Free Software Foundation.
  */
 
-#include <asm/mips_machine.h>
 #include <asm/mach-ar71xx/ar71xx.h>
 
+#include "machtype.h"
 #include "devices.h"
 #include "dev-m25p80.h"
 #include "dev-ap91-pci.h"
index 7cf8e315d170a3cf35fc209b98e5d01ea535b987..4220e61cd10f0fdc78d9e1772aa0077e2e3df4a0 100644 (file)
@@ -15,9 +15,9 @@
 #include <linux/delay.h>
 #include <linux/rtl8366_smi.h>
 
-#include <asm/mips_machine.h>
 #include <asm/mach-ar71xx/ar71xx.h>
 
+#include "machtype.h"
 #include "devices.h"
 #include "dev-m25p80.h"
 #include "dev-ap94-pci.h"
index 7d7ad96602dc85847995139c87e7070b062f3ef2..251def844eddbc57e0af4a12b8602a2fa91a4d14 100644 (file)
@@ -13,9 +13,9 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 
-#include <asm/mips_machine.h>
 #include <asm/mach-ar71xx/ar71xx.h>
 
+#include "machtype.h"
 #include "devices.h"
 #include "dev-m25p80.h"
 #include "dev-ar913x-wmac.h"
index 850b0108e38c812897d227e4ad203404d8fc699b..d20800ea544c249f7c0c6c1346fe795e72063d49 100644 (file)
@@ -12,9 +12,9 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 
-#include <asm/mips_machine.h>
 #include <asm/mach-ar71xx/ar71xx.h>
 
+#include "machtype.h"
 #include "devices.h"
 #include "dev-m25p80.h"
 #include "dev-pb42-pci.h"
index bf3f3c297244be48754bd33eba14e013e4fa0d88..618a4aa0ba468006b54083301132ba8d131e2975 100644 (file)
@@ -11,9 +11,9 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 
-#include <asm/mips_machine.h>
 #include <asm/mach-ar71xx/ar71xx.h>
 
+#include "machtype.h"
 #include "devices.h"
 #include "dev-m25p80.h"
 #include "dev-ar913x-wmac.h"
index 51e3335440e1503480240b9900e6d531bd5f3545..0f97ac75bf76748364a63550ba62e0a1127e5c55 100644 (file)
@@ -12,9 +12,9 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 
-#include <asm/mips_machine.h>
 #include <asm/mach-ar71xx/ar71xx.h>
 
+#include "machtype.h"
 #include "devices.h"
 #include "dev-m25p80.h"
 #include "dev-gpio-buttons.h"
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h b/target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h
new file mode 100644 (file)
index 0000000..34d7702
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ *  Atheros AR71xx machine type definitions
+ *
+ *  Copyright (C) 2008-2009 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 _AR71XX_MACHTYPE_H
+#define _AR71XX_MACHTYPE_H
+
+#include <asm/mips_machine.h>
+
+enum ar71xx_mach_type {
+       AR71XX_MACH_GENERIC = 0,
+       AR71XX_MACH_AP81,       /* Atheros AP81 */
+       AR71XX_MACH_AP83,       /* Atheros AP83 */
+       AR71XX_MACH_AW_NR580,   /* AzureWave AW-NR580 */
+       AR71XX_MACH_DIR_615_C1, /* D-Link DIR-615 rev. C1 */
+       AR71XX_MACH_DIR_825_B1, /* D-Link DIR-825 rev. B1 */
+       AR71XX_MACH_RB_411,     /* MikroTik RouterBOARD 411/411A/411AH */
+       AR71XX_MACH_RB_411U,    /* MikroTik RouterBOARD 411U */
+       AR71XX_MACH_RB_433,     /* MikroTik RouterBOARD 433/433AH */
+       AR71XX_MACH_RB_433U,    /* MikroTik RouterBOARD 433UAH */
+       AR71XX_MACH_RB_450,     /* MikroTik RouterBOARD 450 */
+       AR71XX_MACH_RB_450G,    /* MikroTik RouterBOARD 450G */
+       AR71XX_MACH_RB_493,     /* Mikrotik RouterBOARD 493/493AH */
+       AR71XX_MACH_PB42,       /* Atheros PB42 */
+       AR71XX_MACH_PB44,       /* Atheros PB44 */
+       AR71XX_MACH_MZK_W04NU,  /* Planex MZK-W04NU */
+       AR71XX_MACH_MZK_W300NH, /* Planex MZK-W300NH */
+       AR71XX_MACH_TEW_632BRP, /* TRENDnet TEW-632BRP */
+       AR71XX_MACH_TL_WR741ND, /* TP-LINK TL-WR741ND */
+       AR71XX_MACH_TL_WR841N_V1, /* TP-LINK TL-WR841N v1 */
+       AR71XX_MACH_TL_WR941ND, /* TP-LINK TL-WR941ND */
+       AR71XX_MACH_TL_WR1043ND, /* TP-LINK TL-WR1041ND */
+       AR71XX_MACH_UBNT_LSSR71, /* Ubiquiti LS-SR71 */
+       AR71XX_MACH_UBNT_LSX,   /* Ubiquiti LSX */
+       AR71XX_MACH_UBNT_RS,    /* Ubiquiti RouterStation */
+       AR71XX_MACH_UBNT_RSPRO, /* Ubiquiti RouterStation Pro */
+       AR71XX_MACH_UBNT_BULLET_M, /* Ubiquiti Bullet M */
+       AR71XX_MACH_UBNT_ROCKET_M, /* Ubiquiti Rocket M */
+       AR71XX_MACH_UBNT_NANO_M, /* Ubiquiti NanoStation M */
+       AR71XX_MACH_WNDR3700,   /* NETGEAR WNDR3700 */
+       AR71XX_MACH_WNR2000,    /* NETGEAR WNR2000 */
+       AR71XX_MACH_WP543,      /* Compex WP543 */
+       AR71XX_MACH_WRT160NL,   /* Linksys WRT160NL */
+       AR71XX_MACH_WRT400N,    /* Linksys WRT400N */
+};
+
+extern enum ar71xx_mach_type ar71xx_mach;
+
+#endif /* _AR71XX_MACHTYPE_H */
index b38b48ba3bd102e304a1d87a4c218e837e624dad..f522d1ff39dab24b0c989407a0a0572d3ba0fdce 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <asm/mach-ar71xx/ar71xx.h>
 
+#include "machtype.h"
 #include "devices.h"
 
 struct board_rec {
index 4a2295af493ca36f3a7ffe4b24100abaae67073e..7ea29ed8bd9f4e2046b3427a1e4b799ddae4e21e 100644 (file)
@@ -24,6 +24,7 @@
 #include <asm/mach-ar71xx/ar71xx.h>
 #include <asm/mach-ar71xx/pci.h>
 
+#include "machtype.h"
 #include "devices.h"
 
 #define AR71XX_SYS_TYPE_LEN    64
index 7a52e8b54c8d6a1662976f8c0f5622eaf7041f05..00e7cbc4b7312151ab0a3893ff8ebdefc50716a6 100644 (file)
@@ -119,45 +119,6 @@ enum ar71xx_soc_type {
 
 extern enum ar71xx_soc_type ar71xx_soc;
 
-enum ar71xx_mach_type {
-       AR71XX_MACH_GENERIC = 0,
-       AR71XX_MACH_AP81,       /* Atheros AP81 */
-       AR71XX_MACH_AP83,       /* Atheros AP83 */
-       AR71XX_MACH_AW_NR580,   /* AzureWave AW-NR580 */
-       AR71XX_MACH_DIR_825_B1, /* D-Link DIR-825 rev. B1 */
-       AR71XX_MACH_RB_411,     /* MikroTik RouterBOARD 411/411A/411AH */
-       AR71XX_MACH_RB_411U,    /* MikroTik RouterBOARD 411U */
-       AR71XX_MACH_RB_433,     /* MikroTik RouterBOARD 433/433AH */
-       AR71XX_MACH_RB_433U,    /* MikroTik RouterBOARD 433UAH */
-       AR71XX_MACH_RB_450,     /* MikroTik RouterBOARD 450 */
-       AR71XX_MACH_RB_450G,    /* MikroTik RouterBOARD 450G */
-       AR71XX_MACH_RB_493,     /* Mikrotik RouterBOARD 493/493AH */
-       AR71XX_MACH_PB42,       /* Atheros PB42 */
-       AR71XX_MACH_PB44,       /* Atheros PB44 */
-       AR71XX_MACH_MZK_W04NU,  /* Planex MZK-W04NU */
-       AR71XX_MACH_MZK_W300NH, /* Planex MZK-W300NH */
-       AR71XX_MACH_TEW_632BRP, /* TRENDnet TEW-632BRP */
-       AR71XX_MACH_DIR_615_C1, /* D-Link DIR-615 rev. C1 */
-       AR71XX_MACH_TL_WR741ND, /* TP-LINK TL-WR741ND */
-       AR71XX_MACH_TL_WR841N_V1, /* TP-LINK TL-WR841N v1 */
-       AR71XX_MACH_TL_WR941ND, /* TP-LINK TL-WR941ND */
-       AR71XX_MACH_TL_WR1043ND, /* TP-LINK TL-WR1041ND */
-       AR71XX_MACH_UBNT_LSSR71, /* Ubiquiti LS-SR71 */
-       AR71XX_MACH_UBNT_LSX,   /* Ubiquiti LSX */
-       AR71XX_MACH_UBNT_RS,    /* Ubiquiti RouterStation */
-       AR71XX_MACH_UBNT_RSPRO, /* Ubiquiti RouterStation Pro */
-       AR71XX_MACH_UBNT_BULLET_M, /* Ubiquiti Bullet M */
-       AR71XX_MACH_UBNT_ROCKET_M, /* Ubiquiti Rocket M */
-       AR71XX_MACH_UBNT_NANO_M, /* Ubiquiti NanoStation M */
-       AR71XX_MACH_WNR2000,    /* NETGEAR WNR2000 */
-       AR71XX_MACH_WNDR3700,   /* NETGEAR WNDR3700 */
-       AR71XX_MACH_WP543,      /* Compex WP543 */
-       AR71XX_MACH_WRT160NL,   /* Linksys WRT160NL */
-       AR71XX_MACH_WRT400N,    /* Linksys WRT400N */
-};
-
-extern enum ar71xx_mach_type ar71xx_mach;
-
 /*
  * PLL block
  */