1 /* 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. */ 20 struct resource txx9_ce_res[8]; 21 static char txx9_ce_res_name[8][4]; /* "CEn" */ 22 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, 28 }; 29 void __init 30 txx9_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 */ 49 unsigned int txx9_master_clock; 50 unsigned int txx9_cpu_clock; 51 unsigned int txx9_gbus_clock; 52