ar71xx_setup.c (211502) | ar71xx_setup.c (211503) |
---|---|
1/*- 2 * Copyright (c) 2010 Adrian Chadd 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2010 Adrian Chadd 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/mips/atheros/ar71xx_setup.c 211502 2010-08-19 11:40:10Z adrian $"); | 28__FBSDID("$FreeBSD: head/sys/mips/atheros/ar71xx_setup.c 211503 2010-08-19 11:53:55Z adrian $"); |
29 30#include <sys/param.h> 31#include <machine/cpuregs.h> 32 33#include <mips/sentry5/s5reg.h> 34 35#include "opt_ddb.h" 36 --- 19 unchanged lines hidden (view full) --- 56#include <machine/vmparam.h> 57 58#include <mips/atheros/ar71xxreg.h> 59#include <mips/atheros/ar71xx_setup.h> 60 61#include <mips/atheros/ar71xx_cpudef.h> 62 63#include <mips/atheros/ar71xx_chip.h> | 29 30#include <sys/param.h> 31#include <machine/cpuregs.h> 32 33#include <mips/sentry5/s5reg.h> 34 35#include "opt_ddb.h" 36 --- 19 unchanged lines hidden (view full) --- 56#include <machine/vmparam.h> 57 58#include <mips/atheros/ar71xxreg.h> 59#include <mips/atheros/ar71xx_setup.h> 60 61#include <mips/atheros/ar71xx_cpudef.h> 62 63#include <mips/atheros/ar71xx_chip.h> |
64#include <mips/atheros/ar724x_chip.h> |
|
64#include <mips/atheros/ar91xx_chip.h> 65 66#define AR71XX_SYS_TYPE_LEN 128 67 68static char ar71xx_sys_type[AR71XX_SYS_TYPE_LEN]; 69enum ar71xx_soc_type ar71xx_soc; 70struct ar71xx_cpu_def * ar71xx_cpu_ops = NULL; 71 --- 28 unchanged lines hidden (view full) --- 100 101 case AR71XX_REV_ID_MINOR_AR7161: 102 ar71xx_soc = AR71XX_SOC_AR7161; 103 chip = "7161"; 104 break; 105 } 106 break; 107 | 65#include <mips/atheros/ar91xx_chip.h> 66 67#define AR71XX_SYS_TYPE_LEN 128 68 69static char ar71xx_sys_type[AR71XX_SYS_TYPE_LEN]; 70enum ar71xx_soc_type ar71xx_soc; 71struct ar71xx_cpu_def * ar71xx_cpu_ops = NULL; 72 --- 28 unchanged lines hidden (view full) --- 101 102 case AR71XX_REV_ID_MINOR_AR7161: 103 ar71xx_soc = AR71XX_SOC_AR7161; 104 chip = "7161"; 105 break; 106 } 107 break; 108 |
109 case REV_ID_MAJOR_AR7240: 110 ar71xx_soc = AR71XX_SOC_AR7240; 111 chip = "7240"; 112 ar71xx_cpu_ops = &ar724x_chip_def; 113 rev = (id & AR724X_REV_ID_REVISION_MASK); 114 break; 115 116 case REV_ID_MAJOR_AR7241: 117 ar71xx_soc = AR71XX_SOC_AR7241; 118 chip = "7241"; 119 ar71xx_cpu_ops = &ar724x_chip_def; 120 rev = (id & AR724X_REV_ID_REVISION_MASK); 121 break; 122 123 case REV_ID_MAJOR_AR7242: 124 ar71xx_soc = AR71XX_SOC_AR7242; 125 chip = "7242"; 126 ar71xx_cpu_ops = &ar724x_chip_def; 127 rev = (id & AR724X_REV_ID_REVISION_MASK); 128 break; 129 |
|
108 case REV_ID_MAJOR_AR913X: 109 minor = id & AR91XX_REV_ID_MINOR_MASK; 110 rev = id >> AR91XX_REV_ID_REVISION_SHIFT; 111 rev &= AR91XX_REV_ID_REVISION_MASK; 112 ar71xx_cpu_ops = &ar91xx_chip_def; 113 switch (minor) { 114 case AR91XX_REV_ID_MINOR_AR9130: 115 ar71xx_soc = AR71XX_SOC_AR9130; --- 24 unchanged lines hidden --- | 130 case REV_ID_MAJOR_AR913X: 131 minor = id & AR91XX_REV_ID_MINOR_MASK; 132 rev = id >> AR91XX_REV_ID_REVISION_SHIFT; 133 rev &= AR91XX_REV_ID_REVISION_MASK; 134 ar71xx_cpu_ops = &ar91xx_chip_def; 135 switch (minor) { 136 case AR91XX_REV_ID_MINOR_AR9130: 137 ar71xx_soc = AR71XX_SOC_AR9130; --- 24 unchanged lines hidden --- |