| 
					
				 | 
			
			
				@@ -91,3 +91,49 @@ static void mityomapl138_cpufreq_init(const char *partnum) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	for (i = 0; partnum && i < ARRAY_SIZE(mityomapl138_pn_info); i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		/* 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		 * the part number has additional characters beyond what is 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		 * stored in the table.  This information is not needed for 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		 * determining the speed grade, and would require several 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		 * more table entries.  Only check the first N characters 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		 * for a match. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		if (!strncmp(partnum, mityomapl138_pn_info[i].part_no, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			     strlen(mityomapl138_pn_info[i].part_no))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			da850_max_speed = mityomapl138_pn_info[i].max_freq; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	ret = da850_register_cpufreq("pll0_sysclk3"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	if (ret) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		pr_warning("cpufreq registration failed: %d\n", ret); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static void mityomapl138_cpufreq_init(const char *partnum) { } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static void read_factory_config(struct memory_accessor *a, void *context) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	int ret; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	const char *partnum = NULL; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	struct davinci_soc_info *soc_info = &davinci_soc_info; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	ret = a->read(a, (char *)&factory_config, 0, sizeof(factory_config)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	if (ret != sizeof(struct factory_config)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		pr_warning("MityOMAPL138: Read Factory Config Failed: %d\n", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				ret); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		goto bad_config; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	if (factory_config.magic != FACTORY_CONFIG_MAGIC) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		pr_warning("MityOMAPL138: Factory Config Magic Wrong (%X)\n", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				factory_config.magic); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		goto bad_config; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	if (factory_config.version != FACTORY_CONFIG_VERSION) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		pr_warning("MityOMAPL138: Factory Config Version Wrong (%X)\n", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				factory_config.version); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		goto bad_config; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 |