blob: 3600c5eaa79c1db15be1f4d6de985f19cbae062c [file] [log] [blame]
// Copyright 2018 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.nand;
// Matches the value of ZBI_PARTITION_GUID_LEN.
const GUID_LEN uint32 = 16;
type Class = strict enum : 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.
/// NAND device contains an Intel flash descriptor.
INTEL_FLASH_DESCRIPTOR = 5;
};
type Info = struct {
page_size uint32; // Read/write unit size, in bytes.
pages_per_block uint32; // Erase block size, in pages.
num_blocks uint32; // Device size, in erase blocks.
ecc_bits uint32; // Number of ECC bits (correctable bit flips),
// per correction chunk.
oob_size uint32; // Available out of band bytes per page.
nand_class Class; // The device purpose.
partition_guid array<uint8, GUID_LEN>; // Partition type GUID from partition map.
};