Commit 01dfd80f authored by Russell King's avatar Russell King

Merge http://linux.bkbits.net/linux-2.5

into flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5-rmk
parents 6cf73674 f7982935
...@@ -24,6 +24,7 @@ ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) ...@@ -24,6 +24,7 @@ ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
CFLAGS += -mbig-endian CFLAGS += -mbig-endian
AS += -EB AS += -EB
LD += -EB LD += -EB
AFLAGS += -mbig-endian
endif endif
check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi) check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
......
...@@ -42,11 +42,12 @@ initrd_phys-$(CONFIG_ARCH_CDB89712) := 0x00700000 ...@@ -42,11 +42,12 @@ initrd_phys-$(CONFIG_ARCH_CDB89712) := 0x00700000
ifeq ($(CONFIG_ARCH_SA1100),y) ifeq ($(CONFIG_ARCH_SA1100),y)
zreladdr-$(CONFIG_SA1111) := 0xc0208000 zreladdr-$(CONFIG_SA1111) := 0xc0208000
endif endif
zreladdr-$(CONFIG_ARCH_PXA) := 0xa0008000 zreladdr-$(CONFIG_ARCH_PXA) := 0xa0008000
zreladdr-$(CONFIG_ARCH_ANAKIN) := 0x20008000 zreladdr-$(CONFIG_ARCH_ANAKIN) := 0x20008000
zreladdr-$(CONFIG_ARCH_IQ80310) := 0xa0008000 zreladdr-$(CONFIG_ARCH_IOP3XX) := 0xa0008000
zreladdr-$(CONFIG_ARCH_IQ80321) := 0xa0008000 params-phys-$(CONFIG_ARCH_IOP3XX) := 0xa0000100
zreladdr-$(CONFIG_ARCH_ADIFCC) := 0xc0008000 zreladdr-$(CONFIG_ARCH_ADIFCC) := 0xc0008000
params-phys-$(CONFIG_ARCH_ADIFCC) := 0xc0000100
ZRELADDR := $(zreladdr-y) ZRELADDR := $(zreladdr-y)
ZTEXTADDR := $(ztextaddr-y) ZTEXTADDR := $(ztextaddr-y)
......
...@@ -41,13 +41,35 @@ static int amba_match(struct device *dev, struct device_driver *drv) ...@@ -41,13 +41,35 @@ static int amba_match(struct device *dev, struct device_driver *drv)
return amba_lookup(pcdrv->id_table, pcdev) != NULL; return amba_lookup(pcdrv->id_table, pcdev) != NULL;
} }
static int amba_suspend(struct device *dev, u32 state)
{
struct amba_driver *drv = to_amba_driver(dev->driver);
int ret = 0;
if (dev->driver && drv->suspend)
ret = drv->suspend(to_amba_device(dev), state);
return ret;
}
static int amba_resume(struct device *dev)
{
struct amba_driver *drv = to_amba_driver(dev->driver);
int ret = 0;
if (dev->driver && drv->resume)
ret = drv->resume(to_amba_device(dev));
return ret;
}
/* /*
* Primecells are part of the Advanced Microcontroller Bus Architecture, * Primecells are part of the Advanced Microcontroller Bus Architecture,
* so we call the bus "amba". * so we call the bus "amba".
*/ */
struct bus_type amba_bustype = { static struct bus_type amba_bustype = {
.name = "amba", .name = "amba",
.match = amba_match, .match = amba_match,
.suspend = amba_suspend,
.resume = amba_resume,
}; };
static int __init amba_init(void) static int __init amba_init(void)
...@@ -84,18 +106,6 @@ static void amba_shutdown(struct device *dev) ...@@ -84,18 +106,6 @@ static void amba_shutdown(struct device *dev)
drv->shutdown(to_amba_device(dev)); drv->shutdown(to_amba_device(dev));
} }
static int amba_suspend(struct device *dev, u32 state, u32 level)
{
struct amba_driver *drv = to_amba_driver(dev->driver);
return drv->suspend(to_amba_device(dev), state, level);
}
static int amba_resume(struct device *dev, u32 level)
{
struct amba_driver *drv = to_amba_driver(dev->driver);
return drv->resume(to_amba_device(dev), level);
}
/** /**
* amba_driver_register - register an AMBA device driver * amba_driver_register - register an AMBA device driver
* @drv: amba device driver structure * @drv: amba device driver structure
...@@ -112,8 +122,6 @@ int amba_driver_register(struct amba_driver *drv) ...@@ -112,8 +122,6 @@ int amba_driver_register(struct amba_driver *drv)
SETFN(probe); SETFN(probe);
SETFN(remove); SETFN(remove);
SETFN(shutdown); SETFN(shutdown);
SETFN(suspend);
SETFN(resume);
return driver_register(&drv->drv); return driver_register(&drv->drv);
} }
......
...@@ -790,10 +790,13 @@ static int sa1111_suspend(struct device *dev, u32 state, u32 level) ...@@ -790,10 +790,13 @@ static int sa1111_suspend(struct device *dev, u32 state, u32 level)
struct sa1111 *sachip = dev_get_drvdata(dev); struct sa1111 *sachip = dev_get_drvdata(dev);
struct sa1111_save_data *save; struct sa1111_save_data *save;
unsigned long flags; unsigned long flags;
unsigned int val;
char *base; char *base;
if (!dev->saved_state && level == SUSPEND_NOTIFY) if (level != SUSPEND_DISABLE)
dev->saved_state = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL); return 0;
dev->saved_state = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL);
if (!dev->saved_state) if (!dev->saved_state)
return -ENOMEM; return -ENOMEM;
...@@ -804,36 +807,31 @@ static int sa1111_suspend(struct device *dev, u32 state, u32 level) ...@@ -804,36 +807,31 @@ static int sa1111_suspend(struct device *dev, u32 state, u32 level)
/* /*
* Save state. * Save state.
*/ */
if (level == SUSPEND_SAVE_STATE) { base = sachip->base;
base = sachip->base; save->skcr = sa1111_readl(base + SA1111_SKCR);
save->skcr = sa1111_readl(base + SA1111_SKCR); save->skpcr = sa1111_readl(base + SA1111_SKPCR);
save->skpcr = sa1111_readl(base + SA1111_SKPCR); save->skcdr = sa1111_readl(base + SA1111_SKCDR);
save->skcdr = sa1111_readl(base + SA1111_SKCDR); save->skaud = sa1111_readl(base + SA1111_SKAUD);
save->skaud = sa1111_readl(base + SA1111_SKAUD); save->skpwm0 = sa1111_readl(base + SA1111_SKPWM0);
save->skpwm0 = sa1111_readl(base + SA1111_SKPWM0); save->skpwm1 = sa1111_readl(base + SA1111_SKPWM1);
save->skpwm1 = sa1111_readl(base + SA1111_SKPWM1);
base = sachip->base + SA1111_INTC;
base = sachip->base + SA1111_INTC; save->intpol0 = sa1111_readl(base + SA1111_INTPOL0);
save->intpol0 = sa1111_readl(base + SA1111_INTPOL0); save->intpol1 = sa1111_readl(base + SA1111_INTPOL1);
save->intpol1 = sa1111_readl(base + SA1111_INTPOL1); save->inten0 = sa1111_readl(base + SA1111_INTEN0);
save->inten0 = sa1111_readl(base + SA1111_INTEN0); save->inten1 = sa1111_readl(base + SA1111_INTEN1);
save->inten1 = sa1111_readl(base + SA1111_INTEN1); save->wakepol0 = sa1111_readl(base + SA1111_WAKEPOL0);
save->wakepol0 = sa1111_readl(base + SA1111_WAKEPOL0); save->wakepol1 = sa1111_readl(base + SA1111_WAKEPOL1);
save->wakepol1 = sa1111_readl(base + SA1111_WAKEPOL1); save->wakeen0 = sa1111_readl(base + SA1111_WAKEEN0);
save->wakeen0 = sa1111_readl(base + SA1111_WAKEEN0); save->wakeen1 = sa1111_readl(base + SA1111_WAKEEN1);
save->wakeen1 = sa1111_readl(base + SA1111_WAKEEN1);
}
/* /*
* Disable. * Disable.
*/ */
if (level == SUSPEND_POWER_DOWN && state == 4) { val = sa1111_readl(sachip->base + SA1111_SKCR);
unsigned int val = sa1111_readl(sachip->base + SA1111_SKCR); sa1111_writel(val | SKCR_SLEEP, sachip->base + SA1111_SKCR);
sa1111_writel(0, sachip->base + SA1111_SKPWM0);
sa1111_writel(val | SKCR_SLEEP, sachip->base + SA1111_SKCR); sa1111_writel(0, sachip->base + SA1111_SKPWM1);
sa1111_writel(0, sachip->base + SA1111_SKPWM0);
sa1111_writel(0, sachip->base + SA1111_SKPWM1);
}
spin_unlock_irqrestore(&sachip->lock, flags); spin_unlock_irqrestore(&sachip->lock, flags);
...@@ -857,6 +855,9 @@ static int sa1111_resume(struct device *dev, u32 level) ...@@ -857,6 +855,9 @@ static int sa1111_resume(struct device *dev, u32 level)
unsigned long flags, id; unsigned long flags, id;
char *base; char *base;
if (level != RESUME_ENABLE)
return 0;
save = (struct sa1111_save_data *)dev->saved_state; save = (struct sa1111_save_data *)dev->saved_state;
if (!save) if (!save)
return 0; return 0;
...@@ -878,39 +879,32 @@ static int sa1111_resume(struct device *dev, u32 level) ...@@ -878,39 +879,32 @@ static int sa1111_resume(struct device *dev, u32 level)
/* /*
* First of all, wake up the chip. * First of all, wake up the chip.
*/ */
if (level == RESUME_POWER_ON) { sa1111_wake(sachip);
sa1111_wake(sachip); sa1111_writel(0, sachip->base + SA1111_INTC + SA1111_INTEN0);
sa1111_writel(0, sachip->base + SA1111_INTC + SA1111_INTEN1);
sa1111_writel(0, sachip->base + SA1111_INTC + SA1111_INTEN0);
sa1111_writel(0, sachip->base + SA1111_INTC + SA1111_INTEN1); base = sachip->base;
} sa1111_writel(save->skcr, base + SA1111_SKCR);
sa1111_writel(save->skpcr, base + SA1111_SKPCR);
if (level == RESUME_RESTORE_STATE) { sa1111_writel(save->skcdr, base + SA1111_SKCDR);
base = sachip->base; sa1111_writel(save->skaud, base + SA1111_SKAUD);
sa1111_writel(save->skcr, base + SA1111_SKCR); sa1111_writel(save->skpwm0, base + SA1111_SKPWM0);
sa1111_writel(save->skpcr, base + SA1111_SKPCR); sa1111_writel(save->skpwm1, base + SA1111_SKPWM1);
sa1111_writel(save->skcdr, base + SA1111_SKCDR);
sa1111_writel(save->skaud, base + SA1111_SKAUD); base = sachip->base + SA1111_INTC;
sa1111_writel(save->skpwm0, base + SA1111_SKPWM0); sa1111_writel(save->intpol0, base + SA1111_INTPOL0);
sa1111_writel(save->skpwm1, base + SA1111_SKPWM1); sa1111_writel(save->intpol1, base + SA1111_INTPOL1);
sa1111_writel(save->inten0, base + SA1111_INTEN0);
base = sachip->base + SA1111_INTC; sa1111_writel(save->inten1, base + SA1111_INTEN1);
sa1111_writel(save->intpol0, base + SA1111_INTPOL0); sa1111_writel(save->wakepol0, base + SA1111_WAKEPOL0);
sa1111_writel(save->intpol1, base + SA1111_INTPOL1); sa1111_writel(save->wakepol1, base + SA1111_WAKEPOL1);
sa1111_writel(save->inten0, base + SA1111_INTEN0); sa1111_writel(save->wakeen0, base + SA1111_WAKEEN0);
sa1111_writel(save->inten1, base + SA1111_INTEN1); sa1111_writel(save->wakeen1, base + SA1111_WAKEEN1);
sa1111_writel(save->wakepol0, base + SA1111_WAKEPOL0);
sa1111_writel(save->wakepol1, base + SA1111_WAKEPOL1);
sa1111_writel(save->wakeen0, base + SA1111_WAKEEN0);
sa1111_writel(save->wakeen1, base + SA1111_WAKEEN1);
}
spin_unlock_irqrestore(&sachip->lock, flags); spin_unlock_irqrestore(&sachip->lock, flags);
if (level == RESUME_ENABLE) { dev->saved_state = NULL;
dev->saved_state = NULL; kfree(save);
kfree(save);
}
return 0; return 0;
} }
...@@ -1135,9 +1129,55 @@ static int sa1111_match(struct device *_dev, struct device_driver *_drv) ...@@ -1135,9 +1129,55 @@ static int sa1111_match(struct device *_dev, struct device_driver *_drv)
return dev->devid == drv->devid; return dev->devid == drv->devid;
} }
static int sa1111_bus_suspend(struct device *dev, u32 state)
{
struct sa1111_dev *sadev = SA1111_DEV(dev);
struct sa1111_driver *drv = SA1111_DRV(dev->driver);
int ret = 0;
if (drv && drv->suspend)
ret = drv->suspend(sadev, state);
return ret;
}
static int sa1111_bus_resume(struct device *dev)
{
struct sa1111_dev *sadev = SA1111_DEV(dev);
struct sa1111_driver *drv = SA1111_DRV(dev->driver);
int ret = 0;
if (drv && drv->resume)
ret = drv->resume(sadev);
return ret;
}
static int sa1111_bus_probe(struct device *dev)
{
struct sa1111_dev *sadev = SA1111_DEV(dev);
struct sa1111_driver *drv = SA1111_DRV(dev->driver);
int ret = -ENODEV;
if (drv->probe)
ret = drv->probe(sadev);
return ret;
}
static int sa1111_bus_remove(struct device *dev)
{
struct sa1111_dev *sadev = SA1111_DEV(dev);
struct sa1111_driver *drv = SA1111_DRV(dev->driver);
int ret = 0;
if (drv->remove)
ret = drv->remove(sadev);
return ret;
}
struct bus_type sa1111_bus_type = { struct bus_type sa1111_bus_type = {
.name = "RAB", .name = "sa1111-rab",
.match = sa1111_match, .match = sa1111_match,
.suspend = sa1111_bus_suspend,
.resume = sa1111_bus_resume,
}; };
static int sa1111_rab_bus_init(void) static int sa1111_rab_bus_init(void)
...@@ -1147,6 +1187,19 @@ static int sa1111_rab_bus_init(void) ...@@ -1147,6 +1187,19 @@ static int sa1111_rab_bus_init(void)
postcore_initcall(sa1111_rab_bus_init); postcore_initcall(sa1111_rab_bus_init);
int sa1111_driver_register(struct sa1111_driver *driver)
{
driver->drv.probe = sa1111_bus_probe;
driver->drv.remove = sa1111_bus_remove;
driver->drv.bus = &sa1111_bus_type;
return driver_register(&driver->drv);
}
void sa1111_driver_unregister(struct sa1111_driver *driver)
{
driver_unregister(&driver->drv);
}
EXPORT_SYMBOL(sa1111_check_dma_bug); EXPORT_SYMBOL(sa1111_check_dma_bug);
EXPORT_SYMBOL(sa1111_select_audio_mode); EXPORT_SYMBOL(sa1111_select_audio_mode);
EXPORT_SYMBOL(sa1111_set_audio_rate); EXPORT_SYMBOL(sa1111_set_audio_rate);
...@@ -1155,3 +1208,5 @@ EXPORT_SYMBOL(sa1111_enable_device); ...@@ -1155,3 +1208,5 @@ EXPORT_SYMBOL(sa1111_enable_device);
EXPORT_SYMBOL(sa1111_disable_device); EXPORT_SYMBOL(sa1111_disable_device);
EXPORT_SYMBOL(sa1111_pll_clock); EXPORT_SYMBOL(sa1111_pll_clock);
EXPORT_SYMBOL(sa1111_bus_type); EXPORT_SYMBOL(sa1111_bus_type);
EXPORT_SYMBOL(sa1111_driver_register);
EXPORT_SYMBOL(sa1111_driver_unregister);
...@@ -19,6 +19,12 @@ CONFIG_SYSVIPC=y ...@@ -19,6 +19,12 @@ CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y CONFIG_SYSCTL=y
CONFIG_LOG_BUF_SHIFT=14 CONFIG_LOG_BUF_SHIFT=14
# CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
# #
# Loadable module support # Loadable module support
...@@ -34,7 +40,6 @@ CONFIG_KMOD=y ...@@ -34,7 +40,6 @@ CONFIG_KMOD=y
# #
# CONFIG_ARCH_ADIFCC is not set # CONFIG_ARCH_ADIFCC is not set
# CONFIG_ARCH_ANAKIN is not set # CONFIG_ARCH_ANAKIN is not set
# CONFIG_ARCH_ARCA5K is not set
# CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS7500 is not set
# CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_CO285 is not set # CONFIG_ARCH_CO285 is not set
...@@ -49,14 +54,6 @@ CONFIG_ARCH_IOP3XX=y ...@@ -49,14 +54,6 @@ CONFIG_ARCH_IOP3XX=y
# CONFIG_ARCH_SA1100 is not set # CONFIG_ARCH_SA1100 is not set
# CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_SHARK is not set
#
# Archimedes/A5000 Implementations
#
#
# Archimedes/A5000 Implementations (select only ONE)
#
# #
# CLPS711X/EP721X Implementations # CLPS711X/EP721X Implementations
# #
...@@ -73,7 +70,9 @@ CONFIG_ARCH_IOP3XX=y ...@@ -73,7 +70,9 @@ CONFIG_ARCH_IOP3XX=y
# IOP3xx Implementation Options # IOP3xx Implementation Options
# #
CONFIG_ARCH_IQ80310=y CONFIG_ARCH_IQ80310=y
# CONFIG_ARCH_IQ80321 is not set
CONFIG_ARCH_IOP310=y CONFIG_ARCH_IOP310=y
# CONFIG_ARCH_IOP321 is not set
# #
# IOP3xx Chipset Features # IOP3xx Chipset Features
...@@ -83,6 +82,14 @@ CONFIG_ARCH_IOP310=y ...@@ -83,6 +82,14 @@ CONFIG_ARCH_IOP310=y
# CONFIG_IOP3XX_MU is not set # CONFIG_IOP3XX_MU is not set
# CONFIG_IOP3XX_PMON is not set # CONFIG_IOP3XX_PMON is not set
#
# ADIFCC Implementation Options
#
#
# ADI Board Types
#
# #
# Intel PXA250/210 Implementations # Intel PXA250/210 Implementations
# #
...@@ -96,6 +103,7 @@ CONFIG_ARCH_IOP310=y ...@@ -96,6 +103,7 @@ CONFIG_ARCH_IOP310=y
# #
CONFIG_CPU_32=y CONFIG_CPU_32=y
CONFIG_CPU_XSCALE=y CONFIG_CPU_XSCALE=y
CONFIG_XS80200=y
CONFIG_CPU_32v5=y CONFIG_CPU_32v5=y
# #
...@@ -115,10 +123,16 @@ CONFIG_ZBOOT_ROM_BSS=0xa1008000 ...@@ -115,10 +123,16 @@ CONFIG_ZBOOT_ROM_BSS=0xa1008000
CONFIG_PCI_NAMES=y CONFIG_PCI_NAMES=y
# CONFIG_HOTPLUG is not set # CONFIG_HOTPLUG is not set
#
# MMC/SD Card support
#
# CONFIG_MMC is not set
# #
# At least one math emulation must be selected # At least one math emulation must be selected
# #
CONFIG_FPE_NWFPE=y CONFIG_FPE_NWFPE=y
# CONFIG_FPE_NWFPE_XP is not set
# CONFIG_FPE_FASTFPE is not set # CONFIG_FPE_FASTFPE is not set
CONFIG_KCORE_ELF=y CONFIG_KCORE_ELF=y
# CONFIG_KCORE_AOUT is not set # CONFIG_KCORE_AOUT is not set
...@@ -154,6 +168,7 @@ CONFIG_MTD_CHAR=y ...@@ -154,6 +168,7 @@ CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y CONFIG_MTD_BLOCK=y
# CONFIG_FTL is not set # CONFIG_FTL is not set
# CONFIG_NFTL is not set # CONFIG_NFTL is not set
# CONFIG_INFTL is not set
# #
# RAM/ROM/Flash chip drivers # RAM/ROM/Flash chip drivers
...@@ -164,6 +179,7 @@ CONFIG_MTD_GEN_PROBE=y ...@@ -164,6 +179,7 @@ CONFIG_MTD_GEN_PROBE=y
# CONFIG_MTD_CFI_ADV_OPTIONS is not set # CONFIG_MTD_CFI_ADV_OPTIONS is not set
CONFIG_MTD_CFI_INTELEXT=y CONFIG_MTD_CFI_INTELEXT=y
# CONFIG_MTD_CFI_AMDSTD is not set # CONFIG_MTD_CFI_AMDSTD is not set
# CONFIG_MTD_CFI_STAA is not set
# CONFIG_MTD_RAM is not set # CONFIG_MTD_RAM is not set
# CONFIG_MTD_ROM is not set # CONFIG_MTD_ROM is not set
# CONFIG_MTD_ABSENT is not set # CONFIG_MTD_ABSENT is not set
...@@ -172,13 +188,11 @@ CONFIG_MTD_CFI_INTELEXT=y ...@@ -172,13 +188,11 @@ CONFIG_MTD_CFI_INTELEXT=y
# #
# Mapping drivers for chip access # Mapping drivers for chip access
# #
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
# CONFIG_MTD_PHYSMAP is not set # CONFIG_MTD_PHYSMAP is not set
# CONFIG_MTD_NORA is not set
# CONFIG_MTD_ARM_INTEGRATOR is not set # CONFIG_MTD_ARM_INTEGRATOR is not set
CONFIG_MTD_IQ80310=y CONFIG_MTD_IQ80310=y
# CONFIG_MTD_EDB7312 is not set # CONFIG_MTD_EDB7312 is not set
# CONFIG_MTD_PCI is not set
# CONFIG_MTD_UCLINUX is not set
# #
# Self-contained MTD device drivers # Self-contained MTD device drivers
...@@ -191,9 +205,9 @@ CONFIG_MTD_IQ80310=y ...@@ -191,9 +205,9 @@ CONFIG_MTD_IQ80310=y
# #
# Disk-On-Chip Device Drivers # Disk-On-Chip Device Drivers
# #
# CONFIG_MTD_DOC1000 is not set
# CONFIG_MTD_DOC2000 is not set # CONFIG_MTD_DOC2000 is not set
# CONFIG_MTD_DOC2001 is not set # CONFIG_MTD_DOC2001 is not set
# CONFIG_MTD_DOC2001PLUS is not set
# #
# NAND Flash Device Drivers # NAND Flash Device Drivers
...@@ -236,7 +250,6 @@ CONFIG_NET=y ...@@ -236,7 +250,6 @@ CONFIG_NET=y
# CONFIG_NETLINK_DEV is not set # CONFIG_NETLINK_DEV is not set
CONFIG_NETFILTER=y CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set # CONFIG_NETFILTER_DEBUG is not set
# CONFIG_FILTER is not set
CONFIG_UNIX=y CONFIG_UNIX=y
# CONFIG_NET_KEY is not set # CONFIG_NET_KEY is not set
CONFIG_INET=y CONFIG_INET=y
...@@ -253,7 +266,7 @@ CONFIG_IP_PNP_BOOTP=y ...@@ -253,7 +266,7 @@ CONFIG_IP_PNP_BOOTP=y
# CONFIG_SYN_COOKIES is not set # CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set # CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set # CONFIG_INET_ESP is not set
# CONFIG_XFRM_USER is not set # CONFIG_INET_IPCOMP is not set
# #
# IP: Netfilter Configuration # IP: Netfilter Configuration
...@@ -264,7 +277,13 @@ CONFIG_IP_PNP_BOOTP=y ...@@ -264,7 +277,13 @@ CONFIG_IP_PNP_BOOTP=y
# CONFIG_IP_NF_ARPTABLES is not set # CONFIG_IP_NF_ARPTABLES is not set
# CONFIG_IP_NF_COMPAT_IPCHAINS is not set # CONFIG_IP_NF_COMPAT_IPCHAINS is not set
# CONFIG_IP_NF_COMPAT_IPFWADM is not set # CONFIG_IP_NF_COMPAT_IPFWADM is not set
#
# IP: Virtual Server Configuration
#
# CONFIG_IP_VS is not set
# CONFIG_IPV6 is not set # CONFIG_IPV6 is not set
# CONFIG_XFRM_USER is not set
# #
# SCTP Configuration (EXPERIMENTAL) # SCTP Configuration (EXPERIMENTAL)
...@@ -310,6 +329,7 @@ CONFIG_NETDEVICES=y ...@@ -310,6 +329,7 @@ CONFIG_NETDEVICES=y
# #
CONFIG_NET_ETHERNET=y CONFIG_NET_ETHERNET=y
CONFIG_MII=y CONFIG_MII=y
# CONFIG_SMC91X is not set
# CONFIG_HAPPYMEAL is not set # CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set # CONFIG_SUNGEM is not set
# CONFIG_NET_VENDOR_3COM is not set # CONFIG_NET_VENDOR_3COM is not set
...@@ -351,6 +371,11 @@ CONFIG_EEPRO100=y ...@@ -351,6 +371,11 @@ CONFIG_EEPRO100=y
# CONFIG_R8169 is not set # CONFIG_R8169 is not set
# CONFIG_SK98LIN is not set # CONFIG_SK98LIN is not set
# CONFIG_TIGON3 is not set # CONFIG_TIGON3 is not set
#
# Ethernet (10000 Mbit)
#
# CONFIG_IXGB is not set
# CONFIG_FDDI is not set # CONFIG_FDDI is not set
# CONFIG_HIPPI is not set # CONFIG_HIPPI is not set
# CONFIG_PPP is not set # CONFIG_PPP is not set
...@@ -402,6 +427,7 @@ CONFIG_BLK_DEV_IDEDISK=y ...@@ -402,6 +427,7 @@ CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDECD=y CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDEFLOPPY is not set # CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_IDE_TASK_IOCTL is not set # CONFIG_IDE_TASK_IOCTL is not set
# CONFIG_IDE_TASKFILE_IO is not set
# #
# IDE chipset support/bugfixes # IDE chipset support/bugfixes
...@@ -409,7 +435,7 @@ CONFIG_BLK_DEV_IDECD=y ...@@ -409,7 +435,7 @@ CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDEPCI is not set # CONFIG_BLK_DEV_IDEPCI is not set
# #
# SCSI support # SCSI device support
# #
# CONFIG_SCSI is not set # CONFIG_SCSI is not set
...@@ -481,6 +507,7 @@ CONFIG_UNIX98_PTY_COUNT=256 ...@@ -481,6 +507,7 @@ CONFIG_UNIX98_PTY_COUNT=256
# #
# I2C Hardware Sensors Chip support # I2C Hardware Sensors Chip support
# #
# CONFIG_I2C_SENSOR is not set
# #
# L3 serial bus support # L3 serial bus support
...@@ -534,6 +561,8 @@ CONFIG_VIDEO_DEV=y ...@@ -534,6 +561,8 @@ CONFIG_VIDEO_DEV=y
# CONFIG_VIDEO_PMS is not set # CONFIG_VIDEO_PMS is not set
# CONFIG_VIDEO_CPIA is not set # CONFIG_VIDEO_CPIA is not set
# CONFIG_VIDEO_STRADIS is not set # CONFIG_VIDEO_STRADIS is not set
# CONFIG_VIDEO_HEXIUM_ORION is not set
# CONFIG_VIDEO_HEXIUM_GEMINI is not set
# #
# Radio Adapters # Radio Adapters
...@@ -551,18 +580,29 @@ CONFIG_DVB_CORE=y ...@@ -551,18 +580,29 @@ CONFIG_DVB_CORE=y
# #
# Supported Frontend Modules # Supported Frontend Modules
# #
CONFIG_DVB_ALPS_BSRU6=y # CONFIG_DVB_STV0299 is not set
# CONFIG_DVB_ALPS_BSRV2 is not set # CONFIG_DVB_ALPS_BSRV2 is not set
# CONFIG_DVB_ALPS_TDLB7 is not set # CONFIG_DVB_ALPS_TDLB7 is not set
# CONFIG_DVB_ALPS_TDMB7 is not set # CONFIG_DVB_ALPS_TDMB7 is not set
# CONFIG_DVB_ATMEL_AT76C651 is not set
# CONFIG_DVB_CX24110 is not set
# CONFIG_DVB_GRUNDIG_29504_491 is not set # CONFIG_DVB_GRUNDIG_29504_491 is not set
# CONFIG_DVB_GRUNDIG_29504_401 is not set # CONFIG_DVB_GRUNDIG_29504_401 is not set
# CONFIG_DVB_MT312 is not set
# CONFIG_DVB_VES1820 is not set # CONFIG_DVB_VES1820 is not set
# CONFIG_DVB_TDA1004X is not set
# #
# Supported DVB Adapters # Supported SAA7146 based PCI Adapters
# #
# CONFIG_DVB_AV7110 is not set # CONFIG_DVB_AV7110 is not set
# CONFIG_DVB_BUDGET is not set
#
# Supported FlexCopII (B2C2) Adapters
#
# CONFIG_DVB_B2C2_SKYSTAR is not set
# CONFIG_VIDEO_BTCX is not set
# #
# File systems # File systems
...@@ -598,6 +638,7 @@ CONFIG_EXT2_FS=y ...@@ -598,6 +638,7 @@ CONFIG_EXT2_FS=y
CONFIG_PROC_FS=y CONFIG_PROC_FS=y
# CONFIG_DEVFS_FS is not set # CONFIG_DEVFS_FS is not set
CONFIG_DEVPTS_FS=y CONFIG_DEVPTS_FS=y
# CONFIG_DEVPTS_FS_XATTR is not set
CONFIG_TMPFS=y CONFIG_TMPFS=y
CONFIG_RAMFS=y CONFIG_RAMFS=y
...@@ -631,13 +672,13 @@ CONFIG_NFS_FS=y ...@@ -631,13 +672,13 @@ CONFIG_NFS_FS=y
CONFIG_ROOT_NFS=y CONFIG_ROOT_NFS=y
CONFIG_LOCKD=y CONFIG_LOCKD=y
# CONFIG_EXPORTFS is not set # CONFIG_EXPORTFS is not set
CONFIG_SUNRPC=y
# CONFIG_SUNRPC_GSS is not set
# CONFIG_SMB_FS is not set # CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set # CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set # CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set # CONFIG_CODA_FS is not set
# CONFIG_INTERMEZZO_FS is not set # CONFIG_INTERMEZZO_FS is not set
CONFIG_SUNRPC=y
# CONFIG_SUNRPC_GSS is not set
# CONFIG_AFS_FS is not set # CONFIG_AFS_FS is not set
# #
...@@ -655,6 +696,7 @@ CONFIG_MSDOS_PARTITION=y ...@@ -655,6 +696,7 @@ CONFIG_MSDOS_PARTITION=y
# CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_SOLARIS_X86_PARTITION is not set
# CONFIG_UNIXWARE_DISKLABEL is not set # CONFIG_UNIXWARE_DISKLABEL is not set
# CONFIG_LDM_PARTITION is not set # CONFIG_LDM_PARTITION is not set
# CONFIG_NEC98_PARTITION is not set
# CONFIG_SGI_PARTITION is not set # CONFIG_SGI_PARTITION is not set
# CONFIG_ULTRIX_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set
# CONFIG_SUN_PARTITION is not set # CONFIG_SUN_PARTITION is not set
...@@ -665,13 +707,6 @@ CONFIG_MSDOS_PARTITION=y ...@@ -665,13 +707,6 @@ CONFIG_MSDOS_PARTITION=y
# #
# CONFIG_FB is not set # 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 # Sound
# #
...@@ -695,6 +730,7 @@ CONFIG_DUMMY_CONSOLE=y ...@@ -695,6 +730,7 @@ CONFIG_DUMMY_CONSOLE=y
# USB support # USB support
# #
# CONFIG_USB is not set # CONFIG_USB is not set
# CONFIG_USB_GADGET is not set
# #
# Bluetooth support # Bluetooth support
...@@ -714,7 +750,6 @@ CONFIG_DEBUG_KERNEL=y ...@@ -714,7 +750,6 @@ CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_WAITQ is not set # CONFIG_DEBUG_WAITQ is not set
CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_ERRORS=y CONFIG_DEBUG_ERRORS=y
CONFIG_KALLSYMS=y
CONFIG_DEBUG_LL=y CONFIG_DEBUG_LL=y
# #
......
This diff is collapsed.
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/completion.h> #include <linux/completion.h>
#include <asm/apm.h> /* apm_power_info */
#include <asm/system.h> #include <asm/system.h>
/* /*
...@@ -93,18 +94,7 @@ static DECLARE_COMPLETION(kapmd_exit); ...@@ -93,18 +94,7 @@ static DECLARE_COMPLETION(kapmd_exit);
static const char driver_version[] = "1.13"; /* no spaces */ static const char driver_version[] = "1.13"; /* no spaces */
/*
* This structure gets filled in by the machine specific 'get_power_status'
* implementation. Any fields which are not set default to a safe value.
*/
struct apm_power_info {
unsigned char ac_line_status;
unsigned char battery_status;
unsigned char battery_flag;
unsigned char battery_life;
int time;
int units;
};
/* /*
* Compatibility cruft until the IPAQ people move over to the new * Compatibility cruft until the IPAQ people move over to the new
......
...@@ -263,7 +263,7 @@ struct pci_fixup pcibios_fixups[] = { ...@@ -263,7 +263,7 @@ struct pci_fixup pcibios_fixups[] = {
void __devinit pcibios_update_irq(struct pci_dev *dev, int irq) void __devinit pcibios_update_irq(struct pci_dev *dev, int irq)
{ {
if (debug_pci) if (debug_pci)
printk("PCI: Assigning IRQ %02d to %s\n", irq, dev->dev.name); printk("PCI: Assigning IRQ %02d to %s\n", irq, pci_name(dev));
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq); pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq);
} }
...@@ -362,6 +362,19 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) ...@@ -362,6 +362,19 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
isa_bridge = dev; isa_bridge = dev;
break; break;
#endif #endif
case PCI_CLASS_BRIDGE_PCI:
pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &status);
status |= PCI_BRIDGE_CTL_PARITY|PCI_BRIDGE_CTL_MASTER_ABORT;
status &= ~(PCI_BRIDGE_CTL_BUS_RESET|PCI_BRIDGE_CTL_FAST_BACK);
pci_write_config_word(dev, PCI_BRIDGE_CONTROL, status);
break;
case PCI_CLASS_BRIDGE_CARDBUS:
pci_read_config_word(dev, PCI_CB_BRIDGE_CONTROL, &status);
status |= PCI_CB_BRIDGE_CTL_PARITY|PCI_CB_BRIDGE_CTL_MASTER_ABORT;
pci_write_config_word(dev, PCI_CB_BRIDGE_CONTROL, status);
break;
}
} }
/* /*
......
...@@ -896,7 +896,7 @@ static DEVICE_ATTR(resource, S_IRUGO, ecard_show_resources, NULL); ...@@ -896,7 +896,7 @@ static DEVICE_ATTR(resource, S_IRUGO, ecard_show_resources, NULL);
static ssize_t ecard_show_vendor(struct device *dev, char *buf) static ssize_t ecard_show_vendor(struct device *dev, char *buf)
{ {
struct expansion_card *ec = ECARD_DEV(dev); struct expansion_card *ec = ECARD_DEV(dev);
return sprintf(buf, "%u\n", ec->manufacturer); return sprintf(buf, "%u\n", ec->cid.manufacturer);
} }
static DEVICE_ATTR(vendor, S_IRUGO, ecard_show_vendor, NULL); static DEVICE_ATTR(vendor, S_IRUGO, ecard_show_vendor, NULL);
...@@ -904,7 +904,7 @@ static DEVICE_ATTR(vendor, S_IRUGO, ecard_show_vendor, NULL); ...@@ -904,7 +904,7 @@ static DEVICE_ATTR(vendor, S_IRUGO, ecard_show_vendor, NULL);
static ssize_t ecard_show_device(struct device *dev, char *buf) static ssize_t ecard_show_device(struct device *dev, char *buf)
{ {
struct expansion_card *ec = ECARD_DEV(dev); struct expansion_card *ec = ECARD_DEV(dev);
return sprintf(buf, "%u\n", ec->product); return sprintf(buf, "%u\n", ec->cid.product);
} }
static DEVICE_ATTR(device, S_IRUGO, ecard_show_device, NULL); static DEVICE_ATTR(device, S_IRUGO, ecard_show_device, NULL);
......
...@@ -63,13 +63,7 @@ ...@@ -63,13 +63,7 @@
#define S_OFF 8 #define S_OFF 8
.macro set_cpsr_c, reg, mode .macro set_cpsr_c, reg, mode
#if 1
/* broken binutils */
mov \reg, \mode
msr cpsr_c, \reg
#else
msr cpsr_c, \mode msr cpsr_c, \mode
#endif
.endm .endm
.macro disable_irq, temp .macro disable_irq, temp
......
...@@ -36,23 +36,7 @@ int suspend(void) ...@@ -36,23 +36,7 @@ int suspend(void)
if (ret != 0) if (ret != 0)
goto out; goto out;
/* device_suspend(3);
* Tell LDM devices we're going to suspend.
*/
ret = device_suspend(4, SUSPEND_NOTIFY);
if (ret != 0)
goto resume_legacy;
/*
* Disable, devices, and save state.
*/
device_suspend(4, SUSPEND_DISABLE);
device_suspend(4, SUSPEND_SAVE_STATE);
/*
* Tell devices that they're going to be powered off.
*/
device_suspend(4, SUSPEND_POWER_DOWN);
local_irq_disable(); local_irq_disable();
leds_event(led_stop); leds_event(led_stop);
...@@ -62,21 +46,8 @@ int suspend(void) ...@@ -62,21 +46,8 @@ int suspend(void)
leds_event(led_start); leds_event(led_start);
local_irq_enable(); local_irq_enable();
/* device_resume();
* Tell devices that they now have power.
*/
device_resume(RESUME_POWER_ON);
/*
* Resume LDM devices.
*/
device_resume(RESUME_RESTORE_STATE);
device_resume(RESUME_ENABLE);
resume_legacy:
/*
* Resume "legacy" devices.
*/
pm_send_all(PM_RESUME, (void *)0); pm_send_all(PM_RESUME, (void *)0);
out: out:
......
#include <linux/config.h> /* ld script to make ARM Linux kernel
* taken from the i386 version by Russell King
* Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
*/
#ifdef CONFIG_CPU_26 #include <asm-generic/vmlinux.lds.h>
OUTPUT_ARCH(arm)
ENTRY(stext)
#ifndef __ARMEB__
jiffies = jiffies_64;
#else
jiffies = jiffies_64 + 4;
#endif
SECTIONS
{
. = TEXTADDR;
.init : { /* Init code and data */
_stext = .;
__init_begin = .;
_sinittext = .;
*(.init.text)
_einittext = .;
__proc_info_begin = .;
*(.proc.info)
__proc_info_end = .;
__arch_info_begin = .;
*(.arch.info)
__arch_info_end = .;
__tagtable_begin = .;
*(.taglist)
__tagtable_end = .;
*(.init.data)
. = ALIGN(16);
__setup_start = .;
*(.init.setup)
__setup_end = .;
__early_begin = .;
*(__early_param)
__early_end = .;
__start___param = .;
*(__param)
__stop___param = .;
__initcall_start = .;
*(.initcall1.init)
*(.initcall2.init)
*(.initcall3.init)
*(.initcall4.init)
*(.initcall5.init)
*(.initcall6.init)
*(.initcall7.init)
__initcall_end = .;
__con_initcall_start = .;
*(.con_initcall.init)
__con_initcall_end = .;
__security_initcall_start = .;
*(.security_initcall.init)
__security_initcall_end = .;
. = ALIGN(32);
__initramfs_start = .;
usr/built-in.o(.init.ramfs)
__initramfs_end = .;
. = ALIGN(4096);
__init_end = .;
}
#ifdef CONFIG_ROM_KERNEL /DISCARD/ : { /* Exit code and data */
*(.exit.text)
*(.exit.data)
*(.exitcall.exit)
}
#include "vmlinux-armo-rom.lds.in" .text : { /* Real text segment */
_text = .; /* Text and read-only data */
*(.text)
*(.fixup)
*(.gnu.warning)
*(.rodata)
*(.rodata.*)
*(.glue_7)
*(.glue_7t)
*(.got) /* Global offset table */
#else _etext = .; /* End of text section */
}
#include "vmlinux-armo.lds.in" . = ALIGN(16);
__ex_table : { /* Exception table */
__start___ex_table = .;
*(__ex_table)
__stop___ex_table = .;
}
#endif RODATA
#endif . = ALIGN(8192);
#ifdef CONFIG_CPU_32 .data : {
/*
* first, the init task union, aligned
* to an 8192 byte boundary.
*/
*(.init.task)
#include "vmlinux-armv.lds.in" /*
* then the cacheline aligned data
*/
. = ALIGN(32);
*(.data.cacheline_aligned)
#endif /*
* and the usual data section
*/
*(.data)
CONSTRUCTORS
_edata = .;
}
.bss : {
__bss_start = .; /* BSS */
*(.bss)
*(COMMON)
_end = . ;
}
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
}
...@@ -36,8 +36,8 @@ static int __init netwinder_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ...@@ -36,8 +36,8 @@ static int __init netwinder_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
return IRQ_NETWINDER_ETHER10; return IRQ_NETWINDER_ETHER10;
default: default:
printk(KERN_ERR "PCI: unknown device in slot %s: %s\n", printk(KERN_ERR "PCI: unknown device in slot %s\n",
pci_name(dev), dev->dev.name); pci_name(dev));
return 0; return 0;
} }
} }
......
...@@ -51,7 +51,8 @@ static unsigned long iop321_gettimeoffset(void) ...@@ -51,7 +51,8 @@ static unsigned long iop321_gettimeoffset(void)
return usec; return usec;
} }
static void iop321_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) static irqreturn_t
iop321_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{ {
u32 tisr; u32 tisr;
...@@ -62,6 +63,8 @@ static void iop321_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -62,6 +63,8 @@ static void iop321_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (tisr)); asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (tisr));
do_timer(regs); do_timer(regs);
return IRQ_HANDLED;
} }
extern unsigned long (*gettimeoffset)(void); extern unsigned long (*gettimeoffset)(void);
......
...@@ -88,7 +88,8 @@ static unsigned long iq80310_gettimeoffset (void) ...@@ -88,7 +88,8 @@ static unsigned long iq80310_gettimeoffset (void)
} }
static void iq80310_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) static irqreturn_t
iq80310_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{ {
volatile u_char *timer_en = (volatile u_char *)IQ80310_TIMER_EN; volatile u_char *timer_en = (volatile u_char *)IQ80310_TIMER_EN;
...@@ -96,21 +97,9 @@ static void iq80310_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -96,21 +97,9 @@ static void iq80310_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
*timer_en &= ~2; *timer_en &= ~2;
*timer_en |= 2; *timer_en |= 2;
/*
* AHEM..HACK
*
* Since the timer interrupt is cascaded through the CPLD and
* the 80312 and the demux code calls do_IRQ, the irq count is
* going to be at least 2 when we get here and this will cause the
* kernel to increment the system tick counter even if we're
* idle. This causes it to look like there's always 100% system
* time, which is not the case. To get around it, we just decrement
* the IRQ count before calling do_timer. We increment it again
* b/c otherwise it will go negative and than bad things happen.
*
* -DS
*/
do_timer(regs); do_timer(regs);
return IRQ_HANDLED;
} }
extern unsigned long (*gettimeoffset)(void); extern unsigned long (*gettimeoffset)(void);
...@@ -126,7 +115,9 @@ void __init time_init(void) ...@@ -126,7 +115,9 @@ void __init time_init(void)
volatile u_char *timer_en = (volatile u_char *)IQ80310_TIMER_EN; volatile u_char *timer_en = (volatile u_char *)IQ80310_TIMER_EN;
gettimeoffset = iq80310_gettimeoffset; gettimeoffset = iq80310_gettimeoffset;
setup_irq(IRQ_IQ80310_TIMER, &timer_irq); setup_irq(IRQ_IQ80310_TIMER, &timer_irq);
*timer_en = 0; *timer_en = 0;
iq80310_write_timer(LATCH); iq80310_write_timer(LATCH);
*timer_en |= 2; *timer_en |= 2;
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/leds.h> #include <asm/leds.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/arch/simpad.h>
#include "leds.h" #include "leds.h"
......
...@@ -41,6 +41,8 @@ sa1100_leds_init(void) ...@@ -41,6 +41,8 @@ sa1100_leds_init(void)
leds_event = adsbitsy_leds_event; leds_event = adsbitsy_leds_event;
if (machine_is_pt_system3()) if (machine_is_pt_system3())
leds_event = system3_leds_event; leds_event = system3_leds_event;
if (machine_is_simpad())
leds_event = simpad_leds_event; /* what about machine registry? including led, apm... -zecke */
leds_event(led_start); leds_event(led_start);
return 0; return 0;
......
...@@ -11,3 +11,4 @@ extern void pfs168_leds_event(led_event_t evt); ...@@ -11,3 +11,4 @@ extern void pfs168_leds_event(led_event_t evt);
extern void graphicsmaster_leds_event(led_event_t evt); extern void graphicsmaster_leds_event(led_event_t evt);
extern void adsbitsy_leds_event(led_event_t evt); extern void adsbitsy_leds_event(led_event_t evt);
extern void system3_leds_event(led_event_t evt); extern void system3_leds_event(led_event_t evt);
extern void simpad_leds_event(led_event_t evt);
/* ld script to make ARM Linux kernel
* taken from the i386 version by Russell King
* Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
*/
#include <asm-generic/vmlinux.lds.h>
OUTPUT_ARCH(arm)
ENTRY(stext)
jiffies = jiffies_64;
SECTIONS
{
. = TEXTADDR;
.init : { /* Init code and data */
_stext = .;
__init_begin = .;
_sinittext = .;
*(.init.text)
_einittext = .;
__proc_info_begin = .;
*(.proc.info)
__proc_info_end = .;
__arch_info_begin = .;
*(.arch.info)
__arch_info_end = .;
__tagtable_begin = .;
*(.taglist)
__tagtable_end = .;
*(.init.data)
. = ALIGN(16);
__setup_start = .;
*(.init.setup)
__setup_end = .;
__initcall_start = .;
*(.initcall1.init)
*(.initcall2.init)
*(.initcall3.init)
*(.initcall4.init)
*(.initcall5.init)
*(.initcall6.init)
*(.initcall7.init)
__initcall_end = .;
__con_initcall_start = .;
*(.con_initcall.init)
__con_initcall_end = .;
SECURITY_INIT
. = ALIGN(32768);
__init_end = .;
}
.init.task : {
*(.init.task)
}
/DISCARD/ : { /* Exit code and data */
*(.exit.text)
*(.exit.data)
*(.exitcall.exit)
}
.text : { /* Real text segment */
_text = .; /* Text and read-only data */
*(.text)
*(.fixup)
*(.gnu.warning)
*(.rodata)
*(.rodata.*)
*(.glue_7)
*(.glue_7t)
*(.got) /* Global offset table */
_etext = .; /* End of text section */
}
. = ALIGN(16);
__ex_table : { /* Exception table */
__start___ex_table = .;
*(__ex_table)
__stop___ex_table = .;
}
RODATA
.data : {
/*
* The cacheline aligned data
*/
. = ALIGN(32);
*(.data.cacheline_aligned)
/*
* and the usual data section
*/
*(.data)
CONSTRUCTORS
_edata = .;
}
.bss : {
__bss_start = .; /* BSS */
*(.bss)
*(COMMON)
_end = . ;
}
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
}
/* ld script to make ARM Linux kernel
* taken from the i386 version by Russell King
* Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
*/
#include <asm-generic/vmlinux.lds.h>
OUTPUT_ARCH(arm)
ENTRY(stext)
#ifndef __ARMEB__
jiffies = jiffies_64;
#else
jiffies = jiffies_64 + 4;
#endif
SECTIONS
{
. = TEXTADDR;
.init : { /* Init code and data */
_stext = .;
__init_begin = .;
_sinittext = .;
*(.init.text)
_einittext = .;
__proc_info_begin = .;
*(.proc.info)
__proc_info_end = .;
__arch_info_begin = .;
*(.arch.info)
__arch_info_end = .;
__tagtable_begin = .;
*(.taglist)
__tagtable_end = .;
*(.init.data)
. = ALIGN(16);
__setup_start = .;
*(.init.setup)
__setup_end = .;
__early_begin = .;
*(__early_param)
__early_end = .;
__start___param = .;
*(__param)
__stop___param = .;
__initcall_start = .;
*(.initcall1.init)
*(.initcall2.init)
*(.initcall3.init)
*(.initcall4.init)
*(.initcall5.init)
*(.initcall6.init)
*(.initcall7.init)
__initcall_end = .;
__con_initcall_start = .;
*(.con_initcall.init)
__con_initcall_end = .;
__security_initcall_start = .;
*(.security_initcall.init)
__security_initcall_end = .;
. = ALIGN(32);
__initramfs_start = .;
usr/built-in.o(.init.ramfs)
__initramfs_end = .;
. = ALIGN(4096);
__init_end = .;
}
/DISCARD/ : { /* Exit code and data */
*(.exit.text)
*(.exit.data)
*(.exitcall.exit)
}
.text : { /* Real text segment */
_text = .; /* Text and read-only data */
*(.text)
*(.fixup)
*(.gnu.warning)
*(.rodata)
*(.rodata.*)
*(.glue_7)
*(.glue_7t)
*(.got) /* Global offset table */
_etext = .; /* End of text section */
}
. = ALIGN(16);
__ex_table : { /* Exception table */
__start___ex_table = .;
*(__ex_table)
__stop___ex_table = .;
}
RODATA
. = ALIGN(8192);
.data : {
/*
* first, the init task union, aligned
* to an 8192 byte boundary.
*/
*(.init.task)
/*
* then the cacheline aligned data
*/
. = ALIGN(32);
*(.data.cacheline_aligned)
/*
* and the usual data section
*/
*(.data)
CONSTRUCTORS
_edata = .;
}
.bss : {
__bss_start = .; /* BSS */
*(.bss)
*(COMMON)
_end = . ;
}
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
}
...@@ -62,9 +62,9 @@ static irqreturn_t ps2_rxint(int irq, void *dev_id, struct pt_regs *regs) ...@@ -62,9 +62,9 @@ static irqreturn_t ps2_rxint(int irq, void *dev_id, struct pt_regs *regs)
serio_interrupt(&ps2if->io, scancode, flag, regs); serio_interrupt(&ps2if->io, scancode, flag, regs);
status = sa1111_readl(ps2if->base + SA1111_PS2STAT); status = sa1111_readl(ps2if->base + SA1111_PS2STAT);
handled = IRQ_HANDLED; handled = IRQ_HANDLED;
} }
return handled; return handled;
...@@ -232,9 +232,8 @@ static int __init ps2_test(struct ps2if *ps2if) ...@@ -232,9 +232,8 @@ static int __init ps2_test(struct ps2if *ps2if)
/* /*
* Add one device to this driver. * Add one device to this driver.
*/ */
static int ps2_probe(struct device *dev) static int ps2_probe(struct sa1111_dev *dev)
{ {
struct sa1111_dev *sadev = SA1111_DEV(dev);
struct ps2if *ps2if; struct ps2if *ps2if;
int ret; int ret;
...@@ -249,20 +248,20 @@ static int ps2_probe(struct device *dev) ...@@ -249,20 +248,20 @@ static int ps2_probe(struct device *dev)
ps2if->io.write = ps2_write; ps2if->io.write = ps2_write;
ps2if->io.open = ps2_open; ps2if->io.open = ps2_open;
ps2if->io.close = ps2_close; ps2if->io.close = ps2_close;
ps2if->io.name = dev->name; ps2if->io.name = dev->dev.bus_id;
ps2if->io.phys = dev->bus_id; ps2if->io.phys = dev->dev.bus_id;
ps2if->io.driver = ps2if; ps2if->io.driver = ps2if;
ps2if->dev = sadev; ps2if->dev = dev;
dev->driver_data = ps2if; sa1111_set_drvdata(dev, ps2if);
spin_lock_init(&ps2if->lock); spin_lock_init(&ps2if->lock);
/* /*
* Request the physical region for this PS2 port. * Request the physical region for this PS2 port.
*/ */
if (!request_mem_region(sadev->res.start, if (!request_mem_region(dev->res.start,
sadev->res.end - sadev->res.start + 1, dev->res.end - dev->res.start + 1,
SA1111_DRIVER_NAME(sadev))) { SA1111_DRIVER_NAME(dev))) {
ret = -EBUSY; ret = -EBUSY;
goto free; goto free;
} }
...@@ -270,7 +269,7 @@ static int ps2_probe(struct device *dev) ...@@ -270,7 +269,7 @@ static int ps2_probe(struct device *dev)
/* /*
* Our parent device has already mapped the region. * Our parent device has already mapped the region.
*/ */
ps2if->base = (unsigned long)sadev->mapbase; ps2if->base = (unsigned long)dev->mapbase;
sa1111_enable_device(ps2if->dev); sa1111_enable_device(ps2if->dev);
...@@ -301,10 +300,10 @@ static int ps2_probe(struct device *dev) ...@@ -301,10 +300,10 @@ static int ps2_probe(struct device *dev)
out: out:
sa1111_disable_device(ps2if->dev); sa1111_disable_device(ps2if->dev);
release_mem_region(sadev->res.start, release_mem_region(dev->res.start,
sadev->res.end - sadev->res.start + 1); dev->res.end - dev->res.start + 1);
free: free:
dev->driver_data = NULL; sa1111_set_drvdata(dev, NULL);
kfree(ps2if); kfree(ps2if);
return ret; return ret;
} }
...@@ -312,31 +311,17 @@ static int ps2_probe(struct device *dev) ...@@ -312,31 +311,17 @@ static int ps2_probe(struct device *dev)
/* /*
* Remove one device from this driver. * Remove one device from this driver.
*/ */
static int ps2_remove(struct device *dev) static int ps2_remove(struct sa1111_dev *dev)
{ {
struct ps2if *ps2if = dev->driver_data; struct ps2if *ps2if = sa1111_get_drvdata(dev);
struct sa1111_dev *sadev = SA1111_DEV(dev);
serio_unregister_port(&ps2if->io); serio_unregister_port(&ps2if->io);
release_mem_region(sadev->res.start, release_mem_region(dev->res.start,
sadev->res.end - sadev->res.start + 1); dev->res.end - dev->res.start + 1);
kfree(ps2if); sa1111_set_drvdata(dev, NULL);
dev->driver_data = NULL;
return 0;
}
/* kfree(ps2if);
* We should probably do something here, but what?
*/
static int ps2_suspend(struct device *dev, u32 state, u32 level)
{
return 0;
}
static int ps2_resume(struct device *dev, u32 level)
{
return 0; return 0;
} }
...@@ -345,24 +330,21 @@ static int ps2_resume(struct device *dev, u32 level) ...@@ -345,24 +330,21 @@ static int ps2_resume(struct device *dev, u32 level)
*/ */
static struct sa1111_driver ps2_driver = { static struct sa1111_driver ps2_driver = {
.drv = { .drv = {
.name = "sa1111-ps2", .name = "sa1111-ps2",
.bus = &sa1111_bus_type,
.probe = ps2_probe,
.remove = ps2_remove,
.suspend = ps2_suspend,
.resume = ps2_resume,
}, },
.devid = SA1111_DEVID_PS2, .devid = SA1111_DEVID_PS2,
.probe = ps2_probe,
.remove = ps2_remove,
}; };
static int __init ps2_init(void) static int __init ps2_init(void)
{ {
return driver_register(&ps2_driver.drv); return sa1111_driver_register(&ps2_driver);
} }
static void __exit ps2_exit(void) static void __exit ps2_exit(void)
{ {
driver_unregister(&ps2_driver.drv); sa1111_driver_unregister(&ps2_driver);
} }
module_init(ps2_init); module_init(ps2_init);
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/hardware/sa1111.h> #include <asm/hardware/sa1111.h>
#include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include "sa1111_generic.h" #include "sa1111_generic.h"
...@@ -118,16 +119,15 @@ void sa1111_pcmcia_socket_suspend(struct sa1100_pcmcia_socket *skt) ...@@ -118,16 +119,15 @@ void sa1111_pcmcia_socket_suspend(struct sa1100_pcmcia_socket *skt)
sa11xx_disable_irqs(skt, irqs, ARRAY_SIZE(irqs)); sa11xx_disable_irqs(skt, irqs, ARRAY_SIZE(irqs));
} }
static int pcmcia_probe(struct device *dev) static int pcmcia_probe(struct sa1111_dev *dev)
{ {
struct sa1111_dev *sadev = SA1111_DEV(dev);
char *base; char *base;
if (!request_mem_region(sadev->res.start, 512, if (!request_mem_region(dev->res.start, 512,
SA1111_DRIVER_NAME(sadev))) SA1111_DRIVER_NAME(dev)))
return -EBUSY; return -EBUSY;
base = sadev->mapbase; base = dev->mapbase;
/* /*
* Initialise the suspend state. * Initialise the suspend state.
...@@ -136,61 +136,68 @@ static int pcmcia_probe(struct device *dev) ...@@ -136,61 +136,68 @@ static int pcmcia_probe(struct device *dev)
sa1111_writel(PCCR_S0_FLT | PCCR_S1_FLT, base + SA1111_PCCR); sa1111_writel(PCCR_S0_FLT | PCCR_S1_FLT, base + SA1111_PCCR);
#ifdef CONFIG_SA1100_ADSBITSY #ifdef CONFIG_SA1100_ADSBITSY
pcmcia_adsbitsy_init(dev); pcmcia_adsbitsy_init(&dev->dev);
#endif #endif
#ifdef CONFIG_SA1100_BADGE4 #ifdef CONFIG_SA1100_BADGE4
pcmcia_badge4_init(dev); pcmcia_badge4_init(&dev->dev);
#endif #endif
#ifdef CONFIG_SA1100_GRAPHICSMASTER #ifdef CONFIG_SA1100_GRAPHICSMASTER
pcmcia_graphicsmaster_init(dev); pcmcia_graphicsmaster_init(&dev->dev);
#endif #endif
#ifdef CONFIG_SA1100_JORNADA720 #ifdef CONFIG_SA1100_JORNADA720
pcmcia_jornada720_init(dev); pcmcia_jornada720_init(&dev->dev);
#endif #endif
#ifdef CONFIG_ASSABET_NEPONSET #ifdef CONFIG_ASSABET_NEPONSET
pcmcia_neponset_init(dev); pcmcia_neponset_init(&dev->dev);
#endif #endif
#ifdef CONFIG_SA1100_PFS168 #ifdef CONFIG_SA1100_PFS168
pcmcia_pfs_init(dev); pcmcia_pfs_init(&dev->dev);
#endif #endif
#ifdef CONFIG_SA1100_PT_SYSTEM3 #ifdef CONFIG_SA1100_PT_SYSTEM3
pcmcia_system3_init(dev); pcmcia_system3_init(&dev->dev);
#endif #endif
#ifdef CONFIG_SA1100_XP860 #ifdef CONFIG_SA1100_XP860
pcmcia_xp860_init(dev); pcmcia_xp860_init(&dev->dev);
#endif #endif
return 0; return 0;
} }
static int __devexit pcmcia_remove(struct device *dev) static int __devexit pcmcia_remove(struct sa1111_dev *dev)
{ {
struct sa1111_dev *sadev = SA1111_DEV(dev); sa11xx_drv_pcmcia_remove(&dev->dev);
release_mem_region(dev->res.start, 512);
sa11xx_drv_pcmcia_remove(dev);
release_mem_region(sadev->res.start, 512);
return 0; return 0;
} }
static int pcmcia_suspend(struct sa1111_dev *dev, u32 state)
{
return pcmcia_socket_dev_suspend(&dev->dev, state, SUSPEND_SAVE_STATE);
}
static int pcmcia_resume(struct sa1111_dev *dev)
{
return pcmcia_socket_dev_resume(&dev->dev, RESUME_RESTORE_STATE);
}
static struct sa1111_driver pcmcia_driver = { static struct sa1111_driver pcmcia_driver = {
.drv = { .drv = {
.name = "sa1111-pcmcia", .name = "sa1111-pcmcia",
.bus = &sa1111_bus_type,
.probe = pcmcia_probe,
.remove = __devexit_p(pcmcia_remove),
.suspend = pcmcia_socket_dev_suspend,
.resume = pcmcia_socket_dev_resume,
}, },
.devid = SA1111_DEVID_PCMCIA, .devid = SA1111_DEVID_PCMCIA,
.probe = pcmcia_probe,
.remove = __devexit_p(pcmcia_remove),
.suspend = pcmcia_suspend,
.resume = pcmcia_resume,
}; };
static int __init sa1111_drv_pcmcia_init(void) static int __init sa1111_drv_pcmcia_init(void)
{ {
return driver_register(&pcmcia_driver.drv); return sa1111_driver_register(&pcmcia_driver);
} }
static void __exit sa1111_drv_pcmcia_exit(void) static void __exit sa1111_drv_pcmcia_exit(void)
{ {
driver_unregister(&pcmcia_driver.drv); sa1111_driver_unregister(&pcmcia_driver);
} }
module_init(sa1111_drv_pcmcia_init); module_init(sa1111_drv_pcmcia_init);
......
...@@ -352,9 +352,8 @@ static const struct hc_driver ohci_sa1111_hc_driver = { ...@@ -352,9 +352,8 @@ static const struct hc_driver ohci_sa1111_hc_driver = {
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
static int ohci_hcd_sa1111_drv_probe(struct device *_dev) static int ohci_hcd_sa1111_drv_probe(struct sa1111_dev *dev)
{ {
struct sa1111_dev *dev = SA1111_DEV(_dev);
struct usb_hcd *hcd = NULL; struct usb_hcd *hcd = NULL;
int ret; int ret;
...@@ -364,43 +363,29 @@ static int ohci_hcd_sa1111_drv_probe(struct device *_dev) ...@@ -364,43 +363,29 @@ static int ohci_hcd_sa1111_drv_probe(struct device *_dev)
ret = usb_hcd_sa1111_probe(&ohci_sa1111_hc_driver, &hcd, dev); ret = usb_hcd_sa1111_probe(&ohci_sa1111_hc_driver, &hcd, dev);
if (ret == 0) if (ret == 0)
dev->dev.driver_data = hcd; sa1111_set_drvdata(dev, hcd);
return ret; return ret;
} }
static int ohci_hcd_sa1111_drv_remove(struct device *_dev) static int ohci_hcd_sa1111_drv_remove(struct sa1111_dev *dev)
{ {
struct sa1111_dev *dev = SA1111_DEV(_dev); struct usb_hcd *hcd = sa1111_get_drvdata(dev);
struct usb_hcd *hcd = dev->dev.driver_data;
usb_hcd_sa1111_remove(hcd, dev); usb_hcd_sa1111_remove(hcd, dev);
dev->dev.driver_data = NULL; sa1111_set_drvdata(dev, NULL);
return 0; return 0;
} }
static int ohci_hcd_sa1111_drv_suspend(struct device *dev, u32 state, u32 level)
{
return 0;
}
static int ohci_hcd_sa1111_drv_resume(struct device *dev, u32 level)
{
return 0;
}
static struct sa1111_driver ohci_hcd_sa1111_driver = { static struct sa1111_driver ohci_hcd_sa1111_driver = {
.drv = { .drv = {
.name = "sa1111-ohci", .name = "sa1111-ohci",
.bus = &sa1111_bus_type,
.probe = ohci_hcd_sa1111_drv_probe,
.remove = ohci_hcd_sa1111_drv_remove,
.suspend = ohci_hcd_sa1111_drv_suspend,
.resume = ohci_hcd_sa1111_drv_resume,
}, },
.devid = SA1111_DEVID_USB, .devid = SA1111_DEVID_USB,
.probe = ohci_hcd_sa1111_drv_probe,
.remove = ohci_hcd_sa1111_drv_remove,
}; };
static int __init ohci_hcd_sa1111_init (void) static int __init ohci_hcd_sa1111_init (void)
...@@ -409,12 +394,12 @@ static int __init ohci_hcd_sa1111_init (void) ...@@ -409,12 +394,12 @@ static int __init ohci_hcd_sa1111_init (void)
dbg ("block sizes: ed %d td %d", dbg ("block sizes: ed %d td %d",
sizeof (struct ed), sizeof (struct td)); sizeof (struct ed), sizeof (struct td));
return driver_register(&ohci_hcd_sa1111_driver.drv); return sa1111_driver_register(&ohci_hcd_sa1111_driver);
} }
static void __exit ohci_hcd_sa1111_cleanup (void) static void __exit ohci_hcd_sa1111_cleanup (void)
{ {
driver_unregister(&ohci_hcd_sa1111_driver.drv); sa1111_driver_unregister(&ohci_hcd_sa1111_driver);
} }
module_init (ohci_hcd_sa1111_init); module_init (ohci_hcd_sa1111_init);
......
/* -*- linux-c -*-
*
* (C) 2003 zecke@handhelds.org
*
* GPL version 2
*
* based on arch/arm/kernel/apm.c
* factor out the information needed by architectures to provide
* apm status
*
*
*/
#ifndef ARM_ASM_SA1100_APM_H
#define ARM_ASM_SA1100_APM_H
#include <linux/config.h>
#ifdef CONFIG_APM
#define APM_AC_OFFLINE 0
#define APM_AC_ONLINE 1
#define APM_AC_BACKUP 2
#define APM_AC_UNKNOWN 0xFF
#define APM_BATTERY_STATUS_HIGH 0
#define APM_BATTERY_STATUS_LOW 1
#define APM_BATTERY_STATUS_CRITICAL 2
#define APM_BATTERY_STATUS_CHARGING 3
#define APM_BATTERY_STATUS_UNKNOWN 0xFF
#define APM_BATTERY_LIFE_UNKNOWN 0xFFFF
#define APM_BATTERY_LIFE_MINUTES 0x8000
#define APM_BATTERY_LIFE_VALUE_MASK 0x7FFF
/*
* This structure gets filled in by the machine specific 'get_power_status'
* implementation. Any fields which are not set default to a safe value.
*/
struct apm_power_info {
unsigned char ac_line_status;
unsigned char battery_status;
unsigned char battery_flag;
unsigned char battery_life;
int time;
int units;
};
/*
* This allows machines to provide their own "apm get power status" function.
*/
extern void (*apm_get_power_status)(struct apm_power_info *);
#endif
#endif
...@@ -181,12 +181,13 @@ set_isa_cmos_time(void) ...@@ -181,12 +181,13 @@ set_isa_cmos_time(void)
} }
static unsigned long timer1_latch;
static unsigned long timer1_gettimeoffset (void) static unsigned long timer1_gettimeoffset (void)
{ {
unsigned long value = LATCH - *CSR_TIMER1_VALUE; unsigned long value = timer1_latch - *CSR_TIMER1_VALUE;
return ((tick_nsec / 1000) * value) / LATCH; return ((tick_nsec / 1000) * value) / timer1_latch;
} }
static irqreturn_t static irqreturn_t
...@@ -260,8 +261,10 @@ void __init time_init(void) ...@@ -260,8 +261,10 @@ void __init time_init(void)
machine_is_personal_server()) { machine_is_personal_server()) {
gettimeoffset = timer1_gettimeoffset; gettimeoffset = timer1_gettimeoffset;
timer1_latch = (mem_fclk_21285 + 8 * HZ) / (16 * HZ);
*CSR_TIMER1_CLR = 0; *CSR_TIMER1_CLR = 0;
*CSR_TIMER1_LOAD = LATCH; *CSR_TIMER1_LOAD = timer1_latch;
*CSR_TIMER1_CNTL = TIMER_CNTL_ENABLE | TIMER_CNTL_AUTORELOAD | TIMER_CNTL_DIV16; *CSR_TIMER1_CNTL = TIMER_CNTL_ENABLE | TIMER_CNTL_AUTORELOAD | TIMER_CNTL_DIV16;
timer_irq.handler = timer1_interrupt; timer_irq.handler = timer1_interrupt;
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
*/ */
/* /*
* On EBSA285 boards, the clock runs at 50MHz and is * We assume a constant here; this satisfies the maths in linux/timex.h
* divided by a 4-bit prescaler. Other boards use an * and linux/time.h. CLOCK_TICK_RATE is actually system dependent, but
* ISA derived timer, and this is unused. * this must be a constant.
*/ */
#define CLOCK_TICK_RATE (mem_fclk_21285 / 16) #define CLOCK_TICK_RATE (50000000/16)
...@@ -11,6 +11,14 @@ ...@@ -11,6 +11,14 @@
#ifndef _IOP310_HW_H_ #ifndef _IOP310_HW_H_
#define _IOP310_HW_H_ #define _IOP310_HW_H_
/*
* This is needed for mixed drivers that need to work on all
* IOP3xx variants but behave slightly differently on each.
*/
#ifndef __ASSEMBLY__
#define iop_is_310() ((processor_id & 0xffffe3f0) == 0x69052000)
#endif
/* /*
* IOP310 I/O and Mem space regions for PCI autoconfiguration * IOP310 I/O and Mem space regions for PCI autoconfiguration
*/ */
......
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
#define _IOP321_HW_H_ #define _IOP321_HW_H_
/*
* This is needed for mixed drivers that need to work on all
* IOP3xx variants but behave slightly differently on each.
*/
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#define iop_is_321() ((processor_id & 0xfffff7e0) == 0x69052420) #define iop_is_321() ((processor_id & 0xfffff7e0) == 0x69052420)
#endif #endif
......
...@@ -66,4 +66,6 @@ ...@@ -66,4 +66,6 @@
extern void *mu_mem; extern void *mu_mem;
#endif #endif
#define PFN_TO_NID(addr) (0)
#endif #endif
...@@ -836,7 +836,7 @@ typedef void (*ExcpHndlr) (void) ; ...@@ -836,7 +836,7 @@ typedef void (*ExcpHndlr) (void) ;
#define GPIO1_RST 1 /* reset */ #define GPIO1_RST 1 /* reset */
#define GPIO6_MMCCLK 6 /* MMC Clock */ #define GPIO6_MMCCLK 6 /* MMC Clock */
#define GPIO8_48MHz 7 /* 48 MHz clock output */ #define GPIO7_48MHz 7 /* 48 MHz clock output */
#define GPIO8_MMCCS0 8 /* MMC Chip Select 0 */ #define GPIO8_MMCCS0 8 /* MMC Chip Select 0 */
#define GPIO9_MMCCS1 9 /* MMC Chip Select 1 */ #define GPIO9_MMCCS1 9 /* MMC Chip Select 1 */
#define GPIO10_RTCCLK 10 /* real time clock (1 Hz) */ #define GPIO10_RTCCLK 10 /* real time clock (1 Hz) */
...@@ -939,7 +939,7 @@ typedef void (*ExcpHndlr) (void) ; ...@@ -939,7 +939,7 @@ typedef void (*ExcpHndlr) (void) ;
#define GPIO1_RTS_MD ( 1 | GPIO_ALT_FN_1_IN) #define GPIO1_RTS_MD ( 1 | GPIO_ALT_FN_1_IN)
#define GPIO6_MMCCLK_MD ( 6 | GPIO_ALT_FN_1_OUT) #define GPIO6_MMCCLK_MD ( 6 | GPIO_ALT_FN_1_OUT)
#define GPIO8_48MHz_MD ( 8 | GPIO_ALT_FN_1_OUT) #define GPIO7_48MHz_MD ( 7 | GPIO_ALT_FN_1_OUT)
#define GPIO8_MMCCS0_MD ( 8 | GPIO_ALT_FN_1_OUT) #define GPIO8_MMCCS0_MD ( 8 | GPIO_ALT_FN_1_OUT)
#define GPIO9_MMCCS1_MD ( 9 | GPIO_ALT_FN_1_OUT) #define GPIO9_MMCCS1_MD ( 9 | GPIO_ALT_FN_1_OUT)
#define GPIO10_RTCCLK_MD (10 | GPIO_ALT_FN_1_OUT) #define GPIO10_RTCCLK_MD (10 | GPIO_ALT_FN_1_OUT)
......
...@@ -5,17 +5,13 @@ ...@@ -5,17 +5,13 @@
* *
* This file contains the hardware specific definitions for SIMpad * This file contains the hardware specific definitions for SIMpad
* *
* 2001/05/14 Juergen Messerer <juergen.messerer@siemens.ch> * 2001/05/14 Juergen Messerer <juergen.messerer@freesurf.ch>
*/ */
#ifndef SIMPAD_H #ifndef __ASM_ARCH_SIMPAD_H
#define SIMPAD_H #define __ASM_ARCH_SIMPAD_H
#ifndef __ASM_ARCH_HARDWARE_H
#error "include <asm/hardware.h> instead"
#endif
#define GPIO_UART1_RTS GPIO_GPIO14 #define GPIO_UART1_RTS GPIO_GPIO14
#define GPIO_UART1_DTR GPIO_GPIO7 #define GPIO_UART1_DTR GPIO_GPIO7
#define GPIO_UART1_CTS GPIO_GPIO8 #define GPIO_UART1_CTS GPIO_GPIO8
...@@ -28,7 +24,8 @@ ...@@ -28,7 +24,8 @@
#define GPIO_UART3_DCD GPIO_GPIO18 #define GPIO_UART3_DCD GPIO_GPIO18
#define GPIO_UART3_DSR GPIO_GPIO17 #define GPIO_UART3_DSR GPIO_GPIO17
#define GPIO_UCB1300_IRQ GPIO_GPIO (22) /* UCB GPIO and touchscreen */ #define GPIO_POWER_BUTTON GPIO_GPIO0
#define GPIO_UCB1300_IRQ GPIO_GPIO22 /* UCB GPIO and touchscreen */
#define IRQ_UART1_CTS IRQ_GPIO15 #define IRQ_UART1_CTS IRQ_GPIO15
#define IRQ_UART1_DCD GPIO_GPIO23 #define IRQ_UART1_DCD GPIO_GPIO23
...@@ -37,21 +34,26 @@ ...@@ -37,21 +34,26 @@
#define IRQ_UART3_DCD GPIO_GPIO18 #define IRQ_UART3_DCD GPIO_GPIO18
#define IRQ_UART3_DSR GPIO_GPIO17 #define IRQ_UART3_DSR GPIO_GPIO17
#define IRQ_GPIO_UCB1300_IRQ IRQ_GPIO22 #define IRQ_GPIO_UCB1300_IRQ IRQ_GPIO22
#define IRQ_GPIO_POWER_BUTTON IRQ_GPIO0
/*--- PCMCIA ---*/ /*--- PCMCIA ---*/
#define GPIO_CF_CD GPIO_GPIO24 #define GPIO_CF_CD GPIO_GPIO24
#define GPIO_CF_IRQ GPIO_GPIO1 #define GPIO_CF_IRQ GPIO_GPIO1
#define IRQ_GPIO_CF_IRQ IRQ_GPIO1 #define IRQ_GPIO_CF_IRQ IRQ_GPIO1
#define IRQ_GPIO_CF_CD IRQ_GPIO24 #define IRQ_GPIO_CF_CD IRQ_GPIO24
/*--- SmartCard ---*/
#define GPIO_SMART_CARD GPIO_GPIO10
#define IRQ_GPIO_SMARD_CARD IRQ_GPIO10
// CS3 Latch is write only, a shadow is necessary // CS3 Latch is write only, a shadow is necessary
#define CS3BUSTYPE unsigned volatile long #define CS3BUSTYPE unsigned volatile long
#define CS3_BASE 0xf1000000 #define CS3_BASE 0xf1000000
#define VCC_5V_EN 0x0001 // For 5V PCMCIA #define VCC_5V_EN 0x0001 // For 5V PCMCIA
#define VCC_3V_EN 0x0002 // FOR 3.3V PCMCIA #define VCC_3V_EN 0x0002 // FOR 3.3V PCMCIA
#define EN1 0x0004 // This is only for EPROM's #define EN1 0x0004 // This is only for EPROM's
#define EN0 0x0008 // Both should be enable for 3.3V or 5V #define EN0 0x0008 // Both should be enable for 3.3V or 5V
...@@ -63,15 +65,43 @@ ...@@ -63,15 +65,43 @@
#define IRDA_SD 0x0200 // Shutdown for powersave #define IRDA_SD 0x0200 // Shutdown for powersave
#define RS232_ON 0x0400 #define RS232_ON 0x0400
#define SD_MEDIAQ 0x0800 // Shutdown for powersave #define SD_MEDIAQ 0x0800 // Shutdown for powersave
#define LED2_ON 0x1000 #define LED2_ON 0x1000
#define IRDA_MODE 0x2000 // Fast/Slow IrDA mode #define IRDA_MODE 0x2000 // Fast/Slow IrDA mode
#define ENABLE_5V 0x4000 // Enable 5V circuit #define ENABLE_5V 0x4000 // Enable 5V circuit
#define RESET_SIMCARD 0x8000 #define RESET_SIMCARD 0x8000
#define RS232_ENABLE 0x0440 #define RS232_ENABLE 0x0440
#define PCMCIAMASK 0x402f #define PCMCIAMASK 0x402f
#endif // SIMPAD_H
struct simpad_battery {
unsigned char ac_status; /* line connected yes/no */
unsigned char status; /* battery loading yes/no */
unsigned char percentage; /* percentage loaded */
unsigned short life; /* life till empty */
};
/* These should match the apm_bios.h definitions */
#define SIMPAD_AC_STATUS_AC_OFFLINE 0x00
#define SIMPAD_AC_STATUS_AC_ONLINE 0x01
#define SIMPAD_AC_STATUS_AC_BACKUP 0x02 /* What does this mean? */
#define SIMPAD_AC_STATUS_AC_UNKNOWN 0xff
/* These bitfields are rarely "or'd" together */
#define SIMPAD_BATT_STATUS_HIGH 0x01
#define SIMPAD_BATT_STATUS_LOW 0x02
#define SIMPAD_BATT_STATUS_CRITICAL 0x04
#define SIMPAD_BATT_STATUS_CHARGING 0x08
#define SIMPAD_BATT_STATUS_CHARGE_MAIN 0x10
#define SIMPAD_BATT_STATUS_DEAD 0x20 /* Battery will not charge */
#define SIMPAD_BATT_NOT_INSTALLED 0x20 /* For expansion pack batteries */
#define SIMPAD_BATT_STATUS_FULL 0x40 /* Battery fully charged (and connected to AC) */
#define SIMPAD_BATT_STATUS_NOBATT 0x80
#define SIMPAD_BATT_STATUS_UNKNOWN 0xff
extern int simpad_get_battery(struct simpad_battery* );
#endif // __ASM_ARCH_SIMPAD_H
......
...@@ -105,7 +105,7 @@ csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len, ...@@ -105,7 +105,7 @@ csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len,
adcs %0, %0, %5 \n\ adcs %0, %0, %5 \n\
adc %0, %0, #0" adc %0, %0, #0"
: "=&r"(sum) : "=&r"(sum)
: "r" (sum), "r" (daddr), "r" (saddr), "r" (ntohs(len) << 16), "Ir" (proto << 8) : "r" (sum), "r" (daddr), "r" (saddr), "r" (ntohs(len)), "Ir" (ntohs(proto))
: "cc"); : "cc");
return sum; return sum;
} }
...@@ -127,7 +127,7 @@ csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len, ...@@ -127,7 +127,7 @@ csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len,
addcs %0, %0, #0x10000 \n\ addcs %0, %0, #0x10000 \n\
mvn %0, %0" mvn %0, %0"
: "=&r"(sum) : "=&r"(sum)
: "r" (sum), "r" (daddr), "r" (saddr), "r" (ntohs(len)), "Ir" (proto << 8) : "r" (sum), "r" (daddr), "r" (saddr), "r" (ntohs(len)), "Ir" (ntohs(proto))
: "cc"); : "cc");
return sum >> 16; return sum >> 16;
} }
......
...@@ -128,6 +128,28 @@ dma_map_single(struct device *dev, void *cpu_addr, size_t size, ...@@ -128,6 +128,28 @@ dma_map_single(struct device *dev, void *cpu_addr, size_t size,
return __virt_to_bus((unsigned long)cpu_addr); return __virt_to_bus((unsigned long)cpu_addr);
} }
/**
* dma_map_page - map a portion of a page for streaming DMA
* @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
* @page: page that buffer resides in
* @offset: offset into page for start of buffer
* @size: size of buffer to map
* @dir: DMA transfer direction
*
* Ensure that any data held in the cache is appropriately discarded
* or written back.
*
* The device owns this memory once this call has completed. The CPU
* can regain ownership by calling dma_unmap_page() or dma_sync_single().
*/
static inline dma_addr_t
dma_map_page(struct device *dev, struct page *page,
unsigned long offset, size_t size,
enum dma_data_direction dir)
{
return dma_map_single(dev, page_address(page) + offset, size, (int)dir);
}
/** /**
* dma_unmap_single - unmap a single buffer previously mapped * dma_unmap_single - unmap a single buffer previously mapped
* @dev: valid struct device pointer, or NULL for ISA and EISA-like devices * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
...@@ -152,21 +174,26 @@ dma_unmap_single(struct device *dev, dma_addr_t handle, size_t size, ...@@ -152,21 +174,26 @@ dma_unmap_single(struct device *dev, dma_addr_t handle, size_t size,
/* nothing to do */ /* nothing to do */
} }
#if 0 /**
static inline dma_addr_t * dma_unmap_page - unmap a buffer previously mapped through dma_map_page()
dma_map_page(struct device *dev, struct page *page, unsigned long off, * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
size_t size, enum dma_data_direction dir) * @handle: DMA address of buffer
{ * @size: size of buffer to map
/* fixme */ * @dir: DMA transfer direction
} *
* Unmap a single streaming mode DMA translation. The handle and size
* must match what was provided in the previous dma_map_single() call.
* All other usages are undefined.
*
* After this call, reads by the CPU to the buffer are guaranteed to see
* whatever the device wrote there.
*/
static inline void static inline void
dma_unmap_page(struct device *dev, dma_addr_t handle, size_t size, dma_unmap_page(struct device *dev, dma_addr_t handle, size_t size,
enum dma_data_direction dir) enum dma_data_direction dir)
{ {
/* fixme */ dma_unmap_single(dev, handle, size, (int)dir);
} }
#endif
/** /**
* dma_map_sg - map a set of SG buffers for streaming mode DMA * dma_map_sg - map a set of SG buffers for streaming mode DMA
......
...@@ -28,8 +28,8 @@ struct amba_driver { ...@@ -28,8 +28,8 @@ struct amba_driver {
int (*probe)(struct amba_device *, void *); int (*probe)(struct amba_device *, void *);
int (*remove)(struct amba_device *); int (*remove)(struct amba_device *);
void (*shutdown)(struct amba_device *); void (*shutdown)(struct amba_device *);
int (*suspend)(struct amba_device *, u32, u32); int (*suspend)(struct amba_device *, u32);
int (*resume)(struct amba_device *, u32); int (*resume)(struct amba_device *);
struct amba_id *id_table; struct amba_id *id_table;
}; };
......
...@@ -542,9 +542,16 @@ struct sa1111_dev { ...@@ -542,9 +542,16 @@ struct sa1111_dev {
#define SA1111_DEV(_d) container_of((_d), struct sa1111_dev, dev) #define SA1111_DEV(_d) container_of((_d), struct sa1111_dev, dev)
#define sa1111_get_drvdata(d) dev_get_drvdata(&(d)->dev)
#define sa1111_set_drvdata(d,p) dev_get_drvdata(&(d)->dev, p)
struct sa1111_driver { struct sa1111_driver {
struct device_driver drv; struct device_driver drv;
unsigned int devid; unsigned int devid;
int (*probe)(struct sa1111_dev *);
int (*remove)(struct sa1111_dev *);
int (*suspend)(struct sa1111_dev *, u32);
int (*resume)(struct sa1111_dev *);
}; };
#define SA1111_DRV(_d) container_of((_d), struct sa1111_driver, drv) #define SA1111_DRV(_d) container_of((_d), struct sa1111_driver, drv)
...@@ -573,4 +580,7 @@ int sa1111_get_audio_rate(struct sa1111_dev *sadev); ...@@ -573,4 +580,7 @@ int sa1111_get_audio_rate(struct sa1111_dev *sadev);
int sa1111_check_dma_bug(dma_addr_t addr); int sa1111_check_dma_bug(dma_addr_t addr);
int sa1111_driver_register(struct sa1111_driver *);
void sa1111_driver_unregister(struct sa1111_driver *);
#endif /* _ASM_ARCH_SA1111 */ #endif /* _ASM_ARCH_SA1111 */
...@@ -96,6 +96,19 @@ pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int dir) ...@@ -96,6 +96,19 @@ pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int dir)
return dma_unmap_sg(hwdev ? &hwdev->dev : NULL, sg, nents, dir); return dma_unmap_sg(hwdev ? &hwdev->dev : NULL, sg, nents, dir);
} }
static inline dma_addr_t
pci_map_page(struct pci_dev *hwdev, struct page *page, unsigned long offset,
size_t size, int dir)
{
return pci_map_single(hwdev, page_address(page) + offset, size, dir);
}
static inline void
pci_unmap_page(struct pci_dev *hwdev, dma_addr_t handle, size_t size, int dir)
{
return pci_unmap_single(hwdev, handle, size, dir);
}
static inline void static inline void
pci_dma_sync_single(struct pci_dev *hwdev, dma_addr_t handle, size_t size, int dir) pci_dma_sync_single(struct pci_dev *hwdev, dma_addr_t handle, size_t size, int dir)
{ {
......
...@@ -303,7 +303,7 @@ ...@@ -303,7 +303,7 @@
"swi 0\n\t" \ "swi 0\n\t" \
"pop {r7}" "pop {r7}"
#else #else
#define __syscall(name) "swi\t" __sys1(__NR_##name) "\n\t" #define __syscall(name) "swi\t" __sys1(__NR_##name) ""
#endif #endif
#endif #endif
...@@ -318,24 +318,28 @@ do { \ ...@@ -318,24 +318,28 @@ do { \
#define _syscall0(type,name) \ #define _syscall0(type,name) \
type name(void) { \ type name(void) { \
register long __res __asm__("r0"); \ register long __res_r0 __asm__("r0"); \
long __res; \
__asm__ __volatile__ ( \ __asm__ __volatile__ ( \
__syscall(name) \ __syscall(name) \
:"=r" (__res) \ : "=r" (__res_r0) \
: \ : \
: "lr"); \ : "lr"); \
__res = __res_r0; \
__syscall_return(type,__res); \ __syscall_return(type,__res); \
} }
#define _syscall1(type,name,type1,arg1) \ #define _syscall1(type,name,type1,arg1) \
type name(type1 arg1) { \ type name(type1 arg1) { \
register long __r0 __asm__("r0") = (long)arg1; \ register long __r0 __asm__("r0") = (long)arg1; \
register long __res __asm__("r0"); \ register long __res_r0 __asm__("r0"); \
long __res; \
__asm__ __volatile__ ( \ __asm__ __volatile__ ( \
__syscall(name) \ __syscall(name) \
: "=r" (__res) \ : "=r" (__res_r0) \
: "r" (__r0) \ : "r" (__r0) \
: "lr"); \ : "lr"); \
__res = __res_r0; \
__syscall_return(type,__res); \ __syscall_return(type,__res); \
} }
...@@ -343,12 +347,14 @@ type name(type1 arg1) { \ ...@@ -343,12 +347,14 @@ type name(type1 arg1) { \
type name(type1 arg1,type2 arg2) { \ type name(type1 arg1,type2 arg2) { \
register long __r0 __asm__("r0") = (long)arg1; \ register long __r0 __asm__("r0") = (long)arg1; \
register long __r1 __asm__("r1") = (long)arg2; \ register long __r1 __asm__("r1") = (long)arg2; \
register long __res __asm__("r0"); \ register long __res_r0 __asm__("r0"); \
long __res; \
__asm__ __volatile__ ( \ __asm__ __volatile__ ( \
__syscall(name) \ __syscall(name) \
: "=r" (__res) \ : "=r" (__res_r0) \
: "r" (__r0),"r" (__r1) \ : "r" (__r0),"r" (__r1) \
: "lr"); \ : "lr"); \
__res = __res_r0; \
__syscall_return(type,__res); \ __syscall_return(type,__res); \
} }
...@@ -358,12 +364,14 @@ type name(type1 arg1,type2 arg2,type3 arg3) { \ ...@@ -358,12 +364,14 @@ type name(type1 arg1,type2 arg2,type3 arg3) { \
register long __r0 __asm__("r0") = (long)arg1; \ register long __r0 __asm__("r0") = (long)arg1; \
register long __r1 __asm__("r1") = (long)arg2; \ register long __r1 __asm__("r1") = (long)arg2; \
register long __r2 __asm__("r2") = (long)arg3; \ register long __r2 __asm__("r2") = (long)arg3; \
register long __res __asm__("r0"); \ register long __res_r0 __asm__("r0"); \
long __res; \
__asm__ __volatile__ ( \ __asm__ __volatile__ ( \
__syscall(name) \ __syscall(name) \
: "=r" (__res) \ : "=r" (__res_r0) \
: "r" (__r0),"r" (__r1),"r" (__r2) \ : "r" (__r0),"r" (__r1),"r" (__r2) \
: "lr"); \ : "lr"); \
__res = __res_r0; \
__syscall_return(type,__res); \ __syscall_return(type,__res); \
} }
...@@ -374,12 +382,14 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \ ...@@ -374,12 +382,14 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \
register long __r1 __asm__("r1") = (long)arg2; \ register long __r1 __asm__("r1") = (long)arg2; \
register long __r2 __asm__("r2") = (long)arg3; \ register long __r2 __asm__("r2") = (long)arg3; \
register long __r3 __asm__("r3") = (long)arg4; \ register long __r3 __asm__("r3") = (long)arg4; \
register long __res __asm__("r0"); \ register long __res_r0 __asm__("r0"); \
long __res; \
__asm__ __volatile__ ( \ __asm__ __volatile__ ( \
__syscall(name) \ __syscall(name) \
: "=r" (__res) \ : "=r" (__res_r0) \
: "r" (__r0),"r" (__r1),"r" (__r2),"r" (__r3) \ : "r" (__r0),"r" (__r1),"r" (__r2),"r" (__r3) \
: "lr"); \ : "lr"); \
__res = __res_r0; \
__syscall_return(type,__res); \ __syscall_return(type,__res); \
} }
...@@ -391,12 +401,14 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) { \ ...@@ -391,12 +401,14 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) { \
register long __r2 __asm__("r2") = (long)arg3; \ register long __r2 __asm__("r2") = (long)arg3; \
register long __r3 __asm__("r3") = (long)arg4; \ register long __r3 __asm__("r3") = (long)arg4; \
register long __r4 __asm__("r4") = (long)arg5; \ register long __r4 __asm__("r4") = (long)arg5; \
register long __res __asm__("r0"); \ register long __res_r0 __asm__("r0"); \
long __res; \
__asm__ __volatile__ ( \ __asm__ __volatile__ ( \
__syscall(name) \ __syscall(name) \
: "=r" (__res) \ : "=r" (__res_r0) \
: "r" (__r0),"r" (__r1),"r" (__r2),"r" (__r3),"r" (__r4) \ : "r" (__r0),"r" (__r1),"r" (__r2),"r" (__r3),"r" (__r4) \
: "lr"); \ : "lr"); \
__res = __res_r0; \
__syscall_return(type,__res); \ __syscall_return(type,__res); \
} }
...@@ -408,12 +420,14 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6 ...@@ -408,12 +420,14 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6
register long __r3 __asm__("r3") = (long)arg4; \ register long __r3 __asm__("r3") = (long)arg4; \
register long __r4 __asm__("r4") = (long)arg5; \ register long __r4 __asm__("r4") = (long)arg5; \
register long __r5 __asm__("r5") = (long)arg6; \ register long __r5 __asm__("r5") = (long)arg6; \
register long __res __asm__("r0"); \ register long __res_r0 __asm__("r0"); \
long __res; \
__asm__ __volatile__ ( \ __asm__ __volatile__ ( \
__syscall(name) \ __syscall(name) \
: "=r" (__res) \ : "=r" (__res_r0) \
: "r" (__r0),"r" (__r1),"r" (__r2),"r" (__r3), "r" (__r4),"r" (__r5) \ : "r" (__r0),"r" (__r1),"r" (__r2),"r" (__r3), "r" (__r4),"r" (__r5) \
: "lr"); \ : "lr"); \
__res = __res_r0; \
__syscall_return(type,__res); \ __syscall_return(type,__res); \
} }
......
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