2 Copyright © 2009-2014, The AROS Development Team. All rights reserved.
8 #include <aros/debug.h>
9 #include <asm/mpc5200b.h>
14 #define MAX_DMA_BUFFERS 4
15 #define MAX_DMA_TRANSFER 256*512
17 /* Buffer descriptor */
24 #define SDMA_FLAGS_NONE 0x0000
25 #define SDMA_FLAGS_ENABLE 0x0001
26 #define SDMA_FLAGS_BD2 0x0002
27 #define SDMA_BD_READY 0x40000000UL
47 volatile bestcomm_t
*bestcomm
= NULL
;
48 volatile bestcomm_tdt_t
*tdt
= NULL
;
49 uint32_t bestcomm_taskid
= 0xffffffff;
50 volatile uint32_t *bestcomm_taskcode
;
51 volatile uint32_t *bestcomm_vartable
;
52 volatile ata_bd2_t
*bd2
;
53 uint16_t idx
, odx
, num_bd
;
56 volatile ata_ivar_t
*ivar
;
57 volatile ata_inc_t
*inc
;
61 D(bug("[ATA] bestcomm_init()\n"));
63 tdt
= (bestcomm_tdt_t
*)bestcomm
->bc_taskBar
;
65 D(bug("[ATA] taskBar at %08x\n", tdt
));
67 bestcomm_taskcode
= (tdt
[bestcomm_taskid
].start
);
68 bestcomm_vartable
= (tdt
[bestcomm_taskid
].var
);
70 ivar
= (ata_ivar_t
*)bestcomm_vartable
;
71 inc
= (ata_inc_t
*)(bestcomm_vartable
+ 24);
73 D(bug("[ATA] looking on ivar at %08x:\n", ivar
));
74 D(bug("[ATA] enable=%08x bd_base=%08x bd_last=%08x bd_start=%08x buffer_size=%08x\n",
75 ivar
->enable
, ivar
->bd_base
, ivar
->bd_last
, ivar
->bd_start
, ivar
->buffer_size
));