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
nexedi
linux
Commits
3b0be1a4
Commit
3b0be1a4
authored
Feb 05, 2010
by
Paul Mundt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sh: Fix an off-by-1 in SH7780 PCIC memory resource mapping.
Signed-off-by:
Paul Mundt
<
lethal@linux-sh.org
>
parent
8e042210
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
arch/sh/drivers/pci/pci-sh7780.c
arch/sh/drivers/pci/pci-sh7780.c
+5
-5
No files found.
arch/sh/drivers/pci/pci-sh7780.c
View file @
3b0be1a4
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
static
struct
resource
sh7785_pci_resources
[]
=
{
static
struct
resource
sh7785_pci_resources
[]
=
{
{
{
.
name
=
"
SH7785_
IO"
,
.
name
=
"
PCI
IO"
,
.
start
=
0x1000
,
.
start
=
0x1000
,
.
end
=
SZ_4M
-
1
,
.
end
=
SZ_4M
-
1
,
.
flags
=
IORESOURCE_IO
,
.
flags
=
IORESOURCE_IO
,
...
@@ -338,8 +338,8 @@ static int __init sh7780_pci_init(void)
...
@@ -338,8 +338,8 @@ static int __init sh7780_pci_init(void)
/*
/*
* Setup the memory BARs
* Setup the memory BARs
*/
*/
for
(
i
=
0
;
i
<
chan
->
nr_resources
;
i
++
)
{
for
(
i
=
1
;
i
<
chan
->
nr_resources
;
i
++
)
{
struct
resource
*
res
=
chan
->
resources
+
(
i
+
1
)
;
struct
resource
*
res
=
chan
->
resources
+
i
;
resource_size_t
size
;
resource_size_t
size
;
if
(
unlikely
(
res
->
flags
&
IORESOURCE_IO
))
if
(
unlikely
(
res
->
flags
&
IORESOURCE_IO
))
...
@@ -361,8 +361,8 @@ static int __init sh7780_pci_init(void)
...
@@ -361,8 +361,8 @@ static int __init sh7780_pci_init(void)
* keeps things pretty simple.
* keeps things pretty simple.
*/
*/
__raw_writel
(((
roundup_pow_of_two
(
size
)
/
SZ_256K
)
-
1
)
<<
18
,
__raw_writel
(((
roundup_pow_of_two
(
size
)
/
SZ_256K
)
-
1
)
<<
18
,
chan
->
reg_base
+
SH7780_PCIMBMR
(
i
));
chan
->
reg_base
+
SH7780_PCIMBMR
(
i
-
1
));
__raw_writel
(
res
->
start
,
chan
->
reg_base
+
SH7780_PCIMBR
(
i
));
__raw_writel
(
res
->
start
,
chan
->
reg_base
+
SH7780_PCIMBR
(
i
-
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