Revision 3d08ff69 hw/mainstone.c
b/hw/mainstone.c | ||
---|---|---|
79 | 79 |
qemu_irq *mst_irq; |
80 | 80 |
DriveInfo *dinfo; |
81 | 81 |
int i; |
82 |
int be; |
|
82 | 83 |
|
83 | 84 |
if (!cpu_model) |
84 | 85 |
cpu_model = "pxa270-c5"; |
... | ... | |
91 | 92 |
/* Setup initial (reset) machine state */ |
92 | 93 |
cpu->env->regs[15] = mainstone_binfo.loader_start; |
93 | 94 |
|
95 |
#ifdef TARGET_WORDS_BIGENDIAN |
|
96 |
be = 1; |
|
97 |
#else |
|
98 |
be = 0; |
|
99 |
#endif |
|
94 | 100 |
/* There are two 32MiB flash devices on the board */ |
95 | 101 |
for (i = 0; i < 2; i ++) { |
96 | 102 |
dinfo = drive_get(IF_PFLASH, 0, i); |
... | ... | |
101 | 107 |
} |
102 | 108 |
|
103 | 109 |
if (!pflash_cfi01_register(mainstone_flash_base[i], |
104 |
qemu_ram_alloc(MAINSTONE_FLASH), |
|
105 |
dinfo->bdrv, sector_len, |
|
106 |
MAINSTONE_FLASH / sector_len, 4, 0, 0, 0, 0)) { |
|
110 |
qemu_ram_alloc(MAINSTONE_FLASH), |
|
111 |
dinfo->bdrv, sector_len, |
|
112 |
MAINSTONE_FLASH / sector_len, 4, 0, 0, 0, 0, |
|
113 |
be)) { |
|
107 | 114 |
fprintf(stderr, "qemu: Error registering flash memory.\n"); |
108 | 115 |
exit(1); |
109 | 116 |
} |
Also available in: Unified diff