Deleted Added
full compact
ar71xx_setup.c (249118) ar71xx_setup.c (253511)
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 249118 2013-04-05 00:22:17Z adrian $");
28__FBSDID("$FreeBSD: head/sys/mips/atheros/ar71xx_setup.c 253511 2013-07-21 03:56:57Z adrian $");
29
30#include "opt_ddb.h"
31
32#include <sys/param.h>
33#include <sys/conf.h>
34#include <sys/kernel.h>
35#include <sys/systm.h>
36#include <sys/bus.h>

--- 11 unchanged lines hidden (view full) ---

48#include <machine/cpuregs.h>
49#include <machine/hwfunc.h>
50#include <machine/md_var.h>
51#include <machine/trap.h>
52#include <machine/vmparam.h>
53
54#include <mips/atheros/ar71xxreg.h>
55#include <mips/atheros/ar933xreg.h>
29
30#include "opt_ddb.h"
31
32#include <sys/param.h>
33#include <sys/conf.h>
34#include <sys/kernel.h>
35#include <sys/systm.h>
36#include <sys/bus.h>

--- 11 unchanged lines hidden (view full) ---

48#include <machine/cpuregs.h>
49#include <machine/hwfunc.h>
50#include <machine/md_var.h>
51#include <machine/trap.h>
52#include <machine/vmparam.h>
53
54#include <mips/atheros/ar71xxreg.h>
55#include <mips/atheros/ar933xreg.h>
56#include <mips/atheros/ar934xreg.h>
56
57#include <mips/atheros/ar71xx_setup.h>
58
59#include <mips/atheros/ar71xx_cpudef.h>
60
61#include <mips/atheros/ar71xx_chip.h>
62#include <mips/atheros/ar724x_chip.h>
63#include <mips/atheros/ar91xx_chip.h>
64#include <mips/atheros/ar933x_chip.h>
57
58#include <mips/atheros/ar71xx_setup.h>
59
60#include <mips/atheros/ar71xx_cpudef.h>
61
62#include <mips/atheros/ar71xx_chip.h>
63#include <mips/atheros/ar724x_chip.h>
64#include <mips/atheros/ar91xx_chip.h>
65#include <mips/atheros/ar933x_chip.h>
66#include <mips/atheros/ar934x_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
72void

--- 80 unchanged lines hidden (view full) ---

153 case REV_ID_MAJOR_AR9331:
154 minor = 1;
155 rev = (id & AR933X_REV_ID_REVISION_MASK);
156 chip = "9331";
157 ar71xx_soc = AR71XX_SOC_AR9331;
158 ar71xx_cpu_ops = &ar933x_chip_def;
159 break;
160
67
68#define AR71XX_SYS_TYPE_LEN 128
69
70static char ar71xx_sys_type[AR71XX_SYS_TYPE_LEN];
71enum ar71xx_soc_type ar71xx_soc;
72struct ar71xx_cpu_def * ar71xx_cpu_ops = NULL;
73
74void

--- 80 unchanged lines hidden (view full) ---

155 case REV_ID_MAJOR_AR9331:
156 minor = 1;
157 rev = (id & AR933X_REV_ID_REVISION_MASK);
158 chip = "9331";
159 ar71xx_soc = AR71XX_SOC_AR9331;
160 ar71xx_cpu_ops = &ar933x_chip_def;
161 break;
162
163 case REV_ID_MAJOR_AR9341:
164 minor = 0;
165 rev = (id & AR934X_REV_ID_REVISION_MASK);
166 chip = "9341";
167 ar71xx_soc = AR71XX_SOC_AR9341;
168 ar71xx_cpu_ops = &ar934x_chip_def;
169 break;
170
171 case REV_ID_MAJOR_AR9342:
172 minor = 0;
173 rev = (id & AR934X_REV_ID_REVISION_MASK);
174 chip = "9342";
175 ar71xx_soc = AR71XX_SOC_AR9342;
176 ar71xx_cpu_ops = &ar934x_chip_def;
177 break;
178
179 case REV_ID_MAJOR_AR9344:
180 minor = 0;
181 rev = (id & AR934X_REV_ID_REVISION_MASK);
182 chip = "9344";
183 ar71xx_soc = AR71XX_SOC_AR9344;
184 ar71xx_cpu_ops = &ar934x_chip_def;
185 break;
186
161 default:
162 panic("ar71xx: unknown chip id:0x%08x\n", id);
163 }
164
165 sprintf(ar71xx_sys_type, "Atheros AR%s rev %u", chip, rev);
166}
167
168const char *
169ar71xx_get_system_type(void)
170{
171 return ar71xx_sys_type;
172}
173
187 default:
188 panic("ar71xx: unknown chip id:0x%08x\n", id);
189 }
190
191 sprintf(ar71xx_sys_type, "Atheros AR%s rev %u", chip, rev);
192}
193
194const char *
195ar71xx_get_system_type(void)
196{
197 return ar71xx_sys_type;
198}
199