- Add comments.
- Renamed few macros.
- Add tabs.
Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Signed-off-by: Bo Shen <voice.shen@atmel.com>
* Licensed under the GPL-2 or later.
*/
-#ifndef _SPI_FLASH_INTERNAL_H_
-#define _SPI_FLASH_INTERNAL_H_
+#ifndef _SF_INTERNAL_H_
+#define _SF_INTERNAL_H_
#define SPI_FLASH_16MB_BOUN 0x1000000
int spi_flash_cmd_read_ops(struct spi_flash *flash, u32 offset,
size_t len, void *data);
-#endif /* _SPI_FLASH_INTERNAL_H_ */
+#endif /* _SF_INTERNAL_H_ */
return ret;
}
#endif
- remain_len = (SPI_FLASH_16MB_BOUN * (bank_sel + 1) - offset);
+ remain_len = (SPI_FLASH_16MB_BOUN * (bank_sel + 1)) - offset;
if (len < remain_len)
read_len = len;
else
* @jedec: Device jedec ID (0x[1byte_manuf_id][2byte_dev_id])
* @ext_jedec: Device ext_jedec ID
* @sector_size: Sector size of this device
- * @nr_sectors: No.of sectors on this device
+ * @nr_sectors: No.of sectors on this device
* @flags: Importent param, for flash specific behaviour
*/
struct spi_flash_params {
#endif
/*
* Note:
- * Below paired flash devices has similar spi_flash_params params.
+ * Below paired flash devices has similar spi_flash params.
* (S25FL129P_64K, S25FL128S_64K)
* (W25Q80BL, W25Q80BV)
* (W25Q16CL, W25Q16DV)
}
memset(flash, '\0', sizeof(*flash));
+ /* Assign spi data */
flash->spi = spi;
flash->name = params->name;
flash->memory_map = spi->memory_map;
/*
+ * Common SPI Interface: Controller-specific definitions
+ *
* (C) Copyright 2001
* Gerald Van Baren, Custom IDEAS, vanbaren@cideas.com.
*
#ifndef _SPI_H_
#define _SPI_H_
-/* Controller-specific definitions: */
-
/* SPI mode flags */
#define SPI_CPHA 0x01 /* clock phase */
#define SPI_CPOL 0x02 /* clock polarity */
* This calls spi_setup_slave() with the correct bus number. Call
* spi_free_slave() to free it later.
*
- * @param blob Device tree blob
- * @param node SPI peripheral node to use
- * @param cs Chip select to use
- * @param max_hz Maximum SCK rate in Hz (0 for default)
- * @param mode Clock polarity, clock phase and other parameters
+ * @param blob: Device tree blob
+ * @param node: SPI peripheral node to use
+ * @param cs: Chip select to use
+ * @param max_hz: Maximum SCK rate in Hz (0 for default)
+ * @param mode: Clock polarity, clock phase and other parameters
* @return pointer to new spi_slave structure
*/
struct spi_slave *spi_setup_slave_fdt(const void *blob, int node,