diff options
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r-- | arch/arm/mach-omap1/board-nokia770.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap1/clock.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-omap1/irq.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/pm.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-omap1/serial.c | 18 |
5 files changed, 35 insertions, 21 deletions
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index cbe909bad79b..70014f751bc4 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c @@ -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> @@ -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, diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index 638490e62d5f..f625f6dd228a 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c @@ -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); @@ -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); } } } @@ -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) { @@ -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); @@ -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; } diff --git a/arch/arm/mach-omap1/irq.c b/arch/arm/mach-omap1/irq.c index 6383a12ad970..410d3e78dd0f 100644 --- a/arch/arm/mach-omap1/irq.c +++ b/arch/arm/mach-omap1/irq.c @@ -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); diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index 4834758d340c..49efe903dacd 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c @@ -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) @@ -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 @@ -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"); /* @@ -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 */ diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c index 4cc98a578e4b..10a4fe88b2fd 100644 --- a/arch/arm/mach-omap1/serial.c +++ b/arch/arm/mach-omap1/serial.c @@ -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 @@ -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)); } @@ -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; @@ -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()) { @@ -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()) { @@ -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); } |