diff options
author | Greg Watson <jarrah@users.sourceforge.net> | 2003-11-09 23:11:34 +0000 |
---|---|---|
committer | Greg Watson <jarrah@users.sourceforge.net> | 2003-11-09 23:11:34 +0000 |
commit | 91deab98a9adea9a4f2251ba73f46ca86f2acdaa (patch) | |
tree | a568857e10c756a52e3ec1c38220843ca7f71c19 /src/arch | |
parent | 54d4e651635c17979f27a615b18ba3550a91e7ea (diff) | |
download | coreboot-91deab98a9adea9a4f2251ba73f46ca86f2acdaa.tar.xz |
*** empty log message ***
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1270 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/ppc/include/arch/pciconf.h | 22 | ||||
-rw-r--r-- | src/arch/ppc/include/board.h | 9 | ||||
-rw-r--r-- | src/arch/ppc/include/printk.h | 18 | ||||
-rw-r--r-- | src/arch/ppc/include/sdram.h | 2 | ||||
-rw-r--r-- | src/arch/ppc/init/ppc_main.c | 1 |
5 files changed, 44 insertions, 8 deletions
diff --git a/src/arch/ppc/include/arch/pciconf.h b/src/arch/ppc/include/arch/pciconf.h index 8695ee2294..d210e3b445 100644 --- a/src/arch/ppc/include/arch/pciconf.h +++ b/src/arch/ppc/include/arch/pciconf.h @@ -1,9 +1,17 @@ -#ifndef PCI_CONF_REG_INDEX +#ifndef _PCICONF_H +#define _PCICONF_H -// These are defined in the PCI spec, and hence are theoretically -// inclusive of ANYTHING that uses a PCI bus. -#define PCI_CONF_REG_INDEX 0xcf8 -#define PCI_CONF_REG_DATA 0xcfc -#define CONFIG_ADDR(bus,devfn,where) (((bus) << 16) | ((devfn) << 8) | (where)) +/* + * Direct access to PCI hardware... + */ +extern uint8_t pci_ppc_read_config8(unsigned char, int, int); +extern uint16_t pci_ppc_read_config16(unsigned char, int, int); +extern uint32_t pci_ppc_read_config32(unsigned char, int, int); +extern int pci_ppc_write_config8(unsigned char, int, int, uint8_t); +extern int pci_ppc_write_config16(unsigned char, int, int, uint16_t); +extern int pci_ppc_write_config32(unsigned char, int, int, uint32_t); -#endif +#define CONFIG_CMD(bus,devfn,where) \ + ((bus << 16) | (devfn << 8) | (where & ~3) | 0x80000000) + +#endif /* _PCICONF_H */ diff --git a/src/arch/ppc/include/board.h b/src/arch/ppc/include/board.h new file mode 100644 index 0000000000..7eba34177a --- /dev/null +++ b/src/arch/ppc/include/board.h @@ -0,0 +1,9 @@ +#ifndef _BOARD_H +#define _BOARD_H + +/* + * Provided for all PPC boards to do board-level initialization. This + * happens prior to entry into hardwaremain(). + */ +extern void board_init(void); +#endif /* _BOARD_H */ diff --git a/src/arch/ppc/include/printk.h b/src/arch/ppc/include/printk.h new file mode 100644 index 0000000000..dac99a8ba6 --- /dev/null +++ b/src/arch/ppc/include/printk.h @@ -0,0 +1,18 @@ +#ifndef _PRINTK_H +#define _PRINTK_H +#include <console/loglevel.h> + +extern int do_printk(int, const char *, ...); + +#define printk_emerg(fmt, arg...) do_printk(BIOS_EMERG ,fmt, ##arg) +#define printk_alert(fmt, arg...) do_printk(BIOS_ALERT ,fmt, ##arg) +#define printk_crit(fmt, arg...) do_printk(BIOS_CRIT ,fmt, ##arg) +#define printk_err(fmt, arg...) do_printk(BIOS_ERR ,fmt, ##arg) +#define printk_warning(fmt, arg...) do_printk(BIOS_WARNING ,fmt, ##arg) +#define printk_notice(fmt, arg...) do_printk(BIOS_NOTICE ,fmt, ##arg) +#define printk_info(fmt, arg...) do_printk(BIOS_INFO ,fmt, ##arg) +#define printk_debug(fmt, arg...) do_printk(BIOS_DEBUG ,fmt, ##arg) +#define printk_spew(fmt, arg...) do_printk(BIOS_SPEW ,fmt, ##arg) + +#endif /* _PRINTK_H */ + diff --git a/src/arch/ppc/include/sdram.h b/src/arch/ppc/include/sdram.h index d4bec80f4e..848cfe2e42 100644 --- a/src/arch/ppc/include/sdram.h +++ b/src/arch/ppc/include/sdram.h @@ -2,7 +2,7 @@ #define _SDRAM_H /* - * Provided for all PPC boards to to SDRAM initialization. This + * Provided for all PPC boards to do SDRAM initialization. This * happens prior to entry into hardwaremain(). */ extern void sdram_init(void); diff --git a/src/arch/ppc/init/ppc_main.c b/src/arch/ppc/init/ppc_main.c index a89e02b7dd..33827f0179 100644 --- a/src/arch/ppc/init/ppc_main.c +++ b/src/arch/ppc/init/ppc_main.c @@ -3,6 +3,7 @@ * gwatson@lanl.gov */ +#include <board.h> #include <sdram.h> extern unsigned _iseg[]; |