intel_scu_ipc: fix indentation in few places
While here, do couple of amendments: - move platform variable to the function where it's used - define intel_scu_ipc_check_status() static Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
This commit is contained in:
parent
03070e7c9d
commit
7c2e3c7476
1 changed files with 14 additions and 17 deletions
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* intel_scu_ipc.c: Driver for the Intel SCU IPC mechanism
|
||||
*
|
||||
* (C) Copyright 2008-2010 Intel Corporation
|
||||
* (C) Copyright 2008-2010,2015 Intel Corporation
|
||||
* Author: Sreedhara DS (sreedhara.ds@intel.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -114,8 +114,6 @@ struct intel_scu_ipc_dev {
|
|||
|
||||
static struct intel_scu_ipc_dev ipcdev; /* Only one for now */
|
||||
|
||||
static int platform; /* Platform type */
|
||||
|
||||
/*
|
||||
* IPC Read Buffer (Read Only):
|
||||
* 16 byte buffer for receiving data from SCU, if IPC command
|
||||
|
@ -160,7 +158,6 @@ static inline void ipc_data_writel(u32 data, u32 offset) /* Write ipc data */
|
|||
* Format:
|
||||
* |rfu3(8)|error code(8)|initiator id(8)|cmd id(4)|rfu1(2)|error(1)|busy(1)|
|
||||
*/
|
||||
|
||||
static inline u8 ipc_read_status(void)
|
||||
{
|
||||
return __raw_readl(ipcdev.ipc_base + 0x04);
|
||||
|
@ -176,7 +173,8 @@ static inline u32 ipc_data_readl(u32 offset) /* Read ipc u32 data */
|
|||
return readl(ipcdev.ipc_base + IPC_READ_BUFFER + offset);
|
||||
}
|
||||
|
||||
static inline int busy_loop(void) /* Wait till scu status is busy */
|
||||
/* Wait till scu status is busy */
|
||||
static inline int busy_loop(void)
|
||||
{
|
||||
u32 status = 0;
|
||||
u32 loop_count = 0;
|
||||
|
@ -217,7 +215,7 @@ static inline int ipc_wait_for_interrupt(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int intel_scu_ipc_check_status(void)
|
||||
static int intel_scu_ipc_check_status(void)
|
||||
{
|
||||
return ipcdev.irq_mode ? ipc_wait_for_interrupt() : busy_loop();
|
||||
}
|
||||
|
@ -412,7 +410,6 @@ int intel_scu_ipc_writev(u16 *addr, u8 *data, int len)
|
|||
}
|
||||
EXPORT_SYMBOL(intel_scu_ipc_writev);
|
||||
|
||||
|
||||
/**
|
||||
* intel_scu_ipc_update_register - r/m/w a register
|
||||
* @addr: register address
|
||||
|
@ -475,7 +472,6 @@ EXPORT_SYMBOL(intel_scu_ipc_simple_command);
|
|||
* Issue a command to the SCU which involves data transfers. Do the
|
||||
* data copies under the lock but leave it for the caller to interpret
|
||||
*/
|
||||
|
||||
int intel_scu_ipc_command(int cmd, int sub, u32 *in, int inlen,
|
||||
u32 *out, int outlen)
|
||||
{
|
||||
|
@ -666,9 +662,10 @@ static struct pci_driver ipc_driver = {
|
|||
.remove = ipc_remove,
|
||||
};
|
||||
|
||||
|
||||
static int __init intel_scu_ipc_init(void)
|
||||
{
|
||||
int platform; /* Platform type */
|
||||
|
||||
platform = intel_mid_identify_cpu();
|
||||
if (platform == 0)
|
||||
return -ENODEV;
|
||||
|
|
Loading…
Add table
Reference in a new issue