diff options
author | Tom Rini <trini@konsulko.com> | 2023-01-10 11:19:45 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-01-20 12:27:24 -0500 |
commit | 6e7df1d151a7a127caf3b62ff6dfc003fc2aefcd (patch) | |
tree | ae38e9dcf468b2e4e58293561fae87895d9b549f /drivers/net/ag7xxx.c | |
parent | ad242344681f6a0076a6bf100aa83ac9ecbea355 (diff) | |
download | u-boot-6e7df1d151a7a127caf3b62ff6dfc003fc2aefcd.zip u-boot-6e7df1d151a7a127caf3b62ff6dfc003fc2aefcd.tar.gz u-boot-6e7df1d151a7a127caf3b62ff6dfc003fc2aefcd.tar.bz2 |
global: Finish CONFIG -> CFG migration
At this point, the remaining places where we have a symbol that is
defined as CONFIG_... are in fairly odd locations. While as much dead
code has been removed as possible, some of these locations are simply
less obvious at first. In other cases, this code is used, but was
defined in such a way as to have been missed by earlier checks. Perform
a rename of all such remaining symbols to be CFG_... rather than
CONFIG_...
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/net/ag7xxx.c')
-rw-r--r-- | drivers/net/ag7xxx.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/net/ag7xxx.c b/drivers/net/ag7xxx.c index a16c998..da1f3f4 100644 --- a/drivers/net/ag7xxx.c +++ b/drivers/net/ag7xxx.c @@ -143,11 +143,11 @@ enum ag7xxx_model { #define AG7XXX_ETH_CFG_MII_GE0 BIT(1) #define AG7XXX_ETH_CFG_RGMII_GE0 BIT(0) -#define CONFIG_TX_DESCR_NUM 8 -#define CONFIG_RX_DESCR_NUM 8 -#define CONFIG_ETH_BUFSIZE 2048 -#define TX_TOTAL_BUFSIZE (CONFIG_ETH_BUFSIZE * CONFIG_TX_DESCR_NUM) -#define RX_TOTAL_BUFSIZE (CONFIG_ETH_BUFSIZE * CONFIG_RX_DESCR_NUM) +#define CFG_TX_DESCR_NUM 8 +#define CFG_RX_DESCR_NUM 8 +#define CFG_ETH_BUFSIZE 2048 +#define TX_TOTAL_BUFSIZE (CFG_ETH_BUFSIZE * CFG_TX_DESCR_NUM) +#define RX_TOTAL_BUFSIZE (CFG_ETH_BUFSIZE * CFG_RX_DESCR_NUM) /* DMA descriptor. */ struct ag7xxx_dma_desc { @@ -162,8 +162,8 @@ struct ag7xxx_dma_desc { }; struct ar7xxx_eth_priv { - struct ag7xxx_dma_desc tx_mac_descrtable[CONFIG_TX_DESCR_NUM]; - struct ag7xxx_dma_desc rx_mac_descrtable[CONFIG_RX_DESCR_NUM]; + struct ag7xxx_dma_desc tx_mac_descrtable[CFG_TX_DESCR_NUM]; + struct ag7xxx_dma_desc rx_mac_descrtable[CFG_RX_DESCR_NUM]; char txbuffs[TX_TOTAL_BUFSIZE] __aligned(ARCH_DMA_MINALIGN); char rxbuffs[RX_TOTAL_BUFSIZE] __aligned(ARCH_DMA_MINALIGN); @@ -408,11 +408,11 @@ static void ag7xxx_dma_clean_tx(struct udevice *dev) u32 start, end; int i; - for (i = 0; i < CONFIG_TX_DESCR_NUM; i++) { + for (i = 0; i < CFG_TX_DESCR_NUM; i++) { curr = &priv->tx_mac_descrtable[i]; - next = &priv->tx_mac_descrtable[(i + 1) % CONFIG_TX_DESCR_NUM]; + next = &priv->tx_mac_descrtable[(i + 1) % CFG_TX_DESCR_NUM]; - curr->data_addr = virt_to_phys(&priv->txbuffs[i * CONFIG_ETH_BUFSIZE]); + curr->data_addr = virt_to_phys(&priv->txbuffs[i * CFG_ETH_BUFSIZE]); curr->config = AG7XXX_DMADESC_IS_EMPTY; curr->next_desc = virt_to_phys(next); } @@ -432,11 +432,11 @@ static void ag7xxx_dma_clean_rx(struct udevice *dev) u32 start, end; int i; - for (i = 0; i < CONFIG_RX_DESCR_NUM; i++) { + for (i = 0; i < CFG_RX_DESCR_NUM; i++) { curr = &priv->rx_mac_descrtable[i]; - next = &priv->rx_mac_descrtable[(i + 1) % CONFIG_RX_DESCR_NUM]; + next = &priv->rx_mac_descrtable[(i + 1) % CFG_RX_DESCR_NUM]; - curr->data_addr = virt_to_phys(&priv->rxbuffs[i * CONFIG_ETH_BUFSIZE]); + curr->data_addr = virt_to_phys(&priv->rxbuffs[i * CFG_ETH_BUFSIZE]); curr->config = AG7XXX_DMADESC_IS_EMPTY; curr->next_desc = virt_to_phys(next); } @@ -492,7 +492,7 @@ static int ag7xxx_eth_send(struct udevice *dev, void *packet, int length) priv->regs + AG7XXX_ETH_DMA_TX_CTRL); /* Switch to next TX descriptor. */ - priv->tx_currdescnum = (priv->tx_currdescnum + 1) % CONFIG_TX_DESCR_NUM; + priv->tx_currdescnum = (priv->tx_currdescnum + 1) % CFG_TX_DESCR_NUM; return 0; } @@ -543,7 +543,7 @@ static int ag7xxx_eth_free_pkt(struct udevice *dev, uchar *packet, flush_dcache_range(start, end); /* Switch to next RX descriptor. */ - priv->rx_currdescnum = (priv->rx_currdescnum + 1) % CONFIG_RX_DESCR_NUM; + priv->rx_currdescnum = (priv->rx_currdescnum + 1) % CFG_RX_DESCR_NUM; return 0; } |