Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Starting Kit
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
White Rabbit Starting Kit
Commits
92c84f29
Commit
92c84f29
authored
Oct 08, 2019
by
Benoit Rat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vic: update submoule and remove corresponding patches
parent
fab399bd
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
3 additions
and
160 deletions
+3
-160
coht-vic
coht-vic
+1
-1
README.md
patches/README.md
+2
-0
0001-Create-irq_domain-select-function-for-kernel-4.7.x.patch
...-Create-irq_domain-select-function-for-kernel-4.7.x.patch
+0
-51
0002-Add-irq-field-to-the-htvic_device-structure.patch
...ic/0002-Add-irq-field-to-the-htvic_device-structure.patch
+0
-55
0003-Include-pulse-emulation-mechanism-for-SPEC-board.patch
...03-Include-pulse-emulation-mechanism-for-SPEC-board.patch
+0
-28
0004-Makefile-Add-an-installation-rule.patch
...hes/coht-vic/0004-Makefile-Add-an-installation-rule.patch
+0
-25
No files found.
coht-vic
@
44bb1e7b
Subproject commit
b145eb03746396314043b4cba8e57a6d0c6fe5d7
Subproject commit
44bb1e7bafdcb82eaf3ce0c89157ba359b08d18c
patches/README.md
0 → 100644
View file @
92c84f29
Folder to places patches to apply before compiling the starting kit.
If empty calling this folder will do nothing
patches/coht-vic/0001-Create-irq_domain-select-function-for-kernel-4.7.x.patch
deleted
100644 → 0
View file @
fab399bd
From 534e6009d557a99d74c5e0fdbc09c1d1140b8b04 Mon Sep 17 00:00:00 2001
From: Miguel Jimenez Lopez <miguel.jimenez@sevensols.com>
Date: Thu, 12 Sep 2019 09:39:55 +0200
Subject: [PATCH 1/4] Create irq_domain select() function for kernel >= 4.7.x.
---
drivers/htvic.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/drivers/htvic.c b/drivers/htvic.c
index 7095354..ea971dd 100644
--- a/drivers/htvic.c
+++ b/drivers/htvic.c
@@ -272,6 +272,24 @@ static struct irq_chip htvic_chip = {
.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;
+ 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
* Linux IRQ number in order to handle properly the incoming interrupts
@@ -301,6 +319,9 @@ static int htvic_irq_domain_map(struct irq_domain *h,
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,
};
--
2.17.1
patches/coht-vic/0002-Add-irq-field-to-the-htvic_device-structure.patch
deleted
100644 → 0
View file @
fab399bd
From 09c5f7f456ad06cbb911e2c435da92db6d17991d Mon Sep 17 00:00:00 2001
From: Miguel Jimenez Lopez <miguel.jimenez@sevensols.com>
Date: Thu, 12 Sep 2019 09:41:22 +0200
Subject: [PATCH 2/4] Add irq field to the htvic_device structure.
---
drivers/htvic.c | 8 ++++----
drivers/htvic.h | 1 +
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/htvic.c b/drivers/htvic.c
index ea971dd..520d3aa 100644
--- a/drivers/htvic.c
+++ b/drivers/htvic.c
@@ -533,13 +533,13 @@ static int htvic_probe(struct platform_device *pdev)
* It depends on the platform and on the IRQ on which we are connecting
* but most likely our interrupt handler will be a thread
*/
- ret = request_any_context_irq(platform_get_irq(htvic->pdev, 0),
- htvic_handler, irq_flags,
+ htvic->irq = platform_get_irq(htvic->pdev, 0);
+ ret = request_any_context_irq(htvic->irq, htvic_handler, irq_flags,
dev_name(&pdev->dev),
htvic);
if (ret < 0) {
dev_err(&pdev->dev, "Can't request IRQ %d (%d)\n",
- platform_get_irq(htvic->pdev, 0), ret);
+ htvic->irq, ret);
goto out_req;
}
@@ -590,7 +590,7 @@ static int htvic_remove(struct platform_device *pdev)
}
- free_irq(platform_get_irq(htvic->pdev, 0), htvic);
+ free_irq(htvic->irq, htvic);
/*
* Clear the memory and restore flags when needed
diff --git a/drivers/htvic.h b/drivers/htvic.h
index 4b6a69f..3baccf2 100644
--- a/drivers/htvic.h
+++ b/drivers/htvic.h
@@ -42,6 +42,7 @@ struct htvic_device {
unsigned int hwid[VIC_MAX_VECTORS]; /**> original ID from FPGA */
struct htvic_data *data;
void __iomem *kernel_va;
+ int irq;
irq_flow_handler_t platform_handle_irq;
void *platform_handler_data;
--
2.17.1
patches/coht-vic/0003-Include-pulse-emulation-mechanism-for-SPEC-board.patch
deleted
100644 → 0
View file @
fab399bd
From ffe6098f7d967579eae214b9a1a01149a4169ca6 Mon Sep 17 00:00:00 2001
From: Miguel Jimenez Lopez <miguel.jimenez@sevensols.com>
Date: Thu, 12 Sep 2019 09:43:35 +0200
Subject: [PATCH 3/4] Include pulse emulation mechanism for SPEC board.
---
drivers/htvic.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/htvic.c b/drivers/htvic.c
index 520d3aa..a62e505 100644
--- a/drivers/htvic.c
+++ b/drivers/htvic.c
@@ -518,6 +518,11 @@ static int htvic_probe(struct platform_device *pdev)
irq_flags |= IRQF_SHARED;
switch (pdev->id_entry->driver_data) {
case HTVIC_VER_SPEC:
+ ctl |= VIC_CTL_POL;
+ ctl |= VIC_CTL_EMU_EDGE;
+ ctl |= VIC_CTL_EMU_LEN_W(250);
+ irq_flags |= IRQF_TRIGGER_HIGH;
+ break;
case HTVIC_VER_SVEC:
ctl |= VIC_CTL_POL;
irq_flags |= IRQF_TRIGGER_HIGH;
--
2.17.1
patches/coht-vic/0004-Makefile-Add-an-installation-rule.patch
deleted
100644 → 0
View file @
fab399bd
From 670756fc4c7e62442b43b745239a8a5d7cc03e8e Mon Sep 17 00:00:00 2001
From: Miguel Jimenez Lopez <miguel.jimenez@sevensols.com>
Date: Thu, 12 Sep 2019 09:46:27 +0200
Subject: [PATCH 4/4] Makefile: Add an installation rule.
---
drivers/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/Makefile b/drivers/Makefile
index fbda688..8982385 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -9,6 +9,8 @@ VERSION = $(shell git describe --always --dirty --long --tags)
all: modules
modules:
$(MAKE) -C $(LINUX) M=$(shell /bin/pwd) DRV_VERSION="$(VERSION)"
+install modules_install:
+ $(MAKE) -C $(LINUX) M=$(shell /bin/pwd) DRV_VERSION="$(VERSION)" modules_install
clean:
$(MAKE) -C $(LINUX) M=$(shell /bin/pwd) clean
--
2.17.1
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