diff options
| author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
|---|---|---|
| committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
| commit | fcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch) | |
| tree | a57612d1888735a2ec7972891b68c1ac5ec8faea /arch/mips/include/asm/mach-pb1x00 | |
| parent | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff) | |
Diffstat (limited to 'arch/mips/include/asm/mach-pb1x00')
| -rw-r--r-- | arch/mips/include/asm/mach-pb1x00/mc146818rtc.h | 34 | ||||
| -rw-r--r-- | arch/mips/include/asm/mach-pb1x00/pb1000.h | 87 | ||||
| -rw-r--r-- | arch/mips/include/asm/mach-pb1x00/pb1200.h | 141 | ||||
| -rw-r--r-- | arch/mips/include/asm/mach-pb1x00/pb1550.h | 73 |
4 files changed, 335 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mach-pb1x00/mc146818rtc.h b/arch/mips/include/asm/mach-pb1x00/mc146818rtc.h new file mode 100644 index 00000000000..622c58710e5 --- /dev/null +++ b/arch/mips/include/asm/mach-pb1x00/mc146818rtc.h | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | /* | ||
| 2 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 3 | * License. See the file "COPYING" in the main directory of this archive | ||
| 4 | * for more details. | ||
| 5 | * | ||
| 6 | * Copyright (C) 1998, 2001, 03 by Ralf Baechle | ||
| 7 | * | ||
| 8 | * RTC routines for PC style attached Dallas chip. | ||
| 9 | */ | ||
| 10 | #ifndef __ASM_MACH_AU1XX_MC146818RTC_H | ||
| 11 | #define __ASM_MACH_AU1XX_MC146818RTC_H | ||
| 12 | |||
| 13 | #include <asm/io.h> | ||
| 14 | #include <asm/mach-au1x00/au1000.h> | ||
| 15 | |||
| 16 | #define RTC_PORT(x) (0x0c000000 + (x)) | ||
| 17 | #define RTC_IRQ 8 | ||
| 18 | #define PB1500_RTC_ADDR 0x0c000000 | ||
| 19 | |||
| 20 | static inline unsigned char CMOS_READ(unsigned long offset) | ||
| 21 | { | ||
| 22 | offset <<= 2; | ||
| 23 | return (u8)(au_readl(offset + PB1500_RTC_ADDR) & 0xff); | ||
| 24 | } | ||
| 25 | |||
| 26 | static inline void CMOS_WRITE(unsigned char data, unsigned long offset) | ||
| 27 | { | ||
| 28 | offset <<= 2; | ||
| 29 | au_writel(data, offset + PB1500_RTC_ADDR); | ||
| 30 | } | ||
| 31 | |||
| 32 | #define RTC_ALWAYS_BCD 1 | ||
| 33 | |||
| 34 | #endif /* __ASM_MACH_AU1XX_MC146818RTC_H */ | ||
diff --git a/arch/mips/include/asm/mach-pb1x00/pb1000.h b/arch/mips/include/asm/mach-pb1x00/pb1000.h new file mode 100644 index 00000000000..65059255dc1 --- /dev/null +++ b/arch/mips/include/asm/mach-pb1x00/pb1000.h | |||
| @@ -0,0 +1,87 @@ | |||
| 1 | /* | ||
| 2 | * Alchemy Semi Pb1000 Reference Board | ||
| 3 | * | ||
| 4 | * Copyright 2001, 2008 MontaVista Software Inc. | ||
| 5 | * Author: MontaVista Software, Inc. <source@mvista.com> | ||
| 6 | * | ||
| 7 | * ######################################################################## | ||
| 8 | * | ||
| 9 | * This program is free software; you can distribute it and/or modify it | ||
| 10 | * under the terms of the GNU General Public License (Version 2) as | ||
| 11 | * published by the Free Software Foundation. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 14 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 15 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
| 16 | * for more details. | ||
| 17 | * | ||
| 18 | * You should have received a copy of the GNU General Public License along | ||
| 19 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 20 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 21 | * | ||
| 22 | * ######################################################################## | ||
| 23 | * | ||
| 24 | * | ||
| 25 | */ | ||
| 26 | #ifndef __ASM_PB1000_H | ||
| 27 | #define __ASM_PB1000_H | ||
| 28 | |||
| 29 | /* PCMCIA PB1000 specific defines */ | ||
| 30 | #define PCMCIA_MAX_SOCK 1 | ||
| 31 | #define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK + 1) | ||
| 32 | |||
| 33 | #define PB1000_PCR 0xBE000000 | ||
| 34 | # define PCR_SLOT_0_VPP0 (1 << 0) | ||
| 35 | # define PCR_SLOT_0_VPP1 (1 << 1) | ||
| 36 | # define PCR_SLOT_0_VCC0 (1 << 2) | ||
| 37 | # define PCR_SLOT_0_VCC1 (1 << 3) | ||
| 38 | # define PCR_SLOT_0_RST (1 << 4) | ||
| 39 | # define PCR_SLOT_1_VPP0 (1 << 8) | ||
| 40 | # define PCR_SLOT_1_VPP1 (1 << 9) | ||
| 41 | # define PCR_SLOT_1_VCC0 (1 << 10) | ||
| 42 | # define PCR_SLOT_1_VCC1 (1 << 11) | ||
| 43 | # define PCR_SLOT_1_RST (1 << 12) | ||
| 44 | |||
| 45 | #define PB1000_MDR 0xBE000004 | ||
| 46 | # define MDR_PI (1 << 5) /* PCMCIA int latch */ | ||
| 47 | # define MDR_EPI (1 << 14) /* enable PCMCIA int */ | ||
| 48 | # define MDR_CPI (1 << 15) /* clear PCMCIA int */ | ||
| 49 | |||
| 50 | #define PB1000_ACR1 0xBE000008 | ||
| 51 | # define ACR1_SLOT_0_CD1 (1 << 0) /* card detect 1 */ | ||
| 52 | # define ACR1_SLOT_0_CD2 (1 << 1) /* card detect 2 */ | ||
| 53 | # define ACR1_SLOT_0_READY (1 << 2) /* ready */ | ||
| 54 | # define ACR1_SLOT_0_STATUS (1 << 3) /* status change */ | ||
| 55 | # define ACR1_SLOT_0_VS1 (1 << 4) /* voltage sense 1 */ | ||
| 56 | # define ACR1_SLOT_0_VS2 (1 << 5) /* voltage sense 2 */ | ||
| 57 | # define ACR1_SLOT_0_INPACK (1 << 6) /* inpack pin status */ | ||
| 58 | # define ACR1_SLOT_1_CD1 (1 << 8) /* card detect 1 */ | ||
| 59 | # define ACR1_SLOT_1_CD2 (1 << 9) /* card detect 2 */ | ||
| 60 | # define ACR1_SLOT_1_READY (1 << 10) /* ready */ | ||
| 61 | # define ACR1_SLOT_1_STATUS (1 << 11) /* status change */ | ||
| 62 | # define ACR1_SLOT_1_VS1 (1 << 12) /* voltage sense 1 */ | ||
| 63 | # define ACR1_SLOT_1_VS2 (1 << 13) /* voltage sense 2 */ | ||
| 64 | # define ACR1_SLOT_1_INPACK (1 << 14) /* inpack pin status */ | ||
| 65 | |||
| 66 | #define CPLD_AUX0 0xBE00000C | ||
| 67 | #define CPLD_AUX1 0xBE000010 | ||
| 68 | #define CPLD_AUX2 0xBE000014 | ||
| 69 | |||
| 70 | /* Voltage levels */ | ||
| 71 | |||
| 72 | /* VPPEN1 - VPPEN0 */ | ||
| 73 | #define VPP_GND ((0 << 1) | (0 << 0)) | ||
| 74 | #define VPP_5V ((1 << 1) | (0 << 0)) | ||
| 75 | #define VPP_3V ((0 << 1) | (1 << 0)) | ||
| 76 | #define VPP_12V ((0 << 1) | (1 << 0)) | ||
| 77 | #define VPP_HIZ ((1 << 1) | (1 << 0)) | ||
| 78 | |||
| 79 | /* VCCEN1 - VCCEN0 */ | ||
| 80 | #define VCC_3V ((0 << 1) | (1 << 0)) | ||
| 81 | #define VCC_5V ((1 << 1) | (0 << 0)) | ||
| 82 | #define VCC_HIZ ((0 << 1) | (0 << 0)) | ||
| 83 | |||
| 84 | /* VPP/VCC */ | ||
| 85 | #define SET_VCC_VPP(VCC, VPP, SLOT) \ | ||
| 86 | ((((VCC) << 2) | ((VPP) << 0)) << ((SLOT) * 8)) | ||
| 87 | #endif /* __ASM_PB1000_H */ | ||
diff --git a/arch/mips/include/asm/mach-pb1x00/pb1200.h b/arch/mips/include/asm/mach-pb1x00/pb1200.h new file mode 100644 index 00000000000..fce4332ebb7 --- /dev/null +++ b/arch/mips/include/asm/mach-pb1x00/pb1200.h | |||
| @@ -0,0 +1,141 @@ | |||
| 1 | /* | ||
| 2 | * AMD Alchemy Pb1200 Reference Board | ||
| 3 | * Board Registers defines. | ||
| 4 | * | ||
| 5 | * ######################################################################## | ||
| 6 | * | ||
| 7 | * This program is free software; you can distribute it and/or modify it | ||
| 8 | * under the terms of the GNU General Public License (Version 2) as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
| 14 | * for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License along | ||
| 17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 18 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 19 | * | ||
| 20 | * ######################################################################## | ||
| 21 | * | ||
| 22 | * | ||
| 23 | */ | ||
| 24 | #ifndef __ASM_PB1200_H | ||
| 25 | #define __ASM_PB1200_H | ||
| 26 | |||
| 27 | #include <linux/types.h> | ||
| 28 | #include <asm/mach-au1x00/au1000.h> | ||
| 29 | #include <asm/mach-au1x00/au1xxx_psc.h> | ||
| 30 | |||
| 31 | #define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX | ||
| 32 | #define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX | ||
| 33 | #define DBDMA_I2S_TX_CHAN DSCR_CMD0_PSC1_TX | ||
| 34 | #define DBDMA_I2S_RX_CHAN DSCR_CMD0_PSC1_RX | ||
| 35 | |||
| 36 | /* | ||
| 37 | * SPI and SMB are muxed on the Pb1200 board. | ||
| 38 | * Refer to board documentation. | ||
| 39 | */ | ||
| 40 | #define SPI_PSC_BASE PSC0_BASE_ADDR | ||
| 41 | #define SMBUS_PSC_BASE PSC0_BASE_ADDR | ||
| 42 | /* | ||
| 43 | * AC97 and I2S are muxed on the Pb1200 board. | ||
| 44 | * Refer to board documentation. | ||
| 45 | */ | ||
| 46 | #define AC97_PSC_BASE PSC1_BASE_ADDR | ||
| 47 | #define I2S_PSC_BASE PSC1_BASE_ADDR | ||
| 48 | |||
| 49 | |||
| 50 | #define BCSR_SYSTEM_VDDI 0x001F | ||
| 51 | #define BCSR_SYSTEM_POWEROFF 0x4000 | ||
| 52 | #define BCSR_SYSTEM_RESET 0x8000 | ||
| 53 | |||
| 54 | /* Bit positions for the different interrupt sources */ | ||
| 55 | #define BCSR_INT_IDE 0x0001 | ||
| 56 | #define BCSR_INT_ETH 0x0002 | ||
| 57 | #define BCSR_INT_PC0 0x0004 | ||
| 58 | #define BCSR_INT_PC0STSCHG 0x0008 | ||
| 59 | #define BCSR_INT_PC1 0x0010 | ||
| 60 | #define BCSR_INT_PC1STSCHG 0x0020 | ||
| 61 | #define BCSR_INT_DC 0x0040 | ||
| 62 | #define BCSR_INT_FLASHBUSY 0x0080 | ||
| 63 | #define BCSR_INT_PC0INSERT 0x0100 | ||
| 64 | #define BCSR_INT_PC0EJECT 0x0200 | ||
| 65 | #define BCSR_INT_PC1INSERT 0x0400 | ||
| 66 | #define BCSR_INT_PC1EJECT 0x0800 | ||
| 67 | #define BCSR_INT_SD0INSERT 0x1000 | ||
| 68 | #define BCSR_INT_SD0EJECT 0x2000 | ||
| 69 | #define BCSR_INT_SD1INSERT 0x4000 | ||
| 70 | #define BCSR_INT_SD1EJECT 0x8000 | ||
| 71 | |||
| 72 | #define SMC91C111_PHYS_ADDR 0x0D000300 | ||
| 73 | #define SMC91C111_INT PB1200_ETH_INT | ||
| 74 | |||
| 75 | #define IDE_PHYS_ADDR 0x0C800000 | ||
| 76 | #define IDE_REG_SHIFT 5 | ||
| 77 | #define IDE_PHYS_LEN (16 << IDE_REG_SHIFT) | ||
| 78 | #define IDE_INT PB1200_IDE_INT | ||
| 79 | #define IDE_DDMA_REQ DSCR_CMD0_DMA_REQ1 | ||
| 80 | #define IDE_RQSIZE 128 | ||
| 81 | |||
| 82 | #define NAND_PHYS_ADDR 0x1C000000 | ||
| 83 | |||
| 84 | /* | ||
| 85 | * Timing values as described in databook, * ns value stripped of | ||
| 86 | * lower 2 bits. | ||
| 87 | * These defines are here rather than an Au1200 generic file because | ||
| 88 | * the parts chosen on another board may be different and may require | ||
| 89 | * different timings. | ||
| 90 | */ | ||
| 91 | #define NAND_T_H (18 >> 2) | ||
| 92 | #define NAND_T_PUL (30 >> 2) | ||
| 93 | #define NAND_T_SU (30 >> 2) | ||
| 94 | #define NAND_T_WH (30 >> 2) | ||
| 95 | |||
| 96 | /* Bitfield shift amounts */ | ||
| 97 | #define NAND_T_H_SHIFT 0 | ||
| 98 | #define NAND_T_PUL_SHIFT 4 | ||
| 99 | #define NAND_T_SU_SHIFT 8 | ||
| 100 | #define NAND_T_WH_SHIFT 12 | ||
| 101 | |||
| 102 | #define NAND_TIMING (((NAND_T_H & 0xF) << NAND_T_H_SHIFT) | \ | ||
| 103 | ((NAND_T_PUL & 0xF) << NAND_T_PUL_SHIFT) | \ | ||
| 104 | ((NAND_T_SU & 0xF) << NAND_T_SU_SHIFT) | \ | ||
| 105 | ((NAND_T_WH & 0xF) << NAND_T_WH_SHIFT)) | ||
| 106 | |||
| 107 | /* | ||
| 108 | * External Interrupts for Pb1200 as of 8/6/2004. | ||
| 109 | * Bit positions in the CPLD registers can be calculated by taking | ||
| 110 | * the interrupt define and subtracting the PB1200_INT_BEGIN value. | ||
| 111 | * | ||
| 112 | * Example: IDE bis pos is = 64 - 64 | ||
| 113 | * ETH bit pos is = 65 - 64 | ||
| 114 | */ | ||
| 115 | enum external_pb1200_ints { | ||
| 116 | PB1200_INT_BEGIN = AU1000_MAX_INTR + 1, | ||
| 117 | |||
| 118 | PB1200_IDE_INT = PB1200_INT_BEGIN, | ||
| 119 | PB1200_ETH_INT, | ||
| 120 | PB1200_PC0_INT, | ||
| 121 | PB1200_PC0_STSCHG_INT, | ||
| 122 | PB1200_PC1_INT, | ||
| 123 | PB1200_PC1_STSCHG_INT, | ||
| 124 | PB1200_DC_INT, | ||
| 125 | PB1200_FLASHBUSY_INT, | ||
| 126 | PB1200_PC0_INSERT_INT, | ||
| 127 | PB1200_PC0_EJECT_INT, | ||
| 128 | PB1200_PC1_INSERT_INT, | ||
| 129 | PB1200_PC1_EJECT_INT, | ||
| 130 | PB1200_SD0_INSERT_INT, | ||
| 131 | PB1200_SD0_EJECT_INT, | ||
| 132 | PB1200_SD1_INSERT_INT, | ||
| 133 | PB1200_SD1_EJECT_INT, | ||
| 134 | |||
| 135 | PB1200_INT_END = PB1200_INT_BEGIN + 15 | ||
| 136 | }; | ||
| 137 | |||
| 138 | /* NAND chip select */ | ||
| 139 | #define NAND_CS 1 | ||
| 140 | |||
| 141 | #endif /* __ASM_PB1200_H */ | ||
diff --git a/arch/mips/include/asm/mach-pb1x00/pb1550.h b/arch/mips/include/asm/mach-pb1x00/pb1550.h new file mode 100644 index 00000000000..f835c88e959 --- /dev/null +++ b/arch/mips/include/asm/mach-pb1x00/pb1550.h | |||
| @@ -0,0 +1,73 @@ | |||
| 1 | /* | ||
| 2 | * AMD Alchemy Semi PB1550 Reference Board | ||
| 3 | * Board Registers defines. | ||
| 4 | * | ||
| 5 | * Copyright 2004 Embedded Edge LLC. | ||
| 6 | * Copyright 2005 Ralf Baechle (ralf@linux-mips.org) | ||
| 7 | * | ||
| 8 | * ######################################################################## | ||
| 9 | * | ||
| 10 | * This program is free software; you can distribute it and/or modify it | ||
| 11 | * under the terms of the GNU General Public License (Version 2) as | ||
| 12 | * published by the Free Software Foundation. | ||
| 13 | * | ||
| 14 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 15 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 16 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
| 17 | * for more details. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 21 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
| 22 | * | ||
| 23 | * ######################################################################## | ||
| 24 | * | ||
| 25 | * | ||
| 26 | */ | ||
| 27 | #ifndef __ASM_PB1550_H | ||
| 28 | #define __ASM_PB1550_H | ||
| 29 | |||
| 30 | #include <linux/types.h> | ||
| 31 | #include <asm/mach-au1x00/au1xxx_psc.h> | ||
| 32 | |||
| 33 | #define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX | ||
| 34 | #define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX | ||
| 35 | #define DBDMA_I2S_TX_CHAN DSCR_CMD0_PSC3_TX | ||
| 36 | #define DBDMA_I2S_RX_CHAN DSCR_CMD0_PSC3_RX | ||
| 37 | |||
| 38 | #define SPI_PSC_BASE PSC0_BASE_ADDR | ||
| 39 | #define AC97_PSC_BASE PSC1_BASE_ADDR | ||
| 40 | #define SMBUS_PSC_BASE PSC2_BASE_ADDR | ||
| 41 | #define I2S_PSC_BASE PSC3_BASE_ADDR | ||
| 42 | |||
| 43 | /* | ||
| 44 | * Timing values as described in databook, * ns value stripped of | ||
| 45 | * lower 2 bits. | ||
| 46 | * These defines are here rather than an SOC1550 generic file because | ||
| 47 | * the parts chosen on another board may be different and may require | ||
| 48 | * different timings. | ||
| 49 | */ | ||
| 50 | #define NAND_T_H (18 >> 2) | ||
| 51 | #define NAND_T_PUL (30 >> 2) | ||
| 52 | #define NAND_T_SU (30 >> 2) | ||
| 53 | #define NAND_T_WH (30 >> 2) | ||
| 54 | |||
| 55 | /* Bitfield shift amounts */ | ||
| 56 | #define NAND_T_H_SHIFT 0 | ||
| 57 | #define NAND_T_PUL_SHIFT 4 | ||
| 58 | #define NAND_T_SU_SHIFT 8 | ||
| 59 | #define NAND_T_WH_SHIFT 12 | ||
| 60 | |||
| 61 | #define NAND_TIMING (((NAND_T_H & 0xF) << NAND_T_H_SHIFT) | \ | ||
| 62 | ((NAND_T_PUL & 0xF) << NAND_T_PUL_SHIFT) | \ | ||
| 63 | ((NAND_T_SU & 0xF) << NAND_T_SU_SHIFT) | \ | ||
| 64 | ((NAND_T_WH & 0xF) << NAND_T_WH_SHIFT)) | ||
| 65 | |||
| 66 | #define NAND_CS 1 | ||
| 67 | |||
| 68 | /* Should be done by YAMON */ | ||
| 69 | #define NAND_STCFG 0x00400005 /* 8-bit NAND */ | ||
| 70 | #define NAND_STTIME 0x00007774 /* valid for 396 MHz SD=2 only */ | ||
| 71 | #define NAND_STADDR 0x12000FFF /* physical address 0x20000000 */ | ||
| 72 | |||
| 73 | #endif /* __ASM_PB1550_H */ | ||
