/* * DRAM capacity from fuse (SKU), not physical probe. */ #include "dram_fuse.h" #include #include #include static int mariko_dram_mib(u32 dram_id) { switch (dram_id) { case 9: case 13: case 18: case 21: case 23: case 28: return 8192; default: if (dram_id >= 3 && dram_id <= 28) return 4096; return -1; } } static int erista_dram_mib(u32 dram_id) { if (dram_id == 4) return 6144; if (dram_id <= 6) return 4096; return -1; } int dram_capacity_mib_from_fuse(void) { u32 nid = fuse_read_dramid(false); u32 chip = hw_get_chip_id(); if (chip == GP_HIDREV_MAJOR_T210) return erista_dram_mib(nid); if (chip == GP_HIDREV_MAJOR_T210B01) return mariko_dram_mib(nid); return -1; }