UPSTREAM: drivers/intel/fsp2_0: Add fsp_write_line function

Add fsp_write_line function which may be called by FSP to output debug
serial data to the console.

TEST=Build and run on Galileo Gen2

BUG=None
BRANCH=None

Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/16129
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Change-Id: If7bfcea1af82209dcdc5a9f9f2d9334842c1595e
Reviewed-on: https://chromium-review.googlesource.com/369115
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
This commit is contained in:
Lee Leahy 2016-08-09 09:04:45 -07:00 committed by chrome-bot
parent 7fbeb72275
commit e4e4b72321
2 changed files with 16 additions and 0 deletions

View file

@ -10,9 +10,16 @@
*/
#include <console/console.h>
#include <console/streams.h>
#include <fsp/util.h>
#include <soc/intel/common/util.h>
asmlinkage size_t fsp_write_line(uint8_t *buffer, size_t number_of_bytes)
{
console_write_line(buffer, number_of_bytes);
return number_of_bytes;
}
/*-----------
* MemoryInit
*-----------

View file

@ -58,4 +58,13 @@ const char *fsp_get_guid_name(const uint8_t *guid);
void fsp_print_guid_extension_hob(const struct hob_header *hob);
int fsp_find_bootloader_tolum(struct range_entry *re);
/*
* Writes number_of_bytes data bytes from buffer to the console.
* The number of bytes actually written to the console is returned.
*
* If number_of_bytes is zero, don't output any data but instead wait until
* the console has output all data, then return 0.
*/
asmlinkage size_t fsp_write_line(uint8_t *buffer, size_t number_of_bytes);
#endif /* _FSP2_0_DEBUG_H_ */