Mario Six | 7cab147 | 2018-08-06 10:23:36 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * (C) Copyright 2018 |
| 4 | * Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc |
| 5 | */ |
| 6 | |
| 7 | #ifndef _MPC83XX_SOC_H_ |
| 8 | #define _MPC83XX_SOC_H_ |
| 9 | |
| 10 | enum soc_type { |
| 11 | SOC_MPC8308, |
| 12 | SOC_MPC8309, |
| 13 | SOC_MPC8313, |
| 14 | SOC_MPC8315, |
| 15 | SOC_MPC832X, |
| 16 | SOC_MPC8349, |
| 17 | SOC_MPC8360, |
| 18 | SOC_MPC8379, |
| 19 | }; |
| 20 | |
Christophe Leroy | 992eefc | 2023-04-04 15:09:18 +0200 | [diff] [blame] | 21 | static inline bool mpc83xx_has_sdhc(int type) |
Mario Six | 7cab147 | 2018-08-06 10:23:36 +0200 | [diff] [blame] | 22 | { |
| 23 | return (type == SOC_MPC8308) || |
| 24 | (type == SOC_MPC8309) || |
| 25 | (type == SOC_MPC8379); |
| 26 | } |
| 27 | |
Christophe Leroy | 992eefc | 2023-04-04 15:09:18 +0200 | [diff] [blame] | 28 | static inline bool mpc83xx_has_tsec(int type) |
Mario Six | 7cab147 | 2018-08-06 10:23:36 +0200 | [diff] [blame] | 29 | { |
| 30 | return (type == SOC_MPC8308) || |
| 31 | (type == SOC_MPC8313) || |
| 32 | (type == SOC_MPC8315) || |
| 33 | (type == SOC_MPC8349) || |
| 34 | (type == SOC_MPC8379); |
| 35 | } |
| 36 | |
Christophe Leroy | 992eefc | 2023-04-04 15:09:18 +0200 | [diff] [blame] | 37 | static inline bool mpc83xx_has_pcie1(int type) |
Mario Six | 7cab147 | 2018-08-06 10:23:36 +0200 | [diff] [blame] | 38 | { |
| 39 | return (type == SOC_MPC8308) || |
| 40 | (type == SOC_MPC8315) || |
| 41 | (type == SOC_MPC8379); |
| 42 | } |
| 43 | |
Christophe Leroy | 992eefc | 2023-04-04 15:09:18 +0200 | [diff] [blame] | 44 | static inline bool mpc83xx_has_pcie2(int type) |
Mario Six | 7cab147 | 2018-08-06 10:23:36 +0200 | [diff] [blame] | 45 | { |
| 46 | return (type == SOC_MPC8315) || |
| 47 | (type == SOC_MPC8379); |
| 48 | } |
| 49 | |
Christophe Leroy | 992eefc | 2023-04-04 15:09:18 +0200 | [diff] [blame] | 50 | static inline bool mpc83xx_has_sata(int type) |
Mario Six | 7cab147 | 2018-08-06 10:23:36 +0200 | [diff] [blame] | 51 | { |
| 52 | return (type == SOC_MPC8315) || |
| 53 | (type == SOC_MPC8379); |
| 54 | } |
| 55 | |
Christophe Leroy | 992eefc | 2023-04-04 15:09:18 +0200 | [diff] [blame] | 56 | static inline bool mpc83xx_has_pci(int type) |
Mario Six | 7cab147 | 2018-08-06 10:23:36 +0200 | [diff] [blame] | 57 | { |
| 58 | return type != SOC_MPC8308; |
| 59 | } |
| 60 | |
Christophe Leroy | 992eefc | 2023-04-04 15:09:18 +0200 | [diff] [blame] | 61 | static inline bool mpc83xx_has_second_i2c(int type) |
Mario Six | 7cab147 | 2018-08-06 10:23:36 +0200 | [diff] [blame] | 62 | { |
| 63 | return (type != SOC_MPC8315) && |
| 64 | (type != SOC_MPC832X); |
| 65 | } |
| 66 | |
Christophe Leroy | 992eefc | 2023-04-04 15:09:18 +0200 | [diff] [blame] | 67 | static inline bool mpc83xx_has_quicc_engine(int type) |
Mario Six | 7cab147 | 2018-08-06 10:23:36 +0200 | [diff] [blame] | 68 | { |
| 69 | return (type == SOC_MPC8309) || |
| 70 | (type == SOC_MPC832X) || |
| 71 | (type == SOC_MPC8360); |
| 72 | } |
| 73 | |
| 74 | #endif /* _MPC83XX_SOC_H_ */ |