Changeset 301032a in mainline


Ignore:
Timestamp:
2013-08-16T14:08:03Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
537620a8
Parents:
c762ad5
Message:

isa, dma: Fix 64KB dma buffers

Location:
uspace
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/isa/i8237.c

    rc762ad5 r301032a  
    340340 * @return Error code.
    341341 */
    342 int dma_channel_setup(unsigned int channel, uint32_t pa, uint16_t size,
     342int dma_channel_setup(unsigned int channel, uint32_t pa, uint32_t size,
    343343    uint8_t mode)
    344344{
  • uspace/drv/bus/isa/i8237.h

    rc762ad5 r301032a  
    3838#define DRV_BUS_ISA_I8237_H
    3939
    40 extern int dma_channel_setup(unsigned, uint32_t, uint16_t, uint8_t);
     40extern int dma_channel_setup(unsigned, uint32_t, uint32_t, uint8_t);
    4141extern int dma_channel_remain(unsigned, size_t *);
    4242
  • uspace/drv/bus/isa/isa.c

    rc762ad5 r301032a  
    154154
    155155static int isa_fun_setup_dma(ddf_fun_t *fnode,
    156     unsigned int channel, uint32_t pa, uint16_t size, uint8_t mode)
     156    unsigned int channel, uint32_t pa, uint32_t size, uint8_t mode)
    157157{
    158158        assert(fnode);
  • uspace/lib/c/generic/device/hw_res.c

    rc762ad5 r301032a  
    102102 */
    103103int hw_res_dma_channel_setup(async_sess_t *sess,
    104     unsigned channel, uint32_t pa, uint16_t size, uint8_t mode)
     104    unsigned channel, uint32_t pa, uint32_t size, uint8_t mode)
    105105{
    106106        async_exch_t *exch = async_exchange_begin(sess);
    107107        if (exch == NULL)
    108108                return ENOMEM;
    109         const uint32_t packed = size | (mode << 16);
     109        const uint32_t packed = (channel & 0xffff) | (mode << 16);
    110110        const int ret = async_req_4_0(exch, DEV_IFACE_ID(HW_RES_DEV_IFACE),
    111             HW_RES_DMA_CHANNEL_SETUP, channel, pa, packed);
     111            HW_RES_DMA_CHANNEL_SETUP, packed, pa, size);
    112112        async_exchange_end(exch);
    113113
  • uspace/lib/c/include/device/hw_res.h

    rc762ad5 r301032a  
    116116
    117117extern int hw_res_dma_channel_setup(async_sess_t *, unsigned int, uint32_t,
    118     uint16_t, uint8_t);
     118    uint32_t, uint8_t);
    119119extern int hw_res_dma_channel_remain(async_sess_t *, unsigned);
    120120
  • uspace/lib/drv/generic/remote_hw_res.c

    rc762ad5 r301032a  
    110110                return;
    111111        }
    112         const unsigned channel = DEV_IPC_GET_ARG1(*call);
     112        const unsigned channel = DEV_IPC_GET_ARG1(*call) & 0xffff;
     113        const uint8_t  mode = DEV_IPC_GET_ARG1(*call) >> 16;
    113114        const uint32_t address = DEV_IPC_GET_ARG2(*call);
    114         const uint16_t size = DEV_IPC_GET_ARG3(*call) & 0xffff;
    115         const uint8_t mode = DEV_IPC_GET_ARG3(*call) >> 16;
     115        const uint32_t size = DEV_IPC_GET_ARG3(*call);
    116116
    117117        const int ret = hw_res_ops->dma_channel_setup(
  • uspace/lib/drv/include/ops/hw_res.h

    rc762ad5 r301032a  
    4444        hw_resource_list_t *(*get_resource_list)(ddf_fun_t *);
    4545        bool (*enable_interrupt)(ddf_fun_t *);
    46         int (*dma_channel_setup)(ddf_fun_t *, unsigned, uint32_t, uint16_t, uint8_t);
     46        int (*dma_channel_setup)(ddf_fun_t *, unsigned, uint32_t, uint32_t, uint8_t);
    4747        int (*dma_channel_remain)(ddf_fun_t *, unsigned, size_t *);
    4848} hw_res_ops_t;
Note: See TracChangeset for help on using the changeset viewer.