diff options
author | Edward O'Callaghan <eocallaghan@alterapraxis.com> | 2014-04-21 17:34:38 +1000 |
---|---|---|
committer | Patrick Georgi <patrick@georgi-clan.de> | 2014-04-26 12:57:04 +0200 |
commit | 03ad2a26b07909a5c34a1ade30f905ae3de5b8a0 (patch) | |
tree | a169d5835c8a61dedaf98b53f0d49c730b3eec82 /src/superio/ite/it8721f/it8721f.h | |
parent | 392de45ae2d9550c3b95078bff7a52c9e5eed563 (diff) |
superio/ite/it8721f: Rewrite from hardcoded base addr
Rewrite early_serial.c implementation to honour a passed base address in
device_t, removing any hard coding of values. We also expose early sio
init functions as romstage symbols to avoid falsely #including
"early_serial.c" in romstage.c of board support.
Change-Id: I521b8f7cf85173345b90745c6f2ab66e25429f5d
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/5561
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/superio/ite/it8721f/it8721f.h')
-rw-r--r-- | src/superio/ite/it8721f/it8721f.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/superio/ite/it8721f/it8721f.h b/src/superio/ite/it8721f/it8721f.h index 25300e6659..9d5a528295 100644 --- a/src/superio/ite/it8721f/it8721f.h +++ b/src/superio/ite/it8721f/it8721f.h @@ -19,9 +19,13 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef SUPERIO_ITE_IT8721F_IT8721F_H -#define SUPERIO_ITE_IT8721F_IT8721F_H +#ifndef SUPERIO_ITE_IT8721F_H +#define SUPERIO_ITE_IT8721F_H +#include <device/pnp.h> +#include <stdint.h> + +/* Logical Device Numbers (LDN). */ #define IT8721F_FDC 0x00 /* Floppy */ #define IT8721F_SP1 0x01 /* Com1 */ #define IT8721F_SP2 0x02 /* Com2 */ @@ -32,10 +36,10 @@ #define IT8721F_GPIO 0x07 /* GPIO */ #define IT8721F_IR 0x0a /* Consumer IR */ -#if defined(__PRE_RAM__) -void it8721f_24mhz_clkin(void); -void it8721f_disable_reboot(void); +#define IT8721F_UART_CLK_PREDIVIDE_48 0x00 /* default */ +#define IT8721F_UART_CLK_PREDIVIDE_24 0x01 + +void it8721f_conf_clkin(device_t dev, u8 predivide); void it8721f_enable_serial(device_t dev, u16 iobase); -#endif -#endif +#endif /* SUPERIO_ITE_IT8721F_H */ |