summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/arch-mpc83xx/soc.h
blob: 39bf7d5a7f9db0e6d6a49388d5ec691059dd2c06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * (C) Copyright 2018
 * Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc
 */

#ifndef _MPC83XX_SOC_H_
#define _MPC83XX_SOC_H_

enum soc_type {
	SOC_MPC8308,
	SOC_MPC8309,
	SOC_MPC8313,
	SOC_MPC8315,
	SOC_MPC832X,
	SOC_MPC8349,
	SOC_MPC8360,
	SOC_MPC8379,
};

bool mpc83xx_has_sdhc(int type)
{
	return (type == SOC_MPC8308) ||
	       (type == SOC_MPC8309) ||
	       (type == SOC_MPC8379);
}

bool mpc83xx_has_tsec(int type)
{
	return (type == SOC_MPC8308) ||
	       (type == SOC_MPC8313) ||
	       (type == SOC_MPC8315) ||
	       (type == SOC_MPC8349) ||
	       (type == SOC_MPC8379);
}

bool mpc83xx_has_pcie1(int type)
{
	return (type == SOC_MPC8308) ||
	       (type == SOC_MPC8315) ||
	       (type == SOC_MPC8379);
}

bool mpc83xx_has_pcie2(int type)
{
	return (type == SOC_MPC8315) ||
	       (type == SOC_MPC8379);
}

bool mpc83xx_has_sata(int type)
{
	return (type == SOC_MPC8315) ||
	       (type == SOC_MPC8379);
}

bool mpc83xx_has_pci(int type)
{
	return type != SOC_MPC8308;
}

bool mpc83xx_has_second_i2c(int type)
{
	return (type != SOC_MPC8315) &&
	       (type != SOC_MPC832X);
}

bool mpc83xx_has_quicc_engine(int type)
{
	return (type == SOC_MPC8309) ||
	       (type == SOC_MPC832X) ||
	       (type == SOC_MPC8360);
}

#endif /* _MPC83XX_SOC_H_ */