Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230512
b: refs/heads/master
c: 9ca0443
h: refs/heads/master
v: v3
  • Loading branch information
Nobuhiro Iwamatsu authored and Paul Mundt committed Jan 11, 2011
1 parent bdcbb77 commit a5d862a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0d6ae8fa945aba732edadce1ead9929520d61b99
refs/heads/master: 9ca04434bb5c448e2e252d99a087810c40b9a7c6
28 changes: 26 additions & 2 deletions trunk/arch/sh/drivers/pci/fixups-landisk.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/*
* arch/sh/drivers/pci/ops-landisk.c
* arch/sh/drivers/pci/fixups-landisk.c
*
* PCI initialization for the I-O DATA Device, Inc. LANDISK board
*
* Copyright (C) 2006 kogiidena
* Copyright (C) 2010 Nobuhiro Iwamatsu
*
* May be copied or modified under the terms of the GNU General Public
* License. See linux/COPYING for more information.
Expand All @@ -15,6 +16,9 @@
#include <linux/pci.h>
#include "pci-sh4.h"

#define PCIMCR_MRSET_OFF 0xBFFFFFFF
#define PCIMCR_RFSH_OFF 0xFFFFFFFB

int pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin)
{
/*
Expand All @@ -26,9 +30,29 @@ int pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin)
int irq = ((slot + pin - 1) & 0x3) + 5;

if ((slot | (pin - 1)) > 0x3) {
printk("PCI: Bad IRQ mapping request for slot %d pin %c\n",
printk(KERN_WARNING "PCI: Bad IRQ mapping request for slot %d pin %c\n",
slot, pin - 1 + 'A');
return -1;
}
return irq;
}

int pci_fixup_pcic(struct pci_channel *chan)
{
unsigned long bcr1, mcr;

bcr1 = __raw_readl(SH7751_BCR1);
bcr1 |= 0x40080000; /* Enable Bit 19 BREQEN, set PCIC to slave */
pci_write_reg(chan, bcr1, SH4_PCIBCR1);

mcr = __raw_readl(SH7751_MCR);
mcr = (mcr & PCIMCR_MRSET_OFF) & PCIMCR_RFSH_OFF;
pci_write_reg(chan, mcr, SH4_PCIMCR);

pci_write_reg(chan, 0x0c000000, SH7751_PCICONF5);
pci_write_reg(chan, 0xd0000000, SH7751_PCICONF6);
pci_write_reg(chan, 0x0c000000, SH4_PCILAR0);
pci_write_reg(chan, 0x00000000, SH4_PCILAR1);

return 0;
}

0 comments on commit a5d862a

Please sign in to comment.