You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'master' into upstream
This commit is contained in:
@@ -120,6 +120,13 @@ Who: Adrian Bunk <bunk@stusta.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: drivers depending on OSS_OBSOLETE_DRIVER
|
||||
When: options in 2.6.20, code in 2.6.22
|
||||
Why: OSS drivers with ALSA replacements
|
||||
Who: Adrian Bunk <bunk@stusta.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: pci_module_init(driver)
|
||||
When: January 2007
|
||||
Why: Is replaced by pci_register_driver(pci_driver).
|
||||
|
||||
@@ -1183,6 +1183,8 @@ running once the system is up.
|
||||
Mechanism 2.
|
||||
nommconf [IA-32,X86_64] Disable use of MMCONFIG for PCI
|
||||
Configuration
|
||||
mmconf [IA-32,X86_64] Force MMCONFIG. This is useful
|
||||
to override the builtin blacklist.
|
||||
nomsi [MSI] If the PCI_MSI kernel config parameter is
|
||||
enabled, this kernel boot option can be used to
|
||||
disable the use of MSI interrupts system-wide.
|
||||
|
||||
@@ -1136,10 +1136,10 @@ Sense and level information should be encoded as follows:
|
||||
Devices connected to openPIC-compatible controllers should encode
|
||||
sense and polarity as follows:
|
||||
|
||||
0 = high to low edge sensitive type enabled
|
||||
0 = low to high edge sensitive type enabled
|
||||
1 = active low level sensitive type enabled
|
||||
2 = low to high edge sensitive type enabled
|
||||
3 = active high level sensitive type enabled
|
||||
2 = active high level sensitive type enabled
|
||||
3 = high to low edge sensitive type enabled
|
||||
|
||||
ISA PIC interrupt controllers should adhere to the ISA PIC
|
||||
encodings listed below:
|
||||
|
||||
+2
-1
@@ -3296,10 +3296,11 @@ S: Maintained
|
||||
|
||||
XFS FILESYSTEM
|
||||
P: Silicon Graphics Inc
|
||||
P: Tim Shimmin, David Chatterton
|
||||
M: xfs-masters@oss.sgi.com
|
||||
M: nathans@sgi.com
|
||||
L: xfs@oss.sgi.com
|
||||
W: http://oss.sgi.com/projects/xfs
|
||||
T: git git://oss.sgi.com:8090/xfs/xfs-2.6
|
||||
S: Supported
|
||||
|
||||
X86 3-LEVEL PAGING (PAE) SUPPORT
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
VERSION = 2
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 18
|
||||
EXTRAVERSION = -rc5
|
||||
EXTRAVERSION = -rc6
|
||||
NAME=Crazed Snow-Weasel
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
||||
+2
-1
@@ -47,7 +47,8 @@ comma = ,
|
||||
# testing for a specific architecture or later rather impossible.
|
||||
arch-$(CONFIG_CPU_32v6) :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
|
||||
arch-$(CONFIG_CPU_32v6K) :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6k,-march=armv5t -Wa$(comma)-march=armv6k)
|
||||
arch-$(CONFIG_CPU_32v5) :=-D__LINUX_ARM_ARCH__=5 $(call cc-option,-march=armv5te,-march=armv4)
|
||||
arch-$(CONFIG_CPU_32v5) :=-D__LINUX_ARM_ARCH__=5 $(call cc-option,-march=armv5te,-march=armv4t)
|
||||
arch-$(CONFIG_CPU_32v4T) :=-D__LINUX_ARM_ARCH__=4 -march=armv4t
|
||||
arch-$(CONFIG_CPU_32v4) :=-D__LINUX_ARM_ARCH__=4 -march=armv4
|
||||
arch-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM_ARCH__=3 -march=armv3
|
||||
|
||||
|
||||
@@ -618,7 +618,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
|
||||
{
|
||||
struct sa1111 *sachip;
|
||||
unsigned long id;
|
||||
unsigned int has_devs, val;
|
||||
unsigned int has_devs;
|
||||
int i, ret = -ENODEV;
|
||||
|
||||
sachip = kzalloc(sizeof(struct sa1111), GFP_KERNEL);
|
||||
@@ -669,6 +669,9 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
|
||||
sa1111_wake(sachip);
|
||||
|
||||
#ifdef CONFIG_ARCH_SA1100
|
||||
{
|
||||
unsigned int val;
|
||||
|
||||
/*
|
||||
* The SDRAM configuration of the SA1110 and the SA1111 must
|
||||
* match. This is very important to ensure that SA1111 accesses
|
||||
@@ -692,6 +695,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
|
||||
* Enable the SA1110 memory bus request and grant signals.
|
||||
*/
|
||||
sa1110_mb_enable();
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -621,9 +621,8 @@ CONFIG_AT91_WATCHDOG=y
|
||||
# USB-based Watchdog Cards
|
||||
#
|
||||
# CONFIG_USBPCWATCHDOG is not set
|
||||
# CONFIG_HW_RANDOM is not set
|
||||
# CONFIG_NVRAM is not set
|
||||
CONFIG_RTC=y
|
||||
# CONFIG_AT91_RTC is not set
|
||||
# CONFIG_DTLK is not set
|
||||
# CONFIG_R3964 is not set
|
||||
|
||||
@@ -956,9 +955,41 @@ CONFIG_USB_AT91=y
|
||||
CONFIG_MMC=y
|
||||
# CONFIG_MMC_DEBUG is not set
|
||||
CONFIG_MMC_BLOCK=y
|
||||
# CONFIG_MMC_WBSD is not set
|
||||
CONFIG_MMC_AT91RM9200=y
|
||||
|
||||
#
|
||||
# Real Time Clock
|
||||
#
|
||||
CONFIG_RTC_LIB=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_HCTOSYS=y
|
||||
CONFIG_RTC_HCTOSYS_DEVICE="rtc1"
|
||||
|
||||
#
|
||||
# RTC interfaces
|
||||
#
|
||||
# CONFIG_RTC_INTF_SYSFS is not set
|
||||
CONFIG_RTC_INTF_PROC=y
|
||||
CONFIG_RTC_INTF_DEV=y
|
||||
# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
|
||||
|
||||
#
|
||||
# RTC drivers
|
||||
#
|
||||
# CONFIG_RTC_DRV_X1205 is not set
|
||||
CONFIG_RTC_DRV_DS1307=y
|
||||
# CONFIG_RTC_DRV_DS1553 is not set
|
||||
# CONFIG_RTC_DRV_ISL1208 is not set
|
||||
# CONFIG_RTC_DRV_DS1672 is not set
|
||||
# CONFIG_RTC_DRV_DS1742 is not set
|
||||
# CONFIG_RTC_DRV_PCF8563 is not set
|
||||
# CONFIG_RTC_DRV_PCF8583 is not set
|
||||
# CONFIG_RTC_DRV_RS5C372 is not set
|
||||
# CONFIG_RTC_DRV_M48T86 is not set
|
||||
CONFIG_RTC_DRV_AT91=y
|
||||
# CONFIG_RTC_DRV_TEST is not set
|
||||
# CONFIG_RTC_DRV_V3020 is not set
|
||||
|
||||
#
|
||||
# File systems
|
||||
#
|
||||
|
||||
@@ -13,12 +13,11 @@ obj-y := compat.o entry-armv.o entry-common.o irq.o \
|
||||
obj-$(CONFIG_APM) += apm.o
|
||||
obj-$(CONFIG_ISA_DMA_API) += dma.o
|
||||
obj-$(CONFIG_ARCH_ACORN) += ecard.o
|
||||
obj-$(CONFIG_FOOTBRIDGE) += isa.o
|
||||
obj-$(CONFIG_FIQ) += fiq.o
|
||||
obj-$(CONFIG_MODULES) += armksyms.o module.o
|
||||
obj-$(CONFIG_ARTHUR) += arthur.o
|
||||
obj-$(CONFIG_ISA_DMA) += dma-isa.o
|
||||
obj-$(CONFIG_PCI) += bios32.o
|
||||
obj-$(CONFIG_PCI) += bios32.o isa.o
|
||||
obj-$(CONFIG_SMP) += smp.o
|
||||
obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o
|
||||
|
||||
|
||||
+42
-21
@@ -3,21 +3,14 @@
|
||||
*
|
||||
* Copyright (C) 1999 Phil Blundell
|
||||
*
|
||||
* ISA shared memory and I/O port support
|
||||
*/
|
||||
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* ISA shared memory and I/O port support, and is required to support
|
||||
* iopl, inb, outb and friends in userspace via glibc emulation.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Nothing about this is actually ARM specific. One day we could move
|
||||
* it into kernel/resource.c or some place like that.
|
||||
*/
|
||||
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/fs.h>
|
||||
@@ -27,21 +20,49 @@
|
||||
static unsigned int isa_membase, isa_portbase, isa_portshift;
|
||||
|
||||
static ctl_table ctl_isa_vars[4] = {
|
||||
{BUS_ISA_MEM_BASE, "membase", &isa_membase,
|
||||
sizeof(isa_membase), 0444, NULL, &proc_dointvec},
|
||||
{BUS_ISA_PORT_BASE, "portbase", &isa_portbase,
|
||||
sizeof(isa_portbase), 0444, NULL, &proc_dointvec},
|
||||
{BUS_ISA_PORT_SHIFT, "portshift", &isa_portshift,
|
||||
sizeof(isa_portshift), 0444, NULL, &proc_dointvec},
|
||||
{0}
|
||||
{
|
||||
.ctl_name = BUS_ISA_MEM_BASE,
|
||||
.procname = "membase",
|
||||
.data = &isa_membase,
|
||||
.maxlen = sizeof(isa_membase),
|
||||
.mode = 0444,
|
||||
.proc_handler = &proc_dointvec,
|
||||
}, {
|
||||
.ctl_name = BUS_ISA_PORT_BASE,
|
||||
.procname = "portbase",
|
||||
.data = &isa_portbase,
|
||||
.maxlen = sizeof(isa_portbase),
|
||||
.mode = 0444,
|
||||
.proc_handler = &proc_dointvec,
|
||||
}, {
|
||||
.ctl_name = BUS_ISA_PORT_SHIFT,
|
||||
.procname = "portshift",
|
||||
.data = &isa_portshift,
|
||||
.maxlen = sizeof(isa_portshift),
|
||||
.mode = 0444,
|
||||
.proc_handler = &proc_dointvec,
|
||||
}, {0}
|
||||
};
|
||||
|
||||
static struct ctl_table_header *isa_sysctl_header;
|
||||
|
||||
static ctl_table ctl_isa[2] = {{CTL_BUS_ISA, "isa", NULL, 0, 0555, ctl_isa_vars},
|
||||
{0}};
|
||||
static ctl_table ctl_bus[2] = {{CTL_BUS, "bus", NULL, 0, 0555, ctl_isa},
|
||||
{0}};
|
||||
static ctl_table ctl_isa[2] = {
|
||||
{
|
||||
.ctl_name = CTL_BUS_ISA,
|
||||
.procname = "isa",
|
||||
.mode = 0555,
|
||||
.child = ctl_isa_vars,
|
||||
}, {0}
|
||||
};
|
||||
|
||||
static ctl_table ctl_bus[2] = {
|
||||
{
|
||||
.ctl_name = CTL_BUS,
|
||||
.procname = "bus",
|
||||
.mode = 0555,
|
||||
.child = ctl_isa,
|
||||
}, {0}
|
||||
};
|
||||
|
||||
void __init
|
||||
register_isa_ports(unsigned int membase, unsigned int portbase, unsigned int portshift)
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
|
||||
extern int setup_arm_irq(int, struct irqaction *);
|
||||
extern void pcibios_report_status(u_int status_mask, int warn);
|
||||
extern void register_isa_ports(unsigned int, unsigned int, unsigned int);
|
||||
|
||||
static unsigned long
|
||||
dc21285_base_address(struct pci_bus *bus, unsigned int devfn)
|
||||
|
||||
@@ -600,4 +600,6 @@ void __init pci_v3_postinit(void)
|
||||
printk(KERN_ERR "PCI: unable to grab local bus timeout "
|
||||
"interrupt: %d\n", ret);
|
||||
#endif
|
||||
|
||||
register_isa_ports(PHYS_PCI_MEM_BASE, PHYS_PCI_IO_BASE, 0);
|
||||
}
|
||||
|
||||
@@ -47,14 +47,15 @@ static struct corgissp_machinfo *ssp_machinfo;
|
||||
*/
|
||||
unsigned long corgi_ssp_ads7846_putget(ulong data)
|
||||
{
|
||||
unsigned long ret,flag;
|
||||
unsigned long flag;
|
||||
u32 ret = 0;
|
||||
|
||||
spin_lock_irqsave(&corgi_ssp_lock, flag);
|
||||
if (ssp_machinfo->cs_ads7846 >= 0)
|
||||
GPCR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846);
|
||||
|
||||
ssp_write_word(&corgi_ssp_dev,data);
|
||||
ret = ssp_read_word(&corgi_ssp_dev);
|
||||
ssp_read_word(&corgi_ssp_dev, &ret);
|
||||
|
||||
if (ssp_machinfo->cs_ads7846 >= 0)
|
||||
GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846);
|
||||
@@ -88,7 +89,9 @@ void corgi_ssp_ads7846_put(ulong data)
|
||||
|
||||
unsigned long corgi_ssp_ads7846_get(void)
|
||||
{
|
||||
return ssp_read_word(&corgi_ssp_dev);
|
||||
u32 ret = 0;
|
||||
ssp_read_word(&corgi_ssp_dev, &ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(corgi_ssp_ads7846_putget);
|
||||
@@ -104,6 +107,7 @@ EXPORT_SYMBOL(corgi_ssp_ads7846_get);
|
||||
unsigned long corgi_ssp_dac_put(ulong data)
|
||||
{
|
||||
unsigned long flag, sscr1 = SSCR1_SPH;
|
||||
u32 tmp;
|
||||
|
||||
spin_lock_irqsave(&corgi_ssp_lock, flag);
|
||||
|
||||
@@ -118,7 +122,7 @@ unsigned long corgi_ssp_dac_put(ulong data)
|
||||
GPCR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon);
|
||||
ssp_write_word(&corgi_ssp_dev,data);
|
||||
/* Read null data back from device to prevent SSP overflow */
|
||||
ssp_read_word(&corgi_ssp_dev);
|
||||
ssp_read_word(&corgi_ssp_dev, &tmp);
|
||||
if (ssp_machinfo->cs_lcdcon >= 0)
|
||||
GPSR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon);
|
||||
|
||||
@@ -150,7 +154,7 @@ EXPORT_SYMBOL(corgi_ssp_blduty_set);
|
||||
int corgi_ssp_max1111_get(ulong data)
|
||||
{
|
||||
unsigned long flag;
|
||||
int voltage,voltage1,voltage2;
|
||||
long voltage = 0, voltage1 = 0, voltage2 = 0;
|
||||
|
||||
spin_lock_irqsave(&corgi_ssp_lock, flag);
|
||||
if (ssp_machinfo->cs_max1111 >= 0)
|
||||
@@ -163,15 +167,15 @@ int corgi_ssp_max1111_get(ulong data)
|
||||
|
||||
/* TB1/RB1 */
|
||||
ssp_write_word(&corgi_ssp_dev,data);
|
||||
ssp_read_word(&corgi_ssp_dev); /* null read */
|
||||
ssp_read_word(&corgi_ssp_dev, (u32*)&voltage1); /* null read */
|
||||
|
||||
/* TB12/RB2 */
|
||||
ssp_write_word(&corgi_ssp_dev,0);
|
||||
voltage1=ssp_read_word(&corgi_ssp_dev);
|
||||
ssp_read_word(&corgi_ssp_dev, (u32*)&voltage1);
|
||||
|
||||
/* TB13/RB3*/
|
||||
ssp_write_word(&corgi_ssp_dev,0);
|
||||
voltage2=ssp_read_word(&corgi_ssp_dev);
|
||||
ssp_read_word(&corgi_ssp_dev, (u32*)&voltage2);
|
||||
|
||||
ssp_disable(&corgi_ssp_dev);
|
||||
ssp_config(&corgi_ssp_dev, (SSCR0_National | (SSCR0_DSS & 0x0b )), 0, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_ads7846));
|
||||
|
||||
+29
-8
@@ -40,6 +40,8 @@
|
||||
|
||||
#define PXA_SSP_PORTS 3
|
||||
|
||||
#define TIMEOUT 100000
|
||||
|
||||
struct ssp_info_ {
|
||||
int irq;
|
||||
u32 clock;
|
||||
@@ -92,13 +94,18 @@ static irqreturn_t ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs)
|
||||
* The caller is expected to perform the necessary locking.
|
||||
*
|
||||
* Returns:
|
||||
* %-ETIMEDOUT timeout occurred (for future)
|
||||
* %-ETIMEDOUT timeout occurred
|
||||
* 0 success
|
||||
*/
|
||||
int ssp_write_word(struct ssp_dev *dev, u32 data)
|
||||
{
|
||||
while (!(SSSR_P(dev->port) & SSSR_TNF))
|
||||
int timeout = TIMEOUT;
|
||||
|
||||
while (!(SSSR_P(dev->port) & SSSR_TNF)) {
|
||||
if (!--timeout)
|
||||
return -ETIMEDOUT;
|
||||
cpu_relax();
|
||||
}
|
||||
|
||||
SSDR_P(dev->port) = data;
|
||||
|
||||
@@ -117,15 +124,21 @@ int ssp_write_word(struct ssp_dev *dev, u32 data)
|
||||
* The caller is expected to perform the necessary locking.
|
||||
*
|
||||
* Returns:
|
||||
* %-ETIMEDOUT timeout occurred (for future)
|
||||
* %-ETIMEDOUT timeout occurred
|
||||
* 32-bit data success
|
||||
*/
|
||||
int ssp_read_word(struct ssp_dev *dev)
|
||||
int ssp_read_word(struct ssp_dev *dev, u32 *data)
|
||||
{
|
||||
while (!(SSSR_P(dev->port) & SSSR_RNE))
|
||||
cpu_relax();
|
||||
int timeout = TIMEOUT;
|
||||
|
||||
return SSDR_P(dev->port);
|
||||
while (!(SSSR_P(dev->port) & SSSR_RNE)) {
|
||||
if (!--timeout)
|
||||
return -ETIMEDOUT;
|
||||
cpu_relax();
|
||||
}
|
||||
|
||||
*data = SSDR_P(dev->port);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -136,13 +149,21 @@ int ssp_read_word(struct ssp_dev *dev)
|
||||
*
|
||||
* The caller is expected to perform the necessary locking.
|
||||
*/
|
||||
void ssp_flush(struct ssp_dev *dev)
|
||||
int ssp_flush(struct ssp_dev *dev)
|
||||
{
|
||||
int timeout = TIMEOUT * 2;
|
||||
|
||||
do {
|
||||
while (SSSR_P(dev->port) & SSSR_RNE) {
|
||||
if (!--timeout)
|
||||
return -ETIMEDOUT;
|
||||
(void) SSDR_P(dev->port);
|
||||
}
|
||||
if (!--timeout)
|
||||
return -ETIMEDOUT;
|
||||
} while (SSSR_P(dev->port) & SSSR_BSY);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+44
-44
@@ -60,7 +60,7 @@ static void __iomem *dma_base;
|
||||
static kmem_cache_t *dma_kmem;
|
||||
|
||||
/* dma channel state information */
|
||||
s3c2410_dma_chan_t s3c2410_chans[S3C2410_DMA_CHANNELS];
|
||||
struct s3c2410_dma_chan s3c2410_chans[S3C2410_DMA_CHANNELS];
|
||||
|
||||
/* debugging functions */
|
||||
|
||||
@@ -74,7 +74,7 @@ s3c2410_dma_chan_t s3c2410_chans[S3C2410_DMA_CHANNELS];
|
||||
#define dma_wrreg(chan, reg, val) writel((val), (chan)->regs + (reg))
|
||||
#else
|
||||
static inline void
|
||||
dma_wrreg(s3c2410_dma_chan_t *chan, int reg, unsigned long val)
|
||||
dma_wrreg(struct s3c2410_dma_chan *chan, int reg, unsigned long val)
|
||||
{
|
||||
pr_debug("writing %08x to register %08x\n",(unsigned int)val,reg);
|
||||
writel(val, dma_regaddr(chan, reg));
|
||||
@@ -102,7 +102,7 @@ struct s3c2410_dma_regstate {
|
||||
*/
|
||||
|
||||
static void
|
||||
dmadbg_capture(s3c2410_dma_chan_t *chan, struct s3c2410_dma_regstate *regs)
|
||||
dmadbg_capture(struct s3c2410_dma_chan *chan, struct s3c2410_dma_regstate *regs)
|
||||
{
|
||||
regs->dcsrc = dma_rdreg(chan, S3C2410_DMA_DCSRC);
|
||||
regs->disrc = dma_rdreg(chan, S3C2410_DMA_DISRC);
|
||||
@@ -112,7 +112,7 @@ dmadbg_capture(s3c2410_dma_chan_t *chan, struct s3c2410_dma_regstate *regs)
|
||||
}
|
||||
|
||||
static void
|
||||
dmadbg_dumpregs(const char *fname, int line, s3c2410_dma_chan_t *chan,
|
||||
dmadbg_dumpregs(const char *fname, int line, struct s3c2410_dma_chan *chan,
|
||||
struct s3c2410_dma_regstate *regs)
|
||||
{
|
||||
printk(KERN_DEBUG "dma%d: %s:%d: DCSRC=%08lx, DISRC=%08lx, DSTAT=%08lx DMT=%02lx, DCON=%08lx\n",
|
||||
@@ -122,7 +122,7 @@ dmadbg_dumpregs(const char *fname, int line, s3c2410_dma_chan_t *chan,
|
||||
}
|
||||
|
||||
static void
|
||||
dmadbg_showchan(const char *fname, int line, s3c2410_dma_chan_t *chan)
|
||||
dmadbg_showchan(const char *fname, int line, struct s3c2410_dma_chan *chan)
|
||||
{
|
||||
struct s3c2410_dma_regstate state;
|
||||
|
||||
@@ -136,7 +136,7 @@ dmadbg_showchan(const char *fname, int line, s3c2410_dma_chan_t *chan)
|
||||
}
|
||||
|
||||
static void
|
||||
dmadbg_showregs(const char *fname, int line, s3c2410_dma_chan_t *chan)
|
||||
dmadbg_showregs(const char *fname, int line, struct s3c2410_dma_chan *chan)
|
||||
{
|
||||
struct s3c2410_dma_regstate state;
|
||||
|
||||
@@ -164,7 +164,7 @@ dmadbg_showregs(const char *fname, int line, s3c2410_dma_chan_t *chan)
|
||||
*/
|
||||
|
||||
static void
|
||||
s3c2410_dma_stats_timeout(s3c2410_dma_stats_t *stats, int val)
|
||||
s3c2410_dma_stats_timeout(struct s3c2410_dma_stats *stats, int val)
|
||||
{
|
||||
if (stats == NULL)
|
||||
return;
|
||||
@@ -183,7 +183,7 @@ s3c2410_dma_stats_timeout(s3c2410_dma_stats_t *stats, int val)
|
||||
*/
|
||||
|
||||
static int
|
||||
s3c2410_dma_waitforload(s3c2410_dma_chan_t *chan, int line)
|
||||
s3c2410_dma_waitforload(struct s3c2410_dma_chan *chan, int line)
|
||||
{
|
||||
int timeout = chan->load_timeout;
|
||||
int took;
|
||||
@@ -230,8 +230,8 @@ s3c2410_dma_waitforload(s3c2410_dma_chan_t *chan, int line)
|
||||
*/
|
||||
|
||||
static inline int
|
||||
s3c2410_dma_loadbuffer(s3c2410_dma_chan_t *chan,
|
||||
s3c2410_dma_buf_t *buf)
|
||||
s3c2410_dma_loadbuffer(struct s3c2410_dma_chan *chan,
|
||||
struct s3c2410_dma_buf *buf)
|
||||
{
|
||||
unsigned long reload;
|
||||
|
||||
@@ -304,7 +304,7 @@ s3c2410_dma_loadbuffer(s3c2410_dma_chan_t *chan,
|
||||
*/
|
||||
|
||||
static void
|
||||
s3c2410_dma_call_op(s3c2410_dma_chan_t *chan, s3c2410_chan_op_t op)
|
||||
s3c2410_dma_call_op(struct s3c2410_dma_chan *chan, enum s3c2410_chan_op op)
|
||||
{
|
||||
if (chan->op_fn != NULL) {
|
||||
(chan->op_fn)(chan, op);
|
||||
@@ -318,8 +318,8 @@ s3c2410_dma_call_op(s3c2410_dma_chan_t *chan, s3c2410_chan_op_t op)
|
||||
*/
|
||||
|
||||
static inline void
|
||||
s3c2410_dma_buffdone(s3c2410_dma_chan_t *chan, s3c2410_dma_buf_t *buf,
|
||||
s3c2410_dma_buffresult_t result)
|
||||
s3c2410_dma_buffdone(struct s3c2410_dma_chan *chan, struct s3c2410_dma_buf *buf,
|
||||
enum s3c2410_dma_buffresult result)
|
||||
{
|
||||
pr_debug("callback_fn=%p, buf=%p, id=%p, size=%d, result=%d\n",
|
||||
chan->callback_fn, buf, buf->id, buf->size, result);
|
||||
@@ -334,7 +334,7 @@ s3c2410_dma_buffdone(s3c2410_dma_chan_t *chan, s3c2410_dma_buf_t *buf,
|
||||
* start a dma channel going
|
||||
*/
|
||||
|
||||
static int s3c2410_dma_start(s3c2410_dma_chan_t *chan)
|
||||
static int s3c2410_dma_start(struct s3c2410_dma_chan *chan)
|
||||
{
|
||||
unsigned long tmp;
|
||||
unsigned long flags;
|
||||
@@ -430,7 +430,7 @@ static int s3c2410_dma_start(s3c2410_dma_chan_t *chan)
|
||||
*/
|
||||
|
||||
static int
|
||||
s3c2410_dma_canload(s3c2410_dma_chan_t *chan)
|
||||
s3c2410_dma_canload(struct s3c2410_dma_chan *chan)
|
||||
{
|
||||
if (chan->load_state == S3C2410_DMALOAD_NONE ||
|
||||
chan->load_state == S3C2410_DMALOAD_1RUNNING)
|
||||
@@ -460,8 +460,8 @@ s3c2410_dma_canload(s3c2410_dma_chan_t *chan)
|
||||
int s3c2410_dma_enqueue(unsigned int channel, void *id,
|
||||
dma_addr_t data, int size)
|
||||
{
|
||||
s3c2410_dma_chan_t *chan = &s3c2410_chans[channel];
|
||||
s3c2410_dma_buf_t *buf;
|
||||
struct s3c2410_dma_chan *chan = &s3c2410_chans[channel];
|
||||
struct s3c2410_dma_buf *buf;
|
||||
unsigned long flags;
|
||||
|
||||
check_channel(channel);
|
||||
@@ -540,7 +540,7 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id,
|
||||
EXPORT_SYMBOL(s3c2410_dma_enqueue);
|
||||
|
||||
static inline void
|
||||
s3c2410_dma_freebuf(s3c2410_dma_buf_t *buf)
|
||||
s3c2410_dma_freebuf(struct s3c2410_dma_buf *buf)
|
||||
{
|
||||
int magicok = (buf->magic == BUF_MAGIC);
|
||||
|
||||
@@ -560,7 +560,7 @@ s3c2410_dma_freebuf(s3c2410_dma_buf_t *buf)
|
||||
*/
|
||||
|
||||
static inline void
|
||||
s3c2410_dma_lastxfer(s3c2410_dma_chan_t *chan)
|
||||
s3c2410_dma_lastxfer(struct s3c2410_dma_chan *chan)
|
||||
{
|
||||
pr_debug("dma%d: s3c2410_dma_lastxfer: load_state %d\n",
|
||||
chan->number, chan->load_state);
|
||||
@@ -601,8 +601,8 @@ s3c2410_dma_lastxfer(s3c2410_dma_chan_t *chan)
|
||||
static irqreturn_t
|
||||
s3c2410_dma_irq(int irq, void *devpw, struct pt_regs *regs)
|
||||
{
|
||||
s3c2410_dma_chan_t *chan = (s3c2410_dma_chan_t *)devpw;
|
||||
s3c2410_dma_buf_t *buf;
|
||||
struct s3c2410_dma_chan *chan = (struct s3c2410_dma_chan *)devpw;
|
||||
struct s3c2410_dma_buf *buf;
|
||||
|
||||
buf = chan->curr;
|
||||
|
||||
@@ -731,10 +731,10 @@ s3c2410_dma_irq(int irq, void *devpw, struct pt_regs *regs)
|
||||
* get control of an dma channel
|
||||
*/
|
||||
|
||||
int s3c2410_dma_request(unsigned int channel, s3c2410_dma_client_t *client,
|
||||
int s3c2410_dma_request(unsigned int channel, struct s3c2410_dma_client *client,
|
||||
void *dev)
|
||||
{
|
||||
s3c2410_dma_chan_t *chan = &s3c2410_chans[channel];
|
||||
struct s3c2410_dma_chan *chan = &s3c2410_chans[channel];
|
||||
unsigned long flags;
|
||||
int err;
|
||||
|
||||
@@ -807,9 +807,9 @@ EXPORT_SYMBOL(s3c2410_dma_request);
|
||||
* allowed to go through.
|
||||
*/
|
||||
|
||||
int s3c2410_dma_free(dmach_t channel, s3c2410_dma_client_t *client)
|
||||
int s3c2410_dma_free(dmach_t channel, struct s3c2410_dma_client *client)
|
||||
{
|
||||
s3c2410_dma_chan_t *chan = &s3c2410_chans[channel];
|
||||
struct s3c2410_dma_chan *chan = &s3c2410_chans[channel];
|
||||
unsigned long flags;
|
||||
|
||||
check_channel(channel);
|
||||
@@ -846,7 +846,7 @@ int s3c2410_dma_free(dmach_t channel, s3c2410_dma_client_t *client)
|
||||
|
||||
EXPORT_SYMBOL(s3c2410_dma_free);
|
||||
|
||||
static int s3c2410_dma_dostop(s3c2410_dma_chan_t *chan)
|
||||
static int s3c2410_dma_dostop(struct s3c2410_dma_chan *chan)
|
||||
{
|
||||
unsigned long tmp;
|
||||
unsigned long flags;
|
||||
@@ -880,7 +880,7 @@ static int s3c2410_dma_dostop(s3c2410_dma_chan_t *chan)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void s3c2410_dma_waitforstop(s3c2410_dma_chan_t *chan)
|
||||
void s3c2410_dma_waitforstop(struct s3c2410_dma_chan *chan)
|
||||
{
|
||||
unsigned long tmp;
|
||||
unsigned int timeout = 0x10000;
|
||||
@@ -901,9 +901,9 @@ void s3c2410_dma_waitforstop(s3c2410_dma_chan_t *chan)
|
||||
* stop the channel, and remove all current and pending transfers
|
||||
*/
|
||||
|
||||
static int s3c2410_dma_flush(s3c2410_dma_chan_t *chan)
|
||||
static int s3c2410_dma_flush(struct s3c2410_dma_chan *chan)
|
||||
{
|
||||
s3c2410_dma_buf_t *buf, *next;
|
||||
struct s3c2410_dma_buf *buf, *next;
|
||||
unsigned long flags;
|
||||
|
||||
pr_debug("%s: chan %p (%d)\n", __FUNCTION__, chan, chan->number);
|
||||
@@ -958,7 +958,7 @@ static int s3c2410_dma_flush(s3c2410_dma_chan_t *chan)
|
||||
}
|
||||
|
||||
int
|
||||
s3c2410_dma_started(s3c2410_dma_chan_t *chan)
|
||||
s3c2410_dma_started(struct s3c2410_dma_chan *chan)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@@ -995,9 +995,9 @@ s3c2410_dma_started(s3c2410_dma_chan_t *chan)
|
||||
}
|
||||
|
||||
int
|
||||
s3c2410_dma_ctrl(dmach_t channel, s3c2410_chan_op_t op)
|
||||
s3c2410_dma_ctrl(dmach_t channel, enum s3c2410_chan_op op)
|
||||
{
|
||||
s3c2410_dma_chan_t *chan = &s3c2410_chans[channel];
|
||||
struct s3c2410_dma_chan *chan = &s3c2410_chans[channel];
|
||||
|
||||
check_channel(channel);
|
||||
|
||||
@@ -1046,7 +1046,7 @@ int s3c2410_dma_config(dmach_t channel,
|
||||
int xferunit,
|
||||
int dcon)
|
||||
{
|
||||
s3c2410_dma_chan_t *chan = &s3c2410_chans[channel];
|
||||
struct s3c2410_dma_chan *chan = &s3c2410_chans[channel];
|
||||
|
||||
pr_debug("%s: chan=%d, xfer_unit=%d, dcon=%08x\n",
|
||||
__FUNCTION__, channel, xferunit, dcon);
|
||||
@@ -1086,7 +1086,7 @@ EXPORT_SYMBOL(s3c2410_dma_config);
|
||||
|
||||
int s3c2410_dma_setflags(dmach_t channel, unsigned int flags)
|
||||
{
|
||||
s3c2410_dma_chan_t *chan = &s3c2410_chans[channel];
|
||||
struct s3c2410_dma_chan *chan = &s3c2410_chans[channel];
|
||||
|
||||
check_channel(channel);
|
||||
|
||||
@@ -1106,7 +1106,7 @@ EXPORT_SYMBOL(s3c2410_dma_setflags);
|
||||
|
||||
int s3c2410_dma_set_opfn(dmach_t channel, s3c2410_dma_opfn_t rtn)
|
||||
{
|
||||
s3c2410_dma_chan_t *chan = &s3c2410_chans[channel];
|
||||
struct s3c2410_dma_chan *chan = &s3c2410_chans[channel];
|
||||
|
||||
check_channel(channel);
|
||||
|
||||
@@ -1121,7 +1121,7 @@ EXPORT_SYMBOL(s3c2410_dma_set_opfn);
|
||||
|
||||
int s3c2410_dma_set_buffdone_fn(dmach_t channel, s3c2410_dma_cbfn_t rtn)
|
||||
{
|
||||
s3c2410_dma_chan_t *chan = &s3c2410_chans[channel];
|
||||
struct s3c2410_dma_chan *chan = &s3c2410_chans[channel];
|
||||
|
||||
check_channel(channel);
|
||||
|
||||
@@ -1149,11 +1149,11 @@ EXPORT_SYMBOL(s3c2410_dma_set_buffdone_fn);
|
||||
*/
|
||||
|
||||
int s3c2410_dma_devconfig(int channel,
|
||||
s3c2410_dmasrc_t source,
|
||||
enum s3c2410_dmasrc source,
|
||||
int hwcfg,
|
||||
unsigned long devaddr)
|
||||
{
|
||||
s3c2410_dma_chan_t *chan = &s3c2410_chans[channel];
|
||||
struct s3c2410_dma_chan *chan = &s3c2410_chans[channel];
|
||||
|
||||
check_channel(channel);
|
||||
|
||||
@@ -1200,7 +1200,7 @@ EXPORT_SYMBOL(s3c2410_dma_devconfig);
|
||||
|
||||
int s3c2410_dma_getposition(dmach_t channel, dma_addr_t *src, dma_addr_t *dst)
|
||||
{
|
||||
s3c2410_dma_chan_t *chan = &s3c2410_chans[channel];
|
||||
struct s3c2410_dma_chan *chan = &s3c2410_chans[channel];
|
||||
|
||||
check_channel(channel);
|
||||
|
||||
@@ -1222,7 +1222,7 @@ EXPORT_SYMBOL(s3c2410_dma_getposition);
|
||||
|
||||
static int s3c2410_dma_suspend(struct sys_device *dev, pm_message_t state)
|
||||
{
|
||||
s3c2410_dma_chan_t *cp = container_of(dev, s3c2410_dma_chan_t, dev);
|
||||
struct s3c2410_dma_chan *cp = container_of(dev, struct s3c2410_dma_chan, dev);
|
||||
|
||||
printk(KERN_DEBUG "suspending dma channel %d\n", cp->number);
|
||||
|
||||
@@ -1262,7 +1262,7 @@ static struct sysdev_class dma_sysclass = {
|
||||
|
||||
static void s3c2410_dma_cache_ctor(void *p, kmem_cache_t *c, unsigned long f)
|
||||
{
|
||||
memset(p, 0, sizeof(s3c2410_dma_buf_t));
|
||||
memset(p, 0, sizeof(struct s3c2410_dma_buf));
|
||||
}
|
||||
|
||||
|
||||
@@ -1270,7 +1270,7 @@ static void s3c2410_dma_cache_ctor(void *p, kmem_cache_t *c, unsigned long f)
|
||||
|
||||
static int __init s3c2410_init_dma(void)
|
||||
{
|
||||
s3c2410_dma_chan_t *cp;
|
||||
struct s3c2410_dma_chan *cp;
|
||||
int channel;
|
||||
int ret;
|
||||
|
||||
@@ -1288,7 +1288,7 @@ static int __init s3c2410_init_dma(void)
|
||||
goto err;
|
||||
}
|
||||
|
||||
dma_kmem = kmem_cache_create("dma_desc", sizeof(s3c2410_dma_buf_t), 0,
|
||||
dma_kmem = kmem_cache_create("dma_desc", sizeof(struct s3c2410_dma_buf), 0,
|
||||
SLAB_HWCACHE_ALIGN,
|
||||
s3c2410_dma_cache_ctor, NULL);
|
||||
|
||||
@@ -1301,7 +1301,7 @@ static int __init s3c2410_init_dma(void)
|
||||
for (channel = 0; channel < S3C2410_DMA_CHANNELS; channel++) {
|
||||
cp = &s3c2410_chans[channel];
|
||||
|
||||
memset(cp, 0, sizeof(s3c2410_dma_chan_t));
|
||||
memset(cp, 0, sizeof(struct s3c2410_dma_chan));
|
||||
|
||||
/* dma channel irqs are in order.. */
|
||||
cp->number = channel;
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/hardware/ssp.h>
|
||||
|
||||
#define TIMEOUT 100000
|
||||
|
||||
static irqreturn_t ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs)
|
||||
{
|
||||
unsigned int status = Ser4SSSR;
|
||||
@@ -47,18 +49,27 @@ static irqreturn_t ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs)
|
||||
* The caller is expected to perform the necessary locking.
|
||||
*
|
||||
* Returns:
|
||||
* %-ETIMEDOUT timeout occurred (for future)
|
||||
* %-ETIMEDOUT timeout occurred
|
||||
* 0 success
|
||||
*/
|
||||
int ssp_write_word(u16 data)
|
||||
{
|
||||
while (!(Ser4SSSR & SSSR_TNF))
|
||||
int timeout = TIMEOUT;
|
||||
|
||||
while (!(Ser4SSSR & SSSR_TNF)) {
|
||||
if (!--timeout)
|
||||
return -ETIMEDOUT;
|
||||
cpu_relax();
|
||||
}
|
||||
|
||||
Ser4SSDR = data;
|
||||
|
||||
while (!(Ser4SSSR & SSSR_BSY))
|
||||
timeout = TIMEOUT;
|
||||
while (!(Ser4SSSR & SSSR_BSY)) {
|
||||
if (!--timeout)
|
||||
return -ETIMEDOUT;
|
||||
cpu_relax();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -75,15 +86,22 @@ int ssp_write_word(u16 data)
|
||||
* The caller is expected to perform the necessary locking.
|
||||
*
|
||||
* Returns:
|
||||
* %-ETIMEDOUT timeout occurred (for future)
|
||||
* %-ETIMEDOUT timeout occurred
|
||||
* 16-bit data success
|
||||
*/
|
||||
int ssp_read_word(void)
|
||||
int ssp_read_word(u16 *data)
|
||||
{
|
||||
while (!(Ser4SSSR & SSSR_RNE))
|
||||
cpu_relax();
|
||||
int timeout = TIMEOUT;
|
||||
|
||||
return Ser4SSDR;
|
||||
while (!(Ser4SSSR & SSSR_RNE)) {
|
||||
if (!--timeout)
|
||||
return -ETIMEDOUT;
|
||||
cpu_relax();
|
||||
}
|
||||
|
||||
*data = (u16)Ser4SSDR;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -93,14 +111,26 @@ int ssp_read_word(void)
|
||||
* is empty.
|
||||
*
|
||||
* The caller is expected to perform the necessary locking.
|
||||
*
|
||||
* Returns:
|
||||
* %-ETIMEDOUT timeout occurred
|
||||
* 0 success
|
||||
*/
|
||||
void ssp_flush(void)
|
||||
int ssp_flush(void)
|
||||
{
|
||||
int timeout = TIMEOUT * 2;
|
||||
|
||||
do {
|
||||
while (Ser4SSSR & SSSR_RNE) {
|
||||
if (!--timeout)
|
||||
return -ETIMEDOUT;
|
||||
(void) Ser4SSDR;
|
||||
}
|
||||
if (!--timeout)
|
||||
return -ETIMEDOUT;
|
||||
} while (Ser4SSSR & SSSR_BSY);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+9
-4
@@ -46,7 +46,7 @@ config CPU_ARM710
|
||||
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 || ARCH_H720X
|
||||
select CPU_32v4
|
||||
select CPU_32v4T
|
||||
select CPU_ABRT_LV4T
|
||||
select CPU_CACHE_V4
|
||||
select CPU_CACHE_VIVT
|
||||
@@ -64,7 +64,7 @@ config CPU_ARM920T
|
||||
bool "Support ARM920T processor"
|
||||
depends on ARCH_EP93XX || ARCH_INTEGRATOR || CPU_S3C2410 || CPU_S3C2440 || CPU_S3C2442 || ARCH_IMX || ARCH_AAEC2000 || ARCH_AT91RM9200
|
||||
default y if CPU_S3C2410 || CPU_S3C2440 || CPU_S3C2442 || ARCH_AT91RM9200
|
||||
select CPU_32v4
|
||||
select CPU_32v4T
|
||||
select CPU_ABRT_EV4T
|
||||
select CPU_CACHE_V4WT
|
||||
select CPU_CACHE_VIVT
|
||||
@@ -85,7 +85,7 @@ config CPU_ARM922T
|
||||
bool "Support ARM922T processor" if ARCH_INTEGRATOR
|
||||
depends on ARCH_LH7A40X || ARCH_INTEGRATOR
|
||||
default y if ARCH_LH7A40X
|
||||
select CPU_32v4
|
||||
select CPU_32v4T
|
||||
select CPU_ABRT_EV4T
|
||||
select CPU_CACHE_V4WT
|
||||
select CPU_CACHE_VIVT
|
||||
@@ -104,7 +104,7 @@ config CPU_ARM925T
|
||||
bool "Support ARM925T processor" if ARCH_OMAP1
|
||||
depends on ARCH_OMAP15XX
|
||||
default y if ARCH_OMAP15XX
|
||||
select CPU_32v4
|
||||
select CPU_32v4T
|
||||
select CPU_ABRT_EV4T
|
||||
select CPU_CACHE_V4WT
|
||||
select CPU_CACHE_VIVT
|
||||
@@ -285,6 +285,11 @@ config CPU_32v4
|
||||
select TLS_REG_EMUL if SMP || !MMU
|
||||
select NEEDS_SYSCALL_FOR_CMPXCHG if SMP
|
||||
|
||||
config CPU_32v4T
|
||||
bool
|
||||
select TLS_REG_EMUL if SMP || !MMU
|
||||
select NEEDS_SYSCALL_FOR_CMPXCHG if SMP
|
||||
|
||||
config CPU_32v5
|
||||
bool
|
||||
select TLS_REG_EMUL if SMP || !MMU
|
||||
|
||||
@@ -87,6 +87,32 @@ void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsig
|
||||
if (cache_is_vipt_aliasing())
|
||||
flush_pfn_alias(pfn, user_addr);
|
||||
}
|
||||
|
||||
void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
|
||||
unsigned long uaddr, void *kaddr,
|
||||
unsigned long len, int write)
|
||||
{
|
||||
if (cache_is_vivt()) {
|
||||
if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) {
|
||||
unsigned long addr = (unsigned long)kaddr;
|
||||
__cpuc_coherent_kern_range(addr, addr + len);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (cache_is_vipt_aliasing()) {
|
||||
flush_pfn_alias(page_to_pfn(page), uaddr);
|
||||
return;
|
||||
}
|
||||
|
||||
/* VIPT non-aliasing cache */
|
||||
if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask) &&
|
||||
vma->vm_flags | VM_EXEC) {
|
||||
unsigned long addr = (unsigned long)kaddr;
|
||||
/* only flushing the kernel mapping on non-aliasing VIPT */
|
||||
__cpuc_coherent_kern_range(addr, addr + len);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#define flush_pfn_alias(pfn,vaddr) do { } while (0)
|
||||
#endif
|
||||
|
||||
+10
-8
@@ -156,7 +156,7 @@ struct vfp_single {
|
||||
};
|
||||
|
||||
extern s32 vfp_get_float(unsigned int reg);
|
||||
extern void vfp_put_float(unsigned int reg, s32 val);
|
||||
extern void vfp_put_float(s32 val, unsigned int reg);
|
||||
|
||||
/*
|
||||
* VFP_SINGLE_MANTISSA_BITS - number of bits in the mantissa
|
||||
@@ -267,7 +267,7 @@ struct vfp_double {
|
||||
*/
|
||||
#define VFP_REG_ZERO 16
|
||||
extern u64 vfp_get_double(unsigned int reg);
|
||||
extern void vfp_put_double(unsigned int reg, u64 val);
|
||||
extern void vfp_put_double(u64 val, unsigned int reg);
|
||||
|
||||
#define VFP_DOUBLE_MANTISSA_BITS (52)
|
||||
#define VFP_DOUBLE_EXPONENT_BITS (11)
|
||||
@@ -341,15 +341,17 @@ static inline int vfp_double_type(struct vfp_double *s)
|
||||
|
||||
u32 vfp_double_normaliseround(int dd, struct vfp_double *vd, u32 fpscr, u32 exceptions, const char *func);
|
||||
|
||||
/*
|
||||
* System registers
|
||||
*/
|
||||
extern u32 vfp_get_sys(unsigned int reg);
|
||||
extern void vfp_put_sys(unsigned int reg, u32 val);
|
||||
|
||||
u32 vfp_estimate_sqrt_significand(u32 exponent, u32 significand);
|
||||
|
||||
/*
|
||||
* A special flag to tell the normalisation code not to normalise.
|
||||
*/
|
||||
#define VFP_NAN_FLAG 0x100
|
||||
|
||||
/*
|
||||
* A bit pattern used to indicate the initial (unset) value of the
|
||||
* exception mask, in case nothing handles an instruction. This
|
||||
* doesn't include the NAN flag, which get masked out before
|
||||
* we check for an error.
|
||||
*/
|
||||
#define VFP_EXCEPTION_ERROR ((u32)-1 & ~VFP_NAN_FLAG)
|
||||
|
||||
+32
-18
@@ -195,7 +195,7 @@ u32 vfp_double_normaliseround(int dd, struct vfp_double *vd, u32 fpscr, u32 exce
|
||||
s64 d = vfp_double_pack(vd);
|
||||
pr_debug("VFP: %s: d(d%d)=%016llx exceptions=%08x\n", func,
|
||||
dd, d, exceptions);
|
||||
vfp_put_double(dd, d);
|
||||
vfp_put_double(d, dd);
|
||||
}
|
||||
return exceptions;
|
||||
}
|
||||
@@ -250,19 +250,19 @@ vfp_propagate_nan(struct vfp_double *vdd, struct vfp_double *vdn,
|
||||
*/
|
||||
static u32 vfp_double_fabs(int dd, int unused, int dm, u32 fpscr)
|
||||
{
|
||||
vfp_put_double(dd, vfp_double_packed_abs(vfp_get_double(dm)));
|
||||
vfp_put_double(vfp_double_packed_abs(vfp_get_double(dm)), dd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u32 vfp_double_fcpy(int dd, int unused, int dm, u32 fpscr)
|
||||
{
|
||||
vfp_put_double(dd, vfp_get_double(dm));
|
||||
vfp_put_double(vfp_get_double(dm), dd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u32 vfp_double_fneg(int dd, int unused, int dm, u32 fpscr)
|
||||
{
|
||||
vfp_put_double(dd, vfp_double_packed_negate(vfp_get_double(dm)));
|
||||
vfp_put_double(vfp_double_packed_negate(vfp_get_double(dm)), dd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ static u32 vfp_double_fsqrt(int dd, int unused, int dm, u32 fpscr)
|
||||
vdp = &vfp_double_default_qnan;
|
||||
ret = FPSCR_IOC;
|
||||
}
|
||||
vfp_put_double(dd, vfp_double_pack(vdp));
|
||||
vfp_put_double(vfp_double_pack(vdp), dd);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -465,7 +465,7 @@ static u32 vfp_double_fcvts(int sd, int unused, int dm, u32 fpscr)
|
||||
*/
|
||||
if (tm & (VFP_INFINITY|VFP_NAN)) {
|
||||
vsd.exponent = 255;
|
||||
if (tm & VFP_NAN)
|
||||
if (tm == VFP_QNAN)
|
||||
vsd.significand |= VFP_SINGLE_SIGNIFICAND_QNAN;
|
||||
goto pack_nan;
|
||||
} else if (tm & VFP_ZERO)
|
||||
@@ -476,7 +476,7 @@ static u32 vfp_double_fcvts(int sd, int unused, int dm, u32 fpscr)
|
||||
return vfp_single_normaliseround(sd, &vsd, fpscr, exceptions, "fcvts");
|
||||
|
||||
pack_nan:
|
||||
vfp_put_float(sd, vfp_single_pack(&vsd));
|
||||
vfp_put_float(vfp_single_pack(&vsd), sd);
|
||||
return exceptions;
|
||||
}
|
||||
|
||||
@@ -573,7 +573,7 @@ static u32 vfp_double_ftoui(int sd, int unused, int dm, u32 fpscr)
|
||||
|
||||
pr_debug("VFP: ftoui: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions);
|
||||
|
||||
vfp_put_float(sd, d);
|
||||
vfp_put_float(d, sd);
|
||||
|
||||
return exceptions;
|
||||
}
|
||||
@@ -648,7 +648,7 @@ static u32 vfp_double_ftosi(int sd, int unused, int dm, u32 fpscr)
|
||||
|
||||
pr_debug("VFP: ftosi: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions);
|
||||
|
||||
vfp_put_float(sd, (s32)d);
|
||||
vfp_put_float((s32)d, sd);
|
||||
|
||||
return exceptions;
|
||||
}
|
||||
@@ -1084,7 +1084,7 @@ static u32 vfp_double_fdiv(int dd, int dn, int dm, u32 fpscr)
|
||||
vdn_nan:
|
||||
exceptions = vfp_propagate_nan(&vdd, &vdn, &vdm, fpscr);
|
||||
pack:
|
||||
vfp_put_double(dd, vfp_double_pack(&vdd));
|
||||
vfp_put_double(vfp_double_pack(&vdd), dd);
|
||||
return exceptions;
|
||||
|
||||
vdm_nan:
|
||||
@@ -1104,7 +1104,7 @@ static u32 vfp_double_fdiv(int dd, int dn, int dm, u32 fpscr)
|
||||
goto pack;
|
||||
|
||||
invalid:
|
||||
vfp_put_double(dd, vfp_double_pack(&vfp_double_default_qnan));
|
||||
vfp_put_double(vfp_double_pack(&vfp_double_default_qnan), dd);
|
||||
return FPSCR_IOC;
|
||||
}
|
||||
|
||||
@@ -1127,7 +1127,7 @@ u32 vfp_double_cpdo(u32 inst, u32 fpscr)
|
||||
{
|
||||
u32 op = inst & FOP_MASK;
|
||||
u32 exceptions = 0;
|
||||
unsigned int dd = vfp_get_dd(inst);
|
||||
unsigned int dest;
|
||||
unsigned int dn = vfp_get_dn(inst);
|
||||
unsigned int dm = vfp_get_dm(inst);
|
||||
unsigned int vecitr, veclen, vecstride;
|
||||
@@ -1136,11 +1136,21 @@ u32 vfp_double_cpdo(u32 inst, u32 fpscr)
|
||||
veclen = fpscr & FPSCR_LENGTH_MASK;
|
||||
vecstride = (1 + ((fpscr & FPSCR_STRIDE_MASK) == FPSCR_STRIDE_MASK)) * 2;
|
||||
|
||||
/*
|
||||
* fcvtds takes an sN register number as destination, not dN.
|
||||
* It also always operates on scalars.
|
||||
*/
|
||||
if ((inst & FEXT_MASK) == FEXT_FCVT) {
|
||||
veclen = 0;
|
||||
dest = vfp_get_sd(inst);
|
||||
} else
|
||||
dest = vfp_get_dd(inst);
|
||||
|
||||
/*
|
||||
* If destination bank is zero, vector length is always '1'.
|
||||
* ARM DDI0100F C5.1.3, C5.3.2.
|
||||
*/
|
||||
if (FREG_BANK(dd) == 0)
|
||||
if (FREG_BANK(dest) == 0)
|
||||
veclen = 0;
|
||||
|
||||
pr_debug("VFP: vecstride=%u veclen=%u\n", vecstride,
|
||||
@@ -1153,16 +1163,20 @@ u32 vfp_double_cpdo(u32 inst, u32 fpscr)
|
||||
for (vecitr = 0; vecitr <= veclen; vecitr += 1 << FPSCR_LENGTH_BIT) {
|
||||
u32 except;
|
||||
|
||||
if (op == FOP_EXT)
|
||||
if (op == FOP_EXT && (inst & FEXT_MASK) == FEXT_FCVT)
|
||||
pr_debug("VFP: itr%d (s%u) = op[%u] (d%u)\n",
|
||||
vecitr >> FPSCR_LENGTH_BIT,
|
||||
dest, dn, dm);
|
||||
else if (op == FOP_EXT)
|
||||
pr_debug("VFP: itr%d (d%u) = op[%u] (d%u)\n",
|
||||
vecitr >> FPSCR_LENGTH_BIT,
|
||||
dd, dn, dm);
|
||||
dest, dn, dm);
|
||||
else
|
||||
pr_debug("VFP: itr%d (d%u) = (d%u) op[%u] (d%u)\n",
|
||||
vecitr >> FPSCR_LENGTH_BIT,
|
||||
dd, dn, FOP_TO_IDX(op), dm);
|
||||
dest, dn, FOP_TO_IDX(op), dm);
|
||||
|
||||
except = fop(dd, dn, dm, fpscr);
|
||||
except = fop(dest, dn, dm, fpscr);
|
||||
pr_debug("VFP: itr%d: exceptions=%08x\n",
|
||||
vecitr >> FPSCR_LENGTH_BIT, except);
|
||||
|
||||
@@ -1180,7 +1194,7 @@ u32 vfp_double_cpdo(u32 inst, u32 fpscr)
|
||||
* we encounter an exception. We continue.
|
||||
*/
|
||||
|
||||
dd = FREG_BANK(dd) + ((FREG_IDX(dd) + vecstride) & 6);
|
||||
dest = FREG_BANK(dest) + ((FREG_IDX(dest) + vecstride) & 6);
|
||||
dn = FREG_BANK(dn) + ((FREG_IDX(dn) + vecstride) & 6);
|
||||
if (FREG_BANK(dm) != 0)
|
||||
dm = FREG_BANK(dm) + ((FREG_IDX(dm) + vecstride) & 6);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user