grlib: Add ambapp_common_info to derived types

This avoids a cast in DEV_TO_COMMON().
This commit is contained in:
Sebastian Huber
2020-09-18 10:00:46 +02:00
parent c15c520b96
commit f9c8e14dcb
14 changed files with 46 additions and 50 deletions

View File

@@ -513,7 +513,7 @@ static int grpci_init(struct grpci_priv *priv)
ahb = ainfo->info.ahb_slv;
/* Found PCI core, init private structure */
priv->irq = apb->irq;
priv->irq = apb->common.irq;
priv->regs = (struct grpci_regs *)apb->start;
priv->bt_enabled = DEFAULT_BT_ENABLED;

View File

@@ -730,8 +730,8 @@ static int grpci2_init(struct grpci2_priv *priv)
ahb = ainfo->info.ahb_slv;
/* Found PCI core, init private structure */
priv->irq = apb->irq;
priv->ver = apb->ver;
priv->irq = apb->common.irq;
priv->ver = apb->common.ver;
priv->regs = (struct grpci2_regs *)apb->start;
priv->bt_enabled = DEFAULT_BT_ENABLED;
priv->irq_mode = (priv->regs->sts_cap & STS_IRQMODE) >> STS_IRQMODE_BIT;

View File

@@ -426,7 +426,7 @@ static int pcif_init(struct pcif_priv *priv)
ahb = ainfo->info.ahb_slv;
/* Found PCI core, init private structure */
priv->irq = apb->irq;
priv->irq = apb->common.irq;
priv->regs = (struct pcif_regs *)apb->start;
/* Calculate the PCI windows