From patchwork Tue Mar 22 07:38:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 600464 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3qTlHY2ZtZz9s5l for ; Tue, 22 Mar 2016 18:50:49 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 21057A78E8; Tue, 22 Mar 2016 08:45:25 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n5YsRosPuN9U; Tue, 22 Mar 2016 08:45:25 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 723E9A7882; Tue, 22 Mar 2016 08:44:37 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A191CA7845 for ; Tue, 22 Mar 2016 08:43:59 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Sg7peUFTtGpK for ; Tue, 22 Mar 2016 08:43:59 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pf0-f196.google.com (mail-pf0-f196.google.com [209.85.192.196]) by theia.denx.de (Postfix) with ESMTPS id 26B42A7806 for ; Tue, 22 Mar 2016 08:43:13 +0100 (CET) Received: by mail-pf0-f196.google.com with SMTP id u190so34379102pfb.2 for ; Tue, 22 Mar 2016 00:43:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8QMPrc5bJZsIcEMKUyLLPGHi8zkQC/ePhj/FJ36xqF8=; b=Kr0w3YqBIT03jyPsIB7vdKao6D/FH4Vs8n8zR9fnjfefH7GQ9sFTbV17JJuAxbbFg3 UW3LG9tvqQCFIcMBJFICucmTGmigoaE6V+ptn3xkQ/ktAq7p9jvo3lsiYuyo4J6jRTaC Lgfk6WKp3i+xM3AAhmP0pP428mfkLcxb1Z3jbYskZF9IBO6HHghZiKoheKGr6OKdKPwy awDBcE/WZ6AwWv9OQqw42HqwwLuZw3D9zxjvmsu1yEISak+r4Z7nbLPcc88wKvLQi7dx TXTRjPYYnqgTueOp5iIb0rUaLJBNa66KpkfupoJ/pgJEKPF1QvhpaaNKhl5KWvhIdMLr yAtg== X-Gm-Message-State: AD7BkJI0F0CH0Z+Hca3mcwDws4iklIz/ySG3v1bWrS+bEwFbcYx5+kr+q38kCyWR+PI/Xg== X-Received: by 10.98.69.84 with SMTP id s81mr51134494pfa.125.1458632591671; Tue, 22 Mar 2016 00:43:11 -0700 (PDT) Received: from jteki-Latitude-E7450.amcc.com ([182.73.239.130]) by smtp.gmail.com with ESMTPSA id ko9sm45814957pab.37.2016.03.22.00.43.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Mar 2016 00:43:10 -0700 (PDT) From: Jagan Teki To: u-boot@lists.denx.de Date: Tue, 22 Mar 2016 13:08:08 +0530 Message-Id: <1458632319-24866-56-git-send-email-jteki@openedev.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1458632319-24866-1-git-send-email-jteki@openedev.com> References: <1458632319-24866-1-git-send-email-jteki@openedev.com> Cc: Michal Simek , Siva Durga Prasad Paladugu , Jagan Teki Subject: [U-Boot] [PATCH v7 56/87] spi_flash: Use spi_flash_t X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Use spi_flash_t instead of struct spi_flash. Cc: Simon Glass Cc: Bin Meng Cc: Mugunthan V N Cc: Michal Simek Cc: Siva Durga Prasad Paladugu Signed-off-by: Jagan Teki --- board/Arcturus/ucp1020/cmd_arc.c | 2 +- board/Synology/ds414/cmd_syno.c | 2 +- board/buffalo/lsxl/lsxl.c | 2 +- board/congatec/cgtqmx6eval/cgtqmx6eval.c | 2 +- board/davinci/da8xxevm/da850evm.c | 2 +- board/renesas/sh7752evb/sh7752evb.c | 4 ++-- board/renesas/sh7753evb/sh7753evb.c | 4 ++-- board/renesas/sh7757lcr/sh7757lcr.c | 6 +++--- board/siemens/taurus/taurus.c | 2 +- common/splash_source.c | 2 +- drivers/dfu/dfu_sf.c | 4 ++-- drivers/net/fm/fm.c | 2 +- drivers/net/phy/cortina.c | 2 +- include/dfu.h | 2 +- 14 files changed, 19 insertions(+), 19 deletions(-) diff --git a/board/Arcturus/ucp1020/cmd_arc.c b/board/Arcturus/ucp1020/cmd_arc.c index fa6b485..9f98d6d 100644 --- a/board/Arcturus/ucp1020/cmd_arc.c +++ b/board/Arcturus/ucp1020/cmd_arc.c @@ -37,7 +37,7 @@ #define FIRM_ADDR3 (CONFIG_ENV_SECT_SIZE + 0x200 - sizeof(smac)) #define FIRM_ADDR4 (CONFIG_ENV_SECT_SIZE + 0x400 - sizeof(smac)) -static struct spi_flash *flash; +static spi_flash_t *flash; char smac[4][18]; static int ishwaddr(char *hwaddr) diff --git a/board/Synology/ds414/cmd_syno.c b/board/Synology/ds414/cmd_syno.c index 20544e2..1d0f3e7 100644 --- a/board/Synology/ds414/cmd_syno.c +++ b/board/Synology/ds414/cmd_syno.c @@ -27,7 +27,7 @@ static int do_syno_populate(int argc, char * const argv[]) unsigned int cs = CONFIG_SF_DEFAULT_CS; unsigned int speed = CONFIG_SF_DEFAULT_SPEED; unsigned int mode = CONFIG_SF_DEFAULT_MODE; - struct spi_flash *flash; + spi_flash_t *flash; unsigned long addr = 0x80000; /* XXX: parameterize this? */ loff_t offset = 0x007d0000; loff_t len = 0x00010000; diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c index 0f37345..298d26e 100644 --- a/board/buffalo/lsxl/lsxl.c +++ b/board/buffalo/lsxl/lsxl.c @@ -211,7 +211,7 @@ void check_enetaddr(void) static void erase_environment(void) { - struct spi_flash *flash; + spi_flash_t *flash; printf("Erasing environment..\n"); flash = spi_flash_probe(0, 0, 1000000, SPI_MODE_3); diff --git a/board/congatec/cgtqmx6eval/cgtqmx6eval.c b/board/congatec/cgtqmx6eval/cgtqmx6eval.c index 225de7c..8db2b9e 100644 --- a/board/congatec/cgtqmx6eval/cgtqmx6eval.c +++ b/board/congatec/cgtqmx6eval/cgtqmx6eval.c @@ -1005,7 +1005,7 @@ static void conv_ascii(unsigned char *dst, unsigned char *src, int len) #define CFG_MFG_ADDR_OFFSET (spi->size - SZ_16K) static bool is_2gb(void) { - struct spi_flash *spi; + spi_flash_t *spi; int ret; char buf[sizeof(struct mfgdata)]; struct mfgdata *data = (struct mfgdata *)buf; diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c index b82385a..356d3ce 100644 --- a/board/davinci/da8xxevm/da850evm.c +++ b/board/davinci/da8xxevm/da850evm.c @@ -49,7 +49,7 @@ DECLARE_GLOBAL_DATA_PTR; #ifdef CONFIG_MAC_ADDR_IN_SPIFLASH static int get_mac_addr(u8 *addr) { - struct spi_flash *flash; + spi_flash_t *flash; int ret; flash = spi_flash_probe(CFG_MAC_ADDR_SPI_BUS, CFG_MAC_ADDR_SPI_CS, diff --git a/board/renesas/sh7752evb/sh7752evb.c b/board/renesas/sh7752evb/sh7752evb.c index 3aad532..35360fd 100644 --- a/board/renesas/sh7752evb/sh7752evb.c +++ b/board/renesas/sh7752evb/sh7752evb.c @@ -185,7 +185,7 @@ int board_mmc_init(bd_t *bis) static int get_sh_eth_mac_raw(unsigned char *buf, int size) { - struct spi_flash *spi; + spi_flash_t *spi; int ret; spi = spi_flash_probe(0, 0, 1000000, SPI_MODE_3); @@ -254,7 +254,7 @@ int do_write_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int i, ret; char mac_string[256]; - struct spi_flash *spi; + spi_flash_t *spi; unsigned char *buf; if (argc != 3) { diff --git a/board/renesas/sh7753evb/sh7753evb.c b/board/renesas/sh7753evb/sh7753evb.c index 52a1906..8d609ec 100644 --- a/board/renesas/sh7753evb/sh7753evb.c +++ b/board/renesas/sh7753evb/sh7753evb.c @@ -201,7 +201,7 @@ int board_mmc_init(bd_t *bis) static int get_sh_eth_mac_raw(unsigned char *buf, int size) { - struct spi_flash *spi; + spi_flash_t *spi; int ret; spi = spi_flash_probe(0, 0, 1000000, SPI_MODE_3); @@ -270,7 +270,7 @@ int do_write_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int i, ret; char mac_string[256]; - struct spi_flash *spi; + spi_flash_t *spi; unsigned char *buf; if (argc != 3) { diff --git a/board/renesas/sh7757lcr/sh7757lcr.c b/board/renesas/sh7757lcr/sh7757lcr.c index ddcf275..9793f1f 100644 --- a/board/renesas/sh7757lcr/sh7757lcr.c +++ b/board/renesas/sh7757lcr/sh7757lcr.c @@ -30,7 +30,7 @@ static void init_gctrl(void) static int init_pcie_bridge_from_spi(void *buf, size_t size) { - struct spi_flash *spi; + spi_flash_t *spi; int ret; unsigned long pcie_addr; @@ -256,7 +256,7 @@ int board_mmc_init(bd_t *bis) static int get_sh_eth_mac_raw(unsigned char *buf, int size) { - struct spi_flash *spi; + spi_flash_t *spi; int ret; spi = spi_flash_probe(0, 0, 1000000, SPI_MODE_3); @@ -381,7 +381,7 @@ int do_write_mac(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int i, ret; char mac_string[256]; - struct spi_flash *spi; + spi_flash_t *spi; unsigned char *buf; if (argc != 5) { diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c index b0385d8..14907c8 100644 --- a/board/siemens/taurus/taurus.c +++ b/board/siemens/taurus/taurus.c @@ -121,7 +121,7 @@ void spl_board_init(void) /* check for recovery mode */ if (at91_is_recovery() == 1) { - struct spi_flash *flash; + spi_flash_t *flash; puts("Recovery button pressed\n"); nand_init(); diff --git a/common/splash_source.c b/common/splash_source.c index a09dd4b..3393f73 100644 --- a/common/splash_source.c +++ b/common/splash_source.c @@ -20,7 +20,7 @@ DECLARE_GLOBAL_DATA_PTR; #ifdef CONFIG_SPI_FLASH -static struct spi_flash *sf; +static spi_flash_t *sf; static int splash_sf_read_raw(u32 bmp_load_addr, int offset, size_t read_size) { if (!sf) { diff --git a/drivers/dfu/dfu_sf.c b/drivers/dfu/dfu_sf.c index 13e7f92..48eb546 100644 --- a/drivers/dfu/dfu_sf.c +++ b/drivers/dfu/dfu_sf.c @@ -63,14 +63,14 @@ static void dfu_free_entity_sf(struct dfu_entity *dfu) spi_flash_free(dfu->data.sf.dev); } -static struct spi_flash *parse_dev(char *devstr) +static spi_flash_t *parse_dev(char *devstr) { unsigned int bus; unsigned int cs; unsigned int speed = CONFIG_SF_DEFAULT_SPEED; unsigned int mode = CONFIG_SF_DEFAULT_MODE; char *s, *endp; - struct spi_flash *dev; + spi_flash_t *dev; s = strsep(&devstr, ":"); if (!s || !*s || (bus = simple_strtoul(s, &endp, 0), *endp)) { diff --git a/drivers/net/fm/fm.c b/drivers/net/fm/fm.c index e2a8ed3..9647ec1 100644 --- a/drivers/net/fm/fm.c +++ b/drivers/net/fm/fm.c @@ -367,7 +367,7 @@ int fm_init_common(int index, struct ccsr_fman *reg) CONFIG_SYS_FMAN_FW_ADDR, rc); } #elif defined(CONFIG_SYS_QE_FW_IN_SPIFLASH) - struct spi_flash *ucode_flash; + spi_flash_t *ucode_flash; void *addr = malloc(CONFIG_SYS_QE_FMAN_FW_LENGTH); int ret = 0; diff --git a/drivers/net/phy/cortina.c b/drivers/net/phy/cortina.c index f975fd8..f7961a4 100644 --- a/drivers/net/phy/cortina.c +++ b/drivers/net/phy/cortina.c @@ -147,7 +147,7 @@ void cs4340_upload_firmware(struct phy_device *phydev) } #elif defined(CONFIG_SYS_CORTINA_FW_IN_SPIFLASH) int ret; - struct spi_flash *ucode_flash; + spi_flash_t *ucode_flash; addr = malloc(CONFIG_CORTINA_FW_LENGTH); ucode_flash = spi_flash_probe(CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS, diff --git a/include/dfu.h b/include/dfu.h index f39d3f1..28d263d 100644 --- a/include/dfu.h +++ b/include/dfu.h @@ -73,7 +73,7 @@ struct ram_internal_data { }; struct sf_internal_data { - struct spi_flash *dev; + spi_flash_t *dev; /* RAW programming */ u64 start;