Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
linux-elphel
Commits
4511f63c
Commit
4511f63c
authored
Apr 13, 2016
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reset usb on pin 49
parent
2c032e80
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletion
+27
-1
elphel393-init.c
src/drivers/elphel/elphel393-init.c
+27
-1
No files found.
src/drivers/elphel/elphel393-init.c
View file @
4511f63c
...
@@ -27,8 +27,10 @@
...
@@ -27,8 +27,10 @@
#define pr_fmt(fmt) DRV_NAME": " fmt
#define pr_fmt(fmt) DRV_NAME": " fmt
#include <asm/page.h>
#include <asm/page.h>
#include <asm/io.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/module.h>
...
@@ -63,6 +65,13 @@ static char boardinfo[2048];
...
@@ -63,6 +65,13 @@ static char boardinfo[2048];
static
char
serial
[
13
];
static
char
serial
[
13
];
static
char
revision
[
8
];
static
char
revision
[
8
];
static
int
setup_mio_pin_and_reset_usb
(
void
);
static
int
__init
elphel393_early_initialize
(
void
){
pr_info
(
"set up the mio pin 49 and reset USB
\n
"
);
setup_mio_pin_and_reset_usb
();
return
0
;
}
/*
/*
static int __init elphel393_early_initialize(void){
static int __init elphel393_early_initialize(void){
...
@@ -393,6 +402,23 @@ static int get_factory_info(void){
...
@@ -393,6 +402,23 @@ static int get_factory_info(void){
return
0
;
return
0
;
}
}
static
int
setup_mio_pin_and_reset_usb
(
void
){
u32
reg_value
;
const
u32
newvalue
=
0x1
<<
17
;
reg_value
=
readl
(
0xe000a244
);
writel
(
reg_value
|
newvalue
,
0xe000a244
);
udelay
(
10
);
reg_value
=
readl
(
0xe000a248
);
writel
(
reg_value
|
newvalue
,
0xe000a248
);
udelay
(
10
);
reg_value
=
readl
(
0xe000a044
);
writel
(
reg_value
&
(
~
newvalue
),
0xe000a044
);
udelay
(
10
);
writel
(
reg_value
|
newvalue
,
0xe000a044
);
reg_value
=
readl
(
0xe000a064
);
return
0
;
}
static
int
elphel393_init_remove
(
struct
platform_device
*
pdev
)
static
int
elphel393_init_remove
(
struct
platform_device
*
pdev
)
{
{
pr_info
(
"Remove"
);
pr_info
(
"Remove"
);
...
@@ -416,7 +442,7 @@ static struct platform_driver elphel393_initialize = {
...
@@ -416,7 +442,7 @@ static struct platform_driver elphel393_initialize = {
},
},
};
};
//
early_initcall(elphel393_early_initialize);
early_initcall
(
elphel393_early_initialize
);
module_platform_driver
(
elphel393_initialize
);
module_platform_driver
(
elphel393_initialize
);
module_init
(
elphel393_init_init
);
module_init
(
elphel393_init_init
);
...
...
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