Skip to content

Commit

Permalink
flash/nor/sfdp: expose SFDP_MAGIC in sfdp.h
Browse files Browse the repository at this point in the history
Could be handy for dummy transfer size detection.

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: Ibb485218f6c2ff9066910bb58be0fc614b77add3
Reviewed-on: https://review.openocd.org/c/openocd/+/8438
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Andreas Bolsch <hyphen0break@gmail.com>
  • Loading branch information
tom-van authored and borneoa committed Sep 15, 2024
1 parent 930ec2f commit 1dc3d7e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/flash/nor/sfdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "spi.h"
#include "sfdp.h"

#define SFDP_MAGIC 0x50444653
#define SFDP_ACCESS_PROT 0xFF
#define SFDP_BASIC_FLASH 0xFF00
#define SFDP_4BYTE_ADDR 0xFF84
Expand Down
2 changes: 2 additions & 0 deletions src/flash/nor/sfdp.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#ifndef OPENOCD_FLASH_NOR_SFDP_H
#define OPENOCD_FLASH_NOR_SFDP_H

#define SFDP_MAGIC 0x50444653

/* per JESD216D 'addr' is *byte* based but must be word aligned,
* 'buffer' is word based, word aligned and always little-endian encoded,
* in the flash, 'addr_len' is 3 or 4, 'dummy' ***usually*** 8
Expand Down

0 comments on commit 1dc3d7e

Please sign in to comment.