Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openwrt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Show more breadcrumbs
Freifunk Luebeck
openwrt
Commits
0b1fdf1a
Commit
0b1fdf1a
authored
17 years ago
by
Gabor Juhos
Browse files
Options
Downloads
Patches
Plain Diff
fix hardware byte swapping to work in little endian mode as well
SVN-Revision: 7712
parent
2e3c3918
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
target/linux/adm5120-2.6/files/arch/mips/adm5120/adm5120_info.c
+2
-2
2 additions, 2 deletions
.../linux/adm5120-2.6/files/arch/mips/adm5120/adm5120_info.c
target/linux/adm5120-2.6/patches/008-adm5120_hardware_swab.patch
+1
-1
1 addition, 1 deletion
...linux/adm5120-2.6/patches/008-adm5120_hardware_swab.patch
with
3 additions
and
3 deletions
target/linux/adm5120-2.6/files/arch/mips/adm5120/adm5120_info.c
+
2
−
2
View file @
0b1fdf1a
...
...
@@ -904,12 +904,12 @@ void __init adm5120_swab_test(void)
u32
t1
,
t2
;
t1
=
0x1234
;
t2
=
swab16
(
t1
);
t2
=
__arch__
swab16
(
t1
);
printk
(
"hardware swab16 test %s, data:0x%04X, result:0x%04X
\n
"
,
(
t2
==
0x3412
)
?
"passed"
:
"failed"
,
t1
,
t2
);
t1
=
0x12345678
;
t2
=
swab32
(
t1
);
t2
=
__arch__
swab32
(
t1
);
printk
(
"hardware swab32 test %s, data:0x%08X, result:0x%08X
\n
"
,
(
t2
==
0x78563412
)
?
"passed"
:
"failed"
,
t1
,
t2
);
...
...
This diff is collapsed.
Click to expand it.
target/linux/adm5120-2.6/patches/008-adm5120_hardware_swab.patch
+
1
−
1
View file @
0b1fdf1a
...
...
@@ -9,7 +9,7 @@
+static __inline__ __attribute_const__ __u16 ___adm5120__swab16(__u16 x)
+{
+ __asm__ (
+ " s
w
%2, 0xC
8
(%1) \n"
+ " s
h
%2, 0xC
A
(%1) \n"
+ " lhu %0, 0xCC(%1) \n"
+ : "=r" (x)
+ : "r" (0xB2000000), "r" (x));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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