diff options
author | Jagan Teki <jagan@amarulasolutions.com> | 2018-05-07 13:03:18 +0530 |
---|---|---|
committer | Jagan Teki <jagan@amarulasolutions.com> | 2018-05-28 16:40:43 +0530 |
commit | ae8b78de30e923f4797da3edcf1f64f301782c2b (patch) | |
tree | 62d1bf12cf298a56501487e4bca73036478bb245 | |
parent | 831cc98b1f8cf81cf34185e34b2021e2766eb4d8 (diff) | |
download | u-boot-ae8b78de30e923f4797da3edcf1f64f301782c2b.tar.gz u-boot-ae8b78de30e923f4797da3edcf1f64f301782c2b.tar.xz u-boot-ae8b78de30e923f4797da3edcf1f64f301782c2b.zip |
musb: sunxi: Add proper macros instead of numericals
- add proper macros for musb_config members
- use bool 'true' for multipoint and dyn_fifo instead of numerical 1
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
-rw-r--r-- | drivers/usb/musb-new/sunxi.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c index ab902c6574..332ac16663 100644 --- a/drivers/usb/musb-new/sunxi.c +++ b/drivers/usb/musb-new/sunxi.c @@ -296,11 +296,15 @@ static const struct musb_platform_ops sunxi_musb_ops = { .disable = sunxi_musb_disable, }; +/* Allwinner OTG supports up to 5 endpoints */ +#define SUNXI_MUSB_MAX_EP_NUM 6 +#define SUNXI_MUSB_RAM_BITS 11 + static struct musb_hdrc_config musb_config = { - .multipoint = 1, - .dyn_fifo = 1, - .num_eps = 6, - .ram_bits = 11, + .multipoint = true, + .dyn_fifo = true, + .num_eps = SUNXI_MUSB_MAX_EP_NUM, + .ram_bits = SUNXI_MUSB_RAM_BITS, }; static struct musb_hdrc_platform_data musb_plat = { |