diff options
author | Adam Kaufman <adam.kaufman@pinnacle.com> | 2007-02-06 19:47:50 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2007-02-06 19:47:50 +0000 |
commit | 4f9cf1373c6b9431fd6b84571237a8dee2ab93cd (patch) | |
tree | 7abc7233f1d7f2d74d6fefe892d98a1e95753ae7 /util/flashrom/flash.h | |
parent | bc7ceb1fd1473f0338fee8140356f130d0b615ba (diff) | |
download | coreboot-4f9cf1373c6b9431fd6b84571237a8dee2ab93cd.tar.xz |
This patch is a rework of Adam Kaufman's Solaris patch.
* flash.h:
- add a license header
- add system definitions
* flash_enable.c:
- put io priviledge access in one single place
- add includes required for Solaris.
* lbtable.c, flash_rom.c, 82802ab.c:
- use MEM_DEV so it works on Solaris
* sst49lfxxxc.c, sharplhf00l04.c, sst_fwhub.c, 82802ab.c
- drop unneeded include to sys/io.h
* Makefile
- adapt to Solaris specifics.
Signed-off-by: Adam Kaufman <adam.kaufman@pinnacle.com>
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Adam Kaufman <adam.kaufman@pinnacle.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2550 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/flashrom/flash.h')
-rw-r--r-- | util/flashrom/flash.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/util/flashrom/flash.h b/util/flashrom/flash.h index f98bcb60db..d855e41763 100644 --- a/util/flashrom/flash.h +++ b/util/flashrom/flash.h @@ -1,7 +1,34 @@ +/* + * flash.h: flash programming utility - central include file + * + * Copyright 2000 Silicon Integrated System Corporation + * Copyright 2000 Ronald G. Minnich <rminnich@gmail.com> + * Copyright 2005 coresystems GmbH <stepan@coresystems.de> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + + #ifndef __FLASH_H__ #define __FLASH_H__ 1 +#if defined(__GLIBC__) #include <sys/io.h> +#endif + #include <unistd.h> #include <stdint.h> @@ -92,7 +119,18 @@ extern struct flashchip flashchips[]; #define S29C51004T 0x03 /* SyncMOS S29C51004T/B */ #define S29C31004T 0x63 /* SyncMOS S29C31004T */ +/* function prototypes from udelay.h */ + extern void myusec_delay(int time); extern void myusec_calibrate_delay(); extern int enable_flash_write(void); + +/* physical memory mapping device */ + +#if defined (__sun) && (defined(__i386) || defined(__amd64)) +# define MEM_DEV "/dev/xsvc" +#else +# define MEM_DEV "/dev/mem" +#endif + #endif /* !__FLASH_H__ */ |