Commit ab6a818e authored by Tony Lindgren's avatar Tony Lindgren

CodingStyle fixes based on LKML comments

Changes are mostly:

- No externs in .c files
- Use standard commenting format
- Use standard debug functions or loglevel for printk
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 80564e17
......@@ -90,13 +90,13 @@ config MACH_OMAP_PALMTE
Say Y here if you have this PDA model, say N otherwise.
config MACH_OMAP_PALMZ71
bool "Palm Zire71"
depends on ARCH_OMAP1 && ARCH_OMAP15XX
help
Support for the Palm Zire71 PDA. To boot the kernel,
you'll need a PalmOS compatible bootloader; check out
http://hackndev.com/palm/z71 for more informations.
Say Y here if you have such a PDA, say N otherwise.
bool "Palm Zire71"
depends on ARCH_OMAP1 && ARCH_OMAP15XX
help
Support for the Palm Zire71 PDA. To boot the kernel,
you'll need a PalmOS compatible bootloader; check out
http://hackndev.com/palm/z71 for more informations.
Say Y here if you have such a PDA, say N otherwise.
config MACH_OMAP_PALMTT
bool "Palm Tungsten|T"
......
......@@ -199,12 +199,12 @@ static struct omap_mcbsp_reg_cfg mcbsp_regs = {
static struct omap_alsa_codec_config alsa_config = {
.name = "PalmZ71 AIC23",
.mcbsp_regs_alsa = &mcbsp_regs,
.codec_configure_dev = NULL, // aic23_configure,
.codec_set_samplerate = NULL, // aic23_set_samplerate,
.codec_clock_setup = NULL, // aic23_clock_setup,
.codec_clock_on = NULL, // aic23_clock_on,
.codec_clock_off = NULL, // aic23_clock_off,
.get_default_samplerate = NULL, // aic23_get_default_samplerate,
.codec_configure_dev = NULL, /* aic23_configure */
.codec_set_samplerate = NULL, /* aic23_set_samplerate */
.codec_clock_setup = NULL, /* aic23_clock_setup */
.codec_clock_on = NULL, /* aic23_clock_on */
.codec_clock_off = NULL, /* aic23_clock_off */
.get_default_samplerate = NULL, /* aic23_get_default_samplerate */
};
static struct platform_device palmz71_mcbsp1_device = {
......@@ -345,7 +345,7 @@ palmz71_gpio_setup(int early)
palmz71_powercable, IRQF_SAMPLE_RANDOM,
"palmz71-cable", 0))
printk(KERN_ERR
"IRQ request for power cable failed!\n");
"IRQ request for power cable failed!\n");
palmz71_powercable(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO), 0);
}
}
......
......@@ -188,14 +188,14 @@ static int n800_codec_get_clocks(struct device *dev)
{
sys_clkout2 = clk_get(dev, "sys_clkout2");
if (IS_ERR(sys_clkout2)) {
printk(KERN_ERR "Could not get sys_clkout2\n");
dev_err(dev, "Could not get sys_clkout2\n");
return -ENODEV;
}
/* configure 12 MHz output on SYS_CLKOUT2. Therefore we must use
* 96 MHz as its parent in order to get 12 MHz */
func96m_clk = clk_get(dev, "func_96m_ck");
if (IS_ERR(func96m_clk)) {
printk(KERN_ERR "could not get func 96M clock\n");
dev_err(dev, "Could not get func 96M clock\n");
clk_put(sys_clkout2);
return -ENODEV;
}
......
......@@ -29,12 +29,10 @@
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/board.h>
#include "../plat-omap/dsp/dsp_common.h"
extern int n800_audio_enable(struct dsp_kfunc_device *kdev, int stage);
extern int n800_audio_disable(struct dsp_kfunc_device *kdev, int stage);
#if defined(CONFIG_OMAP_DSP)
/*
......
......@@ -28,7 +28,7 @@ static struct omap_onenand_platform_data n800_onenand_data = {
.gpio_irq = 26,
.parts = n800_partitions,
.nr_parts = 0, /* filled later */
.onenand_setup = n800_onenand_setup
.onenand_setup = n800_onenand_setup,
};
static struct platform_device n800_onenand_device = {
......@@ -134,7 +134,7 @@ void __init n800_flash_init(void)
int i = 0;
while ((part = omap_get_nr_config(OMAP_TAG_PARTITION,
struct omap_partition_config, i)) != NULL) {
struct omap_partition_config, i)) != NULL) {
struct mtd_partition *mpart;
mpart = n800_partitions + i;
......
......@@ -2,7 +2,7 @@
* linux/arch/arm/mach-omap2/board-n800-mmc.c
*
* Copyright (C) 2006 Nokia Corporation
* Author: Juha Yrj?l?
* Author: Juha Yrjola
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
......@@ -31,7 +31,7 @@ static struct device *mmc_device;
static int n800_mmc_switch_slot(struct device *dev, int slot)
{
#ifdef CONFIG_MMC_DEBUG
printk("Choose slot %d\n", slot + 1);
dev_dbg(dev, "Choose slot %d\n", slot + 1);
#endif
if (slot == 0)
omap_set_gpio_dataout(slot_switch_gpio, 0);
......@@ -40,13 +40,14 @@ static int n800_mmc_switch_slot(struct device *dev, int slot)
return 0;
}
static int n800_mmc_set_power(struct device *dev, int slot, int power_on, int vdd)
static int n800_mmc_set_power(struct device *dev, int slot, int power_on,
int vdd)
{
int mV;
#ifdef CONFIG_MMC_DEBUG
printk("Set slot %d power: %s (vdd %d)\n", slot + 1,
power_on ? "on" : "off", vdd);
dev_dbg(dev, "Set slot %d power: %s (vdd %d)\n", slot + 1,
power_on ? "on" : "off", vdd);
#endif
if (slot == 0) {
if (!power_on)
......@@ -119,8 +120,8 @@ static int n800_mmc_set_bus_mode(struct device *dev, int slot, int bus_mode)
int r;
#ifdef CONFIG_MMC_DEBUG
printk("Set slot %d bus mode %s\n", slot + 1,
bus_mode == MMC_BUSMODE_OPENDRAIN ? "open-drain" : "push-pull");
dev_dbg(dev, "Set slot %d bus mode %s\n", slot + 1,
bus_mode == MMC_BUSMODE_OPENDRAIN ? "open-drain" : "push-pull");
#endif
BUG_ON(slot != 0 && slot != 1);
slot++;
......@@ -135,7 +136,8 @@ static int n800_mmc_set_bus_mode(struct device *dev, int slot, int bus_mode)
BUG();
}
if (r != 0 && printk_ratelimit())
printk(KERN_ERR "MMC: unable to set bus mode for slot %d\n", slot);
dev_err(dev, "MMC: unable to set bus mode for slot %d\n",
slot);
return r;
}
......@@ -150,7 +152,8 @@ static int n800_mmc_get_ro(struct device *dev, int slot)
else
ro = omap_get_gpio_datain(slot2_wp_gpio);
#ifdef CONFIG_MMC_DEBUG
printk("Get RO slot %d: %s\n", slot, ro ? "read-only" : "read-write");
dev_dbg(dev, "Get RO slot %d: %s\n",
slot, ro ? "read-only" : "read-write");
#endif
return ro;
}
......
......@@ -27,7 +27,8 @@ static int n800_auto_sleep_regulators(void)
ret = menelaus_set_regulator_sleep(1, val);
if (ret < 0) {
printk(KERN_ERR "Could not set regulators to sleep on menelaus: %u\n", ret);
printk(KERN_ERR "Could not set regulators to sleep on "
"menelaus: %u\n", ret);
return ret;
}
return 0;
......@@ -39,7 +40,8 @@ static int n800_auto_voltage_scale(void)
ret = menelaus_set_vcore_hw(1400, 1050);
if (ret < 0) {
printk(KERN_ERR "Could not set VCORE voltage on menelaus: %u\n", ret);
printk(KERN_ERR "Could not set VCORE voltage on "
"menelaus: %u\n", ret);
return ret;
}
return 0;
......
......@@ -2,7 +2,7 @@
* linux/arch/arm/mach-omap2/board-n800-usb.c
*
* Copyright (C) 2006 Nokia Corporation
* Author: Juha Yrj?l?
* Author: Juha Yrjola
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
......
......@@ -2,7 +2,7 @@
* linux/arch/arm/mach-omap2/board-n800.c
*
* Copyright (C) 2005 Nokia Corporation
* Author: Juha Yrj?l? <juha.yrjola@nokia.com>
* Author: Juha Yrjola <juha.yrjola@nokia.com>
*
* Modified from mach-omap2/board-generic.c
*
......@@ -333,7 +333,7 @@ static void tsc2301_dev_init(void)
int gpio = N800_KEYB_IRQ_GPIO;
if (omap_request_gpio(gpio) < 0) {
printk("can't get KBIRQ GPIO\n");
printk(KERN_ERR "can't get KBIRQ GPIO\n");
return;
}
omap_set_gpio_direction(gpio, 1);
......@@ -442,8 +442,6 @@ static inline void n800_ts_set_config(void)
}
#endif
extern void n800_mmc_slot1_cover_handler(void *arg, int state);
static struct omap_gpio_switch n800_gpio_switches[] __initdata = {
{
.name = "bat_cover",
......@@ -476,14 +474,6 @@ static struct platform_device *n800_devices[] __initdata = {
#endif
};
extern void __init n800_flash_init(void);
extern void __init n800_mmc_init(void);
extern void __init n800_bt_init(void);
extern void __init n800_audio_init(struct tsc2301_platform_data *);
extern void __init n800_dsp_init(void);
extern void __init n800_usb_init(void);
extern void __init n800_pm_init(void);
static void __init nokia_n800_init(void)
{
platform_add_devices(n800_devices, ARRAY_SIZE(n800_devices));
......
......@@ -3,22 +3,16 @@
*
* OMAP2 Power Management Routines
*
* Copyright (C) 2005 Texas Instruments, Inc.
* Copyright (C) 2006 Nokia Corporation
* Tony Lindgren <tony@atomide.com>
*
* Fixed suspend-resume/dynamic-idle to get OMAP to retention
* Written by:
* Richard Woodruff <r-woodruff2@ti.com>
* Tony Lindgren
* Juha Yrjola
* Amit Kucheria <amit.kucheria@nokia.com>
* Igor Stoppa <igor.stoppa@nokia.com>
*
* Fixed MPU sleep to get ARM idle
* Igor Stoppa <igor.stoppa@nokia.com>
*
* Fixed MPU sleep some more
* Juha Yrjola
*
* Copyright (C) 2005 Texas Instruments, Inc.
* Richard Woodruff <r-woodruff2@ti.com>
*
* Based on pm.c for omap1
*
* This program is free software; you can redistribute it and/or modify
......@@ -440,8 +434,6 @@ static struct subsys_attribute sleep_while_idle_attr = {
.store = omap_pm_sleep_while_idle_store,
};
extern struct subsystem power_subsys;
static struct clk *osc_ck, *emul_ck;
#define CONTROL_DEVCONF __REG32(0x48000274)
......@@ -487,9 +479,6 @@ void omap2_allow_sleep(void)
BUG_ON(i < 0);
}
extern void omap2_gpio_prepare_for_retention(void);
extern void omap2_gpio_resume_after_retention(void);
static void omap2_enter_full_retention(void)
{
u32 sleep_time = 0;
......
......@@ -86,7 +86,8 @@ static int fbmem_region_reserved(unsigned long start, size_t size)
return 0;
}
/* Get the region_idx`th region from board config/ATAG and convert it to
/*
* Get the region_idx`th region from board config/ATAG and convert it to
* our internal format.
*/
static int get_fbmem_region(int region_idx, struct omapfb_mem_region *rg)
......@@ -100,7 +101,8 @@ static int get_fbmem_region(int region_idx, struct omapfb_mem_region *rg)
return -ENOENT;
paddr = conf->start;
/* Low bits encode the page allocation mode, if high bits
/*
* Low bits encode the page allocation mode, if high bits
* are zero. Otherwise we need a page aligned fixed
* address.
*/
......@@ -115,7 +117,8 @@ static int set_fbmem_region_type(struct omapfb_mem_region *rg, int mem_type,
unsigned long mem_start,
unsigned long mem_size)
{
/* Check if the configuration specifies the type explicitly.
/*
* Check if the configuration specifies the type explicitly.
* type = 0 && paddr = 0, a default don't care case maps to
* the SDRAM type.
*/
......@@ -150,7 +153,8 @@ static int check_fbmem_region(int region_idx, struct omapfb_mem_region *rg,
/* Allocate this dynamically, leave paddr 0 for now. */
return 0;
/* Fixed region for the given RAM range. Check if it's already
/*
* Fixed region for the given RAM range. Check if it's already
* reserved by the FB code or someone else.
*/
if (fbmem_region_reserved(paddr, size) ||
......@@ -163,7 +167,8 @@ static int check_fbmem_region(int region_idx, struct omapfb_mem_region *rg,
return 0;
}
/* Called from map_io. We need to call to this early enough so that we
/*
* Called from map_io. We need to call to this early enough so that we
* can reserve the fixed SDRAM regions before VM could get hold of them.
*/
void omapfb_reserve_sdram(void)
......@@ -213,7 +218,8 @@ void omapfb_reserve_sdram(void)
reserved);
}
/* Called at sram init time, before anything is pushed to the SRAM stack.
/*
* Called at sram init time, before anything is pushed to the SRAM stack.
* Because of the stack scheme, we will allocate everything from the
* start of the lowest address region to the end of SRAM. This will also
* include padding for page alignment and possible holes between regions.
......@@ -271,13 +277,13 @@ unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
size_avail = (size_avail - rg.size) & PAGE_MASK;
rg.paddr = pstart_avail + size_avail;
}
/* Reserve everything above the start of the region.
*/
/* Reserve everything above the start of the region. */
if (pend_avail - rg.paddr > reserved)
reserved = pend_avail - rg.paddr;
size_avail = pend_avail - reserved - pstart_avail;
/* We have a kernel mapping for this already, so the
/*
* We have a kernel mapping for this already, so the
* driver won't have to make one.
*/
rg.vaddr = (void *)(sram_vstart + rg.paddr - sram_pstart);
......
......@@ -57,7 +57,8 @@ extern unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
unsigned long pstart_avail,
unsigned long size_avail);
/* Depending on the target RAMFS firewall setup, the public usable amount of
/*
* Depending on the target RAMFS firewall setup, the public usable amount of
* SRAM varies. The default accessable size for all device types is 2k. A GP
* device allows ARM11 but not other initators for full size. This
* functionality seems ok until some nice security API happens.
......
......@@ -11,6 +11,17 @@
#include <linux/types.h>
extern void __init n800_flash_init(void);
extern void __init n800_mmc_init(void);
extern void __init n800_bt_init(void);
extern void __init n800_audio_init(struct tsc2301_platform_data *);
extern void __init n800_dsp_init(void);
extern void __init n800_usb_init(void);
extern void __init n800_pm_init(void);
extern int n800_audio_enable(struct dsp_kfunc_device *kdev, int stage);
extern int n800_audio_disable(struct dsp_kfunc_device *kdev, int stage);
extern void n800_mmc_slot1_cover_handler(void *arg, int state);
#define OMAP_TAG_NOKIA_BT 0x4e01
#define OMAP_TAG_WLAN_CX3110X 0x4e02
#define OMAP_TAG_CBUS 0x4e03
......
......@@ -75,6 +75,8 @@ extern void omap_free_gpio(int gpio);
extern void omap_set_gpio_direction(int gpio, int is_input);
extern void omap_set_gpio_dataout(int gpio, int enable);
extern int omap_get_gpio_datain(int gpio);
extern void omap2_gpio_prepare_for_retention(void);
extern void omap2_gpio_resume_after_retention(void);
/*-------------------------------------------------------------------------*/
......
......@@ -82,6 +82,7 @@ struct gpmc_timings {
extern unsigned int gpmc_ns_to_ticks(unsigned int time_ns);
extern unsigned int gpmc_round_ns_to_ticks(unsigned int time_ns);
extern unsigned long gpmc_get_fclk_period(void);
extern void gpmc_cs_write_reg(int cs, int idx, u32 val);
extern u32 gpmc_cs_read_reg(int cs, int idx);
......
......@@ -115,6 +115,8 @@
#include <linux/clk.h>
extern struct subsystem power_subsys;
extern void prevent_idle_sleep(void);
extern void allow_idle_sleep(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment