2 * linux/arch/mips/txx9/generic/setup.c
4 * Based on linux/arch/mips/txx9/rbtx4938/setup.c,
5 * and RBTX49xx patch from CELF patch archive.
7 * 2003-2005 (c) MontaVista Software, Inc.
8 * (C) Copyright TOSHIBA CORPORATION 2000-2001, 2004-2007
10 * This file is subject to the terms and conditions of the GNU General Public
11 * License. See the file "COPYING" in the main directory of this archive
14 #include <linux/init.h>
15 #include <linux/kernel.h>
16 #include <linux/types.h>
17 #include <asm/txx9/generic.h>
19 /* EBUSC settings of TX4927, etc. */
20 struct resource txx9_ce_res[8];
21 static char txx9_ce_res_name[8][4]; /* "CEn" */
23 /* pcode, internal register */
24 char txx9_pcode_str[8];
25 static struct resource txx9_reg_res = {
26 .name = txx9_pcode_str,
27 .flags = IORESOURCE_MEM,
30 txx9_reg_res_init(unsigned int pcode, unsigned long base, unsigned long size)
34 for (i = 0; i < ARRAY_SIZE(txx9_ce_res); i++) {
35 sprintf(txx9_ce_res_name[i], "CE%d", i);
36 txx9_ce_res[i].flags = IORESOURCE_MEM;
37 txx9_ce_res[i].name = txx9_ce_res_name[i];
40 sprintf(txx9_pcode_str, "TX%x", pcode);
42 txx9_reg_res.start = base & 0xfffffffffULL;
43 txx9_reg_res.end = (base & 0xfffffffffULL) + (size - 1);
44 request_resource(&iomem_resource, &txx9_reg_res);
49 unsigned int txx9_master_clock;
50 unsigned int txx9_cpu_clock;
51 unsigned int txx9_gbus_clock;