Skip to content

Commit

Permalink
Merge master.kernel.org:/home/rmk/linux-2.6-arm
Browse files Browse the repository at this point in the history
* master.kernel.org:/home/rmk/linux-2.6-arm: (30 commits)
  [ARM] Acorn: move the i2c bus driver into drivers/i2c
  [ARM] ARM SCSI: Don't try to dma_map_sg too many scatterlist entries
  [ARM] ARM FAS216: don't modify scsi_cmnd request_bufflen
  [ARM] rtc-pcf8583: Final fixes for this RTC on RiscPC
  [ARM] rtc-pcf8583: correct month and year offsets
  [ARM] rtc-pcf8583: don't use BCD_TO_BIN/BIN_TO_BCD
  [ARM] EBSA110: Work around build errors
  [ARM] 4241/1: Define mb() as compiler barrier on a uniprocessor system
  [ARM] 4239/1: S3C24XX: Update kconfig entries for PM
  [ARM] 4238/1: S3C24XX: docs: update suspend and resume
  [ARM] 4237/2: oprofile: Always allow backtraces on ARM
  [ARM] Yet more asm/apm-emulation.h stuff
  ARM: OMAP: Add missing get_irqnr_preamble and arch_ret_to_user for omap2
  ARM: OMAP: Use linux/delay.h not asm/delay.h
  ARM: OMAP: Remove obsolete alsa typedefs
  ARM: OMAP: omap1510->15xx conversions needed for sx1
  ARM: OMAP: Add missing includes to board-nokia770
  ARM: OMAP: Workqueue changes for board-h4.c
  ARM: OMAP: dmtimer.c omap1 register fix
  ARM: OMAP: board-nokia770: correct lcd name
  ...
  • Loading branch information
Linus Torvalds committed Mar 4, 2007
2 parents 2c89a8d + 8d91cba commit 4227003
Show file tree
Hide file tree
Showing 36 changed files with 280 additions and 802 deletions.
35 changes: 33 additions & 2 deletions Documentation/arm/Samsung-S3C24XX/Suspend.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
Introduction
------------

The S3C2410 supports a low-power suspend mode, where the SDRAM is kept
The S3C24XX supports a low-power suspend mode, where the SDRAM is kept
in Self-Refresh mode, and all but the essential peripheral blocks are
powered down. For more information on how this works, please look
at the S3C2410 datasheets from Samsung.
at the relevant CPU datasheet from Samsung.


Requirements
Expand Down Expand Up @@ -56,6 +56,27 @@ Machine Support
Note, the original method of adding an late_initcall() is wrong,
and will end up initialising all compiled machines' pm init!

The following is an example of code used for testing wakeup from
an falling edge on IRQ_EINT0:


static irqreturn_t button_irq(int irq, void *pw)
{
return IRQ_HANDLED;
}

statuc void __init machine_init(void)
{
...

request_irq(IRQ_EINT0, button_irq, IRQF_TRIGGER_FALLING,
"button-irq-eint0", NULL);

enable_irq_wake(IRQ_EINT0);

s3c2410_pm_init();
}


Debugging
---------
Expand All @@ -70,6 +91,12 @@ Debugging
care should be taken that any external clock sources that the UARTs
rely on are still enabled at that point.

3) If any debugging is placed in the resume path, then it must have the
relevant clocks and peripherals setup before use (ie, bootloader).

For example, if you transmit a character from the UART, the baud
rate and uart controls must be setup beforehand.


Configuration
-------------
Expand All @@ -89,6 +116,10 @@ Configuration
Allows the entire memory to be checksummed before and after the
suspend to see if there has been any corruption of the contents.

Note, the time to calculate the CRC is dependant on the CPU speed
and the size of memory. For an 64Mbyte RAM area on an 200MHz
S3C2410, this can take approximately 4 seconds to complete.

This support requires the CRC32 function to be enabled.


Expand Down
1 change: 1 addition & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ config ARCH_CO285
config ARCH_EBSA110
bool "EBSA-110"
select ISA
select NO_IOPORT
help
This is an evaluation board for the StrongARM processor available
from Digital. It has limited hardware on-board, including an
Expand Down
4 changes: 3 additions & 1 deletion arch/arm/mach-omap1/board-nokia770.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#include <linux/spi/spi.h>
#include <linux/spi/ads7846.h>
#include <linux/workqueue.h>
#include <linux/delay.h>

#include <asm/hardware.h>
#include <asm/mach-types.h>
Expand Down Expand Up @@ -103,7 +105,7 @@ static struct ads7846_platform_data nokia770_ads7846_platform_data __initdata =

static struct spi_board_info nokia770_spi_board_info[] __initdata = {
[0] = {
.modalias = "lcd_lph8923",
.modalias = "lcd_mipid",
.bus_num = 2,
.chip_select = 3,
.max_speed_hz = 12000000,
Expand Down
20 changes: 13 additions & 7 deletions arch/arm/mach-omap1/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,7 @@ static int omap1_clk_enable(struct clk *clk)
}

if (clk->flags & CLOCK_NO_IDLE_PARENT)
if (!cpu_is_omap24xx())
omap1_clk_deny_idle(clk->parent);
omap1_clk_deny_idle(clk->parent);
}

ret = clk->enable(clk);
Expand All @@ -454,8 +453,7 @@ static void omap1_clk_disable(struct clk *clk)
if (likely(clk->parent)) {
omap1_clk_disable(clk->parent);
if (clk->flags & CLOCK_NO_IDLE_PARENT)
if (!cpu_is_omap24xx())
omap1_clk_allow_idle(clk->parent);
omap1_clk_allow_idle(clk->parent);
}
}
}
Expand All @@ -471,7 +469,7 @@ static int omap1_clk_enable_generic(struct clk *clk)
if (unlikely(clk->enable_reg == 0)) {
printk(KERN_ERR "clock.c: Enable for %s without enable code\n",
clk->name);
return 0;
return -EINVAL;
}

if (clk->flags & ENABLE_REG_32BIT) {
Expand Down Expand Up @@ -651,10 +649,18 @@ int __init omap1_clk_init(void)
int crystal_type = 0; /* Default 12 MHz */
u32 reg;

#ifdef CONFIG_DEBUG_LL
/* Resets some clocks that may be left on from bootloader,
* but leaves serial clocks on.
*/
omap_writel(0x3 << 29, MOD_CONF_CTRL_0);
#endif

/* USB_REQ_EN will be disabled later if necessary (usb_dc_ck) */
reg = omap_readw(SOFT_REQ_REG) & (1 << 4);
omap_writew(reg, SOFT_REQ_REG);
omap_writew(0, SOFT_REQ_REG2);
if (!cpu_is_omap15xx())
omap_writew(0, SOFT_REQ_REG2);

clk_init(&omap1_clk_functions);

Expand Down Expand Up @@ -685,7 +691,7 @@ int __init omap1_clk_init(void)

info = omap_get_config(OMAP_TAG_CLOCK, struct omap_clock_config);
if (info != NULL) {
if (!cpu_is_omap1510())
if (!cpu_is_omap15xx())
crystal_type = info->system_clock_type;
}

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ void __init omap_init_irq(void)

if (cpu_is_omap730())
omap_unmask_irq(INT_730_IH2_IRQ);
else if (cpu_is_omap1510())
else if (cpu_is_omap15xx())
omap_unmask_irq(INT_1510_IH2_IRQ);
else if (cpu_is_omap16xx())
omap_unmask_irq(INT_1610_IH2_IRQ);
Expand Down
12 changes: 9 additions & 3 deletions arch/arm/mach-omap1/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ void omap_pm_suspend(void)
tps65010_set_led(LED1, OFF);
}

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

/*
* Step 1: turn off interrupts (FIXME: NOTE: already disabled)
Expand Down Expand Up @@ -434,7 +435,8 @@ void omap_pm_suspend(void)
MPUI1610_RESTORE(OMAP_IH2_3_MIR);
}

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

/*
* Reenable interrupts
Expand Down Expand Up @@ -704,6 +706,8 @@ static struct pm_ops omap_pm_ops ={

static int __init omap_pm_init(void)
{
int error;

printk("Power Management for TI OMAP.\n");

/*
Expand Down Expand Up @@ -760,7 +764,9 @@ static int __init omap_pm_init(void)
omap_pm_init_proc();
#endif

subsys_create_file(&power_subsys, &sleep_while_idle_attr);
error = subsys_create_file(&power_subsys, &sleep_while_idle_attr);
if (error)
printk(KERN_ERR "subsys_create_file failed: %d\n", error);

if (cpu_is_omap16xx()) {
/* configure LOW_PWR pin */
Expand Down
18 changes: 9 additions & 9 deletions arch/arm/mach-omap1/serial.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* linux/arch/arm/mach-omap1/serial.c
*
* OMAP1 CPU identification code
* OMAP1 serial support.
*
* 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
Expand Down Expand Up @@ -59,7 +59,7 @@ static void __init omap_serial_reset(struct plat_serial8250_port *p)
omap_serial_outp(p, UART_OMAP_SCR, 0x08); /* TX watermark */
omap_serial_outp(p, UART_OMAP_MDR1, 0x00); /* enable UART */

if (!cpu_is_omap1510()) {
if (!cpu_is_omap15xx()) {
omap_serial_outp(p, UART_OMAP_SYSC, 0x01);
while (!(omap_serial_in(p, UART_OMAP_SYSC) & 0x01));
}
Expand Down Expand Up @@ -121,7 +121,7 @@ void __init omap_serial_init(void)
serial_platform_data[1].irq = INT_730_UART_MODEM_IRDA_2;
}

if (cpu_is_omap1510()) {
if (cpu_is_omap15xx()) {
serial_platform_data[0].uartclk = OMAP1510_BASE_BAUD * 16;
serial_platform_data[1].uartclk = OMAP1510_BASE_BAUD * 16;
serial_platform_data[2].uartclk = OMAP1510_BASE_BAUD * 16;
Expand All @@ -147,10 +147,10 @@ void __init omap_serial_init(void)
printk("Could not get uart1_ck\n");
else {
clk_enable(uart1_ck);
if (cpu_is_omap1510())
if (cpu_is_omap15xx())
clk_set_rate(uart1_ck, 12000000);
}
if (cpu_is_omap1510()) {
if (cpu_is_omap15xx()) {
omap_cfg_reg(UART1_TX);
omap_cfg_reg(UART1_RTS);
if (machine_is_omap_innovator()) {
Expand All @@ -167,12 +167,12 @@ void __init omap_serial_init(void)
printk("Could not get uart2_ck\n");
else {
clk_enable(uart2_ck);
if (cpu_is_omap1510())
if (cpu_is_omap15xx())
clk_set_rate(uart2_ck, 12000000);
else
clk_set_rate(uart2_ck, 48000000);
}
if (cpu_is_omap1510()) {
if (cpu_is_omap15xx()) {
omap_cfg_reg(UART2_TX);
omap_cfg_reg(UART2_RTS);
if (machine_is_omap_innovator()) {
Expand All @@ -189,10 +189,10 @@ void __init omap_serial_init(void)
printk("Could not get uart3_ck\n");
else {
clk_enable(uart3_ck);
if (cpu_is_omap1510())
if (cpu_is_omap15xx())
clk_set_rate(uart3_ck, 12000000);
}
if (cpu_is_omap1510()) {
if (cpu_is_omap15xx()) {
omap_cfg_reg(UART3_TX);
omap_cfg_reg(UART3_RX);
}
Expand Down
13 changes: 7 additions & 6 deletions arch/arm/mach-omap2/board-h4.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include "prcm-regs.h"

#include <asm/io.h>
#include <asm/delay.h>

static unsigned int row_gpios[6] = { 88, 89, 124, 11, 6, 96 };
static unsigned int col_gpios[7] = { 90, 91, 100, 36, 12, 97, 98 };
Expand Down Expand Up @@ -179,9 +178,11 @@ static int h4_select_irda(struct device *dev, int state)
return err;
}

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

Expand All @@ -191,7 +192,7 @@ static void set_trans_mode(void *data)

expa &= ~0x01;

if (!(*mode & IR_SIRMODE)) { /* MIR/FIR */
if (!(mode & IR_SIRMODE)) { /* MIR/FIR */
expa |= 0x01;
}

Expand All @@ -204,9 +205,9 @@ static int h4_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_WORK(&irda_config->gpio_expa, set_trans_mode, &mode);
#error this is not permitted - mode is an argument variable
PREPARE_DELAYED_WORK(&irda_config->gpio_expa, set_trans_mode);
schedule_delayed_work(&irda_config->gpio_expa, 0);

return 0;
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/mach-omap2/timer-gp.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/irq.h>

#include <asm/mach/time.h>
#include <asm/arch/dmtimer.h>
Expand Down Expand Up @@ -64,7 +65,7 @@ static void __init omap2_gp_timer_init(void)
BUG_ON(gptimer == NULL);

omap_dm_timer_set_source(gptimer, OMAP_TIMER_SRC_SYS_CLK);
tick_period = clk_get_rate(omap_dm_timer_get_fclk(gptimer)) / 100;
tick_period = clk_get_rate(omap_dm_timer_get_fclk(gptimer)) / HZ;
tick_period -= 1;

setup_irq(omap_dm_timer_get_irq(gptimer), &omap2_gp_timer_irq);
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/mach-pxa/corgi_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <asm/apm-emulation.h>
#include <linux/apm-emulation.h>

#include <asm/irq.h>
#include <asm/mach-types.h>
#include <asm/hardware.h>
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/mach-pxa/spitz_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <asm/apm-emulation.h>
#include <linux/apm-emulation.h>

#include <asm/irq.h>
#include <asm/mach-types.h>
#include <asm/hardware.h>
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/oprofile/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
struct op_arm_model_spec *spec = NULL;
int ret = -ENODEV;

ops->backtrace = arm_backtrace;

#ifdef CONFIG_CPU_XSCALE
spec = &op_xscale_spec;
#endif
Expand Down Expand Up @@ -161,7 +163,6 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
ops->start = op_arm_start;
ops->stop = op_arm_stop;
ops->cpu_type = op_arm_model->name;
ops->backtrace = arm_backtrace;
printk(KERN_INFO "oprofile: using %s\n", spec->name);
}

Expand Down
Loading

0 comments on commit 4227003

Please sign in to comment.