blob: 46a631177757a4368cf395c82f6ded2a38e85c8e [file] [log] [blame]
Atsushi Nemoto89d63fe2008-07-11 00:33:08 +09001/*
2 * linux/arch/mips/txx9/generic/setup.c
3 *
4 * Based on linux/arch/mips/txx9/rbtx4938/setup.c,
5 * and RBTX49xx patch from CELF patch archive.
6 *
7 * 2003-2005 (c) MontaVista Software, Inc.
8 * (C) Copyright TOSHIBA CORPORATION 2000-2001, 2004-2007
9 *
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
12 * for more details.
13 */
14#include <linux/init.h>
15#include <linux/kernel.h>
16#include <linux/types.h>
17#include <asm/txx9/generic.h>
18
19/* EBUSC settings of TX4927, etc. */
20struct resource txx9_ce_res[8];
21static char txx9_ce_res_name[8][4]; /* "CEn" */
22
23/* pcode, internal register */
24char txx9_pcode_str[8];
25static struct resource txx9_reg_res = {
26 .name = txx9_pcode_str,
27 .flags = IORESOURCE_MEM,
28};
29void __init
30txx9_reg_res_init(unsigned int pcode, unsigned long base, unsigned long size)
31{
32 int i;
33
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];
38 }
39
40 sprintf(txx9_pcode_str, "TX%x", pcode);
41 if (base) {
42 txx9_reg_res.start = base & 0xfffffffffULL;
43 txx9_reg_res.end = (base & 0xfffffffffULL) + (size - 1);
44 request_resource(&iomem_resource, &txx9_reg_res);
45 }
46}
47
48/* clocks */
49unsigned int txx9_master_clock;
50unsigned int txx9_cpu_clock;
51unsigned int txx9_gbus_clock;