From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Tue, 23 Sep 2014 22:08:21 +0200 Subject: [U-Boot] [WIP PATCH 1/4 v2] spi: Add Cadence QSPI driver used by SoCFPGA In-Reply-To: <20140923200558.GA14099@amd> References: <1411481312-9929-1-git-send-email-sr@denx.de> <1411481312-9929-2-git-send-email-sr@denx.de> <20140923200558.GA14099@amd> Message-ID: <201409232208.22094.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tuesday, September 23, 2014 at 10:05:58 PM, Pavel Machek wrote: > Hi! > > > +++ b/drivers/spi/cadence_qspi.c > > @@ -0,0 +1,355 @@ > > +/* > > + * Copyright (C) 2012 > > + * Altera Corporation > > + * > > + * See file CREDITS for list of people who contributed to this > > + * project. > > + * > > + * This program is free software; you can redistribute it and/or modify > > + * it under the terms of the GNU General Public License as published by > > + * the Free Software Foundation; either version 2 of the License, or > > + * (at your option) any later version. > > + * > > + * This program is distributed in the hope that it will be useful, > > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > > + * GNU General Public License for more details. > > + * > > + * You should have received a copy of the GNU General Public License > > + * along with this program; if not, write to the Free Software > > + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, > > + * MA 02111-1307 USA > > + */ > > SPDX headers? > > > +#define CQSPI_WRITEL writel > > +#define CQSPI_READL readl > > It would be nice to get rid of these. > > > +/* Write to SRAM FIFO with polling SRAM fill level. */ > > +static int qpsi_write_sram_fifo_push(const void *reg_base, void > > *dest_addr, + const void *src_addr, unsigned int num_bytes) > > +{ > > + unsigned int retry = CQSPI_REG_RETRY; > > + unsigned int sram_level; > > + unsigned int wr_bytes; > > + unsigned char* src = (unsigned char *)src_addr; > > "char *src", afaict. uint8_t ... Best regards, Marek Vasut