[edk2] [platforms: PATCH 3/6] Marvell/Drivers: MvSpiFlash: Remove duplicated macros

Marcin Wojtas posted 6 patches 7 years, 1 month ago
There is a newer version of this series
[edk2] [platforms: PATCH 3/6] Marvell/Drivers: MvSpiFlash: Remove duplicated macros
Posted by Marcin Wojtas 7 years, 1 month ago
Flash commands macros are already defined locally, so
remove them from the protocol header.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
 Platform/Marvell/Include/Protocol/SpiFlash.h | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/Platform/Marvell/Include/Protocol/SpiFlash.h b/Platform/Marvell/Include/Protocol/SpiFlash.h
index 4a3053e..4ba29ba 100644
--- a/Platform/Marvell/Include/Protocol/SpiFlash.h
+++ b/Platform/Marvell/Include/Protocol/SpiFlash.h
@@ -36,17 +36,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include <Protocol/Spi.h>
 
-#define CMD_READ_ID                     0x9f
-#define READ_STATUS_REG_CMD             0x0b
-#define CMD_WRITE_ENABLE                0x06
-#define CMD_FLAG_STATUS                 0x70
-#define CMD_WRITE_STATUS_REG            0x01
-#define CMD_READ_ARRAY_FAST             0x0b
-#define CMD_PAGE_PROGRAM                0x02
-#define CMD_BANK_WRITE                  0xc5
-#define CMD_ERASE_64K                   0xd8
-#define CMD_4B_ADDR_ENABLE              0xb7
-
 extern EFI_GUID gMarvellSpiFlashProtocolGuid;
 
 typedef struct _MARVELL_SPI_FLASH_PROTOCOL MARVELL_SPI_FLASH_PROTOCOL;
-- 
2.7.4

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [platforms: PATCH 3/6] Marvell/Drivers: MvSpiFlash: Remove duplicated macros
Posted by Leif Lindholm 7 years, 1 month ago
On Tue, Oct 31, 2017 at 04:59:32AM +0100, Marcin Wojtas wrote:
> Flash commands macros are already defined locally, so
> remove them from the protocol header.

Locally?
I have no issue with the patch, but the commit message can be a bit
more descriptive.

/
    Leif

> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Marcin Wojtas <mw@semihalf.com>
> ---
>  Platform/Marvell/Include/Protocol/SpiFlash.h | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/Platform/Marvell/Include/Protocol/SpiFlash.h b/Platform/Marvell/Include/Protocol/SpiFlash.h
> index 4a3053e..4ba29ba 100644
> --- a/Platform/Marvell/Include/Protocol/SpiFlash.h
> +++ b/Platform/Marvell/Include/Protocol/SpiFlash.h
> @@ -36,17 +36,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>  
>  #include <Protocol/Spi.h>
>  
> -#define CMD_READ_ID                     0x9f
> -#define READ_STATUS_REG_CMD             0x0b
> -#define CMD_WRITE_ENABLE                0x06
> -#define CMD_FLAG_STATUS                 0x70
> -#define CMD_WRITE_STATUS_REG            0x01
> -#define CMD_READ_ARRAY_FAST             0x0b
> -#define CMD_PAGE_PROGRAM                0x02
> -#define CMD_BANK_WRITE                  0xc5
> -#define CMD_ERASE_64K                   0xd8
> -#define CMD_4B_ADDR_ENABLE              0xb7
> -
>  extern EFI_GUID gMarvellSpiFlashProtocolGuid;
>  
>  typedef struct _MARVELL_SPI_FLASH_PROTOCOL MARVELL_SPI_FLASH_PROTOCOL;
> -- 
> 2.7.4
> 
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [platforms: PATCH 3/6] Marvell/Drivers: MvSpiFlash: Remove duplicated macros
Posted by Marcin Wojtas 7 years, 1 month ago
2017-11-01 4:27 GMT+01:00 Leif Lindholm <leif.lindholm@linaro.org>:
> On Tue, Oct 31, 2017 at 04:59:32AM +0100, Marcin Wojtas wrote:
>> Flash commands macros are already defined locally, so
>> remove them from the protocol header.
>
> Locally?
> I have no issue with the patch, but the commit message can be a bit
> more descriptive.
>

In a local header. I'll improve the message.

Marcin

> /
>     Leif
>
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Marcin Wojtas <mw@semihalf.com>
>> ---
>>  Platform/Marvell/Include/Protocol/SpiFlash.h | 11 -----------
>>  1 file changed, 11 deletions(-)
>>
>> diff --git a/Platform/Marvell/Include/Protocol/SpiFlash.h b/Platform/Marvell/Include/Protocol/SpiFlash.h
>> index 4a3053e..4ba29ba 100644
>> --- a/Platform/Marvell/Include/Protocol/SpiFlash.h
>> +++ b/Platform/Marvell/Include/Protocol/SpiFlash.h
>> @@ -36,17 +36,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>>
>>  #include <Protocol/Spi.h>
>>
>> -#define CMD_READ_ID                     0x9f
>> -#define READ_STATUS_REG_CMD             0x0b
>> -#define CMD_WRITE_ENABLE                0x06
>> -#define CMD_FLAG_STATUS                 0x70
>> -#define CMD_WRITE_STATUS_REG            0x01
>> -#define CMD_READ_ARRAY_FAST             0x0b
>> -#define CMD_PAGE_PROGRAM                0x02
>> -#define CMD_BANK_WRITE                  0xc5
>> -#define CMD_ERASE_64K                   0xd8
>> -#define CMD_4B_ADDR_ENABLE              0xb7
>> -
>>  extern EFI_GUID gMarvellSpiFlashProtocolGuid;
>>
>>  typedef struct _MARVELL_SPI_FLASH_PROTOCOL MARVELL_SPI_FLASH_PROTOCOL;
>> --
>> 2.7.4
>>
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel