blob: 2dcd4af8d3ae942f94af9367349a751cd5504311 [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 uint32 GUID_LEN = 16;
enum Class : 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 Info {
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.
Class nand_class; // The device purpose.
array<uint8>:GUID_LEN partition_guid; // Partition type GUID from partition map.
};