2019-06-04 13:53:05 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the coreboot project.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* 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; version 2 of the License.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <soc/spi.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <drivers/spi/spi_winbond.h>
|
|
|
|
|
|
|
|
/*
|
2019-10-13 23:26:36 +02:00
|
|
|
* SPI VSCC configuration
|
2019-06-04 13:53:05 +02:00
|
|
|
*/
|
|
|
|
#define SPI_VSCC (WG_64_BYTE | EO(0x20) | BES_4_KB)
|
|
|
|
|
2019-10-13 23:26:36 +02:00
|
|
|
static const struct vscc_config spi_config = {
|
2019-06-04 13:53:05 +02:00
|
|
|
.lvscc = SPI_VSCC,
|
|
|
|
.uvscc = SPI_VSCC,
|
|
|
|
};
|
|
|
|
|
2019-10-13 23:26:36 +02:00
|
|
|
int mainboard_get_spi_vscc_config(struct vscc_config *cfg)
|
2019-06-04 13:53:05 +02:00
|
|
|
{
|
|
|
|
memcpy(cfg, &spi_config, sizeof(*cfg));
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|