-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
software/kernel: Update copyrights, fix compilation warning, remove u…
…nused functions and add ICAP flags.
- Loading branch information
1 parent
9255e10
commit 867c818
Showing
4 changed files
with
18 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* | ||
* This file is part of LitePCIe. | ||
* | ||
* Copyright (C) 2018-2023 / EnjoyDigital / [email protected] | ||
* Copyright (C) 2018-2024 / EnjoyDigital / [email protected] | ||
* | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,20 +4,31 @@ | |
* | ||
* This file is part of LitePCIe. | ||
* | ||
* Copyright (C) 2018-2023 / EnjoyDigital / [email protected] | ||
* Copyright (C) 2018-2024 / EnjoyDigital / [email protected] | ||
* | ||
*/ | ||
|
||
#ifndef __HW_FLAGS_H | ||
#define __HW_FLAGS_H | ||
|
||
/* spi */ | ||
/* SPI */ | ||
#define SPI_CTRL_START (1 << 0) | ||
#define SPI_CTRL_LENGTH (1 << 8) | ||
#define SPI_STATUS_DONE (1 << 0) | ||
|
||
/* pcie */ | ||
/* PCIe */ | ||
#define DMA_TABLE_LOOP_INDEX (1 << 0) | ||
#define DMA_TABLE_LOOP_COUNT (1 << 16) | ||
|
||
/* ICAP */ | ||
#define ICAP_CMD_REG 0b00100 | ||
#define ICAP_CMD_IPROG 0b01111 | ||
|
||
#define ICAP_IDCODE_REG 0b01100 | ||
|
||
#define ICAP_BOOTSTS_REG 0b10110 | ||
#define ICAP_BOOTSTS_VALID (1 << 0) | ||
#define ICAP_BOOTSTS_FALLBACK (1 << 1) | ||
|
||
|
||
#endif /* __HW_FLAGS_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* | ||
* This file is part of LitePCIe. | ||
* | ||
* Copyright (C) 2018-2023 / EnjoyDigital / [email protected] | ||
* Copyright (C) 2018-2024 / EnjoyDigital / [email protected] | ||
* | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* | ||
* This file is part of LitePCIe. | ||
* | ||
* Copyright (C) 2018-2023 / EnjoyDigital / [email protected] | ||
* Copyright (C) 2018-2024 / EnjoyDigital / [email protected] | ||
* | ||
*/ | ||
|
||
|
@@ -312,7 +312,7 @@ static void litepcie_dma_reader_stop(struct litepcie_device *s, int chan_num) | |
dmachan->reader_sw_count = 0; | ||
} | ||
|
||
void litepcie_stop_dma(struct litepcie_device *s) | ||
static void litepcie_stop_dma(struct litepcie_device *s) | ||
{ | ||
struct litepcie_dma_chan *dmachan; | ||
int i; | ||
|
@@ -965,42 +965,6 @@ static void litepcie_free_chdev(struct litepcie_device *s) | |
} | ||
} | ||
|
||
/* from stackoverflow */ | ||
void sfind(char *string, char *format, ...) | ||
{ | ||
va_list arglist; | ||
|
||
va_start(arglist, format); | ||
vsscanf(string, format, arglist); | ||
va_end(arglist); | ||
} | ||
|
||
struct revision { | ||
int yy; | ||
int mm; | ||
int dd; | ||
}; | ||
|
||
int compare_revisions(struct revision d1, struct revision d2) | ||
{ | ||
if (d1.yy < d2.yy) | ||
return -1; | ||
else if (d1.yy > d2.yy) | ||
return 1; | ||
|
||
if (d1.mm < d2.mm) | ||
return -1; | ||
else if (d1.mm > d2.mm) | ||
return 1; | ||
else if (d1.dd < d2.dd) | ||
return -1; | ||
else if (d1.dd > d2.dd) | ||
return 1; | ||
|
||
return 0; | ||
} | ||
/* from stackoverflow */ | ||
|
||
/* Function to probe the LitePCIe PCI device */ | ||
static int litepcie_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) | ||
{ | ||
|