/*
 * check if a CAN controller is present at the specified location
 */
static inline int pcan_channel_present(struct sja1000_priv *priv)
{
	/* make sure SJA1000 is in reset mode */
	pcan_write_canreg(priv, REG_MOD, 1);
	pcan_write_canreg(priv, REG_CDR, CDR_PELICAN);

	/* read reset-values */
	if (pcan_read_canreg(priv, REG_CDR) == CDR_PELICAN)
		return 1;

	return 0;
}
static inline int pcan_channel_present(struct sja1000_priv *priv)
{
	
	pcan_write_canreg(priv, REG_MOD, 1);
	pcan_write_canreg(priv, REG_CDR, CDR_PELICAN);

	
	if (pcan_read_canreg(priv, REG_CDR) == CDR_PELICAN)
		return 1;

	return 0;
}