Update to use 64-bit timer when available

This commit is contained in:
Gregory Nutt
2016-01-21 11:54:26 -06:00
parent cb7bbdfed4
commit f348e68069
41 changed files with 182 additions and 165 deletions
+6 -6
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* drivers/mmcsd/mmcsd_sdio.c
*
* Copyright (C) 2009-2013 Gregory Nutt. All rights reserved.
* Copyright (C) 2009-2013, 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -1120,10 +1120,10 @@ static int mmcsd_eventwait(FAR struct mmcsd_state_s *priv,
static int mmcsd_transferready(FAR struct mmcsd_state_s *priv)
{
uint32_t starttime;
uint32_t elapsed;
systime_t starttime;
systime_t elapsed;
uint32_t r1;
int ret;
int ret;
/* First, check if the card has been removed. */
@@ -2714,9 +2714,9 @@ static int mmcsd_sdinitialize(FAR struct mmcsd_state_s *priv)
static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv)
{
uint32_t response;
uint32_t start;
uint32_t elapsed;
uint32_t sdcapacity = MMCSD_ACMD41_STDCAPACITY;
systime_t start;
systime_t elapsed;
int ret;
/* Assume failure to identify the card */
+9 -9
View File
@@ -443,8 +443,8 @@ static int mmcsd_waitready(FAR struct mmcsd_slot_s *slot)
{
FAR struct spi_dev_s *spi = slot->spi;
uint8_t response;
uint32_t start;
uint32_t elapsed;
systime_t start;
systime_t elapsed;
/* Wait until the card is no longer busy (up to 500MS) */
@@ -548,8 +548,8 @@ static uint32_t mmcsd_sendcmd(FAR struct mmcsd_slot_s *slot,
case MMCSD_CMDRESP_R1B:
{
uint32_t busy = 0;
uint32_t start;
uint32_t elapsed;
systime_t start;
systime_t elapsed;
start = START_TIME;
do
@@ -963,9 +963,9 @@ static int mmcsd_recvblock(FAR struct mmcsd_slot_s *slot, uint8_t *buffer,
int nbytes)
{
FAR struct spi_dev_s *spi = slot->spi;
uint32_t start;
uint32_t elapsed;
uint8_t token;
systime_t start;
systime_t elapsed;
uint8_t token;
/* Wait up to the maximum to receive a valid data token. taccess is the
* time from when the command is sent until the first byte of data is
@@ -1579,8 +1579,8 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot)
FAR struct spi_dev_s *spi = slot->spi;
uint8_t csd[16];
uint32_t result = MMCSD_SPIR1_IDLESTATE;
uint32_t start;
uint32_t elapsed;
systime_t start;
systime_t elapsed;
int i;
int j;