Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
fpga.h File Reference
#include <linux/io.h>
#include <linux/types.h>
#include <linux/bitops.h>

Go to the source code of this file.

Macros

#define SRSTR   0x000
 
#define SRSTR_MAGIC   0x1971 /* Fixed magical read value */
 
#define INTASR   0x010
 
#define INTAMR   0x020
 
#define MODSWR   0x030
 
#define INTTESTR   0x040
 
#define SYSSR   0x050
 
#define NRGPR   0x060
 
#define NMISR   0x070
 
#define NMISR_MAN_NMI   BIT(0)
 
#define NMISR_AUX_NMI   BIT(1)
 
#define NMISR_MASK   (NMISR_MAN_NMI | NMISR_AUX_NMI)
 
#define NMIMR   0x080
 
#define NMIMR_MAN_NMIM   BIT(0) /* Manual NMI mask */
 
#define NMIMR_AUX_NMIM   BIT(1) /* Auxiliary NMI mask */
 
#define NMIMR_MASK   (NMIMR_MAN_NMIM | NMIMR_AUX_NMIM)
 
#define INTBSR   0x090
 
#define INTBMR   0x0a0
 
#define USRLEDR   0x0b0
 
#define MAPSWR   0x0c0
 
#define FPGAVR   0x0d0
 
#define FPGADR   0x0e0
 
#define PCBRR   0x0f0
 
#define RSR   0x100
 
#define EXTASR   0x110
 
#define SPCAR   0x120
 
#define INTMSR   0x130
 
#define PCIECR   0x140
 
#define PCIECR_PCIEMUX1   BIT(15)
 
#define PCIECR_PCIEMUX0   BIT(14)
 
#define PCIECR_PRST4   BIT(12) /* slot 4 card present */
 
#define PCIECR_PRST3   BIT(11) /* slot 3 card present */
 
#define PCIECR_PRST2   BIT(10) /* slot 2 card present */
 
#define PCIECR_PRST1   BIT(9) /* slot 1 card present */
 
#define PCIECR_CLKEN   BIT(4) /* oscillator enable */
 
#define FAER   0x150
 
#define USRGPIR   0x160
 
#define LCLASR   0x180
 
#define LCLASR_FRAMEN   BIT(15)
 
#define LCLASR_FPGA_SEL_SHIFT   12
 
#define LCLASR_NAND_SEL_SHIFT   8
 
#define LCLASR_NORB_SEL_SHIFT   4
 
#define LCLASR_NORA_SEL_SHIFT   0
 
#define LCLASR_AREA_MASK   0x7
 
#define LCLASR_FPGA_SEL_MASK   (LCLASR_AREA_MASK << LCLASR_FPGA_SEL_SHIFT)
 
#define LCLASR_NAND_SEL_MASK   (LCLASR_AREA_MASK << LCLASR_NAND_SEL_SHIFT)
 
#define LCLASR_NORB_SEL_MASK   (LCLASR_AREA_MASK << LCLASR_NORB_SEL_SHIFT)
 
#define LCLASR_NORA_SEL_MASK   (LCLASR_AREA_MASK << LCLASR_NORA_SEL_SHIFT)
 
#define SBCR   0x190
 
#define SCBR_I2CMEN   BIT(0) /* FPGA I2C master enable */
 
#define SCBR_I2CCEN   BIT(1) /* CPU I2C master enable */
 
#define PWRCR   0x1a0
 
#define PWRCR_SCISEL0   BIT(0)
 
#define PWRCR_SCISEL1   BIT(1)
 
#define PWRCR_SCIEN   BIT(2) /* Serial port enable */
 
#define PWRCR_PDWNACK   BIT(5) /* Power down acknowledge */
 
#define PWRCR_PDWNREQ   BIT(7) /* Power down request */
 
#define PWRCR_INT2   BIT(11) /* INT2 connection to power manager */
 
#define PWRCR_BUPINIT   BIT(13) /* DDR backup initialize */
 
#define PWRCR_BKPRST   BIT(15) /* Backup power reset */
 
#define SPCBR   0x1b0
 
#define SPICR   0x1c0
 
#define SPIDR   0x1d0
 
#define I2CCR   0x1e0
 
#define I2CDR   0x1f0
 
#define FPGACR   0x200
 
#define IASELR1   0x210
 
#define IASELR2   0x220
 
#define IASELR3   0x230
 
#define IASELR4   0x240
 
#define IASELR5   0x250
 
#define IASELR6   0x260
 
#define IASELR7   0x270
 
#define IASELR8   0x280
 
#define IASELR9   0x290
 
#define IASELR10   0x2a0
 
#define IASELR11   0x2b0
 
#define IASELR12   0x2c0
 
#define IASELR13   0x2d0
 
#define IASELR14   0x2e0
 
#define IASELR15   0x2f0
 
#define IBSELR1   0x310
 
#define IBSELR2   0x320
 
#define IBSELR3   0x330
 
#define IBSELR4   0x340
 
#define IBSELR5   0x350
 
#define IBSELR6   0x360
 
#define IBSELR7   0x370
 
#define IBSELR8   0x380
 
#define IBSELR9   0x390
 
#define IBSELR10   0x3a0
 
#define IBSELR11   0x3b0
 
#define IBSELR12   0x3c0
 
#define IBSELR13   0x3d0
 
#define IBSELR14   0x3e0
 
#define IBSELR15   0x3f0
 
#define USRACR   0x400
 
#define BEEPR   0x410
 
#define USRLCDR   0x420
 
#define SMBCR   0x430
 
#define SMBDR   0x440
 
#define USBCR   0x450
 
#define AMSR   0x460
 
#define ACCR   0x470
 
#define SDIFCR   0x480
 
#define SDK7786_FPGA_REGADDR(reg)   (sdk7786_fpga_base + (reg))
 
#define SDK7786_FPGA_I2CADDR(reg)   ((reg) >> 3)
 

Functions

void sdk7786_fpga_init (void)
 
void sdk7786_nmi_init (void)
 

Variables

void __iomemsdk7786_fpga_base
 

Macro Definition Documentation

#define ACCR   0x470

Definition at line 127 of file fpga.h.

#define AMSR   0x460

Definition at line 126 of file fpga.h.

#define BEEPR   0x410

Definition at line 121 of file fpga.h.

#define EXTASR   0x110

Definition at line 36 of file fpga.h.

#define FAER   0x150

Definition at line 49 of file fpga.h.

#define FPGACR   0x200

Definition at line 88 of file fpga.h.

#define FPGADR   0x0e0

Definition at line 33 of file fpga.h.

#define FPGAVR   0x0d0

Definition at line 32 of file fpga.h.

#define I2CCR   0x1e0

Definition at line 86 of file fpga.h.

#define I2CDR   0x1f0

Definition at line 87 of file fpga.h.

#define IASELR1   0x210

Definition at line 89 of file fpga.h.

#define IASELR10   0x2a0

Definition at line 98 of file fpga.h.

#define IASELR11   0x2b0

Definition at line 99 of file fpga.h.

#define IASELR12   0x2c0

Definition at line 100 of file fpga.h.

#define IASELR13   0x2d0

Definition at line 101 of file fpga.h.

#define IASELR14   0x2e0

Definition at line 102 of file fpga.h.

#define IASELR15   0x2f0

Definition at line 103 of file fpga.h.

#define IASELR2   0x220

Definition at line 90 of file fpga.h.

#define IASELR3   0x230

Definition at line 91 of file fpga.h.

#define IASELR4   0x240

Definition at line 92 of file fpga.h.

#define IASELR5   0x250

Definition at line 93 of file fpga.h.

#define IASELR6   0x260

Definition at line 94 of file fpga.h.

#define IASELR7   0x270

Definition at line 95 of file fpga.h.

#define IASELR8   0x280

Definition at line 96 of file fpga.h.

#define IASELR9   0x290

Definition at line 97 of file fpga.h.

#define IBSELR1   0x310

Definition at line 105 of file fpga.h.

#define IBSELR10   0x3a0

Definition at line 114 of file fpga.h.

#define IBSELR11   0x3b0

Definition at line 115 of file fpga.h.

#define IBSELR12   0x3c0

Definition at line 116 of file fpga.h.

#define IBSELR13   0x3d0

Definition at line 117 of file fpga.h.

#define IBSELR14   0x3e0

Definition at line 118 of file fpga.h.

#define IBSELR15   0x3f0

Definition at line 119 of file fpga.h.

#define IBSELR2   0x320

Definition at line 106 of file fpga.h.

#define IBSELR3   0x330

Definition at line 107 of file fpga.h.

#define IBSELR4   0x340

Definition at line 108 of file fpga.h.

#define IBSELR5   0x350

Definition at line 109 of file fpga.h.

#define IBSELR6   0x360

Definition at line 110 of file fpga.h.

#define IBSELR7   0x370

Definition at line 111 of file fpga.h.

#define IBSELR8   0x380

Definition at line 112 of file fpga.h.

#define IBSELR9   0x390

Definition at line 113 of file fpga.h.

#define INTAMR   0x020

Definition at line 12 of file fpga.h.

#define INTASR   0x010

Definition at line 11 of file fpga.h.

#define INTBMR   0x0a0

Definition at line 29 of file fpga.h.

#define INTBSR   0x090

Definition at line 28 of file fpga.h.

#define INTMSR   0x130

Definition at line 38 of file fpga.h.

#define INTTESTR   0x040

Definition at line 14 of file fpga.h.

#define LCLASR   0x180

Definition at line 54 of file fpga.h.

#define LCLASR_AREA_MASK   0x7

Definition at line 62 of file fpga.h.

#define LCLASR_FPGA_SEL_MASK   (LCLASR_AREA_MASK << LCLASR_FPGA_SEL_SHIFT)

Definition at line 64 of file fpga.h.

#define LCLASR_FPGA_SEL_SHIFT   12

Definition at line 57 of file fpga.h.

#define LCLASR_FRAMEN   BIT(15)

Definition at line 55 of file fpga.h.

#define LCLASR_NAND_SEL_MASK   (LCLASR_AREA_MASK << LCLASR_NAND_SEL_SHIFT)

Definition at line 65 of file fpga.h.

#define LCLASR_NAND_SEL_SHIFT   8

Definition at line 58 of file fpga.h.

#define LCLASR_NORA_SEL_MASK   (LCLASR_AREA_MASK << LCLASR_NORA_SEL_SHIFT)

Definition at line 67 of file fpga.h.

#define LCLASR_NORA_SEL_SHIFT   0

Definition at line 60 of file fpga.h.

#define LCLASR_NORB_SEL_MASK   (LCLASR_AREA_MASK << LCLASR_NORB_SEL_SHIFT)

Definition at line 66 of file fpga.h.

#define LCLASR_NORB_SEL_SHIFT   4

Definition at line 59 of file fpga.h.

#define MAPSWR   0x0c0

Definition at line 31 of file fpga.h.

#define MODSWR   0x030

Definition at line 13 of file fpga.h.

#define NMIMR   0x080

Definition at line 23 of file fpga.h.

#define NMIMR_AUX_NMIM   BIT(1) /* Auxiliary NMI mask */

Definition at line 25 of file fpga.h.

#define NMIMR_MAN_NMIM   BIT(0) /* Manual NMI mask */

Definition at line 24 of file fpga.h.

#define NMIMR_MASK   (NMIMR_MAN_NMIM | NMIMR_AUX_NMIM)

Definition at line 26 of file fpga.h.

#define NMISR   0x070

Definition at line 18 of file fpga.h.

#define NMISR_AUX_NMI   BIT(1)

Definition at line 20 of file fpga.h.

#define NMISR_MAN_NMI   BIT(0)

Definition at line 19 of file fpga.h.

#define NMISR_MASK   (NMISR_MAN_NMI | NMISR_AUX_NMI)

Definition at line 21 of file fpga.h.

#define NRGPR   0x060

Definition at line 16 of file fpga.h.

#define PCBRR   0x0f0

Definition at line 34 of file fpga.h.

#define PCIECR   0x140

Definition at line 40 of file fpga.h.

#define PCIECR_CLKEN   BIT(4) /* oscillator enable */

Definition at line 47 of file fpga.h.

#define PCIECR_PCIEMUX0   BIT(14)

Definition at line 42 of file fpga.h.

#define PCIECR_PCIEMUX1   BIT(15)

Definition at line 41 of file fpga.h.

#define PCIECR_PRST1   BIT(9) /* slot 1 card present */

Definition at line 46 of file fpga.h.

#define PCIECR_PRST2   BIT(10) /* slot 2 card present */

Definition at line 45 of file fpga.h.

#define PCIECR_PRST3   BIT(11) /* slot 3 card present */

Definition at line 44 of file fpga.h.

#define PCIECR_PRST4   BIT(12) /* slot 4 card present */

Definition at line 43 of file fpga.h.

#define PWRCR   0x1a0

Definition at line 73 of file fpga.h.

#define PWRCR_BKPRST   BIT(15) /* Backup power reset */

Definition at line 81 of file fpga.h.

#define PWRCR_BUPINIT   BIT(13) /* DDR backup initialize */

Definition at line 80 of file fpga.h.

#define PWRCR_INT2   BIT(11) /* INT2 connection to power manager */

Definition at line 79 of file fpga.h.

#define PWRCR_PDWNACK   BIT(5) /* Power down acknowledge */

Definition at line 77 of file fpga.h.

#define PWRCR_PDWNREQ   BIT(7) /* Power down request */

Definition at line 78 of file fpga.h.

#define PWRCR_SCIEN   BIT(2) /* Serial port enable */

Definition at line 76 of file fpga.h.

#define PWRCR_SCISEL0   BIT(0)

Definition at line 74 of file fpga.h.

#define PWRCR_SCISEL1   BIT(1)

Definition at line 75 of file fpga.h.

#define RSR   0x100

Definition at line 35 of file fpga.h.

#define SBCR   0x190

Definition at line 69 of file fpga.h.

#define SCBR_I2CCEN   BIT(1) /* CPU I2C master enable */

Definition at line 71 of file fpga.h.

#define SCBR_I2CMEN   BIT(0) /* FPGA I2C master enable */

Definition at line 70 of file fpga.h.

#define SDIFCR   0x480

Definition at line 128 of file fpga.h.

#define SDK7786_FPGA_I2CADDR (   reg)    ((reg) >> 3)

Definition at line 143 of file fpga.h.

#define SDK7786_FPGA_REGADDR (   reg)    (sdk7786_fpga_base + (reg))

Definition at line 137 of file fpga.h.

#define SMBCR   0x430

Definition at line 123 of file fpga.h.

#define SMBDR   0x440

Definition at line 124 of file fpga.h.

#define SPCAR   0x120

Definition at line 37 of file fpga.h.

#define SPCBR   0x1b0

Definition at line 83 of file fpga.h.

#define SPICR   0x1c0

Definition at line 84 of file fpga.h.

#define SPIDR   0x1d0

Definition at line 85 of file fpga.h.

#define SRSTR   0x000

Definition at line 8 of file fpga.h.

#define SRSTR_MAGIC   0x1971 /* Fixed magical read value */

Definition at line 9 of file fpga.h.

#define SYSSR   0x050

Definition at line 15 of file fpga.h.

#define USBCR   0x450

Definition at line 125 of file fpga.h.

#define USRACR   0x400

Definition at line 120 of file fpga.h.

#define USRGPIR   0x160

Definition at line 50 of file fpga.h.

#define USRLCDR   0x420

Definition at line 122 of file fpga.h.

#define USRLEDR   0x0b0

Definition at line 30 of file fpga.h.

Function Documentation

void sdk7786_fpga_init ( void  )

Definition at line 55 of file fpga.c.

void sdk7786_nmi_init ( void  )

Definition at line 51 of file nmi.c.

Variable Documentation

void __iomem* sdk7786_fpga_base

Definition at line 53 of file fpga.c.