aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/sm750fb/ddk750_power.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/sm750fb/ddk750_power.c')
-rw-r--r--drivers/staging/sm750fb/ddk750_power.c71
1 files changed, 5 insertions, 66 deletions
diff --git a/drivers/staging/sm750fb/ddk750_power.c b/drivers/staging/sm750fb/ddk750_power.c
index e580dab2b625..667e4f822544 100644
--- a/drivers/staging/sm750fb/ddk750_power.c
+++ b/drivers/staging/sm750fb/ddk750_power.c
@@ -17,7 +17,7 @@ void ddk750_setDPMS(DPMS_t state)
}
}
-unsigned int getPowerMode(void)
+static unsigned int getPowerMode(void)
{
if (getChipType() == SM750LE)
return 0;
@@ -108,7 +108,7 @@ void setCurrentGate(unsigned int gate)
*/
void enable2DEngine(unsigned int enable)
{
- uint32_t gate;
+ u32 gate;
gate = PEEK32(CURRENT_GATE);
if (enable) {
@@ -122,53 +122,9 @@ void enable2DEngine(unsigned int enable)
setCurrentGate(gate);
}
-
-/*
- * This function enable/disable the ZV Port.
- */
-void enableZVPort(unsigned int enable)
-{
- uint32_t gate;
-
- /* Enable ZV Port Gate */
- gate = PEEK32(CURRENT_GATE);
- if (enable) {
- gate = FIELD_SET(gate, CURRENT_GATE, ZVPORT, ON);
-#if 1
- /* Using Software I2C */
- gate = FIELD_SET(gate, CURRENT_GATE, GPIO, ON);
-#else
- /* Using Hardware I2C */
- gate = FIELD_SET(gate, CURRENT_GATE, I2C, ON);
-#endif
- } else {
- /* Disable ZV Port Gate. There is no way to know whether the
- GPIO pins are being used or not. Therefore, do not disable the
- GPIO gate. */
- gate = FIELD_SET(gate, CURRENT_GATE, ZVPORT, OFF);
- }
-
- setCurrentGate(gate);
-}
-
-
-void enableSSP(unsigned int enable)
-{
- uint32_t gate;
-
- /* Enable SSP Gate */
- gate = PEEK32(CURRENT_GATE);
- if (enable)
- gate = FIELD_SET(gate, CURRENT_GATE, SSP, ON);
- else
- gate = FIELD_SET(gate, CURRENT_GATE, SSP, OFF);
-
- setCurrentGate(gate);
-}
-
void enableDMA(unsigned int enable)
{
- uint32_t gate;
+ u32 gate;
/* Enable DMA Gate */
gate = PEEK32(CURRENT_GATE);
@@ -185,7 +141,7 @@ void enableDMA(unsigned int enable)
*/
void enableGPIO(unsigned int enable)
{
- uint32_t gate;
+ u32 gate;
/* Enable GPIO Gate */
gate = PEEK32(CURRENT_GATE);
@@ -198,28 +154,11 @@ void enableGPIO(unsigned int enable)
}
/*
- * This function enable/disable the PWM Engine
- */
-void enablePWM(unsigned int enable)
-{
- uint32_t gate;
-
- /* Enable PWM Gate */
- gate = PEEK32(CURRENT_GATE);
- if (enable)
- gate = FIELD_SET(gate, CURRENT_GATE, PWM, ON);
- else
- gate = FIELD_SET(gate, CURRENT_GATE, PWM, OFF);
-
- setCurrentGate(gate);
-}
-
-/*
* This function enable/disable the I2C Engine
*/
void enableI2C(unsigned int enable)
{
- uint32_t gate;
+ u32 gate;
/* Enable I2C Gate */
gate = PEEK32(CURRENT_GATE);