Commit 9d82d5ef authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'omap-fixes-for-linus' of...

Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6

* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
  omap: Disable serial port autoidle by default
  omap: Fix access to already released memory in clk_debugfs_register_one()
  omap: Fix arch/arm/mach-omap2/mux.c: Off by one error
  omap: Fix 3630 mux errors
  OMAP2/3: GPMC: ensure valid clock pointer
  OMAP2/3: IRQ: ensure valid base address
  ARCH OMAP : enable ARCH_HAS_HOLES_MEMORYMODEL for OMAP
  omap: Remove old unused defines for OMAP_32KSYNCT_BASE
  omap: define _toggle_gpio_edge_triggering only for OMAP1
parents a9861b50 301fe8ee
...@@ -702,6 +702,7 @@ config ARCH_OMAP ...@@ -702,6 +702,7 @@ config ARCH_OMAP
select ARCH_HAS_CPUFREQ select ARCH_HAS_CPUFREQ
select GENERIC_TIME select GENERIC_TIME
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select ARCH_HAS_HOLES_MEMORYMODEL
help help
Support for TI's OMAP platform (OMAP1 and OMAP2). Support for TI's OMAP platform (OMAP1 and OMAP2).
......
...@@ -505,7 +505,7 @@ static void __init gpmc_mem_init(void) ...@@ -505,7 +505,7 @@ static void __init gpmc_mem_init(void)
void __init gpmc_init(void) void __init gpmc_init(void)
{ {
u32 l; u32 l;
char *ck; char *ck = NULL;
if (cpu_is_omap24xx()) { if (cpu_is_omap24xx()) {
ck = "core_l3_ck"; ck = "core_l3_ck";
...@@ -521,6 +521,9 @@ void __init gpmc_init(void) ...@@ -521,6 +521,9 @@ void __init gpmc_init(void)
l = OMAP44XX_GPMC_BASE; l = OMAP44XX_GPMC_BASE;
} }
if (WARN_ON(!ck))
return;
gpmc_l3_clk = clk_get(NULL, ck); gpmc_l3_clk = clk_get(NULL, ck);
if (IS_ERR(gpmc_l3_clk)) { if (IS_ERR(gpmc_l3_clk)) {
printk(KERN_ERR "Could not get GPMC clock %s\n", ck); printk(KERN_ERR "Could not get GPMC clock %s\n", ck);
......
...@@ -194,7 +194,7 @@ void __init omap_init_irq(void) ...@@ -194,7 +194,7 @@ void __init omap_init_irq(void)
int i; int i;
for (i = 0; i < ARRAY_SIZE(irq_banks); i++) { for (i = 0; i < ARRAY_SIZE(irq_banks); i++) {
unsigned long base; unsigned long base = 0;
struct omap_irq_bank *bank = irq_banks + i; struct omap_irq_bank *bank = irq_banks + i;
if (cpu_is_omap24xx()) if (cpu_is_omap24xx())
...@@ -202,6 +202,8 @@ void __init omap_init_irq(void) ...@@ -202,6 +202,8 @@ void __init omap_init_irq(void)
else if (cpu_is_omap34xx()) else if (cpu_is_omap34xx())
base = OMAP34XX_IC_BASE; base = OMAP34XX_IC_BASE;
BUG_ON(!base);
/* Static mapping, never released */ /* Static mapping, never released */
bank->base_reg = ioremap(base, SZ_4K); bank->base_reg = ioremap(base, SZ_4K);
if (!bank->base_reg) { if (!bank->base_reg) {
......
...@@ -486,7 +486,7 @@ int __init omap_mux_init_signal(char *muxname, int val) ...@@ -486,7 +486,7 @@ int __init omap_mux_init_signal(char *muxname, int val)
static inline void omap_mux_decode(struct seq_file *s, u16 val) static inline void omap_mux_decode(struct seq_file *s, u16 val)
{ {
char *flags[OMAP_MUX_MAX_NR_FLAGS]; char *flags[OMAP_MUX_MAX_NR_FLAGS];
char mode[14]; char mode[sizeof("OMAP_MUX_MODE") + 1];
int i = -1; int i = -1;
sprintf(mode, "OMAP_MUX_MODE%d", val & 0x7); sprintf(mode, "OMAP_MUX_MODE%d", val & 0x7);
...@@ -553,6 +553,7 @@ static int omap_mux_dbg_board_show(struct seq_file *s, void *unused) ...@@ -553,6 +553,7 @@ static int omap_mux_dbg_board_show(struct seq_file *s, void *unused)
if (!m0_name) if (!m0_name)
continue; continue;
/* REVISIT: Needs to be updated if mode0 names get longer */
for (i = 0; i < OMAP_MUX_DEFNAME_LEN; i++) { for (i = 0; i < OMAP_MUX_DEFNAME_LEN; i++) {
if (m0_name[i] == '\0') { if (m0_name[i] == '\0') {
m0_def[i] = m0_name[i]; m0_def[i] = m0_name[i];
...@@ -968,6 +969,13 @@ static void __init omap_mux_init_list(struct omap_mux *superset) ...@@ -968,6 +969,13 @@ static void __init omap_mux_init_list(struct omap_mux *superset)
} }
#endif #endif
#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS)
if (!superset->muxnames || !superset->muxnames[0]) {
superset++;
continue;
}
#endif
entry = omap_mux_list_add(superset); entry = omap_mux_list_add(superset);
if (!entry) { if (!entry) {
printk(KERN_ERR "mux: Could not add entry\n"); printk(KERN_ERR "mux: Could not add entry\n");
......
...@@ -649,6 +649,53 @@ static struct omap_mux __initdata omap3_muxmodes[] = { ...@@ -649,6 +649,53 @@ static struct omap_mux __initdata omap3_muxmodes[] = {
_OMAP3_MUXENTRY(UART3_TX_IRTX, 166, _OMAP3_MUXENTRY(UART3_TX_IRTX, 166,
"uart3_tx_irtx", NULL, NULL, NULL, "uart3_tx_irtx", NULL, NULL, NULL,
"gpio_166", NULL, NULL, "safe_mode"), "gpio_166", NULL, NULL, "safe_mode"),
/* Only on 3630, see omap36xx_cbp_subset for the signals */
_OMAP3_MUXENTRY(GPMC_A11, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL),
_OMAP3_MUXENTRY(SAD2D_MBUSFLAG, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL),
_OMAP3_MUXENTRY(SAD2D_MREAD, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL),
_OMAP3_MUXENTRY(SAD2D_MWRITE, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL),
_OMAP3_MUXENTRY(SAD2D_SBUSFLAG, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL),
_OMAP3_MUXENTRY(SAD2D_SREAD, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL),
_OMAP3_MUXENTRY(SAD2D_SWRITE, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL),
_OMAP3_MUXENTRY(GPMC_A11, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL),
_OMAP3_MUXENTRY(SAD2D_MCAD28, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL),
_OMAP3_MUXENTRY(SAD2D_MCAD29, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL),
_OMAP3_MUXENTRY(SAD2D_MCAD32, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL),
_OMAP3_MUXENTRY(SAD2D_MCAD33, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL),
_OMAP3_MUXENTRY(SAD2D_MCAD34, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL),
_OMAP3_MUXENTRY(SAD2D_MCAD35, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL),
_OMAP3_MUXENTRY(SAD2D_MCAD36, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL),
{ .reg_offset = OMAP_MUX_TERMINATOR }, { .reg_offset = OMAP_MUX_TERMINATOR },
}; };
......
...@@ -36,7 +36,13 @@ ...@@ -36,7 +36,13 @@
#define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV 0x52 #define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV 0x52
#define UART_OMAP_WER 0x17 /* Wake-up enable register */ #define UART_OMAP_WER 0x17 /* Wake-up enable register */
#define DEFAULT_TIMEOUT (5 * HZ) /*
* NOTE: By default the serial timeout is disabled as it causes lost characters
* over the serial ports. This means that the UART clocks will stay on until
* disabled via sysfs. This also causes that any deeper omap sleep states are
* blocked.
*/
#define DEFAULT_TIMEOUT 0
struct omap_uart_state { struct omap_uart_state {
int num; int num;
...@@ -422,6 +428,7 @@ static void omap_uart_idle_init(struct omap_uart_state *uart) ...@@ -422,6 +428,7 @@ static void omap_uart_idle_init(struct omap_uart_state *uart)
uart->timeout = DEFAULT_TIMEOUT; uart->timeout = DEFAULT_TIMEOUT;
setup_timer(&uart->timer, omap_uart_idle_timer, setup_timer(&uart->timer, omap_uart_idle_timer,
(unsigned long) uart); (unsigned long) uart);
if (uart->timeout)
mod_timer(&uart->timer, jiffies + uart->timeout); mod_timer(&uart->timer, jiffies + uart->timeout);
omap_uart_smart_idle_enable(uart, 0); omap_uart_smart_idle_enable(uart, 0);
......
...@@ -391,7 +391,7 @@ static struct dentry *clk_debugfs_root; ...@@ -391,7 +391,7 @@ static struct dentry *clk_debugfs_root;
static int clk_debugfs_register_one(struct clk *c) static int clk_debugfs_register_one(struct clk *c)
{ {
int err; int err;
struct dentry *d, *child; struct dentry *d, *child, *child_tmp;
struct clk *pa = c->parent; struct clk *pa = c->parent;
char s[255]; char s[255];
char *p = s; char *p = s;
...@@ -423,7 +423,7 @@ static int clk_debugfs_register_one(struct clk *c) ...@@ -423,7 +423,7 @@ static int clk_debugfs_register_one(struct clk *c)
err_out: err_out:
d = c->dent; d = c->dent;
list_for_each_entry(child, &d->d_subdirs, d_u.d_child) list_for_each_entry_safe(child, child_tmp, &d->d_subdirs, d_u.d_child)
debugfs_remove(child); debugfs_remove(child);
debugfs_remove(c->dent); debugfs_remove(c->dent);
return err; return err;
......
...@@ -750,6 +750,7 @@ static inline void set_24xx_gpio_triggering(struct gpio_bank *bank, int gpio, ...@@ -750,6 +750,7 @@ static inline void set_24xx_gpio_triggering(struct gpio_bank *bank, int gpio,
} }
#endif #endif
#ifdef CONFIG_ARCH_OMAP1
/* /*
* This only applies to chips that can't do both rising and falling edge * This only applies to chips that can't do both rising and falling edge
* detection at once. For all other chips, this function is a noop. * detection at once. For all other chips, this function is a noop.
...@@ -760,11 +761,9 @@ static void _toggle_gpio_edge_triggering(struct gpio_bank *bank, int gpio) ...@@ -760,11 +761,9 @@ static void _toggle_gpio_edge_triggering(struct gpio_bank *bank, int gpio)
u32 l = 0; u32 l = 0;
switch (bank->method) { switch (bank->method) {
#ifdef CONFIG_ARCH_OMAP1
case METHOD_MPUIO: case METHOD_MPUIO:
reg += OMAP_MPUIO_GPIO_INT_EDGE; reg += OMAP_MPUIO_GPIO_INT_EDGE;
break; break;
#endif
#ifdef CONFIG_ARCH_OMAP15XX #ifdef CONFIG_ARCH_OMAP15XX
case METHOD_GPIO_1510: case METHOD_GPIO_1510:
reg += OMAP1510_GPIO_INT_CONTROL; reg += OMAP1510_GPIO_INT_CONTROL;
...@@ -787,6 +786,7 @@ static void _toggle_gpio_edge_triggering(struct gpio_bank *bank, int gpio) ...@@ -787,6 +786,7 @@ static void _toggle_gpio_edge_triggering(struct gpio_bank *bank, int gpio)
__raw_writel(l, reg); __raw_writel(l, reg);
} }
#endif
static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger) static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger)
{ {
......
...@@ -89,16 +89,6 @@ ...@@ -89,16 +89,6 @@
#define USE_WAKEUP_LAT 0 #define USE_WAKEUP_LAT 0
#define IGNORE_WAKEUP_LAT 1 #define IGNORE_WAKEUP_LAT 1
/* XXX this should be moved into a separate file */
#if defined(CONFIG_ARCH_OMAP2420)
# define OMAP_32KSYNCT_BASE 0x48004000
#elif defined(CONFIG_ARCH_OMAP2430)
# define OMAP_32KSYNCT_BASE 0x49020000
#elif defined(CONFIG_ARCH_OMAP3430)
# define OMAP_32KSYNCT_BASE 0x48320000
#else
# error Unknown OMAP device
#endif
/* Private functions */ /* Private functions */
......
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