Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Platform-independent core collection
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
14
Issues
14
List
Board
Labels
Milestones
Merge Requests
5
Merge Requests
5
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
Platform-independent core collection
Commits
21f2e94e
Commit
21f2e94e
authored
Jul 29, 2021
by
Federico Vaga
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hotfix/v1.1.2'
parents
96630ec6
0184795d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
26 deletions
+33
-26
CHANGELOG.rst
CHANGELOG.rst
+8
-0
htvic.c
software/htvic/drivers/htvic.c
+21
-26
i2c-ocores.c
software/i2c-ocores/drivers/i2c/busses/i2c-ocores.c
+4
-0
No files found.
CHANGELOG.rst
View file @
21f2e94e
...
@@ -9,6 +9,14 @@ Change Log
...
@@ -9,6 +9,14 @@ Change Log
- Format inspired by: `Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`_
- Format inspired by: `Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`_
- Versioning scheme follows: `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_
- Versioning scheme follows: `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_
1.1.2 - 2021-07-29
==================
https://www.ohwr.org/project/general-cores/tags/v1.1.2
Fixed
-----
- sw: improve compatibility with newer (> 3.10) Linux kernel versions
1.1.1 - 2020-09-14
1.1.1 - 2020-09-14
==================
==================
https://www.ohwr.org/project/general-cores/tags/v1.1.1
https://www.ohwr.org/project/general-cores/tags/v1.1.1
...
...
software/htvic/drivers/htvic.c
View file @
21f2e94e
...
@@ -269,29 +269,6 @@ static struct irq_chip htvic_chip = {
...
@@ -269,29 +269,6 @@ static struct irq_chip htvic_chip = {
.
irq_set_type
=
htvic_irq_set_type
,
.
irq_set_type
=
htvic_irq_set_type
,
};
};
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
static
int
htvic_irq_domain_select
(
struct
irq_domain
*
d
,
struct
irq_fwspec
*
fwspec
,
enum
irq_domain_bus_token
bus_token
)
{
struct
htvic_device
*
htvic
=
d
->
host_data
;
/*
* FIXME this should point to htvic->pdev->dev.parent. Today it is not
* a problem for CERN-like installations, so we leave it like this
* so that the WR-stating kit works.
*/
struct
device
*
dev
=
&
htvic
->
pdev
->
dev
;
struct
device
*
req_dev
;
if
(
fwspec
->
param_count
!=
2
)
return
0
;
req_dev
=
(
struct
device
*
)
((((
unsigned
long
)
fwspec
->
param
[
0
])
<<
32
)
|
(((
unsigned
long
)
fwspec
->
param
[
1
])
&
0xFFFFFFFF
));
return
(
dev
==
req_dev
);
}
#endif
/**
/**
* Given the hardware IRQ and the Linux IRQ number (virtirq), configure the
* Given the hardware IRQ and the Linux IRQ number (virtirq), configure the
* Linux IRQ number in order to handle properly the incoming interrupts
* Linux IRQ number in order to handle properly the incoming interrupts
...
@@ -321,9 +298,6 @@ static int htvic_irq_domain_map(struct irq_domain *h,
...
@@ -321,9 +298,6 @@ static int htvic_irq_domain_map(struct irq_domain *h,
static
struct
irq_domain_ops
htvic_irq_domain_ops
=
{
static
struct
irq_domain_ops
htvic_irq_domain_ops
=
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
.
select
=
htvic_irq_domain_select
,
#endif
.
map
=
htvic_irq_domain_map
,
.
map
=
htvic_irq_domain_map
,
};
};
...
@@ -335,11 +309,26 @@ static int htvic_irq_mapping(struct htvic_device *htvic)
...
@@ -335,11 +309,26 @@ static int htvic_irq_mapping(struct htvic_device *htvic)
{
{
int
i
,
irq
;
int
i
,
irq
;
#if KERNEL_VERSION(4, 4, 0) <= LINUX_VERSION_CODE
htvic
->
pdev
->
dev
.
fwnode
=
irq_domain_alloc_fwnode
(
NULL
);
if
(
!
htvic
->
pdev
->
dev
.
fwnode
)
{
dev_err
(
&
htvic
->
pdev
->
dev
,
"Could not allocate fwnode"
);
return
-
ENOMEM
;
}
htvic
->
domain
=
irq_domain_create_linear
(
htvic
->
pdev
->
dev
.
fwnode
,
VIC_MAX_VECTORS
,
&
htvic_irq_domain_ops
,
htvic
);
if
(
!
htvic
->
domain
)
{
irq_domain_free_fwnode
(
htvic
->
pdev
->
dev
.
fwnode
);
return
-
ENOMEM
;
}
#else
htvic
->
domain
=
irq_domain_add_linear
((
void
*
)
&
htvic
->
pdev
->
dev
,
htvic
->
domain
=
irq_domain_add_linear
((
void
*
)
&
htvic
->
pdev
->
dev
,
VIC_MAX_VECTORS
,
VIC_MAX_VECTORS
,
&
htvic_irq_domain_ops
,
htvic
);
&
htvic_irq_domain_ops
,
htvic
);
if
(
!
htvic
->
domain
)
if
(
!
htvic
->
domain
)
return
-
ENOMEM
;
return
-
ENOMEM
;
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
htvic
->
domain
->
name
=
kasprintf
(
GFP_KERNEL
,
"%s"
,
htvic
->
domain
->
name
=
kasprintf
(
GFP_KERNEL
,
"%s"
,
dev_name
(
&
htvic
->
pdev
->
dev
));
dev_name
(
&
htvic
->
pdev
->
dev
));
...
@@ -362,6 +351,9 @@ static int htvic_irq_mapping(struct htvic_device *htvic)
...
@@ -362,6 +351,9 @@ static int htvic_irq_mapping(struct htvic_device *htvic)
out:
out:
irq_domain_remove
(
htvic
->
domain
);
irq_domain_remove
(
htvic
->
domain
);
#if KERNEL_VERSION(4, 4, 0) <= LINUX_VERSION_CODE
irq_domain_free_fwnode
(
htvic
->
pdev
->
dev
.
fwnode
);
#endif
return
-
EPERM
;
return
-
EPERM
;
}
}
...
@@ -613,6 +605,9 @@ static int htvic_remove(struct platform_device *pdev)
...
@@ -613,6 +605,9 @@ static int htvic_remove(struct platform_device *pdev)
* Clear the memory and restore flags when needed
* Clear the memory and restore flags when needed
*/
*/
irq_domain_remove
(
htvic
->
domain
);
irq_domain_remove
(
htvic
->
domain
);
#if KERNEL_VERSION(4, 4, 0) <= LINUX_VERSION_CODE
irq_domain_free_fwnode
(
htvic
->
pdev
->
dev
.
fwnode
);
#endif
kfree
(
htvic
);
kfree
(
htvic
);
dev_set_drvdata
(
&
pdev
->
dev
,
NULL
);
dev_set_drvdata
(
&
pdev
->
dev
,
NULL
);
...
...
software/i2c-ocores/drivers/i2c/busses/i2c-ocores.c
View file @
21f2e94e
...
@@ -982,7 +982,11 @@ static int ocores_i2c_probe(struct platform_device *pdev)
...
@@ -982,7 +982,11 @@ static int ocores_i2c_probe(struct platform_device *pdev)
/* add in known devices to the bus */
/* add in known devices to the bus */
if
(
pdata
)
{
if
(
pdata
)
{
for
(
i
=
0
;
i
<
pdata
->
num_devices
;
i
++
)
for
(
i
=
0
;
i
<
pdata
->
num_devices
;
i
++
)
#if KERNEL_VERSION(5, 2, 0) <= LINUX_VERSION_CODE
i2c_new_client_device
(
&
i2c
->
adap
,
pdata
->
devices
+
i
);
#else
i2c_new_device
(
&
i2c
->
adap
,
pdata
->
devices
+
i
);
i2c_new_device
(
&
i2c
->
adap
,
pdata
->
devices
+
i
);
#endif
}
}
return
0
;
return
0
;
...
...
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