Commit f3ac9ecf authored by Marc Jones's avatar Marc Jones Committed by chrome-bot
Browse files

kahlee: Add initial files



Initial board files.

BRANCH=none
BUG=b:62457067
TEST=Builds and boots.

Change-Id: If5af1d1dc3e38be15060dc1538de418f37ee32fd
Signed-off-by: default avatarMarc Jones <marcj303@gmail.com>
Signed-off-by: default avatarMarc Jones <marc.jones@scarletltd.com>
Reviewed-on: https://chromium-review.googlesource.com/528492


Commit-Ready: Martin Roth <martinroth@chromium.org>
Tested-by: default avatarMartin Roth <martinroth@chromium.org>
Reviewed-by: default avatarStefan Reinauer <reinauer@google.com>
parent ad754d8b
# Arch
CONFIG_ARCH_X86=y
# Board
CONFIG_BOARD="kahlee"
# Image
CONFIG_FMAP_OFFSET=0x570000
# Vboot
CONFIG_VIRTUAL_DEV_SWITCH=y
CONFIG_NV_STORAGE_CMOS=y
CONFIG_CROSSYSTEM_ACPI=y
# Kernel format
CONFIG_KERNEL_ZIMAGE=y
# Drivers
CONFIG_MOCK_TPM=y
CONFIG_DRIVER_EC_CROS=y
CONFIG_DRIVER_EC_CROS_LPC=y
CONFIG_DRIVER_FLASH_MEMMAPPED=y
CONFIG_DRIVER_GPIO_KERN=y
CONFIG_DRIVER_INPUT_PS2=y
CONFIG_DRIVER_INPUT_USB=y
CONFIG_DRIVER_POWER_FCH=y
CONFIG_DRIVER_AHCI=y
CONFIG_DRIVER_TPM_SPI=y
CONFIG_DRIVER_SOUND_HDA=y
......@@ -31,6 +31,9 @@ endif
if BOARD_DIR = "cyan"
source src/board/cyan/Kconfig
endif
if BOARD_DIR = "kahlee"
source src/board/kahlee/Kconfig
endif
if BOARD_DIR = "daisy"
source src/board/daisy/Kconfig
endif
......
## 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.
## 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.
##
depthcharge-y += board.c
/*
* Copyright 2014 Google Inc.
*
* See file CREDITS for list of people who contributed to this
* 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; either version 2 of
* the License, or (at your option) any later version.
*
* 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 "base/init_funcs.h"
#include "base/list.h"
#include "drivers/ec/cros/lpc.h"
#include "drivers/flash/flash.h"
#include "drivers/flash/memmapped.h"
#include "drivers/gpio/kern.h"
#include "drivers/gpio/sysinfo.h"
#include "drivers/power/fch.h"
#include "drivers/sound/hda_codec.h"
#include "drivers/sound/sound.h"
#include "drivers/storage/ahci.h"
#include "drivers/storage/blockdev.h"
#include "drivers/bus/usb/usb.h"
#include "vboot/util/flag.h"
static int board_setup(void)
{
sysinfo_install_flags(NULL);
CrosEcLpcBus *cros_ec_lpc_bus =
new_cros_ec_lpc_bus(CROS_EC_LPC_BUS_GENERIC);
CrosEc *cros_ec = new_cros_ec(&cros_ec_lpc_bus->ops, 0, NULL);
register_vboot_ec(&cros_ec->vboot, 0);
flash_set_ops(&new_mem_mapped_flash(0xff800000, 0x800000)->ops);
HdaCodec *codec = new_hda_codec();
sound_set_ops(&codec->ops);
AhciCtrlr *ahci = new_ahci_ctrlr(PCI_DEV(0, 17, 0));
list_insert_after(&ahci->ctrlr.list_node, &fixed_block_dev_controllers);
uintptr_t usb_base;
UsbHostController *usb_ehci;
UsbHostController *usb_xchi;
usb_base = (uintptr_t)pci_read_config32(PCI_DEV(0, 18, 0),
PCI_BASE_ADDRESS_0) & PCI_BASE_ADDRESS_MEM_MASK;
if (usb_base){
usb_ehci = new_usb_hc(EHCI, usb_base);
list_insert_after(&usb_ehci->list_node, &usb_host_controllers);
}
usb_base = (uintptr_t)pci_read_config32(PCI_DEV(0, 16, 0),
PCI_BASE_ADDRESS_0) & PCI_BASE_ADDRESS_MEM_MASK;
if (usb_base){
usb_xchi = new_usb_hc(XHCI, usb_base);
list_insert_after(&usb_xchi->list_node, &usb_host_controllers);
}
power_set_ops(&kern_power_ops);
return 0;
}
INIT_FUNC(board_setup);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment