Go to the documentation of this file.
32 #include <asm/addrspace.h>
33 #include <linux/types.h>
35 #ifndef _ASM_MSP_REGS_H
36 #define _ASM_MSP_REGS_H
49 #define MSP_SLP_BASE 0x1c000000
51 #define MSP_RST_BASE (MSP_SLP_BASE + 0x10)
53 #define MSP_RST_SIZE 0x0C
55 #define MSP_WTIMER_BASE (MSP_SLP_BASE + 0x04C)
57 #define MSP_ITIMER_BASE (MSP_SLP_BASE + 0x054)
59 #define MSP_UART0_BASE (MSP_SLP_BASE + 0x100)
61 #define MSP_BCPY_CTRL_BASE (MSP_SLP_BASE + 0x120)
63 #define MSP_BCPY_DESC_BASE (MSP_SLP_BASE + 0x160)
71 #define MSP_PCI_BASE 0x19000000
78 #define MSP_MSB_BASE 0x18000000
80 #define MSP_PER_BASE (MSP_MSB_BASE + 0x400000)
82 #define MSP_MAC0_BASE (MSP_MSB_BASE + 0x600000)
84 #define MSP_MAC1_BASE (MSP_MSB_BASE + 0x700000)
86 #define MSP_MAC_SIZE 0xE0
88 #define MSP_SEC_BASE (MSP_MSB_BASE + 0x800000)
90 #define MSP_MAC2_BASE (MSP_MSB_BASE + 0x900000)
92 #define MSP_ADSL2_BASE (MSP_MSB_BASE + 0xA80000)
94 #define MSP_USB0_BASE (MSP_MSB_BASE + 0xB00000)
96 #define MSP_USB1_BASE (MSP_MSB_BASE + 0x300000)
98 #define MSP_CPUIF_BASE (MSP_MSB_BASE + 0xC00000)
102 #define MSP_UART1_BASE (MSP_PER_BASE + 0x030)
104 #define MSP_SPI_BASE (MSP_PER_BASE + 0x058)
106 #define MSP_TWI_BASE (MSP_PER_BASE + 0x090)
108 #define MSP_PTIMER_BASE (MSP_PER_BASE + 0x0F0)
116 #define MSP_MEM_CFG_BASE 0x17f00000
118 #define MSP_MEM_INDIRECT_CTL_10 0x10
159 #define regptr(addr) (KSEG1ADDR(addr))
161 #define regptr(addr) ((volatile u32 *const)(KSEG1ADDR(addr)))
171 #define DEV_ID_REG regptr(MSP_SLP_BASE + 0x00)
173 #define FWR_ID_REG regptr(MSP_SLP_BASE + 0x04)
175 #define SYS_ID_REG0 regptr(MSP_SLP_BASE + 0x08)
177 #define SYS_ID_REG1 regptr(MSP_SLP_BASE + 0x0C)
181 #define RST_STS_REG regptr(MSP_SLP_BASE + 0x10)
183 #define RST_SET_REG regptr(MSP_SLP_BASE + 0x14)
185 #define RST_CLR_REG regptr(MSP_SLP_BASE + 0x18)
189 #define PCI_SLP_REG regptr(MSP_SLP_BASE + 0x1C)
191 #define URT_SLP_REG regptr(MSP_SLP_BASE + 0x20)
195 #define PLL1_SLP_REG regptr(MSP_SLP_BASE + 0x2C)
197 #define PLL0_SLP_REG regptr(MSP_SLP_BASE + 0x30)
199 #define MIPS_SLP_REG regptr(MSP_SLP_BASE + 0x34)
201 #define VE_SLP_REG regptr(MSP_SLP_BASE + 0x38)
204 #define MSB_SLP_REG regptr(MSP_SLP_BASE + 0x40)
206 #define SMAC_SLP_REG regptr(MSP_SLP_BASE + 0x44)
208 #define PERF_SLP_REG regptr(MSP_SLP_BASE + 0x48)
212 #define SLP_INT_STS_REG regptr(MSP_SLP_BASE + 0x70)
214 #define SLP_INT_MSK_REG regptr(MSP_SLP_BASE + 0x74)
216 #define SE_MBOX_REG regptr(MSP_SLP_BASE + 0x78)
218 #define VE_MBOX_REG regptr(MSP_SLP_BASE + 0x7C)
222 #define CS0_CNFG_REG regptr(MSP_SLP_BASE + 0x80)
224 #define CS0_ADDR_REG regptr(MSP_SLP_BASE + 0x84)
226 #define CS0_MASK_REG regptr(MSP_SLP_BASE + 0x88)
228 #define CS0_ACCESS_REG regptr(MSP_SLP_BASE + 0x8C)
231 #define CS1_CNFG_REG regptr(MSP_SLP_BASE + 0x90)
233 #define CS1_ADDR_REG regptr(MSP_SLP_BASE + 0x94)
235 #define CS1_MASK_REG regptr(MSP_SLP_BASE + 0x98)
237 #define CS1_ACCESS_REG regptr(MSP_SLP_BASE + 0x9C)
240 #define CS2_CNFG_REG regptr(MSP_SLP_BASE + 0xA0)
242 #define CS2_ADDR_REG regptr(MSP_SLP_BASE + 0xA4)
244 #define CS2_MASK_REG regptr(MSP_SLP_BASE + 0xA8)
246 #define CS2_ACCESS_REG regptr(MSP_SLP_BASE + 0xAC)
249 #define CS3_CNFG_REG regptr(MSP_SLP_BASE + 0xB0)
251 #define CS3_ADDR_REG regptr(MSP_SLP_BASE + 0xB4)
253 #define CS3_MASK_REG regptr(MSP_SLP_BASE + 0xB8)
255 #define CS3_ACCESS_REG regptr(MSP_SLP_BASE + 0xBC)
258 #define CS4_CNFG_REG regptr(MSP_SLP_BASE + 0xC0)
260 #define CS4_ADDR_REG regptr(MSP_SLP_BASE + 0xC4)
262 #define CS4_MASK_REG regptr(MSP_SLP_BASE + 0xC8)
264 #define CS4_ACCESS_REG regptr(MSP_SLP_BASE + 0xCC)
267 #define CS5_CNFG_REG regptr(MSP_SLP_BASE + 0xD0)
269 #define CS5_ADDR_REG regptr(MSP_SLP_BASE + 0xD4)
271 #define CS5_MASK_REG regptr(MSP_SLP_BASE + 0xD8)
273 #define CS5_ACCESS_REG regptr(MSP_SLP_BASE + 0xDC)
277 #define ELB_1PC_EN_REG regptr(MSP_SLP_BASE + 0xEC)
281 #define ELB_CLK_CFG_REG regptr(MSP_SLP_BASE + 0xFC)
285 #define UART0_STATUS_REG regptr(MSP_UART0_BASE + 0x0c0)
287 #define UART1_STATUS_REG regptr(MSP_UART1_BASE + 0x170)
291 #define PERF_MON_CTRL_REG regptr(MSP_SLP_BASE + 0x140)
293 #define PERF_MON_CLR_REG regptr(MSP_SLP_BASE + 0x144)
295 #define PERF_MON_CNTH_REG regptr(MSP_SLP_BASE + 0x148)
297 #define PERF_MON_CNTL_REG regptr(MSP_SLP_BASE + 0x14C)
301 #define SYS_CTRL_REG regptr(MSP_SLP_BASE + 0x150)
303 #define SYS_ERR1_REG regptr(MSP_SLP_BASE + 0x154)
305 #define SYS_ERR2_REG regptr(MSP_SLP_BASE + 0x158)
307 #define SYS_INT_CFG_REG regptr(MSP_SLP_BASE + 0x15C)
311 #define VE_MEM_REG regptr(MSP_SLP_BASE + 0x17C)
315 #define CPU_ERR1_REG regptr(MSP_SLP_BASE + 0x180)
317 #define CPU_ERR2_REG regptr(MSP_SLP_BASE + 0x184)
321 #define EXTENDED_GPIO1_REG regptr(MSP_SLP_BASE + 0x188)
322 #define EXTENDED_GPIO2_REG regptr(MSP_SLP_BASE + 0x18c)
323 #define EXTENDED_GPIO_REG EXTENDED_GPIO1_REG
327 #define SLP_ERR_STS_REG regptr(MSP_SLP_BASE + 0x190)
329 #define SLP_ERR_MSK_REG regptr(MSP_SLP_BASE + 0x194)
331 #define SLP_ELB_ERST_REG regptr(MSP_SLP_BASE + 0x198)
333 #define SLP_BOOT_STS_REG regptr(MSP_SLP_BASE + 0x19C)
337 #define CS0_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1A0)
339 #define CS1_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1A4)
341 #define CS2_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1A8)
343 #define CS3_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1AC)
346 #define CS5_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1B4)
350 #define PLL_LOCK_REG regptr(MSP_SLP_BASE + 0x200)
352 #define PLL_ARST_REG regptr(MSP_SLP_BASE + 0x204)
354 #define PLL0_ADJ_REG regptr(MSP_SLP_BASE + 0x208)
356 #define PLL1_ADJ_REG regptr(MSP_SLP_BASE + 0x20C)
366 #define PER_CTRL_REG regptr(MSP_PER_BASE + 0x50)
368 #define PER_STS_REG regptr(MSP_PER_BASE + 0x54)
372 #define SMPI_TX_SZ_REG regptr(MSP_PER_BASE + 0x58)
374 #define SMPI_RX_SZ_REG regptr(MSP_PER_BASE + 0x5C)
376 #define SMPI_CTL_REG regptr(MSP_PER_BASE + 0x60)
378 #define SMPI_MS_REG regptr(MSP_PER_BASE + 0x64)
380 #define SMPI_CORE_DATA_REG regptr(MSP_PER_BASE + 0xC0)
382 #define SMPI_CORE_CTRL_REG regptr(MSP_PER_BASE + 0xC4)
384 #define SMPI_CORE_STAT_REG regptr(MSP_PER_BASE + 0xC8)
386 #define SMPI_CORE_SSEL_REG regptr(MSP_PER_BASE + 0xCC)
388 #define SMPI_FIFO_REG regptr(MSP_PER_BASE + 0xD0)
392 #define PER_ERR_STS_REG regptr(MSP_PER_BASE + 0x70)
394 #define PER_ERR_MSK_REG regptr(MSP_PER_BASE + 0x74)
396 #define PER_HDR1_REG regptr(MSP_PER_BASE + 0x78)
398 #define PER_HDR2_REG regptr(MSP_PER_BASE + 0x7C)
402 #define PER_INT_STS_REG regptr(MSP_PER_BASE + 0x80)
404 #define PER_INT_MSK_REG regptr(MSP_PER_BASE + 0x84)
406 #define GPIO_INT_STS_REG regptr(MSP_PER_BASE + 0x88)
408 #define GPIO_INT_MSK_REG regptr(MSP_PER_BASE + 0x8C)
412 #define POLO_GPIO_DAT1_REG regptr(MSP_PER_BASE + 0x0E0)
414 #define POLO_GPIO_CFG1_REG regptr(MSP_PER_BASE + 0x0E4)
416 #define POLO_GPIO_CFG2_REG regptr(MSP_PER_BASE + 0x0E8)
418 #define POLO_GPIO_OD1_REG regptr(MSP_PER_BASE + 0x0EC)
420 #define POLO_GPIO_CFG3_REG regptr(MSP_PER_BASE + 0x170)
422 #define POLO_GPIO_DAT2_REG regptr(MSP_PER_BASE + 0x174)
424 #define POLO_GPIO_DAT3_REG regptr(MSP_PER_BASE + 0x178)
426 #define POLO_GPIO_DAT4_REG regptr(MSP_PER_BASE + 0x17C)
428 #define POLO_GPIO_DAT5_REG regptr(MSP_PER_BASE + 0x180)
430 #define POLO_GPIO_DAT6_REG regptr(MSP_PER_BASE + 0x184)
432 #define POLO_GPIO_DAT7_REG regptr(MSP_PER_BASE + 0x188)
434 #define POLO_GPIO_CFG4_REG regptr(MSP_PER_BASE + 0x18C)
436 #define POLO_GPIO_CFG5_REG regptr(MSP_PER_BASE + 0x190)
438 #define POLO_GPIO_CFG6_REG regptr(MSP_PER_BASE + 0x194)
440 #define POLO_GPIO_CFG7_REG regptr(MSP_PER_BASE + 0x198)
442 #define POLO_GPIO_OD2_REG regptr(MSP_PER_BASE + 0x19C)
446 #define GPIO_DATA1_REG regptr(MSP_PER_BASE + 0x170)
448 #define GPIO_DATA2_REG regptr(MSP_PER_BASE + 0x174)
450 #define GPIO_DATA3_REG regptr(MSP_PER_BASE + 0x178)
452 #define GPIO_DATA4_REG regptr(MSP_PER_BASE + 0x17C)
454 #define GPIO_CFG1_REG regptr(MSP_PER_BASE + 0x180)
456 #define GPIO_CFG2_REG regptr(MSP_PER_BASE + 0x184)
458 #define GPIO_CFG3_REG regptr(MSP_PER_BASE + 0x188)
460 #define GPIO_CFG4_REG regptr(MSP_PER_BASE + 0x18C)
462 #define GPIO_OD_REG regptr(MSP_PER_BASE + 0x190)
470 #define PCI_FLUSH_REG regptr(MSP_CPUIF_BASE + 0x00)
472 #define OCP_ERR1_REG regptr(MSP_CPUIF_BASE + 0x04)
474 #define OCP_ERR2_REG regptr(MSP_CPUIF_BASE + 0x08)
476 #define OCP_STS_REG regptr(MSP_CPUIF_BASE + 0x0C)
478 #define CPUIF_PM_REG regptr(MSP_CPUIF_BASE + 0x10)
480 #define CPUIF_CFG_REG regptr(MSP_CPUIF_BASE + 0x10)
484 #define MSP_CIC_BASE (MSP_CPUIF_BASE + 0x8000)
486 #define CIC_EXT_CFG_REG regptr(MSP_CIC_BASE + 0x00)
488 #define CIC_STS_REG regptr(MSP_CIC_BASE + 0x04)
490 #define CIC_VPE0_MSK_REG regptr(MSP_CIC_BASE + 0x08)
492 #define CIC_VPE1_MSK_REG regptr(MSP_CIC_BASE + 0x0C)
494 #define CIC_TC0_MSK_REG regptr(MSP_CIC_BASE + 0x10)
496 #define CIC_TC1_MSK_REG regptr(MSP_CIC_BASE + 0x14)
498 #define CIC_TC2_MSK_REG regptr(MSP_CIC_BASE + 0x18)
500 #define CIC_TC3_MSK_REG regptr(MSP_CIC_BASE + 0x18)
502 #define CIC_TC4_MSK_REG regptr(MSP_CIC_BASE + 0x18)
504 #define CIC_PCIMSI_STS_REG regptr(MSP_CIC_BASE + 0x18)
505 #define CIC_PCIMSI_MSK_REG regptr(MSP_CIC_BASE + 0x18)
506 #define CIC_PCIFLSH_REG regptr(MSP_CIC_BASE + 0x18)
507 #define CIC_VPE0_SWINT_REG regptr(MSP_CIC_BASE + 0x08)
515 #define MEM_CFG1_REG regptr(MSP_MEM_CFG_BASE + 0x00)
516 #define MEM_SS_ADDR regptr(MSP_MEM_CFG_BASE + 0x00)
517 #define MEM_SS_DATA regptr(MSP_MEM_CFG_BASE + 0x04)
518 #define MEM_SS_WRITE regptr(MSP_MEM_CFG_BASE + 0x08)
525 #define PCI_BASE_REG regptr(MSP_PCI_BASE + 0x00)
526 #define PCI_CONFIG_SPACE_REG regptr(MSP_PCI_BASE + 0x800)
527 #define PCI_JTAG_DEVID_REG regptr(MSP_SLP_BASE + 0x13c)
540 #define DEV_ID_PCI_DIS (1 << 26)
541 #define DEV_ID_PCI_HOST (1 << 20)
542 #define DEV_ID_SINGLE_PC (1 << 19)
543 #define DEV_ID_FAMILY (0xff << 8)
544 #define POLO_ZEUS_SUB_FAMILY (0x7 << 16)
546 #define MSPFPGA_ID (0x00 << 8)
547 #define MSP5000_ID (0x50 << 8)
548 #define MSP4F00_ID (0x4f << 8)
549 #define MSP4E00_ID (0x4f << 8)
550 #define MSP4200_ID (0x42 << 8)
551 #define MSP4000_ID (0x40 << 8)
552 #define MSP2XXX_ID (0x20 << 8)
553 #define MSPZEUS_ID (0x10 << 8)
555 #define MSP2004_SUB_ID (0x0 << 16)
556 #define MSP2005_SUB_ID (0x1 << 16)
557 #define MSP2006_SUB_ID (0x1 << 16)
558 #define MSP2007_SUB_ID (0x2 << 16)
559 #define MSP2010_SUB_ID (0x3 << 16)
560 #define MSP2015_SUB_ID (0x4 << 16)
561 #define MSP2020_SUB_ID (0x5 << 16)
562 #define MSP2100_SUB_ID (0x6 << 16)
569 #define MSP_GR_RST (0x01 << 0)
570 #define MSP_MR_RST (0x01 << 1)
571 #define MSP_PD_RST (0x01 << 2)
572 #define MSP_PP_RST (0x01 << 3)
574 #define MSP_EA_RST (0x01 << 6)
575 #define MSP_EB_RST (0x01 << 7)
576 #define MSP_SE_RST (0x01 << 8)
577 #define MSP_PB_RST (0x01 << 9)
578 #define MSP_EC_RST (0x01 << 10)
579 #define MSP_TW_RST (0x01 << 11)
580 #define MSP_SPI_RST (0x01 << 12)
581 #define MSP_U1_RST (0x01 << 13)
582 #define MSP_U0_RST (0x01 << 14)
589 #define MSP_BASE_BAUD 25000000
590 #define MSP_UART_REG_LEN 0x20
597 #define PCCARD_32 0x02
598 #define SINGLE_PCCARD 0x01
607 #define EXT_INT_POL(eirq) (1 << (eirq + 8))
608 #define EXT_INT_EDGE(eirq) (1 << eirq)
610 #define CIC_EXT_SET_TRIGGER_LEVEL(reg, eirq) (reg &= ~EXT_INT_EDGE(eirq))
611 #define CIC_EXT_SET_TRIGGER_EDGE(reg, eirq) (reg |= EXT_INT_EDGE(eirq))
612 #define CIC_EXT_SET_ACTIVE_HI(reg, eirq) (reg |= EXT_INT_POL(eirq))
613 #define CIC_EXT_SET_ACTIVE_LO(reg, eirq) (reg &= ~EXT_INT_POL(eirq))
614 #define CIC_EXT_SET_ACTIVE_RISING CIC_EXT_SET_ACTIVE_HI
615 #define CIC_EXT_SET_ACTIVE_FALLING CIC_EXT_SET_ACTIVE_LO
617 #define CIC_EXT_IS_TRIGGER_LEVEL(reg, eirq) \
618 ((reg & EXT_INT_EDGE(eirq)) == 0)
619 #define CIC_EXT_IS_TRIGGER_EDGE(reg, eirq) (reg & EXT_INT_EDGE(eirq))
620 #define CIC_EXT_IS_ACTIVE_HI(reg, eirq) (reg & EXT_INT_POL(eirq))
621 #define CIC_EXT_IS_ACTIVE_LO(reg, eirq) \
622 ((reg & EXT_INT_POL(eirq)) == 0)
623 #define CIC_EXT_IS_ACTIVE_RISING CIC_EXT_IS_ACTIVE_HI
624 #define CIC_EXT_IS_ACTIVE_FALLING CIC_EXT_IS_ACTIVE_LO
633 #define DDRC_CFG(n) (n)
634 #define DDRC_DEBUG(n) (0x04 + n)
635 #define DDRC_CTL(n) (0x40 + n)
638 #define DDRC_INDIRECT_WRITE(reg, mask, value) \
640 *MEM_SS_ADDR = (((mask) & 0xf) << 8) | ((reg) & 0xff); \
641 *MEM_SS_DATA = (value); \
650 #define SPI_MPI_RX_BUSY 0x00008000
651 #define SPI_MPI_FIFO_EMPTY 0x00004000
652 #define SPI_MPI_TX_BUSY 0x00002000
653 #define SPI_MPI_FIFO_FULL 0x00001000
660 #define SPI_MPI_RX_START 0x00000004
661 #define SPI_MPI_FLUSH_Q 0x00000002
662 #define SPI_MPI_TX_START 0x00000001