stmmac_platform.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*******************************************************************************
  2. Copyright (C) 2007-2009 STMicroelectronics Ltd
  3. This program is free software; you can redistribute it and/or modify it
  4. under the terms and conditions of the GNU General Public License,
  5. version 2, as published by the Free Software Foundation.
  6. This program is distributed in the hope it will be useful, but WITHOUT
  7. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  8. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  9. more details.
  10. The full GNU General Public License is included in this distribution in
  11. the file called "COPYING".
  12. Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
  13. *******************************************************************************/
  14. #ifndef __STMMAC_PLATFORM_H__
  15. #define __STMMAC_PLATFORM_H__
  16. #include "stmmac.h"
  17. struct plat_stmmacenet_data *
  18. stmmac_probe_config_dt(struct platform_device *pdev, const char **mac);
  19. void stmmac_remove_config_dt(struct platform_device *pdev,
  20. struct plat_stmmacenet_data *plat);
  21. int stmmac_get_platform_resources(struct platform_device *pdev,
  22. struct stmmac_resources *stmmac_res);
  23. int stmmac_pltfr_remove(struct platform_device *pdev);
  24. extern const struct dev_pm_ops stmmac_pltfr_pm_ops;
  25. static inline void *get_stmmac_bsp_priv(struct device *dev)
  26. {
  27. struct net_device *ndev = dev_get_drvdata(dev);
  28. struct stmmac_priv *priv = netdev_priv(ndev);
  29. return priv->plat->bsp_priv;
  30. }
  31. #endif /* __STMMAC_PLATFORM_H__ */