Add bf52x and bf53x bus drivers.

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1749 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Jie Zhang 15 years ago
parent d6c5dd3a29
commit 4c667fa679

@ -1,3 +1,18 @@
2010-02-01 Michael Hennerich <michael.hennerich@analog.com>
Jie Zhang <jie.zhang@analog.com>
* src/bus/bf537_stamp.c (bus_params_t): Add aoe.
(AOE): Define.
(bf537_stamp_bus_new): Deal with ADDR[n], DATA[n] and AOE_B.
(bf537_stamp_bus_read_start): Assert AOE.
(bf537_stamp_bus_read_end): Deassert AOE.
(bf538f_ezkit_bus, bf526_ezkit_bus): Modify descriptions.
(urj_bus_bf52x_bus, urj_bus_bf53x_bus): Define.
* src/bus/buses.c (bus_drivers[]): Add urj_bus_bf52x_bus and
urj_bus_bf53x_bus.
* src/bus/buses_list.h: Add bf52x and bf53x.
* configure.ac: Add bf52x and bf53x bus drivers.
2010-01-29 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Unify duplicate driver logic into one macro which also allows

@ -524,11 +524,13 @@ URJ_DRIVER_SET([bus], [
bcm1250
bf526_ezkit
bf527_ezkit
bf52x
bf533_stamp
bf533_ezkit
bf537_stamp
bf537_ezkit
bf538f_ezkit
bf53x
bf548_ezkit
bf561_ezkit
bscoach

@ -45,6 +45,7 @@ typedef struct
urj_part_signal_t *abe[2];
urj_part_signal_t *awe;
urj_part_signal_t *are;
urj_part_signal_t *aoe;
urj_part_signal_t *sras;
urj_part_signal_t *scas;
urj_part_signal_t *sms;
@ -56,6 +57,7 @@ typedef struct
#define DATA ((bus_params_t *) bus->params)->data
#define AWE ((bus_params_t *) bus->params)->awe
#define ARE ((bus_params_t *) bus->params)->are
#define AOE ((bus_params_t *) bus->params)->aoe
#define ABE ((bus_params_t *) bus->params)->abe
#define SRAS ((bus_params_t *) bus->params)->sras
#define SCAS ((bus_params_t *) bus->params)->scas
@ -90,19 +92,29 @@ bf537_stamp_bus_new (urj_chain_t *chain, const urj_bus_driver_t *driver,
for (i = 0; i < 19; i++)
{
sprintf (buff, "ADDR%d", i + 1);
failed |= urj_bus_generic_attach_sig (part, &(ADDR[i]), buff);
if (urj_bus_generic_attach_sig (part, &(ADDR[i]), buff))
{
sprintf (buff, "ADDR[%d]", i + 1); /* BF533/2/1 uses ADDR[x] instead of ADDRx */
failed |= urj_bus_generic_attach_sig (part, &(ADDR[i]), buff);
}
}
for (i = 0; i < 16; i++)
{
sprintf (buff, "DATA%d", i);
failed |= urj_bus_generic_attach_sig (part, &(DATA[i]), buff);
if (urj_bus_generic_attach_sig (part, &(DATA[i]), buff))
{
sprintf (buff, "DATA[%d]", i); /* BF533/2/1 uses DATA[x] instead of DATAx */
failed |= urj_bus_generic_attach_sig (part, &(DATA[i]), buff);
}
}
failed |= urj_bus_generic_attach_sig (part, &(AWE), "AWE_B");
failed |= urj_bus_generic_attach_sig (part, &(ARE), "ARE_B");
failed |= urj_bus_generic_attach_sig (part, &(AOE), "AOE_B");
failed |= urj_bus_generic_attach_sig (part, &(ABE[0]), "ABE_B0");
failed |= urj_bus_generic_attach_sig (part, &(ABE[1]), "ABE_B1");
@ -219,6 +231,7 @@ bf537_stamp_bus_read_start (urj_bus_t *bus, uint32_t adr)
urj_chain_t *chain = bus->chain;
select_flash (bus);
urj_part_set_signal (p, AOE, 1, 0);
urj_part_set_signal (p, ARE, 1, 0);
urj_part_set_signal (p, AWE, 1, 1);
@ -264,6 +277,7 @@ bf537_stamp_bus_read_end (urj_bus_t *bus)
uint32_t d = 0;
unselect_flash (bus);
urj_part_set_signal (p, AOE, 1, 1);
urj_part_set_signal (p, ARE, 1, 1);
urj_part_set_signal (p, AWE, 1, 1);
@ -362,7 +376,7 @@ const urj_bus_driver_t urj_bus_bf527_ezkit_bus = {
const urj_bus_driver_t urj_bus_bf538f_ezkit_bus = {
"bf538f_ezkit",
N_("Blackfin BF538F EZ-KIT board bus driver"),
N_("Blackfin BF538F EZ-KIT board bus driver via BSR"),
BF537_STAMP_BUS_FUNCTIONS
};
@ -372,8 +386,28 @@ const urj_bus_driver_t urj_bus_bf538f_ezkit_bus = {
const urj_bus_driver_t urj_bus_bf526_ezkit_bus = {
"bf526_ezkit",
N_("Blackfin BF526 EZ-KIT board bus driver"),
N_("Blackfin BF526 EZ-KIT board bus driver via BSR"),
BF537_STAMP_BUS_FUNCTIONS
};
#endif /* #ifdef ENABLE_BUS_BF526_EZKIT */
#ifdef ENABLE_BUS_BF52X
const urj_bus_driver_t urj_bus_bf52x_bus = {
"bf52x",
N_("Generic Blackfin BF52x bus driver via BSR"),
BF537_STAMP_BUS_FUNCTIONS
};
#endif /* #ifdef ENABLE_BUS_BF52X */
#ifdef ENABLE_BUS_BF53X
const urj_bus_driver_t urj_bus_bf53x_bus = {
"bf53x",
N_("Generic Blackfin BF53x bus driver via BSR"),
BF537_STAMP_BUS_FUNCTIONS
};
#endif /* #ifdef ENABLE_BUS_BF53X */

@ -45,6 +45,9 @@ _URJ_BUS(bf526_ezkit)
#ifdef ENABLE_BUS_BF527_EZKIT
_URJ_BUS(bf527_ezkit)
#endif
#ifdef ENABLE_BUS_BF52X
_URJ_BUS(bf52x)
#endif
#ifdef ENABLE_BUS_BF533_EZKIT
_URJ_BUS(bf533_ezkit)
#endif
@ -60,6 +63,9 @@ _URJ_BUS(bf537_stamp)
#ifdef ENABLE_BUS_BF538F_EZKIT
_URJ_BUS(bf538f_ezkit)
#endif
#ifdef ENABLE_BUS_BF53X
_URJ_BUS(bf53x)
#endif
#ifdef ENABLE_BUS_BF548_EZKIT
_URJ_BUS(bf548_ezkit)
#endif

Loading…
Cancel
Save