⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 klgraph_init.c

📁 microwindows移植到S3C44B0的源码
💻 C
📖 第 1 页 / 共 2 页
字号:
/* $Id: klgraph_init.c,v 1.1 2002/02/28 17:31:25 marcelo Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License.  See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 1992 - 1997, 2000-2002 Silicon Graphics, Inc.  All Rights Reserved. *//* * This is a temporary file that statically initializes the expected  * initial klgraph information that is normally provided by prom. */#include <linux/types.h>#include <linux/config.h>#include <linux/slab.h>#include <linux/vmalloc.h>#include <asm/sn/sgi.h>#include <asm/sn/io.h>#include <asm/sn/driver.h>#include <asm/sn/iograph.h>#include <asm/param.h>#include <asm/sn/pio.h>#include <asm/sn/xtalk/xwidget.h>#include <asm/sn/sn_private.h>#include <asm/sn/addrs.h>#include <asm/sn/invent.h>#include <asm/sn/hcl.h>#include <asm/sn/hcl_util.h>#include <asm/sn/intr.h>#include <asm/sn/xtalk/xtalkaddrs.h>#include <asm/sn/klconfig.h>#define SYNERGY_WIDGET          ((char *)0xc0000e0000000000)#define SYNERGY_SWIZZLE         ((char *)0xc0000e0000000400)#define HUBREG                  ((char *)0xc0000a0001e00000)#define WIDGET0                 ((char *)0xc0000a0000000000)#define WIDGET4                 ((char *)0xc0000a0000000004)#define SYNERGY_WIDGET          ((char *)0xc0000e0000000000)#define SYNERGY_SWIZZLE         ((char *)0xc0000e0000000400)#define HUBREG                  ((char *)0xc0000a0001e00000)#define WIDGET0                 ((char *)0xc0000a0000000000)#define convert(a,b,c) temp = (u64 *)a; *temp = b; temp++; *temp = cvoidklgraph_init(void){	u64	*temp;	/*	 * Initialize some hub/xbow registers that allows access to 	 * Xbridge etc.  These are normally done in PROM.	 */        /* Write IOERR clear to clear the CRAZY bit in the status */#ifdef CONFIG_IA64_SGI_SN1        *(volatile uint64_t *)0xc0000a0001c001f8 = (uint64_t)0xffffffff;        /* set widget control register...setting bedrock widget id to b */        *(volatile uint64_t *)0xc0000a0001c00020 = (uint64_t)0x801b;        /* set io outbound widget access...allow all */        *(volatile uint64_t *)0xc0000a0001c00110 = (uint64_t)0xff01;        /* set io inbound widget access...allow all */        *(volatile uint64_t *)0xc0000a0001c00118 = (uint64_t)0xff01;        /* set io crb timeout to max */        *(volatile uint64_t *)0xc0000a0001c003c0 = (uint64_t)0xffffff;        *(volatile uint64_t *)0xc0000a0001c003c0 = (uint64_t)0xffffff;        /* set local block io permission...allow all */        *(volatile uint64_t *)0xc0000a0001e04010 = (uint64_t)0xfffffffffffffff;        /* clear any errors */        /* clear_ii_error(); medusa should have cleared these */        /* set default read response buffers in bridge */        *(volatile u32 *)0xc0000a000f000280L = 0xba98;        *(volatile u32 *)0xc0000a000f000288L = 0xba98;#elif CONFIG_IA64_SGI_SN2        *(volatile uint64_t *)0xc000000801c001f8 = (uint64_t)0xffffffff;        /* set widget control register...setting bedrock widget id to a */        *(volatile uint64_t *)0xc000000801c00020 = (uint64_t)0x801a;        /* set io outbound widget access...allow all */        *(volatile uint64_t *)0xc000000801c00110 = (uint64_t)0xff01;        /* set io inbound widget access...allow all */        *(volatile uint64_t *)0xc000000801c00118 = (uint64_t)0xff01;        /* set io crb timeout to max */        *(volatile uint64_t *)0xc000000801c003c0 = (uint64_t)0xffffff;        *(volatile uint64_t *)0xc000000801c003c0 = (uint64_t)0xffffff;        /* set local block io permission...allow all */// [LB]        *(volatile uint64_t *)0xc000000801e04010 = (uint64_t)0xfffffffffffffff;        /* clear any errors */        /* clear_ii_error(); medusa should have cleared these */        /* set default read response buffers in bridge */// [PI]       *(volatile u32 *)0xc00000080f000280L = 0xba98;// [PI]       *(volatile u32 *)0xc00000080f000288L = 0xba98;#endif	/* CONFIG_IA64_SGI_SN1 */	/*	 * kldir entries initialization - mankato	 */	convert(0x8000000000002000, 0x0000000000000000, 0x0000000000000000);	convert(0x8000000000002010, 0x0000000000000000, 0x0000000000000000);	convert(0x8000000000002020, 0x0000000000000000, 0x0000000000000000);	convert(0x8000000000002030, 0x0000000000000000, 0x0000000000000000);	convert(0x8000000000002040, 0x434d5f53505f5357, 0x0000000000030000);	convert(0x8000000000002050, 0x0000000000000000, 0x0000000000010000);	convert(0x8000000000002060, 0x0000000000000001, 0x0000000000000000);	convert(0x8000000000002070, 0x0000000000000000, 0x0000000000000000);	convert(0x8000000000002080, 0x0000000000000000, 0x0000000000000000);	convert(0x8000000000002090, 0x0000000000000000, 0x0000000000000000);	convert(0x80000000000020a0, 0x0000000000000000, 0x0000000000000000);	convert(0x80000000000020b0, 0x0000000000000000, 0x0000000000000000);	convert(0x80000000000020c0, 0x434d5f53505f5357, 0x0000000000000000);	convert(0x80000000000020d0, 0x0000000000002400, 0x0000000000000400);	convert(0x80000000000020e0, 0x0000000000000001, 0x0000000000000000);	convert(0x80000000000020f0, 0x0000000000000000, 0x0000000000000000);	convert(0x8000000000002100, 0x434d5f53505f5357, 0x0000000000040000);	convert(0x8000000000002110, 0x0000000000000000, 0xffffffffffffffff);	convert(0x8000000000002120, 0x0000000000000001, 0x0000000000000000);	convert(0x8000000000002130, 0x0000000000000000, 0x0000000000000000);	convert(0x8000000000002140, 0x0000000000000000, 0x0000000000000000);	convert(0x8000000000002150, 0x0000000000000000, 0x0000000000000000);	convert(0x8000000000002160, 0x0000000000000000, 0x0000000000000000);	convert(0x8000000000002170, 0x0000000000000000, 0x0000000000000000);	convert(0x8000000000002180, 0x434d5f53505f5357, 0x0000000000020000);	convert(0x8000000000002190, 0x0000000000000000, 0x0000000000010000);	convert(0x80000000000021a0, 0x0000000000000001, 0x0000000000000000); 	/*	 * klconfig entries initialization - mankato

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -