diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-02 07:44:16 -0800 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-02 07:44:16 -0800 | 
| commit | aebb2afd5420c860b7fbc3882a323ef1247fbf16 (patch) | |
| tree | 05ee0efcebca5ec421de44de7a6d6271088c64a8 /arch/mips/include/asm/netlogic/xlr | |
| parent | 8eae508b7c6ff502a71d0293b69e97c5505d5840 (diff) | |
| parent | edb15d83a875a1f4b1576188844db5c330c3267d (diff) | |
| download | olio-linux-3.10-aebb2afd5420c860b7fbc3882a323ef1247fbf16.tar.xz olio-linux-3.10-aebb2afd5420c860b7fbc3882a323ef1247fbf16.zip  | |
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS updates from Ralf Baechle:
 o Add basic support for the Mediatek/Ralink Wireless SoC family.
 o The Qualcomm Atheros platform is extended by support for the new
   QCA955X SoC series as well as a bunch of patches that get the code
   ready for OF support.
 o Lantiq and BCM47XX platform have a few improvements and bug fixes.
 o MIPS has sent a few patches that get the kernel ready for the
   upcoming microMIPS support.
 o The rest of the series is made up of small bug fixes and cleanups
   that relate to various parts of the MIPS code.  The biggy in there is
   a whitespace cleanup.  After I was sent another set of whitespace
   cleanup patches I decided it was the time to clean the whitespace
   "issues" for once and and that touches many files below arch/mips/.
Fix up silly conflicts, mostly due to whitespace cleanups.
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (105 commits)
  MIPS: Quit exporting kernel internel break codes to uapi/asm/break.h
  MIPS: remove broken conditional inside vpe loader code
  MIPS: SMTC: fix implicit declaration of set_vi_handler
  MIPS: early_printk: drop __init annotations
  MIPS: Probe for and report hardware virtualization support.
  MIPS: ath79: add support for the Qualcomm Atheros AP136-010 board
  MIPS: ath79: add USB controller registration code for the QCA955X SoCs
  MIPS: ath79: add PCI controller registration code for the QCA955X SoCs
  MIPS: ath79: add WMAC registration code for the QCA955X SoCs
  MIPS: ath79: register UART for the QCA955X SoCs
  MIPS: ath79: add QCA955X specific glue to ath79_device_reset_{set, clear}
  MIPS: ath79: add GPIO setup code for the QCA955X SoCs
  MIPS: ath79: add IRQ handling code for the QCA955X SoCs
  MIPS: ath79: add clock setup code for the QCA955X SoCs
  MIPS: ath79: add SoC detection code for the QCA955X SoCs
  MIPS: ath79: add early printk support for the QCA955X SoCs
  MIPS: ath79: fix WMAC IRQ resource assignment
  mips: reserve elfcorehdr
  mips: Make sure kernel memory is in iomem
  MIPS: ath79: use dynamically allocated USB platform devices
  ...
Diffstat (limited to 'arch/mips/include/asm/netlogic/xlr')
| -rw-r--r-- | arch/mips/include/asm/netlogic/xlr/fmn.h | 222 | ||||
| -rw-r--r-- | arch/mips/include/asm/netlogic/xlr/iomap.h | 88 | ||||
| -rw-r--r-- | arch/mips/include/asm/netlogic/xlr/msidef.h | 18 | ||||
| -rw-r--r-- | arch/mips/include/asm/netlogic/xlr/pic.h | 58 | 
4 files changed, 214 insertions, 172 deletions
diff --git a/arch/mips/include/asm/netlogic/xlr/fmn.h b/arch/mips/include/asm/netlogic/xlr/fmn.h index 68d5167c86b..2a78929cef7 100644 --- a/arch/mips/include/asm/netlogic/xlr/fmn.h +++ b/arch/mips/include/asm/netlogic/xlr/fmn.h @@ -38,108 +38,108 @@  #include <asm/netlogic/mips-extns.h> /* for COP2 access */  /* Station IDs */ -#define	FMN_STNID_CPU0			0x00 -#define	FMN_STNID_CPU1			0x08 -#define	FMN_STNID_CPU2			0x10 -#define	FMN_STNID_CPU3			0x18 -#define	FMN_STNID_CPU4			0x20 -#define	FMN_STNID_CPU5			0x28 -#define	FMN_STNID_CPU6			0x30 -#define	FMN_STNID_CPU7			0x38 +#define FMN_STNID_CPU0			0x00 +#define FMN_STNID_CPU1			0x08 +#define FMN_STNID_CPU2			0x10 +#define FMN_STNID_CPU3			0x18 +#define FMN_STNID_CPU4			0x20 +#define FMN_STNID_CPU5			0x28 +#define FMN_STNID_CPU6			0x30 +#define FMN_STNID_CPU7			0x38 -#define	FMN_STNID_XGS0_TX		64 -#define	FMN_STNID_XMAC0_00_TX		64 -#define	FMN_STNID_XMAC0_01_TX		65 -#define	FMN_STNID_XMAC0_02_TX		66 -#define	FMN_STNID_XMAC0_03_TX		67 -#define	FMN_STNID_XMAC0_04_TX		68 -#define	FMN_STNID_XMAC0_05_TX		69 -#define	FMN_STNID_XMAC0_06_TX		70 -#define	FMN_STNID_XMAC0_07_TX		71 -#define	FMN_STNID_XMAC0_08_TX		72 -#define	FMN_STNID_XMAC0_09_TX		73 -#define	FMN_STNID_XMAC0_10_TX		74 -#define	FMN_STNID_XMAC0_11_TX		75 -#define	FMN_STNID_XMAC0_12_TX		76 -#define	FMN_STNID_XMAC0_13_TX		77 -#define	FMN_STNID_XMAC0_14_TX		78 -#define	FMN_STNID_XMAC0_15_TX		79 +#define FMN_STNID_XGS0_TX		64 +#define FMN_STNID_XMAC0_00_TX		64 +#define FMN_STNID_XMAC0_01_TX		65 +#define FMN_STNID_XMAC0_02_TX		66 +#define FMN_STNID_XMAC0_03_TX		67 +#define FMN_STNID_XMAC0_04_TX		68 +#define FMN_STNID_XMAC0_05_TX		69 +#define FMN_STNID_XMAC0_06_TX		70 +#define FMN_STNID_XMAC0_07_TX		71 +#define FMN_STNID_XMAC0_08_TX		72 +#define FMN_STNID_XMAC0_09_TX		73 +#define FMN_STNID_XMAC0_10_TX		74 +#define FMN_STNID_XMAC0_11_TX		75 +#define FMN_STNID_XMAC0_12_TX		76 +#define FMN_STNID_XMAC0_13_TX		77 +#define FMN_STNID_XMAC0_14_TX		78 +#define FMN_STNID_XMAC0_15_TX		79 -#define	FMN_STNID_XGS1_TX		80 -#define	FMN_STNID_XMAC1_00_TX		80 -#define	FMN_STNID_XMAC1_01_TX		81 -#define	FMN_STNID_XMAC1_02_TX		82 -#define	FMN_STNID_XMAC1_03_TX		83 -#define	FMN_STNID_XMAC1_04_TX		84 -#define	FMN_STNID_XMAC1_05_TX		85 -#define	FMN_STNID_XMAC1_06_TX		86 -#define	FMN_STNID_XMAC1_07_TX		87 -#define	FMN_STNID_XMAC1_08_TX		88 -#define	FMN_STNID_XMAC1_09_TX		89 -#define	FMN_STNID_XMAC1_10_TX		90 -#define	FMN_STNID_XMAC1_11_TX		91 -#define	FMN_STNID_XMAC1_12_TX		92 -#define	FMN_STNID_XMAC1_13_TX		93 -#define	FMN_STNID_XMAC1_14_TX		94 -#define	FMN_STNID_XMAC1_15_TX		95 +#define FMN_STNID_XGS1_TX		80 +#define FMN_STNID_XMAC1_00_TX		80 +#define FMN_STNID_XMAC1_01_TX		81 +#define FMN_STNID_XMAC1_02_TX		82 +#define FMN_STNID_XMAC1_03_TX		83 +#define FMN_STNID_XMAC1_04_TX		84 +#define FMN_STNID_XMAC1_05_TX		85 +#define FMN_STNID_XMAC1_06_TX		86 +#define FMN_STNID_XMAC1_07_TX		87 +#define FMN_STNID_XMAC1_08_TX		88 +#define FMN_STNID_XMAC1_09_TX		89 +#define FMN_STNID_XMAC1_10_TX		90 +#define FMN_STNID_XMAC1_11_TX		91 +#define FMN_STNID_XMAC1_12_TX		92 +#define FMN_STNID_XMAC1_13_TX		93 +#define FMN_STNID_XMAC1_14_TX		94 +#define FMN_STNID_XMAC1_15_TX		95 -#define	FMN_STNID_GMAC			96 -#define	FMN_STNID_GMACJFR_0		96 -#define	FMN_STNID_GMACRFR_0		97 -#define	FMN_STNID_GMACTX0		98 -#define	FMN_STNID_GMACTX1		99 -#define	FMN_STNID_GMACTX2		100 -#define	FMN_STNID_GMACTX3		101 -#define	FMN_STNID_GMACJFR_1		102 -#define	FMN_STNID_GMACRFR_1		103 +#define FMN_STNID_GMAC			96 +#define FMN_STNID_GMACJFR_0		96 +#define FMN_STNID_GMACRFR_0		97 +#define FMN_STNID_GMACTX0		98 +#define FMN_STNID_GMACTX1		99 +#define FMN_STNID_GMACTX2		100 +#define FMN_STNID_GMACTX3		101 +#define FMN_STNID_GMACJFR_1		102 +#define FMN_STNID_GMACRFR_1		103 -#define	FMN_STNID_DMA			104 -#define	FMN_STNID_DMA_0			104 -#define	FMN_STNID_DMA_1			105 -#define	FMN_STNID_DMA_2			106 -#define	FMN_STNID_DMA_3			107 +#define FMN_STNID_DMA			104 +#define FMN_STNID_DMA_0			104 +#define FMN_STNID_DMA_1			105 +#define FMN_STNID_DMA_2			106 +#define FMN_STNID_DMA_3			107 -#define	FMN_STNID_XGS0FR		112 -#define	FMN_STNID_XMAC0JFR		112 -#define	FMN_STNID_XMAC0RFR		113 +#define FMN_STNID_XGS0FR		112 +#define FMN_STNID_XMAC0JFR		112 +#define FMN_STNID_XMAC0RFR		113 -#define	FMN_STNID_XGS1FR		114 -#define	FMN_STNID_XMAC1JFR		114 -#define	FMN_STNID_XMAC1RFR		115 -#define	FMN_STNID_SEC			120 -#define	FMN_STNID_SEC0			120 -#define	FMN_STNID_SEC1			121 -#define	FMN_STNID_SEC2			122 -#define	FMN_STNID_SEC3			123 -#define	FMN_STNID_PK0			124 -#define	FMN_STNID_SEC_RSA		124 -#define	FMN_STNID_SEC_RSVD0		125 -#define	FMN_STNID_SEC_RSVD1		126 -#define	FMN_STNID_SEC_RSVD2		127 +#define FMN_STNID_XGS1FR		114 +#define FMN_STNID_XMAC1JFR		114 +#define FMN_STNID_XMAC1RFR		115 +#define FMN_STNID_SEC			120 +#define FMN_STNID_SEC0			120 +#define FMN_STNID_SEC1			121 +#define FMN_STNID_SEC2			122 +#define FMN_STNID_SEC3			123 +#define FMN_STNID_PK0			124 +#define FMN_STNID_SEC_RSA		124 +#define FMN_STNID_SEC_RSVD0		125 +#define FMN_STNID_SEC_RSVD1		126 +#define FMN_STNID_SEC_RSVD2		127 -#define	FMN_STNID_GMAC1			80 -#define	FMN_STNID_GMAC1_FR_0		81 -#define	FMN_STNID_GMAC1_TX0		82 -#define	FMN_STNID_GMAC1_TX1		83 -#define	FMN_STNID_GMAC1_TX2		84 -#define	FMN_STNID_GMAC1_TX3		85 -#define	FMN_STNID_GMAC1_FR_1		87 -#define	FMN_STNID_GMAC0			96 -#define	FMN_STNID_GMAC0_FR_0		97 -#define	FMN_STNID_GMAC0_TX0		98 -#define	FMN_STNID_GMAC0_TX1		99 -#define	FMN_STNID_GMAC0_TX2		100 -#define	FMN_STNID_GMAC0_TX3		101 -#define	FMN_STNID_GMAC0_FR_1		103 -#define	FMN_STNID_CMP_0			108 -#define	FMN_STNID_CMP_1			109 -#define	FMN_STNID_CMP_2			110 -#define	FMN_STNID_CMP_3			111 -#define	FMN_STNID_PCIE_0		116 -#define	FMN_STNID_PCIE_1		117 -#define	FMN_STNID_PCIE_2		118 -#define	FMN_STNID_PCIE_3		119 -#define	FMN_STNID_XLS_PK0		121 +#define FMN_STNID_GMAC1			80 +#define FMN_STNID_GMAC1_FR_0		81 +#define FMN_STNID_GMAC1_TX0		82 +#define FMN_STNID_GMAC1_TX1		83 +#define FMN_STNID_GMAC1_TX2		84 +#define FMN_STNID_GMAC1_TX3		85 +#define FMN_STNID_GMAC1_FR_1		87 +#define FMN_STNID_GMAC0			96 +#define FMN_STNID_GMAC0_FR_0		97 +#define FMN_STNID_GMAC0_TX0		98 +#define FMN_STNID_GMAC0_TX1		99 +#define FMN_STNID_GMAC0_TX2		100 +#define FMN_STNID_GMAC0_TX3		101 +#define FMN_STNID_GMAC0_FR_1		103 +#define FMN_STNID_CMP_0			108 +#define FMN_STNID_CMP_1			109 +#define FMN_STNID_CMP_2			110 +#define FMN_STNID_CMP_3			111 +#define FMN_STNID_PCIE_0		116 +#define FMN_STNID_PCIE_1		117 +#define FMN_STNID_PCIE_2		118 +#define FMN_STNID_PCIE_3		119 +#define FMN_STNID_XLS_PK0		121  #define nlm_read_c2_cc0(s)		__read_32bit_c2_register($16, s)  #define nlm_read_c2_cc1(s)		__read_32bit_c2_register($17, s) @@ -175,25 +175,25 @@  #define nlm_write_c2_cc14(s, v)		__write_32bit_c2_register($30, s, v)  #define nlm_write_c2_cc15(s, v)		__write_32bit_c2_register($31, s, v) -#define	nlm_read_c2_status(sel)		__read_32bit_c2_register($2, 0) -#define	nlm_read_c2_config()		__read_32bit_c2_register($3, 0) -#define	nlm_write_c2_config(v)		__write_32bit_c2_register($3, 0, v) -#define	nlm_read_c2_bucksize(b)		__read_32bit_c2_register($4, b) -#define	nlm_write_c2_bucksize(b, v)	__write_32bit_c2_register($4, b, v) +#define nlm_read_c2_status(sel)		__read_32bit_c2_register($2, 0) +#define nlm_read_c2_config()		__read_32bit_c2_register($3, 0) +#define nlm_write_c2_config(v)		__write_32bit_c2_register($3, 0, v) +#define nlm_read_c2_bucksize(b)		__read_32bit_c2_register($4, b) +#define nlm_write_c2_bucksize(b, v)	__write_32bit_c2_register($4, b, v) -#define	nlm_read_c2_rx_msg0()		__read_64bit_c2_register($1, 0) -#define	nlm_read_c2_rx_msg1()		__read_64bit_c2_register($1, 1) -#define	nlm_read_c2_rx_msg2()		__read_64bit_c2_register($1, 2) -#define	nlm_read_c2_rx_msg3()		__read_64bit_c2_register($1, 3) +#define nlm_read_c2_rx_msg0()		__read_64bit_c2_register($1, 0) +#define nlm_read_c2_rx_msg1()		__read_64bit_c2_register($1, 1) +#define nlm_read_c2_rx_msg2()		__read_64bit_c2_register($1, 2) +#define nlm_read_c2_rx_msg3()		__read_64bit_c2_register($1, 3) -#define	nlm_write_c2_tx_msg0(v)		__write_64bit_c2_register($0, 0, v) -#define	nlm_write_c2_tx_msg1(v)		__write_64bit_c2_register($0, 1, v) -#define	nlm_write_c2_tx_msg2(v)		__write_64bit_c2_register($0, 2, v) -#define	nlm_write_c2_tx_msg3(v)		__write_64bit_c2_register($0, 3, v) +#define nlm_write_c2_tx_msg0(v)		__write_64bit_c2_register($0, 0, v) +#define nlm_write_c2_tx_msg1(v)		__write_64bit_c2_register($0, 1, v) +#define nlm_write_c2_tx_msg2(v)		__write_64bit_c2_register($0, 2, v) +#define nlm_write_c2_tx_msg3(v)		__write_64bit_c2_register($0, 3, v) -#define	FMN_STN_RX_QSIZE		256 -#define	FMN_NSTATIONS			128 -#define	FMN_CORE_NBUCKETS		8 +#define FMN_STN_RX_QSIZE		256 +#define FMN_NSTATIONS			128 +#define FMN_CORE_NBUCKETS		8  static inline void nlm_msgsnd(unsigned int stid)  { diff --git a/arch/mips/include/asm/netlogic/xlr/iomap.h b/arch/mips/include/asm/netlogic/xlr/iomap.h index 2e768f032e8..ff4533d6ee6 100644 --- a/arch/mips/include/asm/netlogic/xlr/iomap.h +++ b/arch/mips/include/asm/netlogic/xlr/iomap.h @@ -35,66 +35,66 @@  #ifndef _ASM_NLM_IOMAP_H  #define _ASM_NLM_IOMAP_H -#define DEFAULT_NETLOGIC_IO_BASE           CKSEG1ADDR(0x1ef00000) -#define NETLOGIC_IO_DDR2_CHN0_OFFSET       0x01000 -#define NETLOGIC_IO_DDR2_CHN1_OFFSET       0x02000 -#define NETLOGIC_IO_DDR2_CHN2_OFFSET       0x03000 -#define NETLOGIC_IO_DDR2_CHN3_OFFSET       0x04000 -#define NETLOGIC_IO_PIC_OFFSET             0x08000 -#define NETLOGIC_IO_UART_0_OFFSET          0x14000 -#define NETLOGIC_IO_UART_1_OFFSET          0x15100 +#define DEFAULT_NETLOGIC_IO_BASE	   CKSEG1ADDR(0x1ef00000) +#define NETLOGIC_IO_DDR2_CHN0_OFFSET	   0x01000 +#define NETLOGIC_IO_DDR2_CHN1_OFFSET	   0x02000 +#define NETLOGIC_IO_DDR2_CHN2_OFFSET	   0x03000 +#define NETLOGIC_IO_DDR2_CHN3_OFFSET	   0x04000 +#define NETLOGIC_IO_PIC_OFFSET		   0x08000 +#define NETLOGIC_IO_UART_0_OFFSET	   0x14000 +#define NETLOGIC_IO_UART_1_OFFSET	   0x15100 -#define NETLOGIC_IO_SIZE                   0x1000 +#define NETLOGIC_IO_SIZE		   0x1000 -#define NETLOGIC_IO_BRIDGE_OFFSET          0x00000 +#define NETLOGIC_IO_BRIDGE_OFFSET	   0x00000 -#define NETLOGIC_IO_RLD2_CHN0_OFFSET       0x05000 -#define NETLOGIC_IO_RLD2_CHN1_OFFSET       0x06000 +#define NETLOGIC_IO_RLD2_CHN0_OFFSET	   0x05000 +#define NETLOGIC_IO_RLD2_CHN1_OFFSET	   0x06000 -#define NETLOGIC_IO_SRAM_OFFSET            0x07000 +#define NETLOGIC_IO_SRAM_OFFSET		   0x07000 -#define NETLOGIC_IO_PCIX_OFFSET            0x09000 -#define NETLOGIC_IO_HT_OFFSET              0x0A000 +#define NETLOGIC_IO_PCIX_OFFSET		   0x09000 +#define NETLOGIC_IO_HT_OFFSET		   0x0A000 -#define NETLOGIC_IO_SECURITY_OFFSET        0x0B000 +#define NETLOGIC_IO_SECURITY_OFFSET	   0x0B000 -#define NETLOGIC_IO_GMAC_0_OFFSET          0x0C000 -#define NETLOGIC_IO_GMAC_1_OFFSET          0x0D000 -#define NETLOGIC_IO_GMAC_2_OFFSET          0x0E000 -#define NETLOGIC_IO_GMAC_3_OFFSET          0x0F000 +#define NETLOGIC_IO_GMAC_0_OFFSET	   0x0C000 +#define NETLOGIC_IO_GMAC_1_OFFSET	   0x0D000 +#define NETLOGIC_IO_GMAC_2_OFFSET	   0x0E000 +#define NETLOGIC_IO_GMAC_3_OFFSET	   0x0F000  /* XLS devices */ -#define NETLOGIC_IO_GMAC_4_OFFSET          0x20000 -#define NETLOGIC_IO_GMAC_5_OFFSET          0x21000 -#define NETLOGIC_IO_GMAC_6_OFFSET          0x22000 -#define NETLOGIC_IO_GMAC_7_OFFSET          0x23000 +#define NETLOGIC_IO_GMAC_4_OFFSET	   0x20000 +#define NETLOGIC_IO_GMAC_5_OFFSET	   0x21000 +#define NETLOGIC_IO_GMAC_6_OFFSET	   0x22000 +#define NETLOGIC_IO_GMAC_7_OFFSET	   0x23000 -#define NETLOGIC_IO_PCIE_0_OFFSET          0x1E000 -#define NETLOGIC_IO_PCIE_1_OFFSET          0x1F000 -#define NETLOGIC_IO_SRIO_0_OFFSET          0x1E000 -#define NETLOGIC_IO_SRIO_1_OFFSET          0x1F000 +#define NETLOGIC_IO_PCIE_0_OFFSET	   0x1E000 +#define NETLOGIC_IO_PCIE_1_OFFSET	   0x1F000 +#define NETLOGIC_IO_SRIO_0_OFFSET	   0x1E000 +#define NETLOGIC_IO_SRIO_1_OFFSET	   0x1F000 -#define NETLOGIC_IO_USB_0_OFFSET           0x24000 -#define NETLOGIC_IO_USB_1_OFFSET           0x25000 +#define NETLOGIC_IO_USB_0_OFFSET	   0x24000 +#define NETLOGIC_IO_USB_1_OFFSET	   0x25000 -#define NETLOGIC_IO_COMP_OFFSET            0x1D000 +#define NETLOGIC_IO_COMP_OFFSET		   0x1D000  /* end XLS devices */  /* XLR devices */ -#define NETLOGIC_IO_SPI4_0_OFFSET          0x10000 -#define NETLOGIC_IO_XGMAC_0_OFFSET         0x11000 -#define NETLOGIC_IO_SPI4_1_OFFSET          0x12000 -#define NETLOGIC_IO_XGMAC_1_OFFSET         0x13000 +#define NETLOGIC_IO_SPI4_0_OFFSET	   0x10000 +#define NETLOGIC_IO_XGMAC_0_OFFSET	   0x11000 +#define NETLOGIC_IO_SPI4_1_OFFSET	   0x12000 +#define NETLOGIC_IO_XGMAC_1_OFFSET	   0x13000  /* end XLR devices */ -#define NETLOGIC_IO_I2C_0_OFFSET           0x16000 -#define NETLOGIC_IO_I2C_1_OFFSET           0x17000 +#define NETLOGIC_IO_I2C_0_OFFSET	   0x16000 +#define NETLOGIC_IO_I2C_1_OFFSET	   0x17000 -#define NETLOGIC_IO_GPIO_OFFSET            0x18000 -#define NETLOGIC_IO_FLASH_OFFSET           0x19000 -#define NETLOGIC_IO_TB_OFFSET              0x1C000 +#define NETLOGIC_IO_GPIO_OFFSET		   0x18000 +#define NETLOGIC_IO_FLASH_OFFSET	   0x19000 +#define NETLOGIC_IO_TB_OFFSET		   0x1C000 -#define NETLOGIC_CPLD_OFFSET               KSEG1ADDR(0x1d840000) +#define NETLOGIC_CPLD_OFFSET		   KSEG1ADDR(0x1d840000)  /*   * Base Address (Virtual) of the PCI Config address space @@ -102,8 +102,8 @@   * Config space spans 256 (num of buses) * 256 (num functions) * 256 bytes   * ie 1<<24 = 16M   */ -#define DEFAULT_PCI_CONFIG_BASE         0x18000000 -#define DEFAULT_HT_TYPE0_CFG_BASE       0x16000000 -#define DEFAULT_HT_TYPE1_CFG_BASE       0x17000000 +#define DEFAULT_PCI_CONFIG_BASE		0x18000000 +#define DEFAULT_HT_TYPE0_CFG_BASE	0x16000000 +#define DEFAULT_HT_TYPE1_CFG_BASE	0x17000000  #endif diff --git a/arch/mips/include/asm/netlogic/xlr/msidef.h b/arch/mips/include/asm/netlogic/xlr/msidef.h index 7e39d40be4f..c95d18edf12 100644 --- a/arch/mips/include/asm/netlogic/xlr/msidef.h +++ b/arch/mips/include/asm/netlogic/xlr/msidef.h @@ -45,21 +45,21 @@   */  #define MSI_DATA_VECTOR_SHIFT		0 -#define  MSI_DATA_VECTOR_MASK		0x000000ff +#define	 MSI_DATA_VECTOR_MASK		0x000000ff  #define	 MSI_DATA_VECTOR(v)		(((v) << MSI_DATA_VECTOR_SHIFT) & \  						MSI_DATA_VECTOR_MASK)  #define MSI_DATA_DELIVERY_MODE_SHIFT	8 -#define  MSI_DATA_DELIVERY_FIXED	(0 << MSI_DATA_DELIVERY_MODE_SHIFT) -#define  MSI_DATA_DELIVERY_LOWPRI	(1 << MSI_DATA_DELIVERY_MODE_SHIFT) +#define	 MSI_DATA_DELIVERY_FIXED	(0 << MSI_DATA_DELIVERY_MODE_SHIFT) +#define	 MSI_DATA_DELIVERY_LOWPRI	(1 << MSI_DATA_DELIVERY_MODE_SHIFT)  #define MSI_DATA_LEVEL_SHIFT		14  #define	 MSI_DATA_LEVEL_DEASSERT	(0 << MSI_DATA_LEVEL_SHIFT)  #define	 MSI_DATA_LEVEL_ASSERT		(1 << MSI_DATA_LEVEL_SHIFT)  #define MSI_DATA_TRIGGER_SHIFT		15 -#define  MSI_DATA_TRIGGER_EDGE		(0 << MSI_DATA_TRIGGER_SHIFT) -#define  MSI_DATA_TRIGGER_LEVEL		(1 << MSI_DATA_TRIGGER_SHIFT) +#define	 MSI_DATA_TRIGGER_EDGE		(0 << MSI_DATA_TRIGGER_SHIFT) +#define	 MSI_DATA_TRIGGER_LEVEL		(1 << MSI_DATA_TRIGGER_SHIFT)  /*   * Shift/mask fields for msi address @@ -69,16 +69,16 @@  #define MSI_ADDR_BASE_LO		0xfee00000  #define MSI_ADDR_DEST_MODE_SHIFT	2 -#define  MSI_ADDR_DEST_MODE_PHYSICAL	(0 << MSI_ADDR_DEST_MODE_SHIFT) +#define	 MSI_ADDR_DEST_MODE_PHYSICAL	(0 << MSI_ADDR_DEST_MODE_SHIFT)  #define	 MSI_ADDR_DEST_MODE_LOGICAL	(1 << MSI_ADDR_DEST_MODE_SHIFT)  #define MSI_ADDR_REDIRECTION_SHIFT	3 -#define  MSI_ADDR_REDIRECTION_CPU	(0 << MSI_ADDR_REDIRECTION_SHIFT) -#define  MSI_ADDR_REDIRECTION_LOWPRI	(1 << MSI_ADDR_REDIRECTION_SHIFT) +#define	 MSI_ADDR_REDIRECTION_CPU	(0 << MSI_ADDR_REDIRECTION_SHIFT) +#define	 MSI_ADDR_REDIRECTION_LOWPRI	(1 << MSI_ADDR_REDIRECTION_SHIFT)  #define MSI_ADDR_DEST_ID_SHIFT		12  #define	 MSI_ADDR_DEST_ID_MASK		0x00ffff0 -#define  MSI_ADDR_DEST_ID(dest)		(((dest) << MSI_ADDR_DEST_ID_SHIFT) & \ +#define	 MSI_ADDR_DEST_ID(dest)		(((dest) << MSI_ADDR_DEST_ID_SHIFT) & \  						 MSI_ADDR_DEST_ID_MASK)  #endif /* ASM_RMI_MSIDEF_H */ diff --git a/arch/mips/include/asm/netlogic/xlr/pic.h b/arch/mips/include/asm/netlogic/xlr/pic.h index 9a691b1f91b..63c99176dff 100644 --- a/arch/mips/include/asm/netlogic/xlr/pic.h +++ b/arch/mips/include/asm/netlogic/xlr/pic.h @@ -35,10 +35,11 @@  #ifndef _ASM_NLM_XLR_PIC_H  #define _ASM_NLM_XLR_PIC_H -#define PIC_CLKS_PER_SEC		66666666ULL +#define PIC_CLK_HZ			66666666  /* PIC hardware interrupt numbers */  #define PIC_IRT_WD_INDEX		0  #define PIC_IRT_TIMER_0_INDEX		1 +#define PIC_IRT_TIMER_INDEX(i)		((i) + PIC_IRT_TIMER_0_INDEX)  #define PIC_IRT_TIMER_1_INDEX		2  #define PIC_IRT_TIMER_2_INDEX		3  #define PIC_IRT_TIMER_3_INDEX		4 @@ -99,6 +100,7 @@  /* PIC Registers */  #define PIC_CTRL			0x00 +#define PIC_CTRL_STE			8	/* timer enable start bit */  #define PIC_IPI				0x04  #define PIC_INT_ACK			0x06 @@ -116,7 +118,7 @@  #define PIC_TIMER_COUNT_0_BASE		0x120  #define PIC_TIMER_COUNT_1_BASE		0x130 -#define PIC_IRT_0(picintr)      (PIC_IRT_0_BASE + (picintr)) +#define PIC_IRT_0(picintr)	(PIC_IRT_0_BASE + (picintr))  #define PIC_IRT_1(picintr)	(PIC_IRT_1_BASE + (picintr))  #define PIC_TIMER_MAXVAL_0(i)	(PIC_TIMER_MAXVAL_0_BASE + (i)) @@ -130,9 +132,9 @@   * 8-39. This leaves the IRQ 0-7 for cpu interrupts like   * count/compare and FMN   */ -#define PIC_IRQ_BASE            8 -#define PIC_INTR_TO_IRQ(i)      (PIC_IRQ_BASE + (i)) -#define PIC_IRQ_TO_INTR(i)      ((i) - PIC_IRQ_BASE) +#define PIC_IRQ_BASE		8 +#define PIC_INTR_TO_IRQ(i)	(PIC_IRQ_BASE + (i)) +#define PIC_IRQ_TO_INTR(i)	((i) - PIC_IRQ_BASE)  #define PIC_IRT_FIRST_IRQ	PIC_IRQ_BASE  #define PIC_WD_IRQ		PIC_INTR_TO_IRQ(PIC_IRT_WD_INDEX) @@ -168,7 +170,7 @@  #define PIC_BRIDGE_AERR_IRQ	PIC_INTR_TO_IRQ(PIC_IRT_BRIDGE_AERR_INDEX)  #define PIC_BRIDGE_BERR_IRQ	PIC_INTR_TO_IRQ(PIC_IRT_BRIDGE_BERR_INDEX)  #define PIC_BRIDGE_TB_XLR_IRQ	PIC_INTR_TO_IRQ(PIC_IRT_BRIDGE_TB_XLR_INDEX) -#define PIC_BRIDGE_AERR_NMI_IRQ	PIC_INTR_TO_IRQ(PIC_IRT_BRIDGE_AERR_NMI_INDEX) +#define PIC_BRIDGE_AERR_NMI_IRQ PIC_INTR_TO_IRQ(PIC_IRT_BRIDGE_AERR_NMI_INDEX)  /* XLS defines */  #define PIC_GMAC_4_IRQ		PIC_INTR_TO_IRQ(PIC_IRT_GMAC4_INDEX)  #define PIC_GMAC_5_IRQ		PIC_INTR_TO_IRQ(PIC_IRT_GMAC5_INDEX) @@ -251,12 +253,52 @@ nlm_pic_ack(uint64_t base, int irt)  }  static inline void -nlm_pic_init_irt(uint64_t base, int irt, int irq, int hwt) +nlm_pic_init_irt(uint64_t base, int irt, int irq, int hwt, int en)  {  	nlm_write_reg(base, PIC_IRT_0(irt), (1u << hwt));  	/* local scheduling, invalid, level by default */  	nlm_write_reg(base, PIC_IRT_1(irt), -		(1 << 30) | (1 << 6) | irq); +		(en << 30) | (1 << 6) | irq); +} + +static inline uint64_t +nlm_pic_read_timer(uint64_t base, int timer) +{ +	uint32_t up1, up2, low; + +	up1 = nlm_read_reg(base, PIC_TIMER_COUNT_1(timer)); +	low = nlm_read_reg(base, PIC_TIMER_COUNT_0(timer)); +	up2 = nlm_read_reg(base, PIC_TIMER_COUNT_1(timer)); + +	if (up1 != up2) /* wrapped, get the new low */ +		low = nlm_read_reg(base, PIC_TIMER_COUNT_0(timer)); +	return ((uint64_t)up2 << 32) | low; + +} + +static inline uint32_t +nlm_pic_read_timer32(uint64_t base, int timer) +{ +	return nlm_read_reg(base, PIC_TIMER_COUNT_0(timer)); +} + +static inline void +nlm_pic_set_timer(uint64_t base, int timer, uint64_t value, int irq, int cpu) +{ +	uint32_t up, low; +	uint64_t pic_ctrl = nlm_read_reg(base, PIC_CTRL); +	int en; + +	en = (irq > 0); +	up = value >> 32; +	low = value & 0xFFFFFFFF; +	nlm_write_reg(base, PIC_TIMER_MAXVAL_0(timer), low); +	nlm_write_reg(base, PIC_TIMER_MAXVAL_1(timer), up); +	nlm_pic_init_irt(base, PIC_IRT_TIMER_INDEX(timer), irq, cpu, 0); + +	/* enable the timer */ +	pic_ctrl |= (1 << (PIC_CTRL_STE + timer)); +	nlm_write_reg(base, PIC_CTRL, pic_ctrl);  }  #endif  #endif /* _ASM_NLM_XLR_PIC_H */  |