mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-01-28 03:37:17 +01:00
realtek: ethernet: provide soc family in register config
The ethernet driver currently determines the family from the soc_info structure. To avoid the dependency add the family to the local register structure. Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de> Link: https://github.com/openwrt/openwrt/pull/21183 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
20a25b9ffa
commit
bbafac0816
2 changed files with 5 additions and 0 deletions
|
|
@ -448,6 +448,7 @@ static irqreturn_t rtl93xx_net_irq(int irq, void *dev_id)
|
|||
}
|
||||
|
||||
static const struct rtl838x_eth_reg rtl838x_reg = {
|
||||
.family_id = RTL8380_FAMILY_ID,
|
||||
.net_irq = rtl83xx_net_irq,
|
||||
.mac_port_ctrl = rtl838x_mac_port_ctrl,
|
||||
.dma_if_intr_sts = RTL838X_DMA_IF_INTR_STS,
|
||||
|
|
@ -473,6 +474,7 @@ static const struct rtl838x_eth_reg rtl838x_reg = {
|
|||
};
|
||||
|
||||
static const struct rtl838x_eth_reg rtl839x_reg = {
|
||||
.family_id = RTL8390_FAMILY_ID,
|
||||
.net_irq = rtl83xx_net_irq,
|
||||
.mac_port_ctrl = rtl839x_mac_port_ctrl,
|
||||
.dma_if_intr_sts = RTL839X_DMA_IF_INTR_STS,
|
||||
|
|
@ -498,6 +500,7 @@ static const struct rtl838x_eth_reg rtl839x_reg = {
|
|||
};
|
||||
|
||||
static const struct rtl838x_eth_reg rtl930x_reg = {
|
||||
.family_id = RTL9300_FAMILY_ID,
|
||||
.net_irq = rtl93xx_net_irq,
|
||||
.mac_port_ctrl = rtl930x_mac_port_ctrl,
|
||||
.dma_if_intr_rx_runout_sts = RTL930X_DMA_IF_INTR_RX_RUNOUT_STS,
|
||||
|
|
@ -529,6 +532,7 @@ static const struct rtl838x_eth_reg rtl930x_reg = {
|
|||
};
|
||||
|
||||
static const struct rtl838x_eth_reg rtl931x_reg = {
|
||||
.family_id = RTL9310_FAMILY_ID,
|
||||
.net_irq = rtl93xx_net_irq,
|
||||
.mac_port_ctrl = rtl931x_mac_port_ctrl,
|
||||
.dma_if_intr_rx_runout_sts = RTL931X_DMA_IF_INTR_RX_RUNOUT_STS,
|
||||
|
|
|
|||
|
|
@ -436,6 +436,7 @@ struct p_hdr;
|
|||
struct dsa_tag;
|
||||
|
||||
struct rtl838x_eth_reg {
|
||||
int family_id;
|
||||
irqreturn_t (*net_irq)(int irq, void *dev_id);
|
||||
int (*mac_port_ctrl)(int port);
|
||||
int dma_if_intr_sts;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue