提交 8995b161 编写于 作者: L Linus Torvalds

Merge master.kernel.org:/home/rmk/linux-2.6-arm

...@@ -154,6 +154,7 @@ config ARCH_RPC ...@@ -154,6 +154,7 @@ config ARCH_RPC
select FIQ select FIQ
select TIMER_ACORN select TIMER_ACORN
select ARCH_MAY_HAVE_PC_FDC select ARCH_MAY_HAVE_PC_FDC
select ISA_DMA_API
help help
On the Acorn Risc-PC, Linux can support the internal IDE disk and On the Acorn Risc-PC, Linux can support the internal IDE disk and
CD-ROM interface, serial and parallel port, and the floppy drive. CD-ROM interface, serial and parallel port, and the floppy drive.
...@@ -206,6 +207,7 @@ config ARCH_IMX ...@@ -206,6 +207,7 @@ config ARCH_IMX
config ARCH_H720X config ARCH_H720X
bool "Hynix-HMS720x-based" bool "Hynix-HMS720x-based"
select ISA_DMA_API
help help
This enables support for systems based on the Hynix HMS720x This enables support for systems based on the Hynix HMS720x
...@@ -290,12 +292,14 @@ config ISA ...@@ -290,12 +292,14 @@ config ISA
(MCA) or VESA. ISA is an older system, now being displaced by PCI; (MCA) or VESA. ISA is an older system, now being displaced by PCI;
newer boards don't support it. If you have ISA, say Y, otherwise N. newer boards don't support it. If you have ISA, say Y, otherwise N.
# Select ISA DMA controller support
config ISA_DMA config ISA_DMA
bool bool
select ISA_DMA_API
# Select ISA DMA interface
config ISA_DMA_API config ISA_DMA_API
bool bool
default y
config PCI config PCI
bool "PCI support" if ARCH_INTEGRATOR_AP || ARCH_VERSATILE_PB bool "PCI support" if ARCH_INTEGRATOR_AP || ARCH_VERSATILE_PB
...@@ -656,7 +660,6 @@ source "kernel/power/Kconfig" ...@@ -656,7 +660,6 @@ source "kernel/power/Kconfig"
config APM config APM
tristate "Advanced Power Management Emulation" tristate "Advanced Power Management Emulation"
depends on PM_LEGACY
---help--- ---help---
APM is a BIOS specification for saving power using several different APM is a BIOS specification for saving power using several different
techniques. This is mostly useful for battery powered laptops with techniques. This is mostly useful for battery powered laptops with
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# Copyright (C) 1995-2001 by Russell King # Copyright (C) 1995-2001 by Russell King
LDFLAGS_vmlinux :=-p --no-undefined -X LDFLAGS_vmlinux :=-p --no-undefined -X
CPPFLAGS_vmlinux.lds = -DKERNEL_RAM_ADDR=$(TEXTADDR) CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET)
OBJCOPYFLAGS :=-O binary -R .note -R .comment -S OBJCOPYFLAGS :=-O binary -R .note -R .comment -S
GZFLAGS :=-9 GZFLAGS :=-9
#CFLAGS +=-pipe #CFLAGS +=-pipe
...@@ -65,7 +65,7 @@ CHECKFLAGS += -D__arm__ ...@@ -65,7 +65,7 @@ CHECKFLAGS += -D__arm__
#Default value #Default value
head-y := arch/arm/kernel/head.o arch/arm/kernel/init_task.o head-y := arch/arm/kernel/head.o arch/arm/kernel/init_task.o
textaddr-y := 0xC0008000 textofs-y := 0x00008000
machine-$(CONFIG_ARCH_RPC) := rpc machine-$(CONFIG_ARCH_RPC) := rpc
machine-$(CONFIG_ARCH_EBSA110) := ebsa110 machine-$(CONFIG_ARCH_EBSA110) := ebsa110
...@@ -73,22 +73,20 @@ textaddr-y := 0xC0008000 ...@@ -73,22 +73,20 @@ textaddr-y := 0xC0008000
incdir-$(CONFIG_ARCH_CLPS7500) := cl7500 incdir-$(CONFIG_ARCH_CLPS7500) := cl7500
machine-$(CONFIG_FOOTBRIDGE) := footbridge machine-$(CONFIG_FOOTBRIDGE) := footbridge
incdir-$(CONFIG_FOOTBRIDGE) := ebsa285 incdir-$(CONFIG_FOOTBRIDGE) := ebsa285
textaddr-$(CONFIG_ARCH_CO285) := 0x60008000
machine-$(CONFIG_ARCH_CO285) := footbridge machine-$(CONFIG_ARCH_CO285) := footbridge
incdir-$(CONFIG_ARCH_CO285) := ebsa285 incdir-$(CONFIG_ARCH_CO285) := ebsa285
machine-$(CONFIG_ARCH_SHARK) := shark machine-$(CONFIG_ARCH_SHARK) := shark
machine-$(CONFIG_ARCH_SA1100) := sa1100 machine-$(CONFIG_ARCH_SA1100) := sa1100
ifeq ($(CONFIG_ARCH_SA1100),y) ifeq ($(CONFIG_ARCH_SA1100),y)
# SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory # SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory
textaddr-$(CONFIG_SA1111) := 0xc0208000 textofs-$(CONFIG_SA1111) := 0x00208000
endif endif
machine-$(CONFIG_ARCH_PXA) := pxa machine-$(CONFIG_ARCH_PXA) := pxa
machine-$(CONFIG_ARCH_L7200) := l7200 machine-$(CONFIG_ARCH_L7200) := l7200
machine-$(CONFIG_ARCH_INTEGRATOR) := integrator machine-$(CONFIG_ARCH_INTEGRATOR) := integrator
machine-$(CONFIG_ARCH_CAMELOT) := epxa10db machine-$(CONFIG_ARCH_CAMELOT) := epxa10db
textaddr-$(CONFIG_ARCH_CLPS711X) := 0xc0028000 textofs-$(CONFIG_ARCH_CLPS711X) := 0x00028000
machine-$(CONFIG_ARCH_CLPS711X) := clps711x machine-$(CONFIG_ARCH_CLPS711X) := clps711x
textaddr-$(CONFIG_ARCH_FORTUNET) := 0xc0008000
machine-$(CONFIG_ARCH_IOP3XX) := iop3xx machine-$(CONFIG_ARCH_IOP3XX) := iop3xx
machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx
machine-$(CONFIG_ARCH_IXP2000) := ixp2000 machine-$(CONFIG_ARCH_IXP2000) := ixp2000
...@@ -110,7 +108,8 @@ CFLAGS_3c589_cs.o :=-DISA_SIXTEEN_BIT_PERIPHERAL ...@@ -110,7 +108,8 @@ CFLAGS_3c589_cs.o :=-DISA_SIXTEEN_BIT_PERIPHERAL
export CFLAGS_3c589_cs.o export CFLAGS_3c589_cs.o
endif endif
TEXTADDR := $(textaddr-y) # The byte offset of the kernel image in RAM from the start of RAM.
TEXT_OFFSET := $(textofs-y)
ifeq ($(incdir-y),) ifeq ($(incdir-y),)
incdir-y := $(machine-y) incdir-y := $(machine-y)
...@@ -123,7 +122,7 @@ else ...@@ -123,7 +122,7 @@ else
MACHINE := MACHINE :=
endif endif
export TEXTADDR GZFLAGS export TEXT_OFFSET GZFLAGS
# Do we have FASTFPE? # Do we have FASTFPE?
FASTFPE :=arch/arm/fastfpe FASTFPE :=arch/arm/fastfpe
......
...@@ -15,7 +15,7 @@ include $(srctree)/$(MACHINE)/Makefile.boot ...@@ -15,7 +15,7 @@ include $(srctree)/$(MACHINE)/Makefile.boot
endif endif
# Note: the following conditions must always be true: # Note: the following conditions must always be true:
# ZRELADDR == virt_to_phys(TEXTADDR) # ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET)
# PARAMS_PHYS must be within 4MB of ZRELADDR # PARAMS_PHYS must be within 4MB of ZRELADDR
# INITRD_PHYS must be in RAM # INITRD_PHYS must be in RAM
ZRELADDR := $(zreladdr-y) ZRELADDR := $(zreladdr-y)
......
...@@ -23,5 +23,8 @@ config SHARP_LOCOMO ...@@ -23,5 +23,8 @@ config SHARP_LOCOMO
config SHARP_PARAM config SHARP_PARAM
bool bool
config SHARPSL_PM
bool
config SHARP_SCOOP config SHARP_SCOOP
bool bool
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
# #
obj-y += rtctime.o obj-y += rtctime.o
obj-$(CONFIG_ARM_AMBA) += amba.o
obj-$(CONFIG_ARM_GIC) += gic.o obj-$(CONFIG_ARM_GIC) += gic.o
obj-$(CONFIG_ICST525) += icst525.o obj-$(CONFIG_ICST525) += icst525.o
obj-$(CONFIG_ICST307) += icst307.o obj-$(CONFIG_ICST307) += icst307.o
...@@ -13,4 +12,5 @@ obj-$(CONFIG_DMABOUNCE) += dmabounce.o ...@@ -13,4 +12,5 @@ obj-$(CONFIG_DMABOUNCE) += dmabounce.o
obj-$(CONFIG_TIMER_ACORN) += time-acorn.o obj-$(CONFIG_TIMER_ACORN) += time-acorn.o
obj-$(CONFIG_SHARP_LOCOMO) += locomo.o obj-$(CONFIG_SHARP_LOCOMO) += locomo.o
obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o
obj-$(CONFIG_SHARPSL_PM) += sharpsl_pm.o
obj-$(CONFIG_SHARP_SCOOP) += scoop.o obj-$(CONFIG_SHARP_SCOOP) += scoop.o
...@@ -33,7 +33,6 @@ void reset_scoop(struct device *dev) ...@@ -33,7 +33,6 @@ void reset_scoop(struct device *dev)
SCOOP_REG(sdev->base,SCOOP_MCR) = 0x0100; // 00 SCOOP_REG(sdev->base,SCOOP_MCR) = 0x0100; // 00
SCOOP_REG(sdev->base,SCOOP_CDR) = 0x0000; // 04 SCOOP_REG(sdev->base,SCOOP_CDR) = 0x0000; // 04
SCOOP_REG(sdev->base,SCOOP_CPR) = 0x0000; // 0C
SCOOP_REG(sdev->base,SCOOP_CCR) = 0x0000; // 10 SCOOP_REG(sdev->base,SCOOP_CCR) = 0x0000; // 10
SCOOP_REG(sdev->base,SCOOP_IMR) = 0x0000; // 18 SCOOP_REG(sdev->base,SCOOP_IMR) = 0x0000; // 18
SCOOP_REG(sdev->base,SCOOP_IRM) = 0x00FF; // 14 SCOOP_REG(sdev->base,SCOOP_IRM) = 0x00FF; // 14
...@@ -154,6 +153,7 @@ int __init scoop_probe(struct platform_device *pdev) ...@@ -154,6 +153,7 @@ int __init scoop_probe(struct platform_device *pdev)
SCOOP_REG(devptr->base, SCOOP_MCR) = 0x0140; SCOOP_REG(devptr->base, SCOOP_MCR) = 0x0140;
reset_scoop(&pdev->dev); reset_scoop(&pdev->dev);
SCOOP_REG(devptr->base, SCOOP_CPR) = 0x0000;
SCOOP_REG(devptr->base, SCOOP_GPCR) = inf->io_dir & 0xffff; SCOOP_REG(devptr->base, SCOOP_GPCR) = inf->io_dir & 0xffff;
SCOOP_REG(devptr->base, SCOOP_GPWR) = inf->io_out & 0xffff; SCOOP_REG(devptr->base, SCOOP_GPWR) = inf->io_out & 0xffff;
......
此差异已折叠。
# #
# Automatically generated make config: don't edit # Automatically generated make config: don't edit
# Linux kernel version: 2.6.14-rc1-git5 # Linux kernel version: 2.6.15
# Tue Sep 20 17:26:28 2005 # Tue Jan 3 03:20:40 2006
# #
CONFIG_ARM=y CONFIG_ARM=y
CONFIG_MMU=y CONFIG_MMU=y
...@@ -33,6 +33,7 @@ CONFIG_SYSCTL=y ...@@ -33,6 +33,7 @@ CONFIG_SYSCTL=y
CONFIG_KOBJECT_UEVENT=y CONFIG_KOBJECT_UEVENT=y
# CONFIG_IKCONFIG is not set # CONFIG_IKCONFIG is not set
CONFIG_INITRAMFS_SOURCE="" CONFIG_INITRAMFS_SOURCE=""
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_EMBEDDED=y CONFIG_EMBEDDED=y
CONFIG_KALLSYMS=y CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_ALL is not set
...@@ -42,7 +43,6 @@ CONFIG_BUG=y ...@@ -42,7 +43,6 @@ CONFIG_BUG=y
CONFIG_BASE_FULL=y CONFIG_BASE_FULL=y
CONFIG_FUTEX=y CONFIG_FUTEX=y
CONFIG_EPOLL=y CONFIG_EPOLL=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SHMEM=y CONFIG_SHMEM=y
CONFIG_CC_ALIGN_FUNCTIONS=0 CONFIG_CC_ALIGN_FUNCTIONS=0
CONFIG_CC_ALIGN_LABELS=0 CONFIG_CC_ALIGN_LABELS=0
...@@ -61,6 +61,23 @@ CONFIG_MODVERSIONS=y ...@@ -61,6 +61,23 @@ CONFIG_MODVERSIONS=y
# CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y CONFIG_KMOD=y
#
# Block layer
#
#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
CONFIG_DEFAULT_AS=y
# CONFIG_DEFAULT_DEADLINE is not set
# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="anticipatory"
# #
# System Type # System Type
# #
...@@ -83,6 +100,7 @@ CONFIG_ARCH_IXP4XX=y ...@@ -83,6 +100,7 @@ CONFIG_ARCH_IXP4XX=y
# CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_LH7A40X is not set
# CONFIG_ARCH_OMAP is not set # CONFIG_ARCH_OMAP is not set
# CONFIG_ARCH_VERSATILE is not set # CONFIG_ARCH_VERSATILE is not set
# CONFIG_ARCH_REALVIEW is not set
# CONFIG_ARCH_IMX is not set # CONFIG_ARCH_IMX is not set
# CONFIG_ARCH_H720X is not set # CONFIG_ARCH_H720X is not set
# CONFIG_ARCH_AAEC2000 is not set # CONFIG_ARCH_AAEC2000 is not set
...@@ -102,6 +120,7 @@ CONFIG_MACH_IXDPG425=y ...@@ -102,6 +120,7 @@ CONFIG_MACH_IXDPG425=y
CONFIG_MACH_IXDP465=y CONFIG_MACH_IXDP465=y
CONFIG_ARCH_IXCDP1100=y CONFIG_ARCH_IXCDP1100=y
CONFIG_ARCH_PRPMC1100=y CONFIG_ARCH_PRPMC1100=y
CONFIG_MACH_NAS100D=y
CONFIG_ARCH_IXDP4XX=y CONFIG_ARCH_IXDP4XX=y
CONFIG_CPU_IXP46X=y CONFIG_CPU_IXP46X=y
# CONFIG_MACH_GTWX5715 is not set # CONFIG_MACH_GTWX5715 is not set
...@@ -155,6 +174,7 @@ CONFIG_FLATMEM_MANUAL=y ...@@ -155,6 +174,7 @@ CONFIG_FLATMEM_MANUAL=y
CONFIG_FLATMEM=y CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_FLAT_NODE_MEM_MAP=y
# CONFIG_SPARSEMEM_STATIC is not set # CONFIG_SPARSEMEM_STATIC is not set
CONFIG_SPLIT_PTLOCK_CPUS=4096
CONFIG_ALIGNMENT_TRAP=y CONFIG_ALIGNMENT_TRAP=y
# #
...@@ -173,6 +193,7 @@ CONFIG_CMDLINE="console=ttyS0,115200 ip=bootp root=/dev/nfs" ...@@ -173,6 +193,7 @@ CONFIG_CMDLINE="console=ttyS0,115200 ip=bootp root=/dev/nfs"
# At least one emulation must be selected # At least one 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
# #
...@@ -187,6 +208,8 @@ CONFIG_BINFMT_ELF=y ...@@ -187,6 +208,8 @@ CONFIG_BINFMT_ELF=y
# Power management options # Power management options
# #
CONFIG_PM=y CONFIG_PM=y
CONFIG_PM_LEGACY=y
# CONFIG_PM_DEBUG is not set
CONFIG_APM=y CONFIG_APM=y
# #
...@@ -271,6 +294,10 @@ CONFIG_IP_VS_SH=m ...@@ -271,6 +294,10 @@ CONFIG_IP_VS_SH=m
CONFIG_NETFILTER=y CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set # CONFIG_NETFILTER_DEBUG is not set
CONFIG_BRIDGE_NETFILTER=y CONFIG_BRIDGE_NETFILTER=y
#
# Core Netfilter Configuration
#
# CONFIG_NETFILTER_NETLINK is not set # CONFIG_NETFILTER_NETLINK is not set
# #
...@@ -286,6 +313,7 @@ CONFIG_IP_NF_IRC=m ...@@ -286,6 +313,7 @@ CONFIG_IP_NF_IRC=m
# CONFIG_IP_NF_NETBIOS_NS is not set # CONFIG_IP_NF_NETBIOS_NS is not set
# CONFIG_IP_NF_TFTP is not set # CONFIG_IP_NF_TFTP is not set
# CONFIG_IP_NF_AMANDA is not set # CONFIG_IP_NF_AMANDA is not set
# CONFIG_IP_NF_PPTP is not set
CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_QUEUE=m
CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_IPTABLES=m
CONFIG_IP_NF_MATCH_LIMIT=m CONFIG_IP_NF_MATCH_LIMIT=m
...@@ -319,6 +347,7 @@ CONFIG_IP_NF_TARGET_REJECT=m ...@@ -319,6 +347,7 @@ CONFIG_IP_NF_TARGET_REJECT=m
CONFIG_IP_NF_TARGET_LOG=m CONFIG_IP_NF_TARGET_LOG=m
CONFIG_IP_NF_TARGET_ULOG=m CONFIG_IP_NF_TARGET_ULOG=m
CONFIG_IP_NF_TARGET_TCPMSS=m CONFIG_IP_NF_TARGET_TCPMSS=m
# CONFIG_IP_NF_TARGET_NFQUEUE is not set
CONFIG_IP_NF_NAT=m CONFIG_IP_NF_NAT=m
CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=m CONFIG_IP_NF_TARGET_MASQUERADE=m
...@@ -380,10 +409,18 @@ CONFIG_ECONET=m ...@@ -380,10 +409,18 @@ CONFIG_ECONET=m
CONFIG_ECONET_AUNUDP=y CONFIG_ECONET_AUNUDP=y
CONFIG_ECONET_NATIVE=y CONFIG_ECONET_NATIVE=y
CONFIG_WAN_ROUTER=m CONFIG_WAN_ROUTER=m
#
# QoS and/or fair queueing
#
CONFIG_NET_SCHED=y CONFIG_NET_SCHED=y
CONFIG_NET_SCH_CLK_JIFFIES=y CONFIG_NET_SCH_CLK_JIFFIES=y
# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set # CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
# CONFIG_NET_SCH_CLK_CPU is not set # CONFIG_NET_SCH_CLK_CPU is not set
#
# Queueing/Scheduling
#
CONFIG_NET_SCH_CBQ=m CONFIG_NET_SCH_CBQ=m
CONFIG_NET_SCH_HTB=m CONFIG_NET_SCH_HTB=m
# CONFIG_NET_SCH_HFSC is not set # CONFIG_NET_SCH_HFSC is not set
...@@ -397,8 +434,10 @@ CONFIG_NET_SCH_GRED=m ...@@ -397,8 +434,10 @@ CONFIG_NET_SCH_GRED=m
CONFIG_NET_SCH_DSMARK=m CONFIG_NET_SCH_DSMARK=m
# CONFIG_NET_SCH_NETEM is not set # CONFIG_NET_SCH_NETEM is not set
CONFIG_NET_SCH_INGRESS=m CONFIG_NET_SCH_INGRESS=m
CONFIG_NET_QOS=y
CONFIG_NET_ESTIMATOR=y #
# Classification
#
CONFIG_NET_CLS=y CONFIG_NET_CLS=y
# CONFIG_NET_CLS_BASIC is not set # CONFIG_NET_CLS_BASIC is not set
CONFIG_NET_CLS_TCINDEX=m CONFIG_NET_CLS_TCINDEX=m
...@@ -407,13 +446,14 @@ CONFIG_NET_CLS_ROUTE=y ...@@ -407,13 +446,14 @@ CONFIG_NET_CLS_ROUTE=y
CONFIG_NET_CLS_FW=m CONFIG_NET_CLS_FW=m
CONFIG_NET_CLS_U32=m CONFIG_NET_CLS_U32=m
# CONFIG_CLS_U32_PERF is not set # CONFIG_CLS_U32_PERF is not set
# CONFIG_NET_CLS_IND is not set
# CONFIG_CLS_U32_MARK is not set # CONFIG_CLS_U32_MARK is not set
CONFIG_NET_CLS_RSVP=m CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP6=m CONFIG_NET_CLS_RSVP6=m
# CONFIG_NET_EMATCH is not set # CONFIG_NET_EMATCH is not set
# CONFIG_NET_CLS_ACT is not set # CONFIG_NET_CLS_ACT is not set
CONFIG_NET_CLS_POLICE=y CONFIG_NET_CLS_POLICE=y
# CONFIG_NET_CLS_IND is not set
CONFIG_NET_ESTIMATOR=y
# #
# Network testing # Network testing
...@@ -436,6 +476,11 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y ...@@ -436,6 +476,11 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_FW_LOADER is not set # CONFIG_FW_LOADER is not set
# CONFIG_DEBUG_DRIVER is not set # CONFIG_DEBUG_DRIVER is not set
#
# Connector - unified userspace <-> kernelspace linker
#
# CONFIG_CONNECTOR is not set
# #
# Memory Technology Devices (MTD) # Memory Technology Devices (MTD)
# #
...@@ -458,6 +503,7 @@ CONFIG_MTD_BLOCK=y ...@@ -458,6 +503,7 @@ 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 # CONFIG_INFTL is not set
# CONFIG_RFD_FTL is not set
# #
# RAM/ROM/Flash chip drivers # RAM/ROM/Flash chip drivers
...@@ -492,7 +538,6 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y ...@@ -492,7 +538,6 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
# CONFIG_MTD_PHYSMAP is not set # CONFIG_MTD_PHYSMAP is not set
# CONFIG_MTD_ARM_INTEGRATOR is not set # CONFIG_MTD_ARM_INTEGRATOR is not set
CONFIG_MTD_IXP4XX=y CONFIG_MTD_IXP4XX=y
# CONFIG_MTD_EDB7312 is not set
# CONFIG_MTD_PCI is not set # CONFIG_MTD_PCI is not set
# CONFIG_MTD_PLATRAM is not set # CONFIG_MTD_PLATRAM is not set
...@@ -522,6 +567,11 @@ CONFIG_MTD_NAND_IDS=m ...@@ -522,6 +567,11 @@ CONFIG_MTD_NAND_IDS=m
# CONFIG_MTD_NAND_DISKONCHIP is not set # CONFIG_MTD_NAND_DISKONCHIP is not set
# CONFIG_MTD_NAND_NANDSIM is not set # CONFIG_MTD_NAND_NANDSIM is not set
#
# OneNAND Flash Device Drivers
#
# CONFIG_MTD_ONENAND is not set
# #
# Parallel port support # Parallel port support
# #
...@@ -548,14 +598,6 @@ CONFIG_BLK_DEV_RAM_COUNT=16 ...@@ -548,14 +598,6 @@ CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_BLK_DEV_RAM_SIZE=8192
CONFIG_BLK_DEV_INITRD=y CONFIG_BLK_DEV_INITRD=y
# CONFIG_CDROM_PKTCDVD is not set # CONFIG_CDROM_PKTCDVD is not set
#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
# CONFIG_ATA_OVER_ETH is not set # CONFIG_ATA_OVER_ETH is not set
# #
...@@ -668,6 +710,7 @@ CONFIG_NET_ETHERNET=y ...@@ -668,6 +710,7 @@ CONFIG_NET_ETHERNET=y
CONFIG_MII=y CONFIG_MII=y
# CONFIG_HAPPYMEAL is not set # CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set # CONFIG_SUNGEM is not set
# CONFIG_CASSINI is not set
# CONFIG_NET_VENDOR_3COM is not set # CONFIG_NET_VENDOR_3COM is not set
# CONFIG_SMC91X is not set # CONFIG_SMC91X is not set
# CONFIG_DM9000 is not set # CONFIG_DM9000 is not set
...@@ -739,6 +782,7 @@ CONFIG_NET_RADIO=y ...@@ -739,6 +782,7 @@ CONFIG_NET_RADIO=y
# #
# Wireless 802.11b ISA/PCI cards support # Wireless 802.11b ISA/PCI cards support
# #
# CONFIG_AIRO is not set
CONFIG_HERMES=y CONFIG_HERMES=y
# CONFIG_PLX_HERMES is not set # CONFIG_PLX_HERMES is not set
# CONFIG_TMD_HERMES is not set # CONFIG_TMD_HERMES is not set
...@@ -782,6 +826,7 @@ CONFIG_WAN_ROUTER_DRIVERS=y ...@@ -782,6 +826,7 @@ CONFIG_WAN_ROUTER_DRIVERS=y
# #
# ATM drivers # ATM drivers
# #
# CONFIG_ATM_DUMMY is not set
CONFIG_ATM_TCP=m CONFIG_ATM_TCP=m
# CONFIG_ATM_LANAI is not set # CONFIG_ATM_LANAI is not set
# CONFIG_ATM_ENI is not set # CONFIG_ATM_ENI is not set
...@@ -902,6 +947,7 @@ CONFIG_IXP4XX_WATCHDOG=y ...@@ -902,6 +947,7 @@ CONFIG_IXP4XX_WATCHDOG=y
# TPM devices # TPM devices
# #
# CONFIG_TCG_TPM is not set # CONFIG_TCG_TPM is not set
# CONFIG_TELCLOCK is not set
# #
# I2C support # I2C support
...@@ -954,6 +1000,7 @@ CONFIG_SENSORS_EEPROM=y ...@@ -954,6 +1000,7 @@ CONFIG_SENSORS_EEPROM=y
# CONFIG_SENSORS_PCF8591 is not set # CONFIG_SENSORS_PCF8591 is not set
# CONFIG_SENSORS_RTC8564 is not set # CONFIG_SENSORS_RTC8564 is not set
# CONFIG_SENSORS_MAX6875 is not set # CONFIG_SENSORS_MAX6875 is not set
# CONFIG_RTC_X1205_I2C is not set
# CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set # CONFIG_I2C_DEBUG_BUS is not set
...@@ -1035,6 +1082,10 @@ CONFIG_USB_ARCH_HAS_HCD=y ...@@ -1035,6 +1082,10 @@ CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB_ARCH_HAS_OHCI=y
# CONFIG_USB is not set # CONFIG_USB is not set
#
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
#
# #
# USB Gadget Support # USB Gadget Support
# #
...@@ -1110,6 +1161,7 @@ CONFIG_RAMFS=y ...@@ -1110,6 +1161,7 @@ CONFIG_RAMFS=y
CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS=y
CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_DEBUG=0
CONFIG_JFFS2_FS_WRITEBUFFER=y CONFIG_JFFS2_FS_WRITEBUFFER=y
# CONFIG_JFFS2_SUMMARY is not set
# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_ZLIB=y
CONFIG_JFFS2_RTIME=y CONFIG_JFFS2_RTIME=y
...@@ -1190,7 +1242,9 @@ CONFIG_DETECT_SOFTLOCKUP=y ...@@ -1190,7 +1242,9 @@ CONFIG_DETECT_SOFTLOCKUP=y
CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_BUGVERBOSE=y
# CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG_INFO is not set
# CONFIG_DEBUG_FS is not set # CONFIG_DEBUG_FS is not set
# CONFIG_DEBUG_VM is not set
CONFIG_FRAME_POINTER=y CONFIG_FRAME_POINTER=y
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_DEBUG_USER is not set # CONFIG_DEBUG_USER is not set
# CONFIG_DEBUG_WAITQ is not set # CONFIG_DEBUG_WAITQ is not set
CONFIG_DEBUG_ERRORS=y CONFIG_DEBUG_ERRORS=y
......
...@@ -2,15 +2,16 @@ ...@@ -2,15 +2,16 @@
# Makefile for the linux kernel. # Makefile for the linux kernel.
# #
AFLAGS_head.o := -DKERNEL_RAM_ADDR=$(TEXTADDR) AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET)
# Object file lists. # Object file lists.
obj-y := compat.o dma.o entry-armv.o entry-common.o irq.o \ obj-y := compat.o entry-armv.o entry-common.o irq.o \
process.o ptrace.o semaphore.o setup.o signal.o sys_arm.o \ process.o ptrace.o semaphore.o setup.o signal.o sys_arm.o \
time.o traps.o time.o traps.o
obj-$(CONFIG_APM) += apm.o obj-$(CONFIG_APM) += apm.o
obj-$(CONFIG_ISA_DMA_API) += dma.o
obj-$(CONFIG_ARCH_ACORN) += ecard.o obj-$(CONFIG_ARCH_ACORN) += ecard.o
obj-$(CONFIG_FOOTBRIDGE) += isa.o obj-$(CONFIG_FOOTBRIDGE) += isa.o
obj-$(CONFIG_FIQ) += fiq.o obj-$(CONFIG_FIQ) += fiq.o
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include <linux/apm_bios.h> #include <linux/apm_bios.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/pm.h> #include <linux/pm.h>
#include <linux/pm_legacy.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/list.h> #include <linux/list.h>
...@@ -81,6 +80,7 @@ struct apm_user { ...@@ -81,6 +80,7 @@ struct apm_user {
*/ */
static int suspends_pending; static int suspends_pending;
static int apm_disabled; static int apm_disabled;
static int arm_apm_active;
static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue); static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue);
static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue); static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue);
...@@ -477,9 +477,9 @@ static int kapmd(void *arg) ...@@ -477,9 +477,9 @@ static int kapmd(void *arg)
apm_event_t event; apm_event_t event;
wait_event_interruptible(kapmd_wait, wait_event_interruptible(kapmd_wait,
!queue_empty(&kapmd_queue) || !pm_active); !queue_empty(&kapmd_queue) || !arm_apm_active);
if (!pm_active) if (!arm_apm_active)
break; break;
spin_lock_irq(&kapmd_queue_lock); spin_lock_irq(&kapmd_queue_lock);
...@@ -522,16 +522,11 @@ static int __init apm_init(void) ...@@ -522,16 +522,11 @@ static int __init apm_init(void)
return -ENODEV; return -ENODEV;
} }
if (PM_IS_ACTIVE()) { arm_apm_active = 1;
printk(KERN_NOTICE "apm: overridden by ACPI.\n");
return -EINVAL;
}
pm_active = 1;
ret = kernel_thread(kapmd, NULL, CLONE_KERNEL); ret = kernel_thread(kapmd, NULL, CLONE_KERNEL);
if (ret < 0) { if (ret < 0) {
pm_active = 0; arm_apm_active = 0;
return ret; return ret;
} }
...@@ -543,7 +538,7 @@ static int __init apm_init(void) ...@@ -543,7 +538,7 @@ static int __init apm_init(void)
if (ret != 0) { if (ret != 0) {
remove_proc_entry("apm", NULL); remove_proc_entry("apm", NULL);
pm_active = 0; arm_apm_active = 0;
wake_up(&kapmd_wait); wake_up(&kapmd_wait);
wait_for_completion(&kapmd_exit); wait_for_completion(&kapmd_exit);
} }
...@@ -556,7 +551,7 @@ static void __exit apm_exit(void) ...@@ -556,7 +551,7 @@ static void __exit apm_exit(void)
misc_deregister(&apm_device); misc_deregister(&apm_device);
remove_proc_entry("apm", NULL); remove_proc_entry("apm", NULL);
pm_active = 0; arm_apm_active = 0;
wake_up(&kapmd_wait); wake_up(&kapmd_wait);
wait_for_completion(&kapmd_exit); wait_for_completion(&kapmd_exit);
} }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
*/ */
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/pci.h> #include <linux/dma-mapping.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -65,37 +65,41 @@ static void isa_enable_dma(dmach_t channel, dma_t *dma) ...@@ -65,37 +65,41 @@ static void isa_enable_dma(dmach_t channel, dma_t *dma)
{ {
if (dma->invalid) { if (dma->invalid) {
unsigned long address, length; unsigned long address, length;
unsigned int mode, direction; unsigned int mode;
enum dma_data_direction direction;
mode = channel & 3; mode = channel & 3;
switch (dma->dma_mode & DMA_MODE_MASK) { switch (dma->dma_mode & DMA_MODE_MASK) {
case DMA_MODE_READ: case DMA_MODE_READ:
mode |= ISA_DMA_MODE_READ; mode |= ISA_DMA_MODE_READ;
direction = PCI_DMA_FROMDEVICE; direction = DMA_FROM_DEVICE;
break; break;
case DMA_MODE_WRITE: case DMA_MODE_WRITE:
mode |= ISA_DMA_MODE_WRITE; mode |= ISA_DMA_MODE_WRITE;
direction = PCI_DMA_TODEVICE; direction = DMA_TO_DEVICE;
break; break;
case DMA_MODE_CASCADE: case DMA_MODE_CASCADE:
mode |= ISA_DMA_MODE_CASCADE; mode |= ISA_DMA_MODE_CASCADE;
direction = PCI_DMA_BIDIRECTIONAL; direction = DMA_BIDIRECTIONAL;
break; break;
default: default:
direction = PCI_DMA_NONE; direction = DMA_NONE;
break; break;
} }
if (!dma->using_sg) { if (!dma->sg) {
/* /*
* Cope with ISA-style drivers which expect cache * Cope with ISA-style drivers which expect cache
* coherence. * coherence.
*/ */
dma->buf.dma_address = pci_map_single(NULL, dma->sg = &dma->buf;
dma->buf.__address, dma->buf.length, dma->sgcount = 1;
dma->buf.length = dma->count;
dma->buf.dma_address = dma_map_single(NULL,
dma->addr, dma->count,
direction); direction);
} }
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
* DMA facilities. * DMA facilities.
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/slab.h>
#include <linux/mman.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/errno.h> #include <linux/errno.h>
...@@ -23,8 +21,7 @@ ...@@ -23,8 +21,7 @@
#include <asm/mach/dma.h> #include <asm/mach/dma.h>
DEFINE_SPINLOCK(dma_spin_lock); DEFINE_SPINLOCK(dma_spin_lock);
EXPORT_SYMBOL(dma_spin_lock);
#if MAX_DMA_CHANNELS > 0
static dma_t dma_chan[MAX_DMA_CHANNELS]; static dma_t dma_chan[MAX_DMA_CHANNELS];
...@@ -81,6 +78,7 @@ int request_dma(dmach_t channel, const char *device_id) ...@@ -81,6 +78,7 @@ int request_dma(dmach_t channel, const char *device_id)
busy: busy:
return -EBUSY; return -EBUSY;
} }
EXPORT_SYMBOL(request_dma);
/* /*
* Free DMA channel * Free DMA channel
...@@ -112,6 +110,7 @@ void free_dma(dmach_t channel) ...@@ -112,6 +110,7 @@ void free_dma(dmach_t channel)
bad_dma: bad_dma:
printk(KERN_ERR "dma: trying to free DMA%d\n", channel); printk(KERN_ERR "dma: trying to free DMA%d\n", channel);
} }
EXPORT_SYMBOL(free_dma);
/* Set DMA Scatter-Gather list /* Set DMA Scatter-Gather list
*/ */
...@@ -125,15 +124,15 @@ void set_dma_sg (dmach_t channel, struct scatterlist *sg, int nr_sg) ...@@ -125,15 +124,15 @@ void set_dma_sg (dmach_t channel, struct scatterlist *sg, int nr_sg)
dma->sg = sg; dma->sg = sg;
dma->sgcount = nr_sg; dma->sgcount = nr_sg;
dma->using_sg = 1;
dma->invalid = 1; dma->invalid = 1;
} }
EXPORT_SYMBOL(set_dma_sg);
/* Set DMA address /* Set DMA address
* *
* Copy address to the structure, and set the invalid bit * Copy address to the structure, and set the invalid bit
*/ */
void set_dma_addr (dmach_t channel, unsigned long physaddr) void __set_dma_addr (dmach_t channel, void *addr)
{ {
dma_t *dma = dma_chan + channel; dma_t *dma = dma_chan + channel;
...@@ -141,12 +140,11 @@ void set_dma_addr (dmach_t channel, unsigned long physaddr) ...@@ -141,12 +140,11 @@ void set_dma_addr (dmach_t channel, unsigned long physaddr)
printk(KERN_ERR "dma%d: altering DMA address while " printk(KERN_ERR "dma%d: altering DMA address while "
"DMA active\n", channel); "DMA active\n", channel);
dma->sg = &dma->buf; dma->sg = NULL;
dma->sgcount = 1; dma->addr = addr;
dma->buf.__address = bus_to_virt(physaddr);
dma->using_sg = 0;
dma->invalid = 1; dma->invalid = 1;
} }
EXPORT_SYMBOL(__set_dma_addr);
/* Set DMA byte count /* Set DMA byte count
* *
...@@ -160,12 +158,11 @@ void set_dma_count (dmach_t channel, unsigned long count) ...@@ -160,12 +158,11 @@ void set_dma_count (dmach_t channel, unsigned long count)
printk(KERN_ERR "dma%d: altering DMA count while " printk(KERN_ERR "dma%d: altering DMA count while "
"DMA active\n", channel); "DMA active\n", channel);
dma->sg = &dma->buf; dma->sg = NULL;
dma->sgcount = 1; dma->count = count;
dma->buf.length = count;
dma->using_sg = 0;
dma->invalid = 1; dma->invalid = 1;
} }
EXPORT_SYMBOL(set_dma_count);
/* Set DMA direction mode /* Set DMA direction mode
*/ */
...@@ -180,6 +177,7 @@ void set_dma_mode (dmach_t channel, dmamode_t mode) ...@@ -180,6 +177,7 @@ void set_dma_mode (dmach_t channel, dmamode_t mode)
dma->dma_mode = mode; dma->dma_mode = mode;
dma->invalid = 1; dma->invalid = 1;
} }
EXPORT_SYMBOL(set_dma_mode);
/* Enable DMA channel /* Enable DMA channel
*/ */
...@@ -200,6 +198,7 @@ void enable_dma (dmach_t channel) ...@@ -200,6 +198,7 @@ void enable_dma (dmach_t channel)
printk(KERN_ERR "dma%d: trying to enable free DMA\n", channel); printk(KERN_ERR "dma%d: trying to enable free DMA\n", channel);
BUG(); BUG();
} }
EXPORT_SYMBOL(enable_dma);
/* Disable DMA channel /* Disable DMA channel
*/ */
...@@ -220,6 +219,7 @@ void disable_dma (dmach_t channel) ...@@ -220,6 +219,7 @@ void disable_dma (dmach_t channel)
printk(KERN_ERR "dma%d: trying to disable free DMA\n", channel); printk(KERN_ERR "dma%d: trying to disable free DMA\n", channel);
BUG(); BUG();
} }
EXPORT_SYMBOL(disable_dma);
/* /*
* Is the specified DMA channel active? * Is the specified DMA channel active?
...@@ -233,6 +233,7 @@ void set_dma_page(dmach_t channel, char pagenr) ...@@ -233,6 +233,7 @@ void set_dma_page(dmach_t channel, char pagenr)
{ {
printk(KERN_ERR "dma%d: trying to set_dma_page\n", channel); printk(KERN_ERR "dma%d: trying to set_dma_page\n", channel);
} }
EXPORT_SYMBOL(set_dma_page);
void set_dma_speed(dmach_t channel, int cycle_ns) void set_dma_speed(dmach_t channel, int cycle_ns)
{ {
...@@ -243,6 +244,7 @@ void set_dma_speed(dmach_t channel, int cycle_ns) ...@@ -243,6 +244,7 @@ void set_dma_speed(dmach_t channel, int cycle_ns)
ret = dma->d_ops->setspeed(channel, dma, cycle_ns); ret = dma->d_ops->setspeed(channel, dma, cycle_ns);
dma->speed = ret; dma->speed = ret;
} }
EXPORT_SYMBOL(set_dma_speed);
int get_dma_residue(dmach_t channel) int get_dma_residue(dmach_t channel)
{ {
...@@ -254,49 +256,12 @@ int get_dma_residue(dmach_t channel) ...@@ -254,49 +256,12 @@ int get_dma_residue(dmach_t channel)
return ret; return ret;
} }
EXPORT_SYMBOL(get_dma_residue);
void __init init_dma(void) static int __init init_dma(void)
{ {
arch_dma_init(dma_chan); arch_dma_init(dma_chan);
}
#else
int request_dma(dmach_t channel, const char *device_id)
{
return -EINVAL;
}
int get_dma_residue(dmach_t channel)
{
return 0; return 0;
} }
#define GLOBAL_ALIAS(_a,_b) asm (".set " #_a "," #_b "; .globl " #_a) core_initcall(init_dma);
GLOBAL_ALIAS(disable_dma, get_dma_residue);
GLOBAL_ALIAS(enable_dma, get_dma_residue);
GLOBAL_ALIAS(free_dma, get_dma_residue);
GLOBAL_ALIAS(get_dma_list, get_dma_residue);
GLOBAL_ALIAS(set_dma_mode, get_dma_residue);
GLOBAL_ALIAS(set_dma_page, get_dma_residue);
GLOBAL_ALIAS(set_dma_count, get_dma_residue);
GLOBAL_ALIAS(set_dma_addr, get_dma_residue);
GLOBAL_ALIAS(set_dma_sg, get_dma_residue);
GLOBAL_ALIAS(set_dma_speed, get_dma_residue);
GLOBAL_ALIAS(init_dma, get_dma_residue);
#endif
EXPORT_SYMBOL(request_dma);
EXPORT_SYMBOL(free_dma);
EXPORT_SYMBOL(enable_dma);
EXPORT_SYMBOL(disable_dma);
EXPORT_SYMBOL(set_dma_addr);
EXPORT_SYMBOL(set_dma_count);
EXPORT_SYMBOL(set_dma_mode);
EXPORT_SYMBOL(set_dma_page);
EXPORT_SYMBOL(get_dma_residue);
EXPORT_SYMBOL(set_dma_sg);
EXPORT_SYMBOL(set_dma_speed);
EXPORT_SYMBOL(dma_spin_lock);
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
#include <asm/memory.h> #include <asm/memory.h>
#include <asm/glue.h> #include <asm/glue.h>
#include <asm/vfpmacros.h> #include <asm/vfpmacros.h>
#include <asm/hardware.h> /* should be moved into entry-macro.S */
#include <asm/arch/irqs.h> /* should be moved into entry-macro.S */
#include <asm/arch/entry-macro.S> #include <asm/arch/entry-macro.S>
#include "entry-header.S" #include "entry-header.S"
......
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
#define MACHINFO_PGOFFIO 12 #define MACHINFO_PGOFFIO 12
#define MACHINFO_NAME 16 #define MACHINFO_NAME 16
#define KERNEL_RAM_ADDR (PAGE_OFFSET + TEXT_OFFSET)
/* /*
* swapper_pg_dir is the virtual address of the initial page table. * swapper_pg_dir is the virtual address of the initial page table.
* We place the page tables 16K below KERNEL_RAM_ADDR. Therefore, we must * We place the page tables 16K below KERNEL_RAM_ADDR. Therefore, we must
......
...@@ -1027,7 +1027,6 @@ void __init init_irq_proc(void) ...@@ -1027,7 +1027,6 @@ void __init init_irq_proc(void)
void __init init_IRQ(void) void __init init_IRQ(void)
{ {
struct irqdesc *desc; struct irqdesc *desc;
extern void init_dma(void);
int irq; int irq;
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
...@@ -1041,7 +1040,6 @@ void __init init_IRQ(void) ...@@ -1041,7 +1040,6 @@ void __init init_IRQ(void)
} }
init_arch_irq(); init_arch_irq();
init_dma();
} }
static int __init noirqdebug_setup(char *str) static int __init noirqdebug_setup(char *str)
......
...@@ -28,10 +28,9 @@ ...@@ -28,10 +28,9 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/cpu.h> #include <linux/cpu.h>
#include <asm/system.h>
#include <asm/io.h>
#include <asm/leds.h> #include <asm/leds.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/system.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
......
...@@ -26,8 +26,6 @@ ...@@ -26,8 +26,6 @@
#include <asm/cpu.h> #include <asm/cpu.h>
#include <asm/elf.h> #include <asm/elf.h>
#include <asm/hardware.h>
#include <asm/io.h>
#include <asm/procinfo.h> #include <asm/procinfo.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
......
...@@ -29,9 +29,6 @@ ...@@ -29,9 +29,6 @@
#include <linux/sysdev.h> #include <linux/sysdev.h>
#include <linux/timer.h> #include <linux/timer.h>
#include <asm/hardware.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/leds.h> #include <asm/leds.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <asm/atomic.h> #include <asm/atomic.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/io.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/unistd.h> #include <asm/unistd.h>
......
...@@ -17,15 +17,13 @@ jiffies = jiffies_64; ...@@ -17,15 +17,13 @@ jiffies = jiffies_64;
jiffies = jiffies_64 + 4; jiffies = jiffies_64 + 4;
#endif #endif
SECTIONS
{
#ifdef CONFIG_XIP_KERNEL #ifdef CONFIG_XIP_KERNEL
#define TEXTADDR XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR) . = XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR);
#else #else
#define TEXTADDR KERNEL_RAM_ADDR . = PAGE_OFFSET + TEXT_OFFSET;
#endif #endif
SECTIONS
{
. = TEXTADDR;
.init : { /* Init code and data */ .init : { /* Init code and data */
_stext = .; _stext = .;
_sinittext = .; _sinittext = .;
...@@ -104,7 +102,7 @@ SECTIONS ...@@ -104,7 +102,7 @@ SECTIONS
#ifdef CONFIG_XIP_KERNEL #ifdef CONFIG_XIP_KERNEL
__data_loc = ALIGN(4); /* location in binary */ __data_loc = ALIGN(4); /* location in binary */
. = KERNEL_RAM_ADDR; . = PAGE_OFFSET + TEXT_OFFSET;
#else #else
. = ALIGN(THREAD_SIZE); . = ALIGN(THREAD_SIZE);
__data_loc = .; __data_loc = .;
......
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/clk.h>
#include <asm/semaphore.h> #include <asm/semaphore.h>
#include <asm/hardware/clock.h>
#include "clock.h" #include "clock.h"
...@@ -58,17 +58,6 @@ void clk_disable(struct clk *clk) ...@@ -58,17 +58,6 @@ void clk_disable(struct clk *clk)
} }
EXPORT_SYMBOL(clk_disable); EXPORT_SYMBOL(clk_disable);
int clk_use(struct clk *clk)
{
return 0;
}
EXPORT_SYMBOL(clk_use);
void clk_unuse(struct clk *clk)
{
}
EXPORT_SYMBOL(clk_unuse);
unsigned long clk_get_rate(struct clk *clk) unsigned long clk_get_rate(struct clk *clk)
{ {
return clk->rate; return clk->rate;
......
...@@ -20,11 +20,11 @@ ...@@ -20,11 +20,11 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/timex.h> #include <linux/timex.h>
#include <linux/signal.h> #include <linux/signal.h>
#include <linux/amba/bus.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/sizes.h> #include <asm/sizes.h>
#include <asm/hardware/amba.h>
#include <asm/mach/flash.h> #include <asm/mach/flash.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
*/ */
#include <asm/hardware/amba_clcd.h> #include <linux/amba/clcd.h>
struct sys_timer; struct sys_timer;
......
/*
* linux/arch/arm/mach-clps711x/dma.c
*
* Copyright (C) 2000 Deep Blue Solutions Ltd
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/init.h>
#include <asm/dma.h>
#include <asm/mach/dma.h>
void __init arch_dma_init(dma_t *dma)
{
}
/*
* linux/arch/arm/mach-epxa10db/dma.c
*
* Copyright (C) 1999 ARM Limited
* Copyright (C) 2000 Deep Blue Solutions Ltd
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/init.h>
#include <asm/dma.h>
#include <asm/mach/dma.h>
void __init arch_dma_init(dma_t *dma)
{
}
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/scatterlist.h>
#include <asm/mach/dma.h> #include <asm/mach/dma.h>
#include <asm/hardware/dec21285.h> #include <asm/hardware/dec21285.h>
......
...@@ -29,27 +29,27 @@ ...@@ -29,27 +29,27 @@
#include "generic.h" #include "generic.h"
#include <asm/serial.h> #include <asm/serial.h>
static struct resource mx1ads_resources[] = { static struct resource cs89x0_resources[] = {
[0] = { [0] = {
.start = IMX_CS4_VIRT, .start = IMX_CS4_PHYS + 0x300,
.end = IMX_CS4_VIRT + 16, .end = IMX_CS4_PHYS + 0x300 + 16,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, },
[1] = { [1] = {
.start = 13, .start = IRQ_GPIOC(17),
.end = 13, .end = IRQ_GPIOC(17),
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
}, },
}; };
static struct platform_device mx1ads_device = { static struct platform_device cs89x0_device = {
.name = "mx1ads", .name = "cirrus-cs89x0",
.num_resources = ARRAY_SIZE(mx1ads_resources), .num_resources = ARRAY_SIZE(cs89x0_resources),
.resource = mx1ads_resources, .resource = cs89x0_resources,
}; };
static struct platform_device *devices[] __initdata = { static struct platform_device *devices[] __initdata = {
&mx1ads_device, &cs89x0_device,
}; };
static void __init static void __init
...@@ -61,45 +61,10 @@ mx1ads_init(void) ...@@ -61,45 +61,10 @@ mx1ads_init(void)
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
} }
static struct map_desc mx1ads_io_desc[] __initdata = {
{
.virtual = IMX_CS0_VIRT,
.pfn = __phys_to_pfn(IMX_CS0_PHYS),
.length = IMX_CS0_SIZE,
.type = MT_DEVICE
}, {
.virtual = IMX_CS1_VIRT,
.pfn = __phys_to_pfn(IMX_CS1_PHYS),
.length = IMX_CS1_SIZE,
.type = MT_DEVICE
}, {
.virtual = IMX_CS2_VIRT,
.pfn = __phys_to_pfn(IMX_CS2_PHYS),
.length = IMX_CS2_SIZE,
.type = MT_DEVICE
}, {
.virtual = IMX_CS3_VIRT,
.pfn = __phys_to_pfn(IMX_CS3_PHYS),
.length = IMX_CS3_SIZE,
.type = MT_DEVICE
}, {
.virtual = IMX_CS4_VIRT,
.pfn = __phys_to_pfn(IMX_CS4_PHYS),
.length = IMX_CS4_SIZE,
.type = MT_DEVICE
}, {
.virtual = IMX_CS5_VIRT,
.pfn = __phys_to_pfn(IMX_CS5_PHYS),
.length = IMX_CS5_SIZE,
.type = MT_DEVICE
}
};
static void __init static void __init
mx1ads_map_io(void) mx1ads_map_io(void)
{ {
imx_map_io(); imx_map_io();
iotable_init(mx1ads_io_desc, ARRAY_SIZE(mx1ads_io_desc));
} }
MACHINE_START(MX1ADS, "Motorola MX1ADS") MACHINE_START(MX1ADS, "Motorola MX1ADS")
......
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/clk.h>
#include <asm/semaphore.h> #include <asm/semaphore.h>
#include <asm/hardware/clock.h>
#include <asm/hardware/icst525.h> #include <asm/hardware/icst525.h>
#include "clock.h" #include "clock.h"
...@@ -58,17 +58,6 @@ void clk_disable(struct clk *clk) ...@@ -58,17 +58,6 @@ void clk_disable(struct clk *clk)
} }
EXPORT_SYMBOL(clk_disable); EXPORT_SYMBOL(clk_disable);
int clk_use(struct clk *clk)
{
return 0;
}
EXPORT_SYMBOL(clk_use);
void clk_unuse(struct clk *clk)
{
}
EXPORT_SYMBOL(clk_unuse);
unsigned long clk_get_rate(struct clk *clk) unsigned long clk_get_rate(struct clk *clk)
{ {
return clk->rate; return clk->rate;
......
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/amba/bus.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardware/amba.h>
#include <asm/hardware/arm_timer.h> #include <asm/hardware/arm_timer.h>
#include <asm/arch/cm.h> #include <asm/arch/cm.h>
#include <asm/system.h> #include <asm/system.h>
......
/*
* linux/arch/arm/mach-integrator/dma.c
*
* Copyright (C) 1999 ARM Limited
* Copyright (C) 2000 Deep Blue Solutions Ltd
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/slab.h>
#include <linux/mman.h>
#include <linux/init.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/dma.h>
#include <asm/io.h>
#include <asm/hardware.h>
#include <asm/mach/dma.h>
void __init arch_dma_init(dma_t *dma)
{
}
...@@ -18,11 +18,11 @@ ...@@ -18,11 +18,11 @@
#include <linux/device.h> #include <linux/device.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/amba/bus.h>
#include <linux/amba/clcd.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardware/icst525.h> #include <asm/hardware/icst525.h>
#include <asm/hardware/amba.h>
#include <asm/hardware/amba_clcd.h>
#include <asm/arch/lm.h> #include <asm/arch/lm.h>
#include <asm/arch/impd1.h> #include <asm/arch/impd1.h>
#include <asm/sizes.h> #include <asm/sizes.h>
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/sysdev.h> #include <linux/sysdev.h>
#include <linux/amba/bus.h>
#include <linux/amba/kmi.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -32,8 +34,6 @@ ...@@ -32,8 +34,6 @@
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/param.h> /* HZ */ #include <asm/param.h> /* HZ */
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/hardware/amba.h>
#include <asm/hardware/amba_kmi.h>
#include <asm/arch/lm.h> #include <asm/arch/lm.h>
......
...@@ -16,15 +16,15 @@ ...@@ -16,15 +16,15 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/sysdev.h> #include <linux/sysdev.h>
#include <linux/amba/bus.h>
#include <linux/amba/kmi.h>
#include <linux/amba/clcd.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/hardware/amba.h>
#include <asm/hardware/amba_kmi.h>
#include <asm/hardware/amba_clcd.h>
#include <asm/hardware/icst525.h> #include <asm/hardware/icst525.h>
#include <asm/arch/cm.h> #include <asm/arch/cm.h>
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/amba/bus.h>
#include <asm/hardware/amba.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/serial_core.h> #include <linux/serial_8250.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
...@@ -50,32 +50,74 @@ static struct map_desc iop331_std_desc[] __initdata = { ...@@ -50,32 +50,74 @@ static struct map_desc iop331_std_desc[] __initdata = {
} }
}; };
static struct uart_port iop331_serial_ports[] = { static struct resource iop33x_uart0_resources[] = {
{ [0] = {
.membase = (char*)(IOP331_UART0_VIRT), .start = IOP331_UART0_PHYS,
.mapbase = (IOP331_UART0_PHYS), .end = IOP331_UART0_PHYS + 0x3f,
.irq = IRQ_IOP331_UART0, .flags = IORESOURCE_MEM,
.flags = UPF_SKIP_TEST, },
.iotype = UPIO_MEM, [1] = {
.regshift = 2, .start = IRQ_IOP331_UART0,
.uartclk = IOP331_UART_XTAL, .end = IRQ_IOP331_UART0,
.line = 0, .flags = IORESOURCE_IRQ
.type = PORT_XSCALE, }
.fifosize = 32 };
} , {
.membase = (char*)(IOP331_UART1_VIRT), static struct resource iop33x_uart1_resources[] = {
.mapbase = (IOP331_UART1_PHYS), [0] = {
.irq = IRQ_IOP331_UART1, .start = IOP331_UART1_PHYS,
.flags = UPF_SKIP_TEST, .end = IOP331_UART1_PHYS + 0x3f,
.iotype = UPIO_MEM, .flags = IORESOURCE_MEM,
.regshift = 2, },
.uartclk = IOP331_UART_XTAL, [1] = {
.line = 1, .start = IRQ_IOP331_UART1,
.type = PORT_XSCALE, .end = IRQ_IOP331_UART1,
.fifosize = 32 .flags = IORESOURCE_IRQ
} }
}; };
static struct plat_serial8250_port iop33x_uart0_data[] = {
{
.membase = (char*)(IOP331_UART0_VIRT),
.mapbase = (IOP331_UART0_PHYS),
.irq = IRQ_IOP331_UART0,
.uartclk = IOP331_UART_XTAL,
.regshift = 2,
.iotype = UPIO_MEM,
.flags = UPF_SKIP_TEST,
},
{ },
};
static struct plat_serial8250_port iop33x_uart1_data[] = {
{
.membase = (char*)(IOP331_UART1_VIRT),
.mapbase = (IOP331_UART1_PHYS),
.irq = IRQ_IOP331_UART1,
.uartclk = IOP331_UART_XTAL,
.regshift = 2,
.iotype = UPIO_MEM,
.flags = UPF_SKIP_TEST,
},
{ },
};
static struct platform_device iop33x_uart0 = {
.name = "serial8250",
.id = 0,
.dev.platform_data = iop33x_uart0_data,
.num_resources = 2,
.resource = iop33x_uart0_resources,
};
static struct platform_device iop33x_uart1 = {
.name = "serial8250",
.id = 1,
.dev.platform_data = iop33x_uart1_data,
.num_resources = 2,
.resource = iop33x_uart1_resources,
};
static struct resource iop33x_i2c_0_resources[] = { static struct resource iop33x_i2c_0_resources[] = {
[0] = { [0] = {
.start = 0xfffff680, .start = 0xfffff680,
...@@ -117,6 +159,8 @@ static struct platform_device iop33x_i2c_1_controller = { ...@@ -117,6 +159,8 @@ static struct platform_device iop33x_i2c_1_controller = {
}; };
static struct platform_device *iop33x_devices[] __initdata = { static struct platform_device *iop33x_devices[] __initdata = {
&iop33x_uart0,
&iop33x_uart1,
&iop33x_i2c_0_controller, &iop33x_i2c_0_controller,
&iop33x_i2c_1_controller &iop33x_i2c_1_controller
}; };
...@@ -133,8 +177,6 @@ void __init iop33x_init(void) ...@@ -133,8 +177,6 @@ void __init iop33x_init(void)
void __init iop331_map_io(void) void __init iop331_map_io(void)
{ {
iotable_init(iop331_std_desc, ARRAY_SIZE(iop331_std_desc)); iotable_init(iop331_std_desc, ARRAY_SIZE(iop331_std_desc));
early_serial_setup(&iop331_serial_ports[0]);
early_serial_setup(&iop331_serial_ports[1]);
} }
#ifdef CONFIG_ARCH_IOP331 #ifdef CONFIG_ARCH_IOP331
......
...@@ -71,6 +71,14 @@ config ARCH_PRPMC1100 ...@@ -71,6 +71,14 @@ config ARCH_PRPMC1100
PrPCM1100 Processor Mezanine Module. For more information on PrPCM1100 Processor Mezanine Module. For more information on
this platform, see <file:Documentation/arm/IXP4xx>. this platform, see <file:Documentation/arm/IXP4xx>.
config MACH_NAS100D
bool
prompt "NAS100D"
help
Say 'Y' here if you want your kernel to support Iomega's
NAS 100d device. For more information on this platform,
see http://www.nslu2-linux.org/wiki/NAS100d/HomePage
# #
# Avila and IXDP share the same source for now. Will change in future # Avila and IXDP share the same source for now. Will change in future
# #
......
...@@ -9,4 +9,5 @@ obj-$(CONFIG_MACH_IXDPG425) += ixdpg425-pci.o coyote-setup.o ...@@ -9,4 +9,5 @@ obj-$(CONFIG_MACH_IXDPG425) += ixdpg425-pci.o coyote-setup.o
obj-$(CONFIG_ARCH_ADI_COYOTE) += coyote-pci.o coyote-setup.o obj-$(CONFIG_ARCH_ADI_COYOTE) += coyote-pci.o coyote-setup.o
obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-pci.o gtwx5715-setup.o obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-pci.o gtwx5715-setup.o
obj-$(CONFIG_MACH_NSLU2) += nslu2-pci.o nslu2-setup.o nslu2-power.o obj-$(CONFIG_MACH_NSLU2) += nslu2-pci.o nslu2-setup.o nslu2-power.o
obj-$(CONFIG_MACH_NAS100D) += nas100d-pci.o nas100d-setup.o nas100d-power.o
...@@ -341,6 +341,29 @@ int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size) ...@@ -341,6 +341,29 @@ int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
return (dev->bus == &pci_bus_type ) && ((dma_addr + size) >= SZ_64M); return (dev->bus == &pci_bus_type ) && ((dma_addr + size) >= SZ_64M);
} }
/*
* Only first 64MB of memory can be accessed via PCI.
* We use GFP_DMA to allocate safe buffers to do map/unmap.
* This is really ugly and we need a better way of specifying
* DMA-capable regions of memory.
*/
void __init ixp4xx_adjust_zones(int node, unsigned long *zone_size,
unsigned long *zhole_size)
{
unsigned int sz = SZ_64M >> PAGE_SHIFT;
/*
* Only adjust if > 64M on current system
*/
if (node || (zone_size[0] <= sz))
return;
zone_size[1] = zone_size[0] - sz;
zone_size[0] = sz;
zhole_size[1] = zhole_size[0];
zhole_size[0] = 0;
}
void __init ixp4xx_pci_preinit(void) void __init ixp4xx_pci_preinit(void)
{ {
unsigned long processor_id; unsigned long processor_id;
......
...@@ -142,6 +142,8 @@ static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type) ...@@ -142,6 +142,8 @@ static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type)
*int_reg &= ~(IXP4XX_GPIO_STYLE_CLEAR << *int_reg &= ~(IXP4XX_GPIO_STYLE_CLEAR <<
(line * IXP4XX_GPIO_STYLE_SIZE)); (line * IXP4XX_GPIO_STYLE_SIZE));
*IXP4XX_GPIO_GPISR = (1 << line);
/* Set the new style */ /* Set the new style */
*int_reg |= (int_style << (line * IXP4XX_GPIO_STYLE_SIZE)); *int_reg |= (int_style << (line * IXP4XX_GPIO_STYLE_SIZE));
...@@ -169,7 +171,7 @@ static void ixp4xx_irq_ack(unsigned int irq) ...@@ -169,7 +171,7 @@ static void ixp4xx_irq_ack(unsigned int irq)
int line = (irq < 32) ? irq2gpio[irq] : -1; int line = (irq < 32) ? irq2gpio[irq] : -1;
if (line >= 0) if (line >= 0)
gpio_line_isr_clear(line); *IXP4XX_GPIO_GPISR = (1 << line);
} }
/* /*
...@@ -330,11 +332,27 @@ static struct platform_device *ixp46x_devices[] __initdata = { ...@@ -330,11 +332,27 @@ static struct platform_device *ixp46x_devices[] __initdata = {
&ixp46x_i2c_controller &ixp46x_i2c_controller
}; };
unsigned long ixp4xx_exp_bus_size;
void __init ixp4xx_sys_init(void) void __init ixp4xx_sys_init(void)
{ {
ixp4xx_exp_bus_size = SZ_16M;
if (cpu_is_ixp46x()) { if (cpu_is_ixp46x()) {
int region;
platform_add_devices(ixp46x_devices, platform_add_devices(ixp46x_devices,
ARRAY_SIZE(ixp46x_devices)); ARRAY_SIZE(ixp46x_devices));
for (region = 0; region < 7; region++) {
if((*(IXP4XX_EXP_REG(0x4 * region)) & 0x200)) {
ixp4xx_exp_bus_size = SZ_32M;
break;
}
}
} }
printk("IXP4xx: Using %uMiB expansion bus window size\n",
ixp4xx_exp_bus_size >> 20);
} }
...@@ -33,9 +33,6 @@ void __init coyote_pci_preinit(void) ...@@ -33,9 +33,6 @@ void __init coyote_pci_preinit(void)
set_irq_type(IRQ_COYOTE_PCI_SLOT0, IRQT_LOW); set_irq_type(IRQ_COYOTE_PCI_SLOT0, IRQT_LOW);
set_irq_type(IRQ_COYOTE_PCI_SLOT1, IRQT_LOW); set_irq_type(IRQ_COYOTE_PCI_SLOT1, IRQT_LOW);
gpio_line_isr_clear(COYOTE_PCI_SLOT0_PIN);
gpio_line_isr_clear(COYOTE_PCI_SLOT1_PIN);
ixp4xx_pci_preinit(); ixp4xx_pci_preinit();
} }
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/serial_8250.h> #include <linux/serial_8250.h>
#include <linux/slab.h>
#include <asm/types.h> #include <asm/types.h>
#include <asm/setup.h> #include <asm/setup.h>
...@@ -30,8 +31,6 @@ static struct flash_platform_data coyote_flash_data = { ...@@ -30,8 +31,6 @@ static struct flash_platform_data coyote_flash_data = {
}; };
static struct resource coyote_flash_resource = { static struct resource coyote_flash_resource = {
.start = COYOTE_FLASH_BASE,
.end = COYOTE_FLASH_BASE + COYOTE_FLASH_SIZE - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}; };
...@@ -81,6 +80,11 @@ static struct platform_device *coyote_devices[] __initdata = { ...@@ -81,6 +80,11 @@ static struct platform_device *coyote_devices[] __initdata = {
static void __init coyote_init(void) static void __init coyote_init(void)
{ {
ixp4xx_sys_init();
coyote_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
coyote_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_32M - 1;
*IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE; *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;
*IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0; *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
...@@ -91,8 +95,6 @@ static void __init coyote_init(void) ...@@ -91,8 +95,6 @@ static void __init coyote_init(void)
coyote_uart_data[0].irq = IRQ_IXP4XX_UART1; coyote_uart_data[0].irq = IRQ_IXP4XX_UART1;
} }
ixp4xx_sys_init();
platform_add_devices(coyote_devices, ARRAY_SIZE(coyote_devices)); platform_add_devices(coyote_devices, ARRAY_SIZE(coyote_devices));
} }
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/serial_8250.h> #include <linux/serial_8250.h>
#include <linux/slab.h>
#include <asm/types.h> #include <asm/types.h>
#include <asm/setup.h> #include <asm/setup.h>
...@@ -106,11 +107,9 @@ static struct flash_platform_data gtwx5715_flash_data = { ...@@ -106,11 +107,9 @@ static struct flash_platform_data gtwx5715_flash_data = {
.width = 2, .width = 2,
}; };
static struct resource gtwx5715_flash_resource = { static struct gtw5715_flash_resource = {
.start = GTWX5715_FLASH_BASE,
.end = GTWX5715_FLASH_BASE + GTWX5715_FLASH_SIZE - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}; }
static struct platform_device gtwx5715_flash = { static struct platform_device gtwx5715_flash = {
.name = "IXP4XX-Flash", .name = "IXP4XX-Flash",
...@@ -129,6 +128,14 @@ static struct platform_device *gtwx5715_devices[] __initdata = { ...@@ -129,6 +128,14 @@ static struct platform_device *gtwx5715_devices[] __initdata = {
static void __init gtwx5715_init(void) static void __init gtwx5715_init(void)
{ {
ixp4xx_sys_init();
if (!flash_resource)
printk(KERN_ERR "Could not allocate flash resource\n");
gtwx5715_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
gtwx5715_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_8M - 1;
platform_add_devices(gtwx5715_devices, ARRAY_SIZE(gtwx5715_devices)); platform_add_devices(gtwx5715_devices, ARRAY_SIZE(gtwx5715_devices));
} }
......
...@@ -32,11 +32,6 @@ void __init ixdp425_pci_preinit(void) ...@@ -32,11 +32,6 @@ void __init ixdp425_pci_preinit(void)
set_irq_type(IRQ_IXDP425_PCI_INTC, IRQT_LOW); set_irq_type(IRQ_IXDP425_PCI_INTC, IRQT_LOW);
set_irq_type(IRQ_IXDP425_PCI_INTD, IRQT_LOW); set_irq_type(IRQ_IXDP425_PCI_INTD, IRQT_LOW);
gpio_line_isr_clear(IXDP425_PCI_INTA_PIN);
gpio_line_isr_clear(IXDP425_PCI_INTB_PIN);
gpio_line_isr_clear(IXDP425_PCI_INTC_PIN);
gpio_line_isr_clear(IXDP425_PCI_INTD_PIN);
ixp4xx_pci_preinit(); ixp4xx_pci_preinit();
} }
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/serial_8250.h> #include <linux/serial_8250.h>
#include <linux/slab.h>
#include <asm/types.h> #include <asm/types.h>
#include <asm/setup.h> #include <asm/setup.h>
...@@ -30,8 +31,6 @@ static struct flash_platform_data ixdp425_flash_data = { ...@@ -30,8 +31,6 @@ static struct flash_platform_data ixdp425_flash_data = {
}; };
static struct resource ixdp425_flash_resource = { static struct resource ixdp425_flash_resource = {
.start = IXDP425_FLASH_BASE,
.end = IXDP425_FLASH_BASE + IXDP425_FLASH_SIZE - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}; };
...@@ -108,17 +107,13 @@ static struct platform_device *ixdp425_devices[] __initdata = { ...@@ -108,17 +107,13 @@ static struct platform_device *ixdp425_devices[] __initdata = {
&ixdp425_uart &ixdp425_uart
}; };
static void __init ixdp425_init(void) static void __init ixdp425_init(void)
{ {
ixp4xx_sys_init(); ixp4xx_sys_init();
/* ixdp425_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
* IXP465 has 32MB window ixdp425_flash_resource.end =
*/ IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
if (machine_is_ixdp465()) {
ixdp425_flash_resource.end += IXDP425_FLASH_SIZE;
}
platform_add_devices(ixdp425_devices, ARRAY_SIZE(ixdp425_devices)); platform_add_devices(ixdp425_devices, ARRAY_SIZE(ixdp425_devices));
} }
......
...@@ -32,9 +32,6 @@ void __init ixdpg425_pci_preinit(void) ...@@ -32,9 +32,6 @@ void __init ixdpg425_pci_preinit(void)
set_irq_type(IRQ_IXP4XX_GPIO6, IRQT_LOW); set_irq_type(IRQ_IXP4XX_GPIO6, IRQT_LOW);
set_irq_type(IRQ_IXP4XX_GPIO7, IRQT_LOW); set_irq_type(IRQ_IXP4XX_GPIO7, IRQT_LOW);
gpio_line_isr_clear(6);
gpio_line_isr_clear(7);
ixp4xx_pci_preinit(); ixp4xx_pci_preinit();
} }
......
/*
* arch/arm/mach-ixp4xx/nas100d-pci.c
*
* NAS 100d board-level PCI initialization
*
* based on ixdp425-pci.c:
* Copyright (C) 2002 Intel Corporation.
* Copyright (C) 2003-2004 MontaVista Software, Inc.
*
* Maintainer: http://www.nslu2-linux.org/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#include <linux/config.h>
#include <linux/pci.h>
#include <linux/init.h>
#include <asm/mach/pci.h>
#include <asm/mach-types.h>
void __init nas100d_pci_preinit(void)
{
set_irq_type(IRQ_NAS100D_PCI_INTA, IRQT_LOW);
set_irq_type(IRQ_NAS100D_PCI_INTB, IRQT_LOW);
set_irq_type(IRQ_NAS100D_PCI_INTC, IRQT_LOW);
set_irq_type(IRQ_NAS100D_PCI_INTD, IRQT_LOW);
set_irq_type(IRQ_NAS100D_PCI_INTE, IRQT_LOW);
ixp4xx_pci_preinit();
}
static int __init nas100d_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
static int pci_irq_table[NAS100D_PCI_MAX_DEV][NAS100D_PCI_IRQ_LINES] =
{
{ IRQ_NAS100D_PCI_INTA, -1, -1 },
{ IRQ_NAS100D_PCI_INTB, -1, -1 },
{ IRQ_NAS100D_PCI_INTC, IRQ_NAS100D_PCI_INTD, IRQ_NAS100D_PCI_INTE },
};
int irq = -1;
if (slot >= 1 && slot <= NAS100D_PCI_MAX_DEV &&
pin >= 1 && pin <= NAS100D_PCI_IRQ_LINES)
irq = pci_irq_table[slot-1][pin-1];
return irq;
}
struct hw_pci __initdata nas100d_pci = {
.nr_controllers = 1,
.preinit = nas100d_pci_preinit,
.swizzle = pci_std_swizzle,
.setup = ixp4xx_setup,
.scan = ixp4xx_scan_bus,
.map_irq = nas100d_map_irq,
};
int __init nas100d_pci_init(void)
{
if (machine_is_nas100d())
pci_common_init(&nas100d_pci);
return 0;
}
subsys_initcall(nas100d_pci_init);
/*
* arch/arm/mach-ixp4xx/nas100d-power.c
*
* NAS 100d Power/Reset driver
*
* Copyright (C) 2005 Tower Technologies
*
* based on nas100d-io.c
* Copyright (C) 2004 Karen Spearel
*
* Author: Alessandro Zummo <a.zummo@towertech.it>
* Maintainers: http://www.nslu2-linux.org/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#include <linux/module.h>
#include <linux/reboot.h>
#include <linux/interrupt.h>
#include <asm/mach-types.h>
extern void ctrl_alt_del(void);
static irqreturn_t nas100d_reset_handler(int irq, void *dev_id, struct pt_regs *regs)
{
/* Signal init to do the ctrlaltdel action, this will bypass init if
* it hasn't started and do a kernel_restart.
*/
ctrl_alt_del();
return IRQ_HANDLED;
}
static int __init nas100d_power_init(void)
{
if (!(machine_is_nas100d()))
return 0;
set_irq_type(NAS100D_RB_IRQ, IRQT_LOW);
if (request_irq(NAS100D_RB_IRQ, &nas100d_reset_handler,
SA_INTERRUPT, "NAS100D reset button", NULL) < 0) {
printk(KERN_DEBUG "Reset Button IRQ %d not available\n",
NAS100D_RB_IRQ);
return -EIO;
}
return 0;
}
static void __exit nas100d_power_exit(void)
{
free_irq(NAS100D_RB_IRQ, NULL);
}
module_init(nas100d_power_init);
module_exit(nas100d_power_exit);
MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>");
MODULE_DESCRIPTION("NAS100D Power/Reset driver");
MODULE_LICENSE("GPL");
/*
* arch/arm/mach-ixp4xx/nas100d-setup.c
*
* NAS 100d board-setup
*
* based ixdp425-setup.c:
* Copyright (C) 2003-2004 MontaVista Software, Inc.
*
* Author: Alessandro Zummo <a.zummo@towertech.it>
* Author: Rod Whitby <rod@whitby.id.au>
* Maintainers: http://www.nslu2-linux.org/
*
*/
#include <linux/kernel.h>
#include <linux/serial.h>
#include <linux/serial_8250.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/flash.h>
static struct flash_platform_data nas100d_flash_data = {
.map_name = "cfi_probe",
.width = 2,
};
static struct resource nas100d_flash_resource = {
.flags = IORESOURCE_MEM,
};
static struct platform_device nas100d_flash = {
.name = "IXP4XX-Flash",
.id = 0,
.dev.platform_data = &nas100d_flash_data,
.num_resources = 1,
.resource = &nas100d_flash_resource,
};
static struct ixp4xx_i2c_pins nas100d_i2c_gpio_pins = {
.sda_pin = NAS100D_SDA_PIN,
.scl_pin = NAS100D_SCL_PIN,
};
static struct platform_device nas100d_i2c_controller = {
.name = "IXP4XX-I2C",
.id = 0,
.dev.platform_data = &nas100d_i2c_gpio_pins,
.num_resources = 0,
};
static struct resource nas100d_uart_resources[] = {
{
.start = IXP4XX_UART1_BASE_PHYS,
.end = IXP4XX_UART1_BASE_PHYS + 0x0fff,
.flags = IORESOURCE_MEM,
},
{
.start = IXP4XX_UART2_BASE_PHYS,
.end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
.flags = IORESOURCE_MEM,
}
};
static struct plat_serial8250_port nas100d_uart_data[] = {
{
.mapbase = IXP4XX_UART1_BASE_PHYS,
.membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET,
.irq = IRQ_IXP4XX_UART1,
.flags = UPF_BOOT_AUTOCONF,
.iotype = UPIO_MEM,
.regshift = 2,
.uartclk = IXP4XX_UART_XTAL,
},
{
.mapbase = IXP4XX_UART2_BASE_PHYS,
.membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
.irq = IRQ_IXP4XX_UART2,
.flags = UPF_BOOT_AUTOCONF,
.iotype = UPIO_MEM,
.regshift = 2,
.uartclk = IXP4XX_UART_XTAL,
},
{ }
};
static struct platform_device nas100d_uart = {
.name = "serial8250",
.id = PLAT8250_DEV_PLATFORM,
.dev.platform_data = nas100d_uart_data,
.num_resources = 2,
.resource = nas100d_uart_resources,
};
static struct platform_device *nas100d_devices[] __initdata = {
&nas100d_i2c_controller,
&nas100d_flash,
&nas100d_uart,
};
static void nas100d_power_off(void)
{
/* This causes the box to drop the power and go dead. */
/* enable the pwr cntl gpio */
gpio_line_config(NAS100D_PO_GPIO, IXP4XX_GPIO_OUT);
/* do the deed */
gpio_line_set(NAS100D_PO_GPIO, IXP4XX_GPIO_HIGH);
}
static void __init nas100d_init(void)
{
ixp4xx_sys_init();
nas100d_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
nas100d_flash_resource.end =
IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
pm_power_off = nas100d_power_off;
platform_add_devices(nas100d_devices, ARRAY_SIZE(nas100d_devices));
}
MACHINE_START(NAS100D, "Iomega NAS 100d")
/* Maintainer: www.nslu2-linux.org */
.phys_ram = PHYS_OFFSET,
.phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
.io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC,
.boot_params = 0x00000100,
.map_io = ixp4xx_map_io,
.init_irq = ixp4xx_init_irq,
.timer = &ixp4xx_timer,
.init_machine = nas100d_init,
MACHINE_END
...@@ -28,14 +28,6 @@ void __init nslu2_pci_preinit(void) ...@@ -28,14 +28,6 @@ void __init nslu2_pci_preinit(void)
set_irq_type(IRQ_NSLU2_PCI_INTB, IRQT_LOW); set_irq_type(IRQ_NSLU2_PCI_INTB, IRQT_LOW);
set_irq_type(IRQ_NSLU2_PCI_INTC, IRQT_LOW); set_irq_type(IRQ_NSLU2_PCI_INTC, IRQT_LOW);
gpio_line_isr_clear(NSLU2_PCI_INTA_PIN);
gpio_line_isr_clear(NSLU2_PCI_INTB_PIN);
gpio_line_isr_clear(NSLU2_PCI_INTC_PIN);
/* INTD is not configured as GPIO is used
* for the power input button.
*/
ixp4xx_pci_preinit(); ixp4xx_pci_preinit();
} }
......
...@@ -54,9 +54,6 @@ static int __init nslu2_power_init(void) ...@@ -54,9 +54,6 @@ static int __init nslu2_power_init(void)
set_irq_type(NSLU2_RB_IRQ, IRQT_LOW); set_irq_type(NSLU2_RB_IRQ, IRQT_LOW);
set_irq_type(NSLU2_PB_IRQ, IRQT_HIGH); set_irq_type(NSLU2_PB_IRQ, IRQT_HIGH);
gpio_line_isr_clear(NSLU2_RB_GPIO);
gpio_line_isr_clear(NSLU2_PB_GPIO);
if (request_irq(NSLU2_RB_IRQ, &nslu2_reset_handler, if (request_irq(NSLU2_RB_IRQ, &nslu2_reset_handler,
SA_INTERRUPT, "NSLU2 reset button", NULL) < 0) { SA_INTERRUPT, "NSLU2 reset button", NULL) < 0) {
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/notifier.h> #include <linux/notifier.h>
#include <linux/clk.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
...@@ -30,7 +31,6 @@ ...@@ -30,7 +31,6 @@
#include <asm/arch/usb.h> #include <asm/arch/usb.h>
#include <asm/arch/board.h> #include <asm/arch/board.h>
#include <asm/arch/common.h> #include <asm/arch/common.h>
#include <asm/hardware/clock.h>
static void __init omap_generic_init_irq(void) static void __init omap_generic_init_irq(void)
{ {
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
#include <linux/list.h> #include <linux/list.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/clk.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardware/clock.h>
#include <asm/arch/usb.h> #include <asm/arch/usb.h>
#include <asm/arch/clock.h> #include <asm/arch/clock.h>
......
...@@ -17,10 +17,10 @@ ...@@ -17,10 +17,10 @@
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/serial_8250.h> #include <linux/serial_8250.h>
#include <linux/serial_reg.h> #include <linux/serial_reg.h>
#include <linux/clk.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/hardware/clock.h>
#include <asm/arch/board.h> #include <asm/arch/board.h>
#include <asm/arch/mux.h> #include <asm/arch/mux.h>
......
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
#include <linux/list.h> #include <linux/list.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/clk.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardware/clock.h>
#include <asm/arch/clock.h> #include <asm/arch/clock.h>
#include <asm/arch/sram.h> #include <asm/arch/sram.h>
#include <asm/arch/prcm.h> #include <asm/arch/prcm.h>
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/serial_8250.h> #include <linux/serial_8250.h>
#include <linux/serial_reg.h> #include <linux/serial_reg.h>
#include <linux/clk.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardware/clock.h>
#include <asm/arch/common.h> #include <asm/arch/common.h>
#include <asm/arch/board.h> #include <asm/arch/board.h>
......
...@@ -21,10 +21,11 @@ ...@@ -21,10 +21,11 @@
#include <linux/time.h> #include <linux/time.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/clk.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include <asm/delay.h> #include <asm/delay.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardware/clock.h>
#define OMAP2_GP_TIMER1_BASE 0x48028000 #define OMAP2_GP_TIMER1_BASE 0x48028000
#define OMAP2_GP_TIMER2_BASE 0x4802a000 #define OMAP2_GP_TIMER2_BASE 0x4802a000
......
...@@ -112,12 +112,14 @@ config IWMMXT ...@@ -112,12 +112,14 @@ config IWMMXT
config PXA_SHARP_C7xx config PXA_SHARP_C7xx
bool bool
select PXA_SSP select PXA_SSP
select SHARPSL_PM
help help
Enable support for all Sharp C7xx models Enable support for all Sharp C7xx models
config PXA_SHARP_Cxx00 config PXA_SHARP_Cxx00
bool bool
select PXA_SSP select PXA_SSP
select SHARPSL_PM
help help
Enable common support for Sharp Cxx00 models Enable common support for Sharp Cxx00 models
......
...@@ -33,19 +33,7 @@ static void corgi_charger_init(void) ...@@ -33,19 +33,7 @@ static void corgi_charger_init(void)
pxa_gpio_mode(CORGI_GPIO_CHRG_ON | GPIO_OUT); pxa_gpio_mode(CORGI_GPIO_CHRG_ON | GPIO_OUT);
pxa_gpio_mode(CORGI_GPIO_CHRG_UKN | GPIO_OUT); pxa_gpio_mode(CORGI_GPIO_CHRG_UKN | GPIO_OUT);
pxa_gpio_mode(CORGI_GPIO_KEY_INT | GPIO_IN); pxa_gpio_mode(CORGI_GPIO_KEY_INT | GPIO_IN);
} sharpsl_pm_pxa_init();
static void corgi_charge_led(int val)
{
if (val == SHARPSL_LED_ERROR) {
dev_dbg(sharpsl_pm.dev, "Charge LED Error\n");
} else if (val == SHARPSL_LED_ON) {
dev_dbg(sharpsl_pm.dev, "Charge LED On\n");
GPSR0 = GPIO_bit(CORGI_GPIO_LED_ORANGE);
} else {
dev_dbg(sharpsl_pm.dev, "Charge LED Off\n");
GPCR0 = GPIO_bit(CORGI_GPIO_LED_ORANGE);
}
} }
static void corgi_measure_temp(int on) static void corgi_measure_temp(int on)
...@@ -138,15 +126,15 @@ static int corgi_should_wakeup(unsigned int resume_on_alarm) ...@@ -138,15 +126,15 @@ static int corgi_should_wakeup(unsigned int resume_on_alarm)
dev_dbg(sharpsl_pm.dev, "GPLR0 = %x,%x\n", GPLR0, PEDR); dev_dbg(sharpsl_pm.dev, "GPLR0 = %x,%x\n", GPLR0, PEDR);
if ((PEDR & GPIO_bit(CORGI_GPIO_AC_IN))) { if ((PEDR & GPIO_bit(CORGI_GPIO_AC_IN))) {
if (STATUS_AC_IN()) { if (sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN)) {
/* charge on */ /* charge on */
dev_dbg(sharpsl_pm.dev, "ac insert\n"); dev_dbg(sharpsl_pm.dev, "ac insert\n");
sharpsl_pm.flags |= SHARPSL_DO_OFFLINE_CHRG; sharpsl_pm.flags |= SHARPSL_DO_OFFLINE_CHRG;
} else { } else {
/* charge off */ /* charge off */
dev_dbg(sharpsl_pm.dev, "ac remove\n"); dev_dbg(sharpsl_pm.dev, "ac remove\n");
CHARGE_LED_OFF(); sharpsl_pm_led(SHARPSL_LED_OFF);
CHARGE_OFF(); sharpsl_pm.machinfo->charge(0);
sharpsl_pm.charge_mode = CHRG_OFF; sharpsl_pm.charge_mode = CHRG_OFF;
} }
} }
...@@ -172,23 +160,39 @@ static unsigned long corgi_charger_wakeup(void) ...@@ -172,23 +160,39 @@ static unsigned long corgi_charger_wakeup(void)
return ~GPLR0 & ( GPIO_bit(CORGI_GPIO_AC_IN) | GPIO_bit(CORGI_GPIO_KEY_INT) | GPIO_bit(CORGI_GPIO_WAKEUP) ); return ~GPLR0 & ( GPIO_bit(CORGI_GPIO_AC_IN) | GPIO_bit(CORGI_GPIO_KEY_INT) | GPIO_bit(CORGI_GPIO_WAKEUP) );
} }
static int corgi_acin_status(void) unsigned long corgipm_read_devdata(int type)
{ {
return ((GPLR(CORGI_GPIO_AC_IN) & GPIO_bit(CORGI_GPIO_AC_IN)) != 0); switch(type) {
case SHARPSL_STATUS_ACIN:
return ((GPLR(CORGI_GPIO_AC_IN) & GPIO_bit(CORGI_GPIO_AC_IN)) != 0);
case SHARPSL_STATUS_LOCK:
return READ_GPIO_BIT(sharpsl_pm.machinfo->gpio_batlock);
case SHARPSL_STATUS_CHRGFULL:
return READ_GPIO_BIT(sharpsl_pm.machinfo->gpio_batfull);
case SHARPSL_STATUS_FATAL:
return READ_GPIO_BIT(sharpsl_pm.machinfo->gpio_fatal);
case SHARPSL_ACIN_VOLT:
return sharpsl_pm_pxa_read_max1111(MAX1111_ACIN_VOLT);
case SHARPSL_BATT_TEMP:
return sharpsl_pm_pxa_read_max1111(MAX1111_BATT_TEMP);
case SHARPSL_BATT_VOLT:
default:
return sharpsl_pm_pxa_read_max1111(MAX1111_BATT_VOLT);
}
} }
static struct sharpsl_charger_machinfo corgi_pm_machinfo = { static struct sharpsl_charger_machinfo corgi_pm_machinfo = {
.init = corgi_charger_init, .init = corgi_charger_init,
.exit = sharpsl_pm_pxa_remove,
.gpio_batlock = CORGI_GPIO_BAT_COVER, .gpio_batlock = CORGI_GPIO_BAT_COVER,
.gpio_acin = CORGI_GPIO_AC_IN, .gpio_acin = CORGI_GPIO_AC_IN,
.gpio_batfull = CORGI_GPIO_CHRG_FULL, .gpio_batfull = CORGI_GPIO_CHRG_FULL,
.status_acin = corgi_acin_status,
.discharge = corgi_discharge, .discharge = corgi_discharge,
.charge = corgi_charge, .charge = corgi_charge,
.chargeled = corgi_charge_led,
.measure_temp = corgi_measure_temp, .measure_temp = corgi_measure_temp,
.presuspend = corgi_presuspend, .presuspend = corgi_presuspend,
.postsuspend = corgi_postsuspend, .postsuspend = corgi_postsuspend,
.read_devdata = corgipm_read_devdata,
.charger_wakeup = corgi_charger_wakeup, .charger_wakeup = corgi_charger_wakeup,
.should_wakeup = corgi_should_wakeup, .should_wakeup = corgi_should_wakeup,
.bat_levels = 40, .bat_levels = 40,
......
...@@ -427,6 +427,12 @@ static void __init mainstone_init(void) ...@@ -427,6 +427,12 @@ static void __init mainstone_init(void)
printk(KERN_NOTICE "Mainstone configured to boot from %s\n", printk(KERN_NOTICE "Mainstone configured to boot from %s\n",
mst_flash_data[0].name); mst_flash_data[0].name);
/* system bus arbiter setting
* - Core_Park
* - LCD_wt:DMA_wt:CORE_Wt = 2:3:4
*/
ARB_CNTRL = ARB_CORE_PARK | 0x234;
/* /*
* On Mainstone, we route AC97_SYSCLK via GPIO45 to * On Mainstone, we route AC97_SYSCLK via GPIO45 to
* the audio daughter card * the audio daughter card
......
/* /*
* SharpSL SSP Driver * Copyright (c) 2004-2005 Richard Purdie
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/ */
#include <asm/hardware/sharpsl_pm.h>
/*
* SharpSL SSP Driver
*/
struct corgissp_machinfo { struct corgissp_machinfo {
int port; int port;
int cs_lcdcon; int cs_lcdcon;
...@@ -14,18 +24,18 @@ struct corgissp_machinfo { ...@@ -14,18 +24,18 @@ struct corgissp_machinfo {
void corgi_ssp_set_machinfo(struct corgissp_machinfo *machinfo); void corgi_ssp_set_machinfo(struct corgissp_machinfo *machinfo);
/* /*
* SharpSL Backlight * SharpSL Backlight
*/ */
void corgi_bl_set_intensity(int intensity); void corgi_bl_set_intensity(int intensity);
void spitz_bl_set_intensity(int intensity); void spitz_bl_set_intensity(int intensity);
void akita_bl_set_intensity(int intensity); void akita_bl_set_intensity(int intensity);
/* /*
* SharpSL Touchscreen Driver * SharpSL Touchscreen Driver
*/ */
unsigned long corgi_get_hsync_len(void); unsigned long corgi_get_hsync_len(void);
unsigned long spitz_get_hsync_len(void); unsigned long spitz_get_hsync_len(void);
void corgi_put_hsync(void); void corgi_put_hsync(void);
...@@ -33,89 +43,22 @@ void spitz_put_hsync(void); ...@@ -33,89 +43,22 @@ void spitz_put_hsync(void);
void corgi_wait_hsync(void); void corgi_wait_hsync(void);
void spitz_wait_hsync(void); void spitz_wait_hsync(void);
/* /*
* SharpSL Battery/PM Driver * SharpSL Battery/PM Driver
*/ */
struct sharpsl_charger_machinfo { #define READ_GPIO_BIT(x) (GPLR(x) & GPIO_bit(x))
void (*init)(void);
int gpio_acin;
int gpio_batfull;
int gpio_batlock;
int gpio_fatal;
int (*status_acin)(void);
void (*discharge)(int);
void (*discharge1)(int);
void (*charge)(int);
void (*chargeled)(int);
void (*measure_temp)(int);
void (*presuspend)(void);
void (*postsuspend)(void);
unsigned long (*charger_wakeup)(void);
int (*should_wakeup)(unsigned int resume_on_alarm);
int bat_levels;
struct battery_thresh *bat_levels_noac;
struct battery_thresh *bat_levels_acin;
int status_high_acin;
int status_low_acin;
int status_high_noac;
int status_low_noac;
};
struct battery_thresh {
int voltage;
int percentage;
};
struct battery_stat {
int ac_status; /* APM AC Present/Not Present */
int mainbat_status; /* APM Main Battery Status */
int mainbat_percent; /* Main Battery Percentage Charge */
int mainbat_voltage; /* Main Battery Voltage */
};
struct sharpsl_pm_status {
struct device *dev;
struct timer_list ac_timer;
struct timer_list chrg_full_timer;
int charge_mode;
#define CHRG_ERROR (-1)
#define CHRG_OFF (0)
#define CHRG_ON (1)
#define CHRG_DONE (2)
unsigned int flags;
#define SHARPSL_SUSPENDED (1 << 0) /* Device is Suspended */
#define SHARPSL_ALARM_ACTIVE (1 << 1) /* Alarm is for charging event (not user) */
#define SHARPSL_BL_LIMIT (1 << 2) /* Backlight Intensity Limited */
#define SHARPSL_APM_QUEUED (1 << 3) /* APM Event Queued */
#define SHARPSL_DO_OFFLINE_CHRG (1 << 4) /* Trigger the offline charger */
int full_count; /* MAX1111 Channel Definitions */
unsigned long charge_start_time; #define MAX1111_BATT_VOLT 4u
struct sharpsl_charger_machinfo *machinfo; #define MAX1111_BATT_TEMP 2u
struct battery_stat battstat; #define MAX1111_ACIN_VOLT 6u
};
extern struct sharpsl_pm_status sharpsl_pm;
extern struct battery_thresh spitz_battery_levels_acin[]; extern struct battery_thresh spitz_battery_levels_acin[];
extern struct battery_thresh spitz_battery_levels_noac[]; extern struct battery_thresh spitz_battery_levels_noac[];
void sharpsl_pm_pxa_init(void);
void sharpsl_pm_pxa_remove(void);
int sharpsl_pm_pxa_read_max1111(int channel);
#define READ_GPIO_BIT(x) (GPLR(x) & GPIO_bit(x))
#define SHARPSL_LED_ERROR 2
#define SHARPSL_LED_ON 1
#define SHARPSL_LED_OFF 0
#define CHARGE_ON() sharpsl_pm.machinfo->charge(1)
#define CHARGE_OFF() sharpsl_pm.machinfo->charge(0)
#define CHARGE_LED_ON() sharpsl_pm.machinfo->chargeled(SHARPSL_LED_ON)
#define CHARGE_LED_OFF() sharpsl_pm.machinfo->chargeled(SHARPSL_LED_OFF)
#define CHARGE_LED_ERR() sharpsl_pm.machinfo->chargeled(SHARPSL_LED_ERROR)
#define DISCHARGE_ON() sharpsl_pm.machinfo->discharge(1)
#define DISCHARGE_OFF() sharpsl_pm.machinfo->discharge(0)
#define STATUS_AC_IN() sharpsl_pm.machinfo->status_acin()
#define STATUS_BATT_LOCKED() READ_GPIO_BIT(sharpsl_pm.machinfo->gpio_batlock)
#define STATUS_CHRG_FULL() READ_GPIO_BIT(sharpsl_pm.machinfo->gpio_batfull)
#define STATUS_FATAL() READ_GPIO_BIT(sharpsl_pm.machinfo->gpio_fatal)
此差异已折叠。
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <asm/arch/irq.h> #include <asm/arch/irq.h>
#include <asm/arch/irda.h> #include <asm/arch/irda.h>
#include <asm/arch/mmc.h> #include <asm/arch/mmc.h>
#include <asm/arch/ohci.h>
#include <asm/arch/udc.h> #include <asm/arch/udc.h>
#include <asm/arch/pxafb.h> #include <asm/arch/pxafb.h>
#include <asm/arch/akita.h> #include <asm/arch/akita.h>
...@@ -126,10 +127,12 @@ static void spitz_card_pwr_ctrl(int device, unsigned short new_cpr) ...@@ -126,10 +127,12 @@ static void spitz_card_pwr_ctrl(int device, unsigned short new_cpr)
cpr &= ~0x0002; cpr &= ~0x0002;
if (device == SPITZ_PWR_SD) if (device == SPITZ_PWR_SD)
cpr &= ~0x0004; cpr &= ~0x0004;
write_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR, cpr | new_cpr);
if (!(cpr & 0x0002) && !(cpr & 0x0004)) { if (!(cpr & 0x0002) && !(cpr & 0x0004)) {
write_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR, 0x0000);
mdelay(1); mdelay(1);
reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_CF_POWER); reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_CF_POWER);
} else {
write_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR, cpr | new_cpr);
} }
} }
} }
...@@ -334,6 +337,35 @@ static struct pxamci_platform_data spitz_mci_platform_data = { ...@@ -334,6 +337,35 @@ static struct pxamci_platform_data spitz_mci_platform_data = {
}; };
/*
* USB Host (OHCI)
*/
static int spitz_ohci_init(struct device *dev)
{
/* Only Port 2 is connected */
pxa_gpio_mode(SPITZ_GPIO_USB_CONNECT | GPIO_IN);
pxa_gpio_mode(SPITZ_GPIO_USB_HOST | GPIO_OUT);
pxa_gpio_mode(SPITZ_GPIO_USB_DEVICE | GPIO_IN);
/* Setup USB Port 2 Output Control Register */
UP2OCR = UP2OCR_HXS | UP2OCR_HXOE | UP2OCR_DPPDE | UP2OCR_DMPDE;
GPSR(SPITZ_GPIO_USB_HOST) = GPIO_bit(SPITZ_GPIO_USB_HOST);
UHCHR = (UHCHR) &
~(UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSEP3 | UHCHR_SSE);
UHCRHDA |= UHCRHDA_NOCP;
return 0;
}
static struct pxaohci_platform_data spitz_ohci_platform_data = {
.port_mode = PMM_NPS_MODE,
.init = spitz_ohci_init,
};
/* /*
* Irda * Irda
*/ */
...@@ -411,6 +443,7 @@ static void __init common_init(void) ...@@ -411,6 +443,7 @@ static void __init common_init(void)
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
pxa_set_mci_info(&spitz_mci_platform_data); pxa_set_mci_info(&spitz_mci_platform_data);
pxa_set_ohci_info(&spitz_ohci_platform_data);
pxa_set_ficp_info(&spitz_ficp_platform_data); pxa_set_ficp_info(&spitz_ficp_platform_data);
set_pxa_fb_parent(&spitzssp_device.dev); set_pxa_fb_parent(&spitzssp_device.dev);
set_pxa_fb_info(&spitz_pxafb_info); set_pxa_fb_info(&spitz_pxafb_info);
......
...@@ -33,19 +33,7 @@ static void spitz_charger_init(void) ...@@ -33,19 +33,7 @@ static void spitz_charger_init(void)
{ {
pxa_gpio_mode(SPITZ_GPIO_KEY_INT | GPIO_IN); pxa_gpio_mode(SPITZ_GPIO_KEY_INT | GPIO_IN);
pxa_gpio_mode(SPITZ_GPIO_SYNC | GPIO_IN); pxa_gpio_mode(SPITZ_GPIO_SYNC | GPIO_IN);
} sharpsl_pm_pxa_init();
static void spitz_charge_led(int val)
{
if (val == SHARPSL_LED_ERROR) {
dev_dbg(sharpsl_pm.dev, "Charge LED Error\n");
} else if (val == SHARPSL_LED_ON) {
dev_dbg(sharpsl_pm.dev, "Charge LED On\n");
set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_LED_ORANGE);
} else {
dev_dbg(sharpsl_pm.dev, "Charge LED Off\n");
reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_LED_ORANGE);
}
} }
static void spitz_measure_temp(int on) static void spitz_measure_temp(int on)
...@@ -92,7 +80,7 @@ static void spitz_discharge1(int on) ...@@ -92,7 +80,7 @@ static void spitz_discharge1(int on)
static void spitz_presuspend(void) static void spitz_presuspend(void)
{ {
spitz_last_ac_status = STATUS_AC_IN(); spitz_last_ac_status = sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN);
/* GPIO Sleep Register */ /* GPIO Sleep Register */
PGSR0 = 0x00144018; PGSR0 = 0x00144018;
...@@ -138,7 +126,7 @@ static void spitz_postsuspend(void) ...@@ -138,7 +126,7 @@ static void spitz_postsuspend(void)
static int spitz_should_wakeup(unsigned int resume_on_alarm) static int spitz_should_wakeup(unsigned int resume_on_alarm)
{ {
int is_resume = 0; int is_resume = 0;
int acin = STATUS_AC_IN(); int acin = sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN);
if (spitz_last_ac_status != acin) { if (spitz_last_ac_status != acin) {
if (acin) { if (acin) {
...@@ -148,8 +136,8 @@ static int spitz_should_wakeup(unsigned int resume_on_alarm) ...@@ -148,8 +136,8 @@ static int spitz_should_wakeup(unsigned int resume_on_alarm)
} else { } else {
/* charge off */ /* charge off */
dev_dbg(sharpsl_pm.dev, "AC Removed\n"); dev_dbg(sharpsl_pm.dev, "AC Removed\n");
CHARGE_LED_OFF(); sharpsl_pm_led(SHARPSL_LED_OFF);
CHARGE_OFF(); sharpsl_pm.machinfo->charge(0);
sharpsl_pm.charge_mode = CHRG_OFF; sharpsl_pm.charge_mode = CHRG_OFF;
} }
spitz_last_ac_status = acin; spitz_last_ac_status = acin;
...@@ -175,25 +163,41 @@ static unsigned long spitz_charger_wakeup(void) ...@@ -175,25 +163,41 @@ static unsigned long spitz_charger_wakeup(void)
return (~GPLR0 & GPIO_bit(SPITZ_GPIO_KEY_INT)) | (GPLR0 & GPIO_bit(SPITZ_GPIO_SYNC)); return (~GPLR0 & GPIO_bit(SPITZ_GPIO_KEY_INT)) | (GPLR0 & GPIO_bit(SPITZ_GPIO_SYNC));
} }
static int spitz_acin_status(void) unsigned long spitzpm_read_devdata(int type)
{ {
return (((~GPLR(SPITZ_GPIO_AC_IN)) & GPIO_bit(SPITZ_GPIO_AC_IN)) != 0); switch(type) {
case SHARPSL_STATUS_ACIN:
return (((~GPLR(SPITZ_GPIO_AC_IN)) & GPIO_bit(SPITZ_GPIO_AC_IN)) != 0);
case SHARPSL_STATUS_LOCK:
return READ_GPIO_BIT(sharpsl_pm.machinfo->gpio_batlock);
case SHARPSL_STATUS_CHRGFULL:
return READ_GPIO_BIT(sharpsl_pm.machinfo->gpio_batfull);
case SHARPSL_STATUS_FATAL:
return READ_GPIO_BIT(sharpsl_pm.machinfo->gpio_fatal);
case SHARPSL_ACIN_VOLT:
return sharpsl_pm_pxa_read_max1111(MAX1111_ACIN_VOLT);
case SHARPSL_BATT_TEMP:
return sharpsl_pm_pxa_read_max1111(MAX1111_BATT_TEMP);
case SHARPSL_BATT_VOLT:
default:
return sharpsl_pm_pxa_read_max1111(MAX1111_BATT_VOLT);
}
} }
struct sharpsl_charger_machinfo spitz_pm_machinfo = { struct sharpsl_charger_machinfo spitz_pm_machinfo = {
.init = spitz_charger_init, .init = spitz_charger_init,
.exit = sharpsl_pm_pxa_remove,
.gpio_batlock = SPITZ_GPIO_BAT_COVER, .gpio_batlock = SPITZ_GPIO_BAT_COVER,
.gpio_acin = SPITZ_GPIO_AC_IN, .gpio_acin = SPITZ_GPIO_AC_IN,
.gpio_batfull = SPITZ_GPIO_CHRG_FULL, .gpio_batfull = SPITZ_GPIO_CHRG_FULL,
.gpio_fatal = SPITZ_GPIO_FATAL_BAT, .gpio_fatal = SPITZ_GPIO_FATAL_BAT,
.status_acin = spitz_acin_status,
.discharge = spitz_discharge, .discharge = spitz_discharge,
.discharge1 = spitz_discharge1, .discharge1 = spitz_discharge1,
.charge = spitz_charge, .charge = spitz_charge,
.chargeled = spitz_charge_led,
.measure_temp = spitz_measure_temp, .measure_temp = spitz_measure_temp,
.presuspend = spitz_presuspend, .presuspend = spitz_presuspend,
.postsuspend = spitz_postsuspend, .postsuspend = spitz_postsuspend,
.read_devdata = spitzpm_read_devdata,
.charger_wakeup = spitz_charger_wakeup, .charger_wakeup = spitz_charger_wakeup,
.should_wakeup = spitz_should_wakeup, .should_wakeup = spitz_should_wakeup,
.bat_levels = 40, .bat_levels = 40,
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
#include <linux/list.h> #include <linux/list.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/clk.h>
#include <asm/semaphore.h> #include <asm/semaphore.h>
#include <asm/hardware/clock.h>
#include <asm/hardware/icst307.h> #include <asm/hardware/icst307.h>
#include "clock.h" #include "clock.h"
...@@ -57,17 +57,6 @@ void clk_disable(struct clk *clk) ...@@ -57,17 +57,6 @@ void clk_disable(struct clk *clk)
} }
EXPORT_SYMBOL(clk_disable); EXPORT_SYMBOL(clk_disable);
int clk_use(struct clk *clk)
{
return 0;
}
EXPORT_SYMBOL(clk_use);
void clk_unuse(struct clk *clk)
{
}
EXPORT_SYMBOL(clk_unuse);
unsigned long clk_get_rate(struct clk *clk) unsigned long clk_get_rate(struct clk *clk)
{ {
return clk->rate; return clk->rate;
......
...@@ -24,14 +24,14 @@ ...@@ -24,14 +24,14 @@
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/sysdev.h> #include <linux/sysdev.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/amba/bus.h>
#include <linux/amba/clcd.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/leds.h> #include <asm/leds.h>
#include <asm/hardware/amba.h>
#include <asm/hardware/amba_clcd.h>
#include <asm/hardware/arm_timer.h> #include <asm/hardware/arm_timer.h>
#include <asm/hardware/icst307.h> #include <asm/hardware/icst307.h>
......
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
#ifndef __ASM_ARCH_REALVIEW_H #ifndef __ASM_ARCH_REALVIEW_H
#define __ASM_ARCH_REALVIEW_H #define __ASM_ARCH_REALVIEW_H
#include <asm/hardware/amba.h> #include <linux/amba/bus.h>
#include <asm/leds.h> #include <asm/leds.h>
#include <asm/io.h> #include <asm/io.h>
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/sysdev.h> #include <linux/sysdev.h>
#include <linux/amba/bus.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -30,7 +31,6 @@ ...@@ -30,7 +31,6 @@
#include <asm/leds.h> #include <asm/leds.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/hardware/gic.h> #include <asm/hardware/gic.h>
#include <asm/hardware/amba.h>
#include <asm/hardware/icst307.h> #include <asm/hardware/icst307.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <linux/mman.h> #include <linux/mman.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/pci.h> #include <linux/dma-mapping.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/dma.h> #include <asm/dma.h>
...@@ -148,11 +148,14 @@ static void iomd_enable_dma(dmach_t channel, dma_t *dma) ...@@ -148,11 +148,14 @@ static void iomd_enable_dma(dmach_t channel, dma_t *dma)
* Cope with ISA-style drivers which expect cache * Cope with ISA-style drivers which expect cache
* coherence. * coherence.
*/ */
if (!dma->using_sg) { if (!dma->sg) {
dma->buf.dma_address = pci_map_single(NULL, dma->sg = &dma->buf;
dma->buf.__address, dma->buf.length, dma->sgcount = 1;
dma->buf.length = dma->count;
dma->buf.dma_address = dma_map_single(NULL,
dma->addr, dma->count,
dma->dma_mode == DMA_MODE_READ ? dma->dma_mode == DMA_MODE_READ ?
PCI_DMA_FROMDEVICE : PCI_DMA_TODEVICE); DMA_FROM_DEVICE : DMA_TO_DEVICE);
} }
iomd_writeb(DMA_CR_C, dma_base + CR); iomd_writeb(DMA_CR_C, dma_base + CR);
...@@ -239,7 +242,7 @@ static void floppy_enable_dma(dmach_t channel, dma_t *dma) ...@@ -239,7 +242,7 @@ static void floppy_enable_dma(dmach_t channel, dma_t *dma)
unsigned int fiqhandler_length; unsigned int fiqhandler_length;
struct pt_regs regs; struct pt_regs regs;
if (dma->using_sg) if (dma->sg)
BUG(); BUG();
if (dma->dma_mode == DMA_MODE_READ) { if (dma->dma_mode == DMA_MODE_READ) {
...@@ -252,8 +255,8 @@ static void floppy_enable_dma(dmach_t channel, dma_t *dma) ...@@ -252,8 +255,8 @@ static void floppy_enable_dma(dmach_t channel, dma_t *dma)
fiqhandler_length = &floppy_fiqout_end - &floppy_fiqout_start; fiqhandler_length = &floppy_fiqout_end - &floppy_fiqout_start;
} }
regs.ARM_r9 = dma->buf.length; regs.ARM_r9 = dma->count;
regs.ARM_r10 = (unsigned long)dma->buf.__address; regs.ARM_r10 = (unsigned long)dma->addr;
regs.ARM_fp = (unsigned long)FLOPPYDMA_BASE; regs.ARM_fp = (unsigned long)FLOPPYDMA_BASE;
if (claim_fiq(&fh)) { if (claim_fiq(&fh)) {
......
...@@ -34,16 +34,15 @@ ...@@ -34,16 +34,15 @@
#include <linux/err.h> #include <linux/err.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/sysdev.h> #include <linux/sysdev.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/clk.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/atomic.h> #include <asm/atomic.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardware/clock.h>
#include <asm/arch/regs-clock.h> #include <asm/arch/regs-clock.h>
#include "clock.h" #include "clock.h"
...@@ -151,18 +150,6 @@ void clk_disable(struct clk *clk) ...@@ -151,18 +150,6 @@ void clk_disable(struct clk *clk)
} }
int clk_use(struct clk *clk)
{
atomic_inc(&clk->used);
return 0;
}
void clk_unuse(struct clk *clk)
{
atomic_dec(&clk->used);
}
unsigned long clk_get_rate(struct clk *clk) unsigned long clk_get_rate(struct clk *clk)
{ {
if (IS_ERR(clk)) if (IS_ERR(clk))
...@@ -196,8 +183,6 @@ EXPORT_SYMBOL(clk_get); ...@@ -196,8 +183,6 @@ EXPORT_SYMBOL(clk_get);
EXPORT_SYMBOL(clk_put); EXPORT_SYMBOL(clk_put);
EXPORT_SYMBOL(clk_enable); EXPORT_SYMBOL(clk_enable);
EXPORT_SYMBOL(clk_disable); EXPORT_SYMBOL(clk_disable);
EXPORT_SYMBOL(clk_use);
EXPORT_SYMBOL(clk_unuse);
EXPORT_SYMBOL(clk_get_rate); EXPORT_SYMBOL(clk_get_rate);
EXPORT_SYMBOL(clk_round_rate); EXPORT_SYMBOL(clk_round_rate);
EXPORT_SYMBOL(clk_set_rate); EXPORT_SYMBOL(clk_set_rate);
...@@ -370,7 +355,6 @@ static struct clk init_clocks[] = { ...@@ -370,7 +355,6 @@ static struct clk init_clocks[] = {
int s3c24xx_register_clock(struct clk *clk) int s3c24xx_register_clock(struct clk *clk)
{ {
clk->owner = THIS_MODULE; clk->owner = THIS_MODULE;
atomic_set(&clk->used, 0);
if (clk->enable == NULL) if (clk->enable == NULL)
clk->enable = clk_null_enable; clk->enable = clk_null_enable;
......
...@@ -16,7 +16,6 @@ struct clk { ...@@ -16,7 +16,6 @@ struct clk {
struct clk *parent; struct clk *parent;
const char *name; const char *name;
int id; int id;
atomic_t used;
unsigned long rate; unsigned long rate;
unsigned long ctrlbit; unsigned long ctrlbit;
int (*enable)(struct clk *, int enable); int (*enable)(struct clk *, int enable);
......
...@@ -29,16 +29,15 @@ ...@@ -29,16 +29,15 @@
#include <linux/err.h> #include <linux/err.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/sysdev.h> #include <linux/sysdev.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/clk.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/atomic.h> #include <asm/atomic.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardware/clock.h>
#include <asm/arch/regs-clock.h> #include <asm/arch/regs-clock.h>
#include "clock.h" #include "clock.h"
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/sysdev.h> #include <linux/sysdev.h>
#include <linux/clk.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
...@@ -36,7 +37,6 @@ ...@@ -36,7 +37,6 @@
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/hardware/clock.h>
#include <asm/arch/regs-clock.h> #include <asm/arch/regs-clock.h>
#include <asm/arch/regs-serial.h> #include <asm/arch/regs-serial.h>
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/clk.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/leds.h> #include <asm/leds.h>
...@@ -35,7 +36,6 @@ ...@@ -35,7 +36,6 @@
#include <asm/arch/regs-timer.h> #include <asm/arch/regs-timer.h>
#include <asm/arch/regs-irq.h> #include <asm/arch/regs-irq.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include <asm/hardware/clock.h>
#include "clock.h" #include "clock.h"
#include "cpu.h" #include "cpu.h"
...@@ -191,7 +191,6 @@ static void s3c2410_timer_setup (void) ...@@ -191,7 +191,6 @@ static void s3c2410_timer_setup (void)
if (IS_ERR(clk)) if (IS_ERR(clk))
panic("failed to get clock for system timer"); panic("failed to get clock for system timer");
clk_use(clk);
clk_enable(clk); clk_enable(clk);
pclk = clk_get_rate(clk); pclk = clk_get_rate(clk);
......
...@@ -134,30 +134,12 @@ unsigned long sleep_phys_sp(void *sp) ...@@ -134,30 +134,12 @@ unsigned long sleep_phys_sp(void *sp)
return virt_to_phys(sp); return virt_to_phys(sp);
} }
/*
* Called after processes are frozen, but before we shut down devices.
*/
static int sa11x0_pm_prepare(suspend_state_t state)
{
return 0;
}
/*
* Called after devices are re-setup, but before processes are thawed.
*/
static int sa11x0_pm_finish(suspend_state_t state)
{
return 0;
}
/* /*
* Set to PM_DISK_FIRMWARE so we can quickly veto suspend-to-disk. * Set to PM_DISK_FIRMWARE so we can quickly veto suspend-to-disk.
*/ */
static struct pm_ops sa11x0_pm_ops = { static struct pm_ops sa11x0_pm_ops = {
.pm_disk_mode = PM_DISK_FIRMWARE, .pm_disk_mode = PM_DISK_FIRMWARE,
.prepare = sa11x0_pm_prepare,
.enter = sa11x0_pm_enter, .enter = sa11x0_pm_enter,
.finish = sa11x0_pm_finish,
}; };
static int __init sa11x0_pm_init(void) static int __init sa11x0_pm_init(void)
......
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/clk.h>
#include <asm/semaphore.h> #include <asm/semaphore.h>
#include <asm/hardware/clock.h>
#include <asm/hardware/icst307.h> #include <asm/hardware/icst307.h>
#include "clock.h" #include "clock.h"
...@@ -58,17 +58,6 @@ void clk_disable(struct clk *clk) ...@@ -58,17 +58,6 @@ void clk_disable(struct clk *clk)
} }
EXPORT_SYMBOL(clk_disable); EXPORT_SYMBOL(clk_disable);
int clk_use(struct clk *clk)
{
return 0;
}
EXPORT_SYMBOL(clk_use);
void clk_unuse(struct clk *clk)
{
}
EXPORT_SYMBOL(clk_unuse);
unsigned long clk_get_rate(struct clk *clk) unsigned long clk_get_rate(struct clk *clk)
{ {
return clk->rate; return clk->rate;
......
...@@ -25,14 +25,14 @@ ...@@ -25,14 +25,14 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/sysdev.h> #include <linux/sysdev.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/amba/bus.h>
#include <linux/amba/clcd.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/leds.h> #include <asm/leds.h>
#include <asm/hardware/amba.h>
#include <asm/hardware/amba_clcd.h>
#include <asm/hardware/arm_timer.h> #include <asm/hardware/arm_timer.h>
#include <asm/hardware/icst307.h> #include <asm/hardware/icst307.h>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#ifndef __ASM_ARCH_VERSATILE_H #ifndef __ASM_ARCH_VERSATILE_H
#define __ASM_ARCH_VERSATILE_H #define __ASM_ARCH_VERSATILE_H
#include <asm/hardware/amba.h> #include <linux/amba/bus.h>
extern void __init versatile_init(void); extern void __init versatile_init(void);
extern void __init versatile_init_irq(void); extern void __init versatile_init_irq(void);
......
...@@ -23,12 +23,12 @@ ...@@ -23,12 +23,12 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/sysdev.h> #include <linux/sysdev.h>
#include <linux/amba/bus.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/hardware/amba.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
......
...@@ -23,12 +23,12 @@ ...@@ -23,12 +23,12 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/sysdev.h> #include <linux/sysdev.h>
#include <linux/amba/bus.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/hardware/amba.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/mmc.h> #include <asm/mach/mmc.h>
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/io.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#define CONSISTENT_BASE (0xffc00000) #define CONSISTENT_BASE (0xffc00000)
......
...@@ -9,10 +9,8 @@ ...@@ -9,10 +9,8 @@
* it under the terms of the GNU General Public License version 2 as * it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/mm.h> #include <linux/mmzone.h>
#include <linux/init.h>
#include <linux/bootmem.h> #include <linux/bootmem.h>
#if MAX_NUMNODES != 4 && MAX_NUMNODES != 16 #if MAX_NUMNODES != 4 && MAX_NUMNODES != 16
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/io.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
......
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/clk.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/semaphore.h> #include <asm/semaphore.h>
#include <asm/hardware/clock.h>
#include <asm/arch/clock.h> #include <asm/arch/clock.h>
......
...@@ -18,12 +18,12 @@ ...@@ -18,12 +18,12 @@
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/serial_8250.h> #include <linux/serial_8250.h>
#include <linux/serial_reg.h> #include <linux/serial_reg.h>
#include <linux/clk.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/hardware/clock.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/setup.h> #include <asm/setup.h>
......
...@@ -19,13 +19,12 @@ ...@@ -19,13 +19,12 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/clk.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/hardware/clock.h>
/* TODO: Add support for SDRAM timing changes */ /* TODO: Add support for SDRAM timing changes */
int omap_verify_speed(struct cpufreq_policy *policy) int omap_verify_speed(struct cpufreq_policy *policy)
......
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <linux/sysdev.h> #include <linux/sysdev.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/clk.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/hardware/clock.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/arch/irqs.h> #include <asm/arch/irqs.h>
#include <asm/arch/gpio.h> #include <asm/arch/gpio.h>
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/completion.h> #include <linux/completion.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/clk.h>
#include <asm/delay.h> #include <asm/delay.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -30,8 +31,6 @@ ...@@ -30,8 +31,6 @@
#include <asm/arch/dsp_common.h> #include <asm/arch/dsp_common.h>
#include <asm/arch/mcbsp.h> #include <asm/arch/mcbsp.h>
#include <asm/hardware/clock.h>
#ifdef CONFIG_MCBSP_DEBUG #ifdef CONFIG_MCBSP_DEBUG
#define DBG(x...) printk(x) #define DBG(x...) printk(x)
#else #else
......
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/clk.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardware/clock.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#define OCPI_BASE 0xfffec320 #define OCPI_BASE 0xfffec320
......
...@@ -13,6 +13,7 @@ obj-$(CONFIG_ACPI) += acpi/ ...@@ -13,6 +13,7 @@ obj-$(CONFIG_ACPI) += acpi/
# PnP must come after ACPI since it will eventually need to check if acpi # PnP must come after ACPI since it will eventually need to check if acpi
# was used and do nothing if so # was used and do nothing if so
obj-$(CONFIG_PNP) += pnp/ obj-$(CONFIG_PNP) += pnp/
obj-$(CONFIG_ARM_AMBA) += amba/
# char/ comes before serial/ etc so that the VT console is the boot-time # char/ comes before serial/ etc so that the VT console is the boot-time
# default. # default.
......
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
#include <linux/device.h> #include <linux/device.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/amba/bus.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/hardware/amba.h>
#include <asm/sizes.h> #include <asm/sizes.h>
#define to_amba_device(d) container_of(d, struct amba_device, dev) #define to_amba_device(d) container_of(d, struct amba_device, dev)
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/rtc.h> #include <linux/rtc.h>
#include <linux/bcd.h> #include <linux/bcd.h>
#include <linux/clk.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
...@@ -33,7 +34,6 @@ ...@@ -33,7 +34,6 @@
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include <asm/hardware/clock.h>
#include <asm/arch/regs-rtc.h> #include <asm/arch/regs-rtc.h>
/* need this for the RTC_AF definitions */ /* need this for the RTC_AF definitions */
......
...@@ -46,12 +46,12 @@ ...@@ -46,12 +46,12 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/clk.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/arch/map.h> #include <asm/arch/map.h>
#include <asm/hardware/clock.h>
#undef S3C24XX_VA_WATCHDOG #undef S3C24XX_VA_WATCHDOG
#define S3C24XX_VA_WATCHDOG (0) #define S3C24XX_VA_WATCHDOG (0)
...@@ -397,7 +397,6 @@ static int s3c2410wdt_probe(struct platform_device *pdev) ...@@ -397,7 +397,6 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
return -ENOENT; return -ENOENT;
} }
clk_use(wdt_clock);
clk_enable(wdt_clock); clk_enable(wdt_clock);
/* see if we can actually set the requested timer margin, and if /* see if we can actually set the requested timer margin, and if
...@@ -444,7 +443,6 @@ static int s3c2410wdt_remove(struct platform_device *dev) ...@@ -444,7 +443,6 @@ static int s3c2410wdt_remove(struct platform_device *dev)
if (wdt_clock != NULL) { if (wdt_clock != NULL) {
clk_disable(wdt_clock); clk_disable(wdt_clock);
clk_unuse(wdt_clock);
clk_put(wdt_clock); clk_put(wdt_clock);
wdt_clock = NULL; wdt_clock = NULL;
} }
......
...@@ -34,12 +34,12 @@ ...@@ -34,12 +34,12 @@
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/clk.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardware/clock.h>
#include <asm/arch/regs-gpio.h> #include <asm/arch/regs-gpio.h>
#include <asm/arch/regs-iic.h> #include <asm/arch/regs-iic.h>
#include <asm/arch/iic.h> #include <asm/arch/iic.h>
...@@ -738,7 +738,6 @@ static void s3c24xx_i2c_free(struct s3c24xx_i2c *i2c) ...@@ -738,7 +738,6 @@ static void s3c24xx_i2c_free(struct s3c24xx_i2c *i2c)
{ {
if (i2c->clk != NULL && !IS_ERR(i2c->clk)) { if (i2c->clk != NULL && !IS_ERR(i2c->clk)) {
clk_disable(i2c->clk); clk_disable(i2c->clk);
clk_unuse(i2c->clk);
clk_put(i2c->clk); clk_put(i2c->clk);
i2c->clk = NULL; i2c->clk = NULL;
} }
...@@ -778,7 +777,6 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) ...@@ -778,7 +777,6 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
dev_dbg(&pdev->dev, "clock source %p\n", i2c->clk); dev_dbg(&pdev->dev, "clock source %p\n", i2c->clk);
clk_use(i2c->clk);
clk_enable(i2c->clk); clk_enable(i2c->clk);
/* map the registers */ /* map the registers */
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/amba/bus.h>
#include <linux/amba/kmi.h>
#include <linux/clk.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/hardware/amba.h>
#include <asm/hardware/amba_kmi.h>
#include <asm/hardware/clock.h>
#define KMI_BASE (kmi->base) #define KMI_BASE (kmi->base)
...@@ -72,13 +72,9 @@ static int amba_kmi_open(struct serio *io) ...@@ -72,13 +72,9 @@ static int amba_kmi_open(struct serio *io)
unsigned int divisor; unsigned int divisor;
int ret; int ret;
ret = clk_use(kmi->clk);
if (ret)
goto out;
ret = clk_enable(kmi->clk); ret = clk_enable(kmi->clk);
if (ret) if (ret)
goto clk_unuse; goto out;
divisor = clk_get_rate(kmi->clk) / 8000000 - 1; divisor = clk_get_rate(kmi->clk) / 8000000 - 1;
writeb(divisor, KMICLKDIV); writeb(divisor, KMICLKDIV);
...@@ -97,8 +93,6 @@ static int amba_kmi_open(struct serio *io) ...@@ -97,8 +93,6 @@ static int amba_kmi_open(struct serio *io)
clk_disable: clk_disable:
clk_disable(kmi->clk); clk_disable(kmi->clk);
clk_unuse:
clk_unuse(kmi->clk);
out: out:
return ret; return ret;
} }
...@@ -111,7 +105,6 @@ static void amba_kmi_close(struct serio *io) ...@@ -111,7 +105,6 @@ static void amba_kmi_close(struct serio *io)
free_irq(kmi->irq, kmi); free_irq(kmi->irq, kmi);
clk_disable(kmi->clk); clk_disable(kmi->clk);
clk_unuse(kmi->clk);
} }
static int amba_kmi_probe(struct amba_device *dev, void *id) static int amba_kmi_probe(struct amba_device *dev, void *id)
......
...@@ -19,14 +19,14 @@ ...@@ -19,14 +19,14 @@
#include <linux/highmem.h> #include <linux/highmem.h>
#include <linux/mmc/host.h> #include <linux/mmc/host.h>
#include <linux/mmc/protocol.h> #include <linux/mmc/protocol.h>
#include <linux/amba/bus.h>
#include <linux/clk.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/div64.h> #include <asm/div64.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/scatterlist.h> #include <asm/scatterlist.h>
#include <asm/sizes.h> #include <asm/sizes.h>
#include <asm/hardware/amba.h>
#include <asm/hardware/clock.h>
#include <asm/mach/mmc.h> #include <asm/mach/mmc.h>
#include "mmci.h" #include "mmci.h"
...@@ -494,13 +494,9 @@ static int mmci_probe(struct amba_device *dev, void *id) ...@@ -494,13 +494,9 @@ static int mmci_probe(struct amba_device *dev, void *id)
goto host_free; goto host_free;
} }
ret = clk_use(host->clk);
if (ret)
goto clk_free;
ret = clk_enable(host->clk); ret = clk_enable(host->clk);
if (ret) if (ret)
goto clk_unuse; goto clk_free;
host->plat = plat; host->plat = plat;
host->mclk = clk_get_rate(host->clk); host->mclk = clk_get_rate(host->clk);
...@@ -573,8 +569,6 @@ static int mmci_probe(struct amba_device *dev, void *id) ...@@ -573,8 +569,6 @@ static int mmci_probe(struct amba_device *dev, void *id)
iounmap(host->base); iounmap(host->base);
clk_disable: clk_disable:
clk_disable(host->clk); clk_disable(host->clk);
clk_unuse:
clk_unuse(host->clk);
clk_free: clk_free:
clk_put(host->clk); clk_put(host->clk);
host_free: host_free:
...@@ -609,7 +603,6 @@ static int mmci_remove(struct amba_device *dev) ...@@ -609,7 +603,6 @@ static int mmci_remove(struct amba_device *dev)
iounmap(host->base); iounmap(host->base);
clk_disable(host->clk); clk_disable(host->clk);
clk_unuse(host->clk);
clk_put(host->clk); clk_put(host->clk);
mmc_free_host(mmc); mmc_free_host(mmc);
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/clk.h>
#include <linux/mtd/mtd.h> #include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h> #include <linux/mtd/nand.h>
...@@ -60,7 +61,6 @@ ...@@ -60,7 +61,6 @@
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardware/clock.h>
#include <asm/arch/regs-nand.h> #include <asm/arch/regs-nand.h>
#include <asm/arch/nand.h> #include <asm/arch/nand.h>
...@@ -460,7 +460,6 @@ static int s3c2410_nand_remove(struct platform_device *pdev) ...@@ -460,7 +460,6 @@ static int s3c2410_nand_remove(struct platform_device *pdev)
if (info->clk != NULL && !IS_ERR(info->clk)) { if (info->clk != NULL && !IS_ERR(info->clk)) {
clk_disable(info->clk); clk_disable(info->clk);
clk_unuse(info->clk);
clk_put(info->clk); clk_put(info->clk);
} }
...@@ -598,7 +597,6 @@ static int s3c24xx_nand_probe(struct platform_device *pdev, int is_s3c2440) ...@@ -598,7 +597,6 @@ static int s3c24xx_nand_probe(struct platform_device *pdev, int is_s3c2440)
goto exit_error; goto exit_error;
} }
clk_use(info->clk);
clk_enable(info->clk); clk_enable(info->clk);
/* allocate and map the resource */ /* allocate and map the resource */
......
...@@ -36,9 +36,18 @@ ...@@ -36,9 +36,18 @@
struct scoop_pcmcia_config *platform_scoop_config; struct scoop_pcmcia_config *platform_scoop_config;
#define SCOOP_DEV platform_scoop_config->devs #define SCOOP_DEV platform_scoop_config->devs
static void sharpsl_pcmcia_init_reset(struct scoop_pcmcia_dev *scoopdev) static void sharpsl_pcmcia_init_reset(struct soc_pcmcia_socket *skt)
{ {
struct scoop_pcmcia_dev *scoopdev = &SCOOP_DEV[skt->nr];
reset_scoop(scoopdev->dev); reset_scoop(scoopdev->dev);
/* Shared power controls need to be handled carefully */
if (platform_scoop_config->power_ctrl)
platform_scoop_config->power_ctrl(scoopdev->dev, 0x0000, skt->nr);
else
write_scoop_reg(scoopdev->dev, SCOOP_CPR, 0x0000);
scoopdev->keep_vs = NO_KEEP_VS; scoopdev->keep_vs = NO_KEEP_VS;
scoopdev->keep_rd = 0; scoopdev->keep_rd = 0;
} }
...@@ -208,26 +217,17 @@ static int sharpsl_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, ...@@ -208,26 +217,17 @@ static int sharpsl_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
static void sharpsl_pcmcia_socket_init(struct soc_pcmcia_socket *skt) static void sharpsl_pcmcia_socket_init(struct soc_pcmcia_socket *skt)
{ {
sharpsl_pcmcia_init_reset(&SCOOP_DEV[skt->nr]); sharpsl_pcmcia_init_reset(skt);
/* Enable interrupt */ /* Enable interrupt */
write_scoop_reg(SCOOP_DEV[skt->nr].dev, SCOOP_IMR, 0x00C0); write_scoop_reg(SCOOP_DEV[skt->nr].dev, SCOOP_IMR, 0x00C0);
write_scoop_reg(SCOOP_DEV[skt->nr].dev, SCOOP_MCR, 0x0101); write_scoop_reg(SCOOP_DEV[skt->nr].dev, SCOOP_MCR, 0x0101);
SCOOP_DEV[skt->nr].keep_vs = NO_KEEP_VS; SCOOP_DEV[skt->nr].keep_vs = NO_KEEP_VS;
if (machine_is_collie())
/* We need to disable SS_OUTPUT_ENA here. */
write_scoop_reg(SCOOP_DEV[skt->nr].dev, SCOOP_CPR, read_scoop_reg(SCOOP_DEV[skt->nr].dev, SCOOP_CPR) & ~0x0080);
} }
static void sharpsl_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt) static void sharpsl_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
{ {
/* CF_BUS_OFF */ sharpsl_pcmcia_init_reset(skt);
sharpsl_pcmcia_init_reset(&SCOOP_DEV[skt->nr]);
if (machine_is_collie())
/* We need to disable SS_OUTPUT_ENA here. */
write_scoop_reg(SCOOP_DEV[skt->nr].dev, SCOOP_CPR, read_scoop_reg(SCOOP_DEV[skt->nr].dev, SCOOP_CPR) & ~0x0080);
} }
static struct pcmcia_low_level sharpsl_pcmcia_ops = { static struct pcmcia_low_level sharpsl_pcmcia_ops = {
......
...@@ -47,12 +47,12 @@ ...@@ -47,12 +47,12 @@
#include <linux/tty_flip.h> #include <linux/tty_flip.h>
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/amba/bus.h>
#include <linux/amba/serial.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/hardware/amba.h>
#include <asm/hardware/amba_serial.h>
#define UART_NR 2 #define UART_NR 2
......
...@@ -47,12 +47,12 @@ ...@@ -47,12 +47,12 @@
#include <linux/tty_flip.h> #include <linux/tty_flip.h>
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/amba/bus.h>
#include <linux/amba/serial.h>
#include <linux/clk.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/sizes.h> #include <asm/sizes.h>
#include <asm/hardware/amba.h>
#include <asm/hardware/clock.h>
#include <asm/hardware/amba_serial.h>
#define UART_NR 14 #define UART_NR 14
...@@ -761,10 +761,6 @@ static int pl011_probe(struct amba_device *dev, void *id) ...@@ -761,10 +761,6 @@ static int pl011_probe(struct amba_device *dev, void *id)
goto unmap; goto unmap;
} }
ret = clk_use(uap->clk);
if (ret)
goto putclk;
uap->port.dev = &dev->dev; uap->port.dev = &dev->dev;
uap->port.mapbase = dev->res.start; uap->port.mapbase = dev->res.start;
uap->port.membase = base; uap->port.membase = base;
...@@ -782,8 +778,6 @@ static int pl011_probe(struct amba_device *dev, void *id) ...@@ -782,8 +778,6 @@ static int pl011_probe(struct amba_device *dev, void *id)
if (ret) { if (ret) {
amba_set_drvdata(dev, NULL); amba_set_drvdata(dev, NULL);
amba_ports[i] = NULL; amba_ports[i] = NULL;
clk_unuse(uap->clk);
putclk:
clk_put(uap->clk); clk_put(uap->clk);
unmap: unmap:
iounmap(base); iounmap(base);
...@@ -808,7 +802,6 @@ static int pl011_remove(struct amba_device *dev) ...@@ -808,7 +802,6 @@ static int pl011_remove(struct amba_device *dev)
amba_ports[i] = NULL; amba_ports[i] = NULL;
iounmap(uap->port.membase); iounmap(uap->port.membase);
clk_unuse(uap->clk);
clk_put(uap->clk); clk_put(uap->clk);
kfree(uap); kfree(uap);
return 0; return 0;
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册