Commit 8846ce52 authored by Richard Russon's avatar Richard Russon

Merge flatcap.org:/home/flatcap/backup/bk/ntfs-2.6

into flatcap.org:/home/flatcap/backup/bk/ntfs-2.6-devel
parents c2778660 33b01313
......@@ -71,10 +71,10 @@ tsunami_update_irq_hw(unsigned long mask)
dim1 = &cchip->dim1.csr;
dim2 = &cchip->dim2.csr;
dim3 = &cchip->dim3.csr;
if (cpu_possible(0)) dim0 = &dummy;
if (cpu_possible(1)) dim1 = &dummy;
if (cpu_possible(2)) dim2 = &dummy;
if (cpu_possible(3)) dim3 = &dummy;
if (!cpu_possible(0)) dim0 = &dummy;
if (!cpu_possible(1)) dim1 = &dummy;
if (!cpu_possible(2)) dim2 = &dummy;
if (!cpu_possible(3)) dim3 = &dummy;
*dim0 = mask0;
*dim1 = mask1;
......
......@@ -167,6 +167,11 @@ config ARCH_VERSATILE_PB
config ARCH_IMX
bool "IMX"
config ARCH_H720X
bool "Hynix-HMS720x-based"
help
This enables support for systems based on the Hynix HMS720x
endchoice
source "arch/arm/mach-clps711x/Kconfig"
......@@ -195,6 +200,8 @@ source "arch/arm/mach-lh7a40x/Kconfig"
source "arch/arm/mach-imx/Kconfig"
source "arch/arm/mach-h720x/Kconfig"
# Definitions to make life easier
config ARCH_ACORN
bool
......
......@@ -95,6 +95,7 @@ textaddr-$(CONFIG_ARCH_FORTUNET) := 0xc0008000
machine-$(CONFIG_ARCH_LH7A40X) := lh7a40x
machine-$(CONFIG_ARCH_VERSATILE_PB) := versatile
machine-$(CONFIG_ARCH_IMX) := imx
machine-$(CONFIG_ARCH_H720X) := h720x
ifeq ($(CONFIG_ARCH_EBSA110),y)
# This is what happens if you forget the IOCS16 line.
......
......@@ -71,6 +71,7 @@ params_phys-$(CONFIG_ARCH_S3C2410) := 0x30000100
zreladdr-$(CONFIG_ARCH_VERSATILE_PB) := 0x00008000
params_phys-$(CONFIG_ARCH_VERSATILE_PB) := 0x00000100
initrd_phys-$(CONFIG_ARCH_VERSATILE_PB) := 0x00800000
zreladdr-$(CONFIG_ARCH_H720X) := 0x40008000
ZRELADDR := $(zreladdr-y)
PARAMS_PHYS := $(params_phys-y)
......
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.9-rc1
# Thu Sep 2 11:04:11 2004
#
CONFIG_ARM=y
CONFIG_MMU=y
CONFIG_UID16=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
CONFIG_CLEAN_COMPILE=y
CONFIG_BROKEN_ON_SMP=y
#
# General setup
#
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
# CONFIG_AUDIT is not set
CONFIG_LOG_BUF_SHIFT=14
CONFIG_HOTPLUG=y
# CONFIG_IKCONFIG is not set
# CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
#
# Loadable module support
#
CONFIG_MODULES=y
# CONFIG_MODULE_UNLOAD is not set
CONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODVERSIONS is not set
CONFIG_KMOD=y
#
# System Type
#
# CONFIG_ARCH_CLPS7500 is not set
# CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_CO285 is not set
# CONFIG_ARCH_EBSA110 is not set
# CONFIG_ARCH_CAMELOT is not set
# CONFIG_ARCH_FOOTBRIDGE is not set
# CONFIG_ARCH_INTEGRATOR is not set
# CONFIG_ARCH_IOP3XX is not set
# CONFIG_ARCH_IXP4XX is not set
# CONFIG_ARCH_L7200 is not set
# CONFIG_ARCH_PXA is not set
# CONFIG_ARCH_RPC is not set
# CONFIG_ARCH_SA1100 is not set
# CONFIG_ARCH_S3C2410 is not set
# CONFIG_ARCH_SHARK is not set
# CONFIG_ARCH_LH7A40X is not set
# CONFIG_ARCH_OMAP is not set
# CONFIG_ARCH_VERSATILE_PB is not set
# CONFIG_ARCH_IMX is not set
CONFIG_ARCH_H720X=y
#
# h720x Implementations
#
CONFIG_ARCH_H7201=y
# CONFIG_ARCH_H7202 is not set
CONFIG_CPU_H7201=y
#
# Processor Type
#
CONFIG_CPU_32=y
CONFIG_CPU_ARM720T=y
CONFIG_CPU_32v4=y
CONFIG_CPU_ABRT_LV4T=y
CONFIG_CPU_CACHE_V4=y
CONFIG_CPU_COPY_V4WT=y
CONFIG_CPU_TLB_V4WT=y
#
# Processor Features
#
CONFIG_ARM_THUMB=y
#
# General setup
#
# CONFIG_ZBOOT_ROM is not set
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
#
# PCMCIA/CardBus support
#
CONFIG_PCMCIA=y
# CONFIG_PCMCIA_DEBUG is not set
# CONFIG_TCIC is not set
#
# At least one math emulation must be selected
#
CONFIG_FPE_NWFPE=y
# CONFIG_FPE_NWFPE_XP is not set
# CONFIG_FPE_FASTFPE is not set
# CONFIG_VFP is not set
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_AOUT is not set
# CONFIG_BINFMT_MISC is not set
#
# Generic Driver Options
#
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_FW_LOADER is not set
# CONFIG_PM is not set
# CONFIG_PREEMPT is not set
# CONFIG_ARTHUR is not set
CONFIG_CMDLINE=""
CONFIG_ALIGNMENT_TRAP=y
#
# Parallel port support
#
# CONFIG_PARPORT is not set
#
# Memory Technology Devices (MTD)
#
CONFIG_MTD=y
CONFIG_MTD_DEBUG=y
CONFIG_MTD_DEBUG_VERBOSE=0
CONFIG_MTD_PARTITIONS=y
# CONFIG_MTD_CONCAT is not set
# CONFIG_MTD_REDBOOT_PARTS is not set
# CONFIG_MTD_CMDLINE_PARTS is not set
# CONFIG_MTD_AFS_PARTS is not set
#
# User Modules And Translation Layers
#
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y
# CONFIG_FTL is not set
# CONFIG_NFTL is not set
# CONFIG_INFTL is not set
#
# RAM/ROM/Flash chip drivers
#
CONFIG_MTD_CFI=y
# CONFIG_MTD_JEDECPROBE is not set
CONFIG_MTD_GEN_PROBE=y
CONFIG_MTD_CFI_ADV_OPTIONS=y
CONFIG_MTD_CFI_NOSWAP=y
# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
# CONFIG_MTD_CFI_GEOMETRY is not set
CONFIG_MTD_MAP_BANK_WIDTH_1=y
CONFIG_MTD_MAP_BANK_WIDTH_2=y
CONFIG_MTD_MAP_BANK_WIDTH_4=y
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
CONFIG_MTD_CFI_I1=y
CONFIG_MTD_CFI_I2=y
# CONFIG_MTD_CFI_I4 is not set
# CONFIG_MTD_CFI_I8 is not set
CONFIG_MTD_CFI_INTELEXT=y
# CONFIG_MTD_CFI_AMDSTD is not set
# CONFIG_MTD_CFI_STAA is not set
CONFIG_MTD_CFI_UTIL=y
# CONFIG_MTD_RAM is not set
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_ABSENT is not set
#
# Mapping drivers for chip access
#
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
# CONFIG_MTD_PHYSMAP is not set
# CONFIG_MTD_ARM_INTEGRATOR is not set
# CONFIG_MTD_EDB7312 is not set
# CONFIG_MTD_H720X is not set
#
# Self-contained MTD device drivers
#
# CONFIG_MTD_SLRAM is not set
# CONFIG_MTD_PHRAM is not set
# CONFIG_MTD_MTDRAM is not set
# CONFIG_MTD_BLKMTD is not set
#
# Disk-On-Chip Device Drivers
#
# CONFIG_MTD_DOC2000 is not set
# CONFIG_MTD_DOC2001 is not set
# CONFIG_MTD_DOC2001PLUS is not set
#
# NAND Flash Device Drivers
#
# CONFIG_MTD_NAND is not set
#
# Plug and Play support
#
#
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_DEV_LOOP is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=8192
CONFIG_BLK_DEV_INITRD=y
#
# Multi-device support (RAID and LVM)
#
# CONFIG_MD is not set
#
# Networking support
#
# CONFIG_NET is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
#
# SCSI device support
#
# CONFIG_SCSI is not set
#
# Fusion MPT device support
#
#
# IEEE 1394 (FireWire) support
#
#
# I2O device support
#
#
# ISDN subsystem
#
#
# Input device support
#
CONFIG_INPUT=y
#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_TSDEV is not set
# CONFIG_INPUT_EVDEV is not set
# CONFIG_INPUT_EVBUG is not set
#
# Input I/O drivers
#
# CONFIG_GAMEPORT is not set
CONFIG_SOUND_GAMEPORT=y
CONFIG_SERIO=y
# CONFIG_SERIO_I8042 is not set
CONFIG_SERIO_SERPORT=y
# CONFIG_SERIO_CT82C710 is not set
#
# Input Device Drivers
#
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
# CONFIG_INPUT_MISC is not set
#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_SERIAL_NONSTANDARD is not set
#
# Serial drivers
#
# CONFIG_SERIAL_8250 is not set
#
# Non-8250 serial port support
#
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
# CONFIG_QIC02_TAPE is not set
#
# IPMI
#
# CONFIG_IPMI_HANDLER is not set
#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_NVRAM is not set
# CONFIG_RTC is not set
# CONFIG_GEN_RTC is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_AGP is not set
# CONFIG_DRM is not set
#
# PCMCIA character devices
#
# CONFIG_SYNCLINK_CS is not set
# CONFIG_RAW_DRIVER is not set
#
# I2C support
#
# CONFIG_I2C is not set
#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set
#
# Digital Video Broadcasting Devices
#
#
# File systems
#
CONFIG_EXT2_FS=y
# CONFIG_EXT2_FS_XATTR is not set
# CONFIG_EXT3_FS is not set
# CONFIG_JBD is not set
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
# CONFIG_XFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_AUTOFS4_FS is not set
#
# CD-ROM/DVD Filesystems
#
# CONFIG_ISO9660_FS is not set
# CONFIG_UDF_FS is not set
#
# DOS/FAT/NT Filesystems
#
# CONFIG_MSDOS_FS is not set
# CONFIG_VFAT_FS is not set
# CONFIG_NTFS_FS is not set
#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_SYSFS=y
# CONFIG_DEVFS_FS is not set
# CONFIG_DEVPTS_FS_XATTR is not set
# CONFIG_TMPFS is not set
# CONFIG_HUGETLB_PAGE is not set
CONFIG_RAMFS=y
#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_JFFS_FS is not set
CONFIG_JFFS2_FS=y
CONFIG_JFFS2_FS_DEBUG=0
# CONFIG_JFFS2_FS_NAND is not set
# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
CONFIG_JFFS2_ZLIB=y
CONFIG_JFFS2_RTIME=y
# CONFIG_JFFS2_RUBIN is not set
# CONFIG_CRAMFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
#
# Native Language Support
#
# CONFIG_NLS is not set
#
# Profiling support
#
# CONFIG_PROFILING is not set
#
# Graphics support
#
# CONFIG_FB is not set
#
# Console display driver support
#
# CONFIG_VGA_CONSOLE is not set
# CONFIG_MDA_CONSOLE is not set
CONFIG_DUMMY_CONSOLE=y
#
# Sound
#
CONFIG_SOUND=m
#
# Advanced Linux Sound Architecture
#
# CONFIG_SND is not set
#
# Open Sound System
#
# CONFIG_SOUND_PRIME is not set
#
# Misc devices
#
#
# USB support
#
#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set
#
# MMC/SD Card support
#
# CONFIG_MMC is not set
#
# Kernel hacking
#
# CONFIG_DEBUG_KERNEL is not set
# CONFIG_DEBUG_INFO is not set
CONFIG_FRAME_POINTER=y
CONFIG_DEBUG_USER=y
#
# Security options
#
# CONFIG_SECURITY is not set
#
# Cryptographic options
#
# CONFIG_CRYPTO is not set
#
# Library routines
#
# CONFIG_CRC_CCITT is not set
CONFIG_CRC32=y
# CONFIG_LIBCRC32C is not set
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
This diff is collapsed.
......@@ -675,6 +675,36 @@
tst \rd, #1 << 3 @ TXDC
beq 1002b @ wait until transmit done
.endm
#elif defined(CONFIG_ARCH_H720X)
.equ io_virt, IO_BASE
.equ io_phys, IO_START
.macro addruart,rx
mrc p15, 0, \rx, c1, c0
tst \rx, #1 @ MMU enabled?
moveq \rx, #io_phys @ physical base address
movne \rx, #io_virt @ virtual address
add \rx, \rx, #0x00020000 @ UART1
.endm
.macro senduart,rd,rx
str \rd, [\rx, #0x0] @ UARTDR
.endm
.macro waituart,rd,rx
1001: ldr \rd, [\rx, #0x18] @ UARTFLG
tst \rd, #1 << 5 @ UARTFLGUTXFF - 1 when full
bne 1001b
.endm
.macro busyuart,rd,rx
1001: ldr \rd, [\rx, #0x18] @ UARTFLG
tst \rd, #1 << 3 @ UARTFLGUBUSY - 1 when busy
bne 1001b
.endm
#else
#error Unknown architecture
#endif
......
......@@ -962,6 +962,57 @@ ENTRY(soft_irq_mask)
.macro irq_prio_table
.endm
#elif defined(CONFIG_ARCH_H720X)
.macro disable_fiq
.endm
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp
#if defined (CONFIG_CPU_H7201) || defined (CONFIG_CPU_H7202)
@ we could use the id register on H7202, but this is not
@ properly updated when we come back from asm_do_irq
@ without a previous return from interrupt
@ (see loops below in irq_svc, irq_usr)
@ We see unmasked pending ints only, as the masked pending ints
@ are not visible here
mov \base, #0xf0000000 @ base register
orr \base, \base, #0x24000 @ irqbase
ldr \irqstat, [\base, #0x04] @ get interrupt status
#if defined (CONFIG_CPU_H7201)
ldr \tmp, =0x001fffff
#else
mvn \tmp, #0xc0000000
#endif
and \irqstat, \irqstat, \tmp @ mask out unused ints
mov \irqnr, #0
mov \tmp, #0xff00
orr \tmp, \tmp, #0xff
tst \irqstat, \tmp
addeq \irqnr, \irqnr, #16
moveq \irqstat, \irqstat, lsr #16
tst \irqstat, #255
addeq \irqnr, \irqnr, #8
moveq \irqstat, \irqstat, lsr #8
tst \irqstat, #15
addeq \irqnr, \irqnr, #4
moveq \irqstat, \irqstat, lsr #4
tst \irqstat, #3
addeq \irqnr, \irqnr, #2
moveq \irqstat, \irqstat, lsr #2
tst \irqstat, #1
addeq \irqnr, \irqnr, #1
moveq \irqstat, \irqstat, lsr #1
tst \irqstat, #1 @ bit 0 should be set
.endm
.macro irq_prio_table
.endm
#else
#error hynix processor selection missmatch
#endif
#else
#error Unknown architecture
#endif
......
menu "h720x Implementations"
config ARCH_H7201
bool "gms30c7201"
depends on ARCH_H720X
select CPU_H7201
help
Say Y here if you are using the Hynix GMS30C7201 Reference Board
config ARCH_H7202
bool "hms30c7202"
select CPU_H7202
depends on ARCH_H720X
help
Say Y here if you are using the Hynix HMS30C7202 Reference Board
endmenu
config CPU_H7201
bool
help
Select code specific to h7201 variants
config CPU_H7202
bool
help
Select code specific to h7202 variants
#
# Makefile for the linux kernel.
#
# Common support
obj-y := common.o
obj-m :=
obj-n :=
obj- :=
# Specific board support
obj-$(CONFIG_ARCH_H7201) += h7201-eval.o
obj-$(CONFIG_ARCH_H7202) += h7202-eval.o
obj-$(CONFIG_CPU_H7201) += cpu-h7201.o
obj-$(CONFIG_CPU_H7202) += cpu-h7202.o
/*
* linux/arch/arm/mach-h720x/common.c
*
* Copyright (C) 2003 Thomas Gleixner <tglx@linutronix.de>
* 2003 Robert Schwebel <r.schwebel@pengutronix.de>
* 2004 Sascha Hauer <s.hauer@pengutronix.de>
*
* common stuff for Hynix h720x processors
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/mman.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/dma.h>
#include <asm/io.h>
#include <asm/hardware.h>
#include <asm/irq.h>
#include <asm/mach/irq.h>
#include <asm/mach/map.h>
#include <asm/arch/irqs.h>
#include <asm/mach/dma.h>
#if 0
#define IRQDBG(args...) printk(args)
#else
#define IRQDBG(args...) do {} while(0)
#endif
void __init arch_dma_init(dma_t *dma)
{
}
/*
* Return usecs since last timer reload
* (timercount * (usecs perjiffie)) / (ticks per jiffie)
*/
unsigned long h720x_gettimeoffset(void)
{
return (CPU_REG (TIMER_VIRT, TM0_COUNT) * tick_usec) / LATCH;
}
/*
* mask Global irq's
*/
static void mask_global_irq (unsigned int irq )
{
CPU_REG (IRQC_VIRT, IRQC_IER) &= ~(1 << irq);
}
/*
* unmask Global irq's
*/
static void unmask_global_irq (unsigned int irq )
{
CPU_REG (IRQC_VIRT, IRQC_IER) |= (1 << irq);
}
/*
* ack GPIO irq's
* Ack only for edge triggered int's valid
*/
static void inline ack_gpio_irq(u32 irq)
{
u32 reg_base = GPIO_VIRT(IRQ_TO_REGNO(irq));
u32 bit = IRQ_TO_BIT(irq);
if ( (CPU_REG (reg_base, GPIO_EDGE) & bit))
CPU_REG (reg_base, GPIO_CLR) = bit;
}
/*
* mask GPIO irq's
*/
static void inline mask_gpio_irq(u32 irq)
{
u32 reg_base = GPIO_VIRT(IRQ_TO_REGNO(irq));
u32 bit = IRQ_TO_BIT(irq);
CPU_REG (reg_base, GPIO_MASK) &= ~bit;
}
/*
* unmask GPIO irq's
*/
static void inline unmask_gpio_irq(u32 irq)
{
u32 reg_base = GPIO_VIRT(IRQ_TO_REGNO(irq));
u32 bit = IRQ_TO_BIT(irq);
CPU_REG (reg_base, GPIO_MASK) |= bit;
}
static void
h720x_gpio_handler(unsigned int mask, unsigned int irq,
struct irqdesc *desc, struct pt_regs *regs)
{
IRQDBG("%s irq: %d\n",__FUNCTION__,irq);
desc = irq_desc + irq;
while (mask) {
if (mask & 1) {
IRQDBG("handling irq %d\n", irq);
desc->handle(irq, desc, regs);
}
irq++;
desc++;
mask >>= 1;
}
}
static void
h720x_gpioa_demux_handler(unsigned int irq_unused, struct irqdesc *desc,
struct pt_regs *regs)
{
unsigned int mask, irq;
mask = CPU_REG(GPIO_A_VIRT,GPIO_STAT);
irq = IRQ_CHAINED_GPIOA(0);
IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq);
h720x_gpio_handler(mask, irq, desc, regs);
}
static void
h720x_gpiob_demux_handler(unsigned int irq_unused, struct irqdesc *desc,
struct pt_regs *regs)
{
unsigned int mask, irq;
mask = CPU_REG(GPIO_B_VIRT,GPIO_STAT);
irq = IRQ_CHAINED_GPIOB(0);
IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq);
h720x_gpio_handler(mask, irq, desc, regs);
}
static void
h720x_gpioc_demux_handler(unsigned int irq_unused, struct irqdesc *desc,
struct pt_regs *regs)
{
unsigned int mask, irq;
mask = CPU_REG(GPIO_C_VIRT,GPIO_STAT);
irq = IRQ_CHAINED_GPIOC(0);
IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq);
h720x_gpio_handler(mask, irq, desc, regs);
}
static void
h720x_gpiod_demux_handler(unsigned int irq_unused, struct irqdesc *desc,
struct pt_regs *regs)
{
unsigned int mask, irq;
mask = CPU_REG(GPIO_D_VIRT,GPIO_STAT);
irq = IRQ_CHAINED_GPIOD(0);
IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq);
h720x_gpio_handler(mask, irq, desc, regs);
}
#ifdef CONFIG_CPU_H7202
static void
h720x_gpioe_demux_handler(unsigned int irq_unused, struct irqdesc *desc,
struct pt_regs *regs)
{
unsigned int mask, irq;
mask = CPU_REG(GPIO_E_VIRT,GPIO_STAT);
irq = IRQ_CHAINED_GPIOE(0);
IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq);
h720x_gpio_handler(mask, irq, desc, regs);
}
#endif
static struct irqchip h720x_global_chip = {
.ack = mask_global_irq,
.mask = mask_global_irq,
.unmask = unmask_global_irq,
};
static struct irqchip h720x_gpio_chip = {
.ack = ack_gpio_irq,
.mask = mask_gpio_irq,
.unmask = unmask_gpio_irq,
};
/*
* Initialize IRQ's, mask all, enable multiplexed irq's
*/
void __init h720x_init_irq (void)
{
int irq;
/* Mask global irq's */
CPU_REG (IRQC_VIRT, IRQC_IER) = 0x0;
/* Mask all multiplexed irq's */
CPU_REG (GPIO_A_VIRT, GPIO_MASK) = 0x0;
CPU_REG (GPIO_B_VIRT, GPIO_MASK) = 0x0;
CPU_REG (GPIO_C_VIRT, GPIO_MASK) = 0x0;
CPU_REG (GPIO_D_VIRT, GPIO_MASK) = 0x0;
/* Initialize global IRQ's, fast path */
for (irq = 0; irq < NR_GLBL_IRQS; irq++) {
set_irq_chip(irq, &h720x_global_chip);
set_irq_handler(irq, do_level_IRQ);
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
}
/* Initialize multiplexed IRQ's, slow path */
for (irq = IRQ_CHAINED_GPIOA(0) ; irq <= IRQ_CHAINED_GPIOD(31); irq++) {
set_irq_chip(irq, &h720x_gpio_chip);
set_irq_handler(irq, do_edge_IRQ);
set_irq_flags(irq, IRQF_VALID );
}
set_irq_chained_handler(IRQ_GPIOA, h720x_gpioa_demux_handler);
set_irq_chained_handler(IRQ_GPIOB, h720x_gpiob_demux_handler);
set_irq_chained_handler(IRQ_GPIOC, h720x_gpioc_demux_handler);
set_irq_chained_handler(IRQ_GPIOD, h720x_gpiod_demux_handler);
#ifdef CONFIG_CPU_H7202
for (irq = IRQ_CHAINED_GPIOE(0) ; irq <= IRQ_CHAINED_GPIOE(31); irq++) {
set_irq_chip(irq, &h720x_gpio_chip);
set_irq_handler(irq, do_edge_IRQ);
set_irq_flags(irq, IRQF_VALID );
}
set_irq_chained_handler(IRQ_GPIOE, h720x_gpioe_demux_handler);
#endif
/* Enable multiplexed irq's */
CPU_REG (IRQC_VIRT, IRQC_IER) = IRQ_ENA_MUX;
}
static struct map_desc h720x_io_desc[] __initdata = {
{ IO_VIRT, IO_PHYS, IO_SIZE, MT_DEVICE },
};
/* Initialize io tables */
void __init h720x_map_io(void)
{
iotable_init(h720x_io_desc,ARRAY_SIZE(h720x_io_desc));
}
/*
* linux/arch/arm/mach-h720x/cpu-h7201.c
*
* Copyright (C) 2003 Thomas Gleixner <tglx@linutronix.de>
* 2003 Robert Schwebel <r.schwebel@pengutronix.de>
* 2004 Sascha Hauer <s.hauer@pengutronix.de>
*
* processor specific stuff for the Hynix h7201
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <asm/types.h>
#include <asm/hardware.h>
#include <asm/irq.h>
#include <asm/arch/irqs.h>
#include <asm/mach/irq.h>
#include <asm/mach/time.h>
extern unsigned long h720x_gettimeoffset(void);
extern void __init h720x_init_irq (void);
/*
* Timer interrupt handler
*/
static irqreturn_t
h7201_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
CPU_REG (TIMER_VIRT, TIMER_TOPSTAT);
timer_tick(regs);
return IRQ_HANDLED;
}
static struct irqaction h7201_timer_irq = {
.name = "h7201 Timer Tick",
.flags = SA_INTERRUPT,
.handler = h7201_timer_interrupt
};
/*
* Setup TIMER0 as system timer
*/
void __init h7201_init_time(void)
{
gettimeoffset = h720x_gettimeoffset;
CPU_REG (TIMER_VIRT, TM0_PERIOD) = LATCH;
CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_RESET;
CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_REPEAT | TM_START;
CPU_REG (TIMER_VIRT, TIMER_TOPCTRL) = ENABLE_TM0_INTR | TIMER_ENABLE_BIT;
setup_irq(IRQ_TIMER0, &h7201_timer_irq);
}
/*
* linux/arch/arm/mach-h720x/cpu-h7202.c
*
* Copyright (C) 2003 Thomas Gleixner <tglx@linutronix.de>
* 2003 Robert Schwebel <r.schwebel@pengutronix.de>
* 2004 Sascha Hauer <s.hauer@pengutronix.de>
*
* processor specific stuff for the Hynix h7201
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <asm/types.h>
#include <asm/hardware.h>
#include <asm/irq.h>
#include <asm/arch/irqs.h>
#include <asm/mach/irq.h>
#include <asm/mach/time.h>
#include <linux/device.h>
static struct resource h7202ps2_resources[] = {
[0] = {
.start = 0x8002c000,
.end = 0x8002c040,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_PS2,
.end = IRQ_PS2,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device h7202ps2_device = {
.name = "h7202ps2",
.id = -1,
.num_resources = ARRAY_SIZE(h7202ps2_resources),
.resource = h7202ps2_resources,
};
static struct platform_device *devices[] __initdata = {
&h7202ps2_device,
};
extern unsigned long h720x_gettimeoffset(void);
extern void __init h720x_init_irq (void);
/* Although we have two interrupt lines for the timers, we only have one
* status register which clears all pending timer interrupts on reading. So
* we have to handle all timer interrupts in one place.
*/
static void
h7202_timerx_demux_handler(unsigned int irq_unused, struct irqdesc *desc,
struct pt_regs *regs)
{
unsigned int mask, irq;
mask = CPU_REG (TIMER_VIRT, TIMER_TOPSTAT);
if ( mask & TSTAT_T0INT ) {
timer_tick(regs);
if( mask == TSTAT_T0INT )
return;
}
mask >>= 1;
irq = IRQ_TIMER1;
desc = irq_desc + irq;
while (mask) {
if (mask & 1)
desc->handle(irq, desc, regs);
irq++;
desc++;
mask >>= 1;
}
}
/*
* Timer interrupt handler
*/
static irqreturn_t
h7202_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
h7202_timerx_demux_handler(0, NULL, regs);
return IRQ_HANDLED;
}
/*
* mask multiplexed timer irq's
*/
static void inline mask_timerx_irq (u32 irq)
{
unsigned int bit;
bit = 2 << ((irq == IRQ_TIMER64B) ? 4 : (irq - IRQ_TIMER1));
CPU_REG (TIMER_VIRT, TIMER_TOPCTRL) &= ~bit;
}
/*
* unmask multiplexed timer irq's
*/
static void inline unmask_timerx_irq (u32 irq)
{
unsigned int bit;
bit = 2 << ((irq == IRQ_TIMER64B) ? 4 : (irq - IRQ_TIMER1));
CPU_REG (TIMER_VIRT, TIMER_TOPCTRL) |= bit;
}
static struct irqchip h7202_timerx_chip = {
.ack = mask_timerx_irq,
.mask = mask_timerx_irq,
.unmask = unmask_timerx_irq,
};
static struct irqaction h7202_timer_irq = {
.name = "h7202 Timer Tick",
.flags = SA_INTERRUPT,
.handler = h7202_timer_interrupt
};
/*
* Setup TIMER0 as system timer
*/
void __init h7202_init_time(void)
{
gettimeoffset = h720x_gettimeoffset;
CPU_REG (TIMER_VIRT, TM0_PERIOD) = LATCH;
CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_RESET;
CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_REPEAT | TM_START;
CPU_REG (TIMER_VIRT, TIMER_TOPCTRL) = ENABLE_TM0_INTR | TIMER_ENABLE_BIT;
setup_irq(IRQ_TIMER0, &h7202_timer_irq);
}
void __init h7202_init_irq (void)
{
int irq;
CPU_REG (GPIO_E_VIRT, GPIO_MASK) = 0x0;
for (irq = IRQ_TIMER1;
irq < IRQ_CHAINED_TIMERX(NR_TIMERX_IRQS); irq++) {
mask_timerx_irq(irq);
set_irq_chip(irq, &h7202_timerx_chip);
set_irq_handler(irq, do_edge_IRQ);
set_irq_flags(irq, IRQF_VALID );
}
set_irq_chained_handler(IRQ_TIMERX, h7202_timerx_demux_handler);
h720x_init_irq();
}
void __init init_hw_h7202(void)
{
/* Enable clocks */
CPU_REG (PMU_BASE, PMU_PLL_CTRL) |= PLL_2_EN | PLL_1_EN | PLL_3_MUTE;
(void) platform_add_devices(devices, ARRAY_SIZE(devices));
}
/*
* linux/arch/arm/mach-h720x/h7201-eval.c
*
* Copyright (C) 2003 Thomas Gleixner <tglx@linutronix.de>
* 2003 Robert Schwebel <r.schwebel@pengutronix.de>
* 2004 Sascha Hauer <s.hauer@pengutronix.de>
*
* Architecture specific stuff for Hynix GMS30C7201 development board
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#include <linux/config.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/device.h>
#include <asm/setup.h>
#include <asm/types.h>
#include <asm/mach-types.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/mach/arch.h>
#include <asm/hardware.h>
extern void h720x_init_irq (void);
extern void h7201_init_time(void);
extern void __init h720x_map_io(void);
MACHINE_START(H7201, "Hynix GMS30C7201")
MAINTAINER("Robert Schwebel, Pengutronix")
BOOT_MEM(0x40000000, 0x80000000, 0xf0000000)
BOOT_PARAMS(0xc0001000)
MAPIO(h720x_map_io)
INITIRQ(h720x_init_irq)
INITTIME(h7201_init_time)
MACHINE_END
/*
* linux/arch/arm/mach-h720x/h7202-eval.c
*
* Copyright (C) 2003 Thomas Gleixner <tglx@linutronix.de>
* 2003 Robert Schwebel <r.schwebel@pengutronix.de>
* 2004 Sascha Hauer <s.hauer@pengutronix.de>
*
* Architecture specific stuff for Hynix HMS30C7202 development board
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#include <linux/config.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/device.h>
#include <asm/setup.h>
#include <asm/types.h>
#include <asm/mach-types.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/mach/arch.h>
#include <asm/hardware.h>
extern void __init init_hw_h7202(void);
extern void __init h7202_init_irq (void);
extern void __init h7202_init_time(void);
extern void __init h720x_map_io(void);
static struct resource cirrus_resources[] = {
[0] = {
.start = ETH0_PHYS + 0x300,
.end = ETH0_PHYS + 0x300 + 0x10,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_CHAINED_GPIOB(8),
.end = IRQ_CHAINED_GPIOB(8),
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device cirrus_device = {
.name = "cirrus-cs89x0",
.id = -1,
.num_resources = ARRAY_SIZE(cirrus_resources),
.resource = cirrus_resources,
};
static struct platform_device *devices[] __initdata = {
&cirrus_device,
};
/*
* Hardware init. This is called early in initcalls
* Place pin inits here. So you avoid adding ugly
* #ifdef stuff to common drivers.
* Use this only, if your bootloader is not able
* to initialize the pins proper.
*/
static void __init init_eval_h7202(void)
{
init_hw_h7202();
(void) platform_add_devices(devices, ARRAY_SIZE(devices));
/* Enable interrupt on portb bit 8 (ethernet) */
CPU_REG (GPIO_B_VIRT, GPIO_POL) &= ~(1 << 8);
CPU_REG (GPIO_B_VIRT, GPIO_EN) |= (1 << 8);
}
MACHINE_START(H7202, "Hynix HMS30C7202")
MAINTAINER("Robert Schwebel, Pengutronix")
BOOT_MEM(0x40000000, 0x80000000, 0xf0000000)
BOOT_PARAMS(0x40000100)
MAPIO(h720x_map_io)
INITIRQ(h7202_init_irq)
INITTIME(h7202_init_time)
INIT_MACHINE(init_eval_h7202)
MACHINE_END
......@@ -43,7 +43,7 @@ config CPU_ARM710
# ARM720T
config CPU_ARM720T
bool "Support ARM720T processor" if !ARCH_CLPS711X && !ARCH_L7200 && !ARCH_CDB89712 && ARCH_INTEGRATOR
default y if ARCH_CLPS711X || ARCH_L7200 || ARCH_CDB89712
default y if ARCH_CLPS711X || ARCH_L7200 || ARCH_CDB89712 || ARCH_H720X
select CPU_32v4
select CPU_ABRT_LV4T
select CPU_CACHE_V4
......
......@@ -102,8 +102,12 @@ static inline void appldata_debug_print(struct appldata_mem_data *mem_data)
*/
static void appldata_get_mem_data(void *data)
{
struct sysinfo val;
struct page_state ps;
/*
* don't put large structures on the stack, we are
* serialized through the appldata_ops_lock and can use static
*/
static struct sysinfo val;
static struct page_state ps;
struct appldata_mem_data *mem_data;
mem_data = data;
......
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.9-rc2
# Mon Sep 20 17:16:38 2004
# Linux kernel version: 2.6.9-rc3
# Fri Oct 8 19:17:35 2004
#
CONFIG_MMU=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
......@@ -520,7 +520,7 @@ CONFIG_CRYPTO=y
# CONFIG_CRYPTO_SHA1_Z990 is not set
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_SHA512 is not set
# CONFIG_CRYPTO_WHIRLPOOL is not set
# CONFIG_CRYPTO_WP512 is not set
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_DES_Z990 is not set
# CONFIG_CRYPTO_BLOWFISH is not set
......
......@@ -118,10 +118,10 @@ int copy_siginfo_from_user32(siginfo_t *to, siginfo_t32 __user *from)
err |= __get_user(to->si_errno, &from->si_errno);
err |= __get_user(to->si_code, &from->si_code);
if (from->si_code < 0)
if (to->si_code < 0)
err |= __copy_from_user(&to->_sifields._pad, &from->_sifields._pad, SI_PAD_SIZE);
else {
switch (from->si_code >> 16) {
switch (to->si_code >> 16) {
case __SI_RT >> 16: /* This is not generated by the kernel as of now. */
case __SI_MESGQ >> 16:
err |= __get_user(to->si_int, &from->si_int);
......
......@@ -34,6 +34,7 @@ EXPORT_SYMBOL(__clear_user_asm);
EXPORT_SYMBOL(__strncpy_from_user_asm);
EXPORT_SYMBOL(__strnlen_user_asm);
EXPORT_SYMBOL(diag10);
EXPORT_SYMBOL(default_storage_key);
/*
* semaphore ops
......
......@@ -53,6 +53,7 @@ unsigned int console_devno = -1;
unsigned int console_irq = -1;
unsigned long memory_size = 0;
unsigned long machine_flags = 0;
unsigned int default_storage_key = 0;
struct {
unsigned long addr, size, type;
} memory_chunk[MEMORY_CHUNKS] = { { 0 } };
......
......@@ -23,6 +23,6 @@ EXPORT_SYMBOL(init_task);
* in etrap.S which assumes it.
*/
union thread_union init_thread_union
__attribute__((section (".text,#alloc")))
__attribute__((section (".text\"\n\t#")))
__attribute__((aligned (THREAD_SIZE)))
= { INIT_THREAD_INFO(init_task) };
......@@ -458,13 +458,6 @@ typedef struct drm_device_dma {
_DRM_DMA_USE_SG = 0x02
} flags;
/** \name DMA support */
/*@{*/
drm_buf_t *this_buffer; /**< Buffer being sent */
drm_buf_t *next_buffer; /**< Selected buffer to send */
drm_queue_t *next_queue; /**< Queue from which buffer selected*/
wait_queue_head_t waiting; /**< Processes waiting on free bufs */
/*@}*/
} drm_device_dma_t;
/**
......
/*
* Copyright 2004 Jon Smirl <jonsmirl@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* VIA, S3 GRAPHICS, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#include "drm_auth.h"
#include "drm_agpsupport.h"
#include "drm_bufs.h"
#include "drm_context.h"
#include "drm_dma.h"
#include "drm_irq.h"
#include "drm_drawable.h"
#include "drm_drv.h"
#include "drm_fops.h"
#include "drm_init.h"
#include "drm_ioctl.h"
#include "drm_lock.h"
#include "drm_memory.h"
#include "drm_proc.h"
#include "drm_vm.h"
#include "drm_stub.h"
#include "drm_scatter.h"
......@@ -117,10 +117,6 @@ int DRM(irq_install)( drm_device_t *dev )
DRM_DEBUG( "%s: irq=%d\n", __FUNCTION__, dev->irq );
dev->dma->next_buffer = NULL;
dev->dma->next_queue = NULL;
dev->dma->this_buffer = NULL;
if (drm_core_check_feature(dev, DRIVER_IRQ_VBL)) {
init_waitqueue_head(&dev->vbl_queue);
......
......@@ -210,12 +210,7 @@ unsigned long ffb_get_unmapped_area(struct file *filp,
return addr;
}
#include "drm_auth.h"
#include "drm_bufs.h"
#include "drm_context.h"
#include "drm_dma.h"
#include "drm_drawable.h"
#include "drm_drv.h"
#include "drm_core.h"
/* This functions must be here since it references DRM(numdevs)
* which drm_drv.h declares.
......@@ -254,18 +249,6 @@ static int ffb_presetup(drm_device_t *dev)
return ret;
}
#include "drm_fops.h"
#include "drm_init.h"
#include "drm_ioctl.h"
#include "drm_irq.h"
#include "drm_lock.h"
#include "drm_memory.h"
#include "drm_proc.h"
#include "drm_vm.h"
#include "drm_stub.h"
#include "drm_scatter.h"
static void ffb_driver_release(drm_device_t *dev, struct file *filp)
{
ffb_dev_priv_t *fpriv = (ffb_dev_priv_t *) dev->dev_private;
......
......@@ -37,21 +37,4 @@
#include "i810_drm.h"
#include "i810_drv.h"
#include "drm_agpsupport.h"
#include "drm_auth.h"
#include "drm_bufs.h"
#include "drm_context.h"
#include "drm_dma.h"
#include "drm_drawable.h"
#include "drm_drv.h"
#include "drm_fops.h"
#include "drm_init.h"
#include "drm_ioctl.h"
#include "drm_irq.h"
#include "drm_lock.h"
#include "drm_memory.h"
#include "drm_proc.h"
#include "drm_vm.h"
#include "drm_stub.h"
#include "drm_scatter.h"
#include "drm_core.h"
......@@ -39,21 +39,4 @@
#include "i830_drm.h"
#include "i830_drv.h"
#include "drm_agpsupport.h"
#include "drm_auth.h"
#include "drm_bufs.h"
#include "drm_context.h"
#include "drm_dma.h"
#include "drm_drawable.h"
#include "drm_drv.h"
#include "drm_fops.h"
#include "drm_init.h"
#include "drm_ioctl.h"
#include "drm_irq.h"
#include "drm_lock.h"
#include "drm_memory.h"
#include "drm_proc.h"
#include "drm_vm.h"
#include "drm_stub.h"
#include "drm_scatter.h"
#include "drm_core.h"
......@@ -14,20 +14,4 @@
#include "i915_drm.h"
#include "i915_drv.h"
#include "drm_agpsupport.h"
#include "drm_auth.h" /* is this needed? */
#include "drm_bufs.h"
#include "drm_context.h" /* is this needed? */
#include "drm_drawable.h" /* is this needed? */
#include "drm_dma.h"
#include "drm_drv.h"
#include "drm_fops.h"
#include "drm_init.h"
#include "drm_irq.h"
#include "drm_ioctl.h"
#include "drm_lock.h"
#include "drm_memory.h" /* */
#include "drm_proc.h"
#include "drm_vm.h"
#include "drm_stub.h"
#include "drm_scatter.h"
#include "drm_core.h"
......@@ -35,20 +35,4 @@
#include "drm.h"
#include "mga_drm.h"
#include "mga_drv.h"
#include "drm_agpsupport.h"
#include "drm_auth.h"
#include "drm_bufs.h"
#include "drm_context.h"
#include "drm_dma.h"
#include "drm_drawable.h"
#include "drm_drv.h"
#include "drm_fops.h"
#include "drm_init.h"
#include "drm_ioctl.h"
#include "drm_irq.h"
#include "drm_lock.h"
#include "drm_memory.h"
#include "drm_proc.h"
#include "drm_vm.h"
#include "drm_stub.h"
#include "drm_scatter.h"
#include "drm_core.h"
......@@ -37,20 +37,4 @@
#include "r128_drv.h"
#include "ati_pcigart.h"
#include "drm_agpsupport.h"
#include "drm_auth.h"
#include "drm_bufs.h"
#include "drm_context.h"
#include "drm_dma.h"
#include "drm_drawable.h"
#include "drm_drv.h"
#include "drm_fops.h"
#include "drm_init.h"
#include "drm_ioctl.h"
#include "drm_irq.h"
#include "drm_lock.h"
#include "drm_memory.h"
#include "drm_proc.h"
#include "drm_vm.h"
#include "drm_stub.h"
#include "drm_scatter.h"
#include "drm_core.h"
......@@ -38,20 +38,4 @@
#include "radeon_drv.h"
#include "ati_pcigart.h"
#include "drm_agpsupport.h"
#include "drm_auth.h"
#include "drm_bufs.h"
#include "drm_context.h"
#include "drm_dma.h"
#include "drm_drawable.h"
#include "drm_drv.h"
#include "drm_fops.h"
#include "drm_init.h"
#include "drm_ioctl.h"
#include "drm_irq.h"
#include "drm_lock.h"
#include "drm_memory.h"
#include "drm_proc.h"
#include "drm_vm.h"
#include "drm_stub.h"
#include "drm_scatter.h"
#include "drm_core.h"
......@@ -31,21 +31,4 @@
#include "sis_drm.h"
#include "sis_drv.h"
#include "drm_auth.h"
#include "drm_agpsupport.h"
#include "drm_bufs.h"
#include "drm_context.h"
#include "drm_dma.h"
#include "drm_drawable.h"
#include "drm_drv.h"
#include "drm_fops.h"
#include "drm_init.h"
#include "drm_irq.h"
#include "drm_ioctl.h"
#include "drm_lock.h"
#include "drm_memory.h"
#include "drm_proc.h"
#include "drm_vm.h"
#include "drm_stub.h"
#include "drm_scatter.h"
#include "drm_core.h"
......@@ -34,24 +34,7 @@
#include "tdfx.h"
#include "drmP.h"
#include "drm_agpsupport.h"
#include "drm_auth.h"
#include "drm_bufs.h"
#include "drm_context.h"
#include "drm_dma.h"
#include "drm_drawable.h"
#include "drm_drv.h"
#include "drm_fops.h"
#include "drm_init.h"
#include "drm_ioctl.h"
#include "drm_irq.h"
#include "drm_lock.h"
#include "drm_memory.h"
#include "drm_proc.h"
#include "drm_vm.h"
#include "drm_stub.h"
#include "drm_scatter.h"
#include "drm_core.h"
void DRM(driver_register_fns)(drm_device_t *dev)
{
......
......@@ -109,9 +109,9 @@ static int pc110pad_open(struct input_dev *dev)
static int __init pc110pad_init(void)
{
if (request_region(pc110pad_io, 4, "pc110pad"))
{
printk(KERN_ERR "pc110pad: I/O area %#x-%#x in use.\n", pc110pad_io, pc110pad_io + 4);
if (!request_region(pc110pad_io, 4, "pc110pad")) {
printk(KERN_ERR "pc110pad: I/O area %#x-%#x in use.\n",
pc110pad_io, pc110pad_io + 4);
return -EBUSY;
}
......
......@@ -54,7 +54,7 @@ MODULE_DESCRIPTION("Driver for ADT746x thermostat in iBook G4 and Powerbook G4 A
MODULE_LICENSE("GPL");
MODULE_PARM(limit_adjust,"i");
MODULE_PARM_DESC(limit_adjust,"Adjust maximum temperatures (50°C cpu, 70°C gpu) by N °C.");
MODULE_PARM_DESC(limit_adjust,"Adjust maximum temperatures (50 cpu, 70 gpu) by N degrees.");
MODULE_PARM(fan_speed,"i");
MODULE_PARM_DESC(fan_speed,"Specify fan speed (0-255) when lim < temp < lim+8 (default 128)");
......@@ -140,7 +140,7 @@ detach_thermostat(struct i2c_adapter *adapter)
}
printk(KERN_INFO "adt746x: Putting max temperatures back from %d, %d, %d,"
" to %d, %d, %d, (°C)\n",
" to %d, %d, %d\n",
th->limits[0], th->limits[1], th->limits[2],
th->initial_limits[0], th->initial_limits[1], th->initial_limits[2]);
......@@ -176,7 +176,8 @@ static int read_fan_speed(struct thermostat *th, u8 addr)
tmp[0] = read_reg(th, addr + 1);
res = tmp[1] + (tmp[0] << 8);
return (90000*60)/res;
/* "a value of 0xffff means that the fan has stopped" */
return (res == 0xffff ? 0 : (90000*60)/res);
}
static void write_both_fan_speed(struct thermostat *th, int speed)
......@@ -261,14 +262,14 @@ static int monitor_task(void *arg)
int var = temps[i] - lims[i];
if (var > 8) {
if (th->overriding[fan_number] == 0)
printk(KERN_INFO "adt746x: Limit exceeded by %d°C, overriding specified fan speed for %s.\n",
printk(KERN_INFO "adt746x: Limit exceeded by %d, overriding specified fan speed for %s.\n",
var, fan_number?"GPU":"CPU");
th->overriding[fan_number] = 1;
write_fan_speed(th, 255, fan_number);
started = 1;
} else if ((!th->overriding[fan_number] || var < 6) && var > 0) {
if (th->overriding[fan_number] == 1)
printk(KERN_INFO "adt746x: Limit exceeded by %d°C, setting speed to specified for %s.\n",
printk(KERN_INFO "adt746x: Limit exceeded by %d, setting speed to specified for %s.\n",
var, fan_number?"GPU":"CPU");
th->overriding[fan_number] = 0;
write_fan_speed(th, fan_speed, fan_number);
......@@ -299,8 +300,8 @@ static int monitor_task(void *arg)
|| temps[1] != th->cached_temp[1]
|| temps[2] != th->cached_temp[2]) {
printk(KERN_INFO "adt746x: Temperature infos:"
" thermostats: %d,%d,%d °C;"
" limits: %d,%d,%d °C;"
" thermostats: %d,%d,%d;"
" limits: %d,%d,%d;"
" fan speed: %d RPM\n",
temps[0], temps[1], temps[2],
lims[0], lims[1], lims[2],
......@@ -370,7 +371,7 @@ attach_one_thermostat(struct i2c_adapter *adapter, int addr, int busno)
}
printk(KERN_INFO "adt746x: Lowering max temperatures from %d, %d, %d"
" to %d, %d, %d (°C)\n",
" to %d, %d, %d\n",
th->initial_limits[0], th->initial_limits[1], th->initial_limits[2],
th->limits[0], th->limits[1], th->limits[2]);
......@@ -416,6 +417,15 @@ static ssize_t show_##name(struct device *dev, char *buf) \
return sprintf(buf, "%d\n", data); \
}
#define BUILD_SHOW_FUNC_FAN(name, data) \
static ssize_t show_##name(struct device *dev, char *buf) \
{ \
return sprintf(buf, "%d (%d rpm)\n", \
thermostat->last_speed[data], \
read_fan_speed(thermostat, FAN_SPEED[data]) \
); \
}
#define BUILD_STORE_FUNC_DEG(name, data) \
static ssize_t store_##name(struct device *dev, const char *buf, size_t n) \
{ \
......@@ -436,7 +446,7 @@ static ssize_t store_##name(struct device *dev, const char *buf, size_t n) \
val = simple_strtoul(buf, NULL, 10); \
if (val < 0 || val > 255) \
return -EINVAL; \
printk(KERN_INFO "Setting fan speed to %d\n", val); \
printk(KERN_INFO "Setting specified fan speed to %d\n", val); \
data = val; \
return n; \
}
......@@ -447,8 +457,8 @@ BUILD_SHOW_FUNC_INT(cpu_limit, thermostat->limits[1])
BUILD_SHOW_FUNC_INT(gpu_limit, thermostat->limits[2])
BUILD_SHOW_FUNC_INT(specified_fan_speed, fan_speed)
BUILD_SHOW_FUNC_INT(cpu_fan_speed, (read_fan_speed(thermostat, FAN_SPEED[0])))
BUILD_SHOW_FUNC_INT(gpu_fan_speed, (read_fan_speed(thermostat, FAN_SPEED[1])))
BUILD_SHOW_FUNC_FAN(cpu_fan_speed, 0)
BUILD_SHOW_FUNC_FAN(gpu_fan_speed, 1)
BUILD_STORE_FUNC_INT(specified_fan_speed,fan_speed)
BUILD_SHOW_FUNC_INT(limit_adjust, limit_adjust)
......
......@@ -6,7 +6,7 @@
* Bugreports.to..: <Linux390@de.ibm.com>
* (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
*
* $Revision: 1.37 $
* $Revision: 1.38 $
*/
#include <linux/config.h>
......@@ -304,8 +304,11 @@ dasd_diag_check_device(struct dasd_device *device)
(device->bp_block >> 10),
(device->blocks << device->s2b_shift) >> 1);
rc = 0;
} else
} else {
DEV_MESSAGE(KERN_WARNING, device, "%s",
"volume has incompatible disk layout");
rc = -EMEDIUMTYPE;
}
free_page((long) label);
return rc;
}
......
......@@ -7,7 +7,7 @@
* Bugreports.to..: <Linux390@de.ibm.com>
* (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
*
* $Revision: 1.59 $
* $Revision: 1.61 $
*/
#include <linux/config.h>
......@@ -505,11 +505,13 @@ dasd_eckd_check_characteristics(struct dasd_device *device)
"sizes of configuration data mismatch"
"%d (read) vs %ld (expected)",
conf_len, sizeof (struct dasd_eckd_confdata));
kfree(conf_data); /* allocated by read_conf_data() */
return 0; /* no errror */
}
memcpy(&private->conf_data, conf_data,
sizeof (struct dasd_eckd_confdata));
kfree(conf_data); /* allocated by read_conf_data() */
return 0;
}
......
......@@ -5,6 +5,7 @@
*/
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/ctype.h>
#include <linux/errno.h>
#include <linux/init.h>
......@@ -19,6 +20,7 @@
//#define DCSSBLK_DEBUG /* Debug messages on/off */
#define DCSSBLK_NAME "dcssblk"
#define DCSSBLK_MINORS_PER_DISK 1
#define DCSSBLK_PARM_LEN 400
#ifdef DCSSBLK_DEBUG
#define PRINT_DEBUG(x...) printk(KERN_DEBUG DCSSBLK_NAME " debug: " x)
......@@ -34,6 +36,8 @@ static int dcssblk_open(struct inode *inode, struct file *filp);
static int dcssblk_release(struct inode *inode, struct file *filp);
static int dcssblk_make_request(struct request_queue *q, struct bio *bio);
static char dcssblk_segments[DCSSBLK_PARM_LEN] = "\0";
static int dcssblk_major;
static struct block_device_operations dcssblk_devops = {
.owner = THIS_MODULE,
......@@ -641,6 +645,47 @@ dcssblk_make_request(request_queue_t *q, struct bio *bio)
return 0;
}
static void
dcssblk_check_params(void)
{
int rc, i, j, k;
char buf[9];
struct dcssblk_dev_info *dev_info;
for (i = 0; (i < DCSSBLK_PARM_LEN) && (dcssblk_segments[i] != '\0');
i++) {
for (j = i; (dcssblk_segments[j] != ',') &&
(dcssblk_segments[j] != '\0') &&
(dcssblk_segments[j] != '(') &&
(j - i) < 8; j++)
{
buf[j-i] = dcssblk_segments[j];
}
buf[j-i] = '\0';
rc = dcssblk_add_store(dcssblk_root_dev, buf, j-i);
if ((rc >= 0) && (dcssblk_segments[j] == '(')) {
for (k = 0; buf[k] != '\0'; k++)
buf[k] = toupper(buf[k]);
if (!strncmp(&dcssblk_segments[j], "(local)", 7)) {
down_read(&dcssblk_devices_sem);
dev_info = dcssblk_get_device_by_name(buf);
up_read(&dcssblk_devices_sem);
if (dev_info)
dcssblk_shared_store(&dev_info->dev,
"0\n", 2);
}
}
while ((dcssblk_segments[j] != ',') &&
(dcssblk_segments[j] != '\0'))
{
j++;
}
if (dcssblk_segments[j] == '\0')
break;
i = j;
}
}
/*
* The init/exit functions.
*/
......@@ -689,6 +734,9 @@ dcssblk_init(void)
}
dcssblk_major = rc;
init_rwsem(&dcssblk_devices_sem);
dcssblk_check_params();
PRINT_DEBUG("...finished!\n");
return 0;
}
......@@ -696,4 +744,12 @@ dcssblk_init(void)
module_init(dcssblk_init);
module_exit(dcssblk_exit);
module_param_string(segments, dcssblk_segments, DCSSBLK_PARM_LEN, 0444);
MODULE_PARM_DESC(segments, "Name of DCSS segment(s) to be loaded, "
"comma-separated list, each name max. 8 chars.\n"
"Adding \"(local)\" to segment name equals echoing 0 to "
"/sys/devices/dcssblk/<segment name>/shared after loading "
"the segment - \n"
"e.g. segments=\"mydcss1,mydcss2,mydcss3(local)\"");
MODULE_LICENSE("GPL");
/*
* drivers/s390/cio/blacklist.c
* S/390 common I/O routines -- blacklisting of specific devices
* $Revision: 1.31 $
* $Revision: 1.33 $
*
* Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
* IBM Corporation
......@@ -229,7 +229,7 @@ s390_redo_validation (void)
unsigned int irq;
CIO_TRACE_EVENT (0, "redoval");
for (irq = 0; irq <= __MAX_SUBCHANNELS; irq++) {
for (irq = 0; irq < __MAX_SUBCHANNELS; irq++) {
int ret;
struct subchannel *sch;
......
/*
* drivers/s390/cio/ccwgroup.c
* bus driver for ccwgroup
* $Revision: 1.28 $
* $Revision: 1.29 $
*
* Copyright (C) 2002 IBM Deutschland Entwicklung GmbH,
* IBM Corporation
......@@ -191,14 +191,12 @@ ccwgroup_create(struct device *root,
gdev->cdev[i]->dev.driver_data = gdev;
del_drvdata = 1;
*gdev = (struct ccwgroup_device) {
.creator_id = creator_id,
.count = argc,
.dev = {
.bus = &ccwgroup_bus_type,
.parent = root,
.release = ccwgroup_release,
},
gdev->creator_id = creator_id;
gdev->count = argc;
gdev->dev = (struct device ) {
.bus = &ccwgroup_bus_type,
.parent = root,
.release = ccwgroup_release,
};
snprintf (gdev->dev.bus_id, BUS_ID_SIZE, "%s",
......
/*
* drivers/s390/cio/cio.c
* S/390 common I/O routines -- low level i/o calls
* $Revision: 1.123 $
* $Revision: 1.128 $
*
* Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
* IBM Corporation
......@@ -141,6 +141,7 @@ cio_tpi(void)
sch = (struct subchannel *)(unsigned long)tpi_info->intparm;
if (!sch)
return 1;
local_bh_disable();
irq_enter ();
spin_lock(&sch->lock);
memcpy (&sch->schib.scsw, &irb->scsw, sizeof (struct scsw));
......@@ -148,6 +149,7 @@ cio_tpi(void)
sch->driver->irq(&sch->dev);
spin_unlock(&sch->lock);
irq_exit ();
__local_bh_enable();
return 1;
}
......@@ -409,10 +411,10 @@ cio_enable_subchannel (struct subchannel *sch, unsigned int isc)
if (ccode)
return -ENODEV;
sch->schib.pmcw.ena = 1;
sch->schib.pmcw.isc = isc;
sch->schib.pmcw.intparm = (__u32)(unsigned long)sch;
for (retry = 5, ret = 0; retry > 0; retry--) {
sch->schib.pmcw.ena = 1;
sch->schib.pmcw.isc = isc;
sch->schib.pmcw.intparm = (__u32)(unsigned long)sch;
ret = cio_modify(sch);
if (ret == -ENODEV)
break;
......@@ -463,9 +465,8 @@ cio_disable_subchannel (struct subchannel *sch)
*/
return -EBUSY;
sch->schib.pmcw.ena = 0;
for (retry = 5, ret = 0; retry > 0; retry--) {
sch->schib.pmcw.ena = 0;
ret = cio_modify(sch);
if (ret == -ENODEV)
break;
......
/*
* linux/drivers/s390/cio/cmf.c ($Revision: 1.15 $)
* linux/drivers/s390/cio/cmf.c ($Revision: 1.16 $)
*
* Linux on zSeries Channel Measurement Facility support
*
......@@ -526,29 +526,26 @@ readall_cmb (struct ccw_device *cdev, struct cmbdata *data)
time = get_clock() - cdev->private->cmb_start_time;
spin_unlock_irqrestore(cdev->ccwlock, flags);
*data = (struct cmbdata) {
/* we only know values before device_busy_time */
.size = offsetof(struct cmbdata, device_busy_time),
/* conver to nanoseconds */
.elapsed_time = (time * 1000) >> 12,
/* copy data to new structure */
.ssch_rsch_count = cmb.ssch_rsch_count,
.sample_count = cmb.sample_count,
/* time fields are converted to nanoseconds while copying */
.device_connect_time
= time_to_nsec(cmb.device_connect_time),
.function_pending_time
= time_to_nsec(cmb.function_pending_time),
.device_disconnect_time
= time_to_nsec(cmb.device_disconnect_time),
.control_unit_queuing_time
= time_to_nsec(cmb.control_unit_queuing_time),
.device_active_only_time
= time_to_nsec(cmb.device_active_only_time),
};
memset(data, sizeof(struct cmbdata), 0);
/* we only know values before device_busy_time */
data->size = offsetof(struct cmbdata, device_busy_time);
/* convert to nanoseconds */
data->elapsed_time = (time * 1000) >> 12;
/* copy data to new structure */
data->ssch_rsch_count = cmb.ssch_rsch_count;
data->sample_count = cmb.sample_count;
/* time fields are converted to nanoseconds while copying */
data->device_connect_time = time_to_nsec(cmb.device_connect_time);
data->function_pending_time = time_to_nsec(cmb.function_pending_time);
data->device_disconnect_time = time_to_nsec(cmb.device_disconnect_time);
data->control_unit_queuing_time
= time_to_nsec(cmb.control_unit_queuing_time);
data->device_active_only_time
= time_to_nsec(cmb.device_active_only_time);
return 0;
}
......@@ -739,33 +736,29 @@ readall_cmbe (struct ccw_device *cdev, struct cmbdata *data)
time = get_clock() - cdev->private->cmb_start_time;
spin_unlock_irqrestore(cdev->ccwlock, flags);
*data = (struct cmbdata) {
/* we only know values before device_busy_time */
.size = offsetof(struct cmbdata, device_busy_time),
/* conver to nanoseconds */
.elapsed_time = (time * 1000) >> 12,
/* copy data to new structure */
.ssch_rsch_count = cmb.ssch_rsch_count,
.sample_count = cmb.sample_count,
/* time fields are converted to nanoseconds while copying */
.device_connect_time
= time_to_nsec(cmb.device_connect_time),
.function_pending_time
= time_to_nsec(cmb.function_pending_time),
.device_disconnect_time
= time_to_nsec(cmb.device_disconnect_time),
.control_unit_queuing_time
= time_to_nsec(cmb.control_unit_queuing_time),
.device_active_only_time
= time_to_nsec(cmb.device_active_only_time),
.device_busy_time
= time_to_nsec(cmb.device_busy_time),
.initial_command_response_time
= time_to_nsec(cmb.initial_command_response_time),
};
memset (data, sizeof(struct cmbdata), 0);
/* we only know values before device_busy_time */
data->size = offsetof(struct cmbdata, device_busy_time);
/* conver to nanoseconds */
data->elapsed_time = (time * 1000) >> 12;
/* copy data to new structure */
data->ssch_rsch_count = cmb.ssch_rsch_count;
data->sample_count = cmb.sample_count;
/* time fields are converted to nanoseconds while copying */
data->device_connect_time = time_to_nsec(cmb.device_connect_time);
data->function_pending_time = time_to_nsec(cmb.function_pending_time);
data->device_disconnect_time = time_to_nsec(cmb.device_disconnect_time);
data->control_unit_queuing_time
= time_to_nsec(cmb.control_unit_queuing_time);
data->device_active_only_time
= time_to_nsec(cmb.device_active_only_time);
data->device_busy_time = time_to_nsec(cmb.device_busy_time);
data->initial_command_response_time
= time_to_nsec(cmb.initial_command_response_time);
return 0;
}
......
/*
* drivers/s390/cio/css.c
* driver for channel subsystem
* $Revision: 1.80 $
* $Revision: 1.82 $
*
* Copyright (C) 2002 IBM Deutschland Entwicklung GmbH,
* IBM Corporation
......@@ -278,7 +278,7 @@ css_rescan_devices(void)
{
int irq, ret;
for (irq = 0; irq <= __MAX_SUBCHANNELS; irq++) {
for (irq = 0; irq < __MAX_SUBCHANNELS; irq++) {
ret = css_evaluate_subchannel(irq, 1);
/* No more memory. It doesn't make sense to continue. No
* panic because this can happen in midflight and just
......@@ -521,6 +521,7 @@ css_enqueue_subchannel_slow(unsigned long schid)
new_slow_sch = kmalloc(sizeof(struct slow_subchannel), GFP_ATOMIC);
if (!new_slow_sch)
return -ENOMEM;
memset(new_slow_sch, sizeof(struct slow_subchannel), 0);
new_slow_sch->schid = schid;
spin_lock_irqsave(&slow_subchannel_lock, flags);
list_add_tail(&new_slow_sch->slow_list, &slow_subchannels_head);
......
/*
* drivers/s390/cio/device.c
* bus driver for ccw devices
* $Revision: 1.120 $
* $Revision: 1.124 $
*
* Copyright (C) 2002 IBM Deutschland Entwicklung GmbH,
* IBM Corporation
......@@ -540,6 +540,8 @@ get_disc_ccwdev_by_devno(unsigned int devno, struct ccw_device *sibling)
return cdev;
}
extern int css_get_ssd_info(struct subchannel *sch);
void
ccw_device_do_unreg_rereg(void *data)
{
......@@ -581,6 +583,8 @@ ccw_device_do_unreg_rereg(void *data)
device_unregister(&other_sch->dev);
}
}
/* Update ssd info here. */
css_get_ssd_info(sch);
cdev->private->devno = sch->schib.pmcw.dev;
} else
need_rename = 0;
......@@ -633,7 +637,8 @@ io_subchannel_register(void *data)
sch->dev.driver_data = 0;
kfree (cdev->private);
kfree (cdev);
goto out;
put_device(&sch->dev);
return;
}
ret = subchannel_add_files(cdev->dev.parent);
......@@ -707,18 +712,19 @@ static int
io_subchannel_recog(struct ccw_device *cdev, struct subchannel *sch)
{
int rc;
struct ccw_device_private *priv;
sch->dev.driver_data = cdev;
sch->driver = &io_subchannel_driver;
cdev->ccwlock = &sch->lock;
*cdev->private = (struct ccw_device_private) {
.devno = sch->schib.pmcw.dev,
.irq = sch->irq,
.state = DEV_STATE_NOT_OPER,
.cmb_list = LIST_HEAD_INIT(cdev->private->cmb_list),
};
init_waitqueue_head(&cdev->private->wait_q);
init_timer(&cdev->private->timer);
/* Init private data. */
priv = cdev->private;
priv->devno = sch->schib.pmcw.dev;
priv->irq = sch->irq;
priv->state = DEV_STATE_NOT_OPER;
INIT_LIST_HEAD(&priv->cmb_list);
init_waitqueue_head(&priv->wait_q);
init_timer(&priv->timer);
/* Set an initial name for the device. */
snprintf (cdev->dev.bus_id, BUS_ID_SIZE, "0.0.%04x",
......
......@@ -995,6 +995,7 @@ device_trigger_reprobe(struct subchannel *sch)
if ((sch->lpm & (sch->lpm - 1)) != 0)
sch->schib.pmcw.mp = 1;
sch->schib.pmcw.intparm = (__u32)(unsigned long)sch;
/* We should also udate ssd info, but this has to wait. */
ccw_device_start_id(cdev, 0);
spin_unlock_irqrestore(&sch->lock, flags);
}
......
......@@ -303,10 +303,10 @@ ccw_device_sense_id_irq(struct ccw_device *cdev, enum dev_event dev_event)
sch = to_subchannel(cdev->dev.parent);
irb = (struct irb *) __LC_IRB;
/* Retry sense id for cc=1. */
/* Retry sense id, if needed. */
if (irb->scsw.stctl ==
(SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) {
if (irb->scsw.cc == 1) {
if ((irb->scsw.cc == 1) || !irb->scsw.actl) {
ret = __ccw_device_sense_id_start(cdev);
if (ret && ret != -EBUSY)
ccw_device_sense_id_done(cdev, ret);
......
/*
*
* linux/drivers/s390/net/qeth_main.c ($Revision: 1.138 $)
* linux/drivers/s390/net/qeth_main.c ($Revision: 1.145 $)
*
* Linux on zSeries OSA Express and HiperSockets support
*
......@@ -12,7 +12,7 @@
* Frank Pavlic (pavlic@de.ibm.com) and
* Thomas Spatzier <tspat@de.ibm.com>
*
* $Revision: 1.138 $ $Date: 2004/09/17 10:40:53 $
* $Revision: 1.145 $ $Date: 2004/10/08 15:08:40 $
*
* 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
......@@ -79,7 +79,7 @@ qeth_eyecatcher(void)
#include "qeth_mpc.h"
#include "qeth_fs.h"
#define VERSION_QETH_C "$Revision: 1.138 $"
#define VERSION_QETH_C "$Revision: 1.145 $"
static const char *version = "qeth S/390 OSA-Express driver";
/**
......@@ -3835,6 +3835,7 @@ qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue,
/* return EBUSY because we sent old packet, not
* the current one */
rc = -EBUSY;
atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED);
goto out;
}
}
......
......@@ -775,6 +775,7 @@ config FB_SIS_315
config FB_NEOMAGIC
tristate "NeoMagic display support"
depends on FB && PCI
select FB_MODE_HELPERS
help
This driver supports notebooks with NeoMagic PCI chips.
Say Y if you have such a graphics card.
......
......@@ -651,6 +651,7 @@ hugetlbfs_fill_super(struct super_block *sb, void *data, int silent)
sbinfo->free_blocks = config.nr_blocks;
sbinfo->max_inodes = config.nr_inodes;
sbinfo->free_inodes = config.nr_inodes;
sb->s_maxbytes = MAX_LFS_FILESIZE;
sb->s_blocksize = HPAGE_SIZE;
sb->s_blocksize_bits = HPAGE_SHIFT;
sb->s_magic = HUGETLBFS_MAGIC;
......
/*
* linux/include/asm-arm/arch-h720x/boards.h
*
* Copyright (C) 2003 Thomas Gleixner <tglx@linutronix.de>
* (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>
*
* This file contains the board specific defines for various devices
*
* 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.
*/
#ifndef __ASM_ARCH_HARDWARE_INCMACH_H
#error Do not include this file directly. Include asm/hardware.h instead !
#endif
/* Hynix H7202 developer board specific device defines */
#ifdef CONFIG_ARCH_H7202
/* FLASH */
#define FLASH_VIRT 0xd0000000
#define FLASH_PHYS 0x00000000
#define FLASH_SIZE 0x02000000
/* onboard LAN controller */
# define ETH0_PHYS 0x08000000
/* Touch screen defines */
/* GPIO Port */
#define PEN_GPIO GPIO_B_VIRT
/* Bitmask for pen down interrupt */
#define PEN_INT_BIT (1<<7)
/* Bitmask for pen up interrupt */
#define PEN_ENA_BIT (1<<6)
/* pen up interrupt */
#define IRQ_PEN IRQ_MUX_GPIOB(7)
#endif
/* Hynix H7201 developer board specific device defines */
#if defined (CONFIG_ARCH_H7201)
/* ROM DISK SPACE */
#define ROM_DISK_BASE 0xc1800000
#define ROM_DISK_START 0x41800000
#define ROM_DISK_SIZE 0x00700000
/* SRAM DISK SPACE */
#define SRAM_DISK_BASE 0xf1000000
#define SRAM_DISK_START 0x04000000
#define SRAM_DISK_SIZE 0x00400000
#endif
/*
* linux/include/asm-arm/arch-h720x/dma.h
*
* Architecture DMA routes
*
* Copyright (C) 1997.1998 Russell King
*/
#ifndef __ASM_ARCH_DMA_H
#define __ASM_ARCH_DMA_H
/*
* This is the maximum DMA address that can be DMAd to.
* There should not be more than (0xd0000000 - 0xc0000000)
* bytes of RAM.
*/
#define MAX_DMA_ADDRESS 0xd0000000
#if defined (CONFIG_CPU_H7201)
#define MAX_DMA_CHANNELS 3
#elif defined (CONFIG_CPU_H7202)
#define MAX_DMA_CHANNELS 4
#else
#error processor definition missmatch
#endif
#endif /* __ASM_ARCH_DMA_H */
/*
* linux/include/asm-arm/arch-h720x/h7201-regs.h
*
* Copyright (C) 2000 Jungjun Kim, Hynix Semiconductor Inc.
* (C) 2003 Thomas Gleixner <tglx@linutronix.de>
* (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>
* (C) 2004 Sascha Hauer <s.hauer@pengutronix.de>
*
* This file contains the hardware definitions of the h720x processors
*
* 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.
*
* Do not add implementations specific defines here. This files contains
* only defines of the onchip peripherals. Add those defines to boards.h,
* which is included by this file.
*/
#define SERIAL2_VIRT (IO_VIRT + 0x50100)
#define SERIAL3_VIRT (IO_VIRT + 0x50200)
/*
* PCMCIA
*/
#define PCMCIA0_ATT_BASE 0xe5000000
#define PCMCIA0_ATT_SIZE 0x00200000
#define PCMCIA0_ATT_START 0x20000000
#define PCMCIA0_MEM_BASE 0xe5200000
#define PCMCIA0_MEM_SIZE 0x00200000
#define PCMCIA0_MEM_START 0x24000000
#define PCMCIA0_IO_BASE 0xe5400000
#define PCMCIA0_IO_SIZE 0x00200000
#define PCMCIA0_IO_START 0x28000000
#define PCMCIA1_ATT_BASE 0xe5600000
#define PCMCIA1_ATT_SIZE 0x00200000
#define PCMCIA1_ATT_START 0x30000000
#define PCMCIA1_MEM_BASE 0xe5800000
#define PCMCIA1_MEM_SIZE 0x00200000
#define PCMCIA1_MEM_START 0x34000000
#define PCMCIA1_IO_BASE 0xe5a00000
#define PCMCIA1_IO_SIZE 0x00200000
#define PCMCIA1_IO_START 0x38000000
#define PRIME3C_BASE 0xf0050000
#define PRIME3C_SIZE 0x00001000
#define PRIME3C_START 0x10000000
/* VGA Controller */
#define VGA_RAMBASE 0x50
#define VGA_TIMING0 0x60
#define VGA_TIMING1 0x64
#define VGA_TIMING2 0x68
#define VGA_TIMING3 0x6c
#define LCD_CTRL_VGA_ENABLE 0x00000100
#define LCD_CTRL_VGA_BPP_MASK 0x00000600
#define LCD_CTRL_VGA_4BPP 0x00000000
#define LCD_CTRL_VGA_8BPP 0x00000200
#define LCD_CTRL_VGA_16BPP 0x00000300
#define LCD_CTRL_SHARE_DMA 0x00000800
#define LCD_CTRL_VDE 0x00100000
#define LCD_CTRL_LPE 0x00400000 /* LCD Power enable */
#define LCD_CTRL_BLE 0x00800000 /* LCD backlight enable */
#define VGA_PALETTE_BASE (IO_VIRT + 0x10800)
/*
* linux/include/asm-arm/arch-h720x/h7202-regs.h
*
* Copyright (C) 2000 Jungjun Kim, Hynix Semiconductor Inc.
* (C) 2003 Thomas Gleixner <tglx@linutronix.de>
* (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>
* (C) 2004 Sascha Hauer <s.hauer@pengutronix.de>
*
* This file contains the hardware definitions of the h720x processors
*
* 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.
*
* Do not add implementations specific defines here. This files contains
* only defines of the onchip peripherals. Add those defines to boards.h,
* which is included by this file.
*/
#define SERIAL2_VIRT (IO_VIRT + 0x2d000)
#define SERIAL3_VIRT (IO_VIRT + 0x2e000)
/* Matrix Keyboard Controller */
#define KBD_VIRT (IO_VIRT + 0x22000)
#define KBD_KBCR 0x00
#define KBD_KBSC 0x04
#define KBD_KBTR 0x08
#define KBD_KBVR0 0x0C
#define KBD_KBVR1 0x10
#define KBD_KBSR 0x18
#define KBD_KBCR_SCANENABLE (1 << 7)
#define KBD_KBCR_NPOWERDOWN (1 << 2)
#define KBD_KBCR_CLKSEL_MASK (3)
#define KBD_KBCR_CLKSEL_PCLK2 0x0
#define KBD_KBCR_CLKSEL_PCLK128 0x1
#define KBD_KBCR_CLKSEL_PCLK256 0x2
#define KBD_KBCR_CLKSEL_PCLK512 0x3
#define KBD_KBSR_INTR (1 << 0)
#define KBD_KBSR_WAKEUP (1 << 1)
/* USB device controller */
#define USBD_BASE (IO_VIRT + 0x12000)
#define USBD_LENGTH 0x3C
#define USBD_GCTRL 0x00
#define USBD_EPCTRL 0x04
#define USBD_INTMASK 0x08
#define USBD_INTSTAT 0x0C
#define USBD_PWR 0x10
#define USBD_DMARXTX 0x14
#define USBD_DEVID 0x18
#define USBD_DEVCLASS 0x1C
#define USBD_INTCLASS 0x20
#define USBD_SETUP0 0x24
#define USBD_SETUP1 0x28
#define USBD_ENDP0RD 0x2C
#define USBD_ENDP0WT 0x30
#define USBD_ENDP1RD 0x34
#define USBD_ENDP2WT 0x38
/* PS/2 port */
#define PSDATA 0x00
#define PSSTAT 0x04
#define PSSTAT_TXEMPTY (1<<0)
#define PSSTAT_TXBUSY (1<<1)
#define PSSTAT_RXFULL (1<<2)
#define PSSTAT_RXBUSY (1<<3)
#define PSSTAT_CLKIN (1<<4)
#define PSSTAT_DATAIN (1<<5)
#define PSSTAT_PARITY (1<<6)
#define PSCONF 0x08
#define PSCONF_ENABLE (1<<0)
#define PSCONF_TXINTEN (1<<2)
#define PSCONF_RXINTEN (1<<3)
#define PSCONF_FORCECLKLOW (1<<4)
#define PSCONF_FORCEDATLOW (1<<5)
#define PSCONF_LCE (1<<6)
#define PSINTR 0x0C
#define PSINTR_TXINT (1<<0)
#define PSINTR_RXINT (1<<1)
#define PSINTR_PAR (1<<2)
#define PSINTR_RXTO (1<<3)
#define PSINTR_TXTO (1<<4)
#define PSTDLO 0x10 /* clk low before start transmission */
#define PSTPRI 0x14 /* PRI clock */
#define PSTXMT 0x18 /* maximum transmission time */
#define PSTREC 0x20 /* maximum receive time */
#define PSPWDN 0x3c
/* ADC converter */
#define ADC_BASE (IO_VIRT + 0x29000)
#define ADC_CR 0x00
#define ADC_TSCTRL 0x04
#define ADC_BT_CTRL 0x08
#define ADC_MC_CTRL 0x0C
#define ADC_STATUS 0x10
/* ADC control register bits */
#define ADC_CR_PW_CTRL 0x80
#define ADC_CR_DIRECTC 0x04
#define ADC_CR_CONTIME_NO 0x00
#define ADC_CR_CONTIME_2 0x04
#define ADC_CR_CONTIME_4 0x08
#define ADC_CR_CONTIME_ADE 0x0c
#define ADC_CR_LONGCALTIME 0x01
/* ADC touch panel register bits */
#define ADC_TSCTRL_ENABLE 0x80
#define ADC_TSCTRL_INTR 0x40
#define ADC_TSCTRL_SWBYPSS 0x20
#define ADC_TSCTRL_SWINVT 0x10
#define ADC_TSCTRL_S400 0x03
#define ADC_TSCTRL_S200 0x02
#define ADC_TSCTRL_S100 0x01
#define ADC_TSCTRL_S50 0x00
/* ADC Interrupt Status Register bits */
#define ADC_STATUS_TS_BIT 0x80
#define ADC_STATUS_MBT_BIT 0x40
#define ADC_STATUS_BBT_BIT 0x20
#define ADC_STATUS_MIC_BIT 0x10
/* Touch data registers */
#define ADC_TS_X0X1 0x30
#define ADC_TS_X2X3 0x34
#define ADC_TS_Y0Y1 0x38
#define ADC_TS_Y2Y3 0x3c
#define ADC_TS_X4X5 0x40
#define ADC_TS_X6X7 0x44
#define ADC_TS_Y4Y5 0x48
#define ADC_TS_Y6Y7 0x50
/* battery data */
#define ADC_MB_DATA 0x54
#define ADC_BB_DATA 0x58
/* Sound data register */
#define ADC_SD_DAT0 0x60
#define ADC_SD_DAT1 0x64
#define ADC_SD_DAT2 0x68
#define ADC_SD_DAT3 0x6c
#define ADC_SD_DAT4 0x70
#define ADC_SD_DAT5 0x74
#define ADC_SD_DAT6 0x78
#define ADC_SD_DAT7 0x7c
/*
* linux/include/asm-arm/arch-h720x/hardware.h
*
* Copyright (C) 2000 Jungjun Kim, Hynix Semiconductor Inc.
* (C) 2003 Thomas Gleixner <tglx@linutronix.de>
* (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>
*
* This file contains the hardware definitions of the h720x processors
*
* 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.
*
* Do not add implementations specific defines here. This files contains
* only defines of the onchip peripherals. Add those defines to boards.h,
* which is included by this file.
*/
#ifndef __ASM_ARCH_HARDWARE_H
#define __ASM_ARCH_HARDWARE_H
#define IOCLK (3686400L)
/* Onchip peripherals */
#define IO_VIRT 0xf0000000 /* IO peripherals */
#define IO_PHYS 0x80000000
#define IO_SIZE 0x00050000
#ifdef CONFIG_CPU_H7202
#include "h7202-regs.h"
#elif defined CONFIG_CPU_H7201
#include "h7201-regs.h"
#else
#error machine definition mismatch
#endif
/* Macro to access the CPU IO */
#define CPU_IO(x) (*(volatile u32*)(x))
/* Macro to access general purpose regs (base, offset) */
#define CPU_REG(x,y) CPU_IO(x+y)
/* Macro to access irq related regs */
#define IRQ_REG(x) CPU_REG(IRQC_VIRT,x)
/* CPU registers */
/* general purpose I/O */
#define GPIO_VIRT(x) (IO_VIRT + 0x23000 + ((x)<<5))
#define GPIO_A_VIRT (GPIO_VIRT(0))
#define GPIO_B_VIRT (GPIO_VIRT(1))
#define GPIO_C_VIRT (GPIO_VIRT(2))
#define GPIO_D_VIRT (GPIO_VIRT(3))
#define GPIO_E_VIRT (GPIO_VIRT(4))
#define GPIO_AMULSEL (GPIO_VIRT + 0xA4)
/* Register offsets general purpose I/O */
#define GPIO_DATA 0x00
#define GPIO_DIR 0x04
#define GPIO_MASK 0x08
#define GPIO_STAT 0x0C
#define GPIO_EDGE 0x10
#define GPIO_CLR 0x14
#define GPIO_POL 0x18
#define GPIO_EN 0x1C
/*interrupt controller */
#define IRQC_VIRT (IO_VIRT + 0x24000)
/* register offset interrupt controller */
#define IRQC_IER 0x00
#define IRQC_ISR 0x04
/* timer unit */
#define TIMER_VIRT (IO_VIRT + 0x25000)
/* Register offsets timer unit */
#define TM0_PERIOD 0x00
#define TM0_COUNT 0x08
#define TM0_CTRL 0x10
#define TM1_PERIOD 0x20
#define TM1_COUNT 0x28
#define TM1_CTRL 0x30
#define TM2_PERIOD 0x40
#define TM2_COUNT 0x48
#define TM2_CTRL 0x50
#define TIMER_TOPCTRL 0x60
#define TIMER_TOPSTAT 0x64
#define T64_COUNTL 0x80
#define T64_COUNTH 0x84
#define T64_CTRL 0x88
#define T64_BASEL 0x94
#define T64_BASEH 0x98
/* Bitmaks timer unit TOPSTAT reg */
#define TSTAT_T0INT 0x1
#define TSTAT_T1INT 0x2
#define TSTAT_T2INT 0x4
#define TSTAT_T3INT 0x8
/* Bit description of TMx_CTRL register */
#define TM_START 0x1
#define TM_REPEAT 0x2
#define TM_RESET 0x4
/* Bit description of TIMER_CTRL register */
#define ENABLE_TM0_INTR 0x1
#define ENABLE_TM1_INTR 0x2
#define ENABLE_TM2_INTR 0x4
#define TIMER_ENABLE_BIT 0x8
#define ENABLE_TIMER64 0x10
#define ENABLE_TIMER64_INT 0x20
/* PMU & PLL */
#define PMU_BASE (IO_VIRT + 0x1000)
#define PMU_MODE 0x00
#define PMU_STAT 0x20
#define PMU_PLL_CTRL 0x28
/* PMU Mode bits */
#define PMU_MODE_SLOW 0x00
#define PMU_MODE_RUN 0x01
#define PMU_MODE_IDLE 0x02
#define PMU_MODE_SLEEP 0x03
#define PMU_MODE_INIT 0x04
#define PMU_MODE_DEEPSLEEP 0x07
#define PMU_MODE_WAKEUP 0x08
/* PMU ... */
#define PLL_2_EN 0x8000
#define PLL_1_EN 0x4000
#define PLL_3_MUTE 0x0080
/* Control bits for PMU/ PLL */
#define PMU_WARMRESET 0x00010000
#define PLL_CTRL_MASK23 0x000080ff
/* LCD Controller */
#define LCD_BASE (IO_VIRT + 0x10000)
#define LCD_CTRL 0x00
#define LCD_STATUS 0x04
#define LCD_STATUS_M 0x08
#define LCD_INTERRUPT 0x0C
#define LCD_DBAR 0x10
#define LCD_DCAR 0x14
#define LCD_TIMING0 0x20
#define LCD_TIMING1 0x24
#define LCD_TIMING2 0x28
#define LCD_TEST 0x40
/* LCD Control Bits */
#define LCD_CTRL_LCD_ENABLE 0x00000001
/* Bits per pixel */
#define LCD_CTRL_LCD_BPP_MASK 0x00000006
#define LCD_CTRL_LCD_4BPP 0x00000000
#define LCD_CTRL_LCD_8BPP 0x00000002
#define LCD_CTRL_LCD_16BPP 0x00000004
#define LCD_CTRL_LCD_BW 0x00000008
#define LCD_CTRL_LCD_TFT 0x00000010
#define LCD_CTRL_BGR 0x00001000
#define LCD_CTRL_LCD_VCOMP 0x00080000
#define LCD_CTRL_LCD_MONO8 0x00200000
#define LCD_CTRL_LCD_PWR 0x00400000
#define LCD_CTRL_LCD_BLE 0x00800000
#define LCD_CTRL_LDBUSEN 0x01000000
/* Palette */
#define LCD_PALETTE_BASE (IO_VIRT + 0x10400)
/* Serial ports */
#define SERIAL0_VIRT (IO_VIRT + 0x20000)
#define SERIAL1_VIRT (IO_VIRT + 0x21000)
#define SERIAL0_BASE SERIAL0_VIRT
#define SERIAL1_BASE SERIAL1_VIRT
#define SERIAL2_BASE SERIAL2_VIRT
#define SERIAL3_BASE SERIAL3_VIRT
/* General defines to pacify gcc */
#define PCIO_BASE (0) /* for inb, outb and friends */
#define PCIO_VIRT PCIO_BASE
#define __ASM_ARCH_HARDWARE_INCMACH_H
#include "boards.h"
#undef __ASM_ARCH_HARDWARE_INCMACH_H
#endif /* __ASM_ARCH_HARDWARE_H */
/*
* linux/include/asm-arm/arch-h720x/io.h
*
* Copyright (C) 2000 Steve Hill (sjhill@cotw.com)
*
* Changelog:
*
* 09-19-2001 JJKIM
* Created from linux/include/asm-arm/arch-l7200/io.h
*
* 03-27-2003 Robert Schwebel <r.schwebel@pengutronix.de>:
* re-unified header files for h720x
*/
#ifndef __ASM_ARM_ARCH_IO_H
#define __ASM_ARM_ARCH_IO_H
#include <asm/arch/hardware.h>
#define IO_SPACE_LIMIT 0xffffffff
#define __io(a) (a)
#define __mem_pci(a) (a)
#endif
/*
* include/asm-arm/arch-h720x/irq.h
*
* Copyright (C) 2000-2002 Jungjun Kim
* (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>
* (C) 2003 Thomas Gleixner <tglx@linutronix.de>
*/
#ifndef __ASM_ARCH_IRQ_H
#define __ASM_ARCH_IRQ_H
extern void __init h720x_init_irq (void);
#endif /* __ASM_ARCH_IRQ_H */
/*
* linux/include/asm-arm/arch-h720x/irqs.h
*
* Copyright (C) 2000 Jungjun Kim
* (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>
* (C) 2003 Thomas Gleixner <tglx@linutronix.de>
*
*/
#ifndef __ASM_ARCH_IRQS_H
#define __ASM_ARCH_IRQS_H
#if defined (CONFIG_CPU_H7201)
#define IRQ_PMU 0 /* 0x000001 */
#define IRQ_DMA 1 /* 0x000002 */
#define IRQ_LCD 2 /* 0x000004 */
#define IRQ_VGA 3 /* 0x000008 */
#define IRQ_PCMCIA1 4 /* 0x000010 */
#define IRQ_PCMCIA2 5 /* 0x000020 */
#define IRQ_AFE 6 /* 0x000040 */
#define IRQ_AIC 7 /* 0x000080 */
#define IRQ_KEYBOARD 8 /* 0x000100 */
#define IRQ_TIMER0 9 /* 0x000200 */
#define IRQ_RTC 10 /* 0x000400 */
#define IRQ_SOUND 11 /* 0x000800 */
#define IRQ_USB 12 /* 0x001000 */
#define IRQ_IrDA 13 /* 0x002000 */
#define IRQ_UART0 14 /* 0x004000 */
#define IRQ_UART1 15 /* 0x008000 */
#define IRQ_SPI 16 /* 0x010000 */
#define IRQ_GPIOA 17 /* 0x020000 */
#define IRQ_GPIOB 18 /* 0x040000 */
#define IRQ_GPIOC 19 /* 0x080000 */
#define IRQ_GPIOD 20 /* 0x100000 */
#define IRQ_CommRX 21 /* 0x200000 */
#define IRQ_CommTX 22 /* 0x400000 */
#define IRQ_Soft 23 /* 0x800000 */
#define NR_GLBL_IRQS 24
#define IRQ_CHAINED_GPIOA(x) (NR_GLBL_IRQS + x)
#define IRQ_CHAINED_GPIOB(x) (IRQ_CHAINED_GPIOA(32) + x)
#define IRQ_CHAINED_GPIOC(x) (IRQ_CHAINED_GPIOB(32) + x)
#define IRQ_CHAINED_GPIOD(x) (IRQ_CHAINED_GPIOC(32) + x)
#define NR_IRQS IRQ_CHAINED_GPIOD(32)
/* Enable mask for multiplexed interrupts */
#define IRQ_ENA_MUX (1<<IRQ_GPIOA) | (1<<IRQ_GPIOB) \
| (1<<IRQ_GPIOC) | (1<<IRQ_GPIOD)
#elif defined (CONFIG_CPU_H7202)
#define IRQ_PMU 0 /* 0x00000001 */
#define IRQ_DMA 1 /* 0x00000002 */
#define IRQ_LCD 2 /* 0x00000004 */
#define IRQ_SOUND 3 /* 0x00000008 */
#define IRQ_I2S 4 /* 0x00000010 */
#define IRQ_USB 5 /* 0x00000020 */
#define IRQ_MMC 6 /* 0x00000040 */
#define IRQ_RTC 7 /* 0x00000080 */
#define IRQ_UART0 8 /* 0x00000100 */
#define IRQ_UART1 9 /* 0x00000200 */
#define IRQ_UART2 10 /* 0x00000400 */
#define IRQ_UART3 11 /* 0x00000800 */
#define IRQ_KBD 12 /* 0x00001000 */
#define IRQ_PS2 13 /* 0x00002000 */
#define IRQ_AIC 14 /* 0x00004000 */
#define IRQ_TIMER0 15 /* 0x00008000 */
#define IRQ_TIMERX 16 /* 0x00010000 */
#define IRQ_WDT 17 /* 0x00020000 */
#define IRQ_CAN0 18 /* 0x00040000 */
#define IRQ_CAN1 19 /* 0x00080000 */
#define IRQ_EXT0 20 /* 0x00100000 */
#define IRQ_EXT1 21 /* 0x00200000 */
#define IRQ_GPIOA 22 /* 0x00400000 */
#define IRQ_GPIOB 23 /* 0x00800000 */
#define IRQ_GPIOC 24 /* 0x01000000 */
#define IRQ_GPIOD 25 /* 0x02000000 */
#define IRQ_GPIOE 26 /* 0x04000000 */
#define IRQ_COMMRX 27 /* 0x08000000 */
#define IRQ_COMMTX 28 /* 0x10000000 */
#define IRQ_SMC 29 /* 0x20000000 */
#define IRQ_Soft 30 /* 0x40000000 */
#define IRQ_RESERVED1 31 /* 0x80000000 */
#define NR_GLBL_IRQS 32
#define NR_TIMERX_IRQS 3
#define IRQ_CHAINED_GPIOA(x) (NR_GLBL_IRQS + x)
#define IRQ_CHAINED_GPIOB(x) (IRQ_CHAINED_GPIOA(32) + x)
#define IRQ_CHAINED_GPIOC(x) (IRQ_CHAINED_GPIOB(32) + x)
#define IRQ_CHAINED_GPIOD(x) (IRQ_CHAINED_GPIOC(32) + x)
#define IRQ_CHAINED_GPIOE(x) (IRQ_CHAINED_GPIOD(32) + x)
#define IRQ_CHAINED_TIMERX(x) (IRQ_CHAINED_GPIOE(32) + x)
#define IRQ_TIMER1 (IRQ_CHAINED_TIMERX(0))
#define IRQ_TIMER2 (IRQ_CHAINED_TIMERX(1))
#define IRQ_TIMER64B (IRQ_CHAINED_TIMERX(2))
#define NR_IRQS (IRQ_CHAINED_TIMERX(NR_TIMERX_IRQS))
/* Enable mask for multiplexed interrupts */
#define IRQ_ENA_MUX (1<<IRQ_TIMERX) | (1<<IRQ_GPIOA) | (1<<IRQ_GPIOB) | \
(1<<IRQ_GPIOC) | (1<<IRQ_GPIOD) | (1<<IRQ_GPIOE) | \
(1<<IRQ_TIMERX)
#else
#error cpu definition mismatch
#endif
/* decode irq number to register number */
#define IRQ_TO_REGNO(irq) ((irq - NR_GLBL_IRQS) >> 5)
#define IRQ_TO_BIT(irq) (1 << ((irq - NR_GLBL_IRQS) % 32))
#endif
/*
* linux/include/asm-arm/arch-h720x/memory.h
*
* Copyright (c) 2000 Jungjun Kim
*
*/
#ifndef __ASM_ARCH_MEMORY_H
#define __ASM_ARCH_MEMORY_H
/*
* Page offset:
* ( 0xc0000000UL )
*/
#define PHYS_OFFSET (0x40000000UL)
/*
* Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an
* address suitable to be passed to set_dma_addr
* bus_to_virt: Used to convert an address for DMA operations
* to an address that the kernel can use.
*
* There is something to do here later !, Mar 2000, Jungjun Kim
*/
#define __virt_to_bus__is_a_macro
#define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) __phys_to_virt(x)
#endif
/*
* linux/include/asm-arm/arch-h720x/param.h
*
* Copyright (C) 2000 Jungjun Kim
*/
#ifndef __ASM_ARCH_PARAM_H
#define __ASM_ARCH_PARAM_H
#endif
/*
* linux/include/asm-arm/arch-h72x/serial.h
*
* Copyright (C) 2003 Thomas Gleixner <tglx@linutronix.de>
* 2003 Robert Schwebel <r.schwebel@pengutronix.de>
*
* Serial port setup for Hynix boards
*
* 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.
*
*/
#ifndef __ASM_ARCH_SERIAL_H
#define __ASM_ARCH_SERIAL_H
#include <asm/arch/irqs.h>
/*
* Standard COM flags
*/
#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
#define RS_TABLE_SIZE
/* Base clock is 3.6864 MHz */
#define BASE_BAUD (115200*2)
#define EXTRA_SERIAL_PORT_DEFNS
/*
* Board dependend defines
*/
#if defined (CONFIG_CPU_H7201)
#define BASE_BAUD_P3C (115200)
#define STD_SERIAL_PORT_DEFNS \
{ \
.baud_base = BASE_BAUD, \
.port = SERIAL0_BASE, \
.iomem_base = (u8*)SERIAL0_BASE, \
.io_type = UPIO_MEM, \
.irq = IRQ_UART0, \
.flags = STD_COM_FLAGS, \
.iomem_reg_shift = 2,\
}, \
{ \
.baud_base = BASE_BAUD, \
.port = SERIAL1_BASE, \
.iomem_base = (u8*)SERIAL1_BASE, \
.io_type = UPIO_MEM, \
.irq = IRQ_UART1, \
.flags = STD_COM_FLAGS, \
.iomem_reg_shift = 2,\
}
#elif defined (CONFIG_CPU_H7202)
#define STD_SERIAL_PORT_DEFNS \
{ \
.baud_base = BASE_BAUD, \
.port = SERIAL0_BASE, \
.iomem_base = (u8*)SERIAL0_BASE, \
.io_type = UPIO_MEM, \
.irq = IRQ_UART0, \
.flags = STD_COM_FLAGS, \
.iomem_reg_shift = 2,\
}, \
{ \
.baud_base = BASE_BAUD, \
.port = SERIAL1_BASE, \
.iomem_base = (u8*)SERIAL1_BASE, \
.io_type = UPIO_MEM, \
.irq = IRQ_UART1, \
.flags = STD_COM_FLAGS, \
.iomem_reg_shift = 2,\
}, \
{ \
.baud_base = BASE_BAUD, \
.port = SERIAL2_BASE, \
.iomem_base = (u8*)SERIAL2_BASE, \
.io_type = UPIO_MEM, \
.irq = IRQ_UART2, \
.flags = STD_COM_FLAGS, \
.iomem_reg_shift = 2,\
}, \
{ \
.baud_base = BASE_BAUD, \
.port = SERIAL3_BASE, \
.iomem_base = (u8*)SERIAL3_BASE, \
.io_type = UPIO_MEM, \
.irq = IRQ_UART3, \
.flags = STD_COM_FLAGS, \
.iomem_reg_shift = 2,\
}
#else
#error machine definition mismatch
#endif
/* __ASM_ARCH_SERIAL_H */
#endif
/*
* linux/arch/arm/mach-h720x/system.h
*
* Copyright (C) 2001-2002 Jungjun Kim, Hynix Semiconductor Inc.
*
* 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.
* linux/include/asm-arm/arch-h720x/system.h
*
*/
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H
#include <asm/hardware.h>
static void arch_idle(void)
{
CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_IDLE;
__asm__ __volatile__(
"mov r0, r0\n\t"
"mov r0, r0");
}
static __inline__ void arch_reset(char mode)
{
CPU_REG (PMU_BASE, PMU_STAT) |= PMU_WARMRESET;
}
#endif
/*
* linux/include/asm-arm/arch-h720x/timex.h
* Copyright (C) 2000 Jungjun Kim, Hynix Semiconductor Inc.
*
* 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.
*/
#ifndef __ASM_ARCH_TIMEX
#define __ASM_ARCH_TIMEX
#define CLOCK_TICK_RATE 3686400
#endif
/*
* linux/include/asm-arm/arch-h720x/uncompress.h
*
* Copyright (C) 2001-2002 Jungjun Kim
*/
#ifndef __ASM_ARCH_UNCOMPRESS_H
#define __ASM_ARCH_UNCOMPRESS_H
#include <asm/arch/hardware.h>
#define LSR 0x14
#define TEMPTY 0x40
static void putstr(const char *s)
{
char c;
volatile unsigned char *p = (volatile unsigned char *)(IO_PHYS+0x20000);
while ( (c = *s++) != '\0') {
/* wait until transmit buffer is empty */
while((p[LSR] & TEMPTY) == 0x0);
/* write next character */
*p = c;
if(c == '\n') {
while((p[LSR] & TEMPTY) == 0x0);
*p = '\r';
}
}
}
/*
* nothing to do
*/
#define arch_decomp_setup()
#define arch_decomp_wdog()
#endif
/*
* linux/include/asm-arm/arch-h720x/vmalloc.h
*/
#ifndef __ARCH_ARM_VMALLOC_H
#define __ARCH_ARM_VMALLOC_H
/*
* Just any arbitrary offset to the start of the vmalloc VM area: the
* current 8MB value just means that there will be a 8MB "hole" after the
* physical memory until the kernel virtual memory starts. That means that
* any out-of-bounds memory accesses will hopefully be caught.
* The vmalloc() routines leaves a hole of 4kB between each vmalloced
* area for the same reason. ;)
*/
#define VMALLOC_OFFSET (8*1024*1024)
#define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
#define VMALLOC_VMADDR(x) ((unsigned long)(x))
#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
#endif
......@@ -162,6 +162,25 @@ typedef struct { unsigned long pgd; } pgd_t;
#define __pgd(x) ((pgd_t) { (x) } )
#define __pgprot(x) ((pgprot_t) { (x) } )
/* default storage key used for all pages */
extern unsigned int default_storage_key;
static inline void
page_set_storage_key(unsigned long addr, unsigned int skey)
{
asm volatile ( "sske %0,%1" : : "d" (skey), "a" (addr) );
}
static inline unsigned int
page_get_storage_key(unsigned long addr)
{
unsigned int skey;
asm volatile ( "iske %0,%1" : "=d" (skey) : "a" (addr), "0" (0) );
return skey;
}
#endif /* !__ASSEMBLY__ */
/* to align the pointer to the (next) page boundary */
......
......@@ -597,17 +597,13 @@ ptep_establish(struct vm_area_struct *vma,
* should therefore only be called if it is not mapped in any
* address space.
*/
#define page_test_and_clear_dirty(page) \
#define page_test_and_clear_dirty(_page) \
({ \
struct page *__page = (page); \
struct page *__page = (_page); \
unsigned long __physpage = __pa((__page-mem_map) << PAGE_SHIFT); \
int __skey; \
asm volatile ("iske %0,%1" : "=d" (__skey) : "a" (__physpage)); \
if (__skey & _PAGE_CHANGED) { \
asm volatile ("sske %0,%1" \
: : "d" (__skey & ~_PAGE_CHANGED), \
"a" (__physpage)); \
} \
int __skey = page_get_storage_key(__physpage); \
if (__skey & _PAGE_CHANGED) \
page_set_storage_key(__physpage, __skey & ~_PAGE_CHANGED);\
(__skey & _PAGE_CHANGED); \
})
......@@ -655,11 +651,10 @@ static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
})
#define SetPageUptodate(_page) \
do { \
struct page *__page = (_page); \
if (!test_and_set_bit(PG_uptodate, &__page->flags)) \
asm volatile ("sske %0,%1" : : "d" (0), \
"a" (__pa((__page-mem_map) << PAGE_SHIFT)));\
do { \
struct page *__page = (_page); \
if (!test_and_set_bit(PG_uptodate, &__page->flags)) \
page_test_and_clear_dirty(_page); \
} while (0)
#ifdef __s390x__
......
......@@ -28,7 +28,7 @@
#include <asm/io.h>
#include <asm/semaphore.h> /* Needed for MUTEX init macros */
#include <linux/pci.h>
#include <asm/dma-mapping.h>
#include <linux/dma-mapping.h>
/* message queue empty */
#define I2O_QUEUE_EMPTY 0xffffffff
......
......@@ -24,8 +24,8 @@ struct percpu_data {
/*
* Use this to get to a cpu's version of the per-cpu object allocated using
* alloc_percpu. If you want to get "this cpu's version", maybe you want
* to use get_cpu_ptr...
* alloc_percpu. Non-atomic access to the current CPU's version should
* probably be combined with get_cpu()/put_cpu().
*/
#define per_cpu_ptr(ptr, cpu) \
({ \
......
......@@ -11,7 +11,9 @@
static int new_loglevel = 10;
static int orig_loglevel;
#ifdef SUSPEND_CONSOLE
static int orig_fgconsole, orig_kmsg;
#endif
int pm_prepare_console(void)
{
......@@ -50,6 +52,7 @@ void pm_restore_console(void)
acquire_console_sem();
set_console(orig_fgconsole);
release_console_sem();
kmsg_redirect = orig_kmsg;
#endif
return;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment