Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
dino.c File Reference
#include <linux/delay.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <asm/pdc.h>
#include <asm/page.h>
#include <asm/io.h>
#include <asm/hardware.h>
#include "gsc.h"

Go to the source code of this file.

Data Structures

struct  dino_device
 

Macros

#define DBG(x...)
 
#define is_card_dino(id)   ((id)->hw_type == HPHW_A_DMA)
 
#define is_cujo(id)   ((id)->hversion == 0x682)
 
#define DINO_IAR0   0x004
 
#define DINO_IODC_ADDR   0x008
 
#define DINO_IODC_DATA_0   0x008
 
#define DINO_IODC_DATA_1   0x008
 
#define DINO_IRR0   0x00C
 
#define DINO_IAR1   0x010
 
#define DINO_IRR1   0x014
 
#define DINO_IMR   0x018
 
#define DINO_IPR   0x01C
 
#define DINO_TOC_ADDR   0x020
 
#define DINO_ICR   0x024
 
#define DINO_ILR   0x028
 
#define DINO_IO_COMMAND   0x030
 
#define DINO_IO_STATUS   0x034
 
#define DINO_IO_CONTROL   0x038
 
#define DINO_IO_GSC_ERR_RESP   0x040
 
#define DINO_IO_ERR_INFO   0x044
 
#define DINO_IO_PCI_ERR_RESP   0x048
 
#define DINO_IO_FBB_EN   0x05c
 
#define DINO_IO_ADDR_EN   0x060
 
#define DINO_PCI_ADDR   0x064
 
#define DINO_CONFIG_DATA   0x068
 
#define DINO_IO_DATA   0x06c
 
#define DINO_MEM_DATA   0x070 /* Dino 3.x only */
 
#define DINO_GSC2X_CONFIG   0x7b4
 
#define DINO_GMASK   0x800
 
#define DINO_PAMR   0x804
 
#define DINO_PAPR   0x808
 
#define DINO_DAMODE   0x80c
 
#define DINO_PCICMD   0x810
 
#define DINO_PCISTS   0x814
 
#define DINO_MLTIM   0x81c
 
#define DINO_BRDG_FEAT   0x820
 
#define DINO_PCIROR   0x824
 
#define DINO_PCIWOR   0x828
 
#define DINO_TLTIM   0x830
 
#define DINO_IRQS   11 /* bits 0-10 are architected */
 
#define DINO_IRR_MASK   0x5ff /* only 10 bits are implemented */
 
#define DINO_LOCAL_IRQS   (DINO_IRQS+1)
 
#define DINO_MASK_IRQ(x)   (1<<(x))
 
#define PCIINTA   0x001
 
#define PCIINTB   0x002
 
#define PCIINTC   0x004
 
#define PCIINTD   0x008
 
#define PCIINTE   0x010
 
#define PCIINTF   0x020
 
#define GSCEXTINT   0x040
 
#define RS232INT   0x400
 
#define DINO_DEV(d)   ((struct dino_device *) d)
 
#define DINO_CFG_TOK(bus, dfn, pos)   ((u32) ((bus)<<16 | (dfn)<<8 | (pos)))
 
#define DINO_PORT_IN(type, size, mask)
 
#define DINO_PORT_OUT(type, size, mask)
 
#define _8MB   0x00800000UL
 
#define DINO_BRIDGE_ALIGN   0x100000
 
#define DINO_FIX_UNASSIGNED_INTERRUPTS
 
#define CUJO_RAVEN_ADDR   F_EXTEND(0xf1000000UL)
 
#define CUJO_FIREHAWK_ADDR   F_EXTEND(0xf1604000UL)
 
#define CUJO_RAVEN_BADPAGE   0x01003000UL
 
#define CUJO_FIREHAWK_BADPAGE   0x01607000UL
 

Functions

 DECLARE_PCI_FIXUP_ENABLE (PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_6832, quirk_cirrus_cardbus)
 
void ccio_cujo20_fixup (struct parisc_device *dev, u32 iovp)
 
int __init dino_init (void)
 

Macro Definition Documentation

#define _8MB   0x00800000UL

Definition at line 456 of file dino.c.

#define CUJO_FIREHAWK_ADDR   F_EXTEND(0xf1604000UL)

Definition at line 865 of file dino.c.

#define CUJO_FIREHAWK_BADPAGE   0x01607000UL

Definition at line 867 of file dino.c.

#define CUJO_RAVEN_ADDR   F_EXTEND(0xf1000000UL)

Definition at line 864 of file dino.c.

#define CUJO_RAVEN_BADPAGE   0x01003000UL

Definition at line 866 of file dino.c.

#define DBG (   x...)

Definition at line 68 of file dino.c.

#define DINO_BRDG_FEAT   0x820

Definition at line 120 of file dino.c.

#define DINO_BRIDGE_ALIGN   0x100000

Definition at line 544 of file dino.c.

#define DINO_CFG_TOK (   bus,
  dfn,
  pos 
)    ((u32) ((bus)<<16 | (dfn)<<8 | (pos)))

Definition at line 164 of file dino.c.

#define DINO_CONFIG_DATA   0x068

Definition at line 109 of file dino.c.

#define DINO_DAMODE   0x80c

Definition at line 116 of file dino.c.

#define DINO_DEV (   d)    ((struct dino_device *) d)

Definition at line 157 of file dino.c.

#define DINO_FIX_UNASSIGNED_INTERRUPTS
#define DINO_GMASK   0x800

Definition at line 113 of file dino.c.

#define DINO_GSC2X_CONFIG   0x7b4

Definition at line 112 of file dino.c.

#define DINO_IAR0   0x004

Definition at line 88 of file dino.c.

#define DINO_IAR1   0x010

Definition at line 93 of file dino.c.

#define DINO_ICR   0x024

Definition at line 98 of file dino.c.

#define DINO_ILR   0x028

Definition at line 99 of file dino.c.

#define DINO_IMR   0x018

Definition at line 95 of file dino.c.

#define DINO_IO_ADDR_EN   0x060

Definition at line 107 of file dino.c.

#define DINO_IO_COMMAND   0x030

Definition at line 100 of file dino.c.

#define DINO_IO_CONTROL   0x038

Definition at line 102 of file dino.c.

#define DINO_IO_DATA   0x06c

Definition at line 110 of file dino.c.

#define DINO_IO_ERR_INFO   0x044

Definition at line 104 of file dino.c.

#define DINO_IO_FBB_EN   0x05c

Definition at line 106 of file dino.c.

#define DINO_IO_GSC_ERR_RESP   0x040

Definition at line 103 of file dino.c.

#define DINO_IO_PCI_ERR_RESP   0x048

Definition at line 105 of file dino.c.

#define DINO_IO_STATUS   0x034

Definition at line 101 of file dino.c.

#define DINO_IODC_ADDR   0x008

Definition at line 89 of file dino.c.

#define DINO_IODC_DATA_0   0x008

Definition at line 90 of file dino.c.

#define DINO_IODC_DATA_1   0x008

Definition at line 91 of file dino.c.

#define DINO_IPR   0x01C

Definition at line 96 of file dino.c.

#define DINO_IRQS   11 /* bits 0-10 are architected */

Definition at line 125 of file dino.c.

#define DINO_IRR0   0x00C

Definition at line 92 of file dino.c.

#define DINO_IRR1   0x014

Definition at line 94 of file dino.c.

#define DINO_IRR_MASK   0x5ff /* only 10 bits are implemented */

Definition at line 126 of file dino.c.

#define DINO_LOCAL_IRQS   (DINO_IRQS+1)

Definition at line 127 of file dino.c.

#define DINO_MASK_IRQ (   x)    (1<<(x))

Definition at line 129 of file dino.c.

#define DINO_MEM_DATA   0x070 /* Dino 3.x only */

Definition at line 111 of file dino.c.

#define DINO_MLTIM   0x81c

Definition at line 119 of file dino.c.

#define DINO_PAMR   0x804

Definition at line 114 of file dino.c.

#define DINO_PAPR   0x808

Definition at line 115 of file dino.c.

#define DINO_PCI_ADDR   0x064

Definition at line 108 of file dino.c.

#define DINO_PCICMD   0x810

Definition at line 117 of file dino.c.

#define DINO_PCIROR   0x824

Definition at line 121 of file dino.c.

#define DINO_PCISTS   0x814

Definition at line 118 of file dino.c.

#define DINO_PCIWOR   0x828

Definition at line 122 of file dino.c.

#define DINO_PORT_IN (   type,
  size,
  mask 
)
Value:
static u##size dino_in##size (struct pci_hba_data *d, u16 addr) \
{ \
u##size v; \
unsigned long flags; \
spin_lock_irqsave(&(DINO_DEV(d)->dinosaur_pen), flags); \
/* tell HW which IO Port address */ \
__raw_writel((u32) addr, d->base_addr + DINO_PCI_ADDR); \
/* generate I/O PORT read cycle */ \
v = read##type(d->base_addr+DINO_IO_DATA+(addr&mask)); \
spin_unlock_irqrestore(&(DINO_DEV(d)->dinosaur_pen), flags); \
return v; \
}

Definition at line 255 of file dino.c.

#define DINO_PORT_OUT (   type,
  size,
  mask 
)
Value:
static void dino_out##size (struct pci_hba_data *d, u16 addr, u##size val) \
{ \
unsigned long flags; \
spin_lock_irqsave(&(DINO_DEV(d)->dinosaur_pen), flags); \
/* tell HW which IO port address */ \
__raw_writel((u32) addr, d->base_addr + DINO_PCI_ADDR); \
/* generate cfg write cycle */ \
write##type(val, d->base_addr+DINO_IO_DATA+(addr&mask)); \
spin_unlock_irqrestore(&(DINO_DEV(d)->dinosaur_pen), flags); \
}

Definition at line 273 of file dino.c.

#define DINO_TLTIM   0x830

Definition at line 123 of file dino.c.

#define DINO_TOC_ADDR   0x020

Definition at line 97 of file dino.c.

#define GSCEXTINT   0x040

Definition at line 137 of file dino.c.

#define is_card_dino (   id)    ((id)->hw_type == HPHW_A_DMA)

Definition at line 85 of file dino.c.

#define is_cujo (   id)    ((id)->hversion == 0x682)

Definition at line 86 of file dino.c.

#define PCIINTA   0x001

Definition at line 131 of file dino.c.

#define PCIINTB   0x002

Definition at line 132 of file dino.c.

#define PCIINTC   0x004

Definition at line 133 of file dino.c.

#define PCIINTD   0x008

Definition at line 134 of file dino.c.

#define PCIINTE   0x010

Definition at line 135 of file dino.c.

#define PCIINTF   0x020

Definition at line 136 of file dino.c.

#define RS232INT   0x400

Definition at line 141 of file dino.c.

Function Documentation

void ccio_cujo20_fixup ( struct parisc_device dev,
u32  iovp 
)

Definition at line 1184 of file ccio-dma.c.

DECLARE_PCI_FIXUP_ENABLE ( PCI_VENDOR_ID_CIRRUS  ,
PCI_DEVICE_ID_CIRRUS_6832  ,
quirk_cirrus_cardbus   
)
int __init dino_init ( void  )

Definition at line 1043 of file dino.c.