diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-05-02 20:31:36 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-05-07 01:44:06 -0400 |
commit | 861fe90656b8e20d750d73c57088dc52d316ce7b (patch) | |
tree | 3f7df274478242ecf9f4186637c9cc38f59b5b8a /arch/sparc64/kernel/pci.c | |
parent | 4cad69174f385c183b2bcb369fb4304d8624ab96 (diff) |
[SPARC64]: SUN4U PCI-E controller support.
Some minor refactoring in the generic code was necessary for
this:
1) This controller requires 8-byte access to the interrupt map
and clear register. They are 64-bits on all the other
SBUS and PCI controllers anyways, so this was easy to cure.
2) The IMAP register has a different layout and some bits that we
need to preserve, so use a read/modify/write when making
changes to the IMAP register in generic code.
3) Flushing the entire IOMMU TLB is best done with a single write
to a register on this PCI controller, add a iommu->iommu_flushinv
for this.
Still lacks MSI support, that will come later.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/pci.c')
-rw-r--r-- | arch/sparc64/kernel/pci.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index 9a549547cb2b..a72a3c312d33 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c | |||
@@ -190,6 +190,7 @@ extern void schizo_init(struct device_node *, const char *); | |||
190 | extern void schizo_plus_init(struct device_node *, const char *); | 190 | extern void schizo_plus_init(struct device_node *, const char *); |
191 | extern void tomatillo_init(struct device_node *, const char *); | 191 | extern void tomatillo_init(struct device_node *, const char *); |
192 | extern void sun4v_pci_init(struct device_node *, const char *); | 192 | extern void sun4v_pci_init(struct device_node *, const char *); |
193 | extern void fire_pci_init(struct device_node *, const char *); | ||
193 | 194 | ||
194 | static struct { | 195 | static struct { |
195 | char *model_name; | 196 | char *model_name; |
@@ -207,6 +208,7 @@ static struct { | |||
207 | { "SUNW,tomatillo", tomatillo_init }, | 208 | { "SUNW,tomatillo", tomatillo_init }, |
208 | { "pci108e,a801", tomatillo_init }, | 209 | { "pci108e,a801", tomatillo_init }, |
209 | { "SUNW,sun4v-pci", sun4v_pci_init }, | 210 | { "SUNW,sun4v-pci", sun4v_pci_init }, |
211 | { "pciex108e,80f0", fire_pci_init }, | ||
210 | }; | 212 | }; |
211 | #define PCI_NUM_CONTROLLER_TYPES (sizeof(pci_controller_table) / \ | 213 | #define PCI_NUM_CONTROLLER_TYPES (sizeof(pci_controller_table) / \ |
212 | sizeof(pci_controller_table[0])) | 214 | sizeof(pci_controller_table[0])) |
@@ -436,6 +438,13 @@ struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, | |||
436 | printk(" class: 0x%x device name: %s\n", | 438 | printk(" class: 0x%x device name: %s\n", |
437 | dev->class, pci_name(dev)); | 439 | dev->class, pci_name(dev)); |
438 | 440 | ||
441 | /* I have seen IDE devices which will not respond to | ||
442 | * the bmdma simplex check reads if bus mastering is | ||
443 | * disabled. | ||
444 | */ | ||
445 | if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) | ||
446 | pci_set_master(dev); | ||
447 | |||
439 | dev->current_state = 4; /* unknown power state */ | 448 | dev->current_state = 4; /* unknown power state */ |
440 | dev->error_state = pci_channel_io_normal; | 449 | dev->error_state = pci_channel_io_normal; |
441 | 450 | ||