Changeset 1ec394e in mainline
- Timestamp:
- 2012-08-18T10:58:04Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f6992df
- Parents:
- 4a9704ad
- Location:
- uspace/drv/bus/isa
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/isa/i8237.c
r4a9704ad r1ec394e 321 321 * 322 322 * @return Error code. 323 * 324 */ 325 int dma_setup_channel(unsigned int channel, uint32_t pa, uint16_t size, 323 */ 324 int dma_channel_setup(unsigned int channel, uint32_t pa, uint16_t size, 326 325 uint8_t mode) 327 326 { -
uspace/drv/bus/isa/i8237.h
r4a9704ad r1ec394e 38 38 #define DRV_BUS_ISA_I8237_H 39 39 40 extern int dma_ setup_channel(unsigned int, uint32_t, uint16_t, uint8_t);40 extern int dma_channel_setup(unsigned, uint32_t, uint16_t, uint8_t); 41 41 42 42 #endif -
uspace/drv/bus/isa/isa.c
r4a9704ad r1ec394e 99 99 { 100 100 isa_fun_t *fun = ISA_FUN(fnode); 101 assert(fun != NULL);101 assert(fun); 102 102 103 103 return &fun->hw_resources; … … 108 108 /* This is an old ugly way, copied from pci driver */ 109 109 assert(fnode); 110 isa_fun_t *isa_fun = fnode->driver_data;110 isa_fun_t *isa_fun = ISA_FUN(fnode); 111 111 112 112 sysarg_t apic; … … 152 152 assert(fnode); 153 153 isa_fun_t *isa_fun = fnode->driver_data; 154 assert(isa_fun); 154 155 const hw_resource_list_t *res = &isa_fun->hw_resources; 155 156 assert(res); 156 157 157 const unsigned int ch = channel;158 158 for (size_t i = 0; i < res->count; ++i) { 159 /* Check for assigned channel */ 159 160 if (((res->resources[i].type == DMA_CHANNEL_16) && 160 (res->resources[i].res.dma_channel.dma16 == ch )) ||161 (res->resources[i].res.dma_channel.dma16 == channel)) || 161 162 ((res->resources[i].type == DMA_CHANNEL_8) && 162 (res->resources[i].res.dma_channel.dma8 == ch ))) {163 return dma_ setup_channel(channel, pa, size, mode);163 (res->resources[i].res.dma_channel.dma8 == channel))) { 164 return dma_channel_setup(channel, pa, size, mode); 164 165 } 165 166 } … … 403 404 404 405 val = skip_spaces(val); 405 int dma = strtol(val, &end, 10);406 const int dma = strtol(val, &end, 10); 406 407 407 408 if (val != end)
Note:
See TracChangeset
for help on using the changeset viewer.