Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64590
b: refs/heads/master
c: 8e54588
h: refs/heads/master
v: v3
  • Loading branch information
Arjan van de Ven authored and David S. Miller committed Aug 28, 2007
1 parent e00493c commit f79add5
Show file tree
Hide file tree
Showing 65 changed files with 4,362 additions and 2,922 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2d8348b429b4ae5cc47449c787881221fe43af4b
refs/heads/master: 8e54588161577435d64dfb5cfdf40a73a5705ea0
7 changes: 2 additions & 5 deletions trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -721,8 +721,7 @@ config LEDS

config LEDS_TIMER
bool "Timer LED" if (!ARCH_CDB89712 && !ARCH_OMAP) || \
OMAP_OSK_MISTRAL || MACH_OMAP_H2 \
|| MACH_OMAP_PERSEUS2
MACH_OMAP_H2 || MACH_OMAP_PERSEUS2
depends on LEDS
depends on !GENERIC_CLOCKEVENTS
default y if ARCH_EBSA110
Expand All @@ -739,9 +738,7 @@ config LEDS_TIMER

config LEDS_CPU
bool "CPU usage LED" if (!ARCH_CDB89712 && !ARCH_EBSA110 && \
!ARCH_OMAP) \
|| OMAP_OSK_MISTRAL || MACH_OMAP_H2 \
|| MACH_OMAP_PERSEUS2
!ARCH_OMAP) || MACH_OMAP_H2 || MACH_OMAP_PERSEUS2
depends on LEDS
help
If you say Y here, the red LED will be used to give a good real
Expand Down
7 changes: 3 additions & 4 deletions trunk/arch/arm/mach-imx/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,10 @@ EXPORT_SYMBOL(imx_gpio_mode);

int imx_gpio_request(unsigned gpio, const char *label)
{
if(gpio >= (GPIO_PORT_MAX + 1) * 32) {
if(gpio >= (GPIO_PORT_MAX + 1) * 32)
printk(KERN_ERR "imx_gpio: Attempt to request nonexistent GPIO %d for \"%s\"\n",
gpio, label ? label : "?");
return -EINVAL;
}

if(test_and_set_bit(gpio, imx_gpio_alloc_map)) {
printk(KERN_ERR "imx_gpio: GPIO %d already used. Allocation for \"%s\" failed\n",
Expand All @@ -130,7 +129,7 @@ EXPORT_SYMBOL(imx_gpio_free);

int imx_gpio_direction_input(unsigned gpio)
{
imx_gpio_mode(gpio | GPIO_IN | GPIO_GIUS | GPIO_DR);
imx_gpio_mode(gpio| GPIO_IN);
return 0;
}

Expand All @@ -139,7 +138,7 @@ EXPORT_SYMBOL(imx_gpio_direction_input);
int imx_gpio_direction_output(unsigned gpio, int value)
{
imx_gpio_set_value(gpio, value);
imx_gpio_mode(gpio | GPIO_OUT | GPIO_GIUS | GPIO_DR);
imx_gpio_mode(gpio| GPIO_OUT);
return 0;
}

Expand Down
12 changes: 5 additions & 7 deletions trunk/arch/arm/mach-omap1/board-h3.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,9 @@ static int h3_select_irda(struct device *dev, int state)
return err;
}

static void set_trans_mode(struct work_struct *work)
static void set_trans_mode(void *data)
{
struct omap_irda_config *irda_config =
container_of(work, struct omap_irda_config, gpio_expa.work);
int mode = irda_config->mode;
int *mode = data;
unsigned char expa;
int err = 0;

Expand All @@ -308,7 +306,7 @@ static void set_trans_mode(struct work_struct *work)

expa &= ~0x03;

if (mode & IR_SIRMODE) {
if (*mode & IR_SIRMODE) {
expa |= 0x01;
} else { /* MIR/FIR */
expa |= 0x03;
Expand All @@ -323,9 +321,9 @@ static int h3_transceiver_mode(struct device *dev, int mode)
{
struct omap_irda_config *irda_config = dev->platform_data;

irda_config->mode = mode;
cancel_delayed_work(&irda_config->gpio_expa);
PREPARE_DELAYED_WORK(&irda_config->gpio_expa, set_trans_mode);
PREPARE_WORK(&irda_config->gpio_expa, set_trans_mode, &mode);
#error this is not permitted - mode is an argument variable
schedule_delayed_work(&irda_config->gpio_expa, 0);

return 0;
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/arm/mach-omap1/leds-osk.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ void osk_leds_event(led_event_t evt)
mistral_setled();
break;

case led_idle_start: /* idle == off */
hw_led_state &= ~IDLE_LED;
case led_idle_start:
hw_led_state |= IDLE_LED;
mistral_setled();
break;

case led_idle_end:
hw_led_state |= IDLE_LED;
hw_led_state &= ~IDLE_LED;
mistral_setled();
break;

Expand Down
11 changes: 11 additions & 0 deletions trunk/arch/arm/mach-omap1/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
#include <asm/arch/tc.h>
#include <asm/arch/pm.h>
#include <asm/arch/mux.h>
#include <asm/arch/tps65010.h>
#include <asm/arch/dma.h>
#include <asm/arch/dsp_common.h>
#include <asm/arch/dmtimer.h>
Expand Down Expand Up @@ -249,6 +250,11 @@ void omap_pm_suspend(void)

omap_serial_wake_trigger(1);

if (machine_is_omap_osk()) {
/* Stop LED1 (D9) blink */
tps65010_set_led(LED1, OFF);
}

if (!cpu_is_omap15xx())
omap_writew(0xffff, ULPD_SOFT_DISABLE_REQ_REG);

Expand Down Expand Up @@ -441,6 +447,11 @@ void omap_pm_suspend(void)
omap_serial_wake_trigger(0);

printk("PM: OMAP%x is re-starting from deep sleep...\n", system_rev);

if (machine_is_omap_osk()) {
/* Let LED1 (D9) blink again */
tps65010_set_led(LED1, BLINK);
}
}

#if defined(DEBUG) && defined(CONFIG_PROC_FS)
Expand Down
13 changes: 11 additions & 2 deletions trunk/arch/arm/mach-omap2/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1160,8 +1160,8 @@ int __init omap2_clk_init(void)
clk_enable(&sync_32k_ick);
clk_enable(&omapctrl_ick);

/* Force the APLLs always active. The clocks are idled
* automatically by hardware. */
/* Force the APLLs active during bootup to avoid disabling and
* enabling them unnecessarily. */
clk_enable(&apll96_ck);
clk_enable(&apll54_ck);

Expand All @@ -1174,3 +1174,12 @@ int __init omap2_clk_init(void)

return 0;
}

static int __init omap2_disable_aplls(void)
{
clk_disable(&apll96_ck);
clk_disable(&apll54_ck);

return 0;
}
late_initcall(omap2_disable_aplls);
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-omap2/serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static inline void __init omap_serial_reset(struct plat_serial8250_port *p)
serial_write_reg(p, UART_OMAP_MDR1, 0x07);
serial_write_reg(p, UART_OMAP_SCR, 0x08);
serial_write_reg(p, UART_OMAP_MDR1, 0x00);
serial_write_reg(p, UART_OMAP_SYSC, (0x02 << 3) | (1 << 2) | (1 << 0));
serial_write_reg(p, UART_OMAP_SYSC, 0x01);
}

void __init omap_serial_init()
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-pxa/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ void __init pxa_init_irq_gpio(int gpio_nr)
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
}

for (irq = IRQ_GPIO(2); irq < IRQ_GPIO(gpio_nr); irq++) {
for (irq = IRQ_GPIO(2); irq <= IRQ_GPIO(gpio_nr); irq++) {
set_irq_chip(irq, &pxa_muxed_gpio_chip);
set_irq_handler(irq, handle_edge_irq);
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/plat-omap/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ console_initcall(omap_add_serial_console);
#if defined(CONFIG_ARCH_OMAP16XX)
#define TIMER_32K_SYNCHRONIZED 0xfffbc410
#elif defined(CONFIG_ARCH_OMAP24XX)
#define TIMER_32K_SYNCHRONIZED (OMAP24XX_32KSYNCT_BASE + 0x10)
#define TIMER_32K_SYNCHRONIZED 0x48004010
#endif

#ifdef TIMER_32K_SYNCHRONIZED
Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/arm/plat-omap/dmtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,11 @@ int omap_dm_timer_get_irq(struct omap_dm_timer *timer)

#if defined(CONFIG_ARCH_OMAP1)

struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer)
{
BUG();
}

/**
* omap_dm_timer_modify_idlect_mask - Check if any running timers use ARMXOR
* @inputmask: current value of idlect mask
Expand Down
10 changes: 6 additions & 4 deletions trunk/arch/arm/plat-omap/timer32k.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct sys_timer omap_timer;
#if defined(CONFIG_ARCH_OMAP16XX)
#define TIMER_32K_SYNCHRONIZED 0xfffbc410
#elif defined(CONFIG_ARCH_OMAP24XX)
#define TIMER_32K_SYNCHRONIZED (OMAP24XX_32KSYNCT_BASE + 0x10)
#define TIMER_32K_SYNCHRONIZED 0x48004010
#else
#error OMAP 32KHz timer does not currently work on 15XX!
#endif
Expand Down Expand Up @@ -147,15 +147,14 @@ static inline void omap_32k_timer_ack_irq(void)
static void omap_32k_timer_set_mode(enum clock_event_mode mode,
struct clock_event_device *evt)
{
omap_32k_timer_stop();

switch (mode) {
case CLOCK_EVT_MODE_ONESHOT:
case CLOCK_EVT_MODE_PERIODIC:
omap_32k_timer_start(OMAP_32K_TIMER_TICK_PERIOD);
break;
case CLOCK_EVT_MODE_ONESHOT:
case CLOCK_EVT_MODE_UNUSED:
case CLOCK_EVT_MODE_SHUTDOWN:
omap_32k_timer_stop();
break;
case CLOCK_EVT_MODE_RESUME:
break;
Expand Down Expand Up @@ -195,6 +194,8 @@ omap_32k_ticks_to_nsecs(unsigned long ticks_32k)
return (unsigned long long) ticks_32k * 1000 * 5*5*5*5*5*5 >> 9;
}

static unsigned long omap_32k_last_tick = 0;

/*
* Returns current time from boot in nsecs. It's OK for this to wrap
* around for now, as it's just a relative time stamp.
Expand Down Expand Up @@ -224,6 +225,7 @@ static __init void omap_init_32k_timer(void)
{
if (cpu_class_is_omap1())
setup_irq(INT_OS_TIMER, &omap_32k_timer_irq);
omap_32k_last_tick = omap_32k_sync_timer_read();

#ifdef CONFIG_ARCH_OMAP2
/* REVISIT: Check 24xx TIOCP_CFG settings after idle works */
Expand Down
Loading

0 comments on commit f79add5

Please sign in to comment.