| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: rmixlvar.h,v 1.1.2.25 2012/01/04 16:17:54 matt Exp $ */ | | 1 | /* $NetBSD: rmixlvar.h,v 1.1.2.26 2012/01/19 08:03:22 matt Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright 2002 Wasabi Systems, Inc. | | 4 | * Copyright 2002 Wasabi Systems, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Written by Simon Burge for Wasabi Systems, Inc. | | 7 | * Written by Simon Burge for Wasabi Systems, Inc. |
8 | * | | 8 | * |
9 | * Redistribution and use in source and binary forms, with or without | | 9 | * Redistribution and use in source and binary forms, with or without |
10 | * modification, are permitted provided that the following conditions | | 10 | * modification, are permitted provided that the following conditions |
11 | * are met: | | 11 | * are met: |
12 | * 1. Redistributions of source code must retain the above copyright | | 12 | * 1. Redistributions of source code must retain the above copyright |
13 | * notice, this list of conditions and the following disclaimer. | | 13 | * notice, this list of conditions and the following disclaimer. |
14 | * 2. Redistributions in binary form must reproduce the above copyright | | 14 | * 2. Redistributions in binary form must reproduce the above copyright |
| @@ -57,47 +57,59 @@ cpu_rmixl_chip_type(const struct pridtab | | | @@ -57,47 +57,59 @@ cpu_rmixl_chip_type(const struct pridtab |
57 | return ct->cpu_cidflags & MIPS_CIDFL_RMI_TYPE; | | 57 | return ct->cpu_cidflags & MIPS_CIDFL_RMI_TYPE; |
58 | } | | 58 | } |
59 | | | 59 | |
60 | static inline bool | | 60 | static inline bool |
61 | cpu_rmixl(const struct pridtab *ct) | | 61 | cpu_rmixl(const struct pridtab *ct) |
62 | { | | 62 | { |
63 | return ct->cpu_cid == MIPS_PRID_CID_RMI; | | 63 | return ct->cpu_cid == MIPS_PRID_CID_RMI; |
64 | } | | 64 | } |
65 | | | 65 | |
66 | static inline bool | | 66 | static inline bool |
67 | cpu_rmixlr(const struct pridtab *ct) | | 67 | cpu_rmixlr(const struct pridtab *ct) |
68 | { | | 68 | { |
69 | #ifdef MIPS64_XLR | | 69 | #ifdef MIPS64_XLR |
| | | 70 | #if (MIPS64_XLS + MIPS64_XLP) == 0 |
| | | 71 | return true; |
| | | 72 | #else |
70 | return cpu_rmixl(ct) && cpu_rmixl_chip_type(ct) == CIDFL_RMI_TYPE_XLR; | | 73 | return cpu_rmixl(ct) && cpu_rmixl_chip_type(ct) == CIDFL_RMI_TYPE_XLR; |
| | | 74 | #endif |
71 | #else | | 75 | #else |
72 | return false; | | 76 | return false; |
73 | #endif | | 77 | #endif |
74 | } | | 78 | } |
75 | | | 79 | |
76 | static inline bool | | 80 | static inline bool |
77 | cpu_rmixls(const struct pridtab *ct) | | 81 | cpu_rmixls(const struct pridtab *ct) |
78 | { | | 82 | { |
79 | #ifdef MIPS64_XLS | | 83 | #ifdef MIPS64_XLS |
| | | 84 | #if (MIPS64_XLR + MIPS64_XLP) == 0 |
| | | 85 | return true; |
| | | 86 | #else |
80 | return cpu_rmixl(ct) && cpu_rmixl_chip_type(ct) == CIDFL_RMI_TYPE_XLS; | | 87 | return cpu_rmixl(ct) && cpu_rmixl_chip_type(ct) == CIDFL_RMI_TYPE_XLS; |
| | | 88 | #endif |
81 | #else | | 89 | #else |
82 | return false; | | 90 | return false; |
83 | #endif | | 91 | #endif |
84 | } | | 92 | } |
85 | | | 93 | |
86 | static inline bool | | 94 | static inline bool |
87 | cpu_rmixlp(const struct pridtab *ct) | | 95 | cpu_rmixlp(const struct pridtab *ct) |
88 | { | | 96 | { |
89 | #ifdef MIPS64_XLP | | 97 | #ifdef MIPS64_XLP |
| | | 98 | #if (MIPS64_XLR + MIPS64_XLS) == 0 |
| | | 99 | return true; |
| | | 100 | #else |
90 | return cpu_rmixl(ct) && cpu_rmixl_chip_type(ct) == CIDFL_RMI_TYPE_XLP; | | 101 | return cpu_rmixl(ct) && cpu_rmixl_chip_type(ct) == CIDFL_RMI_TYPE_XLP; |
| | | 102 | #endif |
91 | #else | | 103 | #else |
92 | return false; | | 104 | return false; |
93 | #endif | | 105 | #endif |
94 | } | | 106 | } |
95 | | | 107 | |
96 | typedef enum { | | 108 | typedef enum { |
97 | PSB_TYPE_UNKNOWN=0, | | 109 | PSB_TYPE_UNKNOWN=0, |
98 | PSB_TYPE_RMI, | | 110 | PSB_TYPE_RMI, |
99 | PSB_TYPE_DELL, | | 111 | PSB_TYPE_DELL, |
100 | } rmixlfw_psb_type_t; | | 112 | } rmixlfw_psb_type_t; |
101 | | | 113 | |
102 | static inline const char * | | 114 | static inline const char * |
103 | rmixlfw_psb_type_name(rmixlfw_psb_type_t type) | | 115 | rmixlfw_psb_type_name(rmixlfw_psb_type_t type) |