* [PATCH 1/2] net: lantiq_xrx200: Hardcode the burst length value
@ 2021-10-26 20:59 Aleksander Jan Bajkowski
2021-10-26 20:59 ` [PATCH 2/2] dt-bindings: net: lantiq-xrx200-net: Remove the burst length properties Aleksander Jan Bajkowski
2021-10-29 11:30 ` [PATCH 1/2] net: lantiq_xrx200: Hardcode the burst length value patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Aleksander Jan Bajkowski @ 2021-10-26 20:59 UTC (permalink / raw)
To: hauke, davem, kuba, robh+dt, netdev, linux-kernel, devicetree
Cc: Aleksander Jan Bajkowski
All SoCs with this IP core support 8 burst length. Hauke
suggested to hardcode this value and simplify the driver.
Link: https://lkml.org/lkml/2021/9/14/1533
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
---
drivers/net/ethernet/lantiq_xrx200.c | 21 ++++-----------------
1 file changed, 4 insertions(+), 17 deletions(-)
diff --git a/drivers/net/ethernet/lantiq_xrx200.c b/drivers/net/ethernet/lantiq_xrx200.c
index ecf1e11d9b91..0da09ea81980 100644
--- a/drivers/net/ethernet/lantiq_xrx200.c
+++ b/drivers/net/ethernet/lantiq_xrx200.c
@@ -25,6 +25,7 @@
#define XRX200_DMA_DATA_LEN (SZ_64K - 1)
#define XRX200_DMA_RX 0
#define XRX200_DMA_TX 1
+#define XRX200_DMA_BURST_LEN 8
/* cpu port mac */
#define PMAC_RX_IPG 0x0024
@@ -73,9 +74,6 @@ struct xrx200_priv {
struct net_device *net_dev;
struct device *dev;
- int tx_burst_len;
- int rx_burst_len;
-
__iomem void *pmac_reg;
};
@@ -323,7 +321,7 @@ static netdev_tx_t xrx200_start_xmit(struct sk_buff *skb,
goto err_drop;
/* dma needs to start on a burst length value aligned address */
- byte_offset = mapping % (priv->tx_burst_len * 4);
+ byte_offset = mapping % (XRX200_DMA_BURST_LEN * 4);
desc->addr = mapping - byte_offset;
/* Make sure the address is written before we give it to HW */
@@ -422,7 +420,8 @@ static int xrx200_dma_init(struct xrx200_priv *priv)
int ret = 0;
int i;
- ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, rx_burst_len);
+ ltq_dma_init_port(DMA_PORT_ETOP, XRX200_DMA_BURST_LEN,
+ XRX200_DMA_BURST_LEN);
ch_rx->dma.nr = XRX200_DMA_RX;
ch_rx->dma.dev = priv->dev;
@@ -531,18 +530,6 @@ static int xrx200_probe(struct platform_device *pdev)
if (err)
eth_hw_addr_random(net_dev);
- err = device_property_read_u32(dev, "lantiq,tx-burst-length", &priv->tx_burst_len);
- if (err < 0) {
- dev_err(dev, "unable to read tx-burst-length property\n");
- return err;
- }
-
- err = device_property_read_u32(dev, "lantiq,rx-burst-length", &priv->rx_burst_len);
- if (err < 0) {
- dev_err(dev, "unable to read rx-burst-length property\n");
- return err;
- }
-
/* bring up the dma engine and IP core */
err = xrx200_dma_init(priv);
if (err)
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] dt-bindings: net: lantiq-xrx200-net: Remove the burst length properties
2021-10-26 20:59 [PATCH 1/2] net: lantiq_xrx200: Hardcode the burst length value Aleksander Jan Bajkowski
@ 2021-10-26 20:59 ` Aleksander Jan Bajkowski
2021-10-29 11:30 ` [PATCH 1/2] net: lantiq_xrx200: Hardcode the burst length value patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Aleksander Jan Bajkowski @ 2021-10-26 20:59 UTC (permalink / raw)
To: hauke, davem, kuba, robh+dt, netdev, linux-kernel, devicetree
Cc: Aleksander Jan Bajkowski
All SoCs with this IP core support 8 burst length. Hauke
suggested to hardcode this value and simplify the driver.
Link: https://lkml.org/lkml/2021/9/14/1533
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
---
.../bindings/net/lantiq,xrx200-net.yaml | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/lantiq,xrx200-net.yaml b/Documentation/devicetree/bindings/net/lantiq,xrx200-net.yaml
index 16d831f22063..7bc074a42369 100644
--- a/Documentation/devicetree/bindings/net/lantiq,xrx200-net.yaml
+++ b/Documentation/devicetree/bindings/net/lantiq,xrx200-net.yaml
@@ -29,18 +29,6 @@ properties:
- const: tx
- const: rx
- lantiq,tx-burst-length:
- $ref: /schemas/types.yaml#/definitions/uint32
- description: |
- TX programmable burst length.
- enum: [2, 4, 8]
-
- lantiq,rx-burst-length:
- $ref: /schemas/types.yaml#/definitions/uint32
- description: |
- RX programmable burst length.
- enum: [2, 4, 8]
-
'#address-cells':
const: 1
@@ -53,8 +41,6 @@ required:
- interrupt-parent
- interrupts
- interrupt-names
- - lantiq,tx-burst-length
- - lantiq,rx-burst-length
- "#address-cells"
- "#size-cells"
@@ -70,6 +56,4 @@ examples:
interrupt-parent = <&icu0>;
interrupts = <73>, <72>;
interrupt-names = "tx", "rx";
- lantiq,tx-burst-length = <8>;
- lantiq,rx-burst-length = <8>;
};
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] net: lantiq_xrx200: Hardcode the burst length value
2021-10-26 20:59 [PATCH 1/2] net: lantiq_xrx200: Hardcode the burst length value Aleksander Jan Bajkowski
2021-10-26 20:59 ` [PATCH 2/2] dt-bindings: net: lantiq-xrx200-net: Remove the burst length properties Aleksander Jan Bajkowski
@ 2021-10-29 11:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-10-29 11:30 UTC (permalink / raw)
To: Aleksander Jan Bajkowski
Cc: hauke, davem, kuba, robh+dt, netdev, linux-kernel, devicetree
Hello:
This series was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:
On Tue, 26 Oct 2021 22:59:01 +0200 you wrote:
> All SoCs with this IP core support 8 burst length. Hauke
> suggested to hardcode this value and simplify the driver.
>
> Link: https://lkml.org/lkml/2021/9/14/1533
> Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
> ---
> drivers/net/ethernet/lantiq_xrx200.c | 21 ++++-----------------
> 1 file changed, 4 insertions(+), 17 deletions(-)
Here is the summary with links:
- [1/2] net: lantiq_xrx200: Hardcode the burst length value
https://git.kernel.org/netdev/net-next/c/7e553c44f09a
- [2/2] dt-bindings: net: lantiq-xrx200-net: Remove the burst length properties
https://git.kernel.org/netdev/net-next/c/0b3f86397fee
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-29 11:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-26 20:59 [PATCH 1/2] net: lantiq_xrx200: Hardcode the burst length value Aleksander Jan Bajkowski
2021-10-26 20:59 ` [PATCH 2/2] dt-bindings: net: lantiq-xrx200-net: Remove the burst length properties Aleksander Jan Bajkowski
2021-10-29 11:30 ` [PATCH 1/2] net: lantiq_xrx200: Hardcode the burst length value patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox