From 6f01f4307c993c60813ea332174ca23c2bc269e8 Mon Sep 17 00:00:00 2001 From: Elyes HAOUAS Date: Wed, 5 Dec 2018 10:56:30 +0100 Subject: soc/intel: Get rid of device_t Use of device_t is deprecated. Change-Id: Ic29891d78514db3b7eed48414a14e4ff579436c0 Signed-off-by: Elyes HAOUAS Reviewed-on: https://review.coreboot.org/c/30004 Reviewed-by: David Guckian Reviewed-by: Subrata Banik Reviewed-by: Patrick Rudolph Tested-by: build bot (Jenkins) --- src/soc/intel/quark/include/soc/reg_access.h | 2 -- src/soc/intel/quark/include/soc/storage_test.h | 15 +++++++++------ src/soc/intel/quark/romstage/fsp2_0.c | 2 +- src/soc/intel/quark/storage_test.c | 14 ++++++++++++-- 4 files changed, 22 insertions(+), 11 deletions(-) (limited to 'src/soc/intel/quark') diff --git a/src/soc/intel/quark/include/soc/reg_access.h b/src/soc/intel/quark/include/soc/reg_access.h index 1695297898..ba340a0ca5 100644 --- a/src/soc/intel/quark/include/soc/reg_access.h +++ b/src/soc/intel/quark/include/soc/reg_access.h @@ -16,8 +16,6 @@ #ifndef _QUARK_REG_ACCESS_H_ #define _QUARK_REG_ACCESS_H_ -#define __SIMPLE_DEVICE__ - #include #include #include diff --git a/src/soc/intel/quark/include/soc/storage_test.h b/src/soc/intel/quark/include/soc/storage_test.h index cae296fe59..62c9e79236 100644 --- a/src/soc/intel/quark/include/soc/storage_test.h +++ b/src/soc/intel/quark/include/soc/storage_test.h @@ -22,16 +22,19 @@ #include #ifdef __SIMPLE_DEVICE__ -#define dev_t uintptr_t +uint32_t storage_test_init(pci_devfn_t dev, uint32_t *previous_bar, + uint16_t *previous_command); +void storage_test(uint32_t bar, int full_initialization); +void storage_test_complete(pci_devfn_t dev, uint32_t previous_bar, + uint16_t previous_command); #else -#define dev_t device_t -#endif /* __SIMPLE_DEVICE__ */ - -uint32_t storage_test_init(dev_t dev, uint32_t *previous_bar, +uint32_t storage_test_init(struct device *dev, uint32_t *previous_bar, uint16_t *previous_command); void storage_test(uint32_t bar, int full_initialization); -void storage_test_complete(dev_t dev, uint32_t previous_bar, +void storage_test_complete(struct device *dev, uint32_t previous_bar, uint16_t previous_command); +#endif + /* Logging support */ struct log_entry { diff --git a/src/soc/intel/quark/romstage/fsp2_0.c b/src/soc/intel/quark/romstage/fsp2_0.c index 900ec1b4ca..3e6198805d 100644 --- a/src/soc/intel/quark/romstage/fsp2_0.c +++ b/src/soc/intel/quark/romstage/fsp2_0.c @@ -38,7 +38,7 @@ asmlinkage void *car_stage_c_entry(void) if (IS_ENABLED(CONFIG_STORAGE_TEST)) { uint32_t bar; - dev_t dev; + pci_devfn_t dev; uint32_t previous_bar; uint16_t previous_command; diff --git a/src/soc/intel/quark/storage_test.c b/src/soc/intel/quark/storage_test.c index 507fa9260c..0a5e22d9c2 100644 --- a/src/soc/intel/quark/storage_test.c +++ b/src/soc/intel/quark/storage_test.c @@ -39,8 +39,13 @@ extern uint8_t _car_drivers_storage_end; #define STORAGE_DEBUG BIOS_DEBUG #define LOG_DEBUG (IS_ENABLED(CONFIG_STORAGE_LOG) ? STORAGE_DEBUG : BIOS_NEVER) -uint32_t storage_test_init(dev_t dev, uint32_t *previous_bar, +#ifdef __SIMPLE_DEVICE__ +uint32_t storage_test_init(pci_devfn_t dev, uint32_t *previous_bar, uint16_t *previous_command) +#else +uint32_t storage_test_init(struct device *dev, uint32_t *previous_bar, + uint16_t *previous_command) +#endif { uint32_t bar; @@ -67,8 +72,13 @@ uint32_t storage_test_init(dev_t dev, uint32_t *previous_bar, return bar; } -void storage_test_complete(dev_t dev, uint32_t previous_bar, +#ifdef __SIMPLE_DEVICE__ +void storage_test_complete(pci_devfn_t dev, uint32_t previous_bar, uint16_t previous_command) +#else +void storage_test_complete(struct device *dev, uint32_t previous_bar, + uint16_t previous_command) +#endif { pci_write_config16(dev, PCI_COMMAND, previous_command); pci_write_config32(dev, PCI_BASE_ADDRESS_0, previous_bar); -- cgit v1.2.3