Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
White Rabbit Switch - Software
Manage
Activity
Members
Labels
Plan
Issues
85
Issue boards
Milestones
Wiki
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
White Rabbit Switch - Software
Commits
bf28246e
Commit
bf28246e
authored
12 years ago
by
Tomasz Wlostowski
Browse files
Options
Downloads
Patches
Plain Diff
userspace/libswitchhw: removed too verbose printfs
parent
fbd13298
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
userspace/libswitchhw/i2c_sfp.c
+2
-2
2 additions, 2 deletions
userspace/libswitchhw/i2c_sfp.c
userspace/libswitchhw/pio.c
+5
-4
5 additions, 4 deletions
userspace/libswitchhw/pio.c
with
7 additions
and
6 deletions
userspace/libswitchhw/i2c_sfp.c
+
2
−
2
View file @
bf28246e
...
...
@@ -185,13 +185,13 @@ int shw_sfp_buses_init(void)
{
int
i
;
printf
(
"Initializing
i2c
buses...
\n\n
"
);
TRACE
(
TRACE_INFO
,
"Initializing
SFP I2C
bus
s
es..."
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
i2c_buses
);
i
++
)
{
if
(
i2c_init_bus
(
&
i2c_buses
[
i
])
<
0
)
{
printf
(
"init failed: %s
\n
"
,
i2c_buses
[
i
].
name
);
return
-
1
;
}
printf
(
"init: success: %s
\n
"
,
i2c_buses
[
i
].
name
);
//
printf("init: success: %s\n", i2c_buses[i].name);
}
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
userspace/libswitchhw/pio.c
+
5
−
4
View file @
bf28246e
...
...
@@ -27,8 +27,9 @@ volatile uint8_t *_sys_base;
void
pmc_enable_clock
(
int
clock
)
{
_writel
(
_sys_base
+
AT91C_BASE_PMC_RAW
-
AT91C_BASE_SYS_RAW
+
0x10
,
(
1
<<
clock
));
// fucking atmel headers
printf
(
"ClkStat: %x
\n
"
,
_readl
(
_sys_base
+
AT91C_BASE_PMC_RAW
-
AT91C_BASE_SYS_RAW
+
0x18
));
//
printf("ClkStat: %x\n", _readl(_sys_base + AT91C_BASE_PMC_RAW - AT91C_BASE_SYS_RAW + 0x18));
}
int
shw_pio_mmap_init
()
{
int
i
;
...
...
@@ -58,8 +59,8 @@ int shw_pio_mmap_init()
// fprintf(stderr,"AT91_SYS mmapped to: 0x%08x\n", _sys_base);
printf
(
"PIOA offset %08X
\n
"
,
AT91C_BASE_PIOA_RAW
-
AT91C_BASE_SYS_RAW
);
printf
(
"Sys base: %08X
\n
"
,
_sys_base
);
//
printf("PIOA offset %08X\n", AT91C_BASE_PIOA_RAW - AT91C_BASE_SYS_RAW);
//
printf("Sys base: %08X\n", _sys_base);
_pio_base
[
REG_BASE
][
PIOA
]
=
_sys_base
+
AT91C_BASE_PIOA_RAW
-
AT91C_BASE_SYS_RAW
;
//offset counting from AT91C_BASE_SYS
_pio_base
[
REG_BASE
][
PIOB
]
=
_sys_base
+
AT91C_BASE_PIOB_RAW
-
AT91C_BASE_SYS_RAW
;
//offset counting from AT91C_BASE_SYS
...
...
@@ -115,7 +116,7 @@ void shw_pio_configure(const pio_pin_t *pin)
case
PIOD
:
case
PIOE
:
printf
(
"-- configure CPU PIO PIN: P%c.%d base=0x%x
\n\n
"
,
pin
->
port
-
PIOA
+
'A'
,
pin
->
pin
,
base
);
//
printf("-- configure CPU PIO PIN: P%c.%d base=0x%x\n\n", pin->port-PIOA+'A', pin->pin, base);
_writel
(
base
+
PIO_IDR
,
mask
);
// disable irq
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment