Changeset 71d09d6e in mainline


Ignore:
Timestamp:
2012-10-15T20:18:05Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f5ffc9a
Parents:
a5a73c0
Message:

rootamdm37x: Turn on pio tracing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/infrastructure/rootamdm37x/rootamdm37x.c

    ra5a73c0 r71d09d6e  
    6464} amdm37x_t;
    6565
     66#ifdef DEBUG_CM
     67static void log(volatile void *place, uint32_t val, volatile void* base, size_t size, void *data, bool write)
     68{
     69        printf("PIO %s: %p(%p) %#"PRIx32"\n", write ? "WRITE" : "READ",
     70            (place - base) + data, place, val);
     71}
     72#endif
     73
    6674static int amdm37x_hw_access_init(amdm37x_t *device)
    6775{
     
    94102                return ret;
    95103
     104#ifdef DEBUG_CM
     105        pio_trace_enable(device->tll, AMDM37x_USBTLL_SIZE, log, (void*)AMDM37x_USBTLL_BASE_ADDRESS);
     106        pio_trace_enable(device->cm.clocks, CLOCK_CONTROL_CM_SIZE, log, (void*)CLOCK_CONTROL_CM_BASE_ADDRESS);
     107        pio_trace_enable(device->cm.core, CORE_CM_SIZE, log, (void*)CORE_CM_BASE_ADDRESS);
     108        pio_trace_enable(device->cm.usbhost, USBHOST_CM_SIZE, log, (void*)USBHOST_CM_BASE_ADDRESS);
     109        pio_trace_enable(device->uhh, AMDM37x_UHH_SIZE, log, (void*)AMDM37x_UHH_BASE_ADDRESS);
     110#endif
    96111        return EOK;
    97112}
     
    116131
    117132#ifdef DEBUG_CM
    118         printf("DPLL5 could be on: %x %x.\n",
    119             device->cm.clocks->idlest_ckgen, device->cm.clocks->idlest2_ckgen);
     133        printf("DPLL5 could be on: %"PRIx32" %"PRIx32".\n",
     134            pio_read_32((ioport32_t*)&device->cm.clocks->idlest_ckgen),
     135            pio_read_32((ioport32_t*)&device->cm.clocks->idlest2_ckgen));
    120136#endif
    121137
     
    134150                    USBHOST_CM_ICLKEN_EN_USBHOST, 5);
    135151#ifdef DEBUG_CM
    136         printf("DPLL5 (and everything else) should be on: %x %x.\n",
    137             device->cm.clocks->idlest_ckgen, device->cm.clocks->idlest2_ckgen);
     152        printf("DPLL5 (and everything else) should be on: %"PRIx32" %"PRIx32".\n",
     153            pio_read_32((ioport32_t*)&device->cm.clocks->idlest_ckgen),
     154            pio_read_32((ioport32_t*)&device->cm.clocks->idlest2_ckgen));
    138155#endif
    139156        } else {
Note: See TracChangeset for help on using the changeset viewer.