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

Side by Side Diff: internal.c

Issue 3162005: add it8500 support (Closed) Base URL: ssh://git@gitrw.chromium.org/flashrom
Patch Set: Created 10 years, 4 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 | « Makefile ('k') | it85spi.c » ('j') | no next file with comments »
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 #if CONFIG_INTERNAL == 1 99 #if CONFIG_INTERNAL == 1
100 int force_boardenable = 0; 100 int force_boardenable = 0;
101 int force_boardmismatch = 0; 101 int force_boardmismatch = 0;
102 102
103 #if defined(__i386__) || defined(__x86_64__) 103 #if defined(__i386__) || defined(__x86_64__)
104 struct superio superio = {}; 104 struct superio superio = {};
105 105
106 void probe_superio(void) 106 void probe_superio(void)
107 { 107 {
108 superio = probe_superio_ite(); 108 superio = probe_superio_ite();
109 superio = probe_superio_ite85xx();
109 #if 0 110 #if 0
110 /* Winbond Super I/O code is not yet available. */ 111 /* Winbond Super I/O code is not yet available. */
111 if (superio.vendor == SUPERIO_VENDOR_NONE) 112 if (superio.vendor == SUPERIO_VENDOR_NONE)
112 superio = probe_superio_winbond(); 113 superio = probe_superio_winbond();
113 #endif 114 #endif
114 } 115 }
115 #endif 116 #endif
116 117
117 int is_laptop = 0; 118 int is_laptop = 0;
118 119
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 if (ret == -2) { 228 if (ret == -2) {
228 msg_perr("WARNING: No chipset found. Flash detection " 229 msg_perr("WARNING: No chipset found. Flash detection "
229 "will most likely fail.\n"); 230 "will most likely fail.\n");
230 } 231 }
231 232
232 #if defined(__i386__) || defined(__x86_64__) 233 #if defined(__i386__) || defined(__x86_64__)
233 /* Probe unconditionally for IT87* LPC->SPI translation and for 234 /* Probe unconditionally for IT87* LPC->SPI translation and for
234 * IT87* Parallel write enable. 235 * IT87* Parallel write enable.
235 */ 236 */
236 init_superio_ite(); 237 init_superio_ite();
238 it85xx_probe_spi_flash(NULL);
237 #endif 239 #endif
238 240
239 board_flash_enable(lb_vendor, lb_part); 241 board_flash_enable(lb_vendor, lb_part);
240 242
241 /* Even if chipset init returns an error code, we don't want to abort. 243 /* Even if chipset init returns an error code, we don't want to abort.
242 * The error code might have been a warning only. 244 * The error code might have been a warning only.
243 * Besides that, we don't check the board enable return code either. 245 * Besides that, we don't check the board enable return code either.
244 */ 246 */
245 #if defined(__i386__) || defined(__x86_64__) 247 #if defined(__i386__) || defined(__x86_64__)
246 return 0; 248 return 0;
(...skipping 14 matching lines...) Expand all
261 "access yet.\n" 263 "access yet.\n"
262 "Aborting.\n"); 264 "Aborting.\n");
263 return 1; 265 return 1;
264 #endif 266 #endif
265 } 267 }
266 268
267 int internal_shutdown(void) 269 int internal_shutdown(void)
268 { 270 {
269 release_io_perms(); 271 release_io_perms();
270 272
273 #if defined(__i386__) || defined(__x86_64__)
274 it85xx_shutdown();
275 #endif
276
271 return 0; 277 return 0;
272 } 278 }
273 #endif 279 #endif
274 280
275 void internal_chip_writeb(uint8_t val, chipaddr addr) 281 void internal_chip_writeb(uint8_t val, chipaddr addr)
276 { 282 {
277 mmio_writeb(val, (void *) addr); 283 mmio_writeb(val, (void *) addr);
278 } 284 }
279 285
280 void internal_chip_writew(uint16_t val, chipaddr addr) 286 void internal_chip_writew(uint16_t val, chipaddr addr)
(...skipping 19 matching lines...) Expand all
300 uint32_t internal_chip_readl(const chipaddr addr) 306 uint32_t internal_chip_readl(const chipaddr addr)
301 { 307 {
302 return mmio_readl((void *) addr); 308 return mmio_readl((void *) addr);
303 } 309 }
304 310
305 void internal_chip_readn(uint8_t *buf, const chipaddr addr, size_t len) 311 void internal_chip_readn(uint8_t *buf, const chipaddr addr, size_t len)
306 { 312 {
307 memcpy(buf, (void *)addr, len); 313 memcpy(buf, (void *)addr, len);
308 return; 314 return;
309 } 315 }
OLDNEW
« no previous file with comments | « Makefile ('k') | it85spi.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698