diff options
author | Aaron Durbin <adurbin@chromium.org> | 2013-12-10 17:12:44 -0800 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2014-05-10 06:31:29 +0200 |
commit | 616f394d3656760deb1e048c0dde4fe3aaa6607f (patch) | |
tree | 89678eaa7536c943f7b2d21a6bd2d9c26c5a9b73 /src/soc/intel/baytrail/gfx.c | |
parent | cffe795dc1516607421bf770eab45076087fc461 (diff) |
baytrail: utilize reg_script_run_on_dev()
The inclusion of reg_script_run_on_dev() allows
for removing some of the chained reg_scripts just
to set up the device context. Use the new reg_script
function in those cases.
BUG=None
BRANCH=None
TEST=Built and booted. Didn't see any bizarre dmesg or coreboot
console output.
Change-Id: I3207449424c1efe92186125004d5aea1bb5ba438
Signed-off-by: Aaron Durbin <adurbin@chromium.og>
Reviewed-on: https://chromium-review.googlesource.com/179541
Tested-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Queue: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/5009
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/soc/intel/baytrail/gfx.c')
-rw-r--r-- | src/soc/intel/baytrail/gfx.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/soc/intel/baytrail/gfx.c b/src/soc/intel/baytrail/gfx.c index d2a8ba5d2e..6f78daca36 100644 --- a/src/soc/intel/baytrail/gfx.c +++ b/src/soc/intel/baytrail/gfx.c @@ -259,14 +259,9 @@ static const struct reg_script gfx_post_vbios_script[] = { REG_SCRIPT_END }; -static void gfx_run_script(device_t dev, const struct reg_script *ops) +static inline void gfx_run_script(device_t dev, const struct reg_script *ops) { - struct reg_script steps[] = { - REG_SCRIPT_SET_DEV(dev), - REG_SCRIPT_NEXT(ops), - REG_SCRIPT_END, - }; - reg_script_run(&steps[0]); + reg_script_run_on_dev(dev, ops); } static void gfx_pre_vbios_init(device_t dev) @@ -294,7 +289,6 @@ static void gfx_panel_setup(device_t dev) { struct soc_intel_baytrail_config *config = dev->chip_info; struct reg_script gfx_pipea_init[] = { - REG_SCRIPT_SET_DEV(dev), /* CONTROL */ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, PIPEA_REG(PP_CONTROL), PP_CONTROL_UNLOCK | PP_CONTROL_EDP_FORCE_VDD), @@ -322,7 +316,6 @@ static void gfx_panel_setup(device_t dev) REG_SCRIPT_END }; struct reg_script gfx_pipeb_init[] = { - REG_SCRIPT_SET_DEV(dev), /* CONTROL */ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, PIPEB_REG(PP_CONTROL), PP_CONTROL_UNLOCK | PP_CONTROL_EDP_FORCE_VDD), @@ -352,12 +345,12 @@ static void gfx_panel_setup(device_t dev) if (config->gpu_pipea_port_select) { printk(BIOS_INFO, "GFX: Initialize PIPEA\n"); - reg_script_run(gfx_pipea_init); + reg_script_run_on_dev(dev, gfx_pipea_init); } if (config->gpu_pipeb_port_select) { printk(BIOS_INFO, "GFX: Initialize PIPEB\n"); - reg_script_run(gfx_pipeb_init); + reg_script_run_on_dev(dev, gfx_pipeb_init); } } |