-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 4438 b: refs/heads/master c: 5e1c5ff h: refs/heads/master v: v3
- Loading branch information
Tony Lindgren
authored and
Russell King
committed
Jul 10, 2005
1 parent
f44b4c9
commit 36281ee
Showing
13 changed files
with
4,636 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: b91585560b59fd3ef4e20ca6f7d35aefda193774 | ||
refs/heads/master: 5e1c5ff4783e0ddd241580c9996390508722190e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
if ARCH_OMAP | ||
|
||
menu "TI OMAP Implementations" | ||
|
||
config ARCH_OMAP_OTG | ||
bool | ||
|
||
choice | ||
prompt "OMAP System Type" | ||
default ARCH_OMAP1 | ||
|
||
config ARCH_OMAP1 | ||
bool "TI OMAP1" | ||
|
||
config ARCH_OMAP2 | ||
bool "TI OMAP2" | ||
|
||
endchoice | ||
|
||
comment "OMAP Feature Selections" | ||
|
||
config OMAP_MUX | ||
bool "OMAP multiplexing support" | ||
depends on ARCH_OMAP | ||
default y | ||
help | ||
Pin multiplexing support for OMAP boards. If your bootloader | ||
sets the multiplexing correctly, say N. Otherwise, or if unsure, | ||
say Y. | ||
|
||
config OMAP_MUX_DEBUG | ||
bool "Multiplexing debug output" | ||
depends on OMAP_MUX | ||
default n | ||
help | ||
Makes the multiplexing functions print out a lot of debug info. | ||
This is useful if you want to find out the correct values of the | ||
multiplexing registers. | ||
|
||
config OMAP_MUX_WARNINGS | ||
bool "Warn about pins the bootloader didn't set up" | ||
depends on OMAP_MUX | ||
default y | ||
help | ||
Choose Y here to warn whenever driver initialization logic needs | ||
to change the pin multiplexing setup. When there are no warnings | ||
printed, it's safe to deselect OMAP_MUX for your product. | ||
|
||
choice | ||
prompt "System timer" | ||
default OMAP_MPU_TIMER | ||
|
||
config OMAP_MPU_TIMER | ||
bool "Use mpu timer" | ||
help | ||
Select this option if you want to use the OMAP mpu timer. This | ||
timer provides more intra-tick resolution than the 32KHz timer, | ||
but consumes more power. | ||
|
||
config OMAP_32K_TIMER | ||
bool "Use 32KHz timer" | ||
depends on ARCH_OMAP16XX | ||
help | ||
Select this option if you want to enable the OMAP 32KHz timer. | ||
This timer saves power compared to the OMAP_MPU_TIMER, and has | ||
support for no tick during idle. The 32KHz timer provides less | ||
intra-tick resolution than OMAP_MPU_TIMER. The 32KHz timer is | ||
currently only available for OMAP-16xx. | ||
|
||
endchoice | ||
|
||
config OMAP_32K_TIMER_HZ | ||
int "Kernel internal timer frequency for 32KHz timer" | ||
range 32 1024 | ||
depends on OMAP_32K_TIMER | ||
default "128" | ||
help | ||
Kernel internal timer frequency should be a divisor of 32768, | ||
such as 64 or 128. | ||
|
||
choice | ||
prompt "Low-level debug console UART" | ||
depends on ARCH_OMAP | ||
default OMAP_LL_DEBUG_UART1 | ||
|
||
config OMAP_LL_DEBUG_UART1 | ||
bool "UART1" | ||
|
||
config OMAP_LL_DEBUG_UART2 | ||
bool "UART2" | ||
|
||
config OMAP_LL_DEBUG_UART3 | ||
bool "UART3" | ||
|
||
endchoice | ||
|
||
endmenu | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# | ||
# Makefile for the linux kernel. | ||
# | ||
|
||
# Common support | ||
obj-y := common.o dma.o clock.o mux.o gpio.o mcbsp.o usb.o | ||
obj-m := | ||
obj-n := | ||
obj- := | ||
|
||
# OCPI interconnect support for 1710, 1610 and 5912 | ||
obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o | ||
|
||
# Power Management | ||
obj-$(CONFIG_PM) += pm.o sleep.o | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
/* | ||
* linux/arch/arm/plat-omap/common.c | ||
* | ||
* Code common to all OMAP machines. | ||
* | ||
* 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 | ||
* published by the Free Software Foundation. | ||
*/ | ||
#include <linux/config.h> | ||
#include <linux/module.h> | ||
#include <linux/kernel.h> | ||
#include <linux/init.h> | ||
#include <linux/delay.h> | ||
#include <linux/pm.h> | ||
#include <linux/console.h> | ||
#include <linux/serial.h> | ||
#include <linux/tty.h> | ||
#include <linux/serial_8250.h> | ||
#include <linux/serial_reg.h> | ||
|
||
#include <asm/hardware.h> | ||
#include <asm/system.h> | ||
#include <asm/pgtable.h> | ||
#include <asm/mach/map.h> | ||
#include <asm/hardware/clock.h> | ||
#include <asm/io.h> | ||
#include <asm/mach-types.h> | ||
|
||
#include <asm/arch/board.h> | ||
#include <asm/arch/mux.h> | ||
#include <asm/arch/fpga.h> | ||
|
||
#include "clock.h" | ||
|
||
#define NO_LENGTH_CHECK 0xffffffff | ||
|
||
extern int omap_bootloader_tag_len; | ||
extern u8 omap_bootloader_tag[]; | ||
|
||
struct omap_board_config_kernel *omap_board_config; | ||
int omap_board_config_size = 0; | ||
|
||
static const void *get_config(u16 tag, size_t len, int skip, size_t *len_out) | ||
{ | ||
struct omap_board_config_kernel *kinfo = NULL; | ||
int i; | ||
|
||
#ifdef CONFIG_OMAP_BOOT_TAG | ||
struct omap_board_config_entry *info = NULL; | ||
|
||
if (omap_bootloader_tag_len > 4) | ||
info = (struct omap_board_config_entry *) omap_bootloader_tag; | ||
while (info != NULL) { | ||
u8 *next; | ||
|
||
if (info->tag == tag) { | ||
if (skip == 0) | ||
break; | ||
skip--; | ||
} | ||
|
||
if ((info->len & 0x03) != 0) { | ||
/* We bail out to avoid an alignment fault */ | ||
printk(KERN_ERR "OMAP peripheral config: Length (%d) not word-aligned (tag %04x)\n", | ||
info->len, info->tag); | ||
return NULL; | ||
} | ||
next = (u8 *) info + sizeof(*info) + info->len; | ||
if (next >= omap_bootloader_tag + omap_bootloader_tag_len) | ||
info = NULL; | ||
else | ||
info = (struct omap_board_config_entry *) next; | ||
} | ||
if (info != NULL) { | ||
/* Check the length as a lame attempt to check for | ||
* binary inconsistancy. */ | ||
if (len != NO_LENGTH_CHECK) { | ||
/* Word-align len */ | ||
if (len & 0x03) | ||
len = (len + 3) & ~0x03; | ||
if (info->len != len) { | ||
printk(KERN_ERR "OMAP peripheral config: Length mismatch with tag %x (want %d, got %d)\n", | ||
tag, len, info->len); | ||
return NULL; | ||
} | ||
} | ||
if (len_out != NULL) | ||
*len_out = info->len; | ||
return info->data; | ||
} | ||
#endif | ||
/* Try to find the config from the board-specific structures | ||
* in the kernel. */ | ||
for (i = 0; i < omap_board_config_size; i++) { | ||
if (omap_board_config[i].tag == tag) { | ||
kinfo = &omap_board_config[i]; | ||
break; | ||
} | ||
} | ||
if (kinfo == NULL) | ||
return NULL; | ||
return kinfo->data; | ||
} | ||
|
||
const void *__omap_get_config(u16 tag, size_t len, int nr) | ||
{ | ||
return get_config(tag, len, nr, NULL); | ||
} | ||
EXPORT_SYMBOL(__omap_get_config); | ||
|
||
const void *omap_get_var_config(u16 tag, size_t *len) | ||
{ | ||
return get_config(tag, NO_LENGTH_CHECK, 0, len); | ||
} | ||
EXPORT_SYMBOL(omap_get_var_config); | ||
|
||
static int __init omap_add_serial_console(void) | ||
{ | ||
const struct omap_serial_console_config *info; | ||
|
||
info = omap_get_config(OMAP_TAG_SERIAL_CONSOLE, | ||
struct omap_serial_console_config); | ||
if (info != NULL && info->console_uart) { | ||
static char speed[11], *opt = NULL; | ||
|
||
if (info->console_speed) { | ||
snprintf(speed, sizeof(speed), "%u", info->console_speed); | ||
opt = speed; | ||
} | ||
return add_preferred_console("ttyS", info->console_uart - 1, opt); | ||
} | ||
return 0; | ||
} | ||
console_initcall(omap_add_serial_console); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* linux/arch/arm/plat-omap/common.h | ||
* | ||
* Header for code common to all OMAP machines. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the | ||
* Free Software Foundation; either version 2 of the License, or (at your | ||
* option) any later version. | ||
* | ||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
* | ||
* You should have received a copy of the GNU General Public License along | ||
* with this program; if not, write to the Free Software Foundation, Inc., | ||
* 675 Mass Ave, Cambridge, MA 02139, USA. | ||
*/ | ||
|
||
#ifndef __ARCH_ARM_MACH_OMAP_COMMON_H | ||
#define __ARCH_ARM_MACH_OMAP_COMMON_H | ||
|
||
struct sys_timer; | ||
|
||
extern void omap_map_common_io(void); | ||
extern struct sys_timer omap_timer; | ||
extern void omap_serial_init(int ports[]); | ||
|
||
#endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */ |
Oops, something went wrong.