Lines Matching refs:pldat
422 static void __lpc_set_mac(struct netdata_local *pldat, const u8 *mac) in __lpc_set_mac() argument
428 writel(tmp, LPC_ENET_SA2(pldat->net_base)); in __lpc_set_mac()
430 writel(tmp, LPC_ENET_SA1(pldat->net_base)); in __lpc_set_mac()
432 writel(tmp, LPC_ENET_SA0(pldat->net_base)); in __lpc_set_mac()
434 netdev_dbg(pldat->ndev, "Ethernet MAC address %pM\n", mac); in __lpc_set_mac()
437 static void __lpc_get_mac(struct netdata_local *pldat, u8 *mac) in __lpc_get_mac() argument
442 tmp = readl(LPC_ENET_SA2(pldat->net_base)); in __lpc_get_mac()
445 tmp = readl(LPC_ENET_SA1(pldat->net_base)); in __lpc_get_mac()
448 tmp = readl(LPC_ENET_SA0(pldat->net_base)); in __lpc_get_mac()
453 static void __lpc_params_setup(struct netdata_local *pldat) in __lpc_params_setup() argument
457 if (pldat->duplex == DUPLEX_FULL) { in __lpc_params_setup()
458 tmp = readl(LPC_ENET_MAC2(pldat->net_base)); in __lpc_params_setup()
460 writel(tmp, LPC_ENET_MAC2(pldat->net_base)); in __lpc_params_setup()
461 tmp = readl(LPC_ENET_COMMAND(pldat->net_base)); in __lpc_params_setup()
463 writel(tmp, LPC_ENET_COMMAND(pldat->net_base)); in __lpc_params_setup()
464 writel(LPC_IPGT_LOAD(0x15), LPC_ENET_IPGT(pldat->net_base)); in __lpc_params_setup()
466 tmp = readl(LPC_ENET_MAC2(pldat->net_base)); in __lpc_params_setup()
468 writel(tmp, LPC_ENET_MAC2(pldat->net_base)); in __lpc_params_setup()
469 tmp = readl(LPC_ENET_COMMAND(pldat->net_base)); in __lpc_params_setup()
471 writel(tmp, LPC_ENET_COMMAND(pldat->net_base)); in __lpc_params_setup()
472 writel(LPC_IPGT_LOAD(0x12), LPC_ENET_IPGT(pldat->net_base)); in __lpc_params_setup()
475 if (pldat->speed == SPEED_100) in __lpc_params_setup()
476 writel(LPC_SUPP_SPEED, LPC_ENET_SUPP(pldat->net_base)); in __lpc_params_setup()
478 writel(0, LPC_ENET_SUPP(pldat->net_base)); in __lpc_params_setup()
481 static void __lpc_eth_reset(struct netdata_local *pldat) in __lpc_eth_reset() argument
486 LPC_MAC1_SOFT_RESET), LPC_ENET_MAC1(pldat->net_base)); in __lpc_eth_reset()
488 LPC_COMMAND_RXRESET), LPC_ENET_COMMAND(pldat->net_base)); in __lpc_eth_reset()
491 static int __lpc_mii_mngt_reset(struct netdata_local *pldat) in __lpc_mii_mngt_reset() argument
494 writel(LPC_MCFG_RESET_MII_MGMT, LPC_ENET_MCFG(pldat->net_base)); in __lpc_mii_mngt_reset()
498 LPC_ENET_MCFG(pldat->net_base)); in __lpc_mii_mngt_reset()
503 static inline phys_addr_t __va_to_pa(void *addr, struct netdata_local *pldat) in __va_to_pa() argument
507 phaddr = addr - pldat->dma_buff_base_v; in __va_to_pa()
508 phaddr += pldat->dma_buff_base_p; in __va_to_pa()
525 static void __lpc_txrx_desc_setup(struct netdata_local *pldat) in __lpc_txrx_desc_setup() argument
533 tbuff = PTR_ALIGN(pldat->dma_buff_base_v, 16); in __lpc_txrx_desc_setup()
536 pldat->tx_desc_v = tbuff; in __lpc_txrx_desc_setup()
539 pldat->tx_stat_v = tbuff; in __lpc_txrx_desc_setup()
543 pldat->tx_buff_v = tbuff; in __lpc_txrx_desc_setup()
547 pldat->rx_desc_v = tbuff; in __lpc_txrx_desc_setup()
551 pldat->rx_stat_v = tbuff; in __lpc_txrx_desc_setup()
555 pldat->rx_buff_v = tbuff; in __lpc_txrx_desc_setup()
560 ptxstat = &pldat->tx_stat_v[i]; in __lpc_txrx_desc_setup()
561 ptxrxdesc = &pldat->tx_desc_v[i]; in __lpc_txrx_desc_setup()
564 pldat->tx_buff_v + i * ENET_MAXF_SIZE, pldat); in __lpc_txrx_desc_setup()
571 prxstat = &pldat->rx_stat_v[i]; in __lpc_txrx_desc_setup()
572 ptxrxdesc = &pldat->rx_desc_v[i]; in __lpc_txrx_desc_setup()
575 pldat->rx_buff_v + i * ENET_MAXF_SIZE, pldat); in __lpc_txrx_desc_setup()
585 LPC_ENET_TXDESCRIPTORNUMBER(pldat->net_base)); in __lpc_txrx_desc_setup()
586 writel(__va_to_pa(pldat->tx_desc_v, pldat), in __lpc_txrx_desc_setup()
587 LPC_ENET_TXDESCRIPTOR(pldat->net_base)); in __lpc_txrx_desc_setup()
588 writel(__va_to_pa(pldat->tx_stat_v, pldat), in __lpc_txrx_desc_setup()
589 LPC_ENET_TXSTATUS(pldat->net_base)); in __lpc_txrx_desc_setup()
591 LPC_ENET_RXDESCRIPTORNUMBER(pldat->net_base)); in __lpc_txrx_desc_setup()
592 writel(__va_to_pa(pldat->rx_desc_v, pldat), in __lpc_txrx_desc_setup()
593 LPC_ENET_RXDESCRIPTOR(pldat->net_base)); in __lpc_txrx_desc_setup()
594 writel(__va_to_pa(pldat->rx_stat_v, pldat), in __lpc_txrx_desc_setup()
595 LPC_ENET_RXSTATUS(pldat->net_base)); in __lpc_txrx_desc_setup()
598 static void __lpc_eth_init(struct netdata_local *pldat) in __lpc_eth_init() argument
603 tmp = readl(LPC_ENET_COMMAND(pldat->net_base)); in __lpc_eth_init()
605 writel(tmp, LPC_ENET_COMMAND(pldat->net_base)); in __lpc_eth_init()
606 tmp = readl(LPC_ENET_MAC1(pldat->net_base)); in __lpc_eth_init()
608 writel(tmp, LPC_ENET_MAC1(pldat->net_base)); in __lpc_eth_init()
611 writel(LPC_MAC1_PASS_ALL_RX_FRAMES, LPC_ENET_MAC1(pldat->net_base)); in __lpc_eth_init()
613 LPC_ENET_MAC2(pldat->net_base)); in __lpc_eth_init()
614 writel(ENET_MAXF_SIZE, LPC_ENET_MAXF(pldat->net_base)); in __lpc_eth_init()
619 LPC_ENET_CLRT(pldat->net_base)); in __lpc_eth_init()
620 writel(LPC_IPGR_LOAD_PART2(0x12), LPC_ENET_IPGR(pldat->net_base)); in __lpc_eth_init()
622 if (lpc_phy_interface_mode(&pldat->pdev->dev) == PHY_INTERFACE_MODE_MII) in __lpc_eth_init()
624 LPC_ENET_COMMAND(pldat->net_base)); in __lpc_eth_init()
627 LPC_ENET_COMMAND(pldat->net_base)); in __lpc_eth_init()
628 writel(LPC_SUPP_RESET_RMII, LPC_ENET_SUPP(pldat->net_base)); in __lpc_eth_init()
631 __lpc_params_setup(pldat); in __lpc_eth_init()
634 __lpc_txrx_desc_setup(pldat); in __lpc_eth_init()
638 LPC_ENET_RXFILTER_CTRL(pldat->net_base)); in __lpc_eth_init()
641 pldat->num_used_tx_buffs = 0; in __lpc_eth_init()
642 pldat->last_tx_idx = in __lpc_eth_init()
643 readl(LPC_ENET_TXCONSUMEINDEX(pldat->net_base)); in __lpc_eth_init()
646 writel(0xFFFF, LPC_ENET_INTCLEAR(pldat->net_base)); in __lpc_eth_init()
648 lpc_eth_enable_int(pldat->net_base); in __lpc_eth_init()
651 tmp = readl(LPC_ENET_COMMAND(pldat->net_base)); in __lpc_eth_init()
653 writel(tmp, LPC_ENET_COMMAND(pldat->net_base)); in __lpc_eth_init()
654 tmp = readl(LPC_ENET_MAC1(pldat->net_base)); in __lpc_eth_init()
656 writel(tmp, LPC_ENET_MAC1(pldat->net_base)); in __lpc_eth_init()
659 static void __lpc_eth_shutdown(struct netdata_local *pldat) in __lpc_eth_shutdown() argument
662 __lpc_eth_reset(pldat); in __lpc_eth_shutdown()
663 writel(0, LPC_ENET_MAC1(pldat->net_base)); in __lpc_eth_shutdown()
664 writel(0, LPC_ENET_MAC2(pldat->net_base)); in __lpc_eth_shutdown()
672 struct netdata_local *pldat = bus->priv; in lpc_mdio_read() local
676 writel(((phy_id << 8) | phyreg), LPC_ENET_MADR(pldat->net_base)); in lpc_mdio_read()
677 writel(LPC_MCMD_READ, LPC_ENET_MCMD(pldat->net_base)); in lpc_mdio_read()
680 while (readl(LPC_ENET_MIND(pldat->net_base)) & LPC_MIND_BUSY) { in lpc_mdio_read()
686 lps = readl(LPC_ENET_MRDD(pldat->net_base)); in lpc_mdio_read()
687 writel(0, LPC_ENET_MCMD(pldat->net_base)); in lpc_mdio_read()
695 struct netdata_local *pldat = bus->priv; in lpc_mdio_write() local
698 writel(((phy_id << 8) | phyreg), LPC_ENET_MADR(pldat->net_base)); in lpc_mdio_write()
699 writel(phydata, LPC_ENET_MWTD(pldat->net_base)); in lpc_mdio_write()
702 while (readl(LPC_ENET_MIND(pldat->net_base)) & LPC_MIND_BUSY) { in lpc_mdio_write()
718 struct netdata_local *pldat = netdev_priv(ndev); in lpc_handle_link_change() local
724 spin_lock_irqsave(&pldat->lock, flags); in lpc_handle_link_change()
727 if ((pldat->speed != phydev->speed) || in lpc_handle_link_change()
728 (pldat->duplex != phydev->duplex)) { in lpc_handle_link_change()
729 pldat->speed = phydev->speed; in lpc_handle_link_change()
730 pldat->duplex = phydev->duplex; in lpc_handle_link_change()
735 if (phydev->link != pldat->link) { in lpc_handle_link_change()
737 pldat->speed = 0; in lpc_handle_link_change()
738 pldat->duplex = -1; in lpc_handle_link_change()
740 pldat->link = phydev->link; in lpc_handle_link_change()
745 spin_unlock_irqrestore(&pldat->lock, flags); in lpc_handle_link_change()
748 __lpc_params_setup(pldat); in lpc_handle_link_change()
753 struct netdata_local *pldat = netdev_priv(ndev); in lpc_mii_probe() local
757 if (lpc_phy_interface_mode(&pldat->pdev->dev) == PHY_INTERFACE_MODE_MII) in lpc_mii_probe()
762 if (pldat->phy_node) in lpc_mii_probe()
763 phydev = of_phy_find_device(pldat->phy_node); in lpc_mii_probe()
765 phydev = phy_find_first(pldat->mii_bus); in lpc_mii_probe()
773 lpc_phy_interface_mode(&pldat->pdev->dev)); in lpc_mii_probe()
781 pldat->link = 0; in lpc_mii_probe()
782 pldat->speed = 0; in lpc_mii_probe()
783 pldat->duplex = -1; in lpc_mii_probe()
790 static int lpc_mii_init(struct netdata_local *pldat) in lpc_mii_init() argument
795 pldat->mii_bus = mdiobus_alloc(); in lpc_mii_init()
796 if (!pldat->mii_bus) { in lpc_mii_init()
802 if (lpc_phy_interface_mode(&pldat->pdev->dev) == PHY_INTERFACE_MODE_MII) in lpc_mii_init()
804 LPC_ENET_COMMAND(pldat->net_base)); in lpc_mii_init()
807 LPC_ENET_COMMAND(pldat->net_base)); in lpc_mii_init()
808 writel(LPC_SUPP_RESET_RMII, LPC_ENET_SUPP(pldat->net_base)); in lpc_mii_init()
811 pldat->mii_bus->name = "lpc_mii_bus"; in lpc_mii_init()
812 pldat->mii_bus->read = &lpc_mdio_read; in lpc_mii_init()
813 pldat->mii_bus->write = &lpc_mdio_write; in lpc_mii_init()
814 pldat->mii_bus->reset = &lpc_mdio_reset; in lpc_mii_init()
815 snprintf(pldat->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x", in lpc_mii_init()
816 pldat->pdev->name, pldat->pdev->id); in lpc_mii_init()
817 pldat->mii_bus->priv = pldat; in lpc_mii_init()
818 pldat->mii_bus->parent = &pldat->pdev->dev; in lpc_mii_init()
820 node = of_get_child_by_name(pldat->pdev->dev.of_node, "mdio"); in lpc_mii_init()
821 err = of_mdiobus_register(pldat->mii_bus, node); in lpc_mii_init()
826 err = lpc_mii_probe(pldat->ndev); in lpc_mii_init()
833 mdiobus_unregister(pldat->mii_bus); in lpc_mii_init()
834 mdiobus_free(pldat->mii_bus); in lpc_mii_init()
841 struct netdata_local *pldat = netdev_priv(ndev); in __lpc_handle_xmit() local
844 txcidx = readl(LPC_ENET_TXCONSUMEINDEX(pldat->net_base)); in __lpc_handle_xmit()
845 while (pldat->last_tx_idx != txcidx) { in __lpc_handle_xmit()
846 unsigned int skblen = pldat->skblen[pldat->last_tx_idx]; in __lpc_handle_xmit()
849 ptxstat = &pldat->tx_stat_v[pldat->last_tx_idx]; in __lpc_handle_xmit()
853 pldat->num_used_tx_buffs--; in __lpc_handle_xmit()
854 pldat->last_tx_idx++; in __lpc_handle_xmit()
855 if (pldat->last_tx_idx >= ENET_TX_DESC) in __lpc_handle_xmit()
856 pldat->last_tx_idx = 0; in __lpc_handle_xmit()
886 txcidx = readl(LPC_ENET_TXCONSUMEINDEX(pldat->net_base)); in __lpc_handle_xmit()
889 if (pldat->num_used_tx_buffs <= ENET_TX_DESC/2) { in __lpc_handle_xmit()
897 struct netdata_local *pldat = netdev_priv(ndev); in __lpc_handle_recv() local
904 rxconsidx = readl(LPC_ENET_RXCONSUMEINDEX(pldat->net_base)); in __lpc_handle_recv()
906 readl(LPC_ENET_RXPRODUCEINDEX(pldat->net_base))) { in __lpc_handle_recv()
908 prxstat = &pldat->rx_stat_v[rxconsidx]; in __lpc_handle_recv()
942 pldat->rx_buff_v + rxconsidx * ENET_MAXF_SIZE, in __lpc_handle_recv()
958 LPC_ENET_RXCONSUMEINDEX(pldat->net_base)); in __lpc_handle_recv()
967 struct netdata_local *pldat = container_of(napi, in lpc_eth_poll() local
969 struct net_device *ndev = pldat->ndev; in lpc_eth_poll()
980 lpc_eth_enable_int(pldat->net_base); in lpc_eth_poll()
989 struct netdata_local *pldat = netdev_priv(ndev); in __lpc_eth_interrupt() local
992 spin_lock(&pldat->lock); in __lpc_eth_interrupt()
994 tmp = readl(LPC_ENET_INTSTATUS(pldat->net_base)); in __lpc_eth_interrupt()
996 writel(tmp, LPC_ENET_INTCLEAR(pldat->net_base)); in __lpc_eth_interrupt()
998 lpc_eth_disable_int(pldat->net_base); in __lpc_eth_interrupt()
999 if (likely(napi_schedule_prep(&pldat->napi))) in __lpc_eth_interrupt()
1000 __napi_schedule(&pldat->napi); in __lpc_eth_interrupt()
1002 spin_unlock(&pldat->lock); in __lpc_eth_interrupt()
1010 struct netdata_local *pldat = netdev_priv(ndev); in lpc_eth_close() local
1012 if (netif_msg_ifdown(pldat)) in lpc_eth_close()
1013 dev_dbg(&pldat->pdev->dev, "shutting down %s\n", ndev->name); in lpc_eth_close()
1015 napi_disable(&pldat->napi); in lpc_eth_close()
1018 spin_lock_irqsave(&pldat->lock, flags); in lpc_eth_close()
1019 __lpc_eth_reset(pldat); in lpc_eth_close()
1021 writel(0, LPC_ENET_MAC1(pldat->net_base)); in lpc_eth_close()
1022 writel(0, LPC_ENET_MAC2(pldat->net_base)); in lpc_eth_close()
1023 spin_unlock_irqrestore(&pldat->lock, flags); in lpc_eth_close()
1027 clk_disable_unprepare(pldat->clk); in lpc_eth_close()
1035 struct netdata_local *pldat = netdev_priv(ndev); in lpc_eth_hard_start_xmit() local
1042 spin_lock_irq(&pldat->lock); in lpc_eth_hard_start_xmit()
1044 if (pldat->num_used_tx_buffs >= (ENET_TX_DESC - 1)) { in lpc_eth_hard_start_xmit()
1049 spin_unlock_irq(&pldat->lock); in lpc_eth_hard_start_xmit()
1055 txidx = readl(LPC_ENET_TXPRODUCEINDEX(pldat->net_base)); in lpc_eth_hard_start_xmit()
1058 ptxstat = &pldat->tx_stat_v[txidx]; in lpc_eth_hard_start_xmit()
1060 ptxrxdesc = &pldat->tx_desc_v[txidx]; in lpc_eth_hard_start_xmit()
1065 memcpy(pldat->tx_buff_v + txidx * ENET_MAXF_SIZE, skb->data, len); in lpc_eth_hard_start_xmit()
1068 pldat->skblen[txidx] = len; in lpc_eth_hard_start_xmit()
1069 pldat->num_used_tx_buffs++; in lpc_eth_hard_start_xmit()
1075 writel(txidx, LPC_ENET_TXPRODUCEINDEX(pldat->net_base)); in lpc_eth_hard_start_xmit()
1078 if (pldat->num_used_tx_buffs >= (ENET_TX_DESC - 1)) in lpc_eth_hard_start_xmit()
1081 spin_unlock_irq(&pldat->lock); in lpc_eth_hard_start_xmit()
1090 struct netdata_local *pldat = netdev_priv(ndev); in lpc_set_mac_address() local
1097 spin_lock_irqsave(&pldat->lock, flags); in lpc_set_mac_address()
1100 __lpc_set_mac(pldat, ndev->dev_addr); in lpc_set_mac_address()
1102 spin_unlock_irqrestore(&pldat->lock, flags); in lpc_set_mac_address()
1109 struct netdata_local *pldat = netdev_priv(ndev); in lpc_eth_set_multicast_list() local
1115 spin_lock_irqsave(&pldat->lock, flags); in lpc_eth_set_multicast_list()
1118 __lpc_set_mac(pldat, ndev->dev_addr); in lpc_eth_set_multicast_list()
1131 writel(tmp32, LPC_ENET_RXFILTER_CTRL(pldat->net_base)); in lpc_eth_set_multicast_list()
1148 writel(hashlo, LPC_ENET_HASHFILTERL(pldat->net_base)); in lpc_eth_set_multicast_list()
1149 writel(hashhi, LPC_ENET_HASHFILTERH(pldat->net_base)); in lpc_eth_set_multicast_list()
1151 spin_unlock_irqrestore(&pldat->lock, flags); in lpc_eth_set_multicast_list()
1156 struct netdata_local *pldat = netdev_priv(ndev); in lpc_eth_open() local
1159 if (netif_msg_ifup(pldat)) in lpc_eth_open()
1160 dev_dbg(&pldat->pdev->dev, "enabling %s\n", ndev->name); in lpc_eth_open()
1162 ret = clk_prepare_enable(pldat->clk); in lpc_eth_open()
1170 __lpc_eth_reset(pldat); in lpc_eth_open()
1171 __lpc_eth_init(pldat); in lpc_eth_open()
1176 napi_enable(&pldat->napi); in lpc_eth_open()
1195 struct netdata_local *pldat = netdev_priv(ndev); in lpc_eth_ethtool_getmsglevel() local
1197 return pldat->msg_enable; in lpc_eth_ethtool_getmsglevel()
1202 struct netdata_local *pldat = netdev_priv(ndev); in lpc_eth_ethtool_setmsglevel() local
1204 pldat->msg_enable = level; in lpc_eth_ethtool_setmsglevel()
1230 struct netdata_local *pldat; in lpc_eth_drv_probe() local
1259 pldat = netdev_priv(ndev); in lpc_eth_drv_probe()
1260 pldat->pdev = pdev; in lpc_eth_drv_probe()
1261 pldat->ndev = ndev; in lpc_eth_drv_probe()
1263 spin_lock_init(&pldat->lock); in lpc_eth_drv_probe()
1269 pldat->clk = clk_get(dev, NULL); in lpc_eth_drv_probe()
1270 if (IS_ERR(pldat->clk)) { in lpc_eth_drv_probe()
1272 ret = PTR_ERR(pldat->clk); in lpc_eth_drv_probe()
1277 ret = clk_prepare_enable(pldat->clk); in lpc_eth_drv_probe()
1282 pldat->net_base = ioremap(res->start, resource_size(res)); in lpc_eth_drv_probe()
1283 if (!pldat->net_base) { in lpc_eth_drv_probe()
1301 pldat->dma_buff_size = (ENET_TX_DESC + ENET_RX_DESC) * (ENET_MAXF_SIZE + in lpc_eth_drv_probe()
1305 if (pldat->dma_buff_size > in lpc_eth_drv_probe()
1306 lpc32xx_return_iram(&pldat->dma_buff_base_v, &dma_handle)) { in lpc_eth_drv_probe()
1307 pldat->dma_buff_base_v = NULL; in lpc_eth_drv_probe()
1308 pldat->dma_buff_size = 0; in lpc_eth_drv_probe()
1314 if (pldat->dma_buff_base_v == NULL) { in lpc_eth_drv_probe()
1319 pldat->dma_buff_size = PAGE_ALIGN(pldat->dma_buff_size); in lpc_eth_drv_probe()
1324 pldat->dma_buff_base_v = in lpc_eth_drv_probe()
1326 pldat->dma_buff_size, &dma_handle, in lpc_eth_drv_probe()
1328 if (pldat->dma_buff_base_v == NULL) { in lpc_eth_drv_probe()
1333 pldat->dma_buff_base_p = dma_handle; in lpc_eth_drv_probe()
1339 pldat->net_base); in lpc_eth_drv_probe()
1341 netdev_dbg(ndev, "DMA buffer size :%zd\n", pldat->dma_buff_size); in lpc_eth_drv_probe()
1343 &pldat->dma_buff_base_p); in lpc_eth_drv_probe()
1345 pldat->dma_buff_base_v); in lpc_eth_drv_probe()
1347 pldat->phy_node = of_parse_phandle(np, "phy-handle", 0); in lpc_eth_drv_probe()
1350 __lpc_get_mac(pldat, addr); in lpc_eth_drv_probe()
1360 __lpc_eth_shutdown(pldat); in lpc_eth_drv_probe()
1363 pldat->msg_enable = NETIF_MSG_LINK; in lpc_eth_drv_probe()
1366 __lpc_mii_mngt_reset(pldat); in lpc_eth_drv_probe()
1371 pldat->link = 0; in lpc_eth_drv_probe()
1372 pldat->speed = 100; in lpc_eth_drv_probe()
1373 pldat->duplex = DUPLEX_FULL; in lpc_eth_drv_probe()
1374 __lpc_params_setup(pldat); in lpc_eth_drv_probe()
1376 netif_napi_add_weight(ndev, &pldat->napi, lpc_eth_poll, NAPI_WEIGHT); in lpc_eth_drv_probe()
1385 ret = lpc_mii_init(pldat); in lpc_eth_drv_probe()
1401 pldat->dma_buff_size > lpc32xx_return_iram(NULL, NULL)) in lpc_eth_drv_probe()
1402 dma_free_coherent(dev, pldat->dma_buff_size, in lpc_eth_drv_probe()
1403 pldat->dma_buff_base_v, in lpc_eth_drv_probe()
1404 pldat->dma_buff_base_p); in lpc_eth_drv_probe()
1408 iounmap(pldat->net_base); in lpc_eth_drv_probe()
1410 clk_disable_unprepare(pldat->clk); in lpc_eth_drv_probe()
1412 clk_put(pldat->clk); in lpc_eth_drv_probe()
1423 struct netdata_local *pldat = netdev_priv(ndev); in lpc_eth_drv_remove() local
1427 if (!use_iram_for_net(&pldat->pdev->dev) || in lpc_eth_drv_remove()
1428 pldat->dma_buff_size > lpc32xx_return_iram(NULL, NULL)) in lpc_eth_drv_remove()
1429 dma_free_coherent(&pldat->pdev->dev, pldat->dma_buff_size, in lpc_eth_drv_remove()
1430 pldat->dma_buff_base_v, in lpc_eth_drv_remove()
1431 pldat->dma_buff_base_p); in lpc_eth_drv_remove()
1433 iounmap(pldat->net_base); in lpc_eth_drv_remove()
1434 mdiobus_unregister(pldat->mii_bus); in lpc_eth_drv_remove()
1435 mdiobus_free(pldat->mii_bus); in lpc_eth_drv_remove()
1436 clk_disable_unprepare(pldat->clk); in lpc_eth_drv_remove()
1437 clk_put(pldat->clk); in lpc_eth_drv_remove()
1448 struct netdata_local *pldat = netdev_priv(ndev); in lpc_eth_drv_suspend() local
1456 __lpc_eth_shutdown(pldat); in lpc_eth_drv_suspend()
1457 clk_disable_unprepare(pldat->clk); in lpc_eth_drv_suspend()
1463 __lpc_eth_reset(pldat); in lpc_eth_drv_suspend()
1473 struct netdata_local *pldat; in lpc_eth_drv_resume() local
1481 pldat = netdev_priv(ndev); in lpc_eth_drv_resume()
1484 ret = clk_enable(pldat->clk); in lpc_eth_drv_resume()
1489 __lpc_eth_reset(pldat); in lpc_eth_drv_resume()
1490 __lpc_eth_init(pldat); in lpc_eth_drv_resume()