mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-09-10 00:11:37 +02:00
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35. Reported-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Tom Rini <trini@konsulko.com>
45 lines
955 B
C
45 lines
955 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* Special driver to handle of-platdata
|
|
*
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Some code from coreboot lpss.c
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <dm.h>
|
|
#include <pci.h>
|
|
#include <asm/io.h>
|
|
#include <asm/lpss.h>
|
|
|
|
enum {
|
|
LPSS_RESET_CTL_REG = 0x204,
|
|
|
|
/*
|
|
* Bit 1:0 controls LPSS controller reset.
|
|
*
|
|
* 00 ->LPSS Host Controller is in reset (Reset Asserted)
|
|
* 01/10 ->Reserved
|
|
* 11 ->LPSS Host Controller is NOT at reset (Reset Released)
|
|
*/
|
|
LPSS_CNT_RST_RELEASE = 3,
|
|
|
|
/* Power management control and status register */
|
|
PME_CTRL_STATUS = 0x84,
|
|
|
|
/* Bit 1:0 Powerstate, controls D0 and D3 state */
|
|
POWER_STATE_MASK = 3,
|
|
};
|
|
|
|
/* Take controller out of reset */
|
|
void lpss_reset_release(void *regs)
|
|
{
|
|
writel(LPSS_CNT_RST_RELEASE, regs + LPSS_RESET_CTL_REG);
|
|
}
|
|
|
|
void lpss_set_power_state(struct udevice *dev, enum lpss_pwr_state state)
|
|
{
|
|
dm_pci_clrset_config8(dev, PME_CTRL_STATUS, POWER_STATE_MASK, state);
|
|
}
|