mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-14 17:07:38 +00:00
92693b5a4f
The regs_otg field in uintptr_t of the platform data structure for dwc2-otg has thus far been an unsigned int, but will eventually be casted into a void*. This raises the following error with GCC 6.3 and buildman: ../drivers/usb/gadget/dwc2_udc_otg.c: In function 'dwc2_udc_probe': ../drivers/usb/gadget/dwc2_udc_otg.c:821:8: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] reg = (struct dwc2_usbotg_reg *)pdata->regs_otg; ^ This changes regs_otg to a uintptr_t to ensure that it is large enough to hold any valid pointer (and fix the associated warning). Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
30 lines
681 B
C
30 lines
681 B
C
/*
|
|
* drivers/usb/gadget/dwc2_udc.h
|
|
* Designware DWC2 on-chip full/high speed USB device controllers
|
|
* Copyright (C) 2005 for Samsung Electronics
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#ifndef __DWC2_USB_GADGET
|
|
#define __DWC2_USB_GADGET
|
|
|
|
#define PHY0_SLEEP (1 << 5)
|
|
|
|
struct dwc2_plat_otg_data {
|
|
void *priv;
|
|
int phy_of_node;
|
|
int (*phy_control)(int on);
|
|
unsigned int regs_phy;
|
|
uintptr_t regs_otg;
|
|
unsigned int usb_phy_ctrl;
|
|
unsigned int usb_flags;
|
|
unsigned int usb_gusbcfg;
|
|
unsigned int rx_fifo_sz;
|
|
unsigned int np_tx_fifo_sz;
|
|
unsigned int tx_fifo_sz;
|
|
};
|
|
|
|
int dwc2_udc_probe(struct dwc2_plat_otg_data *pdata);
|
|
|
|
#endif /* __DWC2_USB_GADGET */
|