Commit 718b93c1 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://bk.arm.linux.org.uk

into home.transmeta.com:/home/torvalds/v2.5/linux
parents 759ee30e 0763cb79
......@@ -27,7 +27,7 @@ create_params (unsigned long *buffer)
/* Head of the taglist */
tag->hdr.tag = ATAG_CORE;
tag->hdr.size = tag_size(tag_core);
tag->u.core.flags = FLAG_READONLY;
tag->u.core.flags = 1;
tag->u.core.pagesize = PAGE_SIZE;
tag->u.core.rootdev = 0;
......
......@@ -40,6 +40,7 @@ CONFIG_KMOD=y
# CONFIG_ARCH_CLPS7500 is not set
# CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_CO285 is not set
# CONFIG_ARCH_PXA is not set
# CONFIG_ARCH_EBSA110 is not set
# CONFIG_ARCH_CAMELOT is not set
# CONFIG_ARCH_FOOTBRIDGE is not set
......@@ -109,6 +110,12 @@ CONFIG_ARCH_SHARK=y
# CONFIG_SA1100_USB_CHAR is not set
# CONFIG_H3600_SLEEVE is not set
#
# Intel PXA250/210 Implementations
#
# CONFIG_ARCH_LUBBOCK is not set
# CONFIG_ARCH_PXA_IDP is not set
#
# CLPS711X/EP721X Implementations
#
......@@ -120,6 +127,19 @@ CONFIG_ARCH_SHARK=y
# CONFIG_ARCH_FORTUNET is not set
# CONFIG_ARCH_EP7211 is not set
# CONFIG_ARCH_EP7212 is not set
#
# IOP310 Implementation Options
#
# CONFIG_ARCH_IQ80310 is not set
#
# IOP310 Chipset Features
#
# CONFIG_IOP310_AAU is not set
# CONFIG_IOP310_DMA is not set
# CONFIG_IOP310_MU is not set
# CONFIG_IOP310_PMON is not set
# CONFIG_ARCH_ACORN is not set
# CONFIG_FOOTBRIDGE is not set
# CONFIG_FOOTBRIDGE_HOST is not set
......@@ -159,6 +179,9 @@ CONFIG_PCI_HOST_VIA82C505=y
CONFIG_ISA=y
CONFIG_ISA_DMA=y
# CONFIG_FIQ is not set
# CONFIG_ZBOOT_ROM is not set
CONFIG_ZBOOT_ROM_TEXT=0
CONFIG_ZBOOT_ROM_BSS=0
# CONFIG_PCI_NAMES is not set
# CONFIG_HOTPLUG is not set
# CONFIG_PCMCIA is not set
......@@ -177,10 +200,11 @@ CONFIG_BINFMT_ELF=y
# CONFIG_PREEMPT is not set
# CONFIG_APM is not set
# CONFIG_ARTHUR is not set
CONFIG_CMDLINE=""
CONFIG_LEDS=y
CONFIG_LEDS_TIMER=y
# CONFIG_LEDS_CPU is not set
# CONFIG_ALIGNMENT_TRAP is not set
CONFIG_ALIGNMENT_TRAP=y
#
# Parallel port support
......@@ -200,6 +224,11 @@ CONFIG_PARPORT_PC_CML1=y
# CONFIG_PARPORT_OTHER is not set
# CONFIG_PARPORT_1284 is not set
#
# Memory Technology Devices (MTD)
#
# CONFIG_MTD is not set
#
# Plug and Play configuration
#
......@@ -217,6 +246,7 @@ CONFIG_PARPORT_PC_CML1=y
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_CISS_SCSI_TAPE is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_NBD is not set
CONFIG_BLK_DEV_RAM=y
......@@ -254,7 +284,6 @@ CONFIG_INET=y
# CONFIG_INET_ECN is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_IPV6 is not set
# CONFIG_KHTTPD is not set
# CONFIG_ATM is not set
# CONFIG_VLAN_8021Q is not set
......@@ -263,6 +292,11 @@ CONFIG_INET=y
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
#
# Appletalk devices
#
# CONFIG_DEV_APPLETALK is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_X25 is not set
......@@ -378,7 +412,7 @@ CONFIG_CS89x0=y
# CONFIG_WAN is not set
#
# "Tulip" family network device support
# Tulip family network device support
#
# CONFIG_NET_TULIP is not set
......@@ -393,38 +427,66 @@ CONFIG_CS89x0=y
# CONFIG_IRDA is not set
#
# ATA/IDE/MFM/RLL support
# ATA/ATAPI/MFM/RLL support
#
CONFIG_IDE=y
#
# ATA and ATAPI Block devices
#
CONFIG_BLK_DEV_IDE=y
#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_HD_IDE is not set
# CONFIG_BLK_DEV_HD is not set
CONFIG_BLK_DEV_IDEDISK=y
# CONFIG_IDEDISK_MULTI_MODE is not set
# CONFIG_IDEDISK_STROKE is not set
# CONFIG_BLK_DEV_IDECS is not set
CONFIG_ATAPI=y
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
CONFIG_BLK_DEV_IDEFLOPPY=y
# CONFIG_BLK_DEV_IDESCSI is not set
# CONFIG_BLK_DEV_IDECS is not set
#
# IDE chipset support
# ATA host controller support
#
# CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set
# CONFIG_BLK_DEV_RZ1000 is not set
#
# PCI host controller support
#
# CONFIG_BLK_DEV_OFFBOARD is not set
# CONFIG_IDEPCI_SHARE_IRQ is not set
# CONFIG_BLK_DEV_IDEDMA_PCI is not set
# CONFIG_IDEDMA_PCI_AUTO is not set
# CONFIG_IDEDMA_ONLYDISK is not set
# CONFIG_BLK_DEV_IDEDMA is not set
# CONFIG_BLK_DEV_IDE_TCQ is not set
# CONFIG_BLK_DEV_IDE_TCQ_DEFAULT is not set
# CONFIG_IDEDMA_NEW_DRIVE_LISTINGS is not set
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_AEC6280_BURST is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_WDC_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_CY82C693 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_HPT34X is not set
# CONFIG_HPT34X_AUTODMA is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_PIIX is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_PDC202XX is not set
# CONFIG_PDC202XX_BURST is not set
# CONFIG_PDC202XX_FORCE is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIS5513 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_BLK_DEV_SL82C105 is not set
# CONFIG_IDE_CHIPSETS is not set
# CONFIG_IDEDMA_IVB is not set
# CONFIG_IDEDMA_AUTO is not set
# CONFIG_BLK_DEV_ATARAID is not set
# CONFIG_BLK_DEV_ATARAID_PDC is not set
......@@ -451,6 +513,7 @@ CONFIG_CHR_DEV_SG=m
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
# CONFIG_SCSI_MULTI_LUN is not set
# CONFIG_SCSI_REPORT_LUNS is not set
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
......@@ -462,7 +525,6 @@ CONFIG_CHR_DEV_SG=m
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AHA152X is not set
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AHA1740 is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_DPT_I2O is not set
......@@ -522,42 +584,60 @@ CONFIG_CHR_DEV_SG=m
#
# ISDN subsystem
#
# CONFIG_ISDN is not set
# CONFIG_ISDN_BOOL is not set
#
# Input device support
#
# CONFIG_INPUT is not set
#
# Userland interfaces
#
# CONFIG_INPUT_KEYBDEV is not set
# CONFIG_INPUT_MOUSEDEV is not set
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_TSDEV is not set
# CONFIG_INPUT_TSLIBDEV is not set
# CONFIG_INPUT_EVDEV is not set
# CONFIG_INPUT_EVBUG is not set
# CONFIG_INPUT_UINPUT is not set
#
# Input I/O drivers
#
# CONFIG_GAMEPORT is not set
CONFIG_SOUND_GAMEPORT=y
# CONFIG_GAMEPORT_NS558 is not set
# CONFIG_GAMEPORT_L4 is not set
# CONFIG_INPUT_EMU10K1 is not set
# CONFIG_GAMEPORT_PCIGAME is not set
# CONFIG_GAMEPORT_EMU10K1 is not set
# CONFIG_GAMEPORT_VORTEX is not set
# CONFIG_GAMEPORT_FM801 is not set
# CONFIG_GAMEPORT_CS461x is not set
# CONFIG_SERIO is not set
# CONFIG_SERIO_I8042 is not set
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PARKBD is not set
#
# Input Device Drivers
#
#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_SERIAL_CONSOLE=y
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
#
# Serial drivers
#
# CONFIG_SERIAL_8250 is not set
# CONFIG_SERIAL_8250_CONSOLE is not set
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_SERIAL_8250_CS is not set
# CONFIG_SERIAL_8250_EXTENDED is not set
# CONFIG_SERIAL_8250_MANY_PORTS is not set
# CONFIG_SERIAL_8250_SHARE_IRQ is not set
......@@ -568,10 +648,6 @@ CONFIG_SERIAL_CONSOLE=y
#
# Non-8250 serial port support
#
#
# ARM Serial drivers
#
# CONFIG_ATOMWIDE_SERIAL is not set
# CONFIG_DUALSP_SERIAL is not set
# CONFIG_SERIAL_ANAKIN is not set
......@@ -580,6 +656,7 @@ CONFIG_SERIAL_CONSOLE=y
# CONFIG_SERIAL_AMBA_CONSOLE is not set
# CONFIG_SERIAL_CLPS711X is not set
# CONFIG_SERIAL_CLPS711X_CONSOLE is not set
# CONFIG_SERIAL_CLPS711X_OLD_NAME is not set
# CONFIG_SERIAL_21285 is not set
# CONFIG_SERIAL_21285_OLD is not set
# CONFIG_SERIAL_21285_CONSOLE is not set
......@@ -587,6 +664,8 @@ CONFIG_SERIAL_CONSOLE=y
# CONFIG_SERIAL_UART00_CONSOLE is not set
# CONFIG_SERIAL_SA1100 is not set
# CONFIG_SERIAL_SA1100_CONSOLE is not set
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
CONFIG_PRINTER=m
......@@ -615,17 +694,13 @@ CONFIG_PRINTER=m
# Mice
#
# CONFIG_BUSMOUSE is not set
CONFIG_MOUSE=y
CONFIG_PSMOUSE=y
# CONFIG_82C710_MOUSE is not set
# CONFIG_PC110_PAD is not set
# CONFIG_QIC02_TAPE is not set
#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_INTEL_RNG is not set
# CONFIG_NVRAM is not set
CONFIG_RTC=y
# CONFIG_DTLK is not set
......@@ -638,6 +713,7 @@ CONFIG_RTC=y
# CONFIG_FTAPE is not set
# CONFIG_AGP is not set
# CONFIG_DRM is not set
# CONFIG_RAW_DRIVER is not set
#
# Multimedia devices
......@@ -648,6 +724,8 @@ CONFIG_RTC=y
# File systems
#
# CONFIG_QUOTA is not set
# CONFIG_QFMT_V1 is not set
# CONFIG_QFMT_V2 is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_AUTOFS4_FS is not set
# CONFIG_REISERFS_FS is not set
......@@ -711,6 +789,7 @@ CONFIG_NFS_FS=y
# CONFIG_NFSD_TCP is not set
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
# CONFIG_EXPORTFS is not set
# CONFIG_SMB_FS is not set
# CONFIG_NCP_FS is not set
# CONFIG_NCPFS_PACKET_SIGNING is not set
......@@ -741,6 +820,7 @@ CONFIG_MSDOS_PARTITION=y
# CONFIG_SGI_PARTITION is not set
# CONFIG_ULTRIX_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
# CONFIG_EFI_PARTITION is not set
# CONFIG_SMB_NLS is not set
CONFIG_NLS=y
......@@ -769,6 +849,7 @@ CONFIG_NLS_CODEPAGE_850=y
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not set
......@@ -788,8 +869,6 @@ CONFIG_NLS_ISO8859_1=y
#
# Console drivers
#
CONFIG_PC_KEYB=y
CONFIG_PC_KEYMAP=y
# CONFIG_VGA_CONSOLE is not set
#
......@@ -797,7 +876,6 @@ CONFIG_PC_KEYMAP=y
#
CONFIG_FB=y
CONFIG_DUMMY_CONSOLE=y
# CONFIG_FB_RIVA is not set
# CONFIG_FB_CLGEN is not set
# CONFIG_FB_PM2 is not set
# CONFIG_FB_PM3 is not set
......@@ -806,6 +884,7 @@ CONFIG_DUMMY_CONSOLE=y
# CONFIG_FB_CLPS711X is not set
# CONFIG_FB_SA1100 is not set
CONFIG_FB_CYBER2000=y
# CONFIG_FB_RIVA is not set
# CONFIG_FB_MATROX is not set
# CONFIG_FB_ATY is not set
# CONFIG_FB_RADEON is not set
......@@ -814,6 +893,8 @@ CONFIG_FB_CYBER2000=y
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_TRIDENT is not set
# CONFIG_FB_PM3 is not set
# CONFIG_FB_VIRTUAL is not set
# CONFIG_FBCON_ADVANCED is not set
CONFIG_FBCON_CFB8=y
......@@ -903,6 +984,8 @@ CONFIG_SOUND_SB=m
# Console Switches
#
# CONFIG_SWITCHES is not set
# CONFIG_SWITCHES_SA1100 is not set
# CONFIG_SWITCHES_UCB1X00 is not set
#
# USB support
......@@ -931,6 +1014,11 @@ CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_DC21285_PORT is not set
# CONFIG_DEBUG_CLPS711X_UART2 is not set
#
# Security options
#
CONFIG_SECURITY_CAPABILITIES=y
#
# Library routines
#
......
......@@ -17,7 +17,6 @@
#include <linux/personality.h>
#include <linux/stddef.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/init.h>
#include <asm/ptrace.h>
......@@ -64,13 +63,13 @@ static void arthur_lcall7(int nr, struct pt_regs *regs)
}
static struct exec_domain arthur_exec_domain = {
"Arthur", /* name */
arthur_lcall7,
PER_RISCOS, PER_RISCOS,
arthur_to_linux_signals,
linux_to_arthur_signals,
THIS_MODULE,
NULL /* Nothing after this in the list. */
.name = "Arthur",
.handler = arthur_lcall7,
.pers_low = PER_RISCOS,
.pers_high = PER_RISCOS,
.signal_map = arthur_to_linux_signals,
.signal_invmap = linux_to_arthur_signals,
.module = THIS_MODULE,
};
/*
......@@ -78,12 +77,12 @@ static struct exec_domain arthur_exec_domain = {
* processes are using it.
*/
int __init arthur_init(void)
static int __init arthur_init(void)
{
return register_exec_domain(&arthur_exec_domain);
}
void __exit arthur_exit(void)
static void __exit arthur_exit(void)
{
unregister_exec_domain(&arthur_exec_domain);
}
......
......@@ -20,7 +20,7 @@ static int
via82c505_read_config(struct pci_bus *bus, unsigned int devfn, int where,
int size, u32 *value)
{
outl(CONFIG_CMD(dev,where),0xCF8);
outl(CONFIG_CMD(bus,devfn,where),0xCF8);
switch (size) {
case 1:
*value=inb(0xCFC + (where&3));
......@@ -36,7 +36,7 @@ via82c505_read_config(struct pci_bus *bus, unsigned int devfn, int where,
}
static int
via82c505_write_config(struct pci_bus *bus, unsigned int devfn, int where
via82c505_write_config(struct pci_bus *bus, unsigned int devfn, int where,
int size, u32 value)
{
outl(CONFIG_CMD(bus,devfn,where),0xCF8);
......@@ -61,8 +61,6 @@ static struct pci_ops via82c505_ops = {
void __init via82c505_preinit(void *sysdata)
{
struct pci_bus *bus;
printk(KERN_DEBUG "PCI: VIA 82c505\n");
if (!request_region(0xA8,2,"via config")) {
printk(KERN_WARNING"VIA 82c505: Unable to request region 0xA8\n");
......
......@@ -305,7 +305,7 @@ static struct cpufreq_driver sa1110_driver = {
.verify = sa11x0_verify_speed,
.setpolicy = sa1110_setspeed,
.policy = &sa1110_policy,
.cpu_min_freq[0] = 59000,
.cpu_min_freq = { 59000, },
};
static int __init sa1110_clk_init(void)
......
......@@ -21,5 +21,5 @@ extern void sa1110_mb_disable(void);
struct cpufreq_policy;
extern unsigned int sa11x0_freq_to_ppcr(unsigned int khz);
extern void sa11x0_verify_speed(struct cpufreq_policy *policy);
extern int sa11x0_verify_speed(struct cpufreq_policy *policy);
extern unsigned int sa11x0_getspeed(void);
......@@ -31,6 +31,14 @@
#define DPRINTK(...) do { } while (0)
#endif
//#define STATS
#ifdef STATS
#define DO_STATS(X) do { X ; } while (0)
#else
#define DO_STATS(X) do { } while (0)
#endif
/* ************************************************** */
struct safe_buffer {
struct list_head node;
......@@ -50,10 +58,24 @@ LIST_HEAD(safe_buffers);
#define SIZE_SMALL 1024
#define SIZE_LARGE (16*1024)
#define SIZE_LARGE (4*1024)
static struct pci_pool *small_buffer_pool, *large_buffer_pool;
#ifdef STATS
static unsigned long sbp_allocs __initdata = 0;
static unsigned long lbp_allocs __initdata = 0;
static unsigned long total_allocs __initdata= 0;
static void print_alloc_stats(void)
{
printk(KERN_INFO
"sa1111_pcibuf: sbp: %lu, lbp: %lu, other: %lu, total: %lu\n",
sbp_allocs, lbp_allocs,
total_allocs - sbp_allocs - lbp_allocs, total_allocs);
}
#endif
static int __init
create_safe_buffer_pools(void)
{
......@@ -81,6 +103,10 @@ create_safe_buffer_pools(void)
return -1;
}
printk(KERN_INFO
"sa1111_pcibuf: buffer sizes: small=%u, large=%u\n",
SIZE_SMALL, SIZE_LARGE);
return 0;
}
......@@ -108,6 +134,8 @@ alloc_safe_buffer(struct pci_dev *hwdev, void *ptr, size_t size, int direction)
DPRINTK("%s(ptr=%p, size=%d, direction=%d)\n",
__func__, ptr, size, direction);
DO_STATS ( total_allocs++ );
buf = kmalloc(sizeof(struct safe_buffer), GFP_ATOMIC);
if (buf == 0) {
printk(KERN_WARNING "%s: kmalloc failed\n", __func__);
......@@ -117,12 +145,14 @@ alloc_safe_buffer(struct pci_dev *hwdev, void *ptr, size_t size, int direction)
if (size <= SIZE_SMALL) {
pool = small_buffer_pool;
safe = pci_pool_alloc(pool, GFP_ATOMIC, &safe_dma_addr);
DO_STATS ( sbp_allocs++ );
} else if (size <= SIZE_LARGE) {
pool = large_buffer_pool;
safe = pci_pool_alloc(pool, GFP_ATOMIC, &safe_dma_addr);
DO_STATS ( lbp_allocs++ );
} else {
printk(KERN_DEBUG
"sa111_pcibuf: resorting to pci_alloc_consistent\n");
pool = 0;
safe = pci_alloc_consistent(SA1111_FAKE_PCIDEV, size,
&safe_dma_addr);
......@@ -136,6 +166,11 @@ alloc_safe_buffer(struct pci_dev *hwdev, void *ptr, size_t size, int direction)
return 0;
}
#ifdef STATS
if (total_allocs % 1000 == 0)
print_alloc_stats();
#endif
BUG_ON(sa1111_check_dma_bug(safe_dma_addr)); // paranoia
buf->ptr = ptr;
......@@ -204,37 +239,39 @@ dma_range_is_safe(dma_addr_t addr, size_t size)
return ((physaddr + size - 1) < (1<<20));
}
/*
* see if a buffer address is in an 'unsafe' range. if it is
* allocate a 'safe' buffer and copy the unsafe buffer into it.
* substitute the safe buffer for the unsafe one.
* (basically move the buffer from an unsafe area to a safe one)
*/
dma_addr_t
sa1111_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction)
{
unsigned long flags;
dma_addr_t dma_addr;
/* ************************************************** */
DPRINTK("%s(hwdev=%p,ptr=%p,size=%d,dir=%x)\n",
__func__, hwdev, ptr, size, direction);
#ifdef STATS
static unsigned long map_op_count __initdata = 0;
static unsigned long bounce_count __initdata = 0;
BUG_ON(hwdev != SA1111_FAKE_PCIDEV);
BUG_ON(direction == PCI_DMA_NONE);
static void print_map_stats(void)
{
printk(KERN_INFO
"sa1111_pcibuf: map_op_count=%lu, bounce_count=%lu\n",
map_op_count, bounce_count);
}
#endif
local_irq_save(flags);
static dma_addr_t
map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction)
{
dma_addr_t dma_addr;
DO_STATS ( map_op_count++ );
dma_addr = virt_to_bus(ptr);
if (!dma_range_is_safe(dma_addr, size)) {
struct safe_buffer *buf;
DO_STATS ( bounce_count++ ) ;
buf = alloc_safe_buffer(hwdev, ptr, size, direction);
if (buf == 0) {
printk(KERN_ERR
"%s: unable to map unsafe buffer %p!\n",
__func__, ptr);
local_irq_restore(flags);
return 0;
}
......@@ -256,33 +293,22 @@ sa1111_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction)
consistent_sync(ptr, size, direction);
}
local_irq_restore(flags);
#ifdef STATS
if (map_op_count % 1000 == 0)
print_map_stats();
#endif
return dma_addr;
}
/*
* see if a mapped address was really a "safe" buffer and if so, copy
* the data from the safe buffer back to the unsafe buffer and free up
* the safe buffer. (basically return things back to the way they
* should be)
*/
void
sa1111_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
size_t size, int direction)
static void
unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
size_t size, int direction)
{
unsigned long flags;
struct safe_buffer *buf;
DPRINTK("%s(hwdev=%p,ptr=%p,size=%d,dir=%x)\n",
__func__, hwdev, (void *) dma_addr, size, direction);
BUG_ON(hwdev != SA1111_FAKE_PCIDEV);
BUG_ON(direction == PCI_DMA_NONE);
local_irq_save(flags);
buf = find_safe_buffer(dma_addr);
if (buf) {
BUG_ON(buf->size != size);
BUG_ON(buf->direction != direction);
......@@ -292,6 +318,9 @@ sa1111_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
buf->ptr, (void *) virt_to_bus(buf->ptr),
buf->safe, (void *) buf->safe_dma_addr);
DO_STATS ( bounce_count++ );
if ((direction == PCI_DMA_FROMDEVICE) ||
(direction == PCI_DMA_BIDIRECTIONAL)) {
DPRINTK("%s: copy back from safe %p, to unsafe %p size %d\n",
......@@ -300,39 +329,16 @@ sa1111_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
}
free_safe_buffer(buf);
}
local_irq_restore(flags);
}
int
sa1111_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
int nents, int direction)
{
BUG(); /* Not implemented. */
}
void
sa1111_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents,
int direction)
{
BUG(); /* Not implemented. */
}
void
sa1111_dma_sync_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
static void
sync_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
size_t size, int direction)
{
unsigned long flags;
struct safe_buffer *buf;
DPRINTK("%s(hwdev=%p,ptr=%p,size=%d,dir=%x)\n",
__func__, hwdev, (void *) dma_addr, size, direction);
BUG_ON(hwdev != SA1111_FAKE_PCIDEV);
local_irq_save(flags);
buf = find_safe_buffer(dma_addr);
if (buf) {
BUG_ON(buf->size != size);
BUG_ON(buf->direction != direction);
......@@ -342,6 +348,8 @@ sa1111_dma_sync_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
buf->ptr, (void *) virt_to_bus(buf->ptr),
buf->safe, (void *) buf->safe_dma_addr);
DO_STATS ( bounce_count++ );
switch (direction) {
case PCI_DMA_FROMDEVICE:
DPRINTK("%s: copy back from safe %p, to unsafe %p size %d\n",
......@@ -362,15 +370,159 @@ sa1111_dma_sync_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
} else {
consistent_sync(bus_to_virt(dma_addr), size, direction);
}
}
/* ************************************************** */
/*
* see if a buffer address is in an 'unsafe' range. if it is
* allocate a 'safe' buffer and copy the unsafe buffer into it.
* substitute the safe buffer for the unsafe one.
* (basically move the buffer from an unsafe area to a safe one)
*/
dma_addr_t
sa1111_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction)
{
unsigned long flags;
dma_addr_t dma_addr;
DPRINTK("%s(hwdev=%p,ptr=%p,size=%d,dir=%x)\n",
__func__, hwdev, ptr, size, direction);
BUG_ON(hwdev != SA1111_FAKE_PCIDEV);
BUG_ON(direction == PCI_DMA_NONE);
local_irq_save(flags);
dma_addr = map_single(hwdev, ptr, size, direction);
local_irq_restore(flags);
return dma_addr;
}
/*
* see if a mapped address was really a "safe" buffer and if so, copy
* the data from the safe buffer back to the unsafe buffer and free up
* the safe buffer. (basically return things back to the way they
* should be)
*/
void
sa1111_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
size_t size, int direction)
{
unsigned long flags;
DPRINTK("%s(hwdev=%p,ptr=%p,size=%d,dir=%x)\n",
__func__, hwdev, (void *) dma_addr, size, direction);
BUG_ON(hwdev != SA1111_FAKE_PCIDEV);
BUG_ON(direction == PCI_DMA_NONE);
local_irq_save(flags);
unmap_single(hwdev, dma_addr, size, direction);
local_irq_restore(flags);
}
int
sa1111_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
int nents, int direction)
{
unsigned long flags;
int i;
DPRINTK("%s(hwdev=%p,sg=%p,nents=%d,dir=%x)\n",
__func__, hwdev, sg, nents, direction);
BUG_ON(hwdev != SA1111_FAKE_PCIDEV);
BUG_ON(direction == PCI_DMA_NONE);
local_irq_save(flags);
for (i = 0; i < nents; i++, sg++) {
struct page *page = sg->page;
unsigned int offset = sg->offset;
unsigned int length = sg->length;
void *ptr = page_address(page) + offset;
sg->dma_address =
map_single(hwdev, ptr, length, direction);
}
local_irq_restore(flags);
return nents;
}
void
sa1111_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents,
int direction)
{
unsigned long flags;
int i;
DPRINTK("%s(hwdev=%p,sg=%p,nents=%d,dir=%x)\n",
__func__, hwdev, sg, nents, direction);
BUG_ON(hwdev != SA1111_FAKE_PCIDEV);
BUG_ON(direction == PCI_DMA_NONE);
local_irq_save(flags);
for (i = 0; i < nents; i++, sg++) {
dma_addr_t dma_addr = sg->dma_address;
unsigned int length = sg->length;
unmap_single(hwdev, dma_addr, length, direction);
}
local_irq_restore(flags);
}
void
sa1111_dma_sync_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
size_t size, int direction)
{
unsigned long flags;
DPRINTK("%s(hwdev=%p,ptr=%p,size=%d,dir=%x)\n",
__func__, hwdev, (void *) dma_addr, size, direction);
BUG_ON(hwdev != SA1111_FAKE_PCIDEV);
local_irq_save(flags);
sync_single(hwdev, dma_addr, size, direction);
local_irq_restore(flags);
}
void
sa1111_dma_sync_sg(struct pci_dev *hwdev, struct scatterlist *sg,
int nelems, int direction)
int nents, int direction)
{
BUG(); /* Not implemented. */
unsigned long flags;
int i;
DPRINTK("%s(hwdev=%p,sg=%p,nents=%d,dir=%x)\n",
__func__, hwdev, sg, nents, direction);
BUG_ON(hwdev != SA1111_FAKE_PCIDEV);
BUG_ON(direction == PCI_DMA_NONE);
local_irq_save(flags);
for (i = 0; i < nents; i++, sg++) {
dma_addr_t dma_addr = sg->dma_address;
unsigned int length = sg->length;
sync_single(hwdev, dma_addr, length, direction);
}
local_irq_restore(flags);
}
EXPORT_SYMBOL(sa1111_map_single);
......@@ -399,6 +551,11 @@ static void __exit sa1111_pcibuf_exit(void)
{
BUG_ON(!list_empty(&safe_buffers));
#ifdef STATS
print_alloc_stats();
print_map_stats();
#endif
destroy_safe_buffer_pools();
}
module_exit(sa1111_pcibuf_exit);
......
......@@ -2,7 +2,6 @@
# Makefile for the acorn character device drivers.
#
# All the objects that export symbols.
obj-arc := keyb_arc.o defkeymap-acorn.o
obj-$(CONFIG_ARCH_ACORN) += i2c.o pcf8583.o
......
......@@ -137,10 +137,10 @@
#include <linux/signal.h>
#include <linux/errno.h>
#include <linux/proc_fs.h>
#include <linux/stat.h>
#include <linux/ioport.h>
#include <linux/blk.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <asm/bitops.h>
......
/*
* ARXE SCSI card driver
*
* Copyright (C) 1997-2000 Russell King
*
* Changes to support ARXE 16-bit SCSI card by Stefan Hanske
*/
#ifndef ARXE_SCSI_H
#define ARXE_SCSI_H
#define MANU_ARXE 0x0041
#define PROD_ARXE_SCSI 0x00be
extern int arxescsi_detect (Scsi_Host_Template *);
extern int arxescsi_release (struct Scsi_Host *);
extern const char *arxescsi_info (struct Scsi_Host *);
extern int arxescsi_proc_info (char *buffer, char **start, off_t offset,
int length, int hostno, int inout);
#ifndef NULL
#define NULL ((void *)0)
#endif
#ifndef CAN_QUEUE
/*
* Default queue size
*/
#define CAN_QUEUE 1
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 1
#endif
#ifndef SCSI_ID
/*
* Default SCSI host ID
*/
#define SCSI_ID 7
#endif
#include <scsi/scsicam.h>
#include "fas216.h"
#define ARXEScsi { \
proc_info: arxescsi_proc_info, \
name: "ARXE SCSI card", \
detect: arxescsi_detect, \
release: arxescsi_release, \
info: arxescsi_info, \
can_queue: CAN_QUEUE, \
this_id: SCSI_ID, \
sg_tablesize: SG_ALL, \
cmd_per_lun: CMD_PER_LUN, \
use_clustering: DISABLE_CLUSTERING, \
command: fas216_command, \
queuecommand: fas216_queue_command, \
eh_host_reset_handler: fas216_eh_host_reset, \
eh_bus_reset_handler: fas216_eh_bus_reset, \
eh_device_reset_handler: fas216_eh_device_reset, \
eh_abort_handler: fas216_eh_abort, \
}
#ifndef HOSTS_C
typedef struct {
FAS216_Info info;
/* other info... */
unsigned int cstatus; /* card status register */
unsigned int dmaarea; /* Pseudo DMA area */
} ARXEScsi_Info;
#define CSTATUS_IRQ (1 << 0)
#define CSTATUS_DRQ (1 << 0)
#endif /* HOSTS_C */
#endif /* ARXE_SCSI_H */
......@@ -23,10 +23,8 @@
#include <linux/ioport.h>
#include <linux/sched.h>
#include <linux/proc_fs.h>
#include <linux/unistd.h>
#include <linux/stat.h>
#include <linux/delay.h>
#include <linux/pci.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <asm/dma.h>
......
......@@ -29,10 +29,8 @@
#include <linux/ioport.h>
#include <linux/sched.h>
#include <linux/proc_fs.h>
#include <linux/unistd.h>
#include <linux/stat.h>
#include <linux/delay.h>
#include <linux/pci.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <asm/io.h>
......
......@@ -44,8 +44,6 @@
#include <linux/ioport.h>
#include <linux/sched.h>
#include <linux/proc_fs.h>
#include <linux/unistd.h>
#include <linux/stat.h>
#include <linux/delay.h>
#include <linux/init.h>
......
......@@ -14,10 +14,8 @@
#include <linux/ioport.h>
#include <linux/sched.h>
#include <linux/proc_fs.h>
#include <linux/unistd.h>
#include <linux/stat.h>
#include <linux/delay.h>
#include <linux/pci.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <asm/dma.h>
......
......@@ -6,13 +6,14 @@
*/
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <asm/hardware.h>
#include <asm/mach-types.h>
#include <asm/irq.h>
#include <asm/signal.h>
#include <asm/arch/assabet.h>
#include "sa1100_generic.h"
......
......@@ -31,40 +31,41 @@
*
* PCM Vcc:
*
* PCM Vcc on BadgePAD 4 can be jumpered for 3.3V (short pins 1 and 3
* on JP6) or 5V (short pins 3 and 5 on JP6). N.B., 5V supply rail
* is enabled by the SA-1110's BADGE4_GPIO_PCMEN5V (GPIO 24).
* PCM Vcc on BadgePAD 4 can be jumpered for 3v3 (short pins 1 and 3
* on JP6) or 5v0 (short pins 3 and 5 on JP6).
*
* PCM Vpp:
*
* PCM Vpp on BadgePAD 4 can be jumpered for 12V (short pins 2 and 4
* on JP6) or tied to PCM Vcc (short pins 4 and 6 on JP6). N.B., 12V
* operation requires that the power supply actually supply 12V.
* PCM Vpp on BadgePAD 4 can be jumpered for 12v0 (short pins 4 and 6
* on JP6) or tied to PCM Vcc (short pins 2 and 4 on JP6). N.B.,
* 12v0 operation requires that the power supply actually supply 12v0
* via pin 7 of JP7.
*
* CF Vcc:
*
* CF Vcc on BadgePAD 4 can be jumpered either for 3.3V (short pins 1
* and 2 on JP10) or 5V (short pins 2 and 3 on JP10). The note above
* about the 5V supply rail applies.
* CF Vcc on BadgePAD 4 can be jumpered either for 3v3 (short pins 1
* and 2 on JP10) or 5v0 (short pins 2 and 3 on JP10).
*
* There's no way programmatically to determine how a given board is
* jumpered. This code assumes a default jumpering: 5V PCM Vcc (pins
* 3 and 5 shorted) and PCM Vpp = PCM Vcc (pins 4 and 6 shorted) and
* no jumpering for CF Vcc. If this isn't correct, Override these
* defaults with a pcmv setup argument: pcmv=<pcm vcc>,<pcm vpp>,<cf
* vcc>. E.g. pcmv=33,120,50 indicates 3.3V PCM Vcc, 12.0V PCM Vpp,
* and 5.0V CF Vcc.
* Unfortunately there's no way programmatically to determine how a
* given board is jumpered. This code assumes a default jumpering
* as described below.
*
* If the defaults aren't correct, you may override them with a pcmv
* setup argument: pcmv=<pcm vcc>,<pcm vpp>,<cf vcc>. The units are
* tenths of volts; e.g. pcmv=33,120,50 indicates 3v3 PCM Vcc, 12v0
* PCM Vpp, and 5v0 CF Vcc.
*
*/
static int badge4_pcmvcc = 50;
static int badge4_pcmvpp = 50;
static int badge4_cfvcc = 33;
static int badge4_pcmvcc = 50; /* pins 3 and 5 jumpered on JP6 */
static int badge4_pcmvpp = 50; /* pins 2 and 4 jumpered on JP6 */
static int badge4_cfvcc = 33; /* pins 1 and 2 jumpered on JP10 */
static int badge4_pcmcia_init(struct pcmcia_init *init)
{
printk(KERN_INFO __FUNCTION__
": badge4_pcmvcc=%d, badge4_pcmvpp=%d, badge4_cfvcc=%d\n",
printk(KERN_INFO
"%s: badge4_pcmvcc=%d, badge4_pcmvpp=%d, badge4_cfvcc=%d\n",
__FUNCTION__,
badge4_pcmvcc, badge4_pcmvpp, badge4_cfvcc);
return sa1111_pcmcia_init(init);
......@@ -74,7 +75,7 @@ static int badge4_pcmcia_shutdown(void)
{
int rc = sa1111_pcmcia_shutdown();
/* be sure to disable 5V use */
/* be sure to disable 5v0 use */
badge4_set_5V(BADGE4_5V_PCMCIA_SOCK0, 0);
badge4_set_5V(BADGE4_5V_PCMCIA_SOCK1, 0);
......@@ -105,7 +106,8 @@ badge4_pcmcia_configure_socket(const struct pcmcia_configure *conf)
(conf->vcc != badge4_pcmvcc)) {
complain_about_jumpering(__FUNCTION__, "pcmvcc",
badge4_pcmvcc, conf->vcc);
return -1;
// Apply power regardless of the jumpering.
// return -1;
}
if ((conf->vpp != 0) &&
(conf->vpp != badge4_pcmvpp)) {
......@@ -156,7 +158,7 @@ static struct pcmcia_low_level badge4_pcmcia_ops = {
.socket_suspend = sa1111_pcmcia_socket_suspend,
};
int __init pcmcia_badge4_init(void)
int pcmcia_badge4_init(void)
{
int ret = -ENODEV;
......@@ -166,7 +168,7 @@ int __init pcmcia_badge4_init(void)
return ret;
}
void __exit pcmcia_badge4_exit(void)
void __devexit pcmcia_badge4_exit(void)
{
sa1100_unregister_pcmcia(&badge4_pcmcia_ops);
}
......
......@@ -7,9 +7,9 @@
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/ioport.h>
#include <linux/device.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <asm/hardware.h>
......
......@@ -55,8 +55,6 @@ static int __devinit serial_card_probe(struct expansion_card *ec, const struct e
unsigned long cardaddr, address;
int port;
ecard_claim (ec);
info = kmalloc(sizeof(struct serial_card_info), GFP_KERNEL);
if (!info)
return -ENOMEM;
......@@ -64,6 +62,8 @@ static int __devinit serial_card_probe(struct expansion_card *ec, const struct e
memset(info, 0, sizeof(struct serial_card_info));
info->num_ports = type->num_ports;
ecard_set_drvdata(ec, info);
cardaddr = ecard_address(ec, type->type, type->speed);
for (port = 0; port < info->num_ports; port ++) {
......@@ -98,8 +98,6 @@ static void __devexit serial_card_remove(struct expansion_card *ec)
}
kfree(info);
ecard_release(ec);
}
static struct serial_card_type atomwide_type = {
......
......@@ -42,6 +42,6 @@ ide_init_default_hwifs(void)
ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, NULL);
hw.irq = 14;
ide_register_hw(&hw);
ide_register_hw(&hw,NULL);
}
......@@ -7,5 +7,6 @@
#define NR_IRQS 16
#define IRQ_ISA_KEYBOARD 1
#define RTC_IRQ 8
#define AUX_IRQ 12
#define IRQ_HARDDISK 14
......@@ -38,6 +38,4 @@
#define __bus_to_virt__is_a_macro
#define __bus_to_virt(x) __phys_to_virt(x)
#define isa_virt_to_bus virt_to_bus
#endif
......@@ -3,3 +3,5 @@
*
* by Alexander Schulz
*/
#define CLOCK_TICK_RATE 1193180
......@@ -13,7 +13,7 @@
#define ELF_THUMB_OK(x) \
(( (elf_hwcap & HWCAP_THUMB) && ((x)->e_entry & 1) == 1) || \
(!(elf_hwcap & HWCAP_THUMB) && ((x)->e_entry & 3) == 0))
((x)->e_entry & 3) == 0)
#define ELF_26BIT_OK(x) \
(( (elf_hwcap & HWCAP_26BIT) && (x)->e_flags & EF_ARM_APCS26) || \
......
#ifdef _ASMARM_SUSPEND_H
#ifndef _ASMARM_SUSPEND_H
#define _ASMARM_SUSPEND_H
#endif
......@@ -9,7 +9,6 @@
*
* Filler routines for DMA buffers
*/
#define __ASSEMBLY__
#include <linux/linkage.h>
#include <asm/assembler.h>
#include <asm/hardware.h>
......
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