diff options
author | John Youn <johnyoun@synopsys.com> | 2016-11-04 01:56:07 +0100 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-11-18 12:54:13 +0100 |
commit | e7839f99b7dab1d161e39391855788ef2bbfb106 (patch) | |
tree | eead8a076476838be98b2cf5ebb0589986d59363 /drivers/usb/dwc2/params.c | |
parent | usb: dwc2: Move gadget settings into core_params (diff) | |
download | linux-e7839f99b7dab1d161e39391855788ef2bbfb106.tar.xz linux-e7839f99b7dab1d161e39391855788ef2bbfb106.zip |
usb: dwc2: Rename the dma_enable parameter to host_dma
Rename it so that it is more consistent with the gadget dma parameter.
It only affects host-mode operation so prefix it with "host".
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc2/params.c')
-rw-r--r-- | drivers/usb/dwc2/params.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index c96ae72f4f0e..08b00ca04e6b 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c @@ -41,7 +41,7 @@ static const struct dwc2_core_params params_hi6220 = { .otg_cap = 2, /* No HNP/SRP capable */ .otg_ver = 0, /* 1.3 */ - .dma_enable = 1, + .host_dma = 1, .dma_desc_enable = 0, .dma_desc_fs_enable = 0, .speed = 0, /* High Speed */ @@ -73,7 +73,7 @@ static const struct dwc2_core_params params_hi6220 = { static const struct dwc2_core_params params_bcm2835 = { .otg_cap = 0, /* HNP/SRP capable */ .otg_ver = 0, /* 1.3 */ - .dma_enable = 1, + .host_dma = 1, .dma_desc_enable = 0, .dma_desc_fs_enable = 0, .speed = 0, /* High Speed */ @@ -104,7 +104,7 @@ static const struct dwc2_core_params params_bcm2835 = { static const struct dwc2_core_params params_rk3066 = { .otg_cap = 2, /* non-HNP/non-SRP */ .otg_ver = -1, - .dma_enable = -1, + .host_dma = -1, .dma_desc_enable = 0, .dma_desc_fs_enable = 0, .speed = -1, @@ -136,7 +136,7 @@ static const struct dwc2_core_params params_rk3066 = { static const struct dwc2_core_params params_ltq = { .otg_cap = 2, /* non-HNP/non-SRP */ .otg_ver = -1, - .dma_enable = -1, + .host_dma = -1, .dma_desc_enable = -1, .dma_desc_fs_enable = -1, .speed = -1, @@ -168,7 +168,7 @@ static const struct dwc2_core_params params_ltq = { static const struct dwc2_core_params params_amlogic = { .otg_cap = DWC2_CAP_PARAM_NO_HNP_SRP_CAPABLE, .otg_ver = -1, - .dma_enable = 1, + .host_dma = 1, .dma_desc_enable = 0, .dma_desc_fs_enable = 0, .speed = DWC2_SPEED_PARAM_HIGH, @@ -200,7 +200,7 @@ static const struct dwc2_core_params params_amlogic = { static const struct dwc2_core_params params_default = { .otg_cap = -1, .otg_ver = -1, - .dma_enable = -1, + .host_dma = -1, /* * Disable descriptor dma mode by default as the HW can support @@ -486,7 +486,7 @@ static void dwc2_set_param_otg_cap(struct dwc2_hsotg *hsotg, int val) hsotg->params.otg_cap = val; } -static void dwc2_set_param_dma_enable(struct dwc2_hsotg *hsotg, int val) +static void dwc2_set_param_host_dma(struct dwc2_hsotg *hsotg, int val) { int valid = 1; @@ -498,20 +498,20 @@ static void dwc2_set_param_dma_enable(struct dwc2_hsotg *hsotg, int val) if (!valid) { if (val >= 0) dev_err(hsotg->dev, - "%d invalid for dma_enable parameter. Check HW configuration.\n", + "%d invalid for host_dma parameter. Check HW configuration.\n", val); val = hsotg->hw_params.arch != GHWCFG2_SLAVE_ONLY_ARCH; - dev_dbg(hsotg->dev, "Setting dma_enable to %d\n", val); + dev_dbg(hsotg->dev, "Setting host_dma to %d\n", val); } - hsotg->params.dma_enable = val; + hsotg->params.host_dma = val; } static void dwc2_set_param_dma_desc_enable(struct dwc2_hsotg *hsotg, int val) { int valid = 1; - if (val > 0 && (hsotg->params.dma_enable <= 0 || + if (val > 0 && (hsotg->params.host_dma <= 0 || !hsotg->hw_params.dma_desc_enable)) valid = 0; if (val < 0) @@ -522,7 +522,7 @@ static void dwc2_set_param_dma_desc_enable(struct dwc2_hsotg *hsotg, int val) dev_err(hsotg->dev, "%d invalid for dma_desc_enable parameter. Check HW configuration.\n", val); - val = (hsotg->params.dma_enable > 0 && + val = (hsotg->params.host_dma > 0 && hsotg->hw_params.dma_desc_enable); dev_dbg(hsotg->dev, "Setting dma_desc_enable to %d\n", val); } @@ -534,7 +534,7 @@ static void dwc2_set_param_dma_desc_fs_enable(struct dwc2_hsotg *hsotg, int val) { int valid = 1; - if (val > 0 && (hsotg->params.dma_enable <= 0 || + if (val > 0 && (hsotg->params.host_dma <= 0 || !hsotg->hw_params.dma_desc_enable)) valid = 0; if (val < 0) @@ -545,7 +545,7 @@ static void dwc2_set_param_dma_desc_fs_enable(struct dwc2_hsotg *hsotg, int val) dev_err(hsotg->dev, "%d invalid for dma_desc_fs_enable parameter. Check HW configuration.\n", val); - val = (hsotg->params.dma_enable > 0 && + val = (hsotg->params.host_dma > 0 && hsotg->hw_params.dma_desc_enable); } @@ -1126,7 +1126,7 @@ static void dwc2_set_parameters(struct dwc2_hsotg *hsotg, struct dwc2_core_params *p = &hsotg->params; dwc2_set_param_otg_cap(hsotg, params->otg_cap); - dwc2_set_param_dma_enable(hsotg, params->dma_enable); + dwc2_set_param_host_dma(hsotg, params->host_dma); dwc2_set_param_dma_desc_enable(hsotg, params->dma_desc_enable); dwc2_set_param_dma_desc_fs_enable(hsotg, params->dma_desc_fs_enable); dwc2_set_param_host_support_fs_ls_low_power(hsotg, |