forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*******************************************************************************
23 This is the driver for the MAC 10/100 on-chip Ethernet controller
34 currently tested on all the ST boards based on STb7109 and stx7200 SoCs.
....@@ -9,17 +10,6 @@
910
1011 Copyright (C) 2007-2009 STMicroelectronics Ltd
1112
12
- This program is free software; you can redistribute it and/or modify it
13
- under the terms and conditions of the GNU General Public License,
14
- version 2, as published by the Free Software Foundation.
15
-
16
- This program is distributed in the hope it will be useful, but WITHOUT
17
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
19
- more details.
20
-
21
- The full GNU General Public License is included in this distribution in
22
- the file called "COPYING".
2313
2414 Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
2515 *******************************************************************************/
....@@ -41,18 +31,18 @@
4131
4232 static void dwmac100_dma_init_rx(void __iomem *ioaddr,
4333 struct stmmac_dma_cfg *dma_cfg,
44
- u32 dma_rx_phy, u32 chan)
34
+ dma_addr_t dma_rx_phy, u32 chan)
4535 {
4636 /* RX descriptor base addr lists must be written into DMA CSR3 */
47
- writel(dma_rx_phy, ioaddr + DMA_RCV_BASE_ADDR);
37
+ writel(lower_32_bits(dma_rx_phy), ioaddr + DMA_RCV_BASE_ADDR);
4838 }
4939
5040 static void dwmac100_dma_init_tx(void __iomem *ioaddr,
5141 struct stmmac_dma_cfg *dma_cfg,
52
- u32 dma_tx_phy, u32 chan)
42
+ dma_addr_t dma_tx_phy, u32 chan)
5343 {
5444 /* TX descriptor base addr lists must be written into DMA CSR4 */
55
- writel(dma_tx_phy, ioaddr + DMA_TX_BASE_ADDR);
45
+ writel(lower_32_bits(dma_tx_phy), ioaddr + DMA_TX_BASE_ADDR);
5646 }
5747
5848 /* Store and Forward capability is not used at all.