blob: ce54f9bebbe4f00a172a09e0b145fa44aa2c089c [file] [log] [blame]
Mario Six7cab1472018-08-06 10:23:36 +02001/* 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
10enum 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 Leroy992eefc2023-04-04 15:09:18 +020021static inline bool mpc83xx_has_sdhc(int type)
Mario Six7cab1472018-08-06 10:23:36 +020022{
23 return (type == SOC_MPC8308) ||
24 (type == SOC_MPC8309) ||
25 (type == SOC_MPC8379);
26}
27
Christophe Leroy992eefc2023-04-04 15:09:18 +020028static inline bool mpc83xx_has_tsec(int type)
Mario Six7cab1472018-08-06 10:23:36 +020029{
30 return (type == SOC_MPC8308) ||
31 (type == SOC_MPC8313) ||
32 (type == SOC_MPC8315) ||
33 (type == SOC_MPC8349) ||
34 (type == SOC_MPC8379);
35}
36
Christophe Leroy992eefc2023-04-04 15:09:18 +020037static inline bool mpc83xx_has_pcie1(int type)
Mario Six7cab1472018-08-06 10:23:36 +020038{
39 return (type == SOC_MPC8308) ||
40 (type == SOC_MPC8315) ||
41 (type == SOC_MPC8379);
42}
43
Christophe Leroy992eefc2023-04-04 15:09:18 +020044static inline bool mpc83xx_has_pcie2(int type)
Mario Six7cab1472018-08-06 10:23:36 +020045{
46 return (type == SOC_MPC8315) ||
47 (type == SOC_MPC8379);
48}
49
Christophe Leroy992eefc2023-04-04 15:09:18 +020050static inline bool mpc83xx_has_sata(int type)
Mario Six7cab1472018-08-06 10:23:36 +020051{
52 return (type == SOC_MPC8315) ||
53 (type == SOC_MPC8379);
54}
55
Christophe Leroy992eefc2023-04-04 15:09:18 +020056static inline bool mpc83xx_has_pci(int type)
Mario Six7cab1472018-08-06 10:23:36 +020057{
58 return type != SOC_MPC8308;
59}
60
Christophe Leroy992eefc2023-04-04 15:09:18 +020061static inline bool mpc83xx_has_second_i2c(int type)
Mario Six7cab1472018-08-06 10:23:36 +020062{
63 return (type != SOC_MPC8315) &&
64 (type != SOC_MPC832X);
65}
66
Christophe Leroy992eefc2023-04-04 15:09:18 +020067static inline bool mpc83xx_has_quicc_engine(int type)
Mario Six7cab1472018-08-06 10:23:36 +020068{
69 return (type == SOC_MPC8309) ||
70 (type == SOC_MPC832X) ||
71 (type == SOC_MPC8360);
72}
73
74#endif /* _MPC83XX_SOC_H_ */