Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
c6f85a75
Commit
c6f85a75
authored
Sep 12, 2017
by
Corey Minyard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ipmi_si: Move PARISC handling to another file
Signed-off-by:
Corey Minyard
<
cminyard@mvista.com
>
parent
13d0b35c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
57 deletions
+71
-57
drivers/char/ipmi/Makefile
drivers/char/ipmi/Makefile
+3
-0
drivers/char/ipmi/ipmi_si.h
drivers/char/ipmi/ipmi_si.h
+7
-0
drivers/char/ipmi/ipmi_si_intf.c
drivers/char/ipmi/ipmi_si_intf.c
+3
-57
drivers/char/ipmi/ipmi_si_parisc.c
drivers/char/ipmi/ipmi_si_parisc.c
+58
-0
No files found.
drivers/char/ipmi/Makefile
View file @
c6f85a75
...
...
@@ -7,6 +7,9 @@ ipmi_si-y := ipmi_si_intf.o ipmi_kcs_sm.o ipmi_smic_sm.o ipmi_bt_sm.o \
ifdef
CONFIG_PCI
ipmi_si-y
+=
ipmi_si_pci.o
endif
ifdef
CONFIG_PARISC
ipmi_si-y
+=
ipmi_si_parisc.o
endif
obj-$(CONFIG_IPMI_HANDLER)
+=
ipmi_msghandler.o
obj-$(CONFIG_IPMI_DEVICE_INTERFACE)
+=
ipmi_devintf.o
...
...
drivers/char/ipmi/ipmi_si.h
View file @
c6f85a75
...
...
@@ -37,3 +37,10 @@ void ipmi_si_pci_shutdown(void);
static
inline
void
ipmi_si_pci_init
(
void
)
{
}
static
inline
void
ipmi_si_pci_shutdown
(
void
)
{
}
#endif
#ifdef CONFIG_PARISC
void
ipmi_si_parisc_init
(
void
);
void
ipmi_si_parisc_shutdown
(
void
);
#else
static
inline
void
ipmi_si_parisc_init
(
void
)
{
}
static
inline
void
ipmi_si_parisc_shutdown
(
void
)
{
}
#endif
drivers/char/ipmi/ipmi_si_intf.c
View file @
c6f85a75
...
...
@@ -63,11 +63,6 @@
#include <linux/string.h>
#include <linux/ctype.h>
#ifdef CONFIG_PARISC
#include <asm/hardware.h>
/* for register_parisc_driver() stuff */
#include <asm/parisc-device.h>
#endif
#define PFX "ipmi_si: "
/* Measure times between events in the driver. */
...
...
@@ -282,9 +277,6 @@ struct smi_info {
#define IPMI_MAX_INTFS 4
static
int
force_kipmid
[
IPMI_MAX_INTFS
];
static
int
num_force_kipmid
;
#ifdef CONFIG_PARISC
static
bool
parisc_registered
;
#endif
static
unsigned
int
kipmid_max_busy_us
[
IPMI_MAX_INTFS
];
static
int
num_max_busy_us
;
...
...
@@ -1581,47 +1573,6 @@ static struct smi_info *smi_info_alloc(void)
return
info
;
}
#ifdef CONFIG_PARISC
static
int
__init
ipmi_parisc_probe
(
struct
parisc_device
*
dev
)
{
struct
si_sm_io
io
;
io
.
si_type
=
SI_KCS
;
io
.
addr_source
=
SI_DEVICETREE
;
io
.
addr_type
=
IPMI_MEM_ADDR_SPACE
;
io
.
addr_data
=
dev
->
hpa
.
start
;
io
.
regsize
=
1
;
io
.
regspacing
=
1
;
io
.
regshift
=
0
;
io
.
irq
=
0
;
/* no interrupt */
io
.
irq_setup
=
NULL
;
io
.
dev
=
&
dev
->
dev
;
dev_dbg
(
&
dev
->
dev
,
"addr 0x%lx
\n
"
,
io
.
addr_data
);
return
ipmi_si_add_smi
(
&
io
);
}
static
int
__exit
ipmi_parisc_remove
(
struct
parisc_device
*
dev
)
{
return
ipmi_si_remove_by_dev
(
&
pdev
->
dev
);
}
static
const
struct
parisc_device_id
ipmi_parisc_tbl
[]
__initconst
=
{
{
HPHW_MC
,
HVERSION_REV_ANY_ID
,
0x004
,
0xC0
},
{
0
,
}
};
MODULE_DEVICE_TABLE
(
parisc
,
ipmi_parisc_tbl
);
static
struct
parisc_driver
ipmi_parisc_driver
__refdata
=
{
.
name
=
"ipmi"
,
.
id_table
=
ipmi_parisc_tbl
,
.
probe
=
ipmi_parisc_probe
,
.
remove
=
__exit_p
(
ipmi_parisc_remove
),
};
#endif
/* CONFIG_PARISC */
static
int
wait_for_msg_done
(
struct
smi_info
*
smi_info
)
{
enum
si_sm_result
smi_result
;
...
...
@@ -2522,10 +2473,7 @@ static int init_ipmi_si(void)
ipmi_si_pci_init
();
#ifdef CONFIG_PARISC
register_parisc_driver
(
&
ipmi_parisc_driver
);
parisc_registered
=
true
;
#endif
ipmi_si_parisc_init
();
/* We prefer devices with interrupts, but in the case of a machine
with multiple BMCs we assume that there will be several instances
...
...
@@ -2682,10 +2630,8 @@ static void cleanup_ipmi_si(void)
return
;
ipmi_si_pci_shutdown
();
#ifdef CONFIG_PARISC
if
(
parisc_registered
)
unregister_parisc_driver
(
&
ipmi_parisc_driver
);
#endif
ipmi_si_parisc_shutdown
();
ipmi_si_platform_shutdown
();
...
...
drivers/char/ipmi/ipmi_si_parisc.c
0 → 100644
View file @
c6f85a75
#include <linux/module.h>
#include <asm/hardware.h>
/* for register_parisc_driver() stuff */
#include <asm/parisc-device.h>
#include "ipmi_si.h"
static
bool
parisc_registered
;
static
int
__init
ipmi_parisc_probe
(
struct
parisc_device
*
dev
)
{
struct
si_sm_io
io
;
io
.
si_type
=
SI_KCS
;
io
.
addr_source
=
SI_DEVICETREE
;
io
.
addr_type
=
IPMI_MEM_ADDR_SPACE
;
io
.
addr_data
=
dev
->
hpa
.
start
;
io
.
regsize
=
1
;
io
.
regspacing
=
1
;
io
.
regshift
=
0
;
io
.
irq
=
0
;
/* no interrupt */
io
.
irq_setup
=
NULL
;
io
.
dev
=
&
dev
->
dev
;
dev_dbg
(
&
dev
->
dev
,
"addr 0x%lx
\n
"
,
io
.
addr_data
);
return
ipmi_si_add_smi
(
&
io
);
}
static
int
__exit
ipmi_parisc_remove
(
struct
parisc_device
*
dev
)
{
return
ipmi_si_remove_by_dev
(
&
dev
->
dev
);
}
static
const
struct
parisc_device_id
ipmi_parisc_tbl
[]
__initconst
=
{
{
HPHW_MC
,
HVERSION_REV_ANY_ID
,
0x004
,
0xC0
},
{
0
,
}
};
MODULE_DEVICE_TABLE
(
parisc
,
ipmi_parisc_tbl
);
static
struct
parisc_driver
ipmi_parisc_driver
__refdata
=
{
.
name
=
"ipmi"
,
.
id_table
=
ipmi_parisc_tbl
,
.
probe
=
ipmi_parisc_probe
,
.
remove
=
__exit_p
(
ipmi_parisc_remove
),
};
void
ipmi_si_parisc_init
(
void
)
{
register_parisc_driver
(
&
ipmi_parisc_driver
);
parisc_registered
=
true
;
}
void
ipmi_si_parisc_shutdown
(
void
)
{
if
(
parisc_registered
)
unregister_parisc_driver
(
&
ipmi_parisc_driver
);
}
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