mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-05-14 00:10:02 +08:00
i386/pc686: Fix kernel bus DMA for the PC686 BSP
The x86 provides it own bus space support. Use the generic bus space calls. This however requires the BUS_SPACE_MEM tag be provided for all architectures. Make the generic value match the x86 value.
This commit is contained in:
parent
f0fe0439c4
commit
1524f95e93
@ -167,6 +167,15 @@
|
||||
|
||||
#endif /* BSP_HAS_PC_PCI */
|
||||
|
||||
/*
|
||||
* Provide a memory tag for the DMA bus interface
|
||||
*/
|
||||
#ifdef BSP_BUS_SPACE_MEM
|
||||
#define BUS_SPACE_MEM BSP_BUS_SPACE_MEM
|
||||
#else
|
||||
#define BUS_SPACE_MEM 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Bus address alignment.
|
||||
*/
|
||||
|
@ -63,6 +63,10 @@
|
||||
#include <bsp/linker-symbols.h>
|
||||
#endif
|
||||
|
||||
#ifdef X86_BUS_SPACE_MEM
|
||||
#define BUS_SPACE_MEM X86_BUS_SPACE_MEM
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Convenience function for manipulating driver locks from busdma (during
|
||||
* busdma_swi, for example). Drivers that don't provide their own locks
|
||||
@ -261,7 +265,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
|
||||
unsigned char* mem = *vaddr;
|
||||
int len = dmat->maxsize;
|
||||
while (len-- > 0) {
|
||||
bsp_bus_space_write_1(mem, 0);
|
||||
bus_space_write_1(BUS_SPACE_MEM, mem, 0, 0);
|
||||
mem++;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user