Skip to content

Commit

Permalink
More build warning cleanup
Browse files Browse the repository at this point in the history
Here is a bunch of build warning cleanup.
During this cleanup, I found that DIDLE is not enabled.
Wasn't enabled before. Will test that next.

Signed-off-by: Bryan Hundven <[email protected]>
  • Loading branch information
bhundven committed Dec 13, 2011
1 parent f755354 commit 0534e54
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 82 deletions.
15 changes: 15 additions & 0 deletions arch/arm/mach-s5pv210/cpuidle.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
* For saving & restoring VIC register before entering
* didle mode
*/
#ifdef CONFIG_CPU_DIDLE
static unsigned long vic_regs[4];
#endif
static unsigned long *regs_save;
static dma_addr_t phy_regs_save;

Expand Down Expand Up @@ -72,6 +74,7 @@ static struct check_device_op chk_dev_op[] = {
#define S3C_HSMMC_CLOCK_CARD_EN 0x0004

static int sdmmc_dev_num;
#ifdef CONFIG_CPU_DIDLE
/* If SD/MMC interface is working: return = 1 or not 0 */
static int check_sdmmc_op(unsigned int ch)
{
Expand Down Expand Up @@ -162,6 +165,7 @@ static int check_power_clock_gating(void)

return 0;
}
#endif /* CONFIG_CPU_DIDLE */

/*
* Skipping enter the didle mode when RTC & I2S interrupts be issued
Expand All @@ -180,6 +184,7 @@ static int check_idmapos(void)
}
#endif

#ifdef CONFIG_CPU_DIDLE
static int check_rtcint(void)
{
unsigned int current_cnt = get_rtc_cnt();
Expand Down Expand Up @@ -214,6 +219,7 @@ static void s5p_gpio_pdn_conf(void)

} while (gpio_base <= S5PV210_MP28_BASE);
}
#endif /* CONFIG_CPU_DIDLE */

static void s5p_enter_idle(void)
{
Expand Down Expand Up @@ -250,6 +256,7 @@ static int s5p_enter_idle_state(struct cpuidle_device *dev,
return idle_time;
}

#ifdef CONFIG_CPU_DIDLE
static void s5p_enter_didle(void)
{
unsigned long tmp;
Expand Down Expand Up @@ -358,11 +365,13 @@ static void s5p_enter_didle(void)
__raw_writel(vic_regs[2], S5P_VIC2REG(VIC_INT_ENABLE));
__raw_writel(vic_regs[3], S5P_VIC3REG(VIC_INT_ENABLE));
}
#endif /* CONFIG_CPU_DIDLE */

#ifdef CONFIG_RFKILL
extern volatile int bt_is_running;
#endif

#ifdef CONFIG_CPU_DIDLE
static int s5p_idle_bm_check(void)
{
if (check_power_clock_gating() || loop_sdmmc_check() ||
Expand All @@ -379,8 +388,13 @@ static int s5p_idle_bm_check(void)
else
return 0;
}
#endif /* CONFIG_CPU_DIDLE */

#ifdef CONFIG_RFKILL
extern void bt_uart_rts_ctrl(int flag);
#endif

#ifdef CONFIG_CPU_DIDLE
/* Actual code that puts the SoC in different idle states */
static int s5p_enter_didle_state(struct cpuidle_device *dev,
struct cpuidle_state *state)
Expand Down Expand Up @@ -409,6 +423,7 @@ static int s5p_enter_didle_state(struct cpuidle_device *dev,

return idle_time;
}
#endif /* CONFIG_CPU_DIDLE */

static int s5p_enter_idle_bm(struct cpuidle_device *dev,
struct cpuidle_state *state)
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-s5pv210/include/mach/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#include <asm/proc-fns.h>
#include <plat/watchdog-reset.h>

static void arch_idle(void) __maybe_unused;

static void arch_idle(void)
{
/* nothing here yet */
Expand Down
75 changes: 11 additions & 64 deletions arch/arm/mach-s5pv210/mach-aries.c
Original file line number Diff line number Diff line change
Expand Up @@ -2378,6 +2378,7 @@ static struct platform_device s3c_device_i2c13 = {
};
//] hdlnc_bp_ytkwon : 20100301

#if 0 // bhundven - SGS4G does not have NFC
static struct i2c_gpio_platform_data i2c14_platdata = {
.sda_pin = NFC_SDA_18V,
.scl_pin = NFC_SCL_18V,
Expand All @@ -2392,6 +2393,7 @@ static struct platform_device s3c_device_i2c14 = {
.id = 14,
.dev.platform_data = &i2c14_platdata,
};
#endif

static void touch_keypad_gpio_init(void)
{
Expand Down Expand Up @@ -3086,7 +3088,6 @@ static int ce147_power_off(void)

static int ce147_power_en(int onoff)
{
int bd_level;
int err = 0;
#if 0
if(onoff){
Expand Down Expand Up @@ -3118,60 +3119,6 @@ static int ce147_power_en(int onoff)
return 0;
}

static int smdkc110_cam1_power(int onoff)
{
int err;
/* Implement on/off operations */

/* CAM_VGA_nSTBY - GPB(0) */
err = gpio_request(S5PV210_GPB(0), "GPB");

if (err) {
printk(KERN_ERR "failed to request GPB for camera control\n");
return err;
}

gpio_direction_output(S5PV210_GPB(0), 0);

mdelay(1);

gpio_direction_output(S5PV210_GPB(0), 1);

mdelay(1);

gpio_set_value(S5PV210_GPB(0), 1);

mdelay(1);

gpio_free(S5PV210_GPB(0));

mdelay(1);

/* CAM_VGA_nRST - GPB(2) */
err = gpio_request(S5PV210_GPB(2), "GPB");

if (err) {
printk(KERN_ERR "failed to request GPB for camera control\n");
return err;
}

gpio_direction_output(S5PV210_GPB(2), 0);

mdelay(1);

gpio_direction_output(S5PV210_GPB(2), 1);

mdelay(1);

gpio_set_value(S5PV210_GPB(2), 1);

mdelay(1);

gpio_free(S5PV210_GPB(2));

return 0;
}

/*
* Guide for Camera Configuration for Jupiter board
* ITU CAM CH A: CE147
Expand Down Expand Up @@ -3227,7 +3174,7 @@ static struct s3c_platform_camera ce147 = {
#ifdef CONFIG_VIDEO_S5KA3DFX
/* External camera module setting */
static DEFINE_MUTEX(s5ka3dfx_lock);
static struct regulator *s5ka3dfx_vga_avdd;
//static struct regulator *s5ka3dfx_vga_avdd;
static struct regulator *s5ka3dfx_vga_vddio;
static struct regulator *s5ka3dfx_cam_isp_host;
static struct regulator *s5ka3dfx_vga_dvdd;
Expand Down Expand Up @@ -5915,7 +5862,7 @@ static struct i2c_board_info i2c_devs8[] __initdata = {

static int fsa9480_init_flag = 0;
static bool mtp_off_status;
extern int max8998_check_vdcin();
extern int max8998_check_vdcin(void);
#ifdef CONFIG_USB_ANDROID_SAMSUNG_COMPOSITE
extern u16 askonstatus;
void fsa9480_usb_cb(bool attached)
Expand Down Expand Up @@ -5970,15 +5917,15 @@ static struct switch_dev switch_dock = {

static void fsa9480_deskdock_cb(bool attached)
{

struct usb_gadget *gadget = platform_get_drvdata(&s3c_device_usbgadget); //Build Error

if (attached)
switch_set_state(&switch_dock, 1);
else
switch_set_state(&switch_dock, 0);

#if !defined (CONFIG_S5PC110_HAWK_BOARD) && !defined (CONFIG_S5PC110_KEPLER_BOARD) && !defined (CONFIG_S5PC110_DEMPSEY_BOARD) && !defined (CONFIG_S5PC110_VIBRANTPLUS_BOARD) // mr work

struct usb_gadget *gadget = platform_get_drvdata(&s3c_device_usbgadget);

if (gadget)
{
if (attached)
Expand All @@ -6003,8 +5950,6 @@ struct usb_gadget *gadget = platform_get_drvdata(&s3c_device_usbgadget); //Build

static void fsa9480_cardock_cb(bool attached)
{

struct usb_gadget *gadget = platform_get_drvdata(&s3c_device_usbgadget);
if (attached)
switch_set_state(&switch_dock, 2);
else
Expand All @@ -6013,6 +5958,8 @@ struct usb_gadget *gadget = platform_get_drvdata(&s3c_device_usbgadget);
#if !defined (CONFIG_S5PC110_HAWK_BOARD) && !defined (CONFIG_S5PC110_KEPLER_BOARD) && !defined (CONFIG_S5PC110_DEMPSEY_BOARD) && !defined (CONFIG_S5PC110_VIBRANTPLUS_BOARD) // mr work
//#if 0 /* doodlejump */
// HDLNC_OPK_20110324 : For USB Charging in Cardock mode
struct usb_gadget *gadget = platform_get_drvdata(&s3c_device_usbgadget);

if (gadget)
{
if (attached)
Expand Down Expand Up @@ -6880,7 +6827,7 @@ static void aries_power_off(void)
{
int err;
int mode = REBOOT_MODE_NONE;
char reset_mode = 'r';
/* char reset_mode = 'r'; */
int phone_wait_cnt = 0;

/* Change this API call just before power-off to take the dump. */
Expand Down Expand Up @@ -7671,7 +7618,7 @@ static void __init sound_init(void)
#endif
}

static void __init onenand_init()
static void __init onenand_init(void)
{
struct clk *clk = clk_get(NULL, "onenand");
BUG_ON(!clk);
Expand Down
5 changes: 2 additions & 3 deletions arch/arm/mach-s5pv210/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,9 +453,8 @@ void s5pv210_cpu_suspend(void)
}


printk("%s[%d],Con=%s,%x D= %s, P_UD = %s, PD_CON=%s, PD_PD= %s \n", \
regNameString,bitNumber, configString , conregBuff[bitNumber], dataString, pullDownString, \
PDNconString,PDNpullPDString);
printk(KERN_INFO "%s[%d],Con=%s,%x D= %s, P_UD = %s, PD_CON=%s, PD_PD= %s \n", \
regNameString,bitNumber, configString , conregBuff[bitNumber], dataString, pullDownString, PDNconString,PDNpullPDString);


/*
Expand Down
4 changes: 3 additions & 1 deletion arch/arm/mach-s5pv210/setup-sdhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ void universal_sdhci2_cfg_ext_cd(void)
set_irq_type(IRQ_EINT(28), IRQ_TYPE_EDGE_BOTH);
}

#ifdef CONFIG_S3C_DEV_HSMMC0
static struct s3c_sdhci_platdata hsmmc0_platdata = {
#if defined(CONFIG_S5PV210_SD_CH0_8BIT)
.max_width = 8,
Expand All @@ -368,6 +369,7 @@ static struct s3c_sdhci_platdata hsmmc0_platdata = {
.get_ro = sdhci0_get_ro,
#endif
};
#endif /* CONFIG_S3C_DEV_HSMMC0 */

#if defined(CONFIG_S3C_DEV_HSMMC2)
static struct s3c_sdhci_platdata hsmmc2_platdata = {
Expand All @@ -384,7 +386,7 @@ static struct s3c_sdhci_platdata hsmmc3_platdata = { 0 };

void s3c_sdhci_set_platdata(void)
{
#if defined(CONFIG_S3C_DEV_HSMMC)
#if defined(CONFIG_S3C_DEV_HSMMC0)
s3c_sdhci0_set_platdata(&hsmmc0_platdata);
#endif
#if defined(CONFIG_S3C_DEV_HSMMC2)
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/plat-s5p/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
* check to see if the pin is configured correctly for sleep mode, and
* make any necessary adjustments if it is not
*/

/*
static void s3c_pm_check_resume_pin(unsigned int pin, unsigned int irqoffs)
{
{ */
/* nothing here yet */
}
/* } */

/* s3c_pm_configure_extint
*
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/plat-samsung/dev-i2c1.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void __init s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *pd)

void s3c_i2c1_force_stop()
{
struct resource *ioarea;
// struct resource *ioarea;
void __iomem *regs;
struct clk *clk;
unsigned long iicstat;
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/plat-samsung/include/plat/regs-serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@

#ifndef __ASSEMBLY__

struct uart_port;

/* struct s3c24xx_uart_clksrc
*
* this structure defines a named clock source that can be used for the
Expand Down
6 changes: 4 additions & 2 deletions arch/arm/plat-samsung/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ void s3c_pm_do_restore_core(struct sleep_save *ptr, int count)
*
* print any IRQs asserted at resume time (ie, we woke from)
*/
/*
static void s3c_pm_show_resume_irqs(int start, unsigned long which,
unsigned long mask)
{
Expand All @@ -308,6 +309,7 @@ static void s3c_pm_show_resume_irqs(int start, unsigned long which,
}
}
}
*/

bool s3c_pm_check_pending_interrupt(void)
{
Expand Down Expand Up @@ -366,7 +368,7 @@ static int s3c_pm_enter(suspend_state_t state)
/* 20110210 - check pending interrupt to wakeup device */
if(!s3c_pm_check_pending_interrupt())
{
printk(KERN_ERR "interrupt pending. wakeup!!(1)\n", __func__);
printk(KERN_ERR "%s: interrupt pending. wakeup!!(1)\n", __func__);
return -EINVAL;
}
#if ! defined (CONFIG_S5PC110_HAWK_BOARD)
Expand All @@ -383,7 +385,7 @@ static int s3c_pm_enter(suspend_state_t state)
/* 20110210 - check pending interrupt to wakeup device */
if(!s3c_pm_check_pending_interrupt())
{
printk(KERN_ERR "interrupt pending. wakeup!!(2)\n", __func__);
printk(KERN_ERR "%s: interrupt pending. wakeup!!(2)\n", __func__);
return -EINVAL;
}

Expand Down
Loading

0 comments on commit 0534e54

Please sign in to comment.