2014-08-21 23:19:31 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the coreboot project.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2014 Imagination Technologies
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
2014-12-12 14:53:22 +01:00
|
|
|
#include <arch/io.h>
|
|
|
|
#include <symbols.h>
|
2014-08-21 23:19:31 +02:00
|
|
|
#include <console/console.h>
|
|
|
|
#include <device/device.h>
|
2014-12-12 14:53:22 +01:00
|
|
|
#include <boot/coreboot_tables.h>
|
2014-08-21 23:19:31 +02:00
|
|
|
|
2015-03-29 07:14:53 +02:00
|
|
|
#include <vendorcode/google/chromeos/chromeos.h>
|
|
|
|
|
|
|
|
static void mainboard_init(device_t dev)
|
|
|
|
{
|
|
|
|
#if IS_ENABLED(CONFIG_CHROMEOS)
|
|
|
|
/* Copy WIFI calibration data into CBMEM. */
|
|
|
|
cbmem_add_vpd_calibration_data();
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2014-08-21 23:19:31 +02:00
|
|
|
static void mainboard_enable(device_t dev)
|
|
|
|
{
|
2014-09-29 21:43:40 +02:00
|
|
|
printk(BIOS_INFO, "Enable Pistachio device...\n");
|
2015-03-29 07:14:53 +02:00
|
|
|
dev->ops->init = &mainboard_init;
|
2014-08-21 23:19:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
struct chip_operations mainboard_ops = {
|
|
|
|
.enable_dev = mainboard_enable,
|
|
|
|
};
|
|
|
|
|
2014-12-12 14:53:22 +01:00
|
|
|
void lb_board(struct lb_header *header)
|
|
|
|
{
|
|
|
|
struct lb_range *dma;
|
|
|
|
|
|
|
|
dma = (struct lb_range *)lb_new_record(header);
|
|
|
|
dma->tag = LB_TAB_DMA;
|
|
|
|
dma->size = sizeof(*dma);
|
|
|
|
dma->range_start = (uintptr_t)_dma_coherent;
|
|
|
|
dma->range_size = _dma_coherent_size;
|
2015-03-29 07:14:53 +02:00
|
|
|
|
|
|
|
#if IS_ENABLED(CONFIG_CHROMEOS)
|
|
|
|
/* Retrieve the switch interface MAC addressses. */
|
|
|
|
lb_table_add_macs_from_vpd(header);
|
|
|
|
#endif
|
2014-12-12 14:53:22 +01:00
|
|
|
}
|