Commit 83c0cf67 authored by Tony Lindgren's avatar Tony Lindgren Committed by Russell King

[ARM PATCH] 1885/1: OMAP update 2/2: include files

Patch from Tony Lindgren

This patch syncs the mainline kernel with the linux-omap tree.
The highlights of the patch are:
- Changed the BOOT_MEM() to use the new IO address (Tony Lindgren)
- Cleaned up interrupt handler (Juha Yrjölä)
- DMA channel linking for 1610 (Samuel Ortiz)
- GPIO fixes (Juha Yrjölä)
- IRQ fix for OMAP-730 (Kevin Hilman)
- OMAP-1510 FPGA interrupt fix (Dirk Behme)
- OMAP-1610 voltage change settings (Todd Poynor)
- Uncompress kernel serial output fixes (Tony Lindgren)
parent 74cc274e
......@@ -208,6 +208,9 @@ extern void omap_set_dma_src_params(int lch, int src_port, int src_amode,
extern void omap_set_dma_dest_params(int lch, int dest_port, int dest_amode,
unsigned long dest_start);
extern void omap_dma_link_lch (int lch_head, int lch_queue);
extern void omap_dma_unlink_lch (int lch_head, int lch_queue);
/* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */
extern int omap_dma_in_1510_mode(void);
......
......@@ -295,26 +295,33 @@ typedef struct { volatile u32 offset[4096]; } __regbase32;
*/
#define OMAP_ID_REG __REG32(0xfffed404)
/* See also uncompress.h */
#define OMAP_ID_730 0xB55F
#define OMAP_ID_1510 0xB470
#define OMAP_ID_1610 0xB576
#define OMAP_ID_1710 0xB5F7
#define OMAP_ID_5912 0xB58C
#ifdef CONFIG_ARCH_OMAP730
#include "omap730.h"
#define cpu_is_omap730() (((OMAP_ID_REG >> 12) & 0xffff) == 0xB55F)
#define cpu_is_omap730() (((OMAP_ID_REG >> 12) & 0xffff) == OMAP_ID_730)
#else
#define cpu_is_omap730() 0
#endif
#ifdef CONFIG_ARCH_OMAP1510
#include "omap1510.h"
#define cpu_is_omap1510() (((OMAP_ID_REG >> 12) & 0xffff) == 0xB470)
#define cpu_is_omap1510() (((OMAP_ID_REG >> 12) & 0xffff) == OMAP_ID_1510)
#else
#define cpu_is_omap1510() 0
#endif
#ifdef CONFIG_ARCH_OMAP1610
#include "omap1610.h"
#define cpu_is_omap1710() (((OMAP_ID_REG >> 12) & 0xffff) == 0xB5F7)
#define cpu_is_omap1710() (((OMAP_ID_REG >> 12) & 0xffff) == OMAP_ID_1710)
/* Detect 1710 as 1610 for now */
#define cpu_is_omap1610() (((OMAP_ID_REG >> 12) & 0xffff) == 0xB576 || \
cpu_is_omap1710())
#define cpu_is_omap1610() (((OMAP_ID_REG >> 12) & 0xffff) == OMAP_ID_1610 \
|| cpu_is_omap1710())
#else
#define cpu_is_omap1610() 0
#define cpu_is_omap1710() 0
......@@ -322,7 +329,7 @@ typedef struct { volatile u32 offset[4096]; } __regbase32;
#ifdef CONFIG_ARCH_OMAP5912
#include "omap5912.h"
#define cpu_is_omap5912() (((OMAP_ID_REG >> 12) & 0xffff) == 0xB58C)
#define cpu_is_omap5912() (((OMAP_ID_REG >> 12) & 0xffff) == OMAP_ID_5912)
#else
#define cpu_is_omap5912() 0
#endif
......
......@@ -458,7 +458,7 @@ MUX_CFG("E19_1610_KBR4", 3, 18, 0, 0, 6, 1, 0, 1, 0)
MUX_CFG("N19_1610_KBR5", 6, 12, 1, 1, 2, 1, 1, 1, 0)
/* Power management */
MUX_CFG("T20_1610_LOW_PWR", 7, 12, 1, 0, 0, 0, NA, 0, 0)
MUX_CFG("T20_1610_LOW_PWR", 7, 12, 1, NA, 0, 0, NA, 0, 0)
};
#endif /* __MUX_C__ */
......
......@@ -25,8 +25,8 @@
#include <asm/arch/serial.h>
#define UART_OMAP_MDR1 0x08 /* mode definition register */
#define check_port(base, shift) ((base[UART_OMAP_MDR1 << shift] & 7) == 0)
#define omap_get_id() ((*(volatile unsigned int *)(0xfffed404)) >> 12) & 0xffff
static void
puts(const char *s)
......@@ -34,17 +34,27 @@ puts(const char *s)
volatile u8 * uart = 0;
int shift = 0;
#ifdef CONFIG_OMAP_LL_DEBUG_UART3
uart = (volatile u8 *)(OMAP_UART3_BASE);
#elif CONFIG_OMAP_LL_DEBUG_UART2
uart = (volatile u8 *)(OMAP_UART2_BASE);
#else
uart = (volatile u8 *)(OMAP_UART1_BASE);
#endif
/* Determine which serial port to use */
do {
if (machine_is_omap_innovator() || machine_is_omap_osk()) {
/* MMU is not on, so cpu_is_omapXXXX() won't work here */
unsigned int omap_id = omap_get_id();
if (omap_id == OMAP_ID_1510 || omap_id == OMAP_ID_1610 ||
omap_id == OMAP_ID_1710 || omap_id == OMAP_ID_5912) {
shift = 2;
uart = (volatile u8 *)(OMAP_UART1_BASE);
} else if (machine_is_omap_perseus2()) {
} else if (omap_id == OMAP_ID_730) {
shift = 0;
uart = (volatile u8 *)(OMAP_UART1_BASE);
} else {
/* Assume nothing for unknown machines.
* Add an entry for your machine to select
/* Assume nothing for unknown OMAP processors.
* Add an entry for your OMAP type to select
* the default serial console here. If the
* serial port is enabled, we'll use it to
* display status messages. Else we'll be
......
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