Mercurial > flash_v2
comparison packages/hal/powerpc/mpc8xx/current/src/mpc8xxrev.c @ 76:435cced73e2f ecos-v1_3_1-release
eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
| author | jlarmour |
|---|---|
| date | Tue, 28 Mar 2000 14:10:45 +0000 |
| parents | |
| children | f62680ef1804 |
comparison
equal
deleted
inserted
replaced
| 75:41bf073c0c32 | 76:435cced73e2f |
|---|---|
| 1 //========================================================================== | |
| 2 // | |
| 3 // mpc8xxrev.c | |
| 4 // | |
| 5 // MPC8xx Revision Identification | |
| 6 // | |
| 7 //========================================================================== | |
| 8 //####COPYRIGHTBEGIN#### | |
| 9 // | |
| 10 // ------------------------------------------- | |
| 11 // The contents of this file are subject to the Cygnus eCos Public License | |
| 12 // Version 1.0 (the "License"); you may not use this file except in | |
| 13 // compliance with the License. You may obtain a copy of the License at | |
| 14 // http://sourceware.cygnus.com/ecos | |
| 15 // | |
| 16 // Software distributed under the License is distributed on an "AS IS" | |
| 17 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | |
| 18 // License for the specific language governing rights and limitations under | |
| 19 // the License. | |
| 20 // | |
| 21 // The Original Code is eCos - Embedded Cygnus Operating System, released | |
| 22 // September 30, 1998. | |
| 23 // | |
| 24 // The Initial Developer of the Original Code is Cygnus. Portions created | |
| 25 // by Cygnus are Copyright (C) 1998 Cygnus Solutions. All Rights Reserved. | |
| 26 // ------------------------------------------- | |
| 27 // | |
| 28 //####COPYRIGHTEND#### | |
| 29 //========================================================================== | |
| 30 //#####DESCRIPTIONBEGIN#### | |
| 31 // | |
| 32 // Author(s): jskov | |
| 33 // Contributors: jskov | |
| 34 // Date: 2000-02-23 | |
| 35 // Description: Print MPC8xx revision numbers | |
| 36 //####DESCRIPTIONEND#### | |
| 37 | |
| 38 #include <cyg/infra/testcase.h> | |
| 39 #include <stdio.h> | |
| 40 #include <cyg/hal/ppc_regs.h> | |
| 41 #include <cyg/hal/hal_io.h> | |
| 42 | |
| 43 int | |
| 44 main( void ) | |
| 45 { | |
| 46 cyg_uint32 pvr, part_mask; | |
| 47 cyg_uint16 rev_num; | |
| 48 | |
| 49 CYG_TEST_INIT(); | |
| 50 | |
| 51 asm volatile ("mfspr %0, 287;": "=r" (pvr)); | |
| 52 printf ("Processor PVR: 0x%08x\n", pvr); | |
| 53 | |
| 54 asm volatile ("mfspr %0, 638;": "=r" (part_mask)); | |
| 55 printf ("Processor IMMR[16:31]: 0x%04x\n", (part_mask & 0xffff)); | |
| 56 | |
| 57 HAL_READ_UINT16(CYGARC_REG_REV_NUM, rev_num); | |
| 58 printf ("Processor REV_NUM: 0x%04x\n", rev_num); | |
| 59 | |
| 60 | |
| 61 printf("\nSee http://www.motorola.com/SPS/RISC/netcomm/ for erratas.\n"); | |
| 62 printf("Look for MPC8xx Versions and Masks in the Publications Library\n"); | |
| 63 | |
| 64 CYG_TEST_PASS_FINISH("mpc8xx revision dump"); | |
| 65 } | |
| 66 // EOF mpc8xxrev.c |
