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 | |
| 21 | bool mpc83xx_has_sdhc(int type) |
| 22 | { |
| 23 | return (type == SOC_MPC8308) || |
| 24 | (type == SOC_MPC8309) || |
| 25 | (type == SOC_MPC8379); |
| 26 | } |
| 27 | |
| 28 | bool mpc83xx_has_tsec(int type) |
| 29 | { |
| 30 | return (type == SOC_MPC8308) || |
| 31 | (type == SOC_MPC8313) || |
| 32 | (type == SOC_MPC8315) || |
| 33 | (type == SOC_MPC8349) || |
| 34 | (type == SOC_MPC8379); |
| 35 | } |
| 36 | |
| 37 | bool mpc83xx_has_pcie1(int type) |
| 38 | { |
| 39 | return (type == SOC_MPC8308) || |
| 40 | (type == SOC_MPC8315) || |
| 41 | (type == SOC_MPC8379); |
| 42 | } |
| 43 | |
| 44 | bool mpc83xx_has_pcie2(int type) |
| 45 | { |
| 46 | return (type == SOC_MPC8315) || |
| 47 | (type == SOC_MPC8379); |
| 48 | } |
| 49 | |
| 50 | bool mpc83xx_has_sata(int type) |
| 51 | { |
| 52 | return (type == SOC_MPC8315) || |
| 53 | (type == SOC_MPC8379); |
| 54 | } |
| 55 | |
| 56 | bool mpc83xx_has_pci(int type) |
| 57 | { |
| 58 | return type != SOC_MPC8308; |
| 59 | } |
| 60 | |
| 61 | bool mpc83xx_has_second_i2c(int type) |
| 62 | { |
| 63 | return (type != SOC_MPC8315) && |
| 64 | (type != SOC_MPC832X); |
| 65 | } |
| 66 | |
| 67 | bool mpc83xx_has_quicc_engine(int type) |
| 68 | { |
| 69 | return (type == SOC_MPC8309) || |
| 70 | (type == SOC_MPC832X) || |
| 71 | (type == SOC_MPC8360); |
| 72 | } |
| 73 | |
| 74 | #endif /* _MPC83XX_SOC_H_ */ |