Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DIO 5ch TTL a
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
6
Issues
6
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FMC DIO 5ch TTL a
Commits
821f8f8a
Commit
821f8f8a
authored
May 05, 2020
by
Jorge Machado
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for new version in fmc-dio.c/.h
parent
78d28cda
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
fmc-dio.c
sw/kernel/fmc-dio.c
+20
-2
fmc-dio.h
sw/kernel/fmc-dio.h
+4
-0
No files found.
sw/kernel/fmc-dio.c
View file @
821f8f8a
...
...
@@ -55,7 +55,7 @@ static int fmc_dio_resource_map(struct fmc_dio *dio)
{
int
i
,
err
;
struct
platform_device
*
dev
=
dio
->
pdev
;
struct
fmc_device
*
fmc
=
dio
->
fmc
;
//
struct fmc_device *fmc = dio->fmc;
struct
resource
*
r
;
void
__iomem
*
mem
;
...
...
@@ -145,6 +145,8 @@ static int fmc_dio_pl_probe(struct platform_device *dev)
int
ret
=
0
;
unsigned
int
devfn
;
unsigned
char
busn
;
printk
(
"Starting fmc_dio_pl_probe"
);
dio
=
last_dio
;
if
(
!
dio
)
{
...
...
@@ -170,7 +172,19 @@ static int fmc_dio_pl_probe(struct platform_device *dev)
// Specific board info
dio
->
board
=
dev
->
id_entry
->
driver_data
;
dio
->
pdev
=
dev
;
dio
->
version
=
dio
->
board
;
if
(
dio
->
version
==
FMC_DIO_BOARD_SPEC
)
{
printk
(
"DIO driver. Detected DIO V1"
);
}
else
if
(
dio
->
version
==
FMC_DIOv2_BOARD_SPEC
)
{
printk
(
"DIO driver. Detected DIO V2"
);
}
else
{
printk
(
"DIO driver. DIO not detected"
);
}
/* Map the resources for the FMC DIO */
ret
=
fmc_dio_resource_map
(
dio
);
if
(
ret
)
...
...
@@ -239,6 +253,10 @@ static const struct platform_device_id fmc_dio_id_table[] = {
.
name
=
"fmc-dio-spec"
,
.
driver_data
=
FMC_DIO_BOARD_SPEC
,
},
{
/* SPEC compatible */
.
name
=
"fmc-diov2-spec"
,
.
driver_data
=
FMC_DIOv2_BOARD_SPEC
,
},
{},
};
...
...
sw/kernel/fmc-dio.h
View file @
821f8f8a
...
...
@@ -52,6 +52,7 @@ struct fmc_dio_gpio_block {
/* Board constants */
#define FMC_DIO_BOARD_SPEC 0
#define FMC_DIOv2_BOARD_SPEC 1
/**
* @brief FMC DIO structure
...
...
@@ -74,6 +75,8 @@ struct fmc_dio {
int
board
;
/**< Board info */
int
version
;
//*< HDL version */
void
*
priv
;
/**< Private data for FMC DIO */
};
...
...
@@ -104,6 +107,7 @@ enum wr_dio_cmd_name {
WR_DIO_CMD_STAMP
,
WR_DIO_CMD_DAC
,
WR_DIO_CMD_INOUT
,
WR_DIO_CMD_IRQ
,
};
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment