dataMonitoring.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * arch/arm/mach-ks8695/pci.c
  3. *
  4. * Copyright (C) 2003, Micrel Semiconductors
  5. * Copyright (C) 2006, Greg Ungerer <gerg@snapgear.com>
  6. * Copyright (C) 2006, Ben Dooks
  7. * Copyright (C) 2007, Andrew Victor
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  22. */
  23. #include <linux/kernel.h>
  24. #include <linux/pci.h>
  25. #include <linux/mm.h>
  26. #include <linux/init.h>
  27. #include <linux/irq.h>
  28. #include <linux/delay.h>
  29. #include <linux/io.h>
  30. #include <asm/signal.h>
  31. #include <asm/mach/pci.h>
  32. #include <mach/hardware.h>
  33. #include <mach/devices.h>
  34. #include <mach/regs-pci.h>
  35. static int pci_dbg;
  36. static int pci_cfg_dbg;
  37. static void ks8695_pci_setupconfig(unsigned int bus_nr, unsigned int devfn, unsigned int where)
  38. {
  39. unsigned long pbca;
  40. pbca = PBCA_ENABLE | (where & ~3);
  41. pbca |= PCI_SLOT(devfn) << 11 ;
  42. pbca |= PCI_FUNC(devfn) << 8;
  43. pbca |= bus_nr << 16;