~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h

Version: ~ [ linux-5.5-rc1 ] ~ [ linux-5.4.2 ] ~ [ linux-5.3.15 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.88 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.158 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.206 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.206 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.78 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef BCM63XX_IO_H_
  2 #define BCM63XX_IO_H_
  3 
  4 #include <asm/mach-bcm63xx/bcm63xx_cpu.h>
  5 
  6 /*
  7  * Physical memory map, RAM is mapped at 0x0.
  8  *
  9  * Note that size MUST be a power of two.
 10  */
 11 #define BCM_PCMCIA_COMMON_BASE_PA       (0x20000000)
 12 #define BCM_PCMCIA_COMMON_SIZE          (16 * 1024 * 1024)
 13 #define BCM_PCMCIA_COMMON_END_PA        (BCM_PCMCIA_COMMON_BASE_PA +    \
 14                                          BCM_PCMCIA_COMMON_SIZE - 1)
 15 
 16 #define BCM_PCMCIA_ATTR_BASE_PA         (0x21000000)
 17 #define BCM_PCMCIA_ATTR_SIZE            (16 * 1024 * 1024)
 18 #define BCM_PCMCIA_ATTR_END_PA          (BCM_PCMCIA_ATTR_BASE_PA +      \
 19                                          BCM_PCMCIA_ATTR_SIZE - 1)
 20 
 21 #define BCM_PCMCIA_IO_BASE_PA           (0x22000000)
 22 #define BCM_PCMCIA_IO_SIZE              (64 * 1024)
 23 #define BCM_PCMCIA_IO_END_PA            (BCM_PCMCIA_IO_BASE_PA +        \
 24                                         BCM_PCMCIA_IO_SIZE - 1)
 25 
 26 #define BCM_PCI_MEM_BASE_PA             (0x30000000)
 27 #define BCM_PCI_MEM_SIZE                (128 * 1024 * 1024)
 28 #define BCM_PCI_MEM_END_PA              (BCM_PCI_MEM_BASE_PA +          \
 29                                         BCM_PCI_MEM_SIZE - 1)
 30 
 31 #define BCM_PCI_IO_BASE_PA              (0x08000000)
 32 #define BCM_PCI_IO_SIZE                 (64 * 1024)
 33 #define BCM_PCI_IO_END_PA               (BCM_PCI_IO_BASE_PA +           \
 34                                         BCM_PCI_IO_SIZE - 1)
 35 #define BCM_PCI_IO_HALF_PA              (BCM_PCI_IO_BASE_PA +           \
 36                                         (BCM_PCI_IO_SIZE / 2) - 1)
 37 
 38 #define BCM_CB_MEM_BASE_PA              (0x38000000)
 39 #define BCM_CB_MEM_SIZE                 (128 * 1024 * 1024)
 40 #define BCM_CB_MEM_END_PA               (BCM_CB_MEM_BASE_PA +           \
 41                                         BCM_CB_MEM_SIZE - 1)
 42 
 43 #define BCM_PCIE_MEM_BASE_PA            0x10f00000
 44 #define BCM_PCIE_MEM_SIZE               (16 * 1024 * 1024)
 45 #define BCM_PCIE_MEM_END_PA             (BCM_PCIE_MEM_BASE_PA +         \
 46                                         BCM_PCIE_MEM_SIZE - 1)
 47 
 48 /*
 49  * Internal registers are accessed through KSEG3
 50  */
 51 #define BCM_REGS_VA(x)  ((void __iomem *)(x))
 52 
 53 #define bcm_readb(a)    (*(volatile unsigned char *)    BCM_REGS_VA(a))
 54 #define bcm_readw(a)    (*(volatile unsigned short *)   BCM_REGS_VA(a))
 55 #define bcm_readl(a)    (*(volatile unsigned int *)     BCM_REGS_VA(a))
 56 #define bcm_readq(a)    (*(volatile u64 *)              BCM_REGS_VA(a))
 57 #define bcm_writeb(v, a) (*(volatile unsigned char *) BCM_REGS_VA((a)) = (v))
 58 #define bcm_writew(v, a) (*(volatile unsigned short *) BCM_REGS_VA((a)) = (v))
 59 #define bcm_writel(v, a) (*(volatile unsigned int *) BCM_REGS_VA((a)) = (v))
 60 #define bcm_writeq(v, a) (*(volatile u64 *) BCM_REGS_VA((a)) = (v))
 61 
 62 /*
 63  * IO helpers to access register set for current CPU
 64  */
 65 #define bcm_rset_readb(s, o)    bcm_readb(bcm63xx_regset_address(s) + (o))
 66 #define bcm_rset_readw(s, o)    bcm_readw(bcm63xx_regset_address(s) + (o))
 67 #define bcm_rset_readl(s, o)    bcm_readl(bcm63xx_regset_address(s) + (o))
 68 #define bcm_rset_writeb(s, v, o)        bcm_writeb((v), \
 69                                         bcm63xx_regset_address(s) + (o))
 70 #define bcm_rset_writew(s, v, o)        bcm_writew((v), \
 71                                         bcm63xx_regset_address(s) + (o))
 72 #define bcm_rset_writel(s, v, o)        bcm_writel((v), \
 73                                         bcm63xx_regset_address(s) + (o))
 74 
 75 /*
 76  * helpers for frequently used register sets
 77  */
 78 #define bcm_perf_readl(o)       bcm_rset_readl(RSET_PERF, (o))
 79 #define bcm_perf_writel(v, o)   bcm_rset_writel(RSET_PERF, (v), (o))
 80 #define bcm_timer_readl(o)      bcm_rset_readl(RSET_TIMER, (o))
 81 #define bcm_timer_writel(v, o)  bcm_rset_writel(RSET_TIMER, (v), (o))
 82 #define bcm_wdt_readl(o)        bcm_rset_readl(RSET_WDT, (o))
 83 #define bcm_wdt_writel(v, o)    bcm_rset_writel(RSET_WDT, (v), (o))
 84 #define bcm_gpio_readl(o)       bcm_rset_readl(RSET_GPIO, (o))
 85 #define bcm_gpio_writel(v, o)   bcm_rset_writel(RSET_GPIO, (v), (o))
 86 #define bcm_uart0_readl(o)      bcm_rset_readl(RSET_UART0, (o))
 87 #define bcm_uart0_writel(v, o)  bcm_rset_writel(RSET_UART0, (v), (o))
 88 #define bcm_mpi_readl(o)        bcm_rset_readl(RSET_MPI, (o))
 89 #define bcm_mpi_writel(v, o)    bcm_rset_writel(RSET_MPI, (v), (o))
 90 #define bcm_pcmcia_readl(o)     bcm_rset_readl(RSET_PCMCIA, (o))
 91 #define bcm_pcmcia_writel(v, o) bcm_rset_writel(RSET_PCMCIA, (v), (o))
 92 #define bcm_pcie_readl(o)       bcm_rset_readl(RSET_PCIE, (o))
 93 #define bcm_pcie_writel(v, o)   bcm_rset_writel(RSET_PCIE, (v), (o))
 94 #define bcm_sdram_readl(o)      bcm_rset_readl(RSET_SDRAM, (o))
 95 #define bcm_sdram_writel(v, o)  bcm_rset_writel(RSET_SDRAM, (v), (o))
 96 #define bcm_memc_readl(o)       bcm_rset_readl(RSET_MEMC, (o))
 97 #define bcm_memc_writel(v, o)   bcm_rset_writel(RSET_MEMC, (v), (o))
 98 #define bcm_ddr_readl(o)        bcm_rset_readl(RSET_DDR, (o))
 99 #define bcm_ddr_writel(v, o)    bcm_rset_writel(RSET_DDR, (v), (o))
100 #define bcm_misc_readl(o)       bcm_rset_readl(RSET_MISC, (o))
101 #define bcm_misc_writel(v, o)   bcm_rset_writel(RSET_MISC, (v), (o))
102 
103 #endif /* ! BCM63XX_IO_H_ */
104 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp