Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc fixes #189

Merged
merged 2 commits into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/driver/axi_version.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
*/
int32_t AxiVersion_Get(struct DmaDevice *dev, void *base, uint64_t arg) {
struct AxiVersion axiVersion;
int32_t ret;
uint64_t ret;

// Read the AXI version from the device
AxiVersion_Read(dev, base, &axiVersion);
Expand Down
6 changes: 3 additions & 3 deletions common/driver/dma_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ int Dma_Init(struct DmaDevice *dev) {
dev_info(dev->device, "Init: Creating %i TX Buffers. Size=%i Bytes. Mode=%i.\n",
dev->cfgTxCount, dev->cfgSize, dev->cfgMode);
res = dmaAllocBuffers(dev, &(dev->txBuffers), dev->cfgTxCount, 0, DMA_TO_DEVICE);
tot = res * dev->cfgSize;
tot = (uint64_t)res * dev->cfgSize;

dev_info(dev->device, "Init: Created %i out of %i TX Buffers. %llu Bytes.\n", res, dev->cfgTxCount, tot);

Expand All @@ -315,7 +315,7 @@ int Dma_Init(struct DmaDevice *dev) {
dev_info(dev->device, "Init: Creating %i RX Buffers. Size=%i Bytes. Mode=%i.\n",
dev->cfgRxCount, dev->cfgSize, dev->cfgMode);
res = dmaAllocBuffers(dev, &(dev->rxBuffers), dev->cfgRxCount, dev->txBuffers.count, DMA_BIDIRECTIONAL);
tot = res * dev->cfgSize;
tot = (uint64_t)res * dev->cfgSize;

dev_info(dev->device, "Init: Created %i out of %i RX Buffers. %llu Bytes.\n", res, dev->cfgRxCount, tot);

Expand Down Expand Up @@ -1176,7 +1176,7 @@ int Dma_Mmap(struct file *filp, struct vm_area_struct *vma) {
return ret;
} else {
// Map register space
base = dev->cfgSize * (dev->rxBuffers.count + dev->txBuffers.count);
base = (off_t)dev->cfgSize * (dev->rxBuffers.count + dev->txBuffers.count);
relMap = offset - base;
physical = dev->baseAddr + relMap;

Expand Down
4 changes: 2 additions & 2 deletions data_dev/app/src/dmaRate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ static char doc[] = "";
#define STRING(N) #N
#define XSTRING(N) STRING(N)
static struct argp_option options[] = {
{"path", 'p', "PATH", OPTION_ARG_OPTIONAL, "Path of datadev device. Default=" DEF_DEV_PATH, 0},
{"count", 'c', "COUNT", OPTION_ARG_OPTIONAL, "Total iterations. Default=" XSTRING(DEF_COUNT), 0},
{"path", 'p', "PATH", 0, "Path of datadev device. Default=" DEF_DEV_PATH, 0},
{"count", 'c', "COUNT", 0, "Total iterations. Default=" XSTRING(DEF_COUNT), 0},
{0}
};

Expand Down
10 changes: 5 additions & 5 deletions data_dev/app/src/dmaWrite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ static char doc[] = "Dest is passed as an integer.";

// Options structure
static struct argp_option options[] = {
{ "path", 'p', "PATH", OPTION_ARG_OPTIONAL, "Path of datadev device to use. Default=/dev/datadev_0.", 0 },
{ "prbsdis", 'd', 0, OPTION_ARG_OPTIONAL, "Disable PRBS generation.", 0 },
{ "size", 's', "SIZE", OPTION_ARG_OPTIONAL, "Size of data to generate. Default=1000", 0 },
{ "count", 'c', "COUNT", OPTION_ARG_OPTIONAL, "Number of frames to generate. Default=1", 0 },
{ "indexen", 'i', 0, OPTION_ARG_OPTIONAL, "Use index based transmit buffers.", 0 },
{ "path", 'p', "PATH", 0, "Path of datadev device to use. Default=/dev/datadev_0.", 0 },
{ "prbsdis", 'd', 0, 0, "Disable PRBS generation.", 0 },
{ "size", 's', "SIZE", 0, "Size of data to generate. Default=1000", 0 },
{ "count", 'c', "COUNT", 0, "Number of frames to generate. Default=1", 0 },
{ "indexen", 'i', 0, 0, "Use index based transmit buffers.", 0 },
{ 0 }
};

Expand Down
2 changes: 1 addition & 1 deletion data_dev/app/src/setDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static char doc[] = "\n Debug level is either 0 or 1.";

// Option descriptions
static struct argp_option options[] = {
{ "path", 'p', "PATH", OPTION_ARG_OPTIONAL, "Path of datadev device to use. Default=/dev/datadev_0.", 0 },
{ "path", 'p', "PATH", 0, "Path of datadev device to use. Default=/dev/datadev_0.", 0 },
{ 0 }
};

Expand Down