diff options
author | Patrick Murphy <patrick.muprphy@multitech.com> | 2021-01-28 07:35:33 -0600 |
---|---|---|
committer | Patrick Murphy <patrick.muprphy@multitech.com> | 2021-01-28 07:35:33 -0600 |
commit | 6e2f486653ea1fd6f4cba998e5a3119c51f6fc6e (patch) | |
tree | a9dae96db996fb131b3e0976c42c814a63ae1b16 | |
parent | d9e9096d724d20e9765ccc38a17b2bc85cbc3897 (diff) | |
download | mtac-6e2f486653ea1fd6f4cba998e5a3119c51f6fc6e.tar.gz mtac-6e2f486653ea1fd6f4cba998e5a3119c51f6fc6e.tar.bz2 mtac-6e2f486653ea1fd6f4cba998e5a3119c51f6fc6e.zip |
initial commit of added built in mtac slot support
-rw-r--r-- | machine/ti43x_gpio.h | 6 | ||||
-rw-r--r-- | mtac.c | 6 | ||||
-rw-r--r-- | mtac.h | 16 |
3 files changed, 25 insertions, 3 deletions
diff --git a/machine/ti43x_gpio.h b/machine/ti43x_gpio.h index 734998d..e57934d 100644 --- a/machine/ti43x_gpio.h +++ b/machine/ti43x_gpio.h @@ -22,4 +22,10 @@ #define M_AP2_NRESET OMAP_GPIO(5,29) #define M_AP2_NINT1 OMAP_GPIO(3,17) #define M_AP2_NINT2 OMAP_GPIO(3,18) + +// gpio pins for built in serial +#define M_AP3_GPIO1 OMAP_GPIO(7,2) +#define M_AP3_GPIO2 OMAP_GPIO(7,3) +#define M_AP3_GPIO3 OMAP_GPIO(7,4) +#define M_AP3_GPIO4 OMAP_GPIO(7,5) #endif /* TI MTCDT3-BB */ @@ -26,7 +26,8 @@ static const char* eeprom_file_name[NUM_AP] = { "1-0050/eeprom", "1-0052/eeprom" #endif #ifdef mtcpmhs - "2-0050/eeprom", "2-0052/eeprom" + /*2nd */ + "2-0050/eeprom", "2-0052/eeprom", "2-0050/eeprom" #endif #endif // NUM_AP > 0 }; @@ -491,9 +492,12 @@ static int __init mtac_init(void) int ret; log_debug("init: " DRIVER_VERSION); + log_debug("NUM_AP: %s", NUM_AP); mutex_lock(&mtac_mutex); for (port_index = 0; port_index < NUM_AP; port_index++) { + log_info("port_index: %s", port_index); + log_info("eeprom_file_name[port_index]: %s",eeprom_file_name[port_index]); mts_ap_eeprom[port_index][0] = 0x00; /* initialize to not present */ if((ret = request_firmware_direct(&fw, eeprom_file_name[port_index], &mts_io_platform_device->dev)) == 0) { if(fw->size == sizeof(mts_ap_eeprom[0])) { @@ -1,13 +1,22 @@ #ifndef IO_MODULE_MTAC_H_ #define IO_MODULE_MTAC_H_ + + // NUM_AP should be defined from the board code // it should be set to the value of CONFIG_MTS_NUM_ACCESSORY_PORTS // arch/arm/mach-at91/board-dt-sam9.c // if it is 0 or undefined, there is no accessory card support on this HW +#ifdef mtcpmhs +#define NUM_BUILT_IN 1 + +#else +#define NUM_BUILT_IN 0 +#endif + #ifdef CONFIG_MTS_NUM_ACCESSORY_PORTS #ifndef NUM_AP -#define NUM_AP CONFIG_MTS_NUM_ACCESSORY_PORTS +#define NUM_AP CONFIG_MTS_NUM_ACCESSORY_PORTS + NUM_BUILT_IN #endif #else @@ -17,7 +26,7 @@ #define PRODUCT_ID_MTAC_GPIOB "MTAC-GPIOB" #define PRODUCT_ID_MTAC_MFSER "MTAC-MFSER" -#define PRODUCT_ID_MTAC_ETH "MTAC-ETH" +#define PRODUCT_ID_MTAC_ETH "MTAC-ETH" #define PRODUCT_ID_MTAC_LORA "MTAC-LORA" #define PRODUCT_ID_MTAC_PULSE "MTAC-PULSE" #define PRODUCT_ID_MTAC_XDOT "MTAC-XDOT" @@ -54,6 +63,9 @@ enum { enum ap { port_1 = 1, port_2, +#ifdef mtcpmhs + port_3, +#endif }; // info for accessory port |