aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar7/files/arch
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2010-01-03 20:19:32 +0000
committerFlorian Fainelli <florian@openwrt.org>2010-01-03 20:19:32 +0000
commit5a481b16add96022b64d5cc6494b5aa6b17c21f0 (patch)
treee0c82b81e42cd47f20614aaf956a53c5fa676c99 /target/linux/ar7/files/arch
parent144fd07cd846e77439125feab06ee4af3f23cec3 (diff)
downloadupstream-5a481b16add96022b64d5cc6494b5aa6b17c21f0.tar.gz
upstream-5a481b16add96022b64d5cc6494b5aa6b17c21f0.tar.bz2
upstream-5a481b16add96022b64d5cc6494b5aa6b17c21f0.zip
add support for titan variant (WRTP54G) (#6185)
SVN-Revision: 19022
Diffstat (limited to 'target/linux/ar7/files/arch')
-rw-r--r--target/linux/ar7/files/arch/mips/ar7/gpio.c4
-rw-r--r--target/linux/ar7/files/arch/mips/ar7/setup.c14
2 files changed, 16 insertions, 2 deletions
diff --git a/target/linux/ar7/files/arch/mips/ar7/gpio.c b/target/linux/ar7/files/arch/mips/ar7/gpio.c
index 207d270934..56860f46d5 100644
--- a/target/linux/ar7/files/arch/mips/ar7/gpio.c
+++ b/target/linux/ar7/files/arch/mips/ar7/gpio.c
@@ -21,11 +21,11 @@
#include <asm/ar7/gpio.h>
-static const char *ar7_gpio_list[AR7_GPIO_MAX];
+static const char *ar7_gpio_list[TITAN_GPIO_MAX];
int gpio_request(unsigned gpio, const char *label)
{
- if (gpio >= AR7_GPIO_MAX)
+ if (gpio >= (ar7_is_titan() ? TITAN_GPIO_MAX : AR7_GPIO_MAX))
return -EINVAL;
if (ar7_gpio_list[gpio])
diff --git a/target/linux/ar7/files/arch/mips/ar7/setup.c b/target/linux/ar7/files/arch/mips/ar7/setup.c
index 58e1528570..35b7b8d77e 100644
--- a/target/linux/ar7/files/arch/mips/ar7/setup.c
+++ b/target/linux/ar7/files/arch/mips/ar7/setup.c
@@ -23,8 +23,10 @@
#include <asm/reboot.h>
#include <asm/time.h>
#include <asm/ar7/ar7.h>
+#include <asm/ar7/gpio.h>
#include <asm/ar7/prom.h>
+static int titan_variant; /*hold the results of the gpio_init_titan_variant() so that it is only called once*/
static void ar7_machine_restart(char *command);
static void ar7_machine_halt(void);
static void ar7_machine_power_off(void);
@@ -59,6 +61,18 @@ const char *get_system_type(void)
return "TI AR7 (TNETD7100)";
case AR7_CHIP_7200:
return "TI AR7 (TNETD7200)";
+ case AR7_CHIP_TITAN:
+ titan_variant = ar7_init_titan_variant();
+ switch (titan_variant /*(gpio_get_value_titan(1) >> 12) & 0xf*/) {
+ case TITAN_CHIP_1050:
+ return "TI AR7 (TNETV1050)";
+ case TITAN_CHIP_1055:
+ return "TI AR7 (TNETV1055)";
+ case TITAN_CHIP_1056:
+ return "TI AR7 (TNETV1056)";
+ case TITAN_CHIP_1060:
+ return "TI AR7 (TNETV1060)";
+ }
default:
return "TI AR7 (Unknown)";
}