ppc: Move arbiter fields to arch_global_data
Move arbiter_event_attributes and arbiter_event_address into arch_global_data and tidy up. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
		
							parent
							
								
									3c4c308c00
								
							
						
					
					
						commit
						43e60814b3
					
				|  | @ -236,8 +236,8 @@ void cpu_init_f (volatile immap_t * im) | ||||||
| 	__raw_writel(~(RSR_RES), &im->reset.rsr); | 	__raw_writel(~(RSR_RES), &im->reset.rsr); | ||||||
| 
 | 
 | ||||||
| 	/* AER - Arbiter Event Register - store status */ | 	/* AER - Arbiter Event Register - store status */ | ||||||
| 	gd->arbiter_event_attributes = __raw_readl(&im->arbiter.aeatr); | 	gd->arch.arbiter_event_attributes = __raw_readl(&im->arbiter.aeatr); | ||||||
| 	gd->arbiter_event_address = __raw_readl(&im->arbiter.aeadr); | 	gd->arch.arbiter_event_address = __raw_readl(&im->arbiter.aeadr); | ||||||
| 
 | 
 | ||||||
| 	/*
 | 	/*
 | ||||||
| 	 * RMR - Reset Mode Register | 	 * RMR - Reset Mode Register | ||||||
|  | @ -440,42 +440,44 @@ static int print_83xx_arb_event(int force) | ||||||
| 		"reserved" | 		"reserved" | ||||||
| 	}; | 	}; | ||||||
| 
 | 
 | ||||||
| 	int etype = (gd->arbiter_event_attributes & AEATR_EVENT) | 	int etype = (gd->arch.arbiter_event_attributes & AEATR_EVENT) | ||||||
| 	            >> AEATR_EVENT_SHIFT; | 	            >> AEATR_EVENT_SHIFT; | ||||||
| 	int mstr_id = (gd->arbiter_event_attributes & AEATR_MSTR_ID) | 	int mstr_id = (gd->arch.arbiter_event_attributes & AEATR_MSTR_ID) | ||||||
| 	              >> AEATR_MSTR_ID_SHIFT; | 	              >> AEATR_MSTR_ID_SHIFT; | ||||||
| 	int tbst = (gd->arbiter_event_attributes & AEATR_TBST) | 	int tbst = (gd->arch.arbiter_event_attributes & AEATR_TBST) | ||||||
| 	           >> AEATR_TBST_SHIFT; | 	           >> AEATR_TBST_SHIFT; | ||||||
| 	int tsize = (gd->arbiter_event_attributes & AEATR_TSIZE) | 	int tsize = (gd->arch.arbiter_event_attributes & AEATR_TSIZE) | ||||||
| 	            >> AEATR_TSIZE_SHIFT; | 	            >> AEATR_TSIZE_SHIFT; | ||||||
| 	int ttype = (gd->arbiter_event_attributes & AEATR_TTYPE) | 	int ttype = (gd->arch.arbiter_event_attributes & AEATR_TTYPE) | ||||||
| 	            >> AEATR_TTYPE_SHIFT; | 	            >> AEATR_TTYPE_SHIFT; | ||||||
| 
 | 
 | ||||||
| 	if (!force && !gd->arbiter_event_address) | 	if (!force && !gd->arch.arbiter_event_address) | ||||||
| 		return 0; | 		return 0; | ||||||
| 
 | 
 | ||||||
| 	puts("Arbiter Event Status:\n"); | 	puts("Arbiter Event Status:\n"); | ||||||
| 	printf("       Event Address: 0x%08lX\n", gd->arbiter_event_address); | 	printf("       Event Address: 0x%08lX\n", | ||||||
|  | 	       gd->arch.arbiter_event_address); | ||||||
| 	printf("       Event Type:    0x%1x  = %s\n", etype, event[etype]); | 	printf("       Event Type:    0x%1x  = %s\n", etype, event[etype]); | ||||||
| 	printf("       Master ID:     0x%02x = %s\n", mstr_id, master[mstr_id]); | 	printf("       Master ID:     0x%02x = %s\n", mstr_id, master[mstr_id]); | ||||||
| 	printf("       Transfer Size: 0x%1x  = %d bytes\n", (tbst<<3) | tsize, | 	printf("       Transfer Size: 0x%1x  = %d bytes\n", (tbst<<3) | tsize, | ||||||
| 				tbst ? (tsize ? tsize : 8) : 16 + 8 * tsize); | 				tbst ? (tsize ? tsize : 8) : 16 + 8 * tsize); | ||||||
| 	printf("       Transfer Type: 0x%02x = %s\n", ttype, transfer[ttype]); | 	printf("       Transfer Type: 0x%02x = %s\n", ttype, transfer[ttype]); | ||||||
| 
 | 
 | ||||||
| 	return gd->arbiter_event_address; | 	return gd->arch.arbiter_event_address; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #elif defined(CONFIG_DISPLAY_AER_BRIEF) | #elif defined(CONFIG_DISPLAY_AER_BRIEF) | ||||||
| 
 | 
 | ||||||
| static int print_83xx_arb_event(int force) | static int print_83xx_arb_event(int force) | ||||||
| { | { | ||||||
| 	if (!force && !gd->arbiter_event_address) | 	if (!force && !gd->arch.arbiter_event_address) | ||||||
| 		return 0; | 		return 0; | ||||||
| 
 | 
 | ||||||
| 	printf("Arbiter Event Status: AEATR=0x%08lX, AEADR=0x%08lX\n", | 	printf("Arbiter Event Status: AEATR=0x%08lX, AEADR=0x%08lX\n", | ||||||
| 		gd->arbiter_event_attributes, gd->arbiter_event_address); | 		gd->arch.arbiter_event_attributes, | ||||||
|  | 		gd->arch.arbiter_event_address); | ||||||
| 
 | 
 | ||||||
| 	return gd->arbiter_event_address; | 	return gd->arch.arbiter_event_address; | ||||||
| } | } | ||||||
| #endif /* CONFIG_DISPLAY_AER_xxxx */ | #endif /* CONFIG_DISPLAY_AER_xxxx */ | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -108,6 +108,10 @@ struct arch_global_data { | ||||||
| 	unsigned long flb_clk; | 	unsigned long flb_clk; | ||||||
| #endif | #endif | ||||||
| 	unsigned long reset_status;	/* reset status register at boot */ | 	unsigned long reset_status;	/* reset status register at boot */ | ||||||
|  | #if defined(CONFIG_MPC83xx) | ||||||
|  | 	unsigned long arbiter_event_attributes; | ||||||
|  | 	unsigned long arbiter_event_address; | ||||||
|  | #endif | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  | @ -131,10 +135,6 @@ typedef	struct	global_data { | ||||||
| 	u32 sdhc_clk; | 	u32 sdhc_clk; | ||||||
| #endif | #endif | ||||||
| 	phys_size_t	ram_size;	/* RAM size */ | 	phys_size_t	ram_size;	/* RAM size */ | ||||||
| #if defined(CONFIG_MPC83xx) |  | ||||||
| 	unsigned long	arbiter_event_attributes; |  | ||||||
| 	unsigned long	arbiter_event_address; |  | ||||||
| #endif |  | ||||||
| 	unsigned long	env_addr;	/* Address  of Environment struct	*/ | 	unsigned long	env_addr;	/* Address  of Environment struct	*/ | ||||||
| 	unsigned long	env_valid;	/* Checksum of Environment valid?	*/ | 	unsigned long	env_valid;	/* Checksum of Environment valid?	*/ | ||||||
| 	unsigned long	have_console;	/* serial_init() was called		*/ | 	unsigned long	have_console;	/* serial_init() was called		*/ | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue