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
27a3bbaf
Commit
27a3bbaf
authored
Feb 07, 2007
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MIPS] VPE: Sprinkle device model code into code to make udev happier.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
66efc5a7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
1 deletion
+43
-1
arch/mips/kernel/mips-mt.c
arch/mips/kernel/mips-mt.c
+19
-0
arch/mips/kernel/vpe.c
arch/mips/kernel/vpe.c
+21
-1
include/asm-mips/mips_mt.h
include/asm-mips/mips_mt.h
+3
-0
No files found.
arch/mips/kernel/mips-mt.c
View file @
27a3bbaf
...
...
@@ -3,9 +3,11 @@
* Copyright (C) 2005 Mips Technologies, Inc
*/
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/cpumask.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/security.h>
...
...
@@ -453,3 +455,20 @@ void mt_cflush_release(void)
#endif
/* CONFIG_MIPS_MT_SMTC */
/* FILL IN VSMP and AP/SP VERSIONS HERE */
}
struct
class
*
mt_class
;
static
int
__init
mt_init
(
void
)
{
struct
class
*
mtc
;
mtc
=
class_create
(
THIS_MODULE
,
"mt"
);
if
(
IS_ERR
(
mtc
))
return
PTR_ERR
(
mtc
);
mt_class
=
mtc
;
return
0
;
}
subsys_initcall
(
mt_init
);
arch/mips/kernel/vpe.c
View file @
27a3bbaf
...
...
@@ -29,6 +29,7 @@
*/
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/init.h>
...
...
@@ -48,6 +49,7 @@
#include <asm/cacheflush.h>
#include <asm/atomic.h>
#include <asm/cpu.h>
#include <asm/mips_mt.h>
#include <asm/processor.h>
#include <asm/system.h>
#include <asm/vpe.h>
...
...
@@ -64,6 +66,7 @@ typedef void *vpe_handle;
static
char
module_name
[]
=
"vpe"
;
static
int
major
;
static
const
int
minor
=
1
;
/* fixed for now */
#ifdef CONFIG_MIPS_APSP_KSPD
static
struct
kspd_notifications
kspd_events
;
...
...
@@ -1365,12 +1368,15 @@ static void kspd_sp_exit( int sp_id)
}
#endif
static
struct
device
*
vpe_dev
;
static
int
__init
vpe_module_init
(
void
)
{
struct
vpe
*
v
=
NULL
;
struct
device
*
dev
;
struct
tc
*
t
;
unsigned
long
val
;
int
i
;
int
i
,
err
;
if
(
!
cpu_has_mipsmt
)
{
printk
(
"VPE loader: not a MIPS MT capable processor
\n
"
);
...
...
@@ -1383,6 +1389,14 @@ static int __init vpe_module_init(void)
return
major
;
}
dev
=
device_create
(
mt_class
,
NULL
,
MKDEV
(
major
,
minor
),
"tc%d"
,
minor
);
if
(
IS_ERR
(
dev
))
{
err
=
PTR_ERR
(
dev
);
goto
out_chrdev
;
}
vpe_dev
=
dev
;
dmt
();
dvpe
();
...
...
@@ -1478,6 +1492,11 @@ static int __init vpe_module_init(void)
kspd_events
.
kspd_sp_exit
=
kspd_sp_exit
;
#endif
return
0
;
out_chrdev:
unregister_chrdev
(
major
,
module_name
);
return
err
;
}
static
void
__exit
vpe_module_exit
(
void
)
...
...
@@ -1490,6 +1509,7 @@ static void __exit vpe_module_exit(void)
}
}
device_destroy
(
mt_class
,
MKDEV
(
major
,
minor
));
unregister_chrdev
(
major
,
module_name
);
}
...
...
include/asm-mips/mips_mt.h
View file @
27a3bbaf
...
...
@@ -12,4 +12,7 @@ extern unsigned long mt_fpemul_threshold;
extern
void
mips_mt_regdump
(
unsigned
long
previous_mvpcontrol_value
);
extern
void
mips_mt_set_cpuoptions
(
void
);
struct
class
;
extern
struct
class
*
mt_class
;
#endif
/* __ASM_MIPS_MT_H */
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