Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
8e0aedc5
Commit
8e0aedc5
authored
17 years ago
by
David Woodhouse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MTD] Use proper binary multiple prefixes in pmc551 driver
Signed-off-by:
David Woodhouse
<
dwmw2@infradead.org
>
parent
8f46c527
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
drivers/mtd/devices/pmc551.c
drivers/mtd/devices/pmc551.c
+11
-12
No files found.
drivers/mtd/devices/pmc551.c
View file @
8e0aedc5
...
...
@@ -30,8 +30,8 @@
*
* Notes:
* Due to what I assume is more buggy SROM, the 64M PMC551 I
* have available claims that all 4 of it
's DRAM banks have 64M
* of ram configured (making a grand total of 256M onboard).
* have available claims that all 4 of it
s DRAM banks have 64MiB
* of ram configured (making a grand total of 256M
iB
onboard).
* This is slightly annoying since the BAR0 size reflects the
* aperture size, not the dram size, and the V370PDC supplies no
* other method for memory size discovery. This problem is
...
...
@@ -70,7 +70,7 @@
* made the memory unusable, added a fix to code to touch up
* the DRAM some.
*
* Bugs/FIXME
'
s:
* Bugs/FIXMEs:
* * MUST fix the init function to not spin on a register
* waiting for it to set .. this does not safely handle busted
* devices that never reset the register correctly which will
...
...
@@ -562,10 +562,10 @@ static u32 fixup_pmc551(struct pci_dev *dev)
/*
* Some screen fun
*/
printk
(
KERN_DEBUG
"pmc551: %d%
c
(0x%x) of %sprefetchable memory at "
printk
(
KERN_DEBUG
"pmc551: %d%
sB
(0x%x) of %sprefetchable memory at "
"0x%llx
\n
"
,
(
size
<
1024
)
?
size
:
(
size
<
1048576
)
?
size
>>
10
:
size
>>
20
,
(
size
<
1024
)
?
'B'
:
(
size
<
1048576
)
?
'K'
:
'M'
,
size
,
(
size
<
1024
)
?
""
:
(
size
<
1048576
)
?
"Ki"
:
"Mi"
,
size
,
((
dcmd
&
(
0x1
<<
3
))
==
0
)
?
"non-"
:
""
,
(
unsigned
long
long
)
pci_resource_start
(
dev
,
0
));
...
...
@@ -656,7 +656,7 @@ static int asize = 0;
#endif
module_param
(
msize
,
int
,
0
);
MODULE_PARM_DESC
(
msize
,
"memory size in M
egabytes
[1 - 1024]"
);
MODULE_PARM_DESC
(
msize
,
"memory size in M
iB
[1 - 1024]"
);
module_param
(
asize
,
int
,
0
);
MODULE_PARM_DESC
(
asize
,
"aperture size, must be <= memsize [1-1024]"
);
...
...
@@ -799,8 +799,7 @@ static int __init init_pmc551(void)
mtd
->
owner
=
THIS_MODULE
;
if
(
add_mtd_device
(
mtd
))
{
printk
(
KERN_NOTICE
"pmc551: Failed to register new "
"device
\n
"
);
printk
(
KERN_NOTICE
"pmc551: Failed to register new device
\n
"
);
pci_iounmap
(
PCI_Device
,
priv
->
start
);
kfree
(
mtd
->
priv
);
kfree
(
mtd
);
...
...
@@ -811,13 +810,13 @@ static int __init init_pmc551(void)
pci_dev_get
(
PCI_Device
);
printk
(
KERN_NOTICE
"Registered pmc551 memory device.
\n
"
);
printk
(
KERN_NOTICE
"Mapped %dM of memory from 0x%p to 0x%p
\n
"
,
printk
(
KERN_NOTICE
"Mapped %dM
iB
of memory from 0x%p to 0x%p
\n
"
,
priv
->
asize
>>
20
,
priv
->
start
,
priv
->
start
+
priv
->
asize
);
printk
(
KERN_NOTICE
"Total memory is %d%
c
\n
"
,
printk
(
KERN_NOTICE
"Total memory is %d%
sB
\n
"
,
(
length
<
1024
)
?
length
:
(
length
<
1048576
)
?
length
>>
10
:
length
>>
20
,
(
length
<
1024
)
?
'B'
:
(
length
<
1048576
)
?
'K'
:
'M'
);
(
length
<
1024
)
?
""
:
(
length
<
1048576
)
?
"Ki"
:
"Mi"
);
priv
->
nextpmc551
=
pmc551list
;
pmc551list
=
mtd
;
found
++
;
...
...
@@ -850,7 +849,7 @@ static void __exit cleanup_pmc551(void)
pmc551list
=
priv
->
nextpmc551
;
if
(
priv
->
start
)
{
printk
(
KERN_DEBUG
"pmc551: unmapping %dM starting at "
printk
(
KERN_DEBUG
"pmc551: unmapping %dM
iB
starting at "
"0x%p
\n
"
,
priv
->
asize
>>
20
,
priv
->
start
);
pci_iounmap
(
priv
->
dev
,
priv
->
start
);
}
...
...
This diff is collapsed.
Click to expand it.
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