mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
Rename kmemalign to kmm_memalign for consitency with other naming
This commit is contained in:
@@ -294,7 +294,7 @@ config LPC31_EHCI_PREALLOCATE
|
|||||||
---help---
|
---help---
|
||||||
Select this option to pre-allocate EHCI queue and descriptor
|
Select this option to pre-allocate EHCI queue and descriptor
|
||||||
structure pools in .bss. Otherwise, these pools will be
|
structure pools in .bss. Otherwise, these pools will be
|
||||||
dynamically allocated using kmemalign().
|
dynamically allocated using kmm_memalign().
|
||||||
|
|
||||||
config LPC31_EHCI_REGDEBUG
|
config LPC31_EHCI_REGDEBUG
|
||||||
bool "Enable low-level EHCI register debug"
|
bool "Enable low-level EHCI register debug"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* arch/arm/src/lpc31xx/lpc31_ehci.c
|
* arch/arm/src/lpc31xx/lpc31_ehci.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2013-2014 Gregory Nutt. All rights reserved.
|
||||||
* Authors: Gregory Nutt <gnutt@nuttx.org>
|
* Authors: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -4254,7 +4254,7 @@ FAR struct usbhost_connection_s *lpc31_ehci_initialize(int controller)
|
|||||||
/* Allocate a pool of free Queue Head (QH) structures */
|
/* Allocate a pool of free Queue Head (QH) structures */
|
||||||
|
|
||||||
g_qhpool = (struct lpc31_qh_s *)
|
g_qhpool = (struct lpc31_qh_s *)
|
||||||
kmemalign(32, CONFIG_LPC31_EHCI_NQHS * sizeof(struct lpc31_qh_s));
|
kmm_memalign(32, CONFIG_LPC31_EHCI_NQHS * sizeof(struct lpc31_qh_s));
|
||||||
if (!g_qhpool)
|
if (!g_qhpool)
|
||||||
{
|
{
|
||||||
usbhost_trace1(EHCI_TRACE1_QHPOOLALLOC_FAILED, 0);
|
usbhost_trace1(EHCI_TRACE1_QHPOOLALLOC_FAILED, 0);
|
||||||
@@ -4275,7 +4275,7 @@ FAR struct usbhost_connection_s *lpc31_ehci_initialize(int controller)
|
|||||||
/* Allocate a pool of free Transfer Descriptor (qTD) structures */
|
/* Allocate a pool of free Transfer Descriptor (qTD) structures */
|
||||||
|
|
||||||
g_qtdpool = (struct lpc31_qtd_s *)
|
g_qtdpool = (struct lpc31_qtd_s *)
|
||||||
kmemalign(32, CONFIG_LPC31_EHCI_NQTDS * sizeof(struct lpc31_qtd_s));
|
kmm_memalign(32, CONFIG_LPC31_EHCI_NQTDS * sizeof(struct lpc31_qtd_s));
|
||||||
if (!g_qtdpool)
|
if (!g_qtdpool)
|
||||||
{
|
{
|
||||||
usbhost_trace1(EHCI_TRACE1_QTDPOOLALLOC_FAILED, 0);
|
usbhost_trace1(EHCI_TRACE1_QTDPOOLALLOC_FAILED, 0);
|
||||||
@@ -4288,7 +4288,7 @@ FAR struct usbhost_connection_s *lpc31_ehci_initialize(int controller)
|
|||||||
/* Allocate the periodic framelist */
|
/* Allocate the periodic framelist */
|
||||||
|
|
||||||
g_framelist = (uint32_t *)
|
g_framelist = (uint32_t *)
|
||||||
kmemalign(4096, FRAME_LIST_SIZE * sizeof(uint32_t));
|
kmm_memalign(4096, FRAME_LIST_SIZE * sizeof(uint32_t));
|
||||||
if (!g_framelist)
|
if (!g_framelist)
|
||||||
{
|
{
|
||||||
usbhost_trace1(EHCI_TRACE1_PERFLALLOC_FAILED, 0);
|
usbhost_trace1(EHCI_TRACE1_PERFLALLOC_FAILED, 0);
|
||||||
|
|||||||
@@ -588,7 +588,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv)
|
|||||||
/* Allocate buffers */
|
/* Allocate buffers */
|
||||||
|
|
||||||
allocsize = CONFIG_SAM34_EMAC_NTXBUFFERS * sizeof(struct emac_txdesc_s);
|
allocsize = CONFIG_SAM34_EMAC_NTXBUFFERS * sizeof(struct emac_txdesc_s);
|
||||||
priv->txdesc = (struct emac_txdesc_s *)kmemalign(8, allocsize);
|
priv->txdesc = (struct emac_txdesc_s *)kmm_memalign(8, allocsize);
|
||||||
if (!priv->txdesc)
|
if (!priv->txdesc)
|
||||||
{
|
{
|
||||||
nlldbg("ERROR: Failed to allocate TX descriptors\n");
|
nlldbg("ERROR: Failed to allocate TX descriptors\n");
|
||||||
@@ -598,7 +598,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv)
|
|||||||
memset(priv->txdesc, 0, allocsize);
|
memset(priv->txdesc, 0, allocsize);
|
||||||
|
|
||||||
allocsize = CONFIG_SAM34_EMAC_NRXBUFFERS * sizeof(struct emac_rxdesc_s);
|
allocsize = CONFIG_SAM34_EMAC_NRXBUFFERS * sizeof(struct emac_rxdesc_s);
|
||||||
priv->rxdesc = (struct emac_rxdesc_s *)kmemalign(8, allocsize);
|
priv->rxdesc = (struct emac_rxdesc_s *)kmm_memalign(8, allocsize);
|
||||||
if (!priv->rxdesc)
|
if (!priv->rxdesc)
|
||||||
{
|
{
|
||||||
nlldbg("ERROR: Failed to allocate RX descriptors\n");
|
nlldbg("ERROR: Failed to allocate RX descriptors\n");
|
||||||
@@ -609,7 +609,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv)
|
|||||||
memset(priv->rxdesc, 0, allocsize);
|
memset(priv->rxdesc, 0, allocsize);
|
||||||
|
|
||||||
allocsize = CONFIG_SAM34_EMAC_NTXBUFFERS * EMAC_TX_UNITSIZE;
|
allocsize = CONFIG_SAM34_EMAC_NTXBUFFERS * EMAC_TX_UNITSIZE;
|
||||||
priv->txbuffer = (uint8_t *)kmemalign(8, allocsize);
|
priv->txbuffer = (uint8_t *)kmm_memalign(8, allocsize);
|
||||||
if (!priv->txbuffer)
|
if (!priv->txbuffer)
|
||||||
{
|
{
|
||||||
nlldbg("ERROR: Failed to allocate TX buffer\n");
|
nlldbg("ERROR: Failed to allocate TX buffer\n");
|
||||||
@@ -618,7 +618,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
allocsize = CONFIG_SAM34_EMAC_NRXBUFFERS * EMAC_RX_UNITSIZE;
|
allocsize = CONFIG_SAM34_EMAC_NRXBUFFERS * EMAC_RX_UNITSIZE;
|
||||||
priv->rxbuffer = (uint8_t *)kmemalign(8, allocsize);
|
priv->rxbuffer = (uint8_t *)kmm_memalign(8, allocsize);
|
||||||
if (!priv->rxbuffer)
|
if (!priv->rxbuffer)
|
||||||
{
|
{
|
||||||
nlldbg("ERROR: Failed to allocate RX buffer\n");
|
nlldbg("ERROR: Failed to allocate RX buffer\n");
|
||||||
|
|||||||
@@ -2684,7 +2684,7 @@ config SAMA5_EHCI_PREALLOCATE
|
|||||||
---help---
|
---help---
|
||||||
Select this option to pre-allocate EHCI queue and descriptor
|
Select this option to pre-allocate EHCI queue and descriptor
|
||||||
structure pools in .bss. Otherwise, these pools will be
|
structure pools in .bss. Otherwise, these pools will be
|
||||||
dynamically allocated using kmemalign().
|
dynamically allocated using kmm_memalign().
|
||||||
|
|
||||||
config SAMA5_EHCI_REGDEBUG
|
config SAMA5_EHCI_REGDEBUG
|
||||||
bool "Enable low-level EHCI register debug"
|
bool "Enable low-level EHCI register debug"
|
||||||
|
|||||||
@@ -4152,7 +4152,7 @@ FAR struct usbhost_connection_s *sam_ehci_initialize(int controller)
|
|||||||
/* Allocate a pool of free Queue Head (QH) structures */
|
/* Allocate a pool of free Queue Head (QH) structures */
|
||||||
|
|
||||||
g_qhpool = (struct sam_qh_s *)
|
g_qhpool = (struct sam_qh_s *)
|
||||||
kmemalign(32, CONFIG_SAMA5_EHCI_NQHS * sizeof(struct sam_qh_s));
|
kmm_memalign(32, CONFIG_SAMA5_EHCI_NQHS * sizeof(struct sam_qh_s));
|
||||||
if (!g_qhpool)
|
if (!g_qhpool)
|
||||||
{
|
{
|
||||||
usbhost_trace1(EHCI_TRACE1_QHPOOLALLOC_FAILED, 0);
|
usbhost_trace1(EHCI_TRACE1_QHPOOLALLOC_FAILED, 0);
|
||||||
@@ -4173,7 +4173,7 @@ FAR struct usbhost_connection_s *sam_ehci_initialize(int controller)
|
|||||||
/* Allocate a pool of free Transfer Descriptor (qTD) structures */
|
/* Allocate a pool of free Transfer Descriptor (qTD) structures */
|
||||||
|
|
||||||
g_qtdpool = (struct sam_qtd_s *)
|
g_qtdpool = (struct sam_qtd_s *)
|
||||||
kmemalign(32, CONFIG_SAMA5_EHCI_NQTDS * sizeof(struct sam_qtd_s));
|
kmm_memalign(32, CONFIG_SAMA5_EHCI_NQTDS * sizeof(struct sam_qtd_s));
|
||||||
if (!g_qtdpool)
|
if (!g_qtdpool)
|
||||||
{
|
{
|
||||||
usbhost_trace1(EHCI_TRACE1_QTDPOOLALLOC_FAILED, 0);
|
usbhost_trace1(EHCI_TRACE1_QTDPOOLALLOC_FAILED, 0);
|
||||||
@@ -4186,7 +4186,7 @@ FAR struct usbhost_connection_s *sam_ehci_initialize(int controller)
|
|||||||
/* Allocate the periodic framelist */
|
/* Allocate the periodic framelist */
|
||||||
|
|
||||||
g_framelist = (uint32_t *)
|
g_framelist = (uint32_t *)
|
||||||
kmemalign(4096, FRAME_LIST_SIZE * sizeof(uint32_t));
|
kmm_memalign(4096, FRAME_LIST_SIZE * sizeof(uint32_t));
|
||||||
if (!g_framelist)
|
if (!g_framelist)
|
||||||
{
|
{
|
||||||
usbhost_trace1(EHCI_TRACE1_PERFLALLOC_FAILED, 0);
|
usbhost_trace1(EHCI_TRACE1_PERFLALLOC_FAILED, 0);
|
||||||
|
|||||||
@@ -593,7 +593,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv)
|
|||||||
/* Allocate buffers */
|
/* Allocate buffers */
|
||||||
|
|
||||||
allocsize = CONFIG_SAMA5_EMAC_NTXBUFFERS * sizeof(struct emac_txdesc_s);
|
allocsize = CONFIG_SAMA5_EMAC_NTXBUFFERS * sizeof(struct emac_txdesc_s);
|
||||||
priv->txdesc = (struct emac_txdesc_s *)kmemalign(8, allocsize);
|
priv->txdesc = (struct emac_txdesc_s *)kmm_memalign(8, allocsize);
|
||||||
if (!priv->txdesc)
|
if (!priv->txdesc)
|
||||||
{
|
{
|
||||||
nlldbg("ERROR: Failed to allocate TX descriptors\n");
|
nlldbg("ERROR: Failed to allocate TX descriptors\n");
|
||||||
@@ -603,7 +603,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv)
|
|||||||
memset(priv->txdesc, 0, allocsize);
|
memset(priv->txdesc, 0, allocsize);
|
||||||
|
|
||||||
allocsize = CONFIG_SAMA5_EMAC_NRXBUFFERS * sizeof(struct emac_rxdesc_s);
|
allocsize = CONFIG_SAMA5_EMAC_NRXBUFFERS * sizeof(struct emac_rxdesc_s);
|
||||||
priv->rxdesc = (struct emac_rxdesc_s *)kmemalign(8, allocsize);
|
priv->rxdesc = (struct emac_rxdesc_s *)kmm_memalign(8, allocsize);
|
||||||
if (!priv->rxdesc)
|
if (!priv->rxdesc)
|
||||||
{
|
{
|
||||||
nlldbg("ERROR: Failed to allocate RX descriptors\n");
|
nlldbg("ERROR: Failed to allocate RX descriptors\n");
|
||||||
@@ -614,7 +614,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv)
|
|||||||
memset(priv->rxdesc, 0, allocsize);
|
memset(priv->rxdesc, 0, allocsize);
|
||||||
|
|
||||||
allocsize = CONFIG_SAMA5_EMAC_NTXBUFFERS * EMAC_TX_UNITSIZE;
|
allocsize = CONFIG_SAMA5_EMAC_NTXBUFFERS * EMAC_TX_UNITSIZE;
|
||||||
priv->txbuffer = (uint8_t *)kmemalign(8, allocsize);
|
priv->txbuffer = (uint8_t *)kmm_memalign(8, allocsize);
|
||||||
if (!priv->txbuffer)
|
if (!priv->txbuffer)
|
||||||
{
|
{
|
||||||
nlldbg("ERROR: Failed to allocate TX buffer\n");
|
nlldbg("ERROR: Failed to allocate TX buffer\n");
|
||||||
@@ -623,7 +623,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
allocsize = CONFIG_SAMA5_EMAC_NRXBUFFERS * EMAC_RX_UNITSIZE;
|
allocsize = CONFIG_SAMA5_EMAC_NRXBUFFERS * EMAC_RX_UNITSIZE;
|
||||||
priv->rxbuffer = (uint8_t *)kmemalign(8, allocsize);
|
priv->rxbuffer = (uint8_t *)kmm_memalign(8, allocsize);
|
||||||
if (!priv->rxbuffer)
|
if (!priv->rxbuffer)
|
||||||
{
|
{
|
||||||
nlldbg("ERROR: Failed to allocate RX buffer\n");
|
nlldbg("ERROR: Failed to allocate RX buffer\n");
|
||||||
|
|||||||
@@ -920,7 +920,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv)
|
|||||||
/* Allocate buffers */
|
/* Allocate buffers */
|
||||||
|
|
||||||
allocsize = priv->attr->ntxbuffers * sizeof(struct emac_txdesc_s);
|
allocsize = priv->attr->ntxbuffers * sizeof(struct emac_txdesc_s);
|
||||||
priv->txdesc = (struct emac_txdesc_s *)kmemalign(8, allocsize);
|
priv->txdesc = (struct emac_txdesc_s *)kmm_memalign(8, allocsize);
|
||||||
if (!priv->txdesc)
|
if (!priv->txdesc)
|
||||||
{
|
{
|
||||||
nlldbg("ERROR: Failed to allocate TX descriptors\n");
|
nlldbg("ERROR: Failed to allocate TX descriptors\n");
|
||||||
@@ -930,7 +930,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv)
|
|||||||
memset(priv->txdesc, 0, allocsize);
|
memset(priv->txdesc, 0, allocsize);
|
||||||
|
|
||||||
allocsize = priv->attr->nrxbuffers * sizeof(struct emac_rxdesc_s);
|
allocsize = priv->attr->nrxbuffers * sizeof(struct emac_rxdesc_s);
|
||||||
priv->rxdesc = (struct emac_rxdesc_s *)kmemalign(8, allocsize);
|
priv->rxdesc = (struct emac_rxdesc_s *)kmm_memalign(8, allocsize);
|
||||||
if (!priv->rxdesc)
|
if (!priv->rxdesc)
|
||||||
{
|
{
|
||||||
nlldbg("ERROR: Failed to allocate RX descriptors\n");
|
nlldbg("ERROR: Failed to allocate RX descriptors\n");
|
||||||
@@ -941,7 +941,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv)
|
|||||||
memset(priv->rxdesc, 0, allocsize);
|
memset(priv->rxdesc, 0, allocsize);
|
||||||
|
|
||||||
allocsize = priv->attr->ntxbuffers * EMAC_TX_UNITSIZE;
|
allocsize = priv->attr->ntxbuffers * EMAC_TX_UNITSIZE;
|
||||||
priv->txbuffer = (uint8_t *)kmemalign(8, allocsize);
|
priv->txbuffer = (uint8_t *)kmm_memalign(8, allocsize);
|
||||||
if (!priv->txbuffer)
|
if (!priv->txbuffer)
|
||||||
{
|
{
|
||||||
nlldbg("ERROR: Failed to allocate TX buffer\n");
|
nlldbg("ERROR: Failed to allocate TX buffer\n");
|
||||||
@@ -950,7 +950,7 @@ static int sam_buffer_initialize(struct sam_emac_s *priv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
allocsize = priv->attr->nrxbuffers * EMAC_RX_UNITSIZE;
|
allocsize = priv->attr->nrxbuffers * EMAC_RX_UNITSIZE;
|
||||||
priv->rxbuffer = (uint8_t *)kmemalign(8, allocsize);
|
priv->rxbuffer = (uint8_t *)kmm_memalign(8, allocsize);
|
||||||
if (!priv->rxbuffer)
|
if (!priv->rxbuffer)
|
||||||
{
|
{
|
||||||
nlldbg("ERROR: Failed to allocate RX buffer\n");
|
nlldbg("ERROR: Failed to allocate RX buffer\n");
|
||||||
|
|||||||
@@ -524,7 +524,7 @@ static int sam_buffer_initialize(struct sam_gmac_s *priv)
|
|||||||
/* Allocate buffers */
|
/* Allocate buffers */
|
||||||
|
|
||||||
allocsize = CONFIG_SAMA5_GMAC_NTXBUFFERS * sizeof(struct gmac_txdesc_s);
|
allocsize = CONFIG_SAMA5_GMAC_NTXBUFFERS * sizeof(struct gmac_txdesc_s);
|
||||||
priv->txdesc = (struct gmac_txdesc_s *)kmemalign(8, allocsize);
|
priv->txdesc = (struct gmac_txdesc_s *)kmm_memalign(8, allocsize);
|
||||||
if (!priv->txdesc)
|
if (!priv->txdesc)
|
||||||
{
|
{
|
||||||
nlldbg("ERROR: Failed to allocate TX descriptors\n");
|
nlldbg("ERROR: Failed to allocate TX descriptors\n");
|
||||||
@@ -534,7 +534,7 @@ static int sam_buffer_initialize(struct sam_gmac_s *priv)
|
|||||||
memset(priv->txdesc, 0, allocsize);
|
memset(priv->txdesc, 0, allocsize);
|
||||||
|
|
||||||
allocsize = CONFIG_SAMA5_GMAC_NRXBUFFERS * sizeof(struct gmac_rxdesc_s);
|
allocsize = CONFIG_SAMA5_GMAC_NRXBUFFERS * sizeof(struct gmac_rxdesc_s);
|
||||||
priv->rxdesc = (struct gmac_rxdesc_s *)kmemalign(8, allocsize);
|
priv->rxdesc = (struct gmac_rxdesc_s *)kmm_memalign(8, allocsize);
|
||||||
if (!priv->rxdesc)
|
if (!priv->rxdesc)
|
||||||
{
|
{
|
||||||
nlldbg("ERROR: Failed to allocate RX descriptors\n");
|
nlldbg("ERROR: Failed to allocate RX descriptors\n");
|
||||||
@@ -545,7 +545,7 @@ static int sam_buffer_initialize(struct sam_gmac_s *priv)
|
|||||||
memset(priv->rxdesc, 0, allocsize);
|
memset(priv->rxdesc, 0, allocsize);
|
||||||
|
|
||||||
allocsize = CONFIG_SAMA5_GMAC_NTXBUFFERS * GMAC_TX_UNITSIZE;
|
allocsize = CONFIG_SAMA5_GMAC_NTXBUFFERS * GMAC_TX_UNITSIZE;
|
||||||
priv->txbuffer = (uint8_t *)kmemalign(8, allocsize);
|
priv->txbuffer = (uint8_t *)kmm_memalign(8, allocsize);
|
||||||
if (!priv->txbuffer)
|
if (!priv->txbuffer)
|
||||||
{
|
{
|
||||||
nlldbg("ERROR: Failed to allocate TX buffer\n");
|
nlldbg("ERROR: Failed to allocate TX buffer\n");
|
||||||
@@ -554,7 +554,7 @@ static int sam_buffer_initialize(struct sam_gmac_s *priv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
allocsize = CONFIG_SAMA5_GMAC_NRXBUFFERS * GMAC_RX_UNITSIZE;
|
allocsize = CONFIG_SAMA5_GMAC_NRXBUFFERS * GMAC_RX_UNITSIZE;
|
||||||
priv->rxbuffer = (uint8_t *)kmemalign(8, allocsize);
|
priv->rxbuffer = (uint8_t *)kmm_memalign(8, allocsize);
|
||||||
if (!priv->rxbuffer)
|
if (!priv->rxbuffer)
|
||||||
{
|
{
|
||||||
nlldbg("ERROR: Failed to allocate RX buffer\n");
|
nlldbg("ERROR: Failed to allocate RX buffer\n");
|
||||||
|
|||||||
@@ -4291,7 +4291,7 @@ static void sam_sw_setup(struct sam_usbdev_s *priv)
|
|||||||
/* Allocate a pool of free DMA transfer descriptors */
|
/* Allocate a pool of free DMA transfer descriptors */
|
||||||
|
|
||||||
priv->dtdpool = (struct sam_dtd_s *)
|
priv->dtdpool = (struct sam_dtd_s *)
|
||||||
kmemalign(16, CONFIG_SAMA5_UDPHS_NDTDS * sizeof(struct sam_dtd_s));
|
kmm_memalign(16, CONFIG_SAMA5_UDPHS_NDTDS * sizeof(struct sam_dtd_s));
|
||||||
if (!priv->dtdpool)
|
if (!priv->dtdpool)
|
||||||
{
|
{
|
||||||
udbg("ERROR: Failed to allocate the DMA transfer descriptor pool\n");
|
udbg("ERROR: Failed to allocate the DMA transfer descriptor pool\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user