From: Bin Meng Date: Sat, 15 Aug 2015 00:07:44 -0700 Subject: [U-Boot] [PATCH 2/8] dm: pci: Only allow serial device to be bound before relocation In-Reply-To: <1439622470-10803-1-git-send-email-bmeng.cn@gmail.com> References: <1439622470-10803-1-git-send-email-bmeng.cn@gmail.com> Message-ID: <1439622470-10803-2-git-send-email-bmeng.cn@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de To further limit the memory space, we only allow serial device to be bound before relocation. Signed-off-by: Bin Meng --- drivers/pci/pci-uclass.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c index 4160274..b7dca0f 100644 --- a/drivers/pci/pci-uclass.c +++ b/drivers/pci/pci-uclass.c @@ -487,9 +487,13 @@ static int pci_find_and_bind_driver(struct udevice *parent, * whose driver has the DM_FLAG_PRE_RELOC set, to save * precious memory space as on some platforms as that * space is pretty limited (ie: using Cache As RAM). + * + * To further limit the memory space, we only allow + * serial device to be bound. */ if (!(gd->flags & GD_FLG_RELOC) && - !(drv->flags & DM_FLAG_PRE_RELOC)) + !(drv->flags & DM_FLAG_PRE_RELOC) && + (drv->id != UCLASS_SERIAL)) return 0; /* -- 1.8.2.1