Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7F37FC433F5 for ; Wed, 23 Mar 2022 21:22:11 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B39A283FEB; Wed, 23 Mar 2022 22:21:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 4E5E383FC3; Wed, 23 Mar 2022 22:20:34 +0100 (CET) Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 79A1283FC1 for ; Wed, 23 Mar 2022 22:20:25 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tom.rini@gmail.com Received: by mail-qk1-f178.google.com with SMTP id i65so2145080qkd.7 for ; Wed, 23 Mar 2022 14:20:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JqU8fr+yrEElyxdNpbanIebMFl+nsdf3EJXSiH60gFU=; b=CEH12WxC9gQckP5wrhXaaIAuSjP049UXX5NBwNB2jszEDHIKDpQsOGvHW4KbLMYkFt 72HMmj1jXszh3YOvHB+T2iKH4VWx484mXtaI+M18KlR263Xo9y512IZrGfFjNbanpbSK ZfdWg5CK14Af0AlfGaIYvGYeHCi3/YJns+FD+d5xxG6Kwasa2Q4UjupZrSjgs6Qh2V4R /x9nWDsiKNi2fDcoY9SE8CCIQW6Gl5McCOtM1penUZ7+Mf5ab8SM3feVLBcN0qSKoU66 5xPRgNGahsHn6FSbuYu06goFYDG/4lK4CezmB8fI1LXd06uXqwZRUFy/jmd2eFHByr20 semw== X-Gm-Message-State: AOAM531gg5xKSjGDKLxnR0T72VdyqMvbGVKZ8qZsEnEbGrAoNjQIdSgL afeJWhVZox7HvsgTVOhczvCjdfr3hA== X-Google-Smtp-Source: ABdhPJxDhb5Te8Wi/xZoMhmYqjduBKbSf6ycQQj0gzMkwNUAOojjBQSWnlz2I9h6/uaW4DiV33RW+w== X-Received: by 2002:a05:620a:1aa2:b0:67d:1637:7a9e with SMTP id bl34-20020a05620a1aa200b0067d16377a9emr1344732qkb.680.1648070423702; Wed, 23 Mar 2022 14:20:23 -0700 (PDT) Received: from bill-the-cat.lan (2603-6081-7b01-cbda-2ef0-5dff-fedb-a8ba.res6.spectrum.com. [2603:6081:7b01:cbda:2ef0:5dff:fedb:a8ba]) by smtp.gmail.com with ESMTPSA id w8-20020ac87e88000000b002e1cdc11203sm868269qtj.18.2022.03.23.14.20.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Mar 2022 14:20:23 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Priyanka Jain Subject: [PATCH 11/22] mpc8548cds: Rework CONFIG_LEGACY usage Date: Wed, 23 Mar 2022 17:19:58 -0400 Message-Id: <20220323212009.1066483-11-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220323212009.1066483-1-trini@konsulko.com> References: <20220323212009.1066483-1-trini@konsulko.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean This CONFIG option is used in one place, so pick a more direct name and migrate to Kconfig. Rework the code slightly. Cc: Priyanka Jain Signed-off-by: Tom Rini --- board/freescale/common/cds_via.c | 6 +++++- board/freescale/mpc8548cds/Kconfig | 3 +++ configs/MPC8548CDS_legacy_defconfig | 2 +- include/configs/MPC8548CDS.h | 8 -------- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/board/freescale/common/cds_via.c b/board/freescale/common/cds_via.c index 8f8f0d1f588b..6184472b1658 100644 --- a/board/freescale/common/cds_via.c +++ b/board/freescale/common/cds_via.c @@ -28,7 +28,11 @@ void mpc85xx_config_via(struct pci_controller *hose, * This allows legacy I/O (i8259, etc) on the VIA * southbridge to be accessed. */ - bridge = PCI_BDF(0,BRIDGE_ID,0); +#ifdef CONFIG_TARGET_MPC8548CDS_LEGACY + bridge = PCI_BDF(0, 17, 0); +#else + bridge = PCI_BDF(0, 28, 0); +#endif pci_hose_write_config_byte(hose, bridge, PCI_IO_BASE, 0); pci_hose_write_config_word(hose, bridge, PCI_IO_BASE_UPPER16, 0); pci_hose_write_config_byte(hose, bridge, PCI_IO_LIMIT, 0x10); diff --git a/board/freescale/mpc8548cds/Kconfig b/board/freescale/mpc8548cds/Kconfig index 09f3b0b7663d..87f3374bf453 100644 --- a/board/freescale/mpc8548cds/Kconfig +++ b/board/freescale/mpc8548cds/Kconfig @@ -9,4 +9,7 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "MPC8548CDS" +config TARGET_MPC8548CDS_LEGACY + bool "Legacy platform support" + endif diff --git a/configs/MPC8548CDS_legacy_defconfig b/configs/MPC8548CDS_legacy_defconfig index 123dd20c82f5..8e07df1386d0 100644 --- a/configs/MPC8548CDS_legacy_defconfig +++ b/configs/MPC8548CDS_legacy_defconfig @@ -8,9 +8,9 @@ CONFIG_MPC85xx=y # CONFIG_CMD_ERRATA is not set CONFIG_TARGET_MPC8548CDS=y CONFIG_MPC85XX_HAVE_RESET_VECTOR=y +CONFIG_TARGET_MPC8548CDS_LEGACY=y CONFIG_OF_BOARD_SETUP=y CONFIG_OF_STDOUT_VIA_ALIAS=y -CONFIG_SYS_EXTRA_OPTIONS="LEGACY" CONFIG_DYNAMIC_SYS_CLK_FREQ=y CONFIG_BOOTDELAY=10 CONFIG_USE_BOOTCOMMAND=y diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h index fc3cc0c533d8..cc675ef42f57 100644 --- a/include/configs/MPC8548CDS.h +++ b/include/configs/MPC8548CDS.h @@ -324,14 +324,6 @@ #endif #define CONFIG_SYS_SRIO1_MEM_SIZE 0x20000000 /* 512M */ -#ifdef CONFIG_LEGACY -#define BRIDGE_ID 17 -#define VIA_ID 2 -#else -#define BRIDGE_ID 28 -#define VIA_ID 4 -#endif - #if defined(CONFIG_PCI) #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ #endif /* CONFIG_PCI */ -- 2.25.1