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

📄 ppcv_cpuconfig_7450.c

📁 qnx powerpc MPC8245的 BSP源文件
💻 C
字号:
/* * $QNXLicenseC:  * Copyright 2007, QNX Software Systems.   *   * Licensed under the Apache License, Version 2.0 (the "License"). You   * may not reproduce, modify or distribute this software except in   * compliance with the License. You may obtain a copy of the License   * at: http://www.apache.org/licenses/LICENSE-2.0   *   * Unless required by applicable law or agreed to in writing, software   * distributed under the License is distributed on an "AS IS" basis,   * WITHOUT WARRANTIES OF ANY KIND, either express or implied.  *  * This file may contain contributions from others, either as   * contributors under the License or as licensors under other terms.    * Please review this entire file for other proprietary rights or license   * notices, as well as the QNX Development Suite License Guide at   * http://licensing.qnx.com/license-guide/ for other information.  * $  */#include "startup.h"voidppcv_cpuconfig2_7450(int cpu) {	unsigned	hid0;	unsigned	hid1;   unsigned rev;	ppcv_cpuconfig2_600(cpu);	hid0 = get_spr(PPC603_SPR_HID0);	hid0 |= 0x04100000;   switch (PPC_GET_FAM_MEMBER(get_pvr())) {      case PPC_7450:         rev = PPC_GET_REVISION(get_pvr());         if(rev < 0x210) {            // Rev. 2.0 - no SGE, BTIC            hid0 |= PPC700_SPR_HID0_BHT | PPC700_SPR_HID0_ABE;         } else if (rev == 0x210) {            // Rev. 2.1 -- no SGE            hid0 |= PPC700_SPR_HID0_BHT | PPC700_SPR_HID0_BTIC | PPC700_SPR_HID0_ABE | PPC7450_SPR_HID0_LRSTK;         } else {            // Rev. 2.3 and above -- everything should work            hid0 |= PPC700_SPR_HID0_SGE | PPC700_SPR_HID0_BHT | PPC700_SPR_HID0_BTIC | PPC700_SPR_HID0_ABE | PPC7450_SPR_HID0_LRSTK;         }         break;      case PPC_7457: // This handles PPC_7447 also since they are the same value         rev = PPC_GET_REVISION(get_pvr());         if(rev < 0x120) {            // Rev. 1.2 - no SGE, BTIC            hid0 |= PPC700_SPR_HID0_BHT |PPC700_SPR_HID0_ABE |PPC7450_SPR_HID0_LRSTK;         } else {            // Rev above -- everything should work            hid0 |= PPC700_SPR_HID0_SGE | PPC700_SPR_HID0_BHT | PPC700_SPR_HID0_BTIC | PPC700_SPR_HID0_ABE | PPC7450_SPR_HID0_LRSTK;         }         break;      case PPC_7447:         hid0 |= PPC700_SPR_HID0_SGE | PPC700_SPR_HID0_BHT | PPC700_SPR_HID0_BTIC | PPC700_SPR_HID0_ABE | PPC7450_SPR_HID0_LRSTK;         break;      default:         hid0 |= PPC700_SPR_HID0_SGE | PPC700_SPR_HID0_BHT | PPC700_SPR_HID0_ABE | PPC7450_SPR_HID0_LRSTK;         break;   }	hid0 |= (PPC700_SPR_HID0_SBCLK | PPC700_SPR_HID0_DPM);	hid0 &= ~PPC700_SPR_HID0_SPD;	set_spr(PPC603_SPR_HID0, hid0);	// Turn on cache ops broadcasts and sync broadcasts	hid1 = get_spr(PPC603_SPR_HID1);	hid1 |= PPC7450_SPR_HID1_SYNCBE|PPC7450_SPR_HID1_ABE;	set_spr(PPC603_SPR_HID1, hid1);}

⌨️ 快捷键说明

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