cpu/amd: Get rid of device_t
Use of `device_t` has been abandoned in ramstage. Change-Id: I4b930a191130941c8349861cdd803a5be4219274 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/23653 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
		
				
					committed by
					
						 Patrick Georgi
						Patrick Georgi
					
				
			
			
				
	
			
			
			
						parent
						
							fc1b49691f
						
					
				
				
					commit
					d2d8a31305
				
			| @@ -31,7 +31,7 @@ | ||||
|  | ||||
| #define MCI_STATUS 0x401 | ||||
|  | ||||
| static void model_12_init(device_t dev) | ||||
| static void model_12_init(struct device *dev) | ||||
| { | ||||
| 	printk(BIOS_DEBUG, "Model 12 Init.\n"); | ||||
|  | ||||
|   | ||||
| @@ -32,7 +32,7 @@ | ||||
|  | ||||
| #define MCI_STATUS 0x401 | ||||
|  | ||||
| static void model_14_init(device_t dev) | ||||
| static void model_14_init(struct device *dev) | ||||
| { | ||||
| 	u8 i; | ||||
| 	msr_t msr; | ||||
|   | ||||
| @@ -31,7 +31,7 @@ | ||||
| #include <arch/acpi.h> | ||||
| #include <northbridge/amd/agesa/agesa_helper.h> | ||||
|  | ||||
| static void model_15_init(device_t dev) | ||||
| static void model_15_init(struct device *dev) | ||||
| { | ||||
| 	printk(BIOS_DEBUG, "Model 15 Init.\n"); | ||||
|  | ||||
|   | ||||
| @@ -30,7 +30,7 @@ | ||||
| #include <arch/acpi.h> | ||||
| #include <northbridge/amd/agesa/agesa_helper.h> | ||||
|  | ||||
| static void model_16_init(device_t dev) | ||||
| static void model_16_init(struct device *dev) | ||||
| { | ||||
| 	printk(BIOS_DEBUG, "Model 16 Init.\n"); | ||||
|  | ||||
|   | ||||
| @@ -32,7 +32,7 @@ static int disable_siblings = !CONFIG_LOGICAL_CPUS; | ||||
|  | ||||
| static int get_max_siblings(int nodes) | ||||
| { | ||||
| 	device_t dev; | ||||
| 	struct device *dev; | ||||
| 	int nodeid; | ||||
| 	int siblings=0; | ||||
|  | ||||
| @@ -51,7 +51,7 @@ static int get_max_siblings(int nodes) | ||||
|  | ||||
| static void enable_apic_ext_id(int nodes) | ||||
| { | ||||
| 	device_t dev; | ||||
| 	struct device *dev; | ||||
| 	int nodeid; | ||||
|  | ||||
| 	//enable APIC_EXIT_ID all the nodes | ||||
| @@ -67,7 +67,7 @@ static void enable_apic_ext_id(int nodes) | ||||
|  | ||||
| unsigned get_apicid_base(unsigned ioapic_num) | ||||
| { | ||||
| 	device_t dev; | ||||
| 	struct device *dev; | ||||
| 	int nodes; | ||||
| 	unsigned apicid_base; | ||||
| 	int siblings; | ||||
|   | ||||
| @@ -59,7 +59,7 @@ static inline uint8_t is_gt_rev_d(void) | ||||
|  | ||||
| static volatile uint8_t fam15h_startup_flags[MAX_NODES_SUPPORTED][MAX_CORES_SUPPORTED] = {{ 0 }}; | ||||
|  | ||||
| static void model_10xxx_init(device_t dev) | ||||
| static void model_10xxx_init(struct device *dev) | ||||
| { | ||||
| 	u8 i; | ||||
| 	msr_t msr; | ||||
|   | ||||
| @@ -236,7 +236,7 @@ int init_processor_name(void) | ||||
| 	if (fam15h) { | ||||
| 		/* Family 15h or later */ | ||||
| 		uint32_t dword; | ||||
| 		device_t cpu_fn5_dev = dev_find_slot(0, PCI_DEVFN(0x18, 5)); | ||||
| 		struct device *cpu_fn5_dev = dev_find_slot(0, PCI_DEVFN(0x18, 5)); | ||||
| 		pci_write_config32(cpu_fn5_dev, 0x194, 0); | ||||
| 		dword = pci_read_config32(cpu_fn5_dev, 0x198); | ||||
| 		if (dword == 0) { | ||||
|   | ||||
| @@ -72,7 +72,7 @@ uint64_t get_cc6_memory_size() | ||||
| 		if (pci_read_config32(PCI_DEV(0, 0x18, 2), 0x118) & (0x1 << 18)) | ||||
| 			enable_cc6 = 1; | ||||
| #else | ||||
| 		device_t dct_dev = dev_find_slot(0, PCI_DEVFN(0x18, 2)); | ||||
| 		struct device *dct_dev = dev_find_slot(0, PCI_DEVFN(0x18, 2)); | ||||
| 		if (pci_read_config32(dct_dev, 0x118) & (0x1 << 18)) | ||||
| 			enable_cc6 = 1; | ||||
| #endif | ||||
|   | ||||
| @@ -33,7 +33,7 @@ static void vsm_end_post_smi(void) | ||||
| 			  ".byte 0x0f, 0x38\n" "pop %ax\n"); | ||||
| } | ||||
|  | ||||
| static void geode_lx_init(device_t dev) | ||||
| static void geode_lx_init(struct device *dev) | ||||
| { | ||||
| 	printk(BIOS_DEBUG, "geode_lx_init\n"); | ||||
|  | ||||
|   | ||||
| @@ -65,7 +65,7 @@ int is_e0_later_in_bsp(int nodeid) | ||||
| 		return !is_cpu_pre_e0(); | ||||
| 	} | ||||
| 	// d0 will be treated as e0 with this methods, but the d0 nb_cfg_54 always 0 | ||||
| 	device_t dev; | ||||
| 	struct device *dev; | ||||
| 	dev = dev_find_slot(0, PCI_DEVFN(0x18 + nodeid, 2)); | ||||
| 	if (!dev) | ||||
| 		return 0; | ||||
| @@ -85,7 +85,7 @@ int is_e0_later_in_bsp(int nodeid) | ||||
| int is_cpu_f0_in_bsp(int nodeid) | ||||
| { | ||||
| 	uint32_t dword; | ||||
| 	device_t dev; | ||||
| 	struct device *dev; | ||||
|  | ||||
| 	if (!IS_ENABLED(CONFIG_K8_REV_F_SUPPORT)) | ||||
| 		return 0; | ||||
| @@ -243,7 +243,7 @@ static void init_ecc_memory(unsigned node_id) | ||||
| 	unsigned long basek; | ||||
| 	struct mtrr_state mtrr_state; | ||||
|  | ||||
| 	device_t f1_dev, f2_dev, f3_dev; | ||||
| 	struct device *f1_dev, *f2_dev, *f3_dev; | ||||
| 	int enable_scrubbing; | ||||
| 	uint32_t dcl; | ||||
|  | ||||
| @@ -463,7 +463,7 @@ static void k8_errata(void) | ||||
| 	wrmsr(HWCR_MSR, msr); | ||||
| } | ||||
|  | ||||
| static void model_fxx_init(device_t dev) | ||||
| static void model_fxx_init(struct device *dev) | ||||
| { | ||||
| 	unsigned long i; | ||||
| 	msr_t msr; | ||||
|   | ||||
| @@ -31,7 +31,7 @@ | ||||
| #include <cpu/amd/amdfam15.h> | ||||
| #include <arch/acpi.h> | ||||
|  | ||||
| static void model_15_init(device_t dev) | ||||
| static void model_15_init(struct device *dev) | ||||
| { | ||||
| 	printk(BIOS_DEBUG, "Model 15 Init.\n"); | ||||
|  | ||||
|   | ||||
| @@ -47,7 +47,7 @@ void PSPProgBar3Msr(void *Buffer) | ||||
| 	LibAmdMsrRead(0xC00110A2, &Tmp64, NULL); | ||||
| } | ||||
|  | ||||
| static void model_15_init(device_t dev) | ||||
| static void model_15_init(struct device *dev) | ||||
| { | ||||
| 	printk(BIOS_DEBUG, "Model 15 Init.\n"); | ||||
|  | ||||
|   | ||||
| @@ -30,7 +30,7 @@ | ||||
| #include <cpu/amd/amdfam16.h> | ||||
| #include <arch/acpi.h> | ||||
|  | ||||
| static void model_16_init(device_t dev) | ||||
| static void model_16_init(struct device *dev) | ||||
| { | ||||
| 	printk(BIOS_DEBUG, "Model 16 Init.\n"); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user