FreeCalypso > hg > freecalypso-tools
comparison loadtools/flmain.c @ 325:545e1718f5fb
fc-loadtool: support for 28F640W30B flash chip with partition quirks
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 20 Jan 2018 05:20:40 +0000 |
parents | e7502631a0f9 |
children | 0dd2c87c1b63 |
comparison
equal
deleted
inserted
replaced
324:0937521ec2f4 | 325:545e1718f5fb |
---|---|
55 static struct flash_bank_desc pl129n_banks[2] = { | 55 static struct flash_bank_desc pl129n_banks[2] = { |
56 {0x800000, &pl129n_ce1_geom, pl129n_idcheck, 4}, | 56 {0x800000, &pl129n_ce1_geom, pl129n_idcheck, 4}, |
57 {0x800000, &pl129n_ce2_geom, pl129n_idcheck, 4} | 57 {0x800000, &pl129n_ce2_geom, pl129n_idcheck, 4} |
58 }; | 58 }; |
59 | 59 |
60 /* 28F640W30B device description */ | |
61 | |
62 static struct flash_geom f640w30b_geom = { | |
63 .total_size = 0x800000, | |
64 .nregions = 2, | |
65 .regions = {0x2000, 8, 0x10000, 127}, | |
66 .total_sectors = 135, | |
67 }; | |
68 | |
69 static struct flash_idcheck f640w30b_idcheck[2] = { | |
70 {0x00, 0x0089}, | |
71 {0x02, 0x8855} | |
72 }; | |
73 | |
74 static struct flash_bank_desc f640w30b_bankdesc = { | |
75 0x800000, &f640w30b_geom, f640w30b_idcheck, 2 | |
76 }; | |
77 | |
60 /* bank configurations for CFI */ | 78 /* bank configurations for CFI */ |
61 | 79 |
62 static struct flash_bank_desc cfi_4M_bankdesc = { | 80 static struct flash_bank_desc cfi_4M_bankdesc = { |
63 0x400000, 0, 0, 0 | 81 0x400000, 0, 0, 0 |
64 }; | 82 }; |
68 }; | 86 }; |
69 | 87 |
70 /* list of supported flash devices */ | 88 /* list of supported flash devices */ |
71 | 89 |
72 extern struct flash_cmdset flash_cmdset_amd; | 90 extern struct flash_cmdset flash_cmdset_amd; |
91 extern struct flash_cmdset flash_cmdset_intel_w30; | |
73 | 92 |
74 struct flash_device_desc flash_device_list[] = { | 93 struct flash_device_desc flash_device_list[] = { |
75 {"cfi-4M", &cfi_4M_bankdesc, 1, 0}, | 94 {"cfi-4M", &cfi_4M_bankdesc, 1, 0}, |
76 {"cfi-8M", &cfi_8M_bankdesc, 1, 0}, | 95 {"cfi-8M", &cfi_8M_bankdesc, 1, 0}, |
77 {"k5a32xx_t", &k5a32xx_topboot_bankdesc, 1, &flash_cmdset_amd}, | 96 {"k5a32xx_t", &k5a32xx_topboot_bankdesc, 1, &flash_cmdset_amd}, |
78 {"pl129n", pl129n_banks, 2, &flash_cmdset_amd}, | 97 {"pl129n", pl129n_banks, 2, &flash_cmdset_amd}, |
98 {"28f640w30b", &f640w30b_bankdesc, 1, &flash_cmdset_intel_w30}, | |
79 {0, 0, 0, 0} /* array terminator */ | 99 {0, 0, 0, 0} /* array terminator */ |
80 }; | 100 }; |
81 | 101 |
82 /* the following variables describe our selected flash device */ | 102 /* the following variables describe our selected flash device */ |
83 | 103 |