Commit 0e68ed8f authored by Philipp Hortmann's avatar Philipp Hortmann Committed by Greg Kroah-Hartman

staging: vt6655: Create one function for two macros

Create function vt6655_mac_set_bits with two parameters to cover
functionality of two macros.
Signed-off-by: default avatarPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/78883f42b2df258dbf821d7f7515a82932a157f1.1659892670.git.philipp.g.hortmann@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6d9f3d12
......@@ -216,15 +216,20 @@ static void vt6655_mac_dma_ctl(void __iomem *iobase, u8 reg_index)
iowrite32(DMACTL_RUN, iobase + reg_index);
}
static void MACvEnableProtectMD(void __iomem *iobase)
static void vt6655_mac_set_bits(void __iomem *iobase, u32 mask)
{
u32 reg_value;
reg_value = ioread32(iobase + MAC_REG_ENCFG);
reg_value = reg_value | ENCFG_PROTECTMD;
reg_value = reg_value | mask;
iowrite32(reg_value, iobase + MAC_REG_ENCFG);
}
static void MACvEnableProtectMD(void __iomem *iobase)
{
vt6655_mac_set_bits(iobase, ENCFG_PROTECTMD);
}
/*
* Initialisation of MAC & BBP registers
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment