Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
ad6b01f2
Commit
ad6b01f2
authored
Apr 06, 2004
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] Add ecard_(request|release)_resources().
parent
44569f92
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
1 deletion
+43
-1
arch/arm/kernel/ecard.c
arch/arm/kernel/ecard.c
+36
-0
include/asm-arm/ecard.h
include/asm-arm/ecard.h
+7
-1
No files found.
arch/arm/kernel/ecard.c
View file @
ad6b01f2
...
@@ -908,6 +908,42 @@ static ssize_t ecard_show_device(struct device *dev, char *buf)
...
@@ -908,6 +908,42 @@ static ssize_t ecard_show_device(struct device *dev, char *buf)
static
DEVICE_ATTR
(
device
,
S_IRUGO
,
ecard_show_device
,
NULL
);
static
DEVICE_ATTR
(
device
,
S_IRUGO
,
ecard_show_device
,
NULL
);
int
ecard_request_resources
(
struct
expansion_card
*
ec
)
{
int
i
,
err
=
0
;
for
(
i
=
0
;
i
<
ECARD_NUM_RESOURCES
;
i
++
)
{
if
(
ecard_resource_end
(
ec
,
i
)
&&
!
request_mem_region
(
ecard_resource_start
(
ec
,
i
),
ecard_resource_len
(
ec
,
i
),
ec
->
dev
.
driver
->
name
))
{
err
=
-
EBUSY
;
break
;
}
}
if
(
err
)
{
while
(
i
--
)
if
(
ecard_resource_end
(
ec
,
i
))
release_mem_region
(
ecard_resource_start
(
ec
,
i
),
ecard_resource_len
(
ec
,
i
));
}
return
err
;
}
EXPORT_SYMBOL
(
ecard_request_resources
);
void
ecard_release_resources
(
struct
expansion_card
*
ec
)
{
int
i
;
for
(
i
=
0
;
i
<
ECARD_NUM_RESOURCES
;
i
++
)
if
(
ecard_resource_end
(
ec
,
i
))
release_mem_region
(
ecard_resource_start
(
ec
,
i
),
ecard_resource_len
(
ec
,
i
));
}
EXPORT_SYMBOL
(
ecard_release_resources
);
/*
/*
* Probe for an expansion card.
* Probe for an expansion card.
*
*
...
...
include/asm-arm/ecard.h
View file @
ad6b01f2
...
@@ -208,7 +208,13 @@ extern int ecard_readchunk (struct in_chunk_dir *cd, struct expansion_card *ec,
...
@@ -208,7 +208,13 @@ extern int ecard_readchunk (struct in_chunk_dir *cd, struct expansion_card *ec,
/*
/*
* Obtain the address of a card
* Obtain the address of a card
*/
*/
extern
unsigned
int
ecard_address
(
struct
expansion_card
*
ec
,
card_type_t
card_type
,
card_speed_t
speed
);
extern
__deprecated
unsigned
int
ecard_address
(
struct
expansion_card
*
ec
,
card_type_t
card_type
,
card_speed_t
speed
);
/*
* Request and release ecard resources
*/
extern
int
ecard_request_resources
(
struct
expansion_card
*
ec
);
extern
void
ecard_release_resources
(
struct
expansion_card
*
ec
);
#ifdef ECARD_C
#ifdef ECARD_C
/* Definitions internal to ecard.c - for it's use only!!
/* Definitions internal to ecard.c - for it's use only!!
...
...
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