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
85bc40be
Commit
85bc40be
authored
May 14, 2020
by
Jorge Machado
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapt kernel sources to the new structure
parent
a3efe86e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
229 additions
and
104 deletions
+229
-104
Kbuild
sw/kernel/Kbuild
+4
-1
fmc-dio-internal.c
sw/kernel/fmc-dio-internal.c
+203
-101
fmc-dio.c
sw/kernel/fmc-dio.c
+18
-2
fmc-dio.h
sw/kernel/fmc-dio.h
+4
-0
No files found.
sw/kernel/Kbuild
View file @
85bc40be
...
@@ -20,7 +20,10 @@ ccflags-y += -DGIT_VERSION=\"$(GIT_VERSION)\"
...
@@ -20,7 +20,10 @@ ccflags-y += -DGIT_VERSION=\"$(GIT_VERSION)\"
obj-m += wr-dio.o
obj-m += wr-dio.o
wr-dio-y = fmc-dio.o
wr-dio-y = ./hw/wr-dio-regs.o
wr-dio-y += ./hw/wr-dio-regs_v1.o
wr-dio-y += ./hw/wr-dio-regs_v2.o
wr-dio-y += fmc-dio.o
wr-dio-y += fmc-dio-internal.o
wr-dio-y += fmc-dio-internal.o
wr-dio-y += fmc-dio-mdev.o
wr-dio-y += fmc-dio-mdev.o
wr-dio-y += fmc-dio-gpio.o
wr-dio-y += fmc-dio-gpio.o
\ No newline at end of file
sw/kernel/fmc-dio-internal.c
View file @
85bc40be
This diff is collapsed.
Click to expand it.
sw/kernel/fmc-dio.c
View file @
85bc40be
...
@@ -55,7 +55,7 @@ static int fmc_dio_resource_map(struct fmc_dio *dio)
...
@@ -55,7 +55,7 @@ static int fmc_dio_resource_map(struct fmc_dio *dio)
{
{
int
i
,
err
;
int
i
,
err
;
struct
platform_device
*
dev
=
dio
->
pdev
;
struct
platform_device
*
dev
=
dio
->
pdev
;
struct
fmc_device
*
fmc
=
dio
->
fmc
;
//
struct fmc_device *fmc = dio->fmc;
struct
resource
*
r
;
struct
resource
*
r
;
void
__iomem
*
mem
;
void
__iomem
*
mem
;
...
@@ -170,7 +170,19 @@ static int fmc_dio_pl_probe(struct platform_device *dev)
...
@@ -170,7 +170,19 @@ static int fmc_dio_pl_probe(struct platform_device *dev)
// Specific board info
// Specific board info
dio
->
board
=
dev
->
id_entry
->
driver_data
;
dio
->
board
=
dev
->
id_entry
->
driver_data
;
dio
->
pdev
=
dev
;
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 */
/* Map the resources for the FMC DIO */
ret
=
fmc_dio_resource_map
(
dio
);
ret
=
fmc_dio_resource_map
(
dio
);
if
(
ret
)
if
(
ret
)
...
@@ -239,6 +251,10 @@ static const struct platform_device_id fmc_dio_id_table[] = {
...
@@ -239,6 +251,10 @@ static const struct platform_device_id fmc_dio_id_table[] = {
.
name
=
"fmc-dio-spec"
,
.
name
=
"fmc-dio-spec"
,
.
driver_data
=
FMC_DIO_BOARD_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 @
85bc40be
...
@@ -52,6 +52,7 @@ struct fmc_dio_gpio_block {
...
@@ -52,6 +52,7 @@ struct fmc_dio_gpio_block {
/* Board constants */
/* Board constants */
#define FMC_DIO_BOARD_SPEC 0
#define FMC_DIO_BOARD_SPEC 0
#define FMC_DIOv2_BOARD_SPEC 1
/**
/**
* @brief FMC DIO structure
* @brief FMC DIO structure
...
@@ -74,6 +75,8 @@ struct fmc_dio {
...
@@ -74,6 +75,8 @@ struct fmc_dio {
int
board
;
/**< Board info */
int
board
;
/**< Board info */
int
version
;
//*< HDL version */
void
*
priv
;
/**< Private data for FMC DIO */
void
*
priv
;
/**< Private data for FMC DIO */
};
};
...
@@ -104,6 +107,7 @@ enum wr_dio_cmd_name {
...
@@ -104,6 +107,7 @@ enum wr_dio_cmd_name {
WR_DIO_CMD_STAMP
,
WR_DIO_CMD_STAMP
,
WR_DIO_CMD_DAC
,
WR_DIO_CMD_DAC
,
WR_DIO_CMD_INOUT
,
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