diff options
author | florian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-01-03 20:19:32 +0000 |
---|---|---|
committer | florian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-01-03 20:19:32 +0000 |
commit | b6e8369fc62e7fbcdebf7dce0e3a6388ea53a879 (patch) | |
tree | 6e739e981b45cb846578f905e9916d8472e43dee /target/linux/ar7/files/arch/mips | |
parent | e6c9aacc5937d1f4a0686ae660d7c6f48f998218 (diff) |
[ar7] add support for titan variant (WRTP54G) (#6185)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19022 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar7/files/arch/mips')
-rw-r--r-- | target/linux/ar7/files/arch/mips/ar7/gpio.c | 4 | ||||
-rw-r--r-- | target/linux/ar7/files/arch/mips/ar7/setup.c | 14 |
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)"; } |