getting HDAMA to build.
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1005 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
		| @@ -1,4 +1,5 @@ | |||||||
| uses CPU_FIXUP | uses CPU_FIXUP | ||||||
| if CPU_FIXUP | if CPU_FIXUP | ||||||
|   object cpufixup.o |   object cpufixup.o | ||||||
|  |   object apic_timer.o | ||||||
| end | end | ||||||
|   | |||||||
| @@ -1,5 +1,18 @@ | |||||||
|  | #ifndef PNP_INDEX_REG | ||||||
|  | #define PNP_INDEX_REG   0x15C | ||||||
|  | #endif | ||||||
|  | #ifndef PNP_DATA_REG | ||||||
|  | #define PNP_DATA_REG    0x15D | ||||||
|  | #endif | ||||||
|  | #ifndef SIO_COM1 | ||||||
|  | #define SIO_COM1_BASE   0x3F8 | ||||||
|  | #endif | ||||||
|  | #ifndef SIO_COM2 | ||||||
|  | #define SIO_COM2_BASE   0x2F8 | ||||||
|  | #endif | ||||||
|  |  | ||||||
| struct superio_NSC_pc87360_config { | struct superio_NSC_pc87360_config { | ||||||
|     typedef struct com_ports com1; |     struct com_ports com1; | ||||||
|     typedef struct lpt_ports lpt; |     struct lpt_ports lpt; | ||||||
|  |     int port; | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -1,44 +1,37 @@ | |||||||
| /* Copyright 2000  AG Electronics Ltd. */ | /* Copyright 2000  AG Electronics Ltd. */ | ||||||
| /* This code is distributed without warranty under the GPL v2 (see COPYING) */ | /* This code is distributed without warranty under the GPL v2 (see COPYING) */ | ||||||
|  |  | ||||||
| #include <types.h> |  | ||||||
| #include <arch/io.h> | #include <arch/io.h> | ||||||
|  | #include <device/chip.h> | ||||||
|  | #include "chip.h" | ||||||
|  |  | ||||||
| #ifndef PNP_INDEX_REG |  | ||||||
| #define PNP_INDEX_REG	0x15C |  | ||||||
| #endif |  | ||||||
| #ifndef PNP_DATA_REG |  | ||||||
| #define PNP_DATA_REG	0x15D |  | ||||||
| #endif |  | ||||||
| #ifndef SIO_COM1 |  | ||||||
| #define SIO_COM1_BASE	0x3F8 |  | ||||||
| #endif |  | ||||||
| #ifndef SIO_COM2 |  | ||||||
| #define SIO_COM2_BASE	0x2F8 |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
| static |  | ||||||
| void pnp_output(char address, char data) | void pnp_output(char address, char data) | ||||||
| { | { | ||||||
| 	outb(address, PNP_INDEX_REG); | 	outb(address, PNP_INDEX_REG); | ||||||
| 	outb(data, PNP_DATA_REG); | 	outb(data, PNP_DATA_REG); | ||||||
| } | } | ||||||
|  |  | ||||||
| static | void sio_enable(struct chip *chip, enum chip_pass pass) | ||||||
| void sio_enable(void) |  | ||||||
| { | { | ||||||
|  |  | ||||||
|  | 	struct superio_NSC_pc87360_config *conf = (struct superio_NSC_pc87360_config *)chip->chip_info; | ||||||
|  |  | ||||||
|  | 	switch (pass) { | ||||||
|  | 	case CHIP_PRE_CONSOLE: | ||||||
| 		/* Enable Super IO Chip */ | 		/* Enable Super IO Chip */ | ||||||
| 		pnp_output(0x07, 6); /* LD 6 = UART1 */ | 		pnp_output(0x07, 6); /* LD 6 = UART1 */ | ||||||
| 		pnp_output(0x30, 0); /* Dectivate */ | 		pnp_output(0x30, 0); /* Dectivate */ | ||||||
|     pnp_output(0x60, SIO_COM1_BASE >> 8); /* IO Base */ | 		pnp_output(0x60, conf->port >> 8); /* IO Base */ | ||||||
|     pnp_output(0x61, SIO_COM1_BASE & 0xFF); /* IO Base */ | 		pnp_output(0x61, conf->port & 0xFF); /* IO Base */ | ||||||
| 		pnp_output(0x30, 1); /* Activate */ | 		pnp_output(0x30, 1); /* Activate */ | ||||||
|  | 		break; | ||||||
|  | 	default: | ||||||
|  | 		/* nothing yet */ | ||||||
|  | 		break; | ||||||
|  | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
| struct superio_control superio_NSC_pc87360_control = { | struct chip_control superio_NSC_pc87360_control = { | ||||||
| 	pre_pci_init:   (void *)0, | 	enable: sio_enable, | ||||||
| 	init:           (void *)0, | 	name:   "NSC 87360" | ||||||
| 	finishup:       (void *)0, |  | ||||||
| 	defaultport:    SIO_COM1_BASE, |  | ||||||
| 	name:           "NSC pc87360" |  | ||||||
| }; | }; | ||||||
|   | |||||||
| @@ -55,8 +55,11 @@ main(int argc, char *argv[]) { | |||||||
|  |  | ||||||
| 	if (fstat(infd, &inbuf) < 0) | 	if (fstat(infd, &inbuf) < 0) | ||||||
| 		fatal("stat of infile"); | 		fatal("stat of infile"); | ||||||
| 	if (inbuf.st_size > size)  | 	if (inbuf.st_size > size)  { | ||||||
| 		fatal("input file larger than allowed size!\n"); | 		fprintf(stderr, "linuxbios image is %d bytes; only %d allowed\n", | ||||||
|  | 				inbuf.st_size, size); | ||||||
|  | 		fatal("Linuxbios input file larger than allowed size!\n"); | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	if (fstat(payloadfd, &payloadbuf) < 0) | 	if (fstat(payloadfd, &payloadbuf) < 0) | ||||||
| 		fatal("stat of infile"); | 		fatal("stat of infile"); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user