Shaunak Saha (shaunak.saha@intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15460
-gerrit
commit 3f44e0ee5ebea0b6c5b4d4a13f9d295953e46639 Author: Shaunak Saha shaunak.saha@intel.com Date: Mon Jun 27 23:00:15 2016 -0700
soc/apollolake: Expose a function to read pmc bar
This patch exposes a function to read pmc bar. PMC bar is read in function read_pmc_mmio_bar which is defined static in file pmutil.c. This patch exposes that functionality to call it from other files.
BUG=chrome-os-partner:53438 TEST= Read the PMC bar value properly from outside pmutil file.
Change-Id: I26ee13e6ab95d3a8991c7f8ea4b3856ceb015d10 Signed-off-by: Shaunak Saha shaunak.saha@intel.com --- src/soc/intel/apollolake/include/soc/pm.h | 1 + src/soc/intel/apollolake/pmutil.c | 5 +++++ 2 files changed, 6 insertions(+)
diff --git a/src/soc/intel/apollolake/include/soc/pm.h b/src/soc/intel/apollolake/include/soc/pm.h index 8838d1c..3da7dd0 100644 --- a/src/soc/intel/apollolake/include/soc/pm.h +++ b/src/soc/intel/apollolake/include/soc/pm.h @@ -171,6 +171,7 @@ void disable_pm1_control(uint32_t mask); void enable_gpe(uint32_t mask); void disable_gpe(uint32_t mask); void disable_all_gpe(void); +uintptr_t get_pmc_mmio_bar(void);
void global_reset_enable(bool enable); void global_reset_lock(void); diff --git a/src/soc/intel/apollolake/pmutil.c b/src/soc/intel/apollolake/pmutil.c index f8b2fdf..f25adfb 100644 --- a/src/soc/intel/apollolake/pmutil.c +++ b/src/soc/intel/apollolake/pmutil.c @@ -34,6 +34,11 @@ static uintptr_t read_pmc_mmio_bar(void) return bar & ~PCI_BASE_ADDRESS_MEM_ATTR_MASK; }
+uintptr_t get_pmc_mmio_bar(void) +{ + return read_pmc_mmio_bar(); +} + static void print_num_status_bits(int num_bits, uint32_t status, const char * const bit_names[]) {