lkml.org 
[lkml]   [2020]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/4] lib: logic_pio: Introduce MMIO_LOWER_RESERVED
Date
That would allow platforms reserve some lower address in PIO MMIO range
to deal with legacy drivers with hardcoded I/O ports that can't be
managed by logic_pio.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
lib/logic_pio.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/logic_pio.c b/lib/logic_pio.c
index f511a99bb389..57fff1cb7063 100644
--- a/lib/logic_pio.c
+++ b/lib/logic_pio.c
@@ -20,6 +20,10 @@
static LIST_HEAD(io_range_list);
static DEFINE_MUTEX(io_range_mutex);

+#ifndef MMIO_LOWER_RESERVED
+#define MMIO_LOWER_RESERVED 0
+#endif
+
/* Consider a kernel general helper for this */
#define in_range(b, first, len) ((b) >= (first) && (b) < (first) + (len))

@@ -36,7 +40,7 @@ int logic_pio_register_range(struct logic_pio_hwaddr *new_range)
struct logic_pio_hwaddr *range;
resource_size_t start;
resource_size_t end;
- resource_size_t mmio_end = 0;
+ resource_size_t mmio_end = MMIO_LOWER_RESERVED;
resource_size_t iio_sz = MMIO_UPPER_LIMIT;
int ret = 0;

--
2.26.0.rc2
\
 
 \ /
  Last update: 2020-04-26 13:51    [W:0.070 / U:6.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site