Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
jmr3927.h File Reference
#include <asm/txx9/tx3927.h>
#include <asm/addrspace.h>
#include <asm/txx9irq.h>

Go to the source code of this file.

Macros

#define JMR3927_ROMCE0   0x1fc00000 /* 4M */
 
#define JMR3927_ROMCE1   0x1e000000 /* 4M */
 
#define JMR3927_ROMCE2   0x14000000 /* 16M */
 
#define JMR3927_ROMCE3   0x10000000 /* 64M */
 
#define JMR3927_ROMCE5   0x1d000000 /* 4M */
 
#define JMR3927_SDCS0   0x00000000 /* 32M */
 
#define JMR3927_SDCS1   0x02000000 /* 32M */
 
#define JMR3927_PCIMEM   0x08000000
 
#define JMR3927_PCIMEM_SIZE   0x08000000 /* 128M */
 
#define JMR3927_PCIIO   0x15000000
 
#define JMR3927_PCIIO_SIZE   0x01000000 /* 16M */
 
#define JMR3927_SDRAM_SIZE   0x02000000 /* 32M */
 
#define JMR3927_PORT_BASE   KSEG1
 
#define JMR3927_ROM0_BASE   (KSEG1 + JMR3927_ROMCE0)
 
#define JMR3927_ROM1_BASE   (KSEG1 + JMR3927_ROMCE1)
 
#define JMR3927_IOC_BASE   (KSEG1 + JMR3927_ROMCE2)
 
#define JMR3927_PCIMEM_BASE   (KSEG1 + JMR3927_PCIMEM)
 
#define JMR3927_PCIIO_BASE   (KSEG1 + JMR3927_PCIIO)
 
#define JMR3927_IOC_REV_ADDR   (JMR3927_IOC_BASE + 0x00000000)
 
#define JMR3927_IOC_NVRAMB_ADDR   (JMR3927_IOC_BASE + 0x00010000)
 
#define JMR3927_IOC_LED_ADDR   (JMR3927_IOC_BASE + 0x00020000)
 
#define JMR3927_IOC_DIPSW_ADDR   (JMR3927_IOC_BASE + 0x00030000)
 
#define JMR3927_IOC_BREV_ADDR   (JMR3927_IOC_BASE + 0x00040000)
 
#define JMR3927_IOC_DTR_ADDR   (JMR3927_IOC_BASE + 0x00050000)
 
#define JMR3927_IOC_INTS1_ADDR   (JMR3927_IOC_BASE + 0x00080000)
 
#define JMR3927_IOC_INTS2_ADDR   (JMR3927_IOC_BASE + 0x00090000)
 
#define JMR3927_IOC_INTM_ADDR   (JMR3927_IOC_BASE + 0x000a0000)
 
#define JMR3927_IOC_INTP_ADDR   (JMR3927_IOC_BASE + 0x000b0000)
 
#define JMR3927_IOC_RESET_ADDR   (JMR3927_IOC_BASE + 0x000f0000)
 
#define JMR3927_FLASH_BASE   (JMR3927_ROM0_BASE)
 
#define JMR3927_FLASH_SIZE   0x00400000
 
#define JMR3927_IDT_MASK   0xfc
 
#define JMR3927_REV_MASK   0x03
 
#define JMR3927_IOC_IDT   0xe0
 
#define JMR3927_IOC_INTB_PCIA   0
 
#define JMR3927_IOC_INTB_PCIB   1
 
#define JMR3927_IOC_INTB_PCIC   2
 
#define JMR3927_IOC_INTB_PCID   3
 
#define JMR3927_IOC_INTB_MODEM   4
 
#define JMR3927_IOC_INTB_INT6   5
 
#define JMR3927_IOC_INTB_INT7   6
 
#define JMR3927_IOC_INTB_SOFT   7
 
#define JMR3927_IOC_INTF_PCIA   (1 << JMR3927_IOC_INTF_PCIA)
 
#define JMR3927_IOC_INTF_PCIB   (1 << JMR3927_IOC_INTB_PCIB)
 
#define JMR3927_IOC_INTF_PCIC   (1 << JMR3927_IOC_INTB_PCIC)
 
#define JMR3927_IOC_INTF_PCID   (1 << JMR3927_IOC_INTB_PCID)
 
#define JMR3927_IOC_INTF_MODEM   (1 << JMR3927_IOC_INTB_MODEM)
 
#define JMR3927_IOC_INTF_INT6   (1 << JMR3927_IOC_INTB_INT6)
 
#define JMR3927_IOC_INTF_INT7   (1 << JMR3927_IOC_INTB_INT7)
 
#define JMR3927_IOC_INTF_SOFT   (1 << JMR3927_IOC_INTB_SOFT)
 
#define JMR3927_IOC_RESET_CPU   1
 
#define JMR3927_IOC_RESET_PCI   2
 
#define jmr3927_led_set(n)   jmr3927_ioc_reg_out(~(n), JMR3927_IOC_LED_ADDR)
 
#define jmr3927_led_and_set(n)   jmr3927_ioc_reg_out((~(n)) & jmr3927_ioc_reg_in(JMR3927_IOC_LED_ADDR), JMR3927_IOC_LED_ADDR)
 
#define jmr3927_dipsw1()   (gpio_get_value(11) == 0)
 
#define jmr3927_dipsw2()   (gpio_get_value(10) == 0)
 
#define jmr3927_dipsw3()   ((jmr3927_ioc_reg_in(JMR3927_IOC_DIPSW_ADDR) & 2) == 0)
 
#define jmr3927_dipsw4()   ((jmr3927_ioc_reg_in(JMR3927_IOC_DIPSW_ADDR) & 1) == 0)
 
#define JMR3927_NR_IRQ_IRC   16 /* On-Chip IRC */
 
#define JMR3927_NR_IRQ_IOC   8 /* PCI/MODEM/INT[6:7] */
 
#define JMR3927_IRQ_IRC   TXX9_IRQ_BASE
 
#define JMR3927_IRQ_IOC   (JMR3927_IRQ_IRC + JMR3927_NR_IRQ_IRC)
 
#define JMR3927_IRQ_END   (JMR3927_IRQ_IOC + JMR3927_NR_IRQ_IOC)
 
#define JMR3927_IRQ_IRC_INT0   (JMR3927_IRQ_IRC + TX3927_IR_INT0)
 
#define JMR3927_IRQ_IRC_INT1   (JMR3927_IRQ_IRC + TX3927_IR_INT1)
 
#define JMR3927_IRQ_IRC_INT2   (JMR3927_IRQ_IRC + TX3927_IR_INT2)
 
#define JMR3927_IRQ_IRC_INT3   (JMR3927_IRQ_IRC + TX3927_IR_INT3)
 
#define JMR3927_IRQ_IRC_INT4   (JMR3927_IRQ_IRC + TX3927_IR_INT4)
 
#define JMR3927_IRQ_IRC_INT5   (JMR3927_IRQ_IRC + TX3927_IR_INT5)
 
#define JMR3927_IRQ_IRC_SIO0   (JMR3927_IRQ_IRC + TX3927_IR_SIO0)
 
#define JMR3927_IRQ_IRC_SIO1   (JMR3927_IRQ_IRC + TX3927_IR_SIO1)
 
#define JMR3927_IRQ_IRC_SIO(ch)   (JMR3927_IRQ_IRC + TX3927_IR_SIO(ch))
 
#define JMR3927_IRQ_IRC_DMA   (JMR3927_IRQ_IRC + TX3927_IR_DMA)
 
#define JMR3927_IRQ_IRC_PIO   (JMR3927_IRQ_IRC + TX3927_IR_PIO)
 
#define JMR3927_IRQ_IRC_PCI   (JMR3927_IRQ_IRC + TX3927_IR_PCI)
 
#define JMR3927_IRQ_IRC_TMR(ch)   (JMR3927_IRQ_IRC + TX3927_IR_TMR(ch))
 
#define JMR3927_IRQ_IOC_PCIA   (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIA)
 
#define JMR3927_IRQ_IOC_PCIB   (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIB)
 
#define JMR3927_IRQ_IOC_PCIC   (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIC)
 
#define JMR3927_IRQ_IOC_PCID   (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCID)
 
#define JMR3927_IRQ_IOC_MODEM   (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_MODEM)
 
#define JMR3927_IRQ_IOC_INT6   (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_INT6)
 
#define JMR3927_IRQ_IOC_INT7   (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_INT7)
 
#define JMR3927_IRQ_IOC_SOFT   (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_SOFT)
 
#define JMR3927_IRQ_IOCINT   JMR3927_IRQ_IRC_INT1
 
#define JMR3927_IRQ_ETHER0   JMR3927_IRQ_IRC_INT3
 
#define JMR3927_CORECLK   132710400 /* 132.7MHz */
 

Functions

void jmr3927_prom_init (void)
 
void jmr3927_irq_setup (void)
 
int jmr3927_pci_map_irq (const struct pci_dev *dev, u8 slot, u8 pin)
 

Macro Definition Documentation

#define JMR3927_CORECLK   132710400 /* 132.7MHz */

Definition at line 150 of file jmr3927.h.

#define jmr3927_dipsw1 ( )    (gpio_get_value(11) == 0)

Definition at line 101 of file jmr3927.h.

#define jmr3927_dipsw2 ( )    (gpio_get_value(10) == 0)

Definition at line 102 of file jmr3927.h.

#define jmr3927_dipsw3 ( )    ((jmr3927_ioc_reg_in(JMR3927_IOC_DIPSW_ADDR) & 2) == 0)

Definition at line 103 of file jmr3927.h.

#define jmr3927_dipsw4 ( )    ((jmr3927_ioc_reg_in(JMR3927_IOC_DIPSW_ADDR) & 1) == 0)

Definition at line 104 of file jmr3927.h.

#define JMR3927_FLASH_BASE   (JMR3927_ROM0_BASE)

Definition at line 55 of file jmr3927.h.

#define JMR3927_FLASH_SIZE   0x00400000

Definition at line 56 of file jmr3927.h.

#define JMR3927_IDT_MASK   0xfc

Definition at line 59 of file jmr3927.h.

#define JMR3927_IOC_BASE   (KSEG1 + JMR3927_ROMCE2)

Definition at line 38 of file jmr3927.h.

#define JMR3927_IOC_BREV_ADDR   (JMR3927_IOC_BASE + 0x00040000)

Definition at line 46 of file jmr3927.h.

#define JMR3927_IOC_DIPSW_ADDR   (JMR3927_IOC_BASE + 0x00030000)

Definition at line 45 of file jmr3927.h.

#define JMR3927_IOC_DTR_ADDR   (JMR3927_IOC_BASE + 0x00050000)

Definition at line 47 of file jmr3927.h.

#define JMR3927_IOC_IDT   0xe0

Definition at line 61 of file jmr3927.h.

#define JMR3927_IOC_INTB_INT6   5

Definition at line 69 of file jmr3927.h.

#define JMR3927_IOC_INTB_INT7   6

Definition at line 70 of file jmr3927.h.

#define JMR3927_IOC_INTB_MODEM   4

Definition at line 68 of file jmr3927.h.

#define JMR3927_IOC_INTB_PCIA   0

Definition at line 64 of file jmr3927.h.

#define JMR3927_IOC_INTB_PCIB   1

Definition at line 65 of file jmr3927.h.

#define JMR3927_IOC_INTB_PCIC   2

Definition at line 66 of file jmr3927.h.

#define JMR3927_IOC_INTB_PCID   3

Definition at line 67 of file jmr3927.h.

#define JMR3927_IOC_INTB_SOFT   7

Definition at line 71 of file jmr3927.h.

#define JMR3927_IOC_INTF_INT6   (1 << JMR3927_IOC_INTB_INT6)

Definition at line 77 of file jmr3927.h.

#define JMR3927_IOC_INTF_INT7   (1 << JMR3927_IOC_INTB_INT7)

Definition at line 78 of file jmr3927.h.

#define JMR3927_IOC_INTF_MODEM   (1 << JMR3927_IOC_INTB_MODEM)

Definition at line 76 of file jmr3927.h.

#define JMR3927_IOC_INTF_PCIA   (1 << JMR3927_IOC_INTF_PCIA)

Definition at line 72 of file jmr3927.h.

#define JMR3927_IOC_INTF_PCIB   (1 << JMR3927_IOC_INTB_PCIB)

Definition at line 73 of file jmr3927.h.

#define JMR3927_IOC_INTF_PCIC   (1 << JMR3927_IOC_INTB_PCIC)

Definition at line 74 of file jmr3927.h.

#define JMR3927_IOC_INTF_PCID   (1 << JMR3927_IOC_INTB_PCID)

Definition at line 75 of file jmr3927.h.

#define JMR3927_IOC_INTF_SOFT   (1 << JMR3927_IOC_INTB_SOFT)

Definition at line 79 of file jmr3927.h.

#define JMR3927_IOC_INTM_ADDR   (JMR3927_IOC_BASE + 0x000a0000)

Definition at line 50 of file jmr3927.h.

#define JMR3927_IOC_INTP_ADDR   (JMR3927_IOC_BASE + 0x000b0000)

Definition at line 51 of file jmr3927.h.

#define JMR3927_IOC_INTS1_ADDR   (JMR3927_IOC_BASE + 0x00080000)

Definition at line 48 of file jmr3927.h.

#define JMR3927_IOC_INTS2_ADDR   (JMR3927_IOC_BASE + 0x00090000)

Definition at line 49 of file jmr3927.h.

#define JMR3927_IOC_LED_ADDR   (JMR3927_IOC_BASE + 0x00020000)

Definition at line 44 of file jmr3927.h.

#define JMR3927_IOC_NVRAMB_ADDR   (JMR3927_IOC_BASE + 0x00010000)

Definition at line 43 of file jmr3927.h.

#define JMR3927_IOC_RESET_ADDR   (JMR3927_IOC_BASE + 0x000f0000)

Definition at line 52 of file jmr3927.h.

#define JMR3927_IOC_RESET_CPU   1

Definition at line 82 of file jmr3927.h.

#define JMR3927_IOC_RESET_PCI   2

Definition at line 83 of file jmr3927.h.

#define JMR3927_IOC_REV_ADDR   (JMR3927_IOC_BASE + 0x00000000)

Definition at line 42 of file jmr3927.h.

#define JMR3927_IRQ_END   (JMR3927_IRQ_IOC + JMR3927_NR_IRQ_IOC)

Definition at line 120 of file jmr3927.h.

#define JMR3927_IRQ_ETHER0   JMR3927_IRQ_IRC_INT3

Definition at line 147 of file jmr3927.h.

#define JMR3927_IRQ_IOC   (JMR3927_IRQ_IRC + JMR3927_NR_IRQ_IRC)

Definition at line 119 of file jmr3927.h.

#define JMR3927_IRQ_IOC_INT6   (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_INT6)

Definition at line 140 of file jmr3927.h.

#define JMR3927_IRQ_IOC_INT7   (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_INT7)

Definition at line 141 of file jmr3927.h.

#define JMR3927_IRQ_IOC_MODEM   (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_MODEM)

Definition at line 139 of file jmr3927.h.

#define JMR3927_IRQ_IOC_PCIA   (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIA)

Definition at line 135 of file jmr3927.h.

#define JMR3927_IRQ_IOC_PCIB   (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIB)

Definition at line 136 of file jmr3927.h.

#define JMR3927_IRQ_IOC_PCIC   (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIC)

Definition at line 137 of file jmr3927.h.

#define JMR3927_IRQ_IOC_PCID   (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCID)

Definition at line 138 of file jmr3927.h.

#define JMR3927_IRQ_IOC_SOFT   (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_SOFT)

Definition at line 142 of file jmr3927.h.

#define JMR3927_IRQ_IOCINT   JMR3927_IRQ_IRC_INT1

Definition at line 145 of file jmr3927.h.

#define JMR3927_IRQ_IRC   TXX9_IRQ_BASE

Definition at line 118 of file jmr3927.h.

#define JMR3927_IRQ_IRC_DMA   (JMR3927_IRQ_IRC + TX3927_IR_DMA)

Definition at line 131 of file jmr3927.h.

#define JMR3927_IRQ_IRC_INT0   (JMR3927_IRQ_IRC + TX3927_IR_INT0)

Definition at line 122 of file jmr3927.h.

#define JMR3927_IRQ_IRC_INT1   (JMR3927_IRQ_IRC + TX3927_IR_INT1)

Definition at line 123 of file jmr3927.h.

#define JMR3927_IRQ_IRC_INT2   (JMR3927_IRQ_IRC + TX3927_IR_INT2)

Definition at line 124 of file jmr3927.h.

#define JMR3927_IRQ_IRC_INT3   (JMR3927_IRQ_IRC + TX3927_IR_INT3)

Definition at line 125 of file jmr3927.h.

#define JMR3927_IRQ_IRC_INT4   (JMR3927_IRQ_IRC + TX3927_IR_INT4)

Definition at line 126 of file jmr3927.h.

#define JMR3927_IRQ_IRC_INT5   (JMR3927_IRQ_IRC + TX3927_IR_INT5)

Definition at line 127 of file jmr3927.h.

#define JMR3927_IRQ_IRC_PCI   (JMR3927_IRQ_IRC + TX3927_IR_PCI)

Definition at line 133 of file jmr3927.h.

#define JMR3927_IRQ_IRC_PIO   (JMR3927_IRQ_IRC + TX3927_IR_PIO)

Definition at line 132 of file jmr3927.h.

#define JMR3927_IRQ_IRC_SIO (   ch)    (JMR3927_IRQ_IRC + TX3927_IR_SIO(ch))

Definition at line 130 of file jmr3927.h.

#define JMR3927_IRQ_IRC_SIO0   (JMR3927_IRQ_IRC + TX3927_IR_SIO0)

Definition at line 128 of file jmr3927.h.

#define JMR3927_IRQ_IRC_SIO1   (JMR3927_IRQ_IRC + TX3927_IR_SIO1)

Definition at line 129 of file jmr3927.h.

#define JMR3927_IRQ_IRC_TMR (   ch)    (JMR3927_IRQ_IRC + TX3927_IR_TMR(ch))

Definition at line 134 of file jmr3927.h.

#define jmr3927_led_and_set (   n)    jmr3927_ioc_reg_out((~(n)) & jmr3927_ioc_reg_in(JMR3927_IOC_LED_ADDR), JMR3927_IOC_LED_ADDR)

Definition at line 98 of file jmr3927.h.

#define jmr3927_led_set (   n)    jmr3927_ioc_reg_out(~(n), JMR3927_IOC_LED_ADDR)

Definition at line 96 of file jmr3927.h.

#define JMR3927_NR_IRQ_IOC   8 /* PCI/MODEM/INT[6:7] */

Definition at line 116 of file jmr3927.h.

#define JMR3927_NR_IRQ_IRC   16 /* On-Chip IRC */

Definition at line 115 of file jmr3927.h.

#define JMR3927_PCIIO   0x15000000

Definition at line 29 of file jmr3927.h.

#define JMR3927_PCIIO_BASE   (KSEG1 + JMR3927_PCIIO)

Definition at line 40 of file jmr3927.h.

#define JMR3927_PCIIO_SIZE   0x01000000 /* 16M */

Definition at line 30 of file jmr3927.h.

#define JMR3927_PCIMEM   0x08000000

Definition at line 27 of file jmr3927.h.

#define JMR3927_PCIMEM_BASE   (KSEG1 + JMR3927_PCIMEM)

Definition at line 39 of file jmr3927.h.

#define JMR3927_PCIMEM_SIZE   0x08000000 /* 128M */

Definition at line 28 of file jmr3927.h.

#define JMR3927_PORT_BASE   KSEG1

Definition at line 33 of file jmr3927.h.

#define JMR3927_REV_MASK   0x03

Definition at line 60 of file jmr3927.h.

#define JMR3927_ROM0_BASE   (KSEG1 + JMR3927_ROMCE0)

Definition at line 36 of file jmr3927.h.

#define JMR3927_ROM1_BASE   (KSEG1 + JMR3927_ROMCE1)

Definition at line 37 of file jmr3927.h.

#define JMR3927_ROMCE0   0x1fc00000 /* 4M */

Definition at line 18 of file jmr3927.h.

#define JMR3927_ROMCE1   0x1e000000 /* 4M */

Definition at line 19 of file jmr3927.h.

#define JMR3927_ROMCE2   0x14000000 /* 16M */

Definition at line 20 of file jmr3927.h.

#define JMR3927_ROMCE3   0x10000000 /* 64M */

Definition at line 21 of file jmr3927.h.

#define JMR3927_ROMCE5   0x1d000000 /* 4M */

Definition at line 22 of file jmr3927.h.

#define JMR3927_SDCS0   0x00000000 /* 32M */

Definition at line 23 of file jmr3927.h.

#define JMR3927_SDCS1   0x02000000 /* 32M */

Definition at line 24 of file jmr3927.h.

#define JMR3927_SDRAM_SIZE   0x02000000 /* 32M */

Definition at line 32 of file jmr3927.h.

Function Documentation

void jmr3927_irq_setup ( void  )

Definition at line 102 of file irq.c.

int jmr3927_pci_map_irq ( const struct pci_dev dev,
u8  slot,
u8  pin 
)

Definition at line 34 of file fixup-jmr3927.c.

void jmr3927_prom_init ( void  )

Definition at line 44 of file prom.c.