|
@@ -80,7 +80,7 @@ struct grpci1_regs {
|
|
|
|
|
|
struct grpci1_priv {
|
|
struct grpci1_priv {
|
|
struct leon_pci_info info; /* must be on top of this structure */
|
|
struct leon_pci_info info; /* must be on top of this structure */
|
|
- struct grpci1_regs *regs; /* GRPCI register map */
|
|
|
|
|
|
+ struct grpci1_regs __iomem *regs; /* GRPCI register map */
|
|
struct device *dev;
|
|
struct device *dev;
|
|
int pci_err_mask; /* STATUS register error mask */
|
|
int pci_err_mask; /* STATUS register error mask */
|
|
int irq; /* LEON irqctrl GRPCI IRQ */
|
|
int irq; /* LEON irqctrl GRPCI IRQ */
|
|
@@ -101,7 +101,7 @@ static struct grpci1_priv *grpci1priv;
|
|
static int grpci1_cfg_w32(struct grpci1_priv *priv, unsigned int bus,
|
|
static int grpci1_cfg_w32(struct grpci1_priv *priv, unsigned int bus,
|
|
unsigned int devfn, int where, u32 val);
|
|
unsigned int devfn, int where, u32 val);
|
|
|
|
|
|
-int grpci1_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
|
|
|
|
|
+static int grpci1_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
|
{
|
|
{
|
|
struct grpci1_priv *priv = dev->bus->sysdata;
|
|
struct grpci1_priv *priv = dev->bus->sysdata;
|
|
int irq_group;
|
|
int irq_group;
|
|
@@ -417,10 +417,10 @@ out:
|
|
* BAR1: peripheral DMA to host's memory (size at least 256MByte)
|
|
* BAR1: peripheral DMA to host's memory (size at least 256MByte)
|
|
* BAR2..BAR5: not implemented in hardware
|
|
* BAR2..BAR5: not implemented in hardware
|
|
*/
|
|
*/
|
|
-void grpci1_hw_init(struct grpci1_priv *priv)
|
|
|
|
|
|
+static void grpci1_hw_init(struct grpci1_priv *priv)
|
|
{
|
|
{
|
|
u32 ahbadr, bar_sz, data, pciadr;
|
|
u32 ahbadr, bar_sz, data, pciadr;
|
|
- struct grpci1_regs *regs = priv->regs;
|
|
|
|
|
|
+ struct grpci1_regs __iomem *regs = priv->regs;
|
|
|
|
|
|
/* set 1:1 mapping between AHB -> PCI memory space */
|
|
/* set 1:1 mapping between AHB -> PCI memory space */
|
|
REGSTORE(regs->cfg_stat, priv->pci_area & 0xf0000000);
|
|
REGSTORE(regs->cfg_stat, priv->pci_area & 0xf0000000);
|
|
@@ -509,7 +509,7 @@ static irqreturn_t grpci1_err_interrupt(int irq, void *arg)
|
|
|
|
|
|
static int grpci1_of_probe(struct platform_device *ofdev)
|
|
static int grpci1_of_probe(struct platform_device *ofdev)
|
|
{
|
|
{
|
|
- struct grpci1_regs *regs;
|
|
|
|
|
|
+ struct grpci1_regs __iomem *regs;
|
|
struct grpci1_priv *priv;
|
|
struct grpci1_priv *priv;
|
|
int err, len;
|
|
int err, len;
|
|
const int *tmp;
|
|
const int *tmp;
|
|
@@ -690,7 +690,7 @@ err3:
|
|
err2:
|
|
err2:
|
|
release_resource(&priv->info.mem_space);
|
|
release_resource(&priv->info.mem_space);
|
|
err1:
|
|
err1:
|
|
- iounmap((void *)priv->pci_io_va);
|
|
|
|
|
|
+ iounmap((void __iomem *)priv->pci_io_va);
|
|
grpci1priv = NULL;
|
|
grpci1priv = NULL;
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|