diff options
| author | Len Brown <len.brown@intel.com> | 2004-10-27 21:00:02 -0400 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2004-10-27 21:00:02 -0400 |
| commit | 894f06ceebccb5832383224ed88cc0b1383c4368 (patch) | |
| tree | 254a6cf68ceef195c8d955160ef1e9b744a762aa /include | |
| parent | ed7cb3993ac782d927960d81df7e41c10ea16e24 (diff) | |
| parent | 52ecc79b690afcfbff6b3079a68ee000a58a515c (diff) | |
merge
Diffstat (limited to 'include')
75 files changed, 881 insertions, 698 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 0cc9b8c2ecb5..b4479061b8f9 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -105,7 +105,8 @@ typedef int (*acpi_op_resume) (struct acpi_device *device, int state); typedef int (*acpi_op_scan) (struct acpi_device *device); typedef int (*acpi_op_bind) (struct acpi_device *device); typedef int (*acpi_op_unbind) (struct acpi_device *device); -typedef int (*acpi_op_match) (struct acpi_device *device, struct acpi_driver *driver); +typedef int (*acpi_op_match) (struct acpi_device *device, + struct acpi_driver *driver); struct acpi_device_ops { acpi_op_add add; @@ -332,6 +333,7 @@ int acpi_bus_add (struct acpi_device **child, struct acpi_device *parent, acpi_handle handle, int type); +int acpi_match_ids (struct acpi_device *device, char *ids); int acpi_create_dir(struct acpi_device *); void acpi_remove_dir(struct acpi_device *); diff --git a/include/asm-arm/arch-omap/board-h2.h b/include/asm-arm/arch-omap/board-h2.h index e51f24888302..9c8ad4299947 100644 --- a/include/asm-arm/arch-omap/board-h2.h +++ b/include/asm-arm/arch-omap/board-h2.h @@ -36,10 +36,14 @@ #define OMAP1610_ETHR_SIZE SZ_4K #define OMAP1610_ETHR_START 0x04000000 -/* Intel STRATA NOR flash at CS3 */ -#define OMAP1610_NOR_FLASH_BASE 0xD8000000 -#define OMAP1610_NOR_FLASH_SIZE SZ_32M -#define OMAP1610_NOR_FLASH_START 0x0C000000 +/* Intel STRATA NOR flash at CS3 or CS2B(NAND Boot) */ +#define OMAP_NOR_FLASH_SIZE SZ_32M +#define OMAP_NOR_FLASH_START1 0x0C000000 /* CS3 */ +#define OMAP_NOR_FLASH_START2 0x0A000000 /* CS2B */ + +/* Samsung NAND flash at CS2B or CS3(NAND Boot) */ +#define OMAP_NAND_FLASH_START1 0x0A000000 /* CS2B */ +#define OMAP_NAND_FLASH_START2 0x0C000000 /* CS3 */ #endif /* __ASM_ARCH_OMAP_H2_H */ diff --git a/include/asm-arm/arch-omap/board-h3.h b/include/asm-arm/arch-omap/board-h3.h index 80c37bf3bf40..3f48583db956 100644 --- a/include/asm-arm/arch-omap/board-h3.h +++ b/include/asm-arm/arch-omap/board-h3.h @@ -32,10 +32,14 @@ #define OMAP1710_ETHR_SIZE SZ_4K #define OMAP1710_ETHR_START 0x04000000 -/* Intel STRATA NOR flash at CS3 */ -#define OMAP_NOR_FLASH_BASE 0xD8000000 -#define OMAP_NOR_FLASH_SIZE SZ_32M -#define OMAP_NOR_FLASH_START 0x00000000 +/* Intel STRATA NOR flash at CS3 or CS2B(NAND Boot) */ +#define OMAP_NOR_FLASH_SIZE SZ_32M +#define OMAP_NOR_FLASH_START1 0x0C000000 /* CS3 */ +#define OMAP_NOR_FLASH_START2 0x0A000000 /* CS2B */ + +/* Samsung NAND flash at CS2B or CS3(NAND Boot) */ +#define OMAP_NAND_FLASH_START1 0x0A000000 /* CS2B */ +#define OMAP_NAND_FLASH_START2 0x0C000000 /* CS3 */ #define MAXIRQNUM (IH_BOARD_BASE) #define MAXFIQNUM MAXIRQNUM @@ -43,65 +47,5 @@ #define NR_IRQS (MAXIRQNUM + 1) -#define OMAP_MCBSP1_BASE OMAP1610_MCBSP1_BASE -#define AUDIO_DRR2 (OMAP_MCBSP1_BASE + 0x00) -#define AUDIO_DRR1 (OMAP_MCBSP1_BASE + 0x02) -#define AUDIO_DXR2 (OMAP_MCBSP1_BASE + 0x04) -#define AUDIO_DXR1 (OMAP_MCBSP1_BASE + 0x06) -#define AUDIO_SPCR2 (OMAP_MCBSP1_BASE + 0x08) -#define AUDIO_SPCR1 (OMAP_MCBSP1_BASE + 0x0a) -#define AUDIO_RCR2 (OMAP_MCBSP1_BASE + 0x0c) -#define AUDIO_RCR1 (OMAP_MCBSP1_BASE + 0x0e) -#define AUDIO_XCR2 (OMAP_MCBSP1_BASE + 0x10) -#define AUDIO_XCR1 (OMAP_MCBSP1_BASE + 0x12) -#define AUDIO_SRGR2 (OMAP_MCBSP1_BASE + 0x14) -#define AUDIO_SRGR1 (OMAP_MCBSP1_BASE + 0x16) -#define AUDIO_MCR2 (OMAP_MCBSP1_BASE + 0x18) -#define AUDIO_MCR1 (OMAP_MCBSP1_BASE + 0x1a) -#define AUDIO_RCERA (OMAP_MCBSP1_BASE + 0x1c) -#define AUDIO_RCERB (OMAP_MCBSP1_BASE + 0x1e) -#define AUDIO_XCERA (OMAP_MCBSP1_BASE + 0x20) -#define AUDIO_XCERB (OMAP_MCBSP1_BASE + 0x22) -#define AUDIO_PCR0 (OMAP_MCBSP1_BASE + 0x24) - -/* UART3 Registers Maping through MPU bus */ -#define OMAP_MPU_UART3_BASE 0xFFFB9800 /* UART3 through MPU bus */ -#define UART3_RHR (OMAP_MPU_UART3_BASE + 0) -#define UART3_THR (OMAP_MPU_UART3_BASE + 0) -#define UART3_DLL (OMAP_MPU_UART3_BASE + 0) -#define UART3_IER (OMAP_MPU_UART3_BASE + 4) -#define UART3_DLH (OMAP_MPU_UART3_BASE + 4) -#define UART3_IIR (OMAP_MPU_UART3_BASE + 8) -#define UART3_FCR (OMAP_MPU_UART3_BASE + 8) -#define UART3_EFR (OMAP_MPU_UART3_BASE + 8) -#define UART3_LCR (OMAP_MPU_UART3_BASE + 0x0C) -#define UART3_MCR (OMAP_MPU_UART3_BASE + 0x10) -#define UART3_XON1_ADDR1 (OMAP_MPU_UART3_BASE + 0x10) -#define UART3_XON2_ADDR2 (OMAP_MPU_UART3_BASE + 0x14) -#define UART3_LSR (OMAP_MPU_UART3_BASE + 0x14) -#define UART3_TCR (OMAP_MPU_UART3_BASE + 0x18) -#define UART3_MSR (OMAP_MPU_UART3_BASE + 0x18) -#define UART3_XOFF1 (OMAP_MPU_UART3_BASE + 0x18) -#define UART3_XOFF2 (OMAP_MPU_UART3_BASE + 0x1C) -#define UART3_SPR (OMAP_MPU_UART3_BASE + 0x1C) -#define UART3_TLR (OMAP_MPU_UART3_BASE + 0x1C) -#define UART3_MDR1 (OMAP_MPU_UART3_BASE + 0x20) -#define UART3_MDR2 (OMAP_MPU_UART3_BASE + 0x24) -#define UART3_SFLSR (OMAP_MPU_UART3_BASE + 0x28) -#define UART3_TXFLL (OMAP_MPU_UART3_BASE + 0x28) -#define UART3_RESUME (OMAP_MPU_UART3_BASE + 0x2C) -#define UART3_TXFLH (OMAP_MPU_UART3_BASE + 0x2C) -#define UART3_SFREGL (OMAP_MPU_UART3_BASE + 0x30) -#define UART3_RXFLL (OMAP_MPU_UART3_BASE + 0x30) -#define UART3_SFREGH (OMAP_MPU_UART3_BASE + 0x34) -#define UART3_RXFLH (OMAP_MPU_UART3_BASE + 0x34) -#define UART3_BLR (OMAP_MPU_UART3_BASE + 0x38) -#define UART3_ACREG (OMAP_MPU_UART3_BASE + 0x3C) -#define UART3_DIV16 (OMAP_MPU_UART3_BASE + 0x3C) -#define UART3_SCR (OMAP_MPU_UART3_BASE + 0x40) -#define UART3_SSR (OMAP_MPU_UART3_BASE + 0x44) -#define UART3_EBLR (OMAP_MPU_UART3_BASE + 0x48) -#define UART3_OSC_12M_SEL (OMAP_MPU_UART3_BASE + 0x4C) -#define UART3_MVR (OMAP_MPU_UART3_BASE + 0x50) #endif /* __ASM_ARCH_OMAP_H3_H */ diff --git a/include/asm-arm/arch-omap/board-innovator.h b/include/asm-arm/arch-omap/board-innovator.h index 87e45d92940a..9229b2d1fa6e 100644 --- a/include/asm-arm/arch-omap/board-innovator.h +++ b/include/asm-arm/arch-omap/board-innovator.h @@ -71,17 +71,11 @@ unsigned char fpga_read(int reg); #endif /* CONFIG_ARCH_OMAP1510 */ -#if defined (CONFIG_ARCH_OMAP1610) +#if defined (CONFIG_ARCH_OMAP16XX) /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */ -#define OMAP1610_ETHR_BASE 0xE8000000 -#define OMAP1610_ETHR_SIZE SZ_4K -#define OMAP1610_ETHR_START 0x04000000 - -/* Intel STRATA NOR flash at CS3 */ -#define OMAP1610_NOR_FLASH_BASE 0xD8000000 -#define OMAP1610_NOR_FLASH_SIZE SZ_32M -#define OMAP1610_NOR_FLASH_START 0x0C000000 +#define INNOVATOR1610_ETHR_START 0x04000000 +#define INNOVATOR1610_ETHR_SIZE SZ_4K #endif /* CONFIG_ARCH_OMAP1610 */ #endif /* __ASM_ARCH_OMAP_INNOVATOR_H */ diff --git a/include/asm-arm/arch-omap/board.h b/include/asm-arm/arch-omap/board.h index a24193510e90..1cefd60b6f2a 100644 --- a/include/asm-arm/arch-omap/board.h +++ b/include/asm-arm/arch-omap/board.h @@ -17,7 +17,12 @@ #define OMAP_TAG_CLOCK 0x4f01 #define OMAP_TAG_MMC 0x4f02 #define OMAP_TAG_UART 0x4f03 -#define OMAP_TAG_USB 0x4f04 +#define OMAP_TAG_USB 0x4f04 +#define OMAP_TAG_LCD 0x4f05 +#define OMAP_TAG_GPIO_SWITCH 0x4f06 + +#define OMAP_TAG_BOOT_REASON 0x4f80 +#define OMAP_TAG_FLASH_PART 0x4f81 struct omap_clock_config { /* 0 for 12 MHz, 1 for 13 MHz and 2 for 19.2 MHz */ @@ -26,8 +31,8 @@ struct omap_clock_config { struct omap_mmc_config { u8 mmc_blocks; - s8 mmc1_power_pin, mmc2_power_pin; - s8 mmc1_switch_pin, mmc2_switch_pin; + s16 mmc1_power_pin, mmc2_power_pin; + s16 mmc1_switch_pin, mmc2_switch_pin; }; struct omap_uart_config { @@ -63,6 +68,38 @@ struct omap_usb_config { u8 pins[3]; }; +struct omap_lcd_config { + char panel_name[16]; + char ctrl_name[16]; +}; + +/* Cover: + * high -> closed + * low -> open + * Connection: + * high -> connected + * low -> disconnected + */ +#define OMAP_GPIO_SWITCH_TYPE_COVER 0x0000 +#define OMAP_GPIO_SWITCH_TYPE_CONNECTION 0x0001 +#define OMAP_GPIO_SWITCH_FLAG_INVERTED 0x0001 +struct omap_gpio_switch_config { + char name[12]; + u16 gpio; + int flags:4; + int type:4; + int key_code:24; /* Linux key code */ +}; + +struct omap_flash_part_config { + char part_table[0]; +}; + +struct omap_boot_reason_config { + char reason_str[12]; +}; + + struct omap_board_config_entry { u16 tag; u16 len; @@ -74,10 +111,14 @@ struct omap_board_config_kernel { const void *data; }; -extern const void *__omap_get_config(u16 tag, size_t len); +extern const void *__omap_get_config(u16 tag, size_t len, int nr); #define omap_get_config(tag, type) \ - ((const type *) __omap_get_config((tag), sizeof(type))) + ((const type *) __omap_get_config((tag), sizeof(type), 0)) +#define omap_get_nr_config(tag, type, nr) \ + ((const type *) __omap_get_config((tag), sizeof(type), (nr))) + +extern const void *omap_get_var_config(u16 tag, size_t *len); extern struct omap_board_config_kernel *omap_board_config; extern int omap_board_config_size; diff --git a/include/asm-arm/arch-omap/cpu.h b/include/asm-arm/arch-omap/cpu.h new file mode 100644 index 000000000000..e8786713ee5c --- /dev/null +++ b/include/asm-arm/arch-omap/cpu.h @@ -0,0 +1,183 @@ +/* + * linux/include/asm-arm/arch-omap/cpu.h + * + * OMAP cpu type detection + * + * Copyright (C) 2004 Nokia Corporation + * + * Written by Tony Lindgren <tony.lindgren@nokia.com> + * + * 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 program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef __ASM_ARCH_OMAP_CPU_H +#define __ASM_ARCH_OMAP_CPU_H + +extern unsigned int system_rev; + +#define OMAP_DIE_ID_0 0xfffe1800 +#define OMAP_DIE_ID_1 0xfffe1804 +#define OMAP_PRODUCTION_ID_0 0xfffe2000 +#define OMAP_PRODUCTION_ID_1 0xfffe2004 +#define OMAP32_ID_0 0xfffed400 +#define OMAP32_ID_1 0xfffed404 + +/* + * Test if multicore OMAP support is needed + */ +#undef MULTI_OMAP +#undef OMAP_NAME + +#ifdef CONFIG_ARCH_OMAP730 +# ifdef OMAP_NAME +# undef MULTI_OMAP +# define MULTI_OMAP +# else +# define OMAP_NAME omap730 +# endif +#endif +#ifdef CONFIG_ARCH_OMAP1510 +# ifdef OMAP_NAME +# undef MULTI_OMAP +# define MULTI_OMAP +# else +# define OMAP_NAME omap1510 +# endif +#endif +#ifdef CONFIG_ARCH_OMAP16XX +# ifdef OMAP_NAME +# undef MULTI_OMAP +# define MULTI_OMAP +# else +# define OMAP_NAME omap1610 +# endif +#endif +#ifdef CONFIG_ARCH_OMAP16XX +# ifdef OMAP_NAME +# undef MULTI_OMAP +# define MULTI_OMAP +# else +# define OMAP_NAME omap1710 +# endif +#endif + +/* + * Generate various OMAP cpu specific macros, and cpu class + * specific macros + */ +#define GET_OMAP_TYPE ((system_rev >> 24) & 0xff) +#define GET_OMAP_CLASS (system_rev & 0xff) + +#define IS_OMAP_TYPE(type, id) \ +static inline int is_omap ##type (void) \ +{ \ + return (GET_OMAP_TYPE == (id)) ? 1 : 0; \ +} + +#define IS_OMAP_CLASS(class, id) \ +static inline int is_omap ##class (void) \ +{ \ + return (GET_OMAP_CLASS == (id)) ? 1 : 0; \ +} + +IS_OMAP_TYPE(730, 0x07) +IS_OMAP_TYPE(1510, 0x15) +IS_OMAP_TYPE(1610, 0x16) +IS_OMAP_TYPE(5912, 0x16) +IS_OMAP_TYPE(1710, 0x17) +IS_OMAP_TYPE(2420, 0x24) + +IS_OMAP_CLASS(7xx, 0x07) +IS_OMAP_CLASS(15xx, 0x15) +IS_OMAP_CLASS(16xx, 0x16) +IS_OMAP_CLASS(24xx, 0x24) + +/* + * Macros to group OMAP types into cpu classes. + * These can be used in most places. + * cpu_is_omap15xx(): True for 1510 and 5910 + * cpu_is_omap16xx(): True for 1610, 5912 and 1710 + */ +#if defined(MULTI_OMAP) +# define cpu_is_omap7xx() is_omap7xx() +# define cpu_is_omap15xx() is_omap15xx() +# if !(defined(CONFIG_ARCH_OMAP1510) || defined(CONFIG_ARCH_OMAP730)) +# define cpu_is_omap16xx() 1 +# else +# define cpu_is_omap16xx() is_omap16xx() +# endif +#else +# if defined(CONFIG_ARCH_OMAP730) +# define cpu_is_omap7xx() 1 +# else +# define cpu_is_omap7xx() 0 +# endif +# if defined(CONFIG_ARCH_OMAP1510) +# define cpu_is_omap15xx() 1 +# else +# define cpu_is_omap15xx() 0 +# endif +# if defined(CONFIG_ARCH_OMAP16XX) +# define cpu_is_omap16xx() 1 +# else +# define cpu_is_omap16xx() 0 +# endif +#endif + +#if defined(MULTI_OMAP) +# define cpu_is_omap730() is_omap730() +# define cpu_is_omap1510() is_omap1510() +# define cpu_is_omap1610() is_omap1610() +# define cpu_is_omap5912() is_omap5912() +# define cpu_is_omap1710() is_omap1710() +#else +# if defined(CONFIG_ARCH_OMAP730) +# define cpu_is_omap730() 1 +# else +# define cpu_is_omap730() 0 +# endif +# if defined(CONFIG_ARCH_OMAP1510) +# define cpu_is_omap1510() 1 +# else +# define cpu_is_omap1510() 0 +# endif +# if defined(CONFIG_ARCH_OMAP16XX) +# define cpu_is_omap1610() 1 +# else +# define cpu_is_omap1610() 0 +# endif +# if defined(CONFIG_ARCH_OMAP16XX) +# define cpu_is_omap5912() 1 +# else +# define cpu_is_omap5912() 0 +# endif +# if defined(CONFIG_ARCH_OMAP16XX) +# define cpu_is_omap1610() is_omap1610() +# define cpu_is_omap5912() is_omap5912() +# define cpu_is_omap1710() is_omap1710() +# else +# define cpu_is_omap1610() 0 +# define cpu_is_omap5912() 0 +# define cpu_is_omap1710() 0 +# endif +# if defined(CONFIG_ARCH_OMAP2420) +# define cpu_is_omap2420() 1 +# else +# define cpu_is_omap2420() 0 +# endif +#endif + +#endif diff --git a/include/asm-arm/arch-omap/dma.h b/include/asm-arm/arch-omap/dma.h index bf87b3a56e08..2b305050eb48 100644 --- a/include/asm-arm/arch-omap/dma.h +++ b/include/asm-arm/arch-omap/dma.h @@ -194,11 +194,19 @@ enum { OMAP_LCD_DMA_B2_BOTTOM }; -enum { +enum omap_dma_burst_mode { + OMAP_DMA_DATA_BURST_DIS = 0, OMAP_DMA_DATA_BURST_4, OMAP_DMA_DATA_BURST_8 }; +enum omap_dma_color_mode { + OMAP_DMA_COLOR_DIS = 0, + OMAP_DMA_CONSTANT_FILL, + OMAP_DMA_TRANSPARENT_COPY +}; + +extern void omap_set_dma_priority(int dst_port, int priority); extern int omap_request_dma(int dev_id, const char *dev_name, void (* callback)(int lch, u16 ch_status, void *data), void *data, int *dma_ch); @@ -210,20 +218,22 @@ extern void omap_stop_dma(int lch); extern void omap_set_dma_transfer_params(int lch, int data_type, int elem_count, int frame_count, int sync_mode); -extern void omap_set_dma_constant_fill(int lch, u32 color); -extern void omap_set_dma_transparent_copy(int lch, u32 color); +extern void omap_set_dma_color_mode(int lch, enum omap_dma_color_mode mode, + u32 color); extern void omap_set_dma_src_params(int lch, int src_port, int src_amode, unsigned long src_start); extern void omap_set_dma_src_index(int lch, int eidx, int fidx); extern void omap_set_dma_src_data_pack(int lch, int enable); -extern void omap_set_dma_src_burst_mode(int lch, int burst_mode); +extern void omap_set_dma_src_burst_mode(int lch, + enum omap_dma_burst_mode burst_mode); extern void omap_set_dma_dest_params(int lch, int dest_port, int dest_amode, unsigned long dest_start); extern void omap_set_dma_dest_index(int lch, int eidx, int fidx); extern void omap_set_dma_dest_data_pack(int lch, int enable); -extern void omap_set_dma_dest_burst_mode(int lch, int burst_mode); +extern void omap_set_dma_dest_burst_mode(int lch, + enum omap_dma_burst_mode burst_mode); extern void omap_dma_link_lch (int lch_head, int lch_queue); extern void omap_dma_unlink_lch (int lch_head, int lch_queue); @@ -235,10 +245,16 @@ extern int omap_dma_in_1510_mode(void); extern int omap_request_lcd_dma(void (* callback)(u16 status, void *data), void *data); extern void omap_free_lcd_dma(void); -extern void omap_start_lcd_dma(void); +extern void omap_setup_lcd_dma(void); +extern void omap_enable_lcd_dma(void); extern void omap_stop_lcd_dma(void); +extern void omap_set_lcd_dma_ext_controller(int external); +extern void omap_set_lcd_dma_single_transfer(int single); extern void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres, int data_type); extern void omap_set_lcd_dma_b1_rotation(int rotate); +extern void omap_set_lcd_dma_b1_vxres(unsigned long vxres); +extern void omap_set_lcd_dma_b1_mirror(int mirror); +extern void omap_set_lcd_dma_b1_scale(unsigned int xscale, unsigned int yscale); #endif /* __ASM_ARCH_DMA_H */ diff --git a/include/asm-arm/arch-omap/hardware.h b/include/asm-arm/arch-omap/hardware.h index fe0286912414..febce77d3209 100644 --- a/include/asm-arm/arch-omap/hardware.h +++ b/include/asm-arm/arch-omap/hardware.h @@ -40,6 +40,7 @@ #include <linux/config.h> #ifndef __ASSEMBLER__ #include <asm/types.h> +#include <asm/arch/cpu.h> #endif #include <asm/arch/io.h> @@ -64,6 +65,7 @@ #define ARM_RSTCT1 (CLKGEN_REG_BASE + 0x10) #define ARM_RSTCT2 (CLKGEN_REG_BASE + 0x14) #define ARM_SYSST (CLKGEN_REG_BASE + 0x18) +#define ARM_IDLECT3 (CLKGEN_REG_BASE + 0x24) #define CK_RATEF 1 #define CK_IDLEF 2 @@ -140,12 +142,12 @@ #define MPUTIM_AR (1<<1) #define MPUTIM_ST (1<<0) -/* Watchdog */ -#define OMAP_WATCHDOG_BASE (0xfffec800) -#define OMAP_WDT_TIMER (OMAP_WATCHDOG_BASE + 0x0) -#define OMAP_WDT_LOAD_TIM (OMAP_WATCHDOG_BASE + 0x4) -#define OMAP_WDT_READ_TIM (OMAP_WATCHDOG_BASE + 0x4) -#define OMAP_WDT_TIMER_MODE (OMAP_WATCHDOG_BASE + 0x8) +/* Watchdog timer within the OMAP3.2 gigacell */ +#define OMAP_MPU_WATCHDOG_BASE (0xfffec800) +#define OMAP_WDT_TIMER (OMAP_MPU_WATCHDOG_BASE + 0x0) +#define OMAP_WDT_LOAD_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4) +#define OMAP_WDT_READ_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4) +#define OMAP_WDT_TIMER_MODE (OMAP_MPU_WATCHDOG_BASE + 0x8) /* * --------------------------------------------------------------------------- @@ -186,22 +188,22 @@ * --------------------------------------------------------------------------- */ #define TCMIF_BASE 0xfffecc00 -#define IMIF_PRIO_REG __REG32(TCMIF_BASE + 0x00) -#define EMIFS_PRIO_REG __REG32(TCMIF_BASE + 0x04) -#define EMIFF_PRIO_REG __REG32(TCMIF_BASE + 0x08) -#define EMIFS_CONFIG_REG __REG32(TCMIF_BASE + 0x0c) -#define EMIFS_CS0_CONFIG_REG __REG32(TCMIF_BASE + 0x10) -#define EMIFS_CS1_CONFIG_REG __REG32(TCMIF_BASE + 0x14) -#define EMIFS_CS2_CONFIG_REG __REG32(TCMIF_BASE + 0x18) -#define EMIFS_CS3_CONFIG_REG __REG32(TCMIF_BASE + 0x1c) -#define EMIFF_SDRAM_CONFIG_REG __REG32(TCMIF_BASE + 0x20) -#define EMIFF_MRS_REG __REG32(TCMIF_BASE + 0x24) -#define TC_TIMEOUT1_REG __REG32(TCMIF_BASE + 0x28) -#define TC_TIMEOUT2_REG __REG32(TCMIF_BASE + 0x2c) -#define TC_TIMEOUT3_REG __REG32(TCMIF_BASE + 0x30) -#define TC_ENDIANISM_REG __REG32(TCMIF_BASE + 0x34) -#define EMIFF_SDRAM_CONFIG_2_REG __REG32(TCMIF_BASE + 0x3c) -#define EMIF_CFG_DYNAMIC_WS_REG __REG32(TCMIF_BASE + 0x40) +#define IMIF_PRIO (TCMIF_BASE + 0x00) +#define EMIFS_PRIO (TCMIF_BASE + 0x04) +#define EMIFF_PRIO (TCMIF_BASE + 0x08) +#define EMIFS_CONFIG (TCMIF_BASE + 0x0c) +#define EMIFS_CS0_CONFIG (TCMIF_BASE + 0x10) +#define EMIFS_CS1_CONFIG (TCMIF_BASE + 0x14) +#define EMIFS_CS2_CONFIG (TCMIF_BASE + 0x18) +#define EMIFS_CS3_CONFIG (TCMIF_BASE + 0x1c) +#define EMIFF_SDRAM_CONFIG (TCMIF_BASE + 0x20) +#define EMIFF_MRS (TCMIF_BASE + 0x24) +#define TC_TIMEOUT1 (TCMIF_BASE + 0x28) +#define TC_TIMEOUT2 (TCMIF_BASE + 0x2c) +#define TC_TIMEOUT3 (TCMIF_BASE + 0x30) +#define TC_ENDIANISM (TCMIF_BASE + 0x34) +#define EMIFF_SDRAM_CONFIG_2 (TCMIF_BASE + 0x3c) +#define EMIF_CFG_DYNAMIC_WS (TCMIF_BASE + 0x40) /* * ---------------------------------------------------------------------------- @@ -235,6 +237,7 @@ #define PULL_DWN_CTRL_1 0xfffe1044 #define PULL_DWN_CTRL_2 0xfffe1048 #define PULL_DWN_CTRL_3 0xfffe104c +#define PULL_DWN_CTRL_4 0xfffe10ac /* OMAP-1610 specific multiplexing registers */ #define FUNC_MUX_CTRL_E 0xfffe1090 @@ -248,6 +251,9 @@ #define PU_PD_SEL_3 0xfffe10c0 #define PU_PD_SEL_4 0xfffe10c4 +/* Timer32K for 1610 and 1710*/ +#define OMAP_TIMER32K_BASE 0xFFFBC400 + /* * --------------------------------------------------------------------------- * TIPB bus interface @@ -277,62 +283,24 @@ /* * --------------------------------------------------------------------------- - * Processor differentiation + * Processor specific defines * --------------------------------------------------------------------------- */ -#define OMAP_ID_BASE (0xfffed400) -#define OMAP_ID_REG __REG32(OMAP_ID_BASE + 0x04) - -#define ID_SHIFT 12 -#define ID_MASK 0x7fff - -/* See also uncompress.h */ -#define OMAP_ID_730 0x355F -#define OMAP_ID_1510 0x3470 -#define OMAP_ID_1610 0x3576 -#define OMAP_ID_1710 0x35F7 -#define OMAP_ID_5912 0x358C -#define OMAP_ID_1611 0x358C - #ifdef CONFIG_ARCH_OMAP730 #include "omap730.h" -#define cpu_is_omap730() (((OMAP_ID_REG >> ID_SHIFT) & ID_MASK) == OMAP_ID_730) -#else -#define cpu_is_omap730() 0 #endif #ifdef CONFIG_ARCH_OMAP1510 #include "omap1510.h" -#define cpu_is_omap1510() (((OMAP_ID_REG >> ID_SHIFT) & ID_MASK) == OMAP_ID_1510) -#else -#define cpu_is_omap1510() 0 -#endif - -#ifdef CONFIG_ARCH_OMAP1610 -#include "omap1610.h" -#define cpu_is_omap1610() (((OMAP_ID_REG >> ID_SHIFT) & ID_MASK) == OMAP_ID_1610) || \ - (((OMAP_ID_REG >> ID_SHIFT) & ID_MASK) == OMAP_ID_1611) -#else -#define cpu_is_omap1610() 0 -#endif - -#ifdef CONFIG_ARCH_OMAP1710 -#include "omap1610.h" -#define cpu_is_omap1710() (((OMAP_ID_REG >> ID_SHIFT) & ID_MASK) == OMAP_ID_1710) -#else -#define cpu_is_omap1710() 0 #endif -#ifdef CONFIG_ARCH_OMAP5912 -#include "omap5912.h" -#define cpu_is_omap5912() (((OMAP_ID_REG >> ID_SHIFT) & ID_MASK) == OMAP_ID_5912) -#else -#define cpu_is_omap5912() 0 +#ifdef CONFIG_ARCH_OMAP16XX +#include "omap16xx.h" #endif /* * --------------------------------------------------------------------------- - * Board differentiation + * Board specific defines * --------------------------------------------------------------------------- */ diff --git a/include/asm-arm/arch-omap/irqs.h b/include/asm-arm/arch-omap/irqs.h index 7cf577496b66..1bae6b45e68b 100644 --- a/include/asm-arm/arch-omap/irqs.h +++ b/include/asm-arm/arch-omap/irqs.h @@ -192,8 +192,6 @@ #define INT_730_TIMER32K (22 + IH2_BASE) #define INT_730_MMC_SDIO (23 + IH2_BASE) #define INT_730_UPLD (24 + IH2_BASE) -#define INT_730_RTC_TIMER (25 + IH2_BASE) -#define INT_730_RTC_ALARM (26 + IH2_BASE) #define INT_730_USB_HHC_1 (27 + IH2_BASE) #define INT_730_USB_HHC_2 (28 + IH2_BASE) #define INT_730_USB_GENI (29 + IH2_BASE) @@ -224,24 +222,6 @@ #define INT_730_DMA_CH15 (62 + IH2_BASE) #define INT_730_NAND (63 + IH2_BASE) -/* OMAP-730 differences */ -#ifdef CONFIG_ARCH_OMAP730 -#undef INT_IH2_IRQ -#define INT_IH2_IRQ INT_730_IH2_IRQ -#undef INT_KEYBOARD -#define INT_KEYBOARD INT_730_MPUIO_KEYPAD -#undef INT_UART1 -#define INT_UART1 INT_730_UART_MODEM_1 -#undef INT_UART2 -#define INT_UART2 INT_730_UART_MODEM_IRDA_2 -#undef INT_MPUIO -#define INT_MPUIO INT_730_MPUIO -#undef INT_RTC_TIMER -#define INT_RTC_TIMER INT_730_RTC_TIMER -#undef INT_RTC_ALARM -#define INT_RTC_ALARM INT_730_RTC_ALARM -#endif - /* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and * 16 MPUIO lines */ #define OMAP_MAX_GPIO_LINES 192 @@ -260,7 +240,7 @@ extern void omap_init_irq(void); #include <asm/arch/hardware.h> #ifndef NR_IRQS -#define NR_IRQS 256 +#define NR_IRQS IH_BOARD_BASE #endif #endif diff --git a/include/asm-arm/arch-omap/mcbsp.h b/include/asm-arm/arch-omap/mcbsp.h index 8e490e3f654d..eb3032510508 100644 --- a/include/asm-arm/arch-omap/mcbsp.h +++ b/include/asm-arm/arch-omap/mcbsp.h @@ -29,7 +29,7 @@ #define OMAP730_MCBSP1_BASE 0xfffb1000 #define OMAP730_MCBSP2_BASE 0xfffb1800 -#define OMAP1510_MCBSP1_BASE 0xe1011000 +#define OMAP1510_MCBSP1_BASE 0xe1011800 #define OMAP1510_MCBSP2_BASE 0xfffb1000 #define OMAP1510_MCBSP3_BASE 0xe1017000 diff --git a/include/asm-arm/arch-omap/memory.h b/include/asm-arm/arch-omap/memory.h index c93c05288c17..3182aa43d4c0 100644 --- a/include/asm-arm/arch-omap/memory.h +++ b/include/asm-arm/arch-omap/memory.h @@ -59,12 +59,14 @@ * OMAP-1510 bus address is translated into a Local Bus address if the * OMAP bus type is lbus. We do the address translation based on the * device overriding the defaults used in the dma-mapping API. + * Note that the is_lbus_device() test is not very efficient on 1510 + * because of the strncmp(). */ #ifdef CONFIG_ARCH_OMAP1510 #define virt_to_lbus(x) ((x) - PAGE_OFFSET + OMAP1510_LB_OFFSET) #define lbus_to_virt(x) ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET) -#define is_lbus_device(dev) (cpu_is_omap1510() && dev && dev->coherent_dma_mask == 0x0fffffff) +#define is_lbus_device(dev) (cpu_is_omap1510() && dev && (strncmp(dev->bus_id, "ohci", 4) == 0)) #define __arch_page_to_dma(dev, page) ({is_lbus_device(dev) ? \ (dma_addr_t)virt_to_lbus(page_address(page)) : \ diff --git a/include/asm-arm/arch-omap/mux.h b/include/asm-arm/arch-omap/mux.h index d0fdf9833ac4..0b95d06c95db 100644 --- a/include/asm-arm/arch-omap/mux.h +++ b/include/asm-arm/arch-omap/mux.h @@ -43,9 +43,7 @@ #define PU_PD_SEL_NA 0 /* No pu_pd reg available */ #define PULL_DWN_CTRL_NA 0 /* No pull-down control needed */ -#define DEBUG_MUX - -#ifdef DEBUG_MUX +#ifdef CONFIG_OMAP_MUX_DEBUG #define MUX_REG(reg, mode_offset, mode) .mux_reg_name = "FUNC_MUX_CTRL_"#reg, \ .mux_reg = FUNC_MUX_CTRL_##reg, \ .mask_offset = mode_offset, \ @@ -73,7 +71,7 @@ #define PU_PD_REG(reg, status) .pu_pd_reg = PU_PD_SEL_##reg, \ .pu_pd_val = status, -#endif // DEBUG_MUX +#endif /* CONFIG_OMAP_MUX_DEBUG */ #define MUX_CFG(desc, mux_reg, mode_offset, mode, \ pull_reg, pull_bit, pull_status, \ @@ -134,6 +132,7 @@ typedef enum { UART3_RTS, UART3_CLKREQ, UART3_BCLK, /* 12MHz clock out */ + Y15_1610_UART3_RTS, /* PWT & PWL */ PWT, @@ -174,8 +173,13 @@ typedef enum { R19_1510_GPIO1, M14_1510_GPIO2, + /* OMAP1610 GPIO */ + Y15_1610_GPIO17, + /* OMAP-1710 GPIO */ R18_1710_GPIO0, + V2_1710_GPIO10, + N21_1710_GPIO14, W15_1710_GPIO40, /* MPUIO */ @@ -244,6 +248,10 @@ typedef enum { P15_1610_UWIRE_CS0, N15_1610_UWIRE_CS1, + /* OMAP-1610 Flash */ + L3_1610_FLASH_CS2B_OE, + M8_1610_FLASH_CS2B_WE, + /* First MMC */ MMC_CMD, MMC_DAT1, @@ -310,7 +318,8 @@ typedef enum { * Table of various FUNC_MUX and PULL_DWN combinations for each device. * See also reg_cfg_t above for the lookup table. */ -static reg_cfg_set reg_cfg_table[] = { +static reg_cfg_set __initdata_or_module +reg_cfg_table[] = { /* * description mux mode mux pull pull pull pu_pd pu dbg * reg offset mode reg bit ena reg @@ -331,6 +340,7 @@ MUX_CFG("UART3_CTS", 5, 12, 2, 0, 24, 0, NA, 0, 0) MUX_CFG("UART3_RTS", 5, 15, 2, 0, 25, 0, NA, 0, 0) MUX_CFG("UART3_CLKREQ", 9, 27, 0, 2, 5, 0, NA, 0, 0) MUX_CFG("UART3_BCLK", A, 0, 0, 2, 6, 0, NA, 0, 0) +MUX_CFG("Y15_1610_UART3_RTS", A, 0, 1, 2, 6, 0, NA, 0, 0) /* PWT & PWL, conflicts with UART3 */ MUX_CFG("PWT", 6, 0, 2, 0, 30, 0, NA, 0, 0) @@ -371,9 +381,14 @@ MUX_CFG("R18_1510_GPIO0", 7, 9, 0, 1, 11, 1, 0, 0, 1) MUX_CFG("R19_1510_GPIO1", 7, 6, 0, 1, 10, 1, 0, 0, 1) MUX_CFG("M14_1510_GPIO2", 7, 3, 0, 1, 9, 1, 0, 0, 1) +/* OMAP1610 GPIO */ +MUX_CFG("Y15_1610_GPIO17", A, 0, 7, 2, 6, 0, NA, 0, 1) + /* OMAP-1710 GPIO */ -MUX_CFG("R18_1710_GPIO0", 7, 9, 0, 1, 11, 1, 1, 1, 1) -MUX_CFG("W15_1710_GPIO40", 9, 27, 7, 2, 5, 1, 2, 1, 1) +MUX_CFG("R18_1710_GPIO0", 7, 9, 0, 1, 11, 1, 1, 1, 1) +MUX_CFG("V2_1710_GPIO10", F, 27, 1, 4, 3, 1, 4, 1, 1) +MUX_CFG("N21_1710_GPIO14", 6, 9, 0, 1, 1, 1, 1, 1, 1) +MUX_CFG("W15_1710_GPIO40", 9, 27, 7, 2, 5, 1, 2, 1, 1) /* MPUIO */ MUX_CFG("MPUIO2", 7, 18, 0, 1, 1, 1, NA, 0, 1) @@ -442,6 +457,10 @@ MUX_CFG("N14_1610_UWIRE_CS0", 8, 9, 1, 1, 21, 0, 1, 1, 1) MUX_CFG("P15_1610_UWIRE_CS3", 8, 12, 1, 1, 22, 0, 1, 1, 1) MUX_CFG("N15_1610_UWIRE_CS1", 7, 18, 2, 1, 14, 0, NA, 0, 1) +/* OMAP-1610 Flash */ +MUX_CFG("L3_1610_FLASH_CS2B_OE",10, 6, 1, NA, 0, 0, NA, 0, 1) +MUX_CFG("M8_1610_FLASH_CS2B_WE",10, 3, 1, NA, 0, 0, NA, 0, 1) + /* First MMC interface, same on 1510, 1610 and 1710 */ MUX_CFG("MMC_CMD", A, 27, 0, 2, 15, 1, 2, 1, 1) MUX_CFG("MMC_DAT1", A, 24, 0, 2, 14, 1, 2, 1, 1) @@ -501,6 +520,12 @@ MUX_CFG("T20_1610_LOW_PWR", 7, 12, 1, NA, 0, 0, NA, 0, 0) #endif /* __MUX_C__ */ +#ifdef CONFIG_OMAP_MUX +/* setup pin muxing in Linux */ extern int omap_cfg_reg(reg_cfg_t reg_cfg); +#else +/* boot loader does it all (no warnings from CONFIG_OMAP_MUX_WARNINGS) */ +static inline int omap_cfg_reg(reg_cfg_t reg_cfg) { return 0; } +#endif #endif diff --git a/include/asm-arm/arch-omap/omap1610.h b/include/asm-arm/arch-omap/omap16xx.h index 6b36752f4150..d6c4a94a47c7 100644 --- a/include/asm-arm/arch-omap/omap1610.h +++ b/include/asm-arm/arch-omap/omap16xx.h @@ -1,6 +1,6 @@ -/* linux/include/asm-arm/arch-omap/omap1610.h +/* linux/include/asm-arm/arch-omap/omap16xx.h * - * Hardware definitions for TI OMAP1610 processor. + * Hardware definitions for TI OMAP1610/5912/1710 processors. * * Cleanup for Linux-2.6 by Dirk Behme <dirk.behme@de.bosch.com> * @@ -25,8 +25,8 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef __ASM_ARCH_OMAP1610_H -#define __ASM_ARCH_OMAP1610_H +#ifndef __ASM_ARCH_OMAP16XX_H +#define __ASM_ARCH_OMAP16XX_H /* * ---------------------------------------------------------------------------- @@ -36,17 +36,18 @@ /* Syntax: XX_BASE = Virtual base address, XX_START = Physical base address */ -#define OMAP1610_SRAM_BASE 0xD0000000 +#define OMAP16XX_SRAM_BASE 0xD0000000 #define OMAP1610_SRAM_SIZE (SZ_16K) -#define OMAP1610_SRAM_START 0x20000000 +#define OMAP5912_SRAM_SIZE 0x3E800 +#define OMAP16XX_SRAM_START 0x20000000 -#define OMAP1610_DSP_BASE 0xE0000000 -#define OMAP1610_DSP_SIZE 0x28000 -#define OMAP1610_DSP_START 0xE0000000 +#define OMAP16XX_DSP_BASE 0xE0000000 +#define OMAP16XX_DSP_SIZE 0x28000 +#define OMAP16XX_DSP_START 0xE0000000 -#define OMAP1610_DSPREG_BASE 0xE1000000 -#define OMAP1610_DSPREG_SIZE SZ_128K -#define OMAP1610_DSPREG_START 0xE1000000 +#define OMAP16XX_DSPREG_BASE 0xE1000000 +#define OMAP16XX_DSPREG_SIZE SZ_128K +#define OMAP16XX_DSPREG_START 0xE1000000 /* * ---------------------------------------------------------------------------- @@ -54,7 +55,8 @@ * ---------------------------------------------------------------------------- */ -#define OMAP1610_SRAM_IDLE_SUSPEND (OMAP1610_SRAM_BASE + OMAP1610_SRAM_SIZE - 0x200) +#define OMAP1610_SRAM_IDLE_SUSPEND (OMAP16XX_SRAM_BASE + OMAP1610_SRAM_SIZE - 0x200) +#define OMAP5912_SRAM_IDLE_SUSPEND (OMAP16XX_SRAM_BASE + OMAP5912_SRAM_SIZE - 0x200) #define OMAP1610_SRAM_API_SUSPEND (OMAP1610_SRAM_IDLE_SUSPEND + 0x100) /* @@ -104,18 +106,18 @@ * Clocks * ---------------------------------------------------------------------------- */ -#define OMAP1610_ARM_IDLECT3 (CLKGEN_REG_BASE + 0x24) +#define OMAP16XX_ARM_IDLECT3 (CLKGEN_REG_BASE + 0x24) /* * ---------------------------------------------------------------------------- * Pin configuration registers * ---------------------------------------------------------------------------- */ -#define OMAP1610_CONF_VOLTAGE_VDDSHV6 (1 << 8) -#define OMAP1610_CONF_VOLTAGE_VDDSHV7 (1 << 9) -#define OMAP1610_CONF_VOLTAGE_VDDSHV8 (1 << 10) -#define OMAP1610_CONF_VOLTAGE_VDDSHV9 (1 << 11) -#define OMAP1610_SUBLVDS_CONF_VALID (1 << 13) +#define OMAP16XX_CONF_VOLTAGE_VDDSHV6 (1 << 8) +#define OMAP16XX_CONF_VOLTAGE_VDDSHV7 (1 << 9) +#define OMAP16XX_CONF_VOLTAGE_VDDSHV8 (1 << 10) +#define OMAP16XX_CONF_VOLTAGE_VDDSHV9 (1 << 11) +#define OMAP16XX_SUBLVDS_CONF_VALID (1 << 13) /* * --------------------------------------------------------------------------- @@ -123,7 +125,55 @@ * --------------------------------------------------------------------------- */ #define TIPB_SWITCH_BASE (0xfffbc800) -#define OMAP1610_MMCSD2_SSW_MPU_CONF (TIPB_SWITCH_BASE + 0x160) +#define OMAP16XX_MMCSD2_SSW_MPU_CONF (TIPB_SWITCH_BASE + 0x160) + +/* UART3 Registers Maping through MPU bus */ +#define UART3_RHR (OMAP_UART3_BASE + 0) +#define UART3_THR (OMAP_UART3_BASE + 0) +#define UART3_DLL (OMAP_UART3_BASE + 0) +#define UART3_IER (OMAP_UART3_BASE + 4) +#define UART3_DLH (OMAP_UART3_BASE + 4) +#define UART3_IIR (OMAP_UART3_BASE + 8) +#define UART3_FCR (OMAP_UART3_BASE + 8) +#define UART3_EFR (OMAP_UART3_BASE + 8) +#define UART3_LCR (OMAP_UART3_BASE + 0x0C) +#define UART3_MCR (OMAP_UART3_BASE + 0x10) +#define UART3_XON1_ADDR1 (OMAP_UART3_BASE + 0x10) +#define UART3_XON2_ADDR2 (OMAP_UART3_BASE + 0x14) +#define UART3_LSR (OMAP_UART3_BASE + 0x14) +#define UART3_TCR (OMAP_UART3_BASE + 0x18) +#define UART3_MSR (OMAP_UART3_BASE + 0x18) +#define UART3_XOFF1 (OMAP_UART3_BASE + 0x18) +#define UART3_XOFF2 (OMAP_UART3_BASE + 0x1C) +#define UART3_SPR (OMAP_UART3_BASE + 0x1C) +#define UART3_TLR (OMAP_UART3_BASE + 0x1C) +#define UART3_MDR1 (OMAP_UART3_BASE + 0x20) +#define UART3_MDR2 (OMAP_UART3_BASE + 0x24) +#define UART3_SFLSR (OMAP_UART3_BASE + 0x28) +#define UART3_TXFLL (OMAP_UART3_BASE + 0x28) +#define UART3_RESUME (OMAP_UART3_BASE + 0x2C) +#define UART3_TXFLH (OMAP_UART3_BASE + 0x2C) +#define UART3_SFREGL (OMAP_UART3_BASE + 0x30) +#define UART3_RXFLL (OMAP_UART3_BASE + 0x30) +#define UART3_SFREGH (OMAP_UART3_BASE + 0x34) +#define UART3_RXFLH (OMAP_UART3_BASE + 0x34) +#define UART3_BLR (OMAP_UART3_BASE + 0x38) +#define UART3_ACREG (OMAP_UART3_BASE + 0x3C) +#define UART3_DIV16 (OMAP_UART3_BASE + 0x3C) +#define UART3_SCR (OMAP_UART3_BASE + 0x40) +#define UART3_SSR (OMAP_UART3_BASE + 0x44) +#define UART3_EBLR (OMAP_UART3_BASE + 0x48) +#define UART3_OSC_12M_SEL (OMAP_UART3_BASE + 0x4C) +#define UART3_MVR (OMAP_UART3_BASE + 0x50) -#endif /* __ASM_ARCH_OMAP1610_H */ +/* + * ---------------------------------------------------------------------------- + * Pulse-Width Light + * ---------------------------------------------------------------------------- + */ +#define OMAP16XX_PWL_BASE (0xfffb5800) +#define OMAP16XX_PWL_ENABLE (OMAP16XX_PWL_BASE + 0x00) +#define OMAP16XX_PWL_CLK_ENABLE (OMAP16XX_PWL_BASE + 0x04) + +#endif /* __ASM_ARCH_OMAP16XX_H */ diff --git a/include/asm-arm/arch-omap/omap5912.h b/include/asm-arm/arch-omap/omap5912.h deleted file mode 100644 index 76b554ee0236..000000000000 --- a/include/asm-arm/arch-omap/omap5912.h +++ /dev/null @@ -1,112 +0,0 @@ -/* linux/include/asm-arm/arch-omap/omap5912.h - * - * Hardware definitions for TI OMAP5912 processor. - * - * Written by Dirk Behme <dirk.behme@de.bosch.com> - * - * 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 __ASM_ARCH_OMAP5912_H -#define __ASM_ARCH_OMAP5912_H - -/* - * ---------------------------------------------------------------------------- - * Base addresses - * ---------------------------------------------------------------------------- - */ - -/* Syntax: XX_BASE = Virtual base address, XX_START = Physical base address */ - -/* OMAP5912 internal SRAM size is 250kByte */ -#define OMAP5912_SRAM_BASE 0xD0000000 -#define OMAP5912_SRAM_SIZE 0x3E800 -#define OMAP5912_SRAM_START 0x20000000 - -#define OMAP5912_DSP_BASE 0xE0000000 -#define OMAP5912_DSP_SIZE 0x50000 -#define OMAP5912_DSP_START 0xE0000000 - -#define OMAP5912_DSPREG_BASE 0xE1000000 -#define OMAP5912_DSPREG_SIZE SZ_128K -#define OMAP5912_DSPREG_START 0xE1000000 - -/* - * ---------------------------------------------------------------------------- - * Memory used by power management - * ---------------------------------------------------------------------------- - */ - -#define OMAP5912_SRAM_IDLE_SUSPEND (OMAP5912_SRAM_BASE + OMAP5912_SRAM_SIZE - 0x200) -#define OMAP5912_SRAM_API_SUSPEND (OMAP5912_SRAM_IDLE_SUSPEND + 0x100) - -/* - * --------------------------------------------------------------------------- - * Interrupts - * --------------------------------------------------------------------------- - */ -#define OMAP_IH2_0_BASE (0xfffe0000) -#define OMAP_IH2_1_BASE (0xfffe0100) -#define OMAP_IH2_2_BASE (0xfffe0200) -#define OMAP_IH2_3_BASE (0xfffe0300) - -#define OMAP_IH2_0_ITR (OMAP_IH2_0_BASE + 0x00) -#define OMAP_IH2_0_MIR (OMAP_IH2_0_BASE + 0x04) -#define OMAP_IH2_0_SIR_IRQ (OMAP_IH2_0_BASE + 0x10) -#define OMAP_IH2_0_SIR_FIQ (OMAP_IH2_0_BASE + 0x14) -#define OMAP_IH2_0_CONTROL (OMAP_IH2_0_BASE + 0x18) -#define OMAP_IH2_0_ILR0 (OMAP_IH2_0_BASE + 0x1c) -#define OMAP_IH2_0_ISR (OMAP_IH2_0_BASE + 0x9c) - -#define OMAP_IH2_1_ITR (OMAP_IH2_1_BASE + 0x00) -#define OMAP_IH2_1_MIR (OMAP_IH2_1_BASE + 0x04) -#define OMAP_IH2_1_SIR_IRQ (OMAP_IH2_1_BASE + 0x10) -#define OMAP_IH2_1_SIR_FIQ (OMAP_IH2_1_BASE + 0x14) -#define OMAP_IH2_1_CONTROL (OMAP_IH2_1_BASE + 0x18) -#define OMAP_IH2_1_ILR1 (OMAP_IH2_1_BASE + 0x1c) -#define OMAP_IH2_1_ISR (OMAP_IH2_1_BASE + 0x9c) - -#define OMAP_IH2_2_ITR (OMAP_IH2_2_BASE + 0x00) -#define OMAP_IH2_2_MIR (OMAP_IH2_2_BASE + 0x04) -#define OMAP_IH2_2_SIR_IRQ (OMAP_IH2_2_BASE + 0x10) -#define OMAP_IH2_2_SIR_FIQ (OMAP_IH2_2_BASE + 0x14) -#define OMAP_IH2_2_CONTROL (OMAP_IH2_2_BASE + 0x18) -#define OMAP_IH2_2_ILR2 (OMAP_IH2_2_BASE + 0x1c) -#define OMAP_IH2_2_ISR (OMAP_IH2_2_BASE + 0x9c) - -#define OMAP_IH2_3_ITR (OMAP_IH2_3_BASE + 0x00) -#define OMAP_IH2_3_MIR (OMAP_IH2_3_BASE + 0x04) -#define OMAP_IH2_3_SIR_IRQ (OMAP_IH2_3_BASE + 0x10) -#define OMAP_IH2_3_SIR_FIQ (OMAP_IH2_3_BASE + 0x14) -#define OMAP_IH2_3_CONTROL (OMAP_IH2_3_BASE + 0x18) -#define OMAP_IH2_3_ILR3 (OMAP_IH2_3_BASE + 0x1c) -#define OMAP_IH2_3_ISR (OMAP_IH2_3_BASE + 0x9c) - -/* - * ---------------------------------------------------------------------------- - * System control registers - * ---------------------------------------------------------------------------- - */ - -#define OMAP5912_ARM_IDLECT3 (CLKGEN_REG_BASE + 0x24) - -#endif /* __ASM_ARCH_OMAP5912_H */ - diff --git a/include/asm-arm/arch-omap/pm.h b/include/asm-arm/arch-omap/pm.h index 83911b919b2a..f209fc0953fb 100644 --- a/include/asm-arm/arch-omap/pm.h +++ b/include/asm-arm/arch-omap/pm.h @@ -1,13 +1,15 @@ /* - * FILE NAME include/asm/arch-omap/pm.h + * linux/include/asm/arch-omap/pm.h * - * BRIEF MODULE DESCRIPTION + * Header file for OMAP Power Management Routines * * Author: MontaVista Software, Inc. * support@mvista.com * * Copyright 2002 MontaVista Software Inc. * + * Cleanup 2004 for Linux 2.6 by Dirk Behme <dirk.behme@de.bosch.com> + * * 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 @@ -29,158 +31,199 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* - * List of global OMAP registers to preserve. All registers are 16 bits - * and must be accessed with 16 read/writes. - * More ones like CP and general purpose register values are preserved - * with the stack pointer in sleep.S. - */ #ifndef __ASM_ARCH_OMAP_PM_H #define __ASM_ARCH_OMAP_PM_H -#define ARM_REG_BASE (0xfffece00) -#define ARM_ASM_IDLECT1 (ARM_REG_BASE + 0x4) -#define ARM_ASM_IDLECT2 (ARM_REG_BASE + 0x8) -#define ARM_ASM_RSTCT1 (ARM_REG_BASE + 0x10) -#define ARM_ASM_RSTCT2 (ARM_REG_BASE + 0x14) -#define ARM_ASM_SYSST (ARM_REG_BASE + 0x18) /* - * Traffic Controller Memory Interface Registers + * ---------------------------------------------------------------------------- + * Register and offset definitions to be used in PM assembler code + * ---------------------------------------------------------------------------- */ -#define TCMIF_BASE 0xfffecc00 -#define EMIFS_ASM_CONFIG_REG (TCMIF_BASE + 0x0c) -#define EMIFF_ASM_SDRAM_CONFIG (TCMIF_BASE + 0x20) -#define IRQ_MIR1 (OMAP_IH1_BASE + IRQ_MIR) - -#ifdef CONFIG_ARCH_OMAP1510 -#define IRQ_MIR2 (OMAP_IH2_BASE + IRQ_MIR) -#else /* CONFIG_ARCH_OMAP1610 */ -#define IRQ_MIR2_0 (OMAP_IH2_0_BASE + IRQ_MIR) -#define IRQ_MIR2_1 (OMAP_IH2_1_BASE + IRQ_MIR) -#define IRQ_MIR2_2 (OMAP_IH2_2_BASE + IRQ_MIR) -#define IRQ_MIR2_3 (OMAP_IH2_3_BASE + IRQ_MIR) -#endif +#define CLKGEN_REG_ASM_BASE io_p2v(0xfffece00) +#define ARM_IDLECT1_ASM_OFFSET 0x04 +#define ARM_IDLECT2_ASM_OFFSET 0x08 + +#define TCMIF_ASM_BASE io_p2v(0xfffecc00) +#define EMIFS_CONFIG_ASM_OFFSET 0x0c +#define EMIFF_SDRAM_CONFIG_ASM_OFFSET 0x20 +/* + * ---------------------------------------------------------------------------- + * Powermanagement bitmasks + * ---------------------------------------------------------------------------- + */ #define IDLE_WAIT_CYCLES 0x00000fff #define PERIPHERAL_ENABLE 0x2 -#ifdef CONFIG_ARCH_OMAP1510 -#define DEEP_SLEEP_REQUEST 0x0ec7 -#define BIG_SLEEP_REQUEST 0x0cc5 -#define IDLE_LOOP_REQUEST 0x0c00 -#define IDLE_CLOCK_DOMAINS 0x2 -#else /* CONFIG_ARCH_OMAP1610 */ -#define DEEP_SLEEP_REQUEST 0x17c7 -#define BIG_SLEEP_REQUEST TBD -#define IDLE_LOOP_REQUEST 0x0400 -#define IDLE_CLOCK_DOMAINS 0x09c7 -#endif - #define SELF_REFRESH_MODE 0x0c000001 #define IDLE_EMIFS_REQUEST 0xc #define MODEM_32K_EN 0x1 +#define PER_EN 0x1 -#ifndef __ASSEMBLER__ -extern void omap_pm_idle(void); -extern void omap_pm_suspend(void); -extern int omap_cpu_suspend(unsigned short, unsigned short); -extern int omap_idle_loop_suspend(void); - -#ifdef CONFIG_ARCH_OMAP1510 -#define OMAP_SRAM_IDLE_SUSPEND 0xd002F000 -#define OMAP_SRAM_API_SUSPEND 0xd002F200 -#else /* CONFIG_ARCH_OMAP1610 */ -#define OMAP_SRAM_IDLE_SUSPEND 0xd0000400 -#define OMAP_SRAM_API_SUSPEND 0xd0000600 -#endif - -#define CPU_SUSPEND_SIZE 200 -#define ARM_REG_BASE (0xfffece00) -#define ARM_ASM_IDLECT1 (ARM_REG_BASE + 0x4) -#define ARM_ASM_IDLECT2 (ARM_REG_BASE + 0x8) -#define ARM_ASM_RSTCT1 (ARM_REG_BASE + 0x10) -#define ARM_ASM_RSTCT2 (ARM_REG_BASE + 0x14) -#define ARM_ASM_SYSST (ARM_REG_BASE + 0x18) - -#define TCMIF_BASE 0xfffecc00 -#define PM_EMIFS_CONFIG_REG (TCMIF_BASE + 0x0c) -#define PM_EMIFF_SDRAM_CONFIG (TCMIF_BASE + 0x20) -#define FUNC_MUX_CTRL_LOW_PWR (0xfffe1020) - -#ifdef CONFIG_ARCH_OMAP1510 -#define ULPD_LOW_POWER_REQ 0x0001 -#else /* CONFIG_ARCH_OMAP1610 */ -#define ULPD_LOW_POWER_REQ 0x3 -#endif -#define ULPD_LOW_PWR 0x1000 -#define ULPD_LOW_POWER_EN 0x0001 +#define CPU_SUSPEND_SIZE 200 +#define ULPD_LOW_POWER_EN 0x0001 #define DSP_IDLE_DELAY 10 #define DSP_IDLE 0x0040 +#define DSP_RST 0x0004 #define DSP_ENABLE 0x0002 #define SUFFICIENT_DSP_RESET_TIME 1000 #define DEFAULT_MPUI_CONFIG 0x05cf #define ENABLE_XORCLK 0x2 -#define DSP_RESET 0x2000 +#define DSP_CLOCK_ENABLE 0x2000 +#define DSP_IDLE_MODE 0x2 #define TC_IDLE_REQUEST (0x0000000c) -#define EMIFF_CONFIG_REG EMIFF_SDRAM_CONFIG +#define IRQ_LEVEL2 (1<<0) +#define IRQ_KEYBOARD (1<<1) +#define IRQ_UART2 (1<<15) + +#define PDE_BIT 0x08 +#define PWD_EN_BIT 0x04 +#define EN_PERCK_BIT 0x04 + +#define OMAP1510_DEEP_SLEEP_REQUEST 0x0ec7 +#define OMAP1510_BIG_SLEEP_REQUEST 0x0cc5 +#define OMAP1510_IDLE_LOOP_REQUEST 0x0c00 +#define OMAP1510_IDLE_CLOCK_DOMAINS 0x2 +#define OMAP1510_ULPD_LOW_POWER_REQ 0x0001 -#define ARM_SAVE(x) arm_sleep_save[ARM_SLEEP_SAVE_##x] = omap_readw(x) -#define ARM_RESTORE(x) omap_writew((unsigned short)arm_sleep_save[ARM_SLEEP_SAVE_##x], x) +#define OMAP1610_DEEP_SLEEP_REQUEST 0x17c7 +#define OMAP1610_BIG_SLEEP_REQUEST TBD +#define OMAP1610_IDLE_LOOP_REQUEST 0x0400 +#define OMAP1610_IDLE_CLOCK_DOMAINS 0x09c7 +#define OMAP1610_ULPD_LOW_POWER_REQ 0x3 + +#ifndef OMAP1510_SRAM_IDLE_SUSPEND +#define OMAP1510_SRAM_IDLE_SUSPEND 0 +#endif +#ifndef OMAP1610_SRAM_IDLE_SUSPEND +#define OMAP1610_SRAM_IDLE_SUSPEND 0 +#endif +#ifndef OMAP5912_SRAM_IDLE_SUSPEND +#define OMAP5912_SRAM_IDLE_SUSPEND 0 +#endif + +#ifndef OMAP1510_SRAM_API_SUSPEND +#define OMAP1510_SRAM_API_SUSPEND 0 +#endif +#ifndef OMAP1610_SRAM_API_SUSPEND +#define OMAP1610_SRAM_API_SUSPEND 0 +#endif +#ifndef OMAP5912_SRAM_API_SUSPEND +#define OMAP5912_SRAM_API_SUSPEND 0 +#endif + +#if !defined(CONFIG_ARCH_OMAP1510) && \ + !defined(CONFIG_ARCH_OMAP16XX) +#error "Power management for this processor not implemented yet" +#endif + +#ifndef __ASSEMBLER__ +extern void omap_pm_idle(void); +extern void omap_pm_suspend(void); +extern int omap1510_cpu_suspend(unsigned short, unsigned short); +extern int omap1610_cpu_suspend(unsigned short, unsigned short); +extern int omap1510_idle_loop_suspend(void); +extern int omap1610_idle_loop_suspend(void); +extern unsigned int omap1510_cpu_suspend_sz; +extern unsigned int omap1510_idle_loop_suspend_sz; +extern unsigned int omap1610_cpu_suspend_sz; +extern unsigned int omap1610_idle_loop_suspend_sz; + +#define ARM_SAVE(x) arm_sleep_save[ARM_SLEEP_SAVE_##x] = omap_readl(x) +#define ARM_RESTORE(x) omap_writel((arm_sleep_save[ARM_SLEEP_SAVE_##x]), (x)) #define ARM_SHOW(x) arm_sleep_save[ARM_SLEEP_SAVE_##x] #define ULPD_SAVE(x) ulpd_sleep_save[ULPD_SLEEP_SAVE_##x] = omap_readw(x) -#define ULPD_RESTORE(x) omap_writew((unsigned short)ulpd_sleep_save[ULPD_SLEEP_SAVE_##x], x) +#define ULPD_RESTORE(x) omap_writew((ulpd_sleep_save[ULPD_SLEEP_SAVE_##x]), (x)) #define ULPD_SHOW(x) ulpd_sleep_save[ULPD_SLEEP_SAVE_##x] -#define MPUI_SAVE(x) mpui_sleep_save[MPUI_SLEEP_SAVE_##x] = omap_readl(x) -#define MPUI_RESTORE(x) omap_writel((unsigned int)mpui_sleep_save[MPUI_SLEEP_SAVE_##x], x) -#define MPUI_SHOW(x) (unsigned int)mpui_sleep_save[MPUI_SLEEP_SAVE_##x] +#define MPUI1510_SAVE(x) mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_##x] = omap_readl(x) +#define MPUI1510_RESTORE(x) omap_writel((mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_##x]), (x)) +#define MPUI1510_SHOW(x) mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_##x] + +#define MPUI1610_SAVE(x) mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_##x] = omap_readl(x) +#define MPUI1610_RESTORE(x) omap_writel((mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_##x]), (x)) +#define MPUI1610_SHOW(x) mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_##x] + +/* + * List of global OMAP registers to preserve. + * More ones like CP and general purpose register values are preserved + * with the stack pointer in sleep.S. + */ enum arm_save_state { ARM_SLEEP_SAVE_START = 0, /* - * 9 MPU control registers, all 16 bits + * MPU control registers 32 bits */ - ARM_SLEEP_SAVE_ARM_CKCTL, ARM_SLEEP_SAVE_ARM_IDLECT1, - ARM_SLEEP_SAVE_ARM_IDLECT2, ARM_SLEEP_SAVE_ARM_EWUPCT, - ARM_SLEEP_SAVE_ARM_RSTCT1, ARM_SLEEP_SAVE_ARM_RSTCT2, + ARM_SLEEP_SAVE_ARM_CKCTL, + ARM_SLEEP_SAVE_ARM_IDLECT1, + ARM_SLEEP_SAVE_ARM_IDLECT2, + ARM_SLEEP_SAVE_ARM_EWUPCT, + ARM_SLEEP_SAVE_ARM_RSTCT1, + ARM_SLEEP_SAVE_ARM_RSTCT2, ARM_SLEEP_SAVE_ARM_SYSST, - ARM_SLEEP_SAVE_SIZE }; enum ulpd_save_state { ULPD_SLEEP_SAVE_START = 0, - ULPD_SLEEP_SAVE_ULPD_IT_STATUS_REG, ULPD_SLEEP_SAVE_ULPD_CLOCK_CTRL_REG, - ULPD_SLEEP_SAVE_ULPD_SOFT_REQ_REG, ULPD_SLEEP_SAVE_ULPD_STATUS_REQ_REG, - ULPD_SLEEP_SAVE_ULPD_DPLL_CTRL_REG, ULPD_SLEEP_SAVE_ULPD_POWER_CTRL_REG, + /* + * ULPD registers 16 bits + */ + ULPD_SLEEP_SAVE_ULPD_IT_STATUS, + ULPD_SLEEP_SAVE_ULPD_CLOCK_CTRL, + ULPD_SLEEP_SAVE_ULPD_SOFT_REQ, + ULPD_SLEEP_SAVE_ULPD_STATUS_REQ, + ULPD_SLEEP_SAVE_ULPD_DPLL_CTRL, + ULPD_SLEEP_SAVE_ULPD_POWER_CTRL, ULPD_SLEEP_SAVE_SIZE }; -enum mpui_save_state { +enum mpui1510_save_state { + MPUI1510_SLEEP_SAVE_START = 0, /* * MPUI registers 32 bits */ - MPUI_SLEEP_SAVE_MPUI_CTRL_REG, MPUI_SLEEP_SAVE_MPUI_DSP_BOOT_CONFIG, - MPUI_SLEEP_SAVE_MPUI_DSP_API_CONFIG, - MPUI_SLEEP_SAVE_MPUI_DSP_STATUS_REG, - MPUI_SLEEP_SAVE_PM_EMIFF_SDRAM_CONFIG, - MPUI_SLEEP_SAVE_PM_EMIFS_CONFIG_REG, - MPUI_SLEEP_SAVE_IRQ_MIR1, -#ifdef CONFIG_ARCH_OMAP1510 - MPUI_SLEEP_SAVE_IRQ_MIR2, -#else /* CONFIG_ARCH_OMAP1610 */ - MPUI_SLEEP_SAVE_IRQ_MIR2_0, - MPUI_SLEEP_SAVE_IRQ_MIR2_1, - MPUI_SLEEP_SAVE_IRQ_MIR2_2, - MPUI_SLEEP_SAVE_IRQ_MIR2_3, + MPUI1510_SLEEP_SAVE_MPUI_CTRL, + MPUI1510_SLEEP_SAVE_MPUI_DSP_BOOT_CONFIG, + MPUI1510_SLEEP_SAVE_MPUI_DSP_API_CONFIG, + MPUI1510_SLEEP_SAVE_MPUI_DSP_STATUS, + MPUI1510_SLEEP_SAVE_EMIFF_SDRAM_CONFIG, + MPUI1510_SLEEP_SAVE_EMIFS_CONFIG, + MPUI1510_SLEEP_SAVE_OMAP_IH1_MIR, + MPUI1510_SLEEP_SAVE_OMAP_IH2_MIR, +#if defined(CONFIG_ARCH_OMAP1510) + MPUI1510_SLEEP_SAVE_SIZE +#else + MPUI1510_SLEEP_SAVE_SIZE = 0 #endif - - MPUI_SLEEP_SAVE_SIZE }; - -#endif /* ASSEMBLER */ +enum mpui1610_save_state { + MPUI1610_SLEEP_SAVE_START = 0, + /* + * MPUI registers 32 bits + */ + MPUI1610_SLEEP_SAVE_MPUI_CTRL, + MPUI1610_SLEEP_SAVE_MPUI_DSP_BOOT_CONFIG, + MPUI1610_SLEEP_SAVE_MPUI_DSP_API_CONFIG, + MPUI1610_SLEEP_SAVE_MPUI_DSP_STATUS, + MPUI1610_SLEEP_SAVE_EMIFF_SDRAM_CONFIG, + MPUI1610_SLEEP_SAVE_EMIFS_CONFIG, + MPUI1610_SLEEP_SAVE_OMAP_IH1_MIR, + MPUI1610_SLEEP_SAVE_OMAP_IH2_0_MIR, + MPUI1610_SLEEP_SAVE_OMAP_IH2_1_MIR, + MPUI1610_SLEEP_SAVE_OMAP_IH2_2_MIR, + MPUI1610_SLEEP_SAVE_OMAP_IH2_3_MIR, +#if defined(CONFIG_ARCH_OMAP16XX) + MPUI1610_SLEEP_SAVE_SIZE +#else + MPUI1610_SLEEP_SAVE_SIZE = 0 #endif +}; + +#endif /* ASSEMBLER */ +#endif /* __ASM_ARCH_OMAP_PM_H */ diff --git a/include/asm-arm/arch-omap/serial.h b/include/asm-arm/arch-omap/serial.h index d37271884065..0f4b83b807e7 100644 --- a/include/asm-arm/arch-omap/serial.h +++ b/include/asm-arm/arch-omap/serial.h @@ -12,6 +12,8 @@ #define OMAP_UART1_BASE (unsigned char *)0xfffb0000 #define OMAP_UART2_BASE (unsigned char *)0xfffb0800 #define OMAP_UART3_BASE (unsigned char *)0xfffb9800 +#define OMAP_MAX_NR_PORTS 3 +#define PORT_OMAP 16 /* Temporary */ #ifndef __ASSEMBLY__ @@ -19,7 +21,9 @@ #include <asm/irq.h> #define OMAP1510_BASE_BAUD (12000000/16) -#define OMAP1610_BASE_BAUD (48000000/16) +#define OMAP16XX_BASE_BAUD (48000000/16) + +#define UART_SYSC 0x15 /* OMAP FCR trigger redefinitions */ #define UART_FCR_R_TRIGGER_8 0x00 /* Mask for receive trigger set at 8 */ diff --git a/include/asm-arm/arch-omap/tc.h b/include/asm-arm/arch-omap/tc.h new file mode 100644 index 000000000000..a1d2e5a20675 --- /dev/null +++ b/include/asm-arm/arch-omap/tc.h @@ -0,0 +1,64 @@ +/* + * linux/include/asm-arm/arch-omap/tc.h + * + * OMAP Traffic Controller + * + * Copyright (C) 2004 Nokia Corporation + * Author: Imre Deak <imre.deak@nokia.com> + * + * 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 program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * 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., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef __ASM_ARCH_TC_H +#define __ASM_ARCH_TC_H + +#define OMAP_TC_OCPT1_PRIOR 0xFFFECC00 +#define OMAP_TC_EMIFS_PRIOR 0xFFFECC04 +#define OMAP_TC_EMIFF_PRIOR 0xFFFECC08 +#define OMAP_TC_OCPT2_PRIOR 0xFFFECCD0 + + +/* EMIF Slow Interface Configuration Register */ +#define OMAP_EMIFS_CONFIG_REG __REG32(EMIFS_CONFIG) + +#define OMAP_EMIFS_CONFIG_FR (1 << 4) +#define OMAP_EMIFS_CONFIG_PDE (1 << 3) +#define OMAP_EMIFS_CONFIG_PWD_EN (1 << 2) +#define OMAP_EMIFS_CONFIG_BM (1 << 1) +#define OMAP_EMIFS_CONFIG_WP (1 << 0) + +/* external EMIFS chipselect regions */ +#define OMAP_CS1_PHYS 0x04000000 +#define OMAP_CS1_SIZE SZ_64M + +#define OMAP_CS1A_PHYS OMAP_CS1_PHYS +#define OMAP_CS1A_SIZE SZ_32M + +#define OMAP_CS1B_PHYS (OMAP_CS1A_PHYS + OMAP_CS1A_SIZE) +#define OMAP_CS1B_SIZE SZ_32M + +#define OMAP_CS2_PHYS 0x08000000 +#define OMAP_CS2_SIZE SZ_64M + +#define OMAP_CS2A_PHYS OMAP_CS2_PHYS +#define OMAP_CS2A_SIZE SZ_32M + +#define OMAP_CS2B_PHYS (OMAP_CS2A_PHYS + OMAP_CS2A_SIZE) +#define OMAP_CS2B_SIZE SZ_32M + +#define OMAP_CS3_PHYS 0x0c000000 +#define OMAP_CS3_SIZE SZ_64M + +#endif /* __ASM_ARCH_TC_H */ diff --git a/include/asm-arm/arch-omap/timex.h b/include/asm-arm/arch-omap/timex.h index 5a3dfb68c165..b61ddb491e83 100644 --- a/include/asm-arm/arch-omap/timex.h +++ b/include/asm-arm/arch-omap/timex.h @@ -28,8 +28,6 @@ #if !defined(__ASM_ARCH_OMAP_TIMEX_H) #define __ASM_ARCH_OMAP_TIMEX_H -#include <asm/arch/clocks.h> -/* TC clock */ -#define CLOCK_TICK_RATE ((OMAP_CK_MAX_RATE*1000000)/2) +#define CLOCK_TICK_RATE (HZ * 100000UL) #endif /* __ASM_ARCH_OMAP_TIMEX_H */ diff --git a/include/asm-arm/arch-omap/uncompress.h b/include/asm-arm/arch-omap/uncompress.h index 7da2d6e4cf5f..abcb5fa12f0b 100644 --- a/include/asm-arm/arch-omap/uncompress.h +++ b/include/asm-arm/arch-omap/uncompress.h @@ -20,10 +20,13 @@ #include <linux/config.h> #include <linux/types.h> #include <linux/serial_reg.h> -#include <asm/hardware.h> #include <asm/arch/serial.h> +unsigned int system_rev; + #define UART_OMAP_MDR1 0x08 /* mode definition register */ +#define OMAP_ID_730 0x355F +#define ID_MASK 0x7fff #define check_port(base, shift) ((base[UART_OMAP_MDR1 << shift] & 7) == 0) #define omap_get_id() ((*(volatile unsigned int *)(0xfffed404)) >> 12) & ID_MASK @@ -31,7 +34,7 @@ static void putstr(const char *s) { volatile u8 * uart = 0; - int shift = 0; + int shift; #ifdef CONFIG_OMAP_LL_DEBUG_UART3 uart = (volatile u8 *)(OMAP_UART3_BASE); @@ -46,21 +49,11 @@ putstr(const char *s) /* 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; - } else if (omap_id == OMAP_ID_730) { + if (omap_id == OMAP_ID_730) shift = 0; - } else { - /* 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 - * quiet. - */ - return; - } + else + shift = 2; + if (check_port(uart, shift)) break; /* Silent boot if no serial ports are enabled. */ diff --git a/include/asm-arm/arch-s3c2410/bast-pmu.h b/include/asm-arm/arch-s3c2410/bast-pmu.h new file mode 100644 index 000000000000..758c5c59d4bf --- /dev/null +++ b/include/asm-arm/arch-s3c2410/bast-pmu.h @@ -0,0 +1,43 @@ +/* linux/include/asm-arm/arch-s3c2410/bast-pmu.h + * + * (c) 2003,2004 Simtec Electronics + * Ben Dooks <ben@simtec.co.uk> + * Vincent Sanders <vince@simtec.co.uk> + * + * Machine BAST - Power Management chip + * + * 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. + * + * Changelog: + * 08-Oct-2003 BJD Initial creation +*/ + +#ifndef __ASM_ARCH_BASTPMU_H +#define __ASM_ARCH_BASTPMU_H "08_OCT_2004" + +#define BASTPMU_REG_IDENT (0x00) +#define BASTPMU_REG_VERSION (0x01) +#define BASTPMU_REG_DDCCTRL (0x02) +#define BASTPMU_REG_POWER (0x03) +#define BASTPMU_REG_RESET (0x04) +#define BASTPMU_REG_GWO (0x05) +#define BASTPMU_REG_WOL (0x06) +#define BASTPMU_REG_WOR (0x07) +#define BASTPMU_REG_UID (0x09) + +#define BASTPMU_EEPROM (0xC0) + +#define BASTPMU_EEP_UID (BASTPMU_EEPROM + 0) +#define BASTPMU_EEP_WOL (BASTPMU_EEPROM + 8) +#define BASTPMU_EEP_WOR (BASTPMU_EEPROM + 9) + +#define BASTPMU_IDENT_0 0x53 +#define BASTPMU_IDENT_1 0x42 +#define BASTPMU_IDENT_2 0x50 +#define BASTPMU_IDENT_3 0x4d + +#define BASTPMU_RESET_GUARD (0x55) + +#endif /* __ASM_ARCH_BASTPMU_H */ diff --git a/include/asm-arm/arch-s3c2410/iic.h b/include/asm-arm/arch-s3c2410/iic.h new file mode 100644 index 000000000000..518547f6d7a7 --- /dev/null +++ b/include/asm-arm/arch-s3c2410/iic.h @@ -0,0 +1,36 @@ +/* linux/include/asm-arm/arch-s3c2410/iic.h + * + * (c) 2004 Simtec Electronics + * Ben Dooks <ben@simtec.co.uk> + * + * S3C2410 - I2C Controller platfrom_device info + * + * 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. + * + * Changelog: + * 05-Oct-2004 BJD Created file + * 19-Oct-2004 BJD Updated for s3c2440 +*/ + +#ifndef __ASM_ARCH_IIC_H +#define __ASM_ARCH_IIC_H __FILE__ + +#define S3C_IICFLG_FILTER (1<<0) /* enable s3c2440 filter */ + +/* Notes: + * 1) All frequencies are expressed in Hz + * 2) A value of zero is `do not care` +*/ + +struct s3c2410_platform_i2c { + unsigned int flags; + unsigned int slave_addr; /* slave address for controller */ + unsigned long bus_freq; /* standard bus frequency */ + unsigned long max_freq; /* max frequency for the bus */ + unsigned long min_freq; /* min frequency for the bus */ + unsigned int sda_delay; /* pclks (s3c2440 only) */ +}; + +#endif /* __ASM_ARCH_IIC_H */ diff --git a/include/asm-arm/arch-s3c2410/regs-iic.h b/include/asm-arm/arch-s3c2410/regs-iic.h index 028ab20292e0..381ab4baf208 100644 --- a/include/asm-arm/arch-s3c2410/regs-iic.h +++ b/include/asm-arm/arch-s3c2410/regs-iic.h @@ -13,8 +13,8 @@ * 03-Oct-2004 BJD Initial include for Linux */ -#ifndef __ASM_ARCH_IIC_H -#define __ASM_ARCH_IIC_H __FILE__ +#ifndef __ASM_ARCH_REGS_IIC_H +#define __ASM_ARCH_REGS_IIC_H __FILE__ /* see s3c2410x user guide, v1.1, section 9 (p447) for more info */ @@ -47,4 +47,4 @@ #define S3C2410_IICSTAT_ADDR0 (1<<1) #define S3C2410_IICSTAT_LASTBIT (1<<0) -#endif /* __ASM_ARCH_IIC_H */ +#endif /* __ASM_ARCH_REGS_IIC_H */ diff --git a/include/asm-arm/arch-s3c2410/regs-lcd.h b/include/asm-arm/arch-s3c2410/regs-lcd.h index e0dad358b8df..eda2a7b9bf16 100644 --- a/include/asm-arm/arch-s3c2410/regs-lcd.h +++ b/include/asm-arm/arch-s3c2410/regs-lcd.h @@ -29,7 +29,7 @@ #define S3C2410_LCDCON5 S3C2410_LCDREG(0x10) #define S3C2410_LCDCON1_CLKVAL(x) ((x) << 8) -#define S3C2410_LCDCON1_MMODE (1<<6) +#define S3C2410_LCDCON1_MMODE (1<<7) #define S3C2410_LCDCON1_DSCAN4 (0<<5) #define S3C2410_LCDCON1_STN4 (1<<5) #define S3C2410_LCDCON1_STN8 (2<<5) @@ -48,15 +48,15 @@ #define S3C2410_LCDCON1_TFT16BPP (12<<1) #define S3C2410_LCDCON1_TFT24BPP (13<<1) -#define S3C2410_LCDCON1_ENVDI (1) +#define S3C2410_LCDCON1_ENVID (1) #define S3C2410_LCDCON2_VBPD(x) ((x) << 24) #define S3C2410_LCDCON2_LINEVAL(x) ((x) << 14) #define S3C2410_LCDCON2_VFPD(x) ((x) << 6) #define S3C2410_LCDCON2_VSPW(x) ((x) << 0) -#define S3C2410_LCDCON3_HBPD(x) ((x) << 25) -#define S3C2410_LCDCON3_WDLY(x) ((x) << 25) +#define S3C2410_LCDCON3_HBPD(x) ((x) << 19) +#define S3C2410_LCDCON3_WDLY(x) ((x) << 19) #define S3C2410_LCDCON3_HOZVAL(x) ((x) << 8) #define S3C2410_LCDCON3_HFPD(x) ((x) << 0) #define S3C2410_LCDCON3_LINEBLANK(x)((x) << 0) @@ -84,6 +84,12 @@ #define S3C2410_LCDSADDR2 S3C2410_LCDREG(0x18) #define S3C2410_LCDSADDR3 S3C2410_LCDREG(0x1C) +#define S3C2410_LCDBANK(x) ((x) << 21) +#define S3C2410_LCDBASEU(x) (x) + +#define S3C2410_OFFSIZE(x) ((x) << 11) +#define S3C2410_PAGEWIDTH(x) (x) + /* colour lookup and miscellaneous controls */ #define S3C2410_REDLUT S3C2410_LCDREG(0x20) diff --git a/include/asm-arm/arch-s3c2410/regs-serial.h b/include/asm-arm/arch-s3c2410/regs-serial.h index b8dce8a1a622..95d0fba9fded 100644 --- a/include/asm-arm/arch-s3c2410/regs-serial.h +++ b/include/asm-arm/arch-s3c2410/regs-serial.h @@ -66,6 +66,7 @@ #define S3C2410_LCON_PMASK (0x7 << 3) #define S3C2410_LCON_STOPB (1<<2) +#define S3C2410_LCON_IRM (1<<6) #define S3C2410_UCON_UCLK (1<<10) #define S3C2410_UCON_SBREAK (1<<4) @@ -97,6 +98,14 @@ #define S3C2410_UFSTAT_RXMASK (15<<0) #define S3C2410_UFSTAT_RXSHIFT (0) +#define S3C2440_UFSTAT_TXFULL (1<<14) +#define S3C2440_UFSTAT_RXFULL (1<<6) +#define S3C2440_UFSTAT_TXSHIFT (8) +#define S3C2440_UFSTAT_RXSHIFT (0) +#define S3C2440_UFSTAT_TXMASK (63<<8) +#define S3C2440_UFSTAT_RXMASK (63) + +#define S3C2410_UTRSTAT_TXE (1<<2) #define S3C2410_UTRSTAT_TXFE (1<<1) #define S3C2410_UTRSTAT_RXDR (1<<0) diff --git a/include/asm-arm/arch-s3c2410/regs-udc.h b/include/asm-arm/arch-s3c2410/regs-udc.h index aee280500ac2..ad550bbf7285 100644 --- a/include/asm-arm/arch-s3c2410/regs-udc.h +++ b/include/asm-arm/arch-s3c2410/regs-udc.h @@ -8,8 +8,9 @@ * the License, or (at your option) any later version. * * Changelog: - * 01-08-2004 initial creation - * 12-09-2004 cleanup for submission + * 01-08-2004 Initial creation + * 12-09-2004 Cleanup for submission + * 24-10-2004 Fixed S3C2410_UDC_MAXP_REG definition */ #ifndef __ASM_ARCH_REGS_UDC_H @@ -68,7 +69,7 @@ /* indexed registers */ -#define S3C2410_UDC_MAXP_REG S3C2410_USBDREG(0x018c) +#define S3C2410_UDC_MAXP_REG S3C2410_USBDREG(0x0180) #define S3C2410_UDC_EP0_CSR_REG S3C2410_USBDREG(0x0184) diff --git a/include/asm-arm/arch-s3c2410/uncompress.h b/include/asm-arm/arch-s3c2410/uncompress.h index 023f22b14378..a9c3d55ec9eb 100644 --- a/include/asm-arm/arch-s3c2410/uncompress.h +++ b/include/asm-arm/arch-s3c2410/uncompress.h @@ -13,21 +13,29 @@ * 22-May-2003 BJD Created * 08-Sep-2003 BJD Moved to linux v2.6 * 12-Mar-2004 BJD Updated header protection + * 12-Oct-2004 BJD Take account of debug uart configuration */ #ifndef __ASM_ARCH_UNCOMPRESS_H #define __ASM_ARCH_UNCOMPRESS_H +#include <config/debug/s3c2410/port.h> + /* defines for UART registers */ #include "asm/arch/regs-serial.h" +#include "asm/arch/regs-gpio.h" #include <asm/arch/map.h> +/* working in physical space... */ +#undef S3C2410_GPIOREG +#define S3C2410_GPIOREG(x) ((S3C2410_PA_GPIO + (x))) + /* how many bytes we allow into the FIFO at a time in FIFO mode */ #define FIFO_MAX (14) #if 1 -#define uart_base S3C2410_PA_UART +#define uart_base S3C2410_PA_UART + (0x4000 * CONFIG_DEBUG_S3C2410_UART) #else static unsigned int uart_base = S3C2410_PA_UART; #endif @@ -74,6 +82,10 @@ arch_decomp_setup(void) static void putc(char ch) { + int cpuid = *((volatile unsigned int *)S3C2410_GSTATUS1); + + cpuid &= S3C2410_GSTATUS1_IDMASK; + if (ch == '\n') putc('\r'); /* expand newline to \r\n */ @@ -82,8 +94,14 @@ putc(char ch) while (1) { level = uart_rd(S3C2410_UFSTAT); - level &= S3C2410_UFSTAT_TXMASK; - level >>= S3C2410_UFSTAT_TXSHIFT; + + if (cpuid == S3C2410_GSTATUS1_2440) { + level &= S3C2440_UFSTAT_TXMASK; + level >>= S3C2440_UFSTAT_TXSHIFT; + } else { + level &= S3C2410_UFSTAT_TXMASK; + level >>= S3C2410_UFSTAT_TXSHIFT; + } if (level < FIFO_MAX) break; @@ -92,7 +110,7 @@ putc(char ch) } else { /* not using fifos */ - while ((uart_rd(S3C2410_UTRSTAT) & S3C2410_UTRSTAT_TXFE) != S3C2410_UTRSTAT_TXFE); + while ((uart_rd(S3C2410_UTRSTAT) & S3C2410_UTRSTAT_TXE) != S3C2410_UTRSTAT_TXE); } /* write byte to transmission register */ diff --git a/include/asm-arm/posix_types.h b/include/asm-arm/posix_types.h index cdf4b69149f0..e142a2a016ca 100644 --- a/include/asm-arm/posix_types.h +++ b/include/asm-arm/posix_types.h @@ -62,19 +62,19 @@ typedef struct { #undef __FD_SET #define __FD_SET(fd, fdsetp) \ - (((fd_set *)fdsetp)->fds_bits[fd >> 5] |= (1<<(fd & 31))) + (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] |= (1<<((fd) & 31))) #undef __FD_CLR #define __FD_CLR(fd, fdsetp) \ - (((fd_set *)fdsetp)->fds_bits[fd >> 5] &= ~(1<<(fd & 31))) + (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] &= ~(1<<((fd) & 31))) #undef __FD_ISSET #define __FD_ISSET(fd, fdsetp) \ - ((((fd_set *)fdsetp)->fds_bits[fd >> 5] & (1<<(fd & 31))) != 0) + ((((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] & (1<<((fd) & 31))) != 0) #undef __FD_ZERO #define __FD_ZERO(fdsetp) \ - (memset (fdsetp, 0, sizeof (*(fd_set *)fdsetp))) + (memset (fdsetp, 0, sizeof (*(fd_set *)(fdsetp)))) #endif diff --git a/include/asm-generic/pci.h b/include/asm-generic/pci.h index 40cca57fe01e..9d4cc47bde39 100644 --- a/include/asm-generic/pci.h +++ b/include/asm-generic/pci.h @@ -24,4 +24,11 @@ pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, #define pcibios_scan_all_fns(a, b) 0 +#ifndef HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ +static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) +{ + return channel ? 15 : 14; +} +#endif /* HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ */ + #endif diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index 00965b4df1b8..147da2f7414b 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h @@ -658,4 +658,6 @@ extern void select_idle_routine(const struct cpuinfo_x86 *c); #define cache_line_size() (boot_cpu_data.x86_cache_alignment) +extern unsigned long boot_option_idle_override; + #endif /* __ASM_I386_PROCESSOR_H */ diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index e094249c8942..c093c8bba146 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h @@ -290,7 +290,7 @@ #define __NR_mq_getsetattr (__NR_mq_open+5) #define __NR_sys_kexec_load 283 #define __NR_waitid 284 -#define __NR_sys_setaltroot 285 +/* #define __NR_sys_setaltroot 285 */ #define __NR_add_key 286 #define __NR_request_key 287 #define __NR_keyctl 288 diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h index f27a4bca2fd5..8769dd9df369 100644 --- a/include/asm-ia64/processor.h +++ b/include/asm-ia64/processor.h @@ -691,6 +691,8 @@ prefetchw (const void *x) #define spin_lock_prefetch(x) prefetchw(x) +extern unsigned long boot_option_idle_override; + #endif /* !__ASSEMBLY__ */ #endif /* _ASM_IA64_PROCESSOR_H */ diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h index 6384693300fd..84e6989d6ea0 100644 --- a/include/asm-ia64/unistd.h +++ b/include/asm-ia64/unistd.h @@ -259,7 +259,6 @@ #define __NR_mq_getsetattr 1267 #define __NR_kexec_load 1268 #define __NR_vserver 1269 -#define __NR_setaltroot 1270 #ifdef __KERNEL__ diff --git a/include/asm-m68knommu/page_offset.h b/include/asm-m68knommu/page_offset.h index 15eea42b8cf9..2b45645e9b29 100644 --- a/include/asm-m68knommu/page_offset.h +++ b/include/asm-m68knommu/page_offset.h @@ -1,6 +1,5 @@ #include <linux/config.h> -#include <asm/shglcore.h> /* This handles the memory map.. */ @@ -45,7 +44,4 @@ #ifdef CONFIG_M68EN302 #define PAGE_OFFSET_RAW 0x00000000 #endif -#ifdef CONFIG_SHGLCORE -#define PAGE_OFFSET_RAW SHGLCORE_RAM_BANK_0_ADDR -#endif diff --git a/include/asm-m68knommu/param.h b/include/asm-m68knommu/param.h index 734960d5729d..3f57d5db81f5 100644 --- a/include/asm-m68knommu/param.h +++ b/include/asm-m68knommu/param.h @@ -3,38 +3,11 @@ #include <linux/config.h> -#ifndef HZ -#ifdef CONFIG_COLDFIRE #if defined(CONFIG_CLEOPATRA) -#define HZ 1000 -#else -#define HZ 100 -#endif -#endif -#ifdef CONFIG_M68EN302 -#define HZ 100 -#endif -#ifdef CONFIG_M68328 -#define HZ 100 +#define HZ 1000 #endif -#ifdef CONFIG_M68EZ328 -#define HZ 100 -#endif -#ifdef CONFIG_UCSIMM -#define HZ 100 -#endif - -#ifdef CONFIG_M68VZ328 -#define HZ 100 -#endif - -#ifdef CONFIG_SHGLCORE -#define HZ 50 -#endif -#ifdef CONFIG_M68360 -#define HZ 100 -#endif - +#ifndef HZ +#define HZ 100 #endif #ifdef __KERNEL__ diff --git a/include/asm-m68knommu/shglcore.h b/include/asm-m68knommu/shglcore.h deleted file mode 100644 index c06f6965a982..000000000000 --- a/include/asm-m68knommu/shglcore.h +++ /dev/null @@ -1,65 +0,0 @@ - -/* Copyright (C) 1998 Kenneth Albanowski <kjahds@kjahds.com>, - */ - -#ifndef _M68K_SHGLCORE_H -#define _M68K_SHGLCORE_H - -#include <linux/config.h> - -#ifdef CONFIG_SHGLCORE - -#include <asm/MC68332.h> - -#ifdef CONFIG_SHGLCORE_2MEG - -#define SHGLCORE_ROM_BANK_0_ADDR 0x000000 -#define SHGLCORE_ROM_BANK_1_ADDR 0x100000 -#define SHGLCORE_RAM_BANK_0_ADDR 0x200000 -#define SHGLCORE_RAM_BANK_1_ADDR 0x300000 -#define SHGLCORE_FLASH_BANK_0_ADDR 0x400000 - -#define SHGLCORE_ROM_BANK_0_LENGTH 0x100000 -#define SHGLCORE_ROM_BANK_1_LENGTH 0x100000 -#define SHGLCORE_RAM_BANK_0_LENGTH 0x100000 -#define SHGLCORE_RAM_BANK_1_LENGTH 0x100000 -#define SHGLCORE_FLASH_BANK_0_LENGTH 0x80000 - -#define SHGLCORE_ACC_ADDR 0x600000 -#define SHGLCORE_LANCE_ADDR 0x700000 - -#else - -#define SHGLCORE_ROM_BANK_0_ADDR 0x000000 -#define SHGLCORE_RAM_BANK_0_ADDR 0x100000 -#define SHGLCORE_FLASH_BANK_0_ADDR 0x300000 - -#define SHGLCORE_ROM_BANK_0_LENGTH 0x100000 -#define SHGLCORE_RAM_BANK_0_LENGTH 0x100000 -#define SHGLCORE_FLASH_BANK_0_LENGTH 0x80000 - -#define SHGLCORE_ACC_ADDR 0x400000 -#define SHGLCORE_LANCE_ADDR 0x500000 - -#endif - -#define MAX_DMA_ADDRESS SHGLCORE_RAM_BANK_0_ADDR + SHGLCORE_RAM_BANK_0_LENGTH - -#define SHGLCORE_LATCH_ADDR (SHGLCORE_ACC_ADDR+0x100) -#define SHGLCORE_1865_0_ADDR (SHGLCORE_ACC_ADDR+0x600) -#define SHGLCORE_1865_1_ADDR (SHGLCORE_ACC_ADDR+0x700) - -#define SHGLCORE_LATCH_BIT(x) BYTE_REF(SHGLCORE_LATCH_ADDR+x) - -#define SHGLCORE_LATCH_STATUS_LED 0 -#define SHGLCORE_LATCH_ERROR_LED 1 -#define SHGLCORE_LATCH_ALARM_LED 2 - -#define SHGLCORE_LATCH_1865 4 - -#define SHGLCORE_LATCH_RELAY_1 6 -#define SHGLCORE_LATCH_RELAY_2 7 - -#endif /* SHGLCORE */ - -#endif /* _M68K_SHGLCORE_H */ diff --git a/include/asm-m68knommu/shglports.h b/include/asm-m68knommu/shglports.h deleted file mode 100644 index 210d3defe54a..000000000000 --- a/include/asm-m68knommu/shglports.h +++ /dev/null @@ -1,76 +0,0 @@ - -/* Copyright (C) 1998 Kenneth Albanowski <kjahds@kjahds.com>, - * 1997, 1998 D. Jeff Dionne <jeff@lineo.ca>, - */ - -#ifndef _M68K_SHGLPORTS_H -#define _M68K_SHGLPORTS_H - -#include <linux/config.h> -#include <linux/sched.h> - -#ifdef CONFIG_SHGLCORE - -extern struct semaphore porte_interlock; - -struct SHGLCORE_PORT_QS { - unsigned char - nullqs:1, /* COM1TX */ - sbin:1, /* PQS6 (PCS3) */ - sbclk:1, /* PQS5 (PCS2) */ - sbout:1, /* PQS4 (PCS1) */ - null4:4; /* MISO, MOSI, SCLK, /SS=PCS0 */ -}; - -#define PORT_QS ((volatile struct SHGLCORE_PORT_QS*)PORTQS_ADDR) - -struct SHGLCORE_PORT_E { - unsigned char - dead:1, /* LED */ - sbirigb:1, /* PE6 */ - ds:1, /* /DS */ - nulle1:1, /* na */ - sbpll:1, /* PE3 */ - avec:1, /* /AVEC */ - sbsrom:1, /* PE1 */ - sbpanel:1; /* PE0 */ -}; - -#define PORT_E ((volatile struct SHGLCORE_PORT_E*)PORTE_ADDR) - -struct SHGLCORE_PORT_F { - unsigned char - nullf1:4, - nullf2:4; -}; - -#define PORT_F ((volatile struct SHGLCORE_PORT_F*)PORTF_ADDR) - -extern int comm_status_led, comm_error_led, alarm_led; - -static inline void SET_COMM_STATUS_LED(int value) { - BYTE_REF(SHGLCORE_ACC_ADDR+0x100+0) = comm_status_led = value; -} -static inline int GET_COMM_STATUS_LED(void) { - return comm_status_led; -} - - -static inline void SET_COMM_ERROR_LED(int value) { - BYTE_REF(SHGLCORE_ACC_ADDR+0x100+1) = comm_error_led = value; -} -static inline int GET_COMM_ERROR_LED(void) { - return comm_error_led; -} - - -static inline void SET_ALARM_LED(int value) { - BYTE_REF(SHGLCORE_ACC_ADDR+0x100+2) = alarm_led = value; -} -static inline int GET_ALARM_LED(void) { - return alarm_led; -} - -#endif - -#endif /* _M68K_SHGLPORTS_H */ diff --git a/include/asm-ppc/unistd.h b/include/asm-ppc/unistd.h index 57fb02c6c9d3..63a16a4a8cbc 100644 --- a/include/asm-ppc/unistd.h +++ b/include/asm-ppc/unistd.h @@ -273,8 +273,11 @@ #define __NR_mq_notify 266 #define __NR_mq_getsetattr 267 #define __NR_kexec_load 268 +#define __NR_add_key 269 +#define __NR_request_key 270 +#define __NR_keyctl 271 -#define __NR_syscalls 269 +#define __NR_syscalls 272 #define __NR(n) #n diff --git a/include/asm-ppc64/io.h b/include/asm-ppc64/io.h index 14ed5c0c19c4..23feb816967c 100644 --- a/include/asm-ppc64/io.h +++ b/include/asm-ppc64/io.h @@ -205,7 +205,7 @@ extern void __iomem *ioremap(unsigned long address, unsigned long size); #define ioremap_nocache(addr, size) ioremap((addr), (size)) extern int iounmap_explicit(volatile void __iomem *addr, unsigned long size); extern void iounmap(volatile void __iomem *addr); -extern void * reserve_phb_iospace(unsigned long size); +extern void __iomem * reserve_phb_iospace(unsigned long size); /** * virt_to_phys - map virtual addresses to physical diff --git a/include/asm-ppc64/iommu.h b/include/asm-ppc64/iommu.h index f1d179a40176..406f8ae8e0ad 100644 --- a/include/asm-ppc64/iommu.h +++ b/include/asm-ppc64/iommu.h @@ -111,9 +111,17 @@ extern void iommu_setup_pSeries(void); extern void iommu_setup_u3(void); /* Creates table for an individual device node */ +/* XXX: This isn't generic, please name it accordingly or add + * some ppc_md. hooks for iommu implementations to do what they + * need to do. --BenH. + */ extern void iommu_devnode_init(struct device_node *dn); /* Frees table for an individual device node */ +/* XXX: This isn't generic, please name it accordingly or add + * some ppc_md. hooks for iommu implementations to do what they + * need to do. --BenH. + */ extern void iommu_free_table(struct device_node *dn); #endif /* CONFIG_PPC_MULTIPLATFORM */ diff --git a/include/asm-ppc64/machdep.h b/include/asm-ppc64/machdep.h index 7a2ee4b44bd6..ca66a629911f 100644 --- a/include/asm-ppc64/machdep.h +++ b/include/asm-ppc64/machdep.h @@ -119,6 +119,9 @@ struct machdep_calls { /* Check availability of legacy devices like i8042 */ int (*check_legacy_ioport)(unsigned int baseport); + /* Get legacy PCI/IDE interrupt mapping */ + int (*pci_get_legacy_ide_irq)(struct pci_dev *dev, int channel); + }; extern struct machdep_calls ppc_md; diff --git a/include/asm-ppc64/pci.h b/include/asm-ppc64/pci.h index 99ec4453acbb..144878b404aa 100644 --- a/include/asm-ppc64/pci.h +++ b/include/asm-ppc64/pci.h @@ -13,6 +13,7 @@ #include <linux/slab.h> #include <linux/string.h> #include <linux/dma-mapping.h> +#include <asm/machdep.h> #include <asm/scatterlist.h> #include <asm/io.h> #include <asm/prom.h> @@ -20,6 +21,8 @@ #define PCIBIOS_MIN_IO 0x1000 #define PCIBIOS_MIN_MEM 0x10000000 +struct pci_dev; + #ifdef CONFIG_PPC_ISERIES #define pcibios_scan_all_fns(a, b) 0 #else @@ -36,7 +39,13 @@ static inline void pcibios_penalize_isa_irq(int irq) /* We don't do dynamic PCI IRQ allocation */ } -struct pci_dev; +#define HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ +static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) +{ + if (ppc_md.pci_get_legacy_ide_irq) + return ppc_md.pci_get_legacy_ide_irq(dev, channel); + return channel ? 15 : 14; +} #define HAVE_ARCH_PCI_MWI 1 static inline int pcibios_prep_mwi(struct pci_dev *dev) diff --git a/include/asm-ppc64/processor.h b/include/asm-ppc64/processor.h index 19ef02511691..518f551dba6a 100644 --- a/include/asm-ppc64/processor.h +++ b/include/asm-ppc64/processor.h @@ -389,6 +389,7 @@ #define PLATFORM_ISERIES_LPAR 0x0201 #define PLATFORM_LPAR 0x0001 #define PLATFORM_POWERMAC 0x0400 +#define PLATFORM_MAPLE 0x0500 /* Compatibility with drivers coming from PPC32 world */ #define _machine (systemcfg->platform) diff --git a/include/asm-ppc64/udbg.h b/include/asm-ppc64/udbg.h index c6db606e3ae0..a6e04d014b2b 100644 --- a/include/asm-ppc64/udbg.h +++ b/include/asm-ppc64/udbg.h @@ -1,6 +1,8 @@ #ifndef __UDBG_HDR #define __UDBG_HDR +#include <linux/compiler.h> + /* * c 2001 PPC 64 Team, IBM Corp * @@ -10,7 +12,7 @@ * 2 of the License, or (at your option) any later version. */ -void udbg_init_uart(void *comport, unsigned int speed); +void udbg_init_uart(void __iomem *comport, unsigned int speed); void udbg_putc(unsigned char c); unsigned char udbg_getc(void); int udbg_getc_poll(void); diff --git a/include/asm-ppc64/unistd.h b/include/asm-ppc64/unistd.h index b2ac359c7658..7851d0c5868c 100644 --- a/include/asm-ppc64/unistd.h +++ b/include/asm-ppc64/unistd.h @@ -279,8 +279,11 @@ #define __NR_mq_notify 266 #define __NR_mq_getsetattr 267 #define __NR_kexec_load 268 +#define __NR_add_key 269 +#define __NR_request_key 270 +#define __NR_keyctl 271 -#define __NR_syscalls 269 +#define __NR_syscalls 272 #ifdef __KERNEL__ #define NR_syscalls __NR_syscalls #endif diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h index 9c6b4f49a66c..ce6496c3f888 100644 --- a/include/asm-sparc64/unistd.h +++ b/include/asm-sparc64/unistd.h @@ -298,7 +298,7 @@ #define __NR_mq_notify 277 #define __NR_mq_getsetattr 278 #define __NR_waitid 279 -#define __NR_sys_setaltroot 280 +/*#define __NR_sys_setaltroot 280 available (was setaltroot) */ #define __NR_add_key 281 #define __NR_request_key 282 #define __NR_keyctl 283 diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h index fcfc3a75c642..0fc76da585f5 100644 --- a/include/asm-x86_64/processor.h +++ b/include/asm-x86_64/processor.h @@ -461,4 +461,6 @@ static inline void __mwait(unsigned long eax, unsigned long ecx) #define cache_line_size() (boot_cpu_data.x86_cache_alignment) +extern unsigned long boot_option_idle_override; + #endif /* __ASM_X86_64_PROCESSOR_H */ diff --git a/include/linux/acpi.h b/include/linux/acpi.h index cbda5151eda2..2616a092be69 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -445,6 +445,7 @@ extern struct acpi_prt_list acpi_prt; struct pci_dev; int acpi_pci_irq_enable (struct pci_dev *dev); +void acpi_penalize_isa_irq(int irq); struct acpi_pci_driver { struct acpi_pci_driver *next; diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index 268da2732958..87a901c75370 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h @@ -395,7 +395,6 @@ struct atm_dev *atm_dev_lookup(int number); void atm_dev_deregister(struct atm_dev *dev); void shutdown_atm_dev(struct atm_dev *dev); void vcc_insert_socket(struct sock *sk); -void vcc_remove_socket(struct sock *sk); /* diff --git a/include/linux/compat.h b/include/linux/compat.h index e1e78bb971aa..56d5582abfe2 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -119,6 +119,8 @@ long compat_sys_shmat(int first, int second, compat_uptr_t third, int version, long compat_sys_shmctl(int first, int second, void __user *uptr); long compat_sys_semtimedop(int semid, struct sembuf __user *tsems, unsigned nsems, const struct compat_timespec __user *timeout); +asmlinkage long compat_sys_keyctl(u32 option, + u32 arg2, u32 arg3, u32 arg4, u32 arg5); asmlinkage ssize_t compat_sys_readv(unsigned long fd, const struct compat_iovec __user *vec, unsigned long vlen); diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h index 0d59e6d76830..d0300dcff0af 100644 --- a/include/linux/dvb/frontend.h +++ b/include/linux/dvb/frontend.h @@ -258,6 +258,8 @@ struct dvb_frontend_event { #define FE_GET_FRONTEND _IOR('o', 77, struct dvb_frontend_parameters) #define FE_GET_EVENT _IOR('o', 78, struct dvb_frontend_event) +#define FE_DISHNETWORK_SEND_LEGACY_CMD _IO('o', 80) /* unsigned int */ + #endif /*_DVBFRONTEND_H_*/ diff --git a/include/linux/ide.h b/include/linux/ide.h index 284e9ab25aa1..f4aad8403cd7 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -1302,9 +1302,6 @@ extern void try_to_flush_leftover_data(ide_drive_t *); */ extern int ide_wait_cmd(ide_drive_t *, u8, u8, u8, u8, u8 *); -/* (ide_drive_t *drive, u8 *buf) */ -extern int ide_wait_cmd_task(ide_drive_t *, u8 *); - typedef struct ide_task_s { /* * struct hd_drive_task_hdr tf; @@ -1349,8 +1346,6 @@ extern void ata_input_data(ide_drive_t *, void *, u32); extern void ata_output_data(ide_drive_t *, void *, u32); extern void atapi_input_bytes(ide_drive_t *, void *, u32); extern void atapi_output_bytes(ide_drive_t *, void *, u32); -extern void taskfile_input_data(ide_drive_t *, void *, u32); -extern void taskfile_output_data(ide_drive_t *, void *, u32); extern int drive_is_ready(ide_drive_t *); extern int wait_for_ready(ide_drive_t *, int /* timeout */); @@ -1491,6 +1486,7 @@ void ide_init_sg_cmd(ide_drive_t *, struct request *); #ifdef CONFIG_BLK_DEV_IDEDMA int __ide_dma_bad_drive(ide_drive_t *); int __ide_dma_good_drive(ide_drive_t *); +int ide_use_dma(ide_drive_t *); int __ide_dma_off(ide_drive_t *); void ide_dma_verbose(ide_drive_t *); @@ -1516,6 +1512,7 @@ extern int __ide_dma_timeout(ide_drive_t *); #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ #else +static inline int ide_use_dma(ide_drive_t *drive) { return 0; } static inline int __ide_dma_off(ide_drive_t *drive) { return 0; } static inline void ide_dma_verbose(ide_drive_t *drive) { ; } #endif /* CONFIG_BLK_DEV_IDEDMA */ diff --git a/include/linux/ipv6_route.h b/include/linux/ipv6_route.h index 46d8b7e8b1aa..e2f935038013 100644 --- a/include/linux/ipv6_route.h +++ b/include/linux/ipv6_route.h @@ -14,7 +14,8 @@ #define _LINUX_IPV6_ROUTE_H #define RTF_DEFAULT 0x00010000 /* default - learned via ND */ -#define RTF_ALLONLINK 0x00020000 /* fallback, no routers on link */ +#define RTF_ALLONLINK 0x00020000 /* (deprecated and will be removed) + fallback, no routers on link */ #define RTF_ADDRCONF 0x00040000 /* addrconf route - RA */ #define RTF_PREFIX_RT 0x00080000 /* A prefix only route - RA */ diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index c288ae6a4f0c..1fa1cb32e30d 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h @@ -57,7 +57,7 @@ struct mmc_data { unsigned int timeout_clks; /* data timeout (in clocks) */ unsigned int blksz_bits; /* data block size */ unsigned int blocks; /* number of blocks */ - struct request *req; /* request structure */ + struct request *req __attribute__((deprecated));/* request structure (use the sg list instead) */ unsigned int error; /* data error */ unsigned int flags; @@ -69,6 +69,9 @@ struct mmc_data { struct mmc_command *stop; /* stop command */ struct mmc_request *mrq; /* assoicated request */ + + unsigned int sg_len; /* size of scatter list */ + struct scatterlist *sg; /* I/O scatter list */ }; struct mmc_request { diff --git a/include/linux/net.h b/include/linux/net.h index 2c4572f630a1..368b0f9d3006 100644 --- a/include/linux/net.h +++ b/include/linux/net.h @@ -176,7 +176,6 @@ struct kvec; extern int sock_wake_async(struct socket *sk, int how, int band); extern int sock_register(struct net_proto_family *fam); extern int sock_unregister(int family); -extern struct socket *sock_alloc(void); extern int sock_create(int family, int type, int proto, struct socket **res); extern int sock_create_kern(int family, int type, int proto, diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index c102cdce2ebe..d2b2c8025dcd 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -930,14 +930,12 @@ extern void netdev_state_change(struct net_device *dev); /* Load a device via the kmod */ extern void dev_load(const char *name); extern void dev_mcast_init(void); -extern int netdev_register_fc(struct net_device *dev, void (*stimul)(struct net_device *dev)); -extern void netdev_unregister_fc(int bit); extern int netdev_max_backlog; extern int weight_p; extern unsigned long netdev_fc_xoff; extern atomic_t netdev_dropping; extern int netdev_set_master(struct net_device *dev, struct net_device *master); -extern int skb_checksum_help(struct sk_buff **pskb, int inward); +extern int skb_checksum_help(struct sk_buff *skb, int inward); #ifdef CONFIG_SYSCTL extern char *net_sysctl_strdup(const char *s); diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index a9357be1ae41..ced66929126c 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h @@ -172,12 +172,6 @@ extern void nf_reinject(struct sk_buff *skb, struct nf_info *info, unsigned int verdict); -extern inline struct ipt_target * -ipt_find_target_lock(const char *name, int *error, struct semaphore *mutex); -extern inline struct ip6t_target * -ip6t_find_target_lock(const char *name, int *error, struct semaphore *mutex); -extern inline struct arpt_target * -arpt_find_target_lock(const char *name, int *error, struct semaphore *mutex); extern void (*ip_ct_attach)(struct sk_buff *, struct sk_buff *); #ifdef CONFIG_NETFILTER_DEBUG diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h index 02a006f17ac4..defc7bc472d9 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h @@ -407,11 +407,6 @@ struct ipt_target struct module *me; }; -extern struct ipt_target * -ipt_find_target_lock(const char *name, int *error, struct semaphore *mutex); -extern struct arpt_target * -arpt_find_target_lock(const char *name, int *error, struct semaphore *mutex); - extern int ipt_register_target(struct ipt_target *target); extern void ipt_unregister_target(struct ipt_target *target); diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index 6f70cf3df39a..d6ac08c14dc1 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h @@ -355,13 +355,15 @@ struct ip6t_match /* Return true or false: return FALSE and set *hotdrop = 1 to force immediate packet drop. */ + /* Arguments changed since 2.6.9, as this must now handle + non-linear skb, using skb_header_pointer and + skb_ip_make_writable. */ int (*match)(const struct sk_buff *skb, const struct net_device *in, const struct net_device *out, const void *matchinfo, int offset, - const void *hdr, - u_int16_t datalen, + unsigned int protoff, int *hotdrop); /* Called when user tries to insert an entry of this type. */ @@ -386,11 +388,13 @@ struct ip6t_target const char name[IP6T_FUNCTION_MAXNAMELEN]; - /* Returns verdict. */ + /* Returns verdict. Argument order changed since 2.6.9, as this + must now handle non-linear skbs, using skb_copy_bits and + skb_ip_make_writable. */ unsigned int (*target)(struct sk_buff **pskb, - unsigned int hooknum, const struct net_device *in, const struct net_device *out, + unsigned int hooknum, const void *targinfo, void *userdata); diff --git a/include/linux/pnp.h b/include/linux/pnp.h index d728e2f5cf71..49a52dcd541a 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h @@ -200,6 +200,7 @@ struct pnp_dev { unsigned short regs; /* ISAPnP: supported registers */ int flags; /* used by protocols */ struct proc_dir_entry *procent; /* device entry in /proc/bus/isapnp */ + void *data; }; #define global_to_pnp_dev(n) list_entry(n, struct pnp_dev, global_list) diff --git a/include/linux/sctp.h b/include/linux/sctp.h index cff28345eacf..1ed3da0cb9d0 100644 --- a/include/linux/sctp.h +++ b/include/linux/sctp.h @@ -281,7 +281,11 @@ typedef struct sctp_ecn_capable_param { sctp_paramhdr_t param_hdr; } __attribute__((packed)) sctp_ecn_capable_param_t; - +/* ADDIP Section 3.2.6 Adaption Layer Indication */ +typedef struct sctp_adaption_ind_param { + struct sctp_paramhdr param_hdr; + __u32 adaption_ind; +} __attribute__((packed)) sctp_adaption_ind_param_t; /* RFC 2960. Section 3.3.3 Initiation Acknowledgement (INIT ACK) (2): * The INIT ACK chunk is used to acknowledge the initiation of an SCTP diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index bc93606badbc..06a76c25f096 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -490,7 +490,6 @@ asmlinkage long sys_nfsservctl(int cmd, void __user *res); asmlinkage long sys_syslog(int type, char __user *buf, int len); asmlinkage long sys_uselib(const char __user *library); -asmlinkage long sys_setaltroot(const char __user *altroot); asmlinkage long sys_ni_syscall(void); asmlinkage long sys_add_key(const char __user *_type, diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 50f4c2c4df86..97c2a6121275 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h @@ -67,8 +67,7 @@ extern int ipv6_get_saddr(struct dst_entry *dst, struct in6_addr *saddr); extern int ipv6_dev_get_saddr(struct net_device *dev, struct in6_addr *daddr, - struct in6_addr *saddr, - int onlink); + struct in6_addr *saddr); extern int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *); extern int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2); diff --git a/include/net/dst.h b/include/net/dst.h index 16da04466554..7ffb470d0e9a 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -67,7 +67,7 @@ struct dst_entry struct xfrm_state *xfrm; int (*input)(struct sk_buff*); - int (*output)(struct sk_buff**); + int (*output)(struct sk_buff*); #ifdef CONFIG_NET_CLS_ROUTE __u32 tclassid; @@ -222,7 +222,7 @@ static inline int dst_output(struct sk_buff *skb) int err; for (;;) { - err = skb->dst->output(&skb); + err = skb->dst->output(skb); if (likely(err == 0)) return err; diff --git a/include/net/ip.h b/include/net/ip.h index 0f633ff0b9b4..15a1c6a2e534 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -89,8 +89,8 @@ extern int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt); extern int ip_local_deliver(struct sk_buff *skb); extern int ip_mr_input(struct sk_buff *skb); -extern int ip_output(struct sk_buff **pskb); -extern int ip_mc_output(struct sk_buff **pskb); +extern int ip_output(struct sk_buff *skb); +extern int ip_mc_output(struct sk_buff *skb); extern int ip_fragment(struct sk_buff *skb, int (*out)(struct sk_buff*)); extern int ip_do_nat(struct sk_buff *skb); extern void ip_send_check(struct iphdr *ip); diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index d859c4160eaa..d5d1dd10cdb8 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h @@ -70,7 +70,7 @@ extern struct rt6_info *rt6_lookup(struct in6_addr *daddr, extern struct dst_entry *ndisc_dst_alloc(struct net_device *dev, struct neighbour *neigh, struct in6_addr *addr, - int (*output)(struct sk_buff **)); + int (*output)(struct sk_buff *)); extern int ndisc_dst_gc(int *more); extern void fib6_force_start_gc(void); @@ -87,7 +87,7 @@ extern struct rt6_info * rt6_get_dflt_router(struct in6_addr *addr, extern struct rt6_info * rt6_add_dflt_router(struct in6_addr *gwaddr, struct net_device *dev); -extern void rt6_purge_dflt_routers(int lst_resort); +extern void rt6_purge_dflt_routers(void); extern void rt6_reset_dflt_pointer(struct rt6_info *rt); diff --git a/include/net/ipv6.h b/include/net/ipv6.h index a3f44754ac08..e0e3800a9560 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -355,7 +355,7 @@ extern int ip6_dst_lookup(struct sock *sk, * skb processing functions */ -extern int ip6_output(struct sk_buff **pskb); +extern int ip6_output(struct sk_buff *skb); extern int ip6_forward(struct sk_buff *skb); extern int ip6_input(struct sk_buff *skb); extern int ip6_mc_input(struct sk_buff *skb); diff --git a/include/net/ndisc.h b/include/net/ndisc.h index 61d7033bca7f..8f121905ea6d 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h @@ -45,6 +45,11 @@ struct nd_msg { __u8 opt[0]; }; +struct rs_msg { + struct icmp6hdr icmph; + __u8 opt[0]; +}; + struct ra_msg { struct icmp6hdr icmph; __u32 reachable_time; diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 357be232a46c..d0ab0a3d10c5 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h @@ -79,7 +79,7 @@ struct Qdisc unsigned flags; #define TCQ_F_BUILTIN 1 #define TCQ_F_THROTTLED 2 -#define TCQ_F_INGRES 4 +#define TCQ_F_INGRESS 4 int padded; struct Qdisc_ops *ops; u32 handle; diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 053a0ac270f9..ac856c13d354 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h @@ -335,7 +335,7 @@ static inline void sctp_v6_exit(void) { return; } /* Map an association to an assoc_id. */ static inline sctp_assoc_t sctp_assoc2id(const struct sctp_association *asoc) { - return (asoc?asoc->assoc_id:NULL); + return (asoc?asoc->assoc_id:0); } /* Look up the association by its id. */ diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 26c97aa3a3c7..3bd04bc5b002 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -266,6 +266,7 @@ struct sctp_opt { __u8 disable_fragments; __u8 pd_mode; __u8 v4mapped; + __u32 adaption_ind; /* Receive to here while partial delivery is in effect. */ struct sk_buff_head pd_lobby; @@ -323,6 +324,8 @@ struct sctp_cookie { __u8 prsctp_capable; + __u32 adaption_ind; + /* This is a shim for my peer's INIT packet, followed by * a copy of the raw address list of the association. * The length of the raw address list is saved in the @@ -362,6 +365,7 @@ union sctp_params { struct sctp_ipv4addr_param *v4; struct sctp_ipv6addr_param *v6; union sctp_addr_param *addr; + struct sctp_adaption_ind_param *aind; }; /* RFC 2960. Section 3.3.5 Heartbeat. @@ -1395,6 +1399,8 @@ struct sctp_association { __u8 asconf_capable; /* Does peer support ADDIP? */ __u8 prsctp_capable; /* Can peer do PR-SCTP? */ + __u32 adaption_ind; /* Adaption Code point. */ + /* This mask is used to disable sending the ASCONF chunk * with specified parameter to peer. */ diff --git a/include/net/sctp/ulpevent.h b/include/net/sctp/ulpevent.h index ff9c7573063c..46a974464a84 100644 --- a/include/net/sctp/ulpevent.h +++ b/include/net/sctp/ulpevent.h @@ -121,6 +121,9 @@ struct sctp_ulpevent *sctp_ulpevent_make_pdapi( const struct sctp_association *asoc, __u32 indication, int gfp); +struct sctp_ulpevent *sctp_ulpevent_make_adaption_indication( + const struct sctp_association *asoc, int gfp); + struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc, struct sctp_chunk *chunk, int gfp); diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h index 04e99178015f..aa95f0099e64 100644 --- a/include/net/sctp/user.h +++ b/include/net/sctp/user.h @@ -55,7 +55,7 @@ #include <linux/types.h> #include <linux/socket.h> -typedef void * sctp_assoc_t; +typedef __s32 sctp_assoc_t; /* The following symbols come from the Sockets API Extensions for * SCTP <draft-ietf-tsvwg-sctpsocket-07.txt>. diff --git a/include/net/sock.h b/include/net/sock.h index 563096ab673a..bfad716ce409 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -746,7 +746,6 @@ extern void sk_send_sigurg(struct sock *sk); * Functions to fill in entries in struct proto_ops when a protocol * does not implement a particular function. */ -extern int sock_no_release(struct socket *); extern int sock_no_bind(struct socket *, struct sockaddr *, int); extern int sock_no_connect(struct socket *, @@ -1275,7 +1274,6 @@ static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb) extern atomic_t netstamp_needed; extern void sock_enable_timestamp(struct sock *sk); -extern void sock_disable_timestamp(struct sock *sk); static inline void net_timestamp(struct timeval *stamp) { diff --git a/include/net/tcp.h b/include/net/tcp.h index 28dca9b66467..4a7dc4157df4 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -159,7 +159,6 @@ extern struct tcp_bind_bucket *tcp_bucket_create(struct tcp_bind_hashbucket *hea extern void tcp_bucket_destroy(struct tcp_bind_bucket *tb); extern void tcp_bucket_unlock(struct sock *sk); extern int tcp_port_rover; -extern struct sock *tcp_v4_lookup_listener(u32 addr, unsigned short hnum, int dif); /* These are AF independent. */ static __inline__ int tcp_bhashfn(__u16 lport) diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 2c89b019388a..7078e743b732 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -178,8 +178,6 @@ struct xfrm_policy_afinfo { extern int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo); extern int xfrm_policy_unregister_afinfo(struct xfrm_policy_afinfo *afinfo); -extern struct xfrm_policy_afinfo *xfrm_policy_get_afinfo(unsigned short family); -extern void xfrm_policy_put_afinfo(struct xfrm_policy_afinfo *afinfo); #define XFRM_ACQ_EXPIRES 30 @@ -200,8 +198,6 @@ struct xfrm_state_afinfo { extern int xfrm_state_register_afinfo(struct xfrm_state_afinfo *afinfo); extern int xfrm_state_unregister_afinfo(struct xfrm_state_afinfo *afinfo); -extern struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned short family); -extern void xfrm_state_put_afinfo(struct xfrm_state_afinfo *afinfo); extern void xfrm_state_delete_tunnel(struct xfrm_state *x); @@ -805,17 +801,15 @@ extern int xfrm_state_check_expire(struct xfrm_state *x); extern void xfrm_state_insert(struct xfrm_state *x); extern int xfrm_state_add(struct xfrm_state *x); extern int xfrm_state_update(struct xfrm_state *x); -extern int xfrm_state_check_space(struct xfrm_state *x, struct sk_buff *skb); extern struct xfrm_state *xfrm_state_lookup(xfrm_address_t *daddr, u32 spi, u8 proto, unsigned short family); extern struct xfrm_state *xfrm_find_acq_byseq(u32 seq); extern void xfrm_state_delete(struct xfrm_state *x); extern void xfrm_state_flush(u8 proto); extern int xfrm_replay_check(struct xfrm_state *x, u32 seq); extern void xfrm_replay_advance(struct xfrm_state *x, u32 seq); -extern int xfrm_check_selectors(struct xfrm_state **x, int n, struct flowi *fl); extern int xfrm_state_check(struct xfrm_state *x, struct sk_buff *skb); extern int xfrm4_rcv(struct sk_buff *skb); -extern int xfrm4_output(struct sk_buff **pskb); +extern int xfrm4_output(struct sk_buff *skb); extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler); extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler); extern int xfrm6_rcv_spi(struct sk_buff **pskb, unsigned int *nhoffp, u32 spi); @@ -825,7 +819,7 @@ extern int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler); extern u32 xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr); extern void xfrm6_tunnel_free_spi(xfrm_address_t *saddr); extern u32 xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr); -extern int xfrm6_output(struct sk_buff **pskb); +extern int xfrm6_output(struct sk_buff *skb); #ifdef CONFIG_XFRM extern int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type); @@ -863,7 +857,6 @@ struct xfrm_state * xfrm_find_acq(u8 mode, u32 reqid, u8 proto, xfrm_address_t *daddr, xfrm_address_t *saddr, int create, unsigned short family); extern void xfrm_policy_flush(void); -extern void xfrm_policy_kill(struct xfrm_policy *); extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol); extern struct xfrm_policy *xfrm_sk_policy_lookup(struct sock *sk, int dir, struct flowi *fl); extern int xfrm_flush_bundles(void); |
