blob: 39bf7d5a7f9db0e6d6a49388d5ec691059dd2c06 [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
21bool mpc83xx_has_sdhc(int type)
22{
23 return (type == SOC_MPC8308) ||
24 (type == SOC_MPC8309) ||
25 (type == SOC_MPC8379);
26}
27
28bool 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
37bool mpc83xx_has_pcie1(int type)
38{
39 return (type == SOC_MPC8308) ||
40 (type == SOC_MPC8315) ||
41 (type == SOC_MPC8379);
42}
43
44bool mpc83xx_has_pcie2(int type)
45{
46 return (type == SOC_MPC8315) ||
47 (type == SOC_MPC8379);
48}
49
50bool mpc83xx_has_sata(int type)
51{
52 return (type == SOC_MPC8315) ||
53 (type == SOC_MPC8379);
54}
55
56bool mpc83xx_has_pci(int type)
57{
58 return type != SOC_MPC8308;
59}
60
61bool mpc83xx_has_second_i2c(int type)
62{
63 return (type != SOC_MPC8315) &&
64 (type != SOC_MPC832X);
65}
66
67bool 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_ */