aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>2019-06-25 01:38:49 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-25 22:33:08 -0400
commitdf9f2c278b69fcd8b04c89612310f0036d21ec4c (patch)
tree1aadd370f5d3550ec3bff4eb0c1146f17c1b20c0
parentccc3264c2481c9bcbacfe935dc024aaab4423204 (diff)
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>
-rw-r--r--drivers/usb/renesas_usbhs/common.c8
-rw-r--r--include/linux/usb/renesas_usbhs.h1
2 files changed, 4 insertions, 5 deletions
diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index 739fe4b4c1d5..530e2eb7ab08 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -288,11 +288,7 @@ static void usbhsc_set_buswait(struct usbhs_priv *priv)
288 288
289static bool usbhsc_is_multi_clks(struct usbhs_priv *priv) 289static bool usbhsc_is_multi_clks(struct usbhs_priv *priv)
290{ 290{
291 if (priv->dparam.type == USBHS_TYPE_RCAR_GEN3 || 291 return priv->dparam.multi_clks;
292 priv->dparam.type == USBHS_TYPE_RCAR_GEN3_WITH_PLL)
293 return true;
294
295 return false;
296} 292}
297 293
298static int usbhsc_clk_get(struct device *dev, struct usbhs_priv *priv) 294static int usbhsc_clk_get(struct device *dev, struct usbhs_priv *priv)
@@ -544,6 +540,7 @@ static const struct usbhs_of_data rcar_gen3_data = {
544 .param = { 540 .param = {
545 .type = USBHS_TYPE_RCAR_GEN3, 541 .type = USBHS_TYPE_RCAR_GEN3,
546 .has_usb_dmac = 1, 542 .has_usb_dmac = 1,
543 .multi_clks = 1,
547 .pipe_configs = usbhsc_new_pipe, 544 .pipe_configs = usbhsc_new_pipe,
548 .pipe_size = ARRAY_SIZE(usbhsc_new_pipe), 545 .pipe_size = ARRAY_SIZE(usbhsc_new_pipe),
549 } 546 }
@@ -554,6 +551,7 @@ static const struct usbhs_of_data rcar_gen3_with_pll_data = {
554 .param = { 551 .param = {
555 .type = USBHS_TYPE_RCAR_GEN3_WITH_PLL, 552 .type = USBHS_TYPE_RCAR_GEN3_WITH_PLL,
556 .has_usb_dmac = 1, 553 .has_usb_dmac = 1,
554 .multi_clks = 1,
557 .pipe_configs = usbhsc_new_pipe, 555 .pipe_configs = usbhsc_new_pipe,
558 .pipe_size = ARRAY_SIZE(usbhsc_new_pipe), 556 .pipe_size = ARRAY_SIZE(usbhsc_new_pipe),
559 } 557 }
diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h
index ac601be95ec0..e249c217cad1 100644
--- a/include/linux/usb/renesas_usbhs.h
+++ b/include/linux/usb/renesas_usbhs.h
@@ -181,6 +181,7 @@ struct renesas_usbhs_driver_param {
181 u32 has_cnen:1; 181 u32 has_cnen:1;
182 u32 cfifo_byte_addr:1; /* CFIFO is byte addressable */ 182 u32 cfifo_byte_addr:1; /* CFIFO is byte addressable */
183#define USBHS_USB_DMAC_XFER_SIZE 32 /* hardcode the xfer size */ 183#define USBHS_USB_DMAC_XFER_SIZE 32 /* hardcode the xfer size */
184 u32 multi_clks:1;
184}; 185};
185 186
186#define USBHS_TYPE_RCAR_GEN2 1 187#define USBHS_TYPE_RCAR_GEN2 1