fsl_corenet_serdes.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright 2009-2010 Freescale Semiconductor, Inc.
  3. *
  4. * Author: Roy Zang <tie-fei.zang@freescale.com>
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation; either version 2 of
  9. * the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  19. * MA 02111-1307 USA
  20. */
  21. #ifndef __FSL_CORENET_SERDES_H
  22. #define __FSL_CORENET_SERDES_H
  23. #define SRDS_MAX_LANES 18
  24. #define SRDS_MAX_BANK 3
  25. enum srds_bank {
  26. FSL_SRDS_BANK_1 = 0,
  27. FSL_SRDS_BANK_2 = 1,
  28. FSL_SRDS_BANK_3 = 2,
  29. };
  30. int is_serdes_prtcl_valid(u32 prtcl);
  31. int serdes_get_lane_idx(int lane);
  32. int serdes_get_bank_by_lane(int lane);
  33. int serdes_lane_enabled(int lane);
  34. enum srds_prtcl serdes_get_prtcl(int cfg, int lane);
  35. #ifdef CONFIG_SYS_P4080_ERRATUM_SERDES8
  36. extern uint16_t srds_lpd_b[SRDS_MAX_BANK];
  37. #endif
  38. #endif /* __FSL_CORENET_SERDES_H */