|
@@ -47,37 +47,37 @@ struct c_can_pci_data {
|
|
|
* registers can be aligned to a 16-bit boundary or 32-bit boundary etc.
|
|
|
* Handle the same by providing a common read/write interface.
|
|
|
*/
|
|
|
-static u16 c_can_pci_read_reg_aligned_to_16bit(struct c_can_priv *priv,
|
|
|
+static u16 c_can_pci_read_reg_aligned_to_16bit(const struct c_can_priv *priv,
|
|
|
enum reg index)
|
|
|
{
|
|
|
return readw(priv->base + priv->regs[index]);
|
|
|
}
|
|
|
|
|
|
-static void c_can_pci_write_reg_aligned_to_16bit(struct c_can_priv *priv,
|
|
|
+static void c_can_pci_write_reg_aligned_to_16bit(const struct c_can_priv *priv,
|
|
|
enum reg index, u16 val)
|
|
|
{
|
|
|
writew(val, priv->base + priv->regs[index]);
|
|
|
}
|
|
|
|
|
|
-static u16 c_can_pci_read_reg_aligned_to_32bit(struct c_can_priv *priv,
|
|
|
+static u16 c_can_pci_read_reg_aligned_to_32bit(const struct c_can_priv *priv,
|
|
|
enum reg index)
|
|
|
{
|
|
|
return readw(priv->base + 2 * priv->regs[index]);
|
|
|
}
|
|
|
|
|
|
-static void c_can_pci_write_reg_aligned_to_32bit(struct c_can_priv *priv,
|
|
|
+static void c_can_pci_write_reg_aligned_to_32bit(const struct c_can_priv *priv,
|
|
|
enum reg index, u16 val)
|
|
|
{
|
|
|
writew(val, priv->base + 2 * priv->regs[index]);
|
|
|
}
|
|
|
|
|
|
-static u16 c_can_pci_read_reg_32bit(struct c_can_priv *priv,
|
|
|
+static u16 c_can_pci_read_reg_32bit(const struct c_can_priv *priv,
|
|
|
enum reg index)
|
|
|
{
|
|
|
return (u16)ioread32(priv->base + 2 * priv->regs[index]);
|
|
|
}
|
|
|
|
|
|
-static void c_can_pci_write_reg_32bit(struct c_can_priv *priv,
|
|
|
+static void c_can_pci_write_reg_32bit(const struct c_can_priv *priv,
|
|
|
enum reg index, u16 val)
|
|
|
{
|
|
|
iowrite32((u32)val, priv->base + 2 * priv->regs[index]);
|