From patchwork Wed May 27 17:10:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1317 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id B86693F1DD for ; Wed, 27 May 2020 19:11:11 +0200 (CEST) Received: by mail-pj1-f69.google.com with SMTP id az16sf3102933pjb.3 for ; Wed, 27 May 2020 10:11:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1590599470; cv=pass; d=google.com; s=arc-20160816; b=tuuz4BvBzGI/Mq24tGJZT0kN6vykcA2zUuizuG84AdLqSDPBpPqV4ZUDazuM87F+LF v1IJJZGGpODpiYJmAFUZgfFad6MboAKWNIrqgtOURkzsMMrEguispT4TcvlMdhP5D7z5 kYtF2PM1xIA05QDJnBZKz8dRE6u8eqLgy8GJEjJPZhDSrQ6QsimnqnewB/mEGFcvTbT/ ZpUwqUd0+bvuOaMrYPPcvzGQBxFhMOOWBu5mtPzDViTvdp9RlySOsBJpm814iZ/dk7HQ n/d0n5u7fJ5Kk2gkHI6kLl1ZVqASHSmD+tX7M2uF6j5tEwEe1RfNEjqPRUvuVZvSPIjB Rnyg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=R5DMMokPBRTPfVSb39lCI0tRfF0Jp3ZyS1LOSCIsBYU=; b=DN/jDSBQ62kq/WRRDZykGE2C96yIIsBZJ24D/YRjC9Gj71kbmDr42tEFzF1Rt2McX+ K82NSpcqUS6cLNMzYgkRNb/MMpJDj/rzfNejiVdFMuWjVGK2/c2/M+kNr3S6ml97WIDH oRVHHeNzZ3SWtza5Lf0/tpbDBL9LbxcK+OoS8CcFanVJaewSqB/ECUO+MSYOsN0nAb2m A6JpocSiWFegZYpsfpezvmD22A6Mo/jRs7ZUGugiQQcjs6q0xqDee/Ezn1rjDCrqYNUP vE7Pmg+JDdbiKikPY3VfzCoolx1lTDDEK8Auj4uWfrSEGAXK9Z1joqSemxga43XKBOBi 3GXA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cUv1SgUx; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=R5DMMokPBRTPfVSb39lCI0tRfF0Jp3ZyS1LOSCIsBYU=; b=i/wy6TbFP1PkQbuu8KM8p3U+mDxhdqLgRUEc8OOYVFktQXFzIfwOG2ayE6DTWPfnxC cEERo5WVmHPCVRYWflDErRUVK343542KiI+pEZyF4afU4rQVslDPDAH/ZepDZtDpvDp4 nBiqVtdnIvoahU8SnHgIuiloGDVhqhKSHHvig= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=R5DMMokPBRTPfVSb39lCI0tRfF0Jp3ZyS1LOSCIsBYU=; b=QFl+U/ECsScm3nMkbrczr7GBXaapZ/I0NNzQGDJoAZcyhBCPTAXdNwkDpIw/Ip4COO UiF4d/agLG6H7JSodoZGbOBQstCw2MpMMd9sUqgr542/F2tRE9Xoozog4oDx2Wp0afsr VJiP7wQ4WMmL0E5O5z0lUItWqVXLrYykNUZL8ZeiOmEN6vGpC1BG1DunCvNOt9lj4eE/ 7X5y/6bX013pedx1ON5poblAHYBqjolzucJpqkX4BVpd1foyEsBfCTEQNqoCjaGnpan8 T5Us+7FqOVwGR5ubavBE1AKT+IG+Sjp0wbzFJoNHKT4/WHMwVkTeHVe7/vU9UCzoJ3UN pxJA== X-Gm-Message-State: AOAM531oId//bw2oVzXvtQPYvdgIjeNATK6Bj3bO6rv3livrGvAf3Qwn UY13BHakRR2u9+j7LQeQvnNIuHFa X-Google-Smtp-Source: ABdhPJzoccPz5RZCeBpc/+XqYLw1vkYCy7Z3Fep+C5Hio1q6+NNqDdjtYqJ9gQ/g6P+9Ne0i0Mas9Q== X-Received: by 2002:a17:90a:36a9:: with SMTP id t38mr6189691pjb.48.1590599470513; Wed, 27 May 2020 10:11:10 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:1acc:: with SMTP id a195ls5157107pfa.11.gmail; Wed, 27 May 2020 10:11:10 -0700 (PDT) X-Received: by 2002:a63:6dc7:: with SMTP id i190mr4886933pgc.171.1590599470001; Wed, 27 May 2020 10:11:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590599469; cv=none; d=google.com; s=arc-20160816; b=0CuWZlSMzUStKYy+Wt5a6mYBZvD0R7Yf+sheVmDzrLYcrOZqa4FKfMz9Aw8uL+fF5J yl+jW0R5QhjzPUqc/Qs7X6pCT2fZnOcV0mXjRlmn0Fj5wy2YCQXTkSFiDKSf+8heDJrz XJhISnLDO4CAuxzqi6g+4GxzJ9hgTplsZatUPccuvqj2ST82XCOCzBH2EYayAwakipgw q0uos7hq9fXr2yF4zuC9saKNoh/jukhGGuemImTobv6J9UY1YIUfQijoKbAsCGI8/gtk 7f9c8Q7ywQBfI8Mnm1mVdAWj098hry91SRD3VBfph9GrtDWA/cLxATkpHzsaBRq4WIj5 BNow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=vAnHkZ/2OLSsGTbu5oVFX50QmKqzfxJWTeqZIg2CA1Y=; b=RbEhZtmTI5nY2Z0NDpjJdelMn1AR6XxLMhyh8eaS3Xzu4hAlVNEMR1gqGEV6NNeVwf ATT8lV+p5qoszJtw9IK5qCc0Cqg8zMOLPinwLna5W5dElTEfWGn4eBALh1kozxUTdyDD JfvlDOyqOIWNnwOceHRgaUDeIa4oAMVDHWCa7GQbpvv5YCiQPUpdPEsuRfHjI4Grv5nl baFDvkCB8f496gARE4xAjdkf9HstIs/sjwD9RzaVs43DkEBPqzsD5GuMPwcOQsMzbiUc 3sGC3Q4hKPrAtCBghiyVdEeh3qNhBRhUKtijqRt4lTSa+IhmanTKWmBKJSZmSpTkU5YN e5dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cUv1SgUx; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id h13sor4867335pfr.68.2020.05.27.10.11.09 for (Google Transport Security); Wed, 27 May 2020 10:11:09 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a63:9e12:: with SMTP id s18mr5127383pgd.333.1590599469696; Wed, 27 May 2020 10:11:09 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:91de:b2d4:ed11:6aeb]) by smtp.gmail.com with ESMTPSA id 145sm2549312pfa.53.2020.05.27.10.11.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 10:11:09 -0700 (PDT) From: Jagan Teki To: Simon Glass , Tom Rini Cc: u-boot@lists.denx.de, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 24/24] mtd: spi: Drop fsl_espi_spl Date: Wed, 27 May 2020 22:40:48 +0530 Message-Id: <20200527171048.178430-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200527171048.178430-1-jagan@amarulasolutions.com> References: <20200527171048.178430-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cUv1SgUx; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Boards which are using this fsl_espi_spl are already dropped due to lack of dm migrations. So, drop this associated driver. Signed-off-by: Jagan Teki Nacked-by: Priyanka Jain --- arch/powerpc/cpu/mpc85xx/fdt.c | 7 --- board/Arcturus/ucp1020/spl.c | 6 --- common/spl/Kconfig | 4 -- drivers/mtd/spi/Makefile | 1 - drivers/mtd/spi/fsl_espi_spl.c | 91 ---------------------------------- 5 files changed, 109 deletions(-) delete mode 100644 drivers/mtd/spi/fsl_espi_spl.c diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c index 55f191f202..6255dfa7c0 100644 --- a/arch/powerpc/cpu/mpc85xx/fdt.c +++ b/arch/powerpc/cpu/mpc85xx/fdt.c @@ -148,13 +148,6 @@ void ft_fixup_cpu(void *blob, u64 memory_limit) if (off < 0) printf("Failed to reserve memory for SD deep sleep: %s\n", fdt_strerror(off)); -#elif defined(CONFIG_SPL_SPI_BOOT) - off = fdt_add_mem_rsv(blob, CONFIG_SYS_SPI_FLASH_U_BOOT_START, - CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE); - if (off < 0) - printf("Failed to reserve memory for SPI deep sleep: %s\n", - fdt_strerror(off)); -#endif #endif } #endif diff --git a/board/Arcturus/ucp1020/spl.c b/board/Arcturus/ucp1020/spl.c index 6a17aeb78e..8a1f005ef2 100644 --- a/board/Arcturus/ucp1020/spl.c +++ b/board/Arcturus/ucp1020/spl.c @@ -48,10 +48,6 @@ void board_init_f(ulong bootflag) /* Read back the register to synchronize the write. */ in_be32(&gur->pmuxcr); -#ifdef CONFIG_SPL_SPI_BOOT - clrbits_be32(&gur->pmuxcr, MPC85xx_PMUXCR_SD_DATA); -#endif - /* initialize selected port with appropriate baud rate */ plat_ratio = in_be32(&gur->porpllsr) & MPC85xx_PORPLLSR_PLAT_RATIO; plat_ratio >>= 1; @@ -62,8 +58,6 @@ void board_init_f(ulong bootflag) bus_clk / 16 / CONFIG_BAUDRATE); #ifdef CONFIG_SPL_MMC_BOOT puts("\nSD boot...\n"); -#elif defined(CONFIG_SPL_SPI_BOOT) - puts("\nSPI Flash boot...\n"); #endif /* copy code to RAM and jump to it - this should not return */ diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 414b6f396d..9dce9710ce 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -101,10 +101,6 @@ config SPL_MMC_BOOT bool "Load SPL from SD Card / eMMC" depends on PPC && (SUPPORT_SPL && !SPL_FRAMEWORK) -config SPL_SPI_BOOT - bool "Load SPL from SPI flash" - depends on PPC && (SUPPORT_SPL && !SPL_FRAMEWORK) - config SPL_FSL_PBL bool "Create SPL in Freescale PBI format" depends on (PPC || ARCH_LS1021A || ARCH_LS1043A || ARCH_LS1046A) && \ diff --git a/drivers/mtd/spi/Makefile b/drivers/mtd/spi/Makefile index b3ae74dbe8..17ed55eee2 100644 --- a/drivers/mtd/spi/Makefile +++ b/drivers/mtd/spi/Makefile @@ -11,7 +11,6 @@ endif spi-nor-y += spi-nor-ids.o ifdef CONFIG_SPL_BUILD -obj-$(CONFIG_SPL_SPI_BOOT) += fsl_espi_spl.o ifeq ($(CONFIG_SPL_SPI_FLASH_TINY),y) spi-nor-y += spi-nor-tiny.o else diff --git a/drivers/mtd/spi/fsl_espi_spl.c b/drivers/mtd/spi/fsl_espi_spl.c deleted file mode 100644 index 5c41d7558c..0000000000 --- a/drivers/mtd/spi/fsl_espi_spl.c +++ /dev/null @@ -1,91 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright 2013 Freescale Semiconductor, Inc. - */ - -#include -#include -#include -#include -#include - -#define ESPI_BOOT_IMAGE_SIZE 0x48 -#define ESPI_BOOT_IMAGE_ADDR 0x50 -#define CONFIG_CFG_DATA_SECTOR 0 - -void fsl_spi_spl_load_image(uint32_t offs, unsigned int size, void *vdst) -{ - struct spi_flash *flash; - - flash = spi_flash_probe(CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS, - CONFIG_ENV_SPI_MAX_HZ, CONFIG_ENV_SPI_MODE); - if (flash == NULL) { - puts("\nspi_flash_probe failed"); - hang(); - } - - spi_flash_read(flash, offs, size, vdst); -} - -/* - * The main entry for SPI booting. It's necessary that SDRAM is already - * configured and available since this code loads the main U-Boot image - * from SPI into SDRAM and starts it from there. - */ -void fsl_spi_boot(void) -{ - void (*uboot)(void) __noreturn; - u32 offset, code_len, copy_len = 0; -#ifndef CONFIG_FSL_CORENET - unsigned char *buf = NULL; -#endif - struct spi_flash *flash; - - flash = spi_flash_probe(CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS, - CONFIG_ENV_SPI_MAX_HZ, CONFIG_ENV_SPI_MODE); - if (flash == NULL) { - puts("\nspi_flash_probe failed"); - hang(); - } - -#ifdef CONFIG_FSL_CORENET - offset = CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS; - code_len = CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE; -#else - /* - * Load U-Boot image from SPI flash into RAM - */ - buf = malloc(flash->page_size); - if (buf == NULL) { - puts("\nmalloc failed"); - hang(); - } - memset(buf, 0, flash->page_size); - - spi_flash_read(flash, CONFIG_CFG_DATA_SECTOR, - flash->page_size, (void *)buf); - offset = *(u32 *)(buf + ESPI_BOOT_IMAGE_ADDR); - /* Skip spl code */ - offset += CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS; - /* Get the code size from offset 0x48 */ - code_len = *(u32 *)(buf + ESPI_BOOT_IMAGE_SIZE); - /* Skip spl code */ - code_len = code_len - CONFIG_SPL_MAX_SIZE; -#endif - /* copy code to DDR */ - printf("Loading second stage boot loader "); - while (copy_len <= code_len) { - spi_flash_read(flash, offset + copy_len, 0x2000, - (void *)(CONFIG_SYS_SPI_FLASH_U_BOOT_DST - + copy_len)); - copy_len = copy_len + 0x2000; - putc('.'); - } - - /* - * Jump to U-Boot image - */ - flush_cache(CONFIG_SYS_SPI_FLASH_U_BOOT_DST, code_len); - uboot = (void *)CONFIG_SYS_SPI_FLASH_U_BOOT_START; - (*uboot)(); -}