summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2020-10-02 15:06:58 -0500
committerJohn Klug <john.klug@multitech.com>2020-10-02 15:06:58 -0500
commit47265d1046ff1c26d19e208c97e95a962161731a (patch)
treee5ef5ec400752dae53b3e26289500cbf7fc384b8
parentff830af02d4010d34a1c37fa16ee2875579b9c22 (diff)
downloadmtac-eth-1.1.1.tar.gz
mtac-eth-1.1.1.tar.bz2
mtac-eth-1.1.1.zip
Move PIN mapping for MTAC cards to MTAC driver, add TI1.1.1
-rw-r--r--mtac_eth.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/mtac_eth.c b/mtac_eth.c
index e3ace6c..efdea60 100644
--- a/mtac_eth.c
+++ b/mtac_eth.c
@@ -1,10 +1,16 @@
-#define DRIVER_VERSION "v1.1.0"
-#define DRIVER_AUTHOR "John Klug <john.klug@multitech.com>"
+#define DRIVER_VERSION "v1.1.1"
+#define DRIVER_AUTHOR "Multi-Tech"
#define DRIVER_DESC "MTS Ethernet Accessory Card"
#define DRIVER_NAME "mtac-eth"
#include <linux/types.h>
#include <linux/gpio.h>
+#ifdef TI43X
+#include <linux/ti43x_gpio.h>
+#endif
+#ifdef SAM9G25
+#include <linux/sam9g25_gpio.h>
+#endif
#include <linux/platform_device.h>
#include <linux/kmod.h>
#include <linux/bitops.h>
@@ -13,12 +19,12 @@
#include <linux/mtac.h>
#include <linux/mts_io.h>
-static struct gpio_pin gpio_pins_mtcdt_mtac_eth[] = {
+static struct gpio_pin gpio_pins_mtac_eth[] = {
// gpio pins for Accessory Card 1
{
.name = "AP1_RESET",
.pin = {
- .gpio = AT91_PIN_PB12,
+ .gpio = M_AP1_NRESET,
.flags = GPIOF_OUT_INIT_HIGH,
.label = "ap1-reset",
}
@@ -29,7 +35,7 @@ static struct gpio_pin gpio_pins_mtcdt_mtac_eth[] = {
{
.name = "AP2_RESET",
.pin = {
- .gpio = AT91_PIN_PB13,
+ .gpio = M_AP2_NRESET,
.flags = GPIOF_OUT_INIT_HIGH,
.label = "ap2-reset",
}
@@ -114,7 +120,7 @@ static bool eth_setup(enum ap port) {
return false;
}
- mtac_set_port_pins(port_index,gpio_pins_mtcdt_mtac_eth,subdir);
+ mtac_set_port_pins(port_index,gpio_pins_mtac_eth,subdir);
// create the link to the apX directory this card is in
// if we're in the first slot, we get plain "eth"