This is an automated email from Gerrit.

Andreas Fritiofson ([email protected]) just uploaded a new patch set 
to Gerrit, which you can find at http://openocd.zylin.com/3216

-- gerrit

commit 5ab689eba412095a2c9913896b7c9d8381f4ce97
Author: Andreas Fritiofson <[email protected]>
Date:   Wed Jan 13 20:33:36 2016 +0100

    cortex_a: Rename APB-AP to CPU in memory contexts
    
    Memory accesses are not made through the APB-AP, they are made through
    the CPU (which happens to be controlled over the APB-AP). Rename all
    irrelevant uses of the APB-AP term. And fix the long standing typo in
    the function names...
    
    Change-Id: Ide466fb2728930968bdba698f0dd9012cc9dbdf9
    Signed-off-by: Andreas Fritiofson <[email protected]>

diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c
index 76c608e..2d63c92 100644
--- a/src/target/cortex_a.c
+++ b/src/target/cortex_a.c
@@ -76,7 +76,7 @@ static int cortex_a_mmu(struct target *target, int *enabled);
 static int cortex_a_mmu_modify(struct target *target, int enable);
 static int cortex_a_virt2phys(struct target *target,
        uint32_t virt, uint32_t *phys);
-static int cortex_a_read_apb_ab_memory(struct target *target,
+static int cortex_a_read_cpu_memory(struct target *target,
        uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer);
 
 
@@ -2123,13 +2123,13 @@ static int cortex_a_dfsr_to_error_code(uint32_t dfsr)
        }
 }
 
-static int cortex_a_write_apb_ab_memory_slow(struct target *target,
+static int cortex_a_write_cpu_memory_slow(struct target *target,
        uint32_t size, uint32_t count, const uint8_t *buffer, uint32_t *dscr)
 {
        /* Writes count objects of size size from *buffer. Old value of DSCR 
must
         * be in *dscr; updated to new value. This is slow because it works for
         * non-word-sized objects and (maybe) unaligned accesses. If size == 4 
and
-        * the address is aligned, cortex_a_write_apb_ab_memory_fast should be
+        * the address is aligned, cortex_a_write_cpu_memory_fast should be
         * preferred.
         * Preconditions:
         * - Address is in R0.
@@ -2198,7 +2198,7 @@ static int cortex_a_write_apb_ab_memory_slow(struct 
target *target,
        return ERROR_OK;
 }
 
-static int cortex_a_write_apb_ab_memory_fast(struct target *target,
+static int cortex_a_write_cpu_memory_fast(struct target *target,
        uint32_t count, const uint8_t *buffer, uint32_t *dscr)
 {
        /* Writes count objects of size 4 from *buffer. Old value of DSCR must 
be
@@ -2227,17 +2227,17 @@ static int cortex_a_write_apb_ab_memory_fast(struct 
target *target,
                        4, count, armv7a->debug_base + CPUDBG_DTRRX);
 }
 
-static int cortex_a_write_apb_ab_memory(struct target *target,
+static int cortex_a_write_cpu_memory(struct target *target,
        uint32_t address, uint32_t size,
        uint32_t count, const uint8_t *buffer)
 {
-       /* Write memory through APB-AP. */
+       /* Write memory through the CPU. */
        int retval, final_retval;
        struct armv7a_common *armv7a = target_to_armv7a(target);
        struct arm *arm = &armv7a->arm;
        uint32_t dscr, orig_dfar, orig_dfsr, fault_dscr, fault_dfar, fault_dfsr;
 
-       LOG_DEBUG("Writing APB-AP memory address 0x%" PRIx32 " size %"  PRIu32 
" count %"  PRIu32,
+       LOG_DEBUG("Writing CPU memory address 0x%" PRIx32 " size %"  PRIu32 " 
count %"  PRIu32,
                          address, size, count);
        if (target->state != TARGET_HALTED) {
                LOG_WARNING("target not halted");
@@ -2283,10 +2283,10 @@ static int cortex_a_write_apb_ab_memory(struct target 
*target,
 
        if (size == 4 && (address % 4) == 0) {
                /* We are doing a word-aligned transfer, so use fast mode. */
-               retval = cortex_a_write_apb_ab_memory_fast(target, count, 
buffer, &dscr);
+               retval = cortex_a_write_cpu_memory_fast(target, count, buffer, 
&dscr);
        } else {
                /* Use slow path. */
-               retval = cortex_a_write_apb_ab_memory_slow(target, size, count, 
buffer, &dscr);
+               retval = cortex_a_write_cpu_memory_slow(target, size, count, 
buffer, &dscr);
        }
 
 out:
@@ -2366,13 +2366,13 @@ out:
        return final_retval;
 }
 
-static int cortex_a_read_apb_ab_memory_slow(struct target *target,
+static int cortex_a_read_cpu_memory_slow(struct target *target,
        uint32_t size, uint32_t count, uint8_t *buffer, uint32_t *dscr)
 {
        /* Reads count objects of size size into *buffer. Old value of DSCR 
must be
         * in *dscr; updated to new value. This is slow because it works for
         * non-word-sized objects and (maybe) unaligned accesses. If size == 4 
and
-        * the address is aligned, cortex_a_read_apb_ab_memory_fast should be
+        * the address is aligned, cortex_a_read_cpu_memory_fast should be
         * preferred.
         * Preconditions:
         * - Address is in R0.
@@ -2442,7 +2442,7 @@ static int cortex_a_read_apb_ab_memory_slow(struct target 
*target,
        return ERROR_OK;
 }
 
-static int cortex_a_read_apb_ab_memory_fast(struct target *target,
+static int cortex_a_read_cpu_memory_fast(struct target *target,
        uint32_t count, uint8_t *buffer, uint32_t *dscr)
 {
        /* Reads count objects of size 4 into *buffer. Old value of DSCR must 
be in
@@ -2529,17 +2529,17 @@ static int cortex_a_read_apb_ab_memory_fast(struct 
target *target,
        return ERROR_OK;
 }
 
-static int cortex_a_read_apb_ab_memory(struct target *target,
+static int cortex_a_read_cpu_memory(struct target *target,
        uint32_t address, uint32_t size,
        uint32_t count, uint8_t *buffer)
 {
-       /* Read memory through APB-AP. */
+       /* Read memory through the CPU. */
        int retval, final_retval;
        struct armv7a_common *armv7a = target_to_armv7a(target);
        struct arm *arm = &armv7a->arm;
        uint32_t dscr, orig_dfar, orig_dfsr, fault_dscr, fault_dfar, fault_dfsr;
 
-       LOG_DEBUG("Reading APB-AP memory address 0x%" PRIx32 " size %"  PRIu32 
" count %"  PRIu32,
+       LOG_DEBUG("Reading CPU memory address 0x%" PRIx32 " size %"  PRIu32 " 
count %"  PRIu32,
                          address, size, count);
        if (target->state != TARGET_HALTED) {
                LOG_WARNING("target not halted");
@@ -2585,10 +2585,10 @@ static int cortex_a_read_apb_ab_memory(struct target 
*target,
 
        if (size == 4 && (address % 4) == 0) {
                /* We are doing a word-aligned transfer, so use fast mode. */
-               retval = cortex_a_read_apb_ab_memory_fast(target, count, 
buffer, &dscr);
+               retval = cortex_a_read_cpu_memory_fast(target, count, buffer, 
&dscr);
        } else {
                /* Use slow path. */
-               retval = cortex_a_read_apb_ab_memory_slow(target, size, count, 
buffer, &dscr);
+               retval = cortex_a_read_cpu_memory_slow(target, size, count, 
buffer, &dscr);
        }
 
 out:
@@ -2674,9 +2674,9 @@ static int cortex_a_read_phys_memory(struct target 
*target,
                address, size, count);
 
        if (count && buffer) {
-               /* read memory through APB-AP */
+               /* read memory through the CPU */
                cortex_a_prep_memaccess(target, 1);
-               retval = cortex_a_read_apb_ab_memory(target, address, size, 
count, buffer);
+               retval = cortex_a_read_cpu_memory(target, address, size, count, 
buffer);
                cortex_a_post_memaccess(target, 1);
        }
        return retval;
@@ -2692,7 +2692,7 @@ static int cortex_a_read_memory(struct target *target, 
uint32_t address,
                size, count);
 
        cortex_a_prep_memaccess(target, 0);
-       retval = cortex_a_read_apb_ab_memory(target, address, size, count, 
buffer);
+       retval = cortex_a_read_cpu_memory(target, address, size, count, buffer);
        cortex_a_post_memaccess(target, 0);
 
        return retval;
@@ -2751,9 +2751,9 @@ static int cortex_a_write_phys_memory(struct target 
*target,
                size, count);
 
        if (count && buffer) {
-               /* write memory through APB-AP */
+               /* write memory through the CPU */
                cortex_a_prep_memaccess(target, 1);
-               retval = cortex_a_write_apb_ab_memory(target, address, size, 
count, buffer);
+               retval = cortex_a_write_cpu_memory(target, address, size, 
count, buffer);
                cortex_a_post_memaccess(target, 1);
        }
 
@@ -2773,7 +2773,7 @@ static int cortex_a_write_memory(struct target *target, 
uint32_t address,
        armv7a_cache_auto_flush_on_write(target, address, size * count);
 
        cortex_a_prep_memaccess(target, 0);
-       retval = cortex_a_write_apb_ab_memory(target, address, size, count, 
buffer);
+       retval = cortex_a_write_cpu_memory(target, address, size, count, 
buffer);
        cortex_a_post_memaccess(target, 0);
        return retval;
 }
@@ -2941,7 +2941,7 @@ static int cortex_a_examine_first(struct target *target)
                return retval;
        }
 
-       /* Search for the APB-AB - it is needed for access to debug registers */
+       /* Search for the APB-AP - it is needed for access to debug registers */
        retval = dap_find_ap(swjdp, AP_TYPE_APB_AP, &armv7a->debug_ap);
        if (retval != ERROR_OK) {
                LOG_ERROR("Could not find APB-AP for debug access");
@@ -2966,10 +2966,10 @@ static int cortex_a_examine_first(struct target *target)
                if (retval == ERROR_OK)
                        armv7a->memory_ap_available = true;
                else
-                       LOG_WARNING("Could not initialize AHB-AP for memory 
access - using APB-AP");
+                       LOG_WARNING("Could not initialize AHB-AP for memory 
access - using CPU");
        } else {
-               /* AHB-AP not found - use APB-AP */
-               LOG_DEBUG("Could not find AHB-AP - using APB-AP for memory 
access");
+               /* AHB-AP not found - use the CPU */
+               LOG_DEBUG("Could not find AHB-AP - using CPU for memory 
access");
        }
 
        if (!target->dbgbase_set) {

-- 

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to