CM-x270: ITE 8152 PCI bridge support
Subsystems (2)
PATCH 2/3 CM-x270: ITE 8152 PCI bridge support
This patch provides driver for ITE 8152 PCI bridge.
arch/arm/common/Makefile | 1 + arch/arm/common/it8152.c | 387 +++++++++++++++++++++++++++++++++++++ arch/arm/kernel/bios32.c | 28 +++- include/asm-arm/hardware/it8152.h | 99 ++++++++++ include/asm-arm/pci.h | 7 + include/linux/pci_ids.h | 1 + 6 files changed, 520 insertions(+), 3 deletions(-)
arch/arm/common/Makefile +1 -0
@@ -17,3 +17,4 @@ obj-$(CONFIG_SHARPSL_PM) += sharpsl_pm.o obj-$(CONFIG_SHARP_SCOOP) += scoop.o obj-$(CONFIG_ARCH_IXP2000) += uengine.o obj-$(CONFIG_ARCH_IXP23XX) += uengine.o +obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o
arch/arm/common/it8152.c new file +387 -0
387 lines not on this page · raw message
arch/arm/kernel/bios32.c +25 -3
@@ -279,6 +279,25 @@ static void __devinit pci_fixup_cy82c693(struct pci_dev *dev) }DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_CONTAQ ,PCI_DEVICE_ID_CONTAQ_82C693 , pci_fixup_cy82c693); +static void __init pci_fixup_it8152 (struct pci_dev *dev) +{ +int i; +/* fixup for ITE 8152 devices */ +/* FIXME: add defines for class 0x68000 and 0x80103 */ +if ((dev->class >>8 ) ==PCI_CLASS_BRIDGE_HOST || + dev->class ==0x68000 || + dev->class ==0x80103 ) { +for (i =0 ; i <PCI_NUM_RESOURCES ; i++) { + dev->resource[i].start =0 ; + dev->resource[i].end =0 ; + dev->resource[i].flags =0 ; + } + } +} +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_ITE ,PCI_DEVICE_ID_ITE_8152 , pci_fixup_it8152); + + +void __devinit pcibios_update_irq (struct pci_dev *dev,int irq) {if (debug_pci)
@@ -292,9 +311,12 @@ void __devinit pcibios_update_irq(struct pci_dev *dev, int irq)*/ static inline int pdev_bad_for_parity (struct pci_dev *dev) { -return (dev->vendor ==PCI_VENDOR_ID_INTERG && - (dev->device ==PCI_DEVICE_ID_INTERG_2000 || - dev->device ==PCI_DEVICE_ID_INTERG_2010 )); +return ((dev->vendor ==PCI_VENDOR_ID_INTERG && + (dev->device ==PCI_DEVICE_ID_INTERG_2000 || + dev->device ==PCI_DEVICE_ID_INTERG_2010 )) || + (dev->vendor ==PCI_VENDOR_ID_ITE && + dev->device ==PCI_DEVICE_ID_ITE_8152 )); + }/*
include/asm-arm/hardware/it8152.h new file +99 -0
99 lines not on this page · raw message
include/asm-arm/pci.h +7 -0
@@ -8,10 +8,17 @@#define pcibios_scan_all_fns (a, b) 0 +#ifdef CONFIG_PCI_HOST_ITE8152 +/* ITE bridge requires setting latency timer to avoid early bus access +termination by PIC bus mater devices +*/ +extern void pcibios_set_master (struct pci_dev *dev); +#else static inline void pcibios_set_master (struct pci_dev *dev) {/* No special bus mastering setup handling */ } +#endif static inline void pcibios_penalize_isa_irq (int irq,int active) {
include/linux/pci_ids.h +1 -0
@@ -1629,6 +1629,7 @@#define PCI_DEVICE_ID_ITE_8211 0x8211#define PCI_DEVICE_ID_ITE_8212 0x8212#define PCI_DEVICE_ID_ITE_8213 0x8213 +#define PCI_DEVICE_ID_ITE_8152 0x8152#define PCI_DEVICE_ID_ITE_8872 0x8872#define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886
Quoted 6 lines · Mike Rapoport
This patch provides driver for ITE 8152 PCI bridge.
Signed-off-by Mike Rapoport <[email protected]>arch/arm/common/Makefile | 1 + arch/arm/common/it8152.c | 387 +++++++++++++++++++++++++++++++++++++
Shouldn't it go to drivers/pci and define a platform driver? it8152 is not an ARM specific controller.
Thanks
Guennadi
---------------------------------
Guennadi Liakhovetski, Ph.D.
DSA Daten- und Systemtechnik GmbH
Pascalstr. 28
D-52076 Aachen
Germany
Quoted 11 lines · Guennadi Liakhovetski
Quoted 6 lines · Mike Rapoport
This patch provides driver for ITE 8152 PCI bridge.
Signed-off-by Mike Rapoport <[email protected]>arch/arm/common/Makefile | 1 + arch/arm/common/it8152.c | 387 +++++++++++++++++++++++++++++++++++++Shouldn't it go to
drivers/pciand define a platform driver? it8152 is not an ARM specific controller.
drivers/pci is currently only used for the PCI bus infrastructure. The setup of host bridges is very platform dependent.
Also note that you should *avoid* DMA bounce wherever possible. The code is broken as designed. Ensure that the DMA mask is set appropriately, and then moan elsewhere if things don't work.
Quoted 13 lines · Russell King - ARM Linux
Quoted 11 lines · Guennadi Liakhovetski
Quoted 6 lines · Mike Rapoport
This patch provides driver for ITE 8152 PCI bridge.
Signed-off-by Mike Rapoport <[email protected]>arch/arm/common/Makefile | 1 + arch/arm/common/it8152.c | 387 +++++++++++++++++++++++++++++++++++++Shouldn't it go to
drivers/pciand define a platform driver? it8152 is not an ARM specific controller.
Quoted 6 lines
drivers/pciis currently only used for the PCI bus infrastructure. The setup of host bridges is very platform dependent.Also note that you should *avoid* DMA bounce wherever possible. The code is broken as designed. Ensure that the DMA mask is set appropriately, and then moan elsewhere if things don't work.
That's more or less what I'm trying to do. ITE chip allows to address up to 64Mbyte, so I have to ensure that *no* PCI device will ever try to DMA above that limit.
I don't see other way to ensure it.
Quoted 5 lines
-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
Signature · 2 lines
Sincerely Yours, Mike.
Quoted 11 lines · Guennadi Liakhovetski
Quoted 6 lines · Mike Rapoport
This patch provides driver for ITE 8152 PCI bridge.
Signed-off-by Mike Rapoport <[email protected]>arch/arm/common/Makefile | 1 + arch/arm/common/it8152.c | 387 +++++++++++++++++++++++++++++++++++++Shouldn't it go to
drivers/pciand define a platform driver? it8152 is not an ARM specific controller.
ITE 8152 is StrongArm and PXA255 companion chip. I can hardly imagine it's use with other architectures. Even making it work with PXA270 was pretty tough.
Quoted 15 lines
Thanks
Guennadi
---------------------------------
Guennadi Liakhovetski, Ph.D.
DSA Daten- und Systemtechnik GmbH
Pascalstr. 28
D-52076 Aachen
Germany-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
Signature · 2 lines
Sincerely Yours, Mike.