|
@@ -367,7 +367,7 @@ static int hsc_rx_set(struct hsi_client *cl, struct hsc_rx_config *rxc)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
tmp = cl->rx_cfg;
|
|
tmp = cl->rx_cfg;
|
|
cl->rx_cfg.mode = rxc->mode;
|
|
cl->rx_cfg.mode = rxc->mode;
|
|
- cl->rx_cfg.channels = rxc->channels;
|
|
|
|
|
|
+ cl->rx_cfg.num_hw_channels = rxc->channels;
|
|
cl->rx_cfg.flow = rxc->flow;
|
|
cl->rx_cfg.flow = rxc->flow;
|
|
ret = hsi_setup(cl);
|
|
ret = hsi_setup(cl);
|
|
if (ret < 0) {
|
|
if (ret < 0) {
|
|
@@ -383,7 +383,7 @@ static int hsc_rx_set(struct hsi_client *cl, struct hsc_rx_config *rxc)
|
|
static inline void hsc_rx_get(struct hsi_client *cl, struct hsc_rx_config *rxc)
|
|
static inline void hsc_rx_get(struct hsi_client *cl, struct hsc_rx_config *rxc)
|
|
{
|
|
{
|
|
rxc->mode = cl->rx_cfg.mode;
|
|
rxc->mode = cl->rx_cfg.mode;
|
|
- rxc->channels = cl->rx_cfg.channels;
|
|
|
|
|
|
+ rxc->channels = cl->rx_cfg.num_hw_channels;
|
|
rxc->flow = cl->rx_cfg.flow;
|
|
rxc->flow = cl->rx_cfg.flow;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -402,7 +402,7 @@ static int hsc_tx_set(struct hsi_client *cl, struct hsc_tx_config *txc)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
tmp = cl->tx_cfg;
|
|
tmp = cl->tx_cfg;
|
|
cl->tx_cfg.mode = txc->mode;
|
|
cl->tx_cfg.mode = txc->mode;
|
|
- cl->tx_cfg.channels = txc->channels;
|
|
|
|
|
|
+ cl->tx_cfg.num_hw_channels = txc->channels;
|
|
cl->tx_cfg.speed = txc->speed;
|
|
cl->tx_cfg.speed = txc->speed;
|
|
cl->tx_cfg.arb_mode = txc->arb_mode;
|
|
cl->tx_cfg.arb_mode = txc->arb_mode;
|
|
ret = hsi_setup(cl);
|
|
ret = hsi_setup(cl);
|
|
@@ -417,7 +417,7 @@ static int hsc_tx_set(struct hsi_client *cl, struct hsc_tx_config *txc)
|
|
static inline void hsc_tx_get(struct hsi_client *cl, struct hsc_tx_config *txc)
|
|
static inline void hsc_tx_get(struct hsi_client *cl, struct hsc_tx_config *txc)
|
|
{
|
|
{
|
|
txc->mode = cl->tx_cfg.mode;
|
|
txc->mode = cl->tx_cfg.mode;
|
|
- txc->channels = cl->tx_cfg.channels;
|
|
|
|
|
|
+ txc->channels = cl->tx_cfg.num_hw_channels;
|
|
txc->speed = cl->tx_cfg.speed;
|
|
txc->speed = cl->tx_cfg.speed;
|
|
txc->arb_mode = cl->tx_cfg.arb_mode;
|
|
txc->arb_mode = cl->tx_cfg.arb_mode;
|
|
}
|
|
}
|
|
@@ -435,7 +435,7 @@ static ssize_t hsc_read(struct file *file, char __user *buf, size_t len,
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
if (len > max_data_size)
|
|
if (len > max_data_size)
|
|
len = max_data_size;
|
|
len = max_data_size;
|
|
- if (channel->ch >= channel->cl->rx_cfg.channels)
|
|
|
|
|
|
+ if (channel->ch >= channel->cl->rx_cfg.num_hw_channels)
|
|
return -ECHRNG;
|
|
return -ECHRNG;
|
|
if (test_and_set_bit(HSC_CH_READ, &channel->flags))
|
|
if (test_and_set_bit(HSC_CH_READ, &channel->flags))
|
|
return -EBUSY;
|
|
return -EBUSY;
|
|
@@ -492,7 +492,7 @@ static ssize_t hsc_write(struct file *file, const char __user *buf, size_t len,
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
if (len > max_data_size)
|
|
if (len > max_data_size)
|
|
len = max_data_size;
|
|
len = max_data_size;
|
|
- if (channel->ch >= channel->cl->tx_cfg.channels)
|
|
|
|
|
|
+ if (channel->ch >= channel->cl->tx_cfg.num_hw_channels)
|
|
return -ECHRNG;
|
|
return -ECHRNG;
|
|
if (test_and_set_bit(HSC_CH_WRITE, &channel->flags))
|
|
if (test_and_set_bit(HSC_CH_WRITE, &channel->flags))
|
|
return -EBUSY;
|
|
return -EBUSY;
|