usb: renesas_usbhs: Use a specific flag instead of type for multi_clks
To remove the type of renesas_usbhs_driver_param in the future, this patch uses a specific flag "multi_clks". Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
ccc3264c24
commit
df9f2c278b
@@ -288,11 +288,7 @@ static void usbhsc_set_buswait(struct usbhs_priv *priv)
|
|||||||
|
|
||||||
static bool usbhsc_is_multi_clks(struct usbhs_priv *priv)
|
static bool usbhsc_is_multi_clks(struct usbhs_priv *priv)
|
||||||
{
|
{
|
||||||
if (priv->dparam.type == USBHS_TYPE_RCAR_GEN3 ||
|
return priv->dparam.multi_clks;
|
||||||
priv->dparam.type == USBHS_TYPE_RCAR_GEN3_WITH_PLL)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int usbhsc_clk_get(struct device *dev, struct usbhs_priv *priv)
|
static int usbhsc_clk_get(struct device *dev, struct usbhs_priv *priv)
|
||||||
@@ -544,6 +540,7 @@ static const struct usbhs_of_data rcar_gen3_data = {
|
|||||||
.param = {
|
.param = {
|
||||||
.type = USBHS_TYPE_RCAR_GEN3,
|
.type = USBHS_TYPE_RCAR_GEN3,
|
||||||
.has_usb_dmac = 1,
|
.has_usb_dmac = 1,
|
||||||
|
.multi_clks = 1,
|
||||||
.pipe_configs = usbhsc_new_pipe,
|
.pipe_configs = usbhsc_new_pipe,
|
||||||
.pipe_size = ARRAY_SIZE(usbhsc_new_pipe),
|
.pipe_size = ARRAY_SIZE(usbhsc_new_pipe),
|
||||||
}
|
}
|
||||||
@@ -554,6 +551,7 @@ static const struct usbhs_of_data rcar_gen3_with_pll_data = {
|
|||||||
.param = {
|
.param = {
|
||||||
.type = USBHS_TYPE_RCAR_GEN3_WITH_PLL,
|
.type = USBHS_TYPE_RCAR_GEN3_WITH_PLL,
|
||||||
.has_usb_dmac = 1,
|
.has_usb_dmac = 1,
|
||||||
|
.multi_clks = 1,
|
||||||
.pipe_configs = usbhsc_new_pipe,
|
.pipe_configs = usbhsc_new_pipe,
|
||||||
.pipe_size = ARRAY_SIZE(usbhsc_new_pipe),
|
.pipe_size = ARRAY_SIZE(usbhsc_new_pipe),
|
||||||
}
|
}
|
||||||
|
@@ -181,6 +181,7 @@ struct renesas_usbhs_driver_param {
|
|||||||
u32 has_cnen:1;
|
u32 has_cnen:1;
|
||||||
u32 cfifo_byte_addr:1; /* CFIFO is byte addressable */
|
u32 cfifo_byte_addr:1; /* CFIFO is byte addressable */
|
||||||
#define USBHS_USB_DMAC_XFER_SIZE 32 /* hardcode the xfer size */
|
#define USBHS_USB_DMAC_XFER_SIZE 32 /* hardcode the xfer size */
|
||||||
|
u32 multi_clks:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define USBHS_TYPE_RCAR_GEN2 1
|
#define USBHS_TYPE_RCAR_GEN2 1
|
||||||
|
Reference in New Issue
Block a user