ec/acpi: Replace __PRE_RAM__ use
Change-Id: Iae31569f16168ba00ce272e4777f3a69bcd6ee94 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/35397 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
505e3f7e85
commit
4a637802fa
@ -18,19 +18,11 @@
|
|||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
#include <delay.h>
|
#include <delay.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include "ec.h"
|
#include "ec.h"
|
||||||
|
|
||||||
#ifdef __PRE_RAM__
|
static u16 ec_cmd_reg = EC_SC;
|
||||||
|
static u16 ec_data_reg = EC_DATA;
|
||||||
static const int ec_cmd_reg = EC_SC;
|
|
||||||
static const int ec_data_reg = EC_DATA;
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
static int ec_cmd_reg = EC_SC;
|
|
||||||
static int ec_data_reg = EC_DATA;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int send_ec_command(u8 command)
|
int send_ec_command(u8 command)
|
||||||
{
|
{
|
||||||
@ -162,16 +154,15 @@ void ec_clr_bit(u8 addr, u8 bit)
|
|||||||
ec_write(addr, ec_read(addr) & ~(1 << bit));
|
ec_write(addr, ec_read(addr) & ~(1 << bit));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __PRE_RAM__
|
|
||||||
|
|
||||||
void ec_set_ports(u16 cmd_reg, u16 data_reg)
|
void ec_set_ports(u16 cmd_reg, u16 data_reg)
|
||||||
{
|
{
|
||||||
|
if (!ENV_STAGE_HAS_DATA_SECTION)
|
||||||
|
return;
|
||||||
|
|
||||||
ec_cmd_reg = cmd_reg;
|
ec_cmd_reg = cmd_reg;
|
||||||
ec_data_reg = data_reg;
|
ec_data_reg = data_reg;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct chip_operations ec_acpi_ops = {
|
struct chip_operations ec_acpi_ops = {
|
||||||
CHIP_NAME("ACPI Embedded Controller")
|
CHIP_NAME("ACPI Embedded Controller")
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user