Carl-Daniel Hailfinger | c312920 | 2009-05-09 00:54:55 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the flashrom project. |
| 3 | * |
| 4 | * Copyright (C) 2009 Carl-Daniel Hailfinger |
| 5 | * |
| 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 |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 | */ |
| 20 | |
| 21 | #include <stdint.h> |
| 22 | #include <string.h> |
| 23 | #include <stdlib.h> |
| 24 | #include <fcntl.h> |
| 25 | #include <sys/types.h> |
| 26 | #include <sys/stat.h> |
| 27 | #include <errno.h> |
| 28 | #include <pci/pci.h> |
| 29 | #include "flash.h" |
| 30 | |
| 31 | int dummy_init(void) |
| 32 | { |
| 33 | printf("%s\n", __func__); |
| 34 | return 0; |
| 35 | } |
| 36 | |
| 37 | int dummy_shutdown(void) |
| 38 | { |
| 39 | printf("%s\n", __func__); |
| 40 | return 0; |
| 41 | } |
| 42 | |
| 43 | void dummy_chip_writeb(uint8_t val, volatile void *addr) |
| 44 | { |
| 45 | printf("%s: addr=%p, val=0x%02x\n", __func__, addr, val); |
| 46 | } |
| 47 | |
| 48 | void dummy_chip_writew(uint16_t val, volatile void *addr) |
| 49 | { |
| 50 | printf("%s: addr=%p, val=0x%04x\n", __func__, addr, val); |
| 51 | } |
| 52 | |
| 53 | void dummy_chip_writel(uint32_t val, volatile void *addr) |
| 54 | { |
| 55 | printf("%s: addr=%p, val=0x%08x\n", __func__, addr, val); |
| 56 | } |
| 57 | |
| 58 | uint8_t dummy_chip_readb(const volatile void *addr) |
| 59 | { |
| 60 | printf("%s: addr=%p\n", __func__, addr); |
| 61 | return 0xff; |
| 62 | } |
| 63 | |
| 64 | uint16_t dummy_chip_readw(const volatile void *addr) |
| 65 | { |
| 66 | printf("%s: addr=%p\n", __func__, addr); |
| 67 | return 0xffff; |
| 68 | } |
| 69 | |
| 70 | uint32_t dummy_chip_readl(const volatile void *addr) |
| 71 | { |
| 72 | printf("%s: addr=%p\n", __func__, addr); |
| 73 | return 0xffffffff; |
| 74 | } |
| 75 | |