Commit d02be99e6774b99c27b7d4304865c7f45e1ac4b4

Authored by Bin Meng
1 parent 254e677925

dm: pch: Remove pch_get_version op

pch_get_version op was only used by the ich spi controller driver,
and does not really provide a good identification of pch controller
so far, since we see plenty of Intel PCH chipsets and one differs
from another a lot, which is not simply either a PCHV_7 or PCHV_9.
Now that ich spi controller driver was updated to not get such info
from pch, the pch_get_version op is useless now.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>

Showing 5 changed files with 0 additions and 48 deletions Side-by-side Diff

arch/x86/cpu/ivybridge/bd82x6x.c
... ... @@ -182,11 +182,6 @@
182 182 return 0;
183 183 }
184 184  
185   -static enum pch_version bd82x6x_pch_get_version(struct udevice *dev)
186   -{
187   - return PCHV_9;
188   -}
189   -
190 185 static int bd82x6x_set_spi_protect(struct udevice *dev, bool protect)
191 186 {
192 187 uint8_t bios_cntl;
... ... @@ -207,7 +202,6 @@
207 202  
208 203 static const struct pch_ops bd82x6x_pch_ops = {
209 204 .get_sbase = bd82x6x_pch_get_sbase,
210   - .get_version = bd82x6x_pch_get_version,
211 205 .set_spi_protect = bd82x6x_set_spi_protect,
212 206 };
213 207  
drivers/pch/pch-uclass.c
... ... @@ -23,16 +23,6 @@
23 23 return ops->get_sbase(dev, sbasep);
24 24 }
25 25  
26   -enum pch_version pch_get_version(struct udevice *dev)
27   -{
28   - struct pch_ops *ops = pch_get_ops(dev);
29   -
30   - if (!ops->get_version)
31   - return -ENOSYS;
32   -
33   - return ops->get_version(dev);
34   -}
35   -
36 26 int pch_set_spi_protect(struct udevice *dev, bool protect)
37 27 {
38 28 struct pch_ops *ops = pch_get_ops(dev);
... ... @@ -22,11 +22,6 @@
22 22 return 0;
23 23 }
24 24  
25   -static enum pch_version pch7_get_version(struct udevice *dev)
26   -{
27   - return PCHV_7;
28   -}
29   -
30 25 static int pch7_set_spi_protect(struct udevice *dev, bool protect)
31 26 {
32 27 uint8_t bios_cntl;
... ... @@ -44,7 +39,6 @@
44 39  
45 40 static const struct pch_ops pch7_ops = {
46 41 .get_sbase = pch7_get_sbase,
47   - .get_version = pch7_get_version,
48 42 .set_spi_protect = pch7_set_spi_protect,
49 43 };
50 44  
... ... @@ -20,14 +20,8 @@
20 20 return 0;
21 21 }
22 22  
23   -static enum pch_version pch9_get_version(struct udevice *dev)
24   -{
25   - return PCHV_9;
26   -}
27   -
28 23 static const struct pch_ops pch9_ops = {
29 24 .get_sbase = pch9_get_sbase,
30   - .get_version = pch9_get_version,
31 25 };
32 26  
33 27 static const struct udevice_id pch9_ids[] = {
... ... @@ -8,12 +8,6 @@
8 8 #ifndef __pch_h
9 9 #define __pch_h
10 10  
11   -enum pch_version {
12   - PCHV_UNKNOWN,
13   - PCHV_7,
14   - PCHV_9,
15   -};
16   -
17 11 #define PCH_RCBA 0xf0
18 12  
19 13 #define BIOS_CTRL_BIOSWE BIT(0)
... ... @@ -30,13 +24,6 @@
30 24 int (*get_sbase)(struct udevice *dev, ulong *sbasep);
31 25  
32 26 /**
33   - * get_version() - get the PCH version
34   - *
35   - * @return version, or -ENOSYS if unknown
36   - */
37   - enum pch_version (*get_version)(struct udevice *dev);
38   -
39   - /**
40 27 * set_spi_protect() - set whether SPI flash is protected or not
41 28 *
42 29 * @dev: PCH device to adjust
... ... @@ -57,13 +44,6 @@
57 44 * @return 0 if OK, -ve on error (e.g. there is no SPI base)
58 45 */
59 46 int pch_get_sbase(struct udevice *dev, ulong *sbasep);
60   -
61   -/**
62   - * pch_get_version() - get the PCH version
63   - *
64   - * @return version, or -ENOSYS if unknown
65   - */
66   -enum pch_version pch_get_version(struct udevice *dev);
67 47  
68 48 /**
69 49 * set_spi_protect() - set whether SPI flash is protected or not