From patchwork Mon Jan 27 05:06:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 240209 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Sun, 26 Jan 2020 22:06:06 -0700 Subject: [PATCH 059/108] x86: apl: Hide the p2sb on exit from U-Boot In-Reply-To: <20200127050655.170614-1-sjg@chromium.org> References: <20200127050655.170614-1-sjg@chromium.org> Message-ID: <20200126220508.59.I68d05c644cec1ef05b0845010253943c44385616@changeid> This confuses Linux's PCI probing so needs to be hidden when booting Linux. Add a remove() method to handle this. Signed-off-by: Simon Glass --- arch/x86/cpu/apollolake/p2sb.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/x86/cpu/apollolake/p2sb.c b/arch/x86/cpu/apollolake/p2sb.c index 92bf31333c..9f4b1a0d92 100644 --- a/arch/x86/cpu/apollolake/p2sb.c +++ b/arch/x86/cpu/apollolake/p2sb.c @@ -151,6 +151,17 @@ static int apl_p2sb_set_hide(struct udevice *dev, bool hide) return 0; } +static int apl_p2sb_remove(struct udevice *dev) +{ + int ret; + + ret = apl_p2sb_set_hide(dev, true); + if (ret) + return log_msg_ret("hide", ret); + + return 0; +} + static int p2sb_child_post_bind(struct udevice *dev) { #if !CONFIG_IS_ENABLED(OF_PLATDATA) @@ -181,9 +192,12 @@ U_BOOT_DRIVER(apl_p2sb_drv) = { .id = UCLASS_P2SB, .of_match = apl_p2sb_ids, .probe = apl_p2sb_probe, + .remove = apl_p2sb_remove, + .ops = &apl_p2sb_ops, .ofdata_to_platdata = apl_p2sb_ofdata_to_platdata, .platdata_auto_alloc_size = sizeof(struct p2sb_platdata), .per_child_platdata_auto_alloc_size = sizeof(struct p2sb_child_platdata), .child_post_bind = p2sb_child_post_bind, + .flags = DM_FLAG_OS_PREPARE, };