Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4054253 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'ixp4xx' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6:
  IXP4xx: GTWX5715 platform only has two PCI IRQ lines, not four.
  IXP4xx: Introduce IXP4XX_GPIO_IRQ(n) macro and convert IXP4xx platform files.
  IXP4xx: move Gemtek GTWX5715 platform macros to the platform code.
  IXP4xx: Remove unused Motorola PrPMC1100 platform macros.
  IXP4xx: move FSG platform macros to the platform code.
  IXP4xx: move DSM G600 platform macros to the platform code.
  IXP4xx: move NAS100D platform macros to the platform code.
  IXP4xx: move NSLU2 platform macros to the platform code.
  IXP4xx: move Coyote platform macros to the platform code.
  IXP4xx: move AVILA platform macros to the platform code.
  IXP4xx: move IXDP425 platform macros to the platform code.
  IXP4xx: Extend PCI MMIO indirect address space to 1 GB.
  IXP4xx: Fix compilation failure with CONFIG_IXP4XX_INDIRECT_PCI.
  IXP4xx: Drop "__ixp4xx_" prefix from in/out/ioread/iowrite functions for clarity.
  IXP4xx: Rename indirect MMIO primitives from __ixp4xx_* to __indirect_*.
  IXP4xx: Ensure index is positive in irq_to_gpio() and npe_request().
  ARM: fix insl() and outsl() endianness on IXP4xx architecture.
  IXP4xx: Fix normally-disabled debugging text in drivers/net/arm/ixp4xx_eth.c.
  IXP4xx: change the timer base frequency to 66.666000 MHz.
parents f01eb364 0fd7dc7f
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ config IXP4XX_INDIRECT_PCI
	help
          IXP4xx provides two methods of accessing PCI memory space:

          1) A direct mapped window from 0x48000000 to 0x4bffffff (64MB).
          1) A direct mapped window from 0x48000000 to 0x4BFFFFFF (64MB).
             To access PCI via this space, we simply ioremap() the BAR
             into the kernel and we can use the standard read[bwl]/write[bwl]
             macros. This is the preferred method due to speed but it
@@ -187,13 +187,13 @@ config IXP4XX_INDIRECT_PCI
             problematic if using video cards and other memory-heavy devices.

	  2) If > 64MB of memory space is required, the IXP4xx can be
	     configured to use indirect registers to access PCI This allows 
	     for up to 128MB (0x48000000 to 0x4fffffff) of memory on the bus. 
	     The disadvantage of this is that every PCI access requires 
	     three local register accesses plus a spinlock, but in some 
	     cases the performance hit is acceptable. In addition, you cannot 
	     mmap() PCI devices in this case due to the indirect nature
	     of the PCI window.
	     configured to use indirect registers to access the whole PCI
	     memory space. This currently allows for up to 1 GB (0x10000000
	     to 0x4FFFFFFF) of memory on the bus. The disadvantage of this
	     is that every PCI access requires three local register accesses
	     plus a spinlock, but in some cases the performance hit is
	     acceptable. In addition, you cannot mmap() PCI devices in this
	     case due to the indirect nature of the PCI window.

	  By default, the direct method is used. Choose this option if you
	  need to use the indirect method instead. If you don't know
+23 −19
Original line number Diff line number Diff line
@@ -22,40 +22,45 @@
#include <linux/init.h>
#include <linux/irq.h>
#include <linux/delay.h>

#include <asm/mach/pci.h>
#include <asm/irq.h>
#include <mach/hardware.h>
#include <asm/mach-types.h>

#define AVILA_MAX_DEV	4
#define LOFT_MAX_DEV	6
#define IRQ_LINES	4

/* PCI controller GPIO to IRQ pin mappings */
#define INTA		11
#define INTB		10
#define INTC		9
#define INTD		8

void __init avila_pci_preinit(void)
{
	set_irq_type(IRQ_AVILA_PCI_INTA, IRQ_TYPE_LEVEL_LOW);
	set_irq_type(IRQ_AVILA_PCI_INTB, IRQ_TYPE_LEVEL_LOW);
	set_irq_type(IRQ_AVILA_PCI_INTC, IRQ_TYPE_LEVEL_LOW);
	set_irq_type(IRQ_AVILA_PCI_INTD, IRQ_TYPE_LEVEL_LOW);

	set_irq_type(IXP4XX_GPIO_IRQ(INTA), IRQ_TYPE_LEVEL_LOW);
	set_irq_type(IXP4XX_GPIO_IRQ(INTB), IRQ_TYPE_LEVEL_LOW);
	set_irq_type(IXP4XX_GPIO_IRQ(INTC), IRQ_TYPE_LEVEL_LOW);
	set_irq_type(IXP4XX_GPIO_IRQ(INTD), IRQ_TYPE_LEVEL_LOW);
	ixp4xx_pci_preinit();
}

static int __init avila_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
	static int pci_irq_table[AVILA_PCI_IRQ_LINES] = {
		IRQ_AVILA_PCI_INTA,
		IRQ_AVILA_PCI_INTB,
		IRQ_AVILA_PCI_INTC,
		IRQ_AVILA_PCI_INTD
	static int pci_irq_table[IRQ_LINES] = {
		IXP4XX_GPIO_IRQ(INTA),
		IXP4XX_GPIO_IRQ(INTB),
		IXP4XX_GPIO_IRQ(INTC),
		IXP4XX_GPIO_IRQ(INTD)
	};

	int irq = -1;

	if (slot >= 1 &&
	slot <= (machine_is_loft() ? LOFT_PCI_MAX_DEV : AVILA_PCI_MAX_DEV) &&
		pin >= 1 && pin <= AVILA_PCI_IRQ_LINES) {
		irq = pci_irq_table[(slot + pin - 2) % 4];
	}
	    slot <= (machine_is_loft() ? LOFT_MAX_DEV : AVILA_MAX_DEV) &&
	    pin >= 1 && pin <= IRQ_LINES)
		return pci_irq_table[(slot + pin - 2) % 4];

	return irq;
	return -1;
}

struct hw_pci avila_pci __initdata = {
@@ -75,4 +80,3 @@ int __init avila_pci_init(void)
}

subsys_initcall(avila_pci_init);
+3 −1
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@
#include <linux/serial_8250.h>
#include <linux/slab.h>
#include <linux/i2c-gpio.h>

#include <asm/types.h>
#include <asm/setup.h>
#include <asm/memory.h>
@@ -29,6 +28,9 @@
#include <asm/mach/arch.h>
#include <asm/mach/flash.h>

#define AVILA_SDA_PIN	7
#define AVILA_SCL_PIN	6

static struct flash_platform_data avila_flash_data = {
	.map_name	= "cfi_probe",
	.width		= 2,
+1 −5
Original line number Diff line number Diff line
@@ -481,11 +481,7 @@ int ixp4xx_setup(int nr, struct pci_sys_data *sys)

	res[1].name = "PCI Memory Space";
	res[1].start = PCIBIOS_MIN_MEM;
#ifndef CONFIG_IXP4XX_INDIRECT_PCI
	res[1].end = 0x4bffffff;
#else
	res[1].end = 0x4fffffff;
#endif
	res[1].end = PCIBIOS_MAX_MEM;
	res[1].flags = IORESOURCE_MEM;

	request_resource(&ioport_resource, &res[0]);
+1 −1
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ int gpio_to_irq(int gpio)
}
EXPORT_SYMBOL(gpio_to_irq);

int irq_to_gpio(int irq)
int irq_to_gpio(unsigned int irq)
{
	int gpio = (irq < 32) ? irq2gpio[irq] : -EINVAL;

Loading