Skip to content

Commit

Permalink
Merge tag 'omap-for-v3.7-rc1/fixes-signed' of git://git.kernel.org/pu…
Browse files Browse the repository at this point in the history
…b/scm/linux/kernel/git/tmlind/linux-omap into fixes

From Tony Lindgren:

This branch contains one counter locking fix and an
alignment fix. Other fixes are warning fixes, fixes
for return value checks.

I've also included removal of some extra semicolons,
dropping of some duplicate includes, and an a change
for wl12xx enumeration that are not strictly fixes
but would be good to get out of the way for -rc1.

* tag 'omap-for-v3.7-rc1/fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  arm/omap: Replace board_ref_clock with enum values
  ARM: OMAP2+: remove duplicated include from board-omap3stalker.c
  arch/arm/plat-omap/omap-pm-noop.c: Remove unecessary semicolon
  arch/arm/mach-omap2: Remove unecessary semicolon
  arch/arm/mach-omap1/devices.c: Remove unecessary semicolon
  AM35xx: Add missing hwmod entry for the HDQ/1-Wire present in AM3505/3517 CPUs.
  ARM: OMAP2+: gpmc: annotate exit sections properly
  ARM: OMAP: fix return value check in realtime_counter_init()
  ARM: OMAP: hsmmc: fix return value check in omap_hsmmc_init_one()
  OMAPDSS: fix return value check in create_dss_pdev()
  ARM: OMAP2+: Add am335x evm and bone targets to common Makefile
  arm: increase FORCE_MAX_ZONEORDER for TI AM33XX
  ARM: OMAP: OMAP_DEBUG_LEDS needs to select LEDS_CLASS
  ARM: OMAP: rx51: Fix a section mismatch warn
  ARM: OMAP2+: Round of the carve out memory requested to section_size
  ARM: OMAP: counter: add locking to read_persistent_clock
  • Loading branch information
Olof Johansson committed Oct 9, 2012
2 parents bfbad32 + 224cd71 commit 125c967
Show file tree
Hide file tree
Showing 20 changed files with 42 additions and 37 deletions.
1 change: 1 addition & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1767,6 +1767,7 @@ source "mm/Kconfig"
config FORCE_MAX_ZONEORDER
int "Maximum zone order" if ARCH_SHMOBILE
range 11 64 if ARCH_SHMOBILE
default "12" if SOC_AM33XX
default "9" if SA1111
default "11"
help
Expand Down
4 changes: 3 additions & 1 deletion arch/arm/boot/dts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
omap4-pandaES.dtb \
omap4-var_som.dtb \
omap4-sdp.dtb \
omap5-evm.dtb
omap5-evm.dtb \
am335x-evm.dtb \
am335x-bone.dtb
dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb
dtb-$(CONFIG_ARCH_U8500) += snowball.dtb
dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ void __init omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,

omap_mmc_add("mmci-omap", i, base, size, irq,
rx_req, tx_req, mmc_data[i]);
};
}
}

#endif
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ void __init board_flash_init(struct flash_partitions partition_info[],
if (onenandcs > GPMC_CS_NUM)
onenandcs = cs;
break;
};
}
cs++;
}

Expand Down
5 changes: 0 additions & 5 deletions arch/arm/mach-omap2/board-omap3stalker.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@
#include <video/omap-panel-tfp410.h>

#include <linux/platform_data/spi-omap2-mcspi.h>
#include <linux/input/matrix_keypad.h>
#include <linux/spi/spi.h>
#include <linux/interrupt.h>
#include <linux/smsc911x.h>
#include <linux/i2c/at24.h>

#include "sdram-micron-mt46h32m32lf-6.h"
#include "mux.h"
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-omap2/board-omap4panda.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,7 @@ static struct platform_device omap_vwlan_device = {
};

static struct wl12xx_platform_data omap_panda_wlan_data __initdata = {
/* PANDA ref clock is 38.4 MHz */
.board_ref_clock = 2,
.board_ref_clock = WL12XX_REFCLOCK_38, /* 38.4 MHz */
};

static struct twl6040_codec_data twl6040_codec = {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-rx51-peripherals.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ static struct radio_si4713_platform_data rx51_si4713_data __initdata_or_module =
.subdev_board_info = &rx51_si4713_board_info,
};

static struct platform_device rx51_si4713_dev = {
static struct platform_device rx51_si4713_dev __initdata_or_module = {
.name = "radio-si4713",
.id = -1,
.dev = {
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-omap2/board-zoom-peripherals.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,7 @@ static struct platform_device omap_vwlan_device = {
};

static struct wl12xx_platform_data omap_zoom_wlan_data __initdata = {
/* ZOOM ref clock is 26 MHz */
.board_ref_clock = 1,
.board_ref_clock = WL12XX_REFCLOCK_26, /* 26 MHz */
};

static struct omap2_hsmmc_info mmc[] = {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/clkt_clksel.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ void omap2_init_clksel_parent(struct clk *clk)
__clk_get_name(parent) :
"NULL"));
clk_reparent(clk, clks->parent);
};
}
found = 1;
}
}
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ static struct platform_device *create_dss_pdev(const char *pdev_name,

ohs[0] = oh;
od = omap_device_alloc(pdev, ohs, 1, NULL, 0);
if (!od) {
if (IS_ERR(od)) {
pr_err("Could not alloc omap_device for %s\n", pdev_name);
r = -ENOMEM;
goto err;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-omap2/gpmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ static int gpmc_setup_irq(void)
return request_irq(gpmc_irq, gpmc_handle_irq, 0, "gpmc", NULL);
}

static __exit int gpmc_free_irq(void)
static __devexit int gpmc_free_irq(void)
{
int i;

Expand Down Expand Up @@ -944,7 +944,7 @@ static __devinit int gpmc_probe(struct platform_device *pdev)
return 0;
}

static __exit int gpmc_remove(struct platform_device *pdev)
static __devexit int gpmc_remove(struct platform_device *pdev)
{
gpmc_free_irq();
gpmc_mem_exit();
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/hsmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ static void __init omap_hsmmc_init_one(struct omap2_hsmmc_info *hsmmcinfo,
dev_set_name(&pdev->dev, "%s.%d", pdev->name, pdev->id);

od = omap_device_alloc(pdev, ohs, 1, NULL, 0);
if (!od) {
if (IS_ERR(od)) {
pr_err("Could not allocate od for %s\n", name);
goto put_pdev;
}
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/mux.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ void omap_hwmod_mux(struct omap_hwmod_mux_info *hmux, u8 state)
default:
/* Nothing to be done */
break;
};
}

if (val >= 0) {
omap_mux_write(pad->partition, val,
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-omap2/omap-secure.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ int __init omap_secure_ram_reserve_memblock(void)
{
u32 size = OMAP_SECURE_RAM_STORAGE;

size = ALIGN(size, SZ_1M);
omap_secure_memblock_base = arm_memblock_steal(size, SZ_1M);
size = ALIGN(size, SECTION_SIZE);
omap_secure_memblock_base = arm_memblock_steal(size, SECTION_SIZE);

return 0;
}
Expand Down
7 changes: 4 additions & 3 deletions arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -3683,6 +3683,7 @@ static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = {
&omap3xxx_l4_core__usb_tll_hs,
&omap3xxx_l4_core__es3plus_mmc1,
&omap3xxx_l4_core__es3plus_mmc2,
&omap3xxx_l4_core__hdq1w,
&am35xx_mdio__l3,
&am35xx_l4_core__mdio,
&am35xx_emac__l3,
Expand Down Expand Up @@ -3737,7 +3738,7 @@ int __init omap3xxx_hwmod_init(void)
} else {
WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
return -EINVAL;
};
}

r = omap_hwmod_register_links(h);
if (r < 0)
Expand All @@ -3754,7 +3755,7 @@ int __init omap3xxx_hwmod_init(void)
rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
rev == OMAP3430_REV_ES3_1_2) {
h = omap3430es2plus_hwmod_ocp_ifs;
};
}

if (h) {
r = omap_hwmod_register_links(h);
Expand All @@ -3769,7 +3770,7 @@ int __init omap3xxx_hwmod_init(void)
} else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
rev == OMAP3430_REV_ES3_1_2) {
h = omap3430_es3plus_hwmod_ocp_ifs;
};
}

if (h)
r = omap_hwmod_register_links(h);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/pm-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ static int pm_dbg_open(struct inode *inode, struct file *file)
default:
return single_open(file, pm_dbg_show_timers,
&inode->i_private);
};
}
}

static const struct file_operations debug_fops = {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ static void __init realtime_counter_init(void)
return;
}
sys_clk = clk_get(NULL, "sys_clkin_ck");
if (!sys_clk) {
if (IS_ERR(sys_clk)) {
pr_err("%s: failed to get system clock handle\n", __func__);
iounmap(base);
return;
Expand Down
1 change: 1 addition & 0 deletions arch/arm/plat-omap/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ config OMAP_DEBUG_DEVICES

config OMAP_DEBUG_LEDS
def_bool y if NEW_LEDS
select LEDS_CLASS
depends on OMAP_DEBUG_DEVICES

config POWER_AVS_OMAP
Expand Down
21 changes: 14 additions & 7 deletions arch/arm/plat-omap/counter_32k.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,29 @@ static u32 notrace omap_32k_read_sched_clock(void)
* nsecs and adds to a monotonically increasing timespec.
*/
static struct timespec persistent_ts;
static cycles_t cycles, last_cycles;
static cycles_t cycles;
static unsigned int persistent_mult, persistent_shift;
static DEFINE_SPINLOCK(read_persistent_clock_lock);

static void omap_read_persistent_clock(struct timespec *ts)
{
unsigned long long nsecs;
cycles_t delta;
struct timespec *tsp = &persistent_ts;
cycles_t last_cycles;
unsigned long flags;

spin_lock_irqsave(&read_persistent_clock_lock, flags);

last_cycles = cycles;
cycles = sync32k_cnt_reg ? __raw_readl(sync32k_cnt_reg) : 0;
delta = cycles - last_cycles;

nsecs = clocksource_cyc2ns(delta, persistent_mult, persistent_shift);
nsecs = clocksource_cyc2ns(cycles - last_cycles,
persistent_mult, persistent_shift);

timespec_add_ns(&persistent_ts, nsecs);

*ts = persistent_ts;

timespec_add_ns(tsp, nsecs);
*ts = *tsp;
spin_unlock_irqrestore(&read_persistent_clock_lock, flags);
}

/**
Expand Down
8 changes: 4 additions & 4 deletions arch/arm/plat-omap/omap-pm-noop.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ int omap_pm_set_max_mpu_wakeup_lat(struct device *dev, long t)
if (!dev || t < -1) {
WARN(1, "OMAP PM: %s: invalid parameter(s)", __func__);
return -EINVAL;
};
}

if (t == -1)
pr_debug("OMAP PM: remove max MPU wakeup latency constraint: dev %s\n",
Expand Down Expand Up @@ -67,7 +67,7 @@ int omap_pm_set_min_bus_tput(struct device *dev, u8 agent_id, unsigned long r)
agent_id != OCP_TARGET_AGENT)) {
WARN(1, "OMAP PM: %s: invalid parameter(s)", __func__);
return -EINVAL;
};
}

if (r == 0)
pr_debug("OMAP PM: remove min bus tput constraint: dev %s for agent_id %d\n",
Expand All @@ -93,7 +93,7 @@ int omap_pm_set_max_dev_wakeup_lat(struct device *req_dev, struct device *dev,
if (!req_dev || !dev || t < -1) {
WARN(1, "OMAP PM: %s: invalid parameter(s)", __func__);
return -EINVAL;
};
}

if (t == -1)
pr_debug("OMAP PM: remove max device latency constraint: dev %s\n",
Expand Down Expand Up @@ -123,7 +123,7 @@ int omap_pm_set_max_sdma_lat(struct device *dev, long t)
if (!dev || t < -1) {
WARN(1, "OMAP PM: %s: invalid parameter(s)", __func__);
return -EINVAL;
};
}

if (t == -1)
pr_debug("OMAP PM: remove max DMA latency constraint: dev %s\n",
Expand Down

0 comments on commit 125c967

Please sign in to comment.