public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jagan Teki <jteki@openedev.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot PATCH v2 08/17] spi/sf: Minor cleanups
Date: Sun, 10 May 2015 20:45:48 +0530	[thread overview]
Message-ID: <1431270957-6901-9-git-send-email-jteki@openedev.com> (raw)
In-Reply-To: <1431270957-6901-1-git-send-email-jteki@openedev.com>

- Adjust tab spaces
- Add comments

Signed-off-by: Jagan Teki <jteki@openedev.com>
---
 drivers/mtd/spi/sf_internal.h | 18 +++++++++---------
 include/spi.h                 |  2 +-
 include/spi_flash.h           | 10 ++++++----
 3 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h
index 4158e13..98436dc 100644
--- a/drivers/mtd/spi/sf_internal.h
+++ b/drivers/mtd/spi/sf_internal.h
@@ -31,9 +31,9 @@ enum spi_read_cmds {
 };
 
 /* Normal - Extended - Full command set */
-#define RD_NORM	(ARRAY_SLOW | ARRAY_FAST)
-#define RD_EXTN	(RD_NORM | DUAL_OUTPUT_FAST | DUAL_IO_FAST)
-#define RD_FULL	(RD_EXTN | QUAD_OUTPUT_FAST | QUAD_IO_FAST)
+#define RD_NORM		(ARRAY_SLOW | ARRAY_FAST)
+#define RD_EXTN		(RD_NORM | DUAL_OUTPUT_FAST | DUAL_IO_FAST)
+#define RD_FULL		(RD_EXTN | QUAD_OUTPUT_FAST | QUAD_IO_FAST)
 
 /* sf param flags */
 enum {
@@ -67,12 +67,12 @@ enum {
 #define CMD_WRITE_STATUS		0x01
 #define CMD_PAGE_PROGRAM		0x02
 #define CMD_WRITE_DISABLE		0x04
-#define CMD_READ_STATUS		0x05
+#define CMD_READ_STATUS			0x05
 #define CMD_QUAD_PAGE_PROGRAM		0x32
 #define CMD_READ_STATUS1		0x35
 #define CMD_WRITE_ENABLE		0x06
-#define CMD_READ_CONFIG		0x35
-#define CMD_FLAG_STATUS		0x70
+#define CMD_READ_CONFIG			0x35
+#define CMD_FLAG_STATUS			0x70
 
 /* Read commands */
 #define CMD_READ_ARRAY_SLOW		0x03
@@ -99,13 +99,13 @@ enum {
 
 /* Flash timeout values */
 #define SPI_FLASH_PROG_TIMEOUT		(2 * CONFIG_SYS_HZ)
-#define SPI_FLASH_PAGE_ERASE_TIMEOUT		(5 * CONFIG_SYS_HZ)
+#define SPI_FLASH_PAGE_ERASE_TIMEOUT	(5 * CONFIG_SYS_HZ)
 #define SPI_FLASH_SECTOR_ERASE_TIMEOUT	(10 * CONFIG_SYS_HZ)
 
 /* SST specific */
 #ifdef CONFIG_SPI_FLASH_SST
 # define CMD_SST_BP		0x02    /* Byte Program */
-# define CMD_SST_AAI_WP	0xAD	/* Auto Address Incr Word Program */
+# define CMD_SST_AAI_WP		0xAD	/* Auto Address Incr Word Program */
 
 int sst_write_wp(struct spi_flash *flash, u32 offset, size_t len,
 		const void *buf);
@@ -121,7 +121,7 @@ int sst_write_bp(struct spi_flash *flash, u32 offset, size_t len,
  * @ext_jedec:		Device ext_jedec ID
  * @sector_size:	Isn't necessarily a sector size from vendor,
  *			the size listed here is what works with CMD_ERASE_64K
- * @nr_sectors:	No.of sectors on this device
+ * @nr_sectors:		No.of sectors on this device
  * @e_rd_cmd:		Enum list for read commands
  * @flags:		Important param, for flash specific behaviour
  */
diff --git a/include/spi.h b/include/spi.h
index 9495ca5..ffc7162 100644
--- a/include/spi.h
+++ b/include/spi.h
@@ -54,7 +54,7 @@
 /* Header byte that marks the start of the message */
 #define SPI_PREAMBLE_END_BYTE	0xec
 
-#define SPI_DEFAULT_WORDLEN 8
+#define SPI_DEFAULT_WORDLEN	8
 
 #ifdef CONFIG_DM_SPI
 /* TODO(sjg at chromium.org): Remove this and use max_hz from struct spi_slave */
diff --git a/include/spi_flash.h b/include/spi_flash.h
index f2814ef..3b2d555 100644
--- a/include/spi_flash.h
+++ b/include/spi_flash.h
@@ -37,13 +37,15 @@ struct spi_slave;
  * struct spi_flash - SPI flash structure
  *
  * @spi:		SPI slave
+ * @dev:		SPI flash device
+ * @flags:		Indication of spi flash flags
  * @name:		Name of SPI flash
- * @dual_flash:	Indicates dual flash memories - dual stacked, parallel
+ * @dual_flash:		Indicates dual flash memories - dual stacked, parallel
  * @shift:		Flash shift useful in dual parallel
  * @size:		Total flash size
  * @page_size:		Write (page) size
  * @sector_size:	Sector size
- * @erase_size:	Erase size
+ * @erase_size:		Erase size
  * @bank_read_cmd:	Bank read cmd
  * @bank_write_cmd:	Bank write cmd
  * @bank_curr:		Current flash bank
@@ -51,8 +53,8 @@ struct spi_slave;
  * @erase_cmd:		Erase cmd 4K, 32K, 64K
  * @read_cmd:		Read cmd - Array Fast, Extn read and quad read.
  * @write_cmd:		Write cmd - page and quad program.
- * @dummy_byte:	Dummy cycles for read operation.
- * @memory_map:	Address of read-only SPI flash access
+ * @dummy_byte:		Dummy cycles for read operation.
+ * @memory_map:		Address of read-only SPI flash access
  * @read:		Flash read ops: Read len bytes at offset into buf
  *			Supported cmds: Fast Array Read
  * @write:		Flash write ops: Write len bytes from buf into offset
-- 
1.9.1

  parent reply	other threads:[~2015-05-10 15:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-10 15:15 [U-Boot] [U-Boot PATCH v2 00/17] spi/sf: Cleansup and driver model conversions Jagan Teki
2015-05-10 15:15 ` [U-Boot] [U-Boot PATCH v2 01/17] spi: Zap andes_spi driver Jagan Teki
2015-05-10 15:15 ` [U-Boot] [U-Boot PATCH v2 02/17] spi: Zap ftssp010_spi driver Jagan Teki
2015-05-10 15:15 ` [U-Boot] [U-Boot PATCH v2 03/17] spi: Zap oc_tiny_spi driver Jagan Teki
2015-05-10 15:15 ` [U-Boot] [U-Boot PATCH v2 04/17] spi: xilinx_spi: Move header code to driver Jagan Teki
2015-05-10 15:15 ` [U-Boot] [U-Boot PATCH v2 05/17] spi: xilinx_spi: Driver clean-up Jagan Teki
2015-05-10 15:15 ` [U-Boot] [U-Boot PATCH v2 06/17] spi: davinci_spi: Move header code to driver Jagan Teki
2015-05-10 15:15 ` [U-Boot] [U-Boot PATCH v2 07/17] spi: davinci_spi: Driver cleanup Jagan Teki
2015-05-10 15:15 ` Jagan Teki [this message]
2015-05-10 15:15 ` [U-Boot] [U-Boot PATCH v2 09/17] dm: spi: zynq_spi: Convert to driver model Jagan Teki
2015-05-10 15:15 ` [U-Boot] [U-Boot PATCH v2 10/17] zynq: Kconfig: Enable dm spi and spi_flash Jagan Teki
2015-05-10 15:15 ` [U-Boot] [U-Boot PATCH v2 11/17] dts: zynq: Add zynq spi controller nodes Jagan Teki
2015-05-10 15:15 ` [U-Boot] [U-Boot PATCH v2 12/17] spi: zynq_spi: Add fdt support in driver Jagan Teki
2015-05-10 15:15 ` [U-Boot] [U-Boot PATCH v2 13/17] dts: zynq: Enable spi1 for zc770_xm010 board Jagan Teki
2015-06-16 11:28   ` Jagan Teki
2015-06-16 13:34     ` Michal Simek
2015-05-10 15:15 ` [U-Boot] [U-Boot PATCH v2 14/17] dm: spi: xilinx_spi: Convert to driver model Jagan Teki
2015-05-10 15:15 ` [U-Boot] [U-Boot PATCH v2 15/17] spi: xilinx_spi: Add asm/io.h include file Jagan Teki
2015-05-10 15:15 ` [U-Boot] [U-Boot PATCH v2 16/17] spi: Kconfig: Add Zynq QSPI controller entry Jagan Teki
2015-05-10 15:15 ` [U-Boot] [U-Boot PATCH v2 17/17] spi: Kconfig: Add Zynq SPI " Jagan Teki
2015-05-12  3:57 ` [U-Boot] [U-Boot PATCH v2 00/17] spi/sf: Cleansup and driver model conversions Jagan Teki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1431270957-6901-9-git-send-email-jteki@openedev.com \
    --to=jteki@openedev.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox