Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1750)

Side by Side Diff: internal.c

Issue 6897014: Do not call EC programmer shutdown functions explicitly. (Closed) Base URL: svn://coreboot.org/flashrom/trunk
Patch Set: call shutdown function for internal programmer explicitly Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « flashrom.c ('k') | it85spi.c » ('j') | mec1308.c » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of the flashrom project. 2 * This file is part of the flashrom project.
3 * 3 *
4 * Copyright (C) 2009 Carl-Daniel Hailfinger 4 * Copyright (C) 2009 Carl-Daniel Hailfinger
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or 8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version. 9 * (at your option) any later version.
10 * 10 *
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 */ 364 */
365 msg_perr("Your platform is not supported yet for the internal " 365 msg_perr("Your platform is not supported yet for the internal "
366 "programmer because it has\n" 366 "programmer because it has\n"
367 "not been converted from native endian to little endian " 367 "not been converted from native endian to little endian "
368 "access yet.\n" 368 "access yet.\n"
369 "Aborting.\n"); 369 "Aborting.\n");
370 return 1; 370 return 1;
371 #endif 371 #endif
372 } 372 }
373 373
374 #if 0
Stefan Reinauer 2011/04/27 20:34:05 delete this?
dhendrix 2011/04/27 21:15:05 Done.
375 void internal_shutdown(void *data)
376 {
377 release_io_perms();
378 }
379 #endif
374 int internal_shutdown(void) 380 int internal_shutdown(void)
375 { 381 {
376 release_io_perms(); 382 release_io_perms();
377 383
378 #if defined(__i386__) || defined(__x86_64__)
379 if (target_bus == CHIP_BUSTYPE_LPC ||
380 target_bus == CHIP_BUSTYPE_FWH) {
381 it85xx_shutdown();
382 wpce775x_shutdown();
383 mec1308_shutdown();
384 }
385 #endif
386
387 return 0; 384 return 0;
388 } 385 }
389 #endif 386 #endif
390 387
391 void internal_chip_writeb(uint8_t val, chipaddr addr) 388 void internal_chip_writeb(uint8_t val, chipaddr addr)
392 { 389 {
393 mmio_writeb(val, (void *) addr); 390 mmio_writeb(val, (void *) addr);
394 } 391 }
395 392
396 void internal_chip_writew(uint16_t val, chipaddr addr) 393 void internal_chip_writew(uint16_t val, chipaddr addr)
(...skipping 19 matching lines...) Expand all
416 uint32_t internal_chip_readl(const chipaddr addr) 413 uint32_t internal_chip_readl(const chipaddr addr)
417 { 414 {
418 return mmio_readl((void *) addr); 415 return mmio_readl((void *) addr);
419 } 416 }
420 417
421 void internal_chip_readn(uint8_t *buf, const chipaddr addr, size_t len) 418 void internal_chip_readn(uint8_t *buf, const chipaddr addr, size_t len)
422 { 419 {
423 memcpy(buf, (void *)addr, len); 420 memcpy(buf, (void *)addr, len);
424 return; 421 return;
425 } 422 }
OLDNEW
« no previous file with comments | « flashrom.c ('k') | it85spi.c » ('j') | mec1308.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698