mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
ipq807x: Fix various KW warnings in drivers
Change-Id: I7c5c61beeeb00cb9266464a7a084e105a224357d Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
This commit is contained in:
parent
622b74d073
commit
bc7a78c941
5 changed files with 33 additions and 4 deletions
|
|
@ -751,6 +751,8 @@ static int qup_i2c_probe_chip(struct udevice *bus, uint chip_addr,
|
|||
struct ipq_i2c_platdata *plat = bus->platdata;
|
||||
plat->type = dev_get_driver_data(bus);
|
||||
buf[0] = 0;
|
||||
if (i2c_bus == NULL)
|
||||
return -ENODEV;
|
||||
i2c_bus->i2c_base_addr = (int *)dev_get_addr(bus);
|
||||
i2c_base_addr = (int)i2c_bus->i2c_base_addr;
|
||||
src_clk_freq = fdtdec_get_int(gd->fdt_blob, bus->of_offset, "clock-frequency", -1);
|
||||
|
|
|
|||
|
|
@ -562,7 +562,7 @@ static int ipq807x_eth_recv(struct eth_device *dev)
|
|||
struct ipq807x_edma_rxdesc_ring *rxdesc_ring;
|
||||
struct ipq807x_edma_hw *ehw = &c_info->hw;
|
||||
volatile u32 reg_data;
|
||||
u32 rxdesc_intr_status;
|
||||
u32 rxdesc_intr_status = 0;
|
||||
int i;
|
||||
|
||||
/*
|
||||
|
|
@ -868,7 +868,7 @@ static int ipq807x_eth_init(struct eth_device *eth_dev, bd_t *this)
|
|||
char *lstatus[] = {"up", "Down"};
|
||||
char *dp[] = {"Half", "Full"};
|
||||
int linkup=0;
|
||||
int mac_speed, speed_clock1, speed_clock2;
|
||||
int mac_speed = 0, speed_clock1 = 0, speed_clock2 = 0;
|
||||
if (!priv->ops) {
|
||||
printf ("Phy ops not mapped\n");
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -723,6 +723,11 @@ void pci_init_board (void)
|
|||
const struct udevice_id *of_match = pcie_ver_ids;
|
||||
|
||||
pcie = malloc(sizeof(*pcie));
|
||||
if (pcie == NULL) {
|
||||
printf("PCI: Init failed. Could't allocate memory\n");
|
||||
return;
|
||||
}
|
||||
|
||||
while (of_match->compatible) {
|
||||
ret = fdt_node_offset_by_compatible(gd->fdt_blob, 0,
|
||||
of_match->compatible);
|
||||
|
|
|
|||
|
|
@ -529,8 +529,10 @@ static void do_uart_start(void)
|
|||
}
|
||||
|
||||
uart_base = fdt_getprop(gd->fdt_blob, node, "reg", &len);
|
||||
if (uart_base == FDT_ADDR_T_NONE)
|
||||
return -EINVAL;
|
||||
if (uart_base == NULL) {
|
||||
printf("UART init failed. Unable to get uart_base\n");
|
||||
return;
|
||||
}
|
||||
|
||||
uart2.reg_base = fdt32_to_cpu(uart_base[0]);
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,11 @@ void ipq_reset_usb_phy(struct ipq_xhci *ipq)
|
|||
struct ipq_xhci_platdata *platdata;
|
||||
|
||||
platdata = dev_get_platdata(ipq->dev);
|
||||
if (platdata == NULL) {
|
||||
printf("Error: %s Failed\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
gcc_rst_ctrl = platdata->rst_ctrl;
|
||||
|
||||
if (gcc_rst_ctrl) {
|
||||
|
|
@ -126,7 +131,17 @@ static int xhci_usb_probe(struct udevice *dev)
|
|||
int ret;
|
||||
|
||||
platdata = dev_get_platdata(dev);
|
||||
if (platdata == NULL) {
|
||||
printf("Error: %s Failed\n", __func__);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
context = dev_get_priv(dev);
|
||||
if (context == NULL) {
|
||||
printf("Error: %s Failed\n", __func__);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
context->hcd = (struct xhci_hccr *)platdata->hcd_base;
|
||||
context->dev = dev;
|
||||
context->dwc3_reg = (struct dwc3 *)((char *)(context->hcd) + DWC3_REG_OFFSET);
|
||||
|
|
@ -149,6 +164,11 @@ static int xhci_ofdata_to_platdata(struct udevice *dev)
|
|||
const void *blob = gd->fdt_blob;
|
||||
|
||||
platdata = dev_get_platdata(dev);
|
||||
if (platdata == NULL) {
|
||||
printf("Error: %s Failed\n", __func__);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
platdata->hcd_base = dev_get_addr(dev);
|
||||
if (platdata->hcd_base == FDT_ADDR_T_NONE) {
|
||||
debug("Error getting DWC3 base address\n");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue