comparison src/cs/drivers/drv_app/ffs/board/drv.c @ 26:680f6fdb5e62

add target for Sony Ericsson K200/K220
author Vadim Yanitskiy <fixeria@osmocom.org>
date Wed, 20 Dec 2023 01:59:09 +0700
parents 92470e5d0b9e
children
comparison
equal deleted inserted replaced
25:b51027daadb9 26:680f6fdb5e62
980 // the same command data for entering READ_IDENTIFIER mode (0x90). 980 // the same command data for entering READ_IDENTIFIER mode (0x90).
981 // The function should be copied and executed from RAM! 981 // The function should be copied and executed from RAM!
982 void ffsdrv_device_id_read(uint16 *manufact, uint16 *device) 982 void ffsdrv_device_id_read(uint16 *manufact, uint16 *device)
983 { 983 {
984 #if defined(CONFIG_TARGET_FCFAM) || defined(CONFIG_TARGET_PIRELLI) || \ 984 #if defined(CONFIG_TARGET_FCFAM) || defined(CONFIG_TARGET_PIRELLI) || \
985 defined(__GNUC__) 985 defined(CONFIG_TARGET_SE_K2X0) || defined(__GNUC__)
986 /* 986 /*
987 * This new FreeCalypso version of the device ID read function 987 * This new FreeCalypso version of the device ID read function
988 * should work for all current targets, but we are being conservative 988 * should work for all current targets, but we are being conservative
989 * and only enabling it for those targets for which it is required, 989 * and only enabling it for those targets for which it is required,
990 * i.e., where TI's original version does not work. 990 * i.e., where TI's original version does not work.
1172 ttw(ttr(TTrDrvOther, "}" NL)); 1172 ttw(ttr(TTrDrvOther, "}" NL));
1173 1173
1174 return 0; 1174 return 0;
1175 } 1175 }
1176 1176
1177 #if defined(CONFIG_TARGET_PIRELLI) || defined(CONFIG_TARGET_FCFAM) 1177 #if defined(CONFIG_TARGET_PIRELLI) || defined(CONFIG_TARGET_FCFAM) || \
1178 1178 defined(CONFIG_TARGET_SE_K2X0)
1179 #ifdef CONFIG_TARGET_FCFAM 1179
1180 #if defined(CONFIG_TARGET_FCFAM) || defined(CONFIG_TARGET_SE_K2X0)
1180 #define FLASH2_BASE_ADDR 0x01800000 1181 #define FLASH2_BASE_ADDR 0x01800000
1181 #elif defined(CONFIG_TARGET_PIRELLI) 1182 #elif defined(CONFIG_TARGET_PIRELLI)
1182 #define FLASH2_BASE_ADDR 0x02000000 1183 #define FLASH2_BASE_ADDR 0x02000000
1183 #endif 1184 #endif
1184 1185
1378 1379
1379 if ((dev.manufact == MANUFACT_AMD || dev.manufact == MANUFACT_FUJITSU) && 1380 if ((dev.manufact == MANUFACT_AMD || dev.manufact == MANUFACT_FUJITSU) &&
1380 device_id[0] == 0x227E) { 1381 device_id[0] == 0x227E) {
1381 // This is a multi-id device 1382 // This is a multi-id device
1382 dev.device = (device_id[1] << 8) | (device_id[2] & 0xFF); 1383 dev.device = (device_id[1] << 8) | (device_id[2] & 0xFF);
1383 #if defined(CONFIG_TARGET_PIRELLI) || defined(CONFIG_TARGET_FCFAM) 1384 #if defined(CONFIG_TARGET_PIRELLI) || \
1385 defined(CONFIG_TARGET_FCFAM) || \
1386 defined(CONFIG_TARGET_SE_K2X0)
1384 if (device_id[1] == 0x2221 && device_id[2] == 0x2200) 1387 if (device_id[1] == 0x2221 && device_id[2] == 0x2200)
1385 dev.device += ffsdrv_is_new_spansion_flash(); 1388 dev.device += ffsdrv_is_new_spansion_flash();
1386 #endif 1389 #endif
1387 } 1390 }
1388 else if (dev.manufact == MANUFACT_SAMSUNG && device_id[0] == 0x257E) { 1391 else if (dev.manufact == MANUFACT_SAMSUNG && device_id[0] == 0x257E) {