Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(591)

Unified Diff: sim/bfin/dv-bfin_ebiu_amc.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sim/bfin/devices.c ('k') | sim/bfin/dv-bfin_gpio2.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sim/bfin/dv-bfin_ebiu_amc.c
diff --git a/sim/bfin/dv-bfin_ebiu_amc.c b/sim/bfin/dv-bfin_ebiu_amc.c
index 2e372f7d8b43c2c091f839acf1f86cfa19bf041c..280cce42c80e34c5e2b7455acf6676ea5fa731d2 100644
--- a/sim/bfin/dv-bfin_ebiu_amc.c
+++ b/sim/bfin/dv-bfin_ebiu_amc.c
@@ -29,7 +29,7 @@ struct bfin_ebiu_amc
{
bu32 base;
int type;
- bu32 bank_size;
+ bu32 bank_base, bank_size;
unsigned (*io_write) (struct hw *, const void *, int, address_word,
unsigned, struct bfin_ebiu_amc *, bu32, bu32);
unsigned (*io_read) (struct hw *, void *, int, address_word, unsigned,
@@ -89,7 +89,7 @@ bfin_ebiu_amc_write_amgctl (struct hw *me, struct bfin_ebiu_amc *amc,
for (i = 0; i < 4; ++i)
{
- addr = BFIN_EBIU_AMC_BASE + i * amc->bank_size;
+ addr = amc->bank_base + i * amc->bank_size;
if (i < amben_old)
{
@@ -335,7 +335,7 @@ bfin_ebiu_amc_attach_address_callback (struct hw *me,
HW_TRACE ((me, "attach - level=%d, space=%d, addr=0x%lx, nr_bytes=%lu, client=%s",
level, space, (unsigned long) addr, (unsigned long) nr_bytes, hw_path (client)));
- if (addr + nr_bytes > 4)
+ if (addr + nr_bytes > ARRAY_SIZE (amc->slaves))
hw_abort (me, "ebiu amc attaches are done in terms of banks");
while (nr_bytes--)
@@ -401,6 +401,7 @@ bfin_ebiu_amc_finish (struct hw *me)
reg_size = sizeof (amc->bf50x) + 4;
/* Initialize the AMC. */
+ amc->bank_base = BFIN_EBIU_AMC_BASE;
amc->bank_size = 1 * 1024 * 1024;
amgctl = 0x00F3;
amc->bf50x.ambctl0 = 0x0000FFC2;
@@ -415,6 +416,7 @@ bfin_ebiu_amc_finish (struct hw *me)
reg_size = sizeof (amc->bf54x) + 4;
/* Initialize the AMC. */
+ amc->bank_base = BFIN_EBIU_AMC_BASE;
amc->bank_size = 64 * 1024 * 1024;
amgctl = 0x0002;
amc->bf54x.ambctl0 = 0xFFC2FFC2;
@@ -435,6 +437,7 @@ bfin_ebiu_amc_finish (struct hw *me)
reg_size = sizeof (amc->bf53x) + 4;
/* Initialize the AMC. */
+ amc->bank_base = BFIN_EBIU_AMC_BASE;
if (amc->type == 561)
amc->bank_size = 64 * 1024 * 1024;
else
« no previous file with comments | « sim/bfin/devices.c ('k') | sim/bfin/dv-bfin_gpio2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698