From b4b7ff4b08e691656c9d77c758fc355833128ac0 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Wed, 20 Jan 2016 14:01:31 -0300 Subject: Linux-libre 4.4-gnu --- drivers/staging/sm750fb/ddk750_power.c | 71 +++------------------------------- 1 file changed, 5 insertions(+), 66 deletions(-) (limited to 'drivers/staging/sm750fb/ddk750_power.c') diff --git a/drivers/staging/sm750fb/ddk750_power.c b/drivers/staging/sm750fb/ddk750_power.c index e580dab2b..667e4f822 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); @@ -197,29 +153,12 @@ void enableGPIO(unsigned int enable) setCurrentGate(gate); } -/* - * 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); -- cgit v1.2.3-54-g00ecf