blob: fdda3ead9c24af8a61bd8390fb605d6ff3335110 [file] [log] [blame]
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.hardware.nandinfo;
// Matches the value of ZBI_PARTITION_GUID_LEN.
const uint32 NAND_GUID_LEN = 16;
enum NandClass : uint32 {
UNKNOWN = 0; // Unknown device.
PARTMAP = 1; // NAND device contains multiple partitions.
FTL = 2; // NAND device is a FTL partition.
BBS = 3; // NAND device is a bad block skip partition.
TEST = 4; // Test device.
};
struct NandInfo {
uint32 page_size; // Read/write unit size, in bytes.
uint32 pages_per_block; // Erase block size, in pages.
uint32 num_blocks; // Device size, in erase blocks.
uint32 ecc_bits; // Number of ECC bits (correctable bit flips),
// per correction chunk.
uint32 oob_size; // Available out of band bytes per page.
NandClass nand_class; // The device purpose.
array<uint8>:NAND_GUID_LEN partition_guid; // Partition type GUID from partition map.
};