diff mbox series

[U-Boot,v4,02/34] musb: sunxi: Add proper macros instead of numericals

Message ID 1517927164-18197-3-git-send-email-jagan@amarulasolutions.com
State Deferred
Delegated to: Marek Vasut
Headers show
Series phy: sunxi: Add Allwinner sun4i USB PHY | expand

Commit Message

Jagan Teki Feb. 6, 2018, 2:25 p.m. UTC
- 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>
---
 drivers/usb/musb-new/sunxi.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index c77bde0..3f3b898 100644
--- a/drivers/usb/musb-new/sunxi.c
+++ b/drivers/usb/musb-new/sunxi.c
@@ -297,11 +297,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 = {