Skip to content

Commit

Permalink
nfit, tools/testing/nvdimm: add format interface code definitions
Browse files Browse the repository at this point in the history
ACPI 6.1 and JEDEC Annex L Release 3 formalize the format interface
code.  Add definitions and update their usage in the unit test.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
  • Loading branch information
Dan Williams committed Mar 5, 2016
1 parent 6e2452d commit be26f9a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions drivers/acpi/nfit.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ enum nfit_uuids {
NFIT_UUID_MAX,
};

enum nfit_fic {
NFIT_FIC_BYTE = 0x101, /* byte-addressable energy backed */
NFIT_FIC_BLK = 0x201, /* block-addressable non-energy backed */
NFIT_FIC_BYTEN = 0x301, /* byte-addressable non-energy backed */
};

enum {
ND_BLK_READ_FLUSH = 1,
ND_BLK_DCR_LATCH = 2,
Expand Down
7 changes: 6 additions & 1 deletion tools/testing/nvdimm/test/nfit.c
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,7 @@ static void nfit_test0_setup(struct nfit_test *t)
dcr->device_id = 0;
dcr->revision_id = 1;
dcr->serial_number = ~handle[0];
dcr->code = NFIT_FIC_BLK;
dcr->windows = 1;
dcr->window_size = DCR_SIZE;
dcr->command_offset = 0;
Expand All @@ -839,6 +840,7 @@ static void nfit_test0_setup(struct nfit_test *t)
dcr->device_id = 0;
dcr->revision_id = 1;
dcr->serial_number = ~handle[1];
dcr->code = NFIT_FIC_BLK;
dcr->windows = 1;
dcr->window_size = DCR_SIZE;
dcr->command_offset = 0;
Expand All @@ -855,6 +857,7 @@ static void nfit_test0_setup(struct nfit_test *t)
dcr->device_id = 0;
dcr->revision_id = 1;
dcr->serial_number = ~handle[2];
dcr->code = NFIT_FIC_BLK;
dcr->windows = 1;
dcr->window_size = DCR_SIZE;
dcr->command_offset = 0;
Expand All @@ -871,6 +874,7 @@ static void nfit_test0_setup(struct nfit_test *t)
dcr->device_id = 0;
dcr->revision_id = 1;
dcr->serial_number = ~handle[3];
dcr->code = NFIT_FIC_BLK;
dcr->windows = 1;
dcr->window_size = DCR_SIZE;
dcr->command_offset = 0;
Expand Down Expand Up @@ -967,6 +971,7 @@ static void nfit_test0_setup(struct nfit_test *t)
dcr->device_id = 0;
dcr->revision_id = 1;
dcr->serial_number = ~handle[4];
dcr->code = NFIT_FIC_BLK;
dcr->windows = 1;
dcr->window_size = DCR_SIZE;
dcr->command_offset = 0;
Expand Down Expand Up @@ -1136,7 +1141,7 @@ static void nfit_test1_setup(struct nfit_test *t)
dcr->device_id = 0;
dcr->revision_id = 1;
dcr->serial_number = ~0;
dcr->code = 0x201;
dcr->code = NFIT_FIC_BYTE;
dcr->windows = 0;
dcr->window_size = 0;
dcr->command_offset = 0;
Expand Down

0 comments on commit be26f9a

Please sign in to comment.