From 46fc1d57ac9462fd788277609707a379c7a406cb Mon Sep 17 00:00:00 2001 From: Zachary T Welch Date: Fri, 13 Nov 2009 08:44:30 -0800 Subject: working_area_t -> struct working_area Remove misleading typedef and redundant suffix from struct working_area. --- src/flash/aduc702x.c | 4 ++-- src/flash/arm_nandio.h | 2 +- src/flash/cfi.c | 4 ++-- src/flash/cfi.h | 2 +- src/flash/ecos.c | 4 ++-- src/flash/lpc2000.c | 2 +- src/flash/lpc2000.h | 2 +- src/flash/lpc2900.c | 2 +- src/flash/pic32mx.c | 2 +- src/flash/pic32mx.h | 2 +- src/flash/stellaris.c | 4 ++-- src/flash/stm32x.c | 2 +- src/flash/stm32x.h | 2 +- src/flash/str7x.c | 2 +- src/flash/str7x.h | 2 +- src/flash/str9x.c | 2 +- src/flash/str9x.h | 2 +- src/target/arm7_9_common.c | 4 ++-- src/target/arm7_9_common.h | 2 +- src/target/armv7m.c | 4 ++-- src/target/cortex_a8.c | 2 +- src/target/target.c | 18 +++++++++--------- src/target/target.h | 16 ++++++++-------- 23 files changed, 44 insertions(+), 44 deletions(-) (limited to 'src') diff --git a/src/flash/aduc702x.c b/src/flash/aduc702x.c index ebda702a..8011e933 100644 --- a/src/flash/aduc702x.c +++ b/src/flash/aduc702x.c @@ -44,7 +44,7 @@ static int aduc702x_set_write_enable(target_t *target, int enable); #define ADUC702x_FLASH_FEEHIDE (7*4) struct aduc702x_flash_bank { - working_area_t *write_algorithm; + struct working_area *write_algorithm; }; /* flash bank aduc702x 0 0 0 0 @@ -161,7 +161,7 @@ static int aduc702x_write_block(struct flash_bank_s *bank, uint8_t *buffer, uint struct aduc702x_flash_bank *aduc702x_info = bank->driver_priv; target_t *target = bank->target; uint32_t buffer_size = 7000; - working_area_t *source; + struct working_area *source; uint32_t address = bank->base + offset; struct reg_param reg_params[6]; struct armv4_5_algorithm armv4_5_info; diff --git a/src/flash/arm_nandio.h b/src/flash/arm_nandio.h index eedf5dca..cb8df428 100644 --- a/src/flash/arm_nandio.h +++ b/src/flash/arm_nandio.h @@ -9,7 +9,7 @@ struct arm_nand_data { struct target_s *target; /* copy_area holds write-to-NAND loop and data to write */ - struct working_area_s *copy_area; + struct working_area *copy_area; /* chunk_size == page or ECC unit */ unsigned chunk_size; diff --git a/src/flash/cfi.c b/src/flash/cfi.c index c0c2cb79..6a193e2d 100644 --- a/src/flash/cfi.c +++ b/src/flash/cfi.c @@ -1022,7 +1022,7 @@ static int cfi_intel_write_block(struct flash_bank_s *bank, uint8_t *buffer, uin target_t *target = bank->target; struct reg_param reg_params[7]; struct armv4_5_algorithm armv4_5_info; - working_area_t *source; + struct working_area *source; uint32_t buffer_size = 32768; uint32_t write_command_val, busy_pattern_val, error_pattern_val; @@ -1267,7 +1267,7 @@ static int cfi_spansion_write_block(struct flash_bank_s *bank, uint8_t *buffer, target_t *target = bank->target; struct reg_param reg_params[10]; struct armv4_5_algorithm armv4_5_info; - working_area_t *source; + struct working_area *source; uint32_t buffer_size = 32768; uint32_t status; int retval, retvaltemp; diff --git a/src/flash/cfi.h b/src/flash/cfi.h index 7763aff6..deca9163 100644 --- a/src/flash/cfi.h +++ b/src/flash/cfi.h @@ -27,7 +27,7 @@ struct cfi_flash_bank { - working_area_t *write_algorithm; + struct working_area *write_algorithm; int x16_as_x8; int jedec_probe; diff --git a/src/flash/ecos.c b/src/flash/ecos.c index 0a97bda1..450bd5b7 100644 --- a/src/flash/ecos.c +++ b/src/flash/ecos.c @@ -36,8 +36,8 @@ static int ecosflash_handle_gpnvm_command(struct command_context_s *cmd_ctx, cha struct ecosflash_flash_bank { struct target_s *target; - working_area_t *write_algorithm; - working_area_t *erase_check_algorithm; + struct working_area *write_algorithm; + struct working_area *erase_check_algorithm; char *driverPath; uint32_t start_address; }; diff --git a/src/flash/lpc2000.c b/src/flash/lpc2000.c index 31e81b3b..4ad3e0e5 100644 --- a/src/flash/lpc2000.c +++ b/src/flash/lpc2000.c @@ -548,7 +548,7 @@ static int lpc2000_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t of uint32_t result_table[4]; int status_code; int i; - working_area_t *download_area; + struct working_area *download_area; int retval = ERROR_OK; if (bank->target->state != TARGET_HALTED) diff --git a/src/flash/lpc2000.h b/src/flash/lpc2000.h index b93deb69..08e278a3 100644 --- a/src/flash/lpc2000.h +++ b/src/flash/lpc2000.h @@ -35,7 +35,7 @@ typedef enum struct lpc2000_flash_bank { lpc2000_variant variant; - struct working_area_s *iap_working_area; + struct working_area *iap_working_area; uint32_t cclk; int cmd51_dst_boundary; int cmd51_can_256b; diff --git a/src/flash/lpc2900.c b/src/flash/lpc2900.c index f6b3bf6f..08879077 100644 --- a/src/flash/lpc2900.c +++ b/src/flash/lpc2900.c @@ -1294,7 +1294,7 @@ static int lpc2900_write(struct flash_bank_s *bank, uint8_t *buffer, /* Try working area allocation. Start with a large buffer, and try with reduced size if that fails. */ - working_area_t *warea; + struct working_area *warea; uint32_t buffer_size = lpc2900_info->max_ram_block - 1 * KiB; while( (retval = target_alloc_working_area(target, buffer_size + target_code_size, diff --git a/src/flash/pic32mx.c b/src/flash/pic32mx.c index 262200c0..d29950ce 100644 --- a/src/flash/pic32mx.c +++ b/src/flash/pic32mx.c @@ -302,7 +302,7 @@ static int pic32mx_write_block(struct flash_bank_s *bank, uint8_t *buffer, uint3 { target_t *target = bank->target; uint32_t buffer_size = 512; - working_area_t *source; + struct working_area *source; uint32_t address = bank->base + offset; int retval = ERROR_OK; #if 0 diff --git a/src/flash/pic32mx.h b/src/flash/pic32mx.h index 3a3c9794..92f40c2e 100644 --- a/src/flash/pic32mx.h +++ b/src/flash/pic32mx.h @@ -30,7 +30,7 @@ struct pic32mx_flash_bank { - working_area_t *write_algorithm; + struct working_area *write_algorithm; int devid; int ppage_size; int probed; diff --git a/src/flash/stellaris.c b/src/flash/stellaris.c index cdeccbe1..6ec036cc 100644 --- a/src/flash/stellaris.c +++ b/src/flash/stellaris.c @@ -832,8 +832,8 @@ static int stellaris_write_block(struct flash_bank_s *bank, uint8_t *buffer, uin { target_t *target = bank->target; uint32_t buffer_size = 8192; - working_area_t *source; - working_area_t *write_algorithm; + struct working_area *source; + struct working_area *write_algorithm; uint32_t address = bank->base + offset; struct reg_param reg_params[3]; struct armv7m_algorithm armv7m_info; diff --git a/src/flash/stm32x.c b/src/flash/stm32x.c index a63ff60b..35da209c 100644 --- a/src/flash/stm32x.c +++ b/src/flash/stm32x.c @@ -435,7 +435,7 @@ static int stm32x_write_block(struct flash_bank_s *bank, uint8_t *buffer, uint32 struct stm32x_flash_bank *stm32x_info = bank->driver_priv; target_t *target = bank->target; uint32_t buffer_size = 16384; - working_area_t *source; + struct working_area *source; uint32_t address = bank->base + offset; struct reg_param reg_params[4]; struct armv7m_algorithm armv7m_info; diff --git a/src/flash/stm32x.h b/src/flash/stm32x.h index 9e1e5b1c..6cd047e1 100644 --- a/src/flash/stm32x.h +++ b/src/flash/stm32x.h @@ -35,7 +35,7 @@ struct stm32x_options struct stm32x_flash_bank { struct stm32x_options option_bytes; - working_area_t *write_algorithm; + struct working_area *write_algorithm; int ppage_size; int probed; }; diff --git a/src/flash/str7x.c b/src/flash/str7x.c index 68ba26eb..d5defe5f 100644 --- a/src/flash/str7x.c +++ b/src/flash/str7x.c @@ -313,7 +313,7 @@ static int str7x_write_block(struct flash_bank_s *bank, uint8_t *buffer, uint32_ struct str7x_flash_bank *str7x_info = bank->driver_priv; target_t *target = bank->target; uint32_t buffer_size = 8192; - working_area_t *source; + struct working_area *source; uint32_t address = bank->base + offset; struct reg_param reg_params[6]; struct armv4_5_algorithm armv4_5_info; diff --git a/src/flash/str7x.h b/src/flash/str7x.h index ef2d2e33..81af0f1e 100644 --- a/src/flash/str7x.h +++ b/src/flash/str7x.h @@ -31,7 +31,7 @@ struct str7x_flash_bank uint32_t disable_bit; uint32_t busy_bits; uint32_t register_base; - working_area_t *write_algorithm; + struct working_area *write_algorithm; }; enum str7x_status_codes diff --git a/src/flash/str9x.c b/src/flash/str9x.c index bae895d2..09e5a08f 100644 --- a/src/flash/str9x.c +++ b/src/flash/str9x.c @@ -351,7 +351,7 @@ static int str9x_write_block(struct flash_bank_s *bank, struct str9x_flash_bank *str9x_info = bank->driver_priv; target_t *target = bank->target; uint32_t buffer_size = 8192; - working_area_t *source; + struct working_area *source; uint32_t address = bank->base + offset; struct reg_param reg_params[4]; struct armv4_5_algorithm armv4_5_info; diff --git a/src/flash/str9x.h b/src/flash/str9x.h index 69385148..c9d5152f 100644 --- a/src/flash/str9x.h +++ b/src/flash/str9x.h @@ -30,7 +30,7 @@ struct str9x_flash_bank uint32_t *sector_bits; int variant; int bank1; - working_area_t *write_algorithm; + struct working_area *write_algorithm; }; enum str9x_status_codes diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c index eb27bba0..19244de3 100644 --- a/src/target/arm7_9_common.c +++ b/src/target/arm7_9_common.c @@ -2723,7 +2723,7 @@ int arm7_9_bulk_write_memory(target_t *target, uint32_t address, uint32_t count, int arm7_9_checksum_memory(struct target_s *target, uint32_t address, uint32_t count, uint32_t* checksum) { - working_area_t *crc_algorithm; + struct working_area *crc_algorithm; struct armv4_5_algorithm armv4_5_info; struct reg_param reg_params[2]; int retval; @@ -2807,7 +2807,7 @@ int arm7_9_checksum_memory(struct target_s *target, uint32_t address, uint32_t c int arm7_9_blank_check_memory(struct target_s *target, uint32_t address, uint32_t count, uint32_t* blank) { - working_area_t *erase_check_algorithm; + struct working_area *erase_check_algorithm; struct reg_param reg_params[3]; struct armv4_5_algorithm armv4_5_info; int retval; diff --git a/src/target/arm7_9_common.h b/src/target/arm7_9_common.h index cebf6e3c..0ef5eb64 100644 --- a/src/target/arm7_9_common.h +++ b/src/target/arm7_9_common.h @@ -69,7 +69,7 @@ struct arm7_9_common bool fast_memory_access; bool dcc_downloads; - struct working_area_s *dcc_working_area; + struct working_area *dcc_working_area; int (*examine_debug_reason)(target_t *target); /**< Function for determining why debug state was entered */ diff --git a/src/target/armv7m.c b/src/target/armv7m.c index 05668880..4a6869fa 100644 --- a/src/target/armv7m.c +++ b/src/target/armv7m.c @@ -588,7 +588,7 @@ int armv7m_init_arch_info(target_t *target, struct armv7m_common *armv7m) int armv7m_checksum_memory(struct target_s *target, uint32_t address, uint32_t count, uint32_t* checksum) { - working_area_t *crc_algorithm; + struct working_area *crc_algorithm; struct armv7m_algorithm armv7m_info; struct reg_param reg_params[2]; int retval; @@ -671,7 +671,7 @@ int armv7m_checksum_memory(struct target_s *target, int armv7m_blank_check_memory(struct target_s *target, uint32_t address, uint32_t count, uint32_t* blank) { - working_area_t *erase_check_algorithm; + struct working_area *erase_check_algorithm; struct reg_param reg_params[3]; struct armv7m_algorithm armv7m_info; int retval; diff --git a/src/target/cortex_a8.c b/src/target/cortex_a8.c index edf7f141..983bef85 100644 --- a/src/target/cortex_a8.c +++ b/src/target/cortex_a8.c @@ -564,7 +564,7 @@ static int cortex_a8_debug_entry(target_t *target) int i; uint32_t regfile[16], pc, cpsr, dscr; int retval = ERROR_OK; - working_area_t *regfile_working_area = NULL; + struct working_area *regfile_working_area = NULL; struct cortex_a8_common *cortex_a8 = target_to_cortex_a8(target); struct armv7a_common *armv7a = target_to_armv7a(target); struct armv4_5_common_s *armv4_5 = &armv7a->armv4_5_common; diff --git a/src/target/target.c b/src/target/target.c index 8932266a..3b3179c3 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -1082,10 +1082,10 @@ int target_call_timer_callbacks_now(void) return target_call_timer_callbacks_check_time(0); } -int target_alloc_working_area(struct target_s *target, uint32_t size, working_area_t **area) +int target_alloc_working_area(struct target_s *target, uint32_t size, struct working_area **area) { - working_area_t *c = target->working_areas; - working_area_t *new_wa = NULL; + struct working_area *c = target->working_areas; + struct working_area *new_wa = NULL; /* Reevaluate working area address based on MMU state*/ if (target->working_areas == NULL) @@ -1145,7 +1145,7 @@ int target_alloc_working_area(struct target_s *target, uint32_t size, working_ar /* if not, allocate a new one */ if (!new_wa) { - working_area_t **p = &target->working_areas; + struct working_area **p = &target->working_areas; uint32_t first_free = target->working_area; uint32_t free_size = target->working_area_size; @@ -1167,7 +1167,7 @@ int target_alloc_working_area(struct target_s *target, uint32_t size, working_ar LOG_DEBUG("allocated new working area at address 0x%08x", (unsigned)first_free); - new_wa = malloc(sizeof(working_area_t)); + new_wa = malloc(sizeof(struct working_area)); new_wa->next = NULL; new_wa->size = size; new_wa->address = first_free; @@ -1202,7 +1202,7 @@ int target_alloc_working_area(struct target_s *target, uint32_t size, working_ar return ERROR_OK; } -int target_free_working_area_restore(struct target_s *target, working_area_t *area, int restore) +int target_free_working_area_restore(struct target_s *target, struct working_area *area, int restore) { if (area->free) return ERROR_OK; @@ -1223,7 +1223,7 @@ int target_free_working_area_restore(struct target_s *target, working_area_t *ar return ERROR_OK; } -int target_free_working_area(struct target_s *target, working_area_t *area) +int target_free_working_area(struct target_s *target, struct working_area *area) { return target_free_working_area_restore(target, area, 1); } @@ -1233,11 +1233,11 @@ int target_free_working_area(struct target_s *target, working_area_t *area) */ void target_free_all_working_areas_restore(struct target_s *target, int restore) { - working_area_t *c = target->working_areas; + struct working_area *c = target->working_areas; while (c) { - working_area_t *next = c->next; + struct working_area *next = c->next; target_free_working_area_restore(target, c, restore); if (c->backup) diff --git a/src/target/target.h b/src/target/target.h index b7fa3eb9..14973550 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -114,15 +114,15 @@ extern const Jim_Nvp nvp_target_endian[]; struct target_s; -typedef struct working_area_s +struct working_area { uint32_t address; uint32_t size; int free; uint8_t *backup; - struct working_area_s **user; - struct working_area_s *next; -} working_area_t; + struct working_area **user; + struct working_area *next; +}; // target_type.h contains the full definitionof struct target_type_s struct target_type_s; @@ -149,7 +149,7 @@ typedef struct target_s uint32_t working_area_phys; /* physical address */ uint32_t working_area_size; /* size in bytes */ uint32_t backup_working_area; /* whether the content of the working area has to be preserved */ - struct working_area_s *working_areas;/* list of allocated working areas */ + struct working_area *working_areas;/* list of allocated working areas */ enum target_debug_reason debug_reason;/* reason why the target entered debug state */ enum target_endianess endianness; /* target endianess */ // also see: target_state_name() @@ -441,10 +441,10 @@ const char *target_state_name( target_t *target ); * */ int target_alloc_working_area(struct target_s *target, - uint32_t size, working_area_t **area); -int target_free_working_area(struct target_s *target, working_area_t *area); + uint32_t size, struct working_area **area); +int target_free_working_area(struct target_s *target, struct working_area *area); int target_free_working_area_restore(struct target_s *target, - working_area_t *area, int restore); + struct working_area *area, int restore); void target_free_all_working_areas(struct target_s *target); void target_free_all_working_areas_restore(struct target_s *target, int restore); -- cgit v1.2.3 /a> 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145