Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FPGA Configuration Space
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
FPGA Configuration Space
Commits
f0b2e659
Commit
f0b2e659
authored
Nov 06, 2011
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simulation: use pr_info not printk(KERN_INFO)
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
a9e5b86a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
19 deletions
+19
-19
fake_wb_bus.c
simulation/fake_wb_bus.c
+5
-5
fakeadc.c
simulation/fakeadc.c
+2
-2
fakedac.c
simulation/fakedac.c
+2
-2
wishbone.c
simulation/wishbone.c
+10
-10
No files found.
simulation/fake_wb_bus.c
View file @
f0b2e659
...
...
@@ -63,20 +63,20 @@ static int fake_wbbus_probe(struct device *dev)
*/
sprintf
(
fwname
,
"fakespec-%08x-%04x"
,
spec_vendor
,
spec_device
);
if
(
request_firmware
(
&
wb_fw
,
fwname
,
dev
))
{
pr
intk
(
KERN_ERR
KBUILD_MODNAME
": failed to load "
pr
_err
(
KBUILD_MODNAME
": failed to load "
"firmware
\"
%s
\"\n
"
,
fwname
);
return
-
1
;
}
header
=
(
struct
sdwb_head
*
)
&
wb_fw
->
data
[
header_addr
];
if
(
header
->
magic
!=
SDWB_HEAD_MAGIC
)
{
pr
intk
(
KERN_ERR
KBUILD_MODNAME
": invalid sdwb header at %p "
pr
_err
(
KBUILD_MODNAME
": invalid sdwb header at %p "
"(magic %llx)
\n
"
,
header
,
header
->
magic
);
goto
head_fail
;
}
id
=
(
struct
sdwb_wbid
*
)
&
wb_fw
->
data
[
header
->
wbid_address
];
pr
intk
(
KERN_INFO
KBUILD_MODNAME
": found sdwb bistream: 0x%llx
\n
"
,
pr
_info
(
KBUILD_MODNAME
": found sdwb bistream: 0x%llx
\n
"
,
id
->
bstream_type
);
wbd
=
(
struct
sdwb_wbd
*
)
&
wb_fw
->
data
[
header
->
wbd_address
];
...
...
@@ -93,7 +93,7 @@ static int fake_wbbus_probe(struct device *dev)
mutex_unlock
(
&
list_lock
);
wbd
++
;
}
pr
intk
(
KERN_INFO
KBUILD_MODNAME
": found %d wishbone devices
\n
"
,
ndev
);
pr
_info
(
KBUILD_MODNAME
": found %d wishbone devices
\n
"
,
ndev
);
return
0
;
register_fail:
...
...
@@ -134,7 +134,7 @@ static struct device fake_wbbus_device = {
static
int
__init
fake_wb_bus_init
(
void
)
{
if
(
device_register
(
&
fake_wbbus_device
)
<
0
)
{
pr
intk
(
KERN_ERR
KBUILD_MODNAME
"failed to register fake"
pr
_err
(
KBUILD_MODNAME
"failed to register fake"
"Wishbone bus
\n
"
);
return
-
1
;
}
...
...
simulation/fakeadc.c
View file @
f0b2e659
...
...
@@ -32,13 +32,13 @@ static struct wb_device_id fakeadc_ids[] = {
static
int
fakeadc_probe
(
struct
wb_device
*
dev
)
{
pr
intk
(
KERN_INFO
KBUILD_MODNAME
": %s
\n
"
,
__func__
);
pr
_info
(
KBUILD_MODNAME
": %s
\n
"
,
__func__
);
return
0
;
}
static
int
fakeadc_remove
(
struct
wb_device
*
dev
)
{
pr
intk
(
KERN_INFO
KBUILD_MODNAME
": %s
\n
"
,
__func__
);
pr
_info
(
KBUILD_MODNAME
": %s
\n
"
,
__func__
);
return
0
;
}
...
...
simulation/fakedac.c
View file @
f0b2e659
...
...
@@ -32,13 +32,13 @@ static struct wb_device_id fakedac_ids[] = {
static
int
fakedac_probe
(
struct
wb_device
*
dev
)
{
pr
intk
(
KERN_INFO
KBUILD_MODNAME
": %s
\n
"
,
__func__
);
pr
_info
(
KBUILD_MODNAME
": %s
\n
"
,
__func__
);
return
0
;
}
static
int
fakedac_remove
(
struct
wb_device
*
dev
)
{
pr
intk
(
KERN_INFO
KBUILD_MODNAME
": %s
\n
"
,
__func__
);
pr
_info
(
KBUILD_MODNAME
": %s
\n
"
,
__func__
);
return
0
;
}
...
...
simulation/wishbone.c
View file @
f0b2e659
...
...
@@ -126,7 +126,7 @@ static void wb_dev_release(struct device *dev)
wb_dev
=
to_wb_device
(
dev
);
pr
intk
(
KERN_DEBUG
KBUILD_MODNAME
": release %016llx:%08lx
\n
"
,
pr
_info
(
KBUILD_MODNAME
": release %016llx:%08lx
\n
"
,
wb_dev
->
wbd
.
vendor
,
(
unsigned
long
)
wb_dev
->
wbd
.
device
);
}
...
...
@@ -139,7 +139,7 @@ int wb_register_device(struct wb_device *wbdev)
int
devno
;
if
(
!
wbdev
||
!
wbdev
->
bus
)
{
pr
intk
(
KERN_ERR
KBUILD_MODNAME
": bus not set
\n
"
);
pr
_err
(
KBUILD_MODNAME
": bus not set
\n
"
);
return
-
EFAULT
;
}
...
...
@@ -207,7 +207,7 @@ int wb_register_bus(struct wb_bus *bus)
return
-
ENODEV
;
if
(
!
bus
->
ops
)
{
pr
intk
(
KERN_ERR
KBUILD_MODNAME
": no wb_ops specified
\n
"
);
pr
_err
(
KBUILD_MODNAME
": no wb_ops specified
\n
"
);
return
-
EFAULT
;
}
...
...
@@ -215,7 +215,7 @@ int wb_register_bus(struct wb_bus *bus)
!
bus
->
ops
->
read64
||
!
bus
->
ops
->
write8
||
!
bus
->
ops
->
write16
||
!
bus
->
ops
->
write32
||
!
bus
->
ops
->
write64
||
!
bus
->
ops
->
memcpy_from_wb
||
!
bus
->
ops
->
memcpy_to_wb
)
{
pr
intk
(
KERN_ERR
KBUILD_MODNAME
": all ops are required
\n
"
);
pr
_err
(
KBUILD_MODNAME
": all ops are required
\n
"
);
return
-
EFAULT
;
}
...
...
@@ -229,13 +229,13 @@ int wb_register_bus(struct wb_bus *bus)
ret
=
memcpy_from_wb
(
bus
,
bus
->
sdwb_header_base
,
sizeof
(
struct
sdwb_head
),
(
uint8_t
*
)
&
head
);
if
(
ret
<
0
)
{
pr
intk
(
KERN_ERR
KBUILD_MODNAME
": SDWB header read failed
\n
"
);
pr
_err
(
KBUILD_MODNAME
": SDWB header read failed
\n
"
);
return
ret
;
}
/* verify our header using the magic field */
if
(
head
.
magic
!=
SDWB_HEAD_MAGIC
)
{
pr
intk
(
KERN_ERR
KBUILD_MODNAME
": invalid sdwb header at %llx "
pr
_err
(
KBUILD_MODNAME
": invalid sdwb header at %llx "
"(magic %llx)
\n
"
,
bus
->
sdwb_header_base
,
head
.
magic
);
return
-
EFAULT
;
}
...
...
@@ -243,17 +243,17 @@ int wb_register_bus(struct wb_bus *bus)
ret
=
memcpy_from_wb
(
bus
,
head
.
wbid_address
,
sizeof
(
struct
sdwb_wbid
),
(
uint8_t
*
)
&
wbid
);
if
(
ret
<
0
)
{
pr
intk
(
KERN_ERR
KBUILD_MODNAME
": SDWB ID read failed
\n
"
);
pr
_err
(
KBUILD_MODNAME
": SDWB ID read failed
\n
"
);
return
ret
;
}
pr
intk
(
KERN_INFO
KBUILD_MODNAME
": found sdwb bistream: 0x%llx
\n
"
,
pr
_info
(
KBUILD_MODNAME
": found sdwb bistream: 0x%llx
\n
"
,
wbid
.
bstream_type
);
ret
=
memcpy_from_wb
(
bus
,
head
.
wbd_address
,
sizeof
(
struct
sdwb_wbd
),
(
uint8_t
*
)
&
wbd
);
if
(
ret
<
0
)
{
pr
intk
(
KERN_ERR
KBUILD_MODNAME
": SDWB dev read failed
\n
"
);
pr
_err
(
KBUILD_MODNAME
": SDWB dev read failed
\n
"
);
return
ret
;
}
...
...
@@ -282,7 +282,7 @@ int wb_register_bus(struct wb_bus *bus)
goto
err_wbdev_read
;
}
pr
intk
(
KERN_INFO
KBUILD_MODNAME
pr
_info
(
KBUILD_MODNAME
": found %d wishbone devices on wishbone bus %s
\n
"
,
bus
->
ndev
,
bus
->
name
);
...
...
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