Skip to content
This repository
Browse code

Allow multitouch calibration to be uploaded even when there is no pro…

…x calibration
  • Loading branch information...
commit 3846d87462e0b6db77a50488cb285fe1413b0c77 1 parent ae18594
planetbeing authored May 16, 2010

Showing 1 changed file with 20 additions and 12 deletions. Show diff stats Hide diff stats

  1. 32  openiboot/actions.c
32  openiboot/actions.c
@@ -241,27 +241,18 @@ static void setup_wifi_tags()
241 241
 	params = tag_next(params);              /* move pointer to next tag */
242 242
 }
243 243
 
244  
-static void setup_mt_tags()
  244
+static void setup_prox_tag()
245 245
 {
246  
-#ifndef CONFIG_IPHONE
  246
+#ifdef CONFIG_3G
247 247
 	uint8_t* prox_cal;
248 248
 	int prox_cal_size;
249 249
 
250  
-	uint8_t* cal;
251  
-	int cal_size;
252  
-
253 250
 	prox_cal = syscfg_get_entry(SCFG_PxCl, &prox_cal_size);
254 251
 	if(!prox_cal)
255 252
 	{
256 253
 		return;
257 254
 	}
258 255
 
259  
-	cal = syscfg_get_entry(SCFG_MtCl, &cal_size);
260  
-	if(!cal)
261  
-	{
262  
-		return;
263  
-	}
264  
-
265 256
 	params->u.mt_cal.size = prox_cal_size;
266 257
 	memcpy(params->u.mt_cal.data, prox_cal, prox_cal_size);
267 258
 
@@ -269,6 +260,22 @@ static void setup_mt_tags()
269 260
 	params->hdr.size = (sizeof(struct atag_header) + sizeof(struct atag_iphone_cal_data) + prox_cal_size + 4) >> 2;
270 261
 	params = tag_next(params);              /* move pointer to next tag */
271 262
 
  263
+	bufferPrintf("Proximity calibration data installed.\r\n");
  264
+#endif
  265
+}
  266
+
  267
+static void setup_mt_tag()
  268
+{
  269
+#ifndef CONFIG_IPHONE
  270
+	uint8_t* cal;
  271
+	int cal_size;
  272
+
  273
+	cal = syscfg_get_entry(SCFG_MtCl, &cal_size);
  274
+	if(!cal)
  275
+	{
  276
+		return;
  277
+	}
  278
+
272 279
 	params->u.mt_cal.size = cal_size;
273 280
 	memcpy(params->u.mt_cal.data, cal, cal_size);
274 281
 
@@ -362,7 +369,8 @@ static void setup_tags(struct atag* parameters, const char* commandLine)
362 369
 		setup_initrd2_tag(INITRD_LOAD, ramdiskSize);
363 370
 	}
364 371
 	setup_cmdline_tag(commandLine);
365  
-	setup_mt_tags();
  372
+	setup_prox_tag();
  373
+	setup_mt_tag();
366 374
 	setup_wifi_tags();
367 375
 #ifndef NO_HFS
368 376
 	setup_iphone_nand_tag();

0 notes on commit 3846d87

Please sign in to comment.
Something went wrong with that request. Please try again.