annotate loadtools/scripts/compal.init @ 501:7a6eba04c1bb

CHANGES: target-utils poweroff VRPCAUX addition documented
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 27 May 2019 01:12:43 +0000
parents ac48ed111d6a
children b0f9d38bfd9e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
492
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
1 # Set WS=3 for both nCS0 and nCS1. This configuration is used by all official
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
2 # C11x, C139/140 and SE J100 firmwares that have been examined, i.e., by the
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
3 # official firmwares for all Compal models to which this init script applies.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 w16 fffffb00 00A3
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 w16 fffffb02 00A3
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7
492
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
8 # On most targets we use the alternate nCS0 mapping at 0x03000000 to access
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
9 # the full flash bank even though the boot ROM is mapped at 0, overlapping
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
10 # the first 8 KiB of flash. However, the Calypso chip (all versions we work
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
11 # with) has a little design bug in this part of the silicon: the alternate
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
12 # nCS0 mapping at 0x03000000 works only when the debug visibility bit in the
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
13 # API-RHEA control register (bit 6 in the FFFF:FB0E register) is set, and
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
14 # does not work otherwise. This bit is initially set as the Calypso comes
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
15 # out of reset, and on most platforms we gain loadtool access via the boot ROM,
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
16 # hence the problem does not occur - but on these Compal targets we gain
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
17 # loadtool access either through Compal's bootloader or via tfc139, and in
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
18 # both cases Compal's fw (either the full fw or the bootloader part) has
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
19 # already set the register in question to the runtime operational value of
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
20 # 0x2A (unchanged from TI's TCS211 reference fw), with the debug visibility
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
21 # bit cleared, hence the 0x03000000 flash mapping no longer works.
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
22 #
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
23 # We could write into the FFFF:FB0E register here, restore the Calypso power-up
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
24 # state and use the 0x03000000 mapping like on other platforms, but the problem
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
25 # of the mapping not working as expected was first encountered in 2014 when we
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
26 # started working on Compal targets, whereas the root cause described above was
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
27 # only discovered in 2019. For now we are keeping the original workaround from
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
28 # 2014: we set the FFFF:FB10 register to map the flash (not the boot ROM)
ac48ed111d6a loadtools/scripts/compal.init: updated comments for new understanding
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
29 # to address 0, and use that "main" mapping instead of the alternate one.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 w16 fffffb10 0300