Path: blob/master/arch/arm/mach-ixp4xx/ixdpg425-pci.c
10817 views
/*1* arch/arm/mach-ixp4xx/ixdpg425-pci.c2*3* PCI setup routines for Intel IXDPG425 Platform4*5* Copyright (C) 2004 MontaVista Softwrae, Inc.6*7* Maintainer: Deepak Saxena <[email protected]>8*9* This program is free software; you can redistribute it and/or modify10* it under the terms of the GNU General Public License version 2 as11* published by the Free Software Foundation.12*13*/1415#include <linux/kernel.h>16#include <linux/pci.h>17#include <linux/init.h>18#include <linux/irq.h>1920#include <asm/mach-types.h>21#include <mach/hardware.h>2223#include <asm/mach/pci.h>2425void __init ixdpg425_pci_preinit(void)26{27irq_set_irq_type(IRQ_IXP4XX_GPIO6, IRQ_TYPE_LEVEL_LOW);28irq_set_irq_type(IRQ_IXP4XX_GPIO7, IRQ_TYPE_LEVEL_LOW);2930ixp4xx_pci_preinit();31}3233static int __init ixdpg425_map_irq(struct pci_dev *dev, u8 slot, u8 pin)34{35if (slot == 12 || slot == 13)36return IRQ_IXP4XX_GPIO7;37else if (slot == 14)38return IRQ_IXP4XX_GPIO6;39else return -1;40}4142struct hw_pci ixdpg425_pci __initdata = {43.nr_controllers = 1,44.preinit = ixdpg425_pci_preinit,45.swizzle = pci_std_swizzle,46.setup = ixp4xx_setup,47.scan = ixp4xx_scan_bus,48.map_irq = ixdpg425_map_irq,49};5051int __init ixdpg425_pci_init(void)52{53if (machine_is_ixdpg425())54pci_common_init(&ixdpg425_pci);55return 0;56}5758subsys_initcall(ixdpg425_pci_init);596061