Commit 9ee9887b authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents 425675c4 0109817d
...@@ -64,7 +64,6 @@ DATAADDR := . ...@@ -64,7 +64,6 @@ DATAADDR := .
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 textaddr-y := 0xC0008000
machine-$(CONFIG_ARCH_ARCA5K) := arc
machine-$(CONFIG_ARCH_RPC) := rpc machine-$(CONFIG_ARCH_RPC) := rpc
machine-$(CONFIG_ARCH_EBSA110) := ebsa110 machine-$(CONFIG_ARCH_EBSA110) := ebsa110
machine-$(CONFIG_ARCH_CLPS7500) := clps7500 machine-$(CONFIG_ARCH_CLPS7500) := clps7500
...@@ -94,6 +93,13 @@ textaddr-$(CONFIG_ARCH_FORTUNET) := 0xc0008000 ...@@ -94,6 +93,13 @@ textaddr-$(CONFIG_ARCH_FORTUNET) := 0xc0008000
machine-$(CONFIG_ARCH_LH7A40X) := lh7a40x machine-$(CONFIG_ARCH_LH7A40X) := lh7a40x
machine-$(CONFIG_ARCH_VERSATILE_PB) := versatile machine-$(CONFIG_ARCH_VERSATILE_PB) := versatile
ifeq ($(CONFIG_ARCH_EBSA110),y)
# This is what happens if you forget the IOCS16 line.
# PCMCIA cards stop working.
CFLAGS_3c589_cs.o :=-DISA_SIXTEEN_BIT_PERIPHERAL
export CFLAGS_3c589_cs.o
endif
TEXTADDR := $(textaddr-y) TEXTADDR := $(textaddr-y)
ifeq ($(incdir-y),) ifeq ($(incdir-y),)
incdir-y := $(machine-y) incdir-y := $(machine-y)
...@@ -149,8 +155,7 @@ maketools: include/asm-arm/constants.h include/linux/version.h FORCE ...@@ -149,8 +155,7 @@ maketools: include/asm-arm/constants.h include/linux/version.h FORCE
$(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h $(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h
# Convert bzImage to zImage # Convert bzImage to zImage
bzImage: vmlinux bzImage: zImage
$(Q)$(MAKE) $(build)=$(boot) $(boot)/zImage
zImage Image bootpImage uImage: vmlinux zImage Image bootpImage uImage: vmlinux
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
...@@ -165,12 +170,9 @@ CLEAN_FILES += include/asm-arm/constants.h* include/asm-arm/mach-types.h \ ...@@ -165,12 +170,9 @@ CLEAN_FILES += include/asm-arm/constants.h* include/asm-arm/mach-types.h \
archclean: archclean:
$(Q)$(MAKE) $(clean)=$(boot) $(Q)$(MAKE) $(clean)=$(boot)
# My testing targets (that short circuit a few dependencies) # My testing targets (bypasses dependencies)
zImg:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/zImage
Img:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/Image
bp:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/bootpImage bp:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/bootpImage
i:; $(Q)$(MAKE) $(build)=$(boot) install i zi:; $(Q)$(MAKE) $(build)=$(boot) $@
zi:; $(Q)$(MAKE) $(build)=$(boot) zinstall
arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
include/asm-arm/.arch include/asm-arm/.arch
...@@ -182,6 +184,7 @@ define archhelp ...@@ -182,6 +184,7 @@ define archhelp
echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
echo ' bootpImage - Combined zImage and initial RAM disk' echo ' bootpImage - Combined zImage and initial RAM disk'
echo ' (supply initrd image via make variable INITRD=<path>)'
echo ' install - Install uncompressed kernel' echo ' install - Install uncompressed kernel'
echo ' zinstall - Install compressed kernel' echo ' zinstall - Install compressed kernel'
echo ' Install using (your) ~/bin/installkernel or' echo ' Install using (your) ~/bin/installkernel or'
......
...@@ -64,30 +64,20 @@ params_phys-$(CONFIG_ARCH_VERSATILE_PB) := 0x00000100 ...@@ -64,30 +64,20 @@ params_phys-$(CONFIG_ARCH_VERSATILE_PB) := 0x00000100
initrd_phys-$(CONFIG_ARCH_VERSATILE_PB) := 0x00800000 initrd_phys-$(CONFIG_ARCH_VERSATILE_PB) := 0x00800000
ZRELADDR := $(zreladdr-y) ZRELADDR := $(zreladdr-y)
ZTEXTADDR := $(ztextaddr-y)
PARAMS_PHYS := $(params_phys-y) PARAMS_PHYS := $(params_phys-y)
INITRD_PHYS := $(initrd_phys-y) INITRD_PHYS := $(initrd_phys-y)
#
# We now have a PIC decompressor implementation. Decompressors running
# from RAM should not define ZTEXTADDR. Decompressors running directly
# from ROM or Flash must define ZTEXTADDR (preferably via the config)
# FIXME: Previous assignment to ztextaddr-y is lost here. See SHARK
ifeq ($(CONFIG_ZBOOT_ROM),y)
ZTEXTADDR := $(CONFIG_ZBOOT_ROM_TEXT)
ZBSSADDR := $(CONFIG_ZBOOT_ROM_BSS)
else
ZTEXTADDR := 0
ZBSSADDR := ALIGN(4)
endif
export ZTEXTADDR ZBSSADDR ZRELADDR INITRD_PHYS PARAMS_PHYS export ZRELADDR INITRD_PHYS PARAMS_PHYS
targets := Image zImage bootpImage targets := Image zImage bootpImage uImage
$(obj)/Image: vmlinux FORCE $(obj)/Image: vmlinux FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
@echo ' Kernel: $@ is ready' @echo ' Kernel: $@ is ready'
$(obj)/compressed/vmlinux: $(obj)/Image FORCE
$(Q)$(MAKE) $(build)=$(obj)/compressed $@
$(obj)/zImage: $(obj)/compressed/vmlinux FORCE $(obj)/zImage: $(obj)/compressed/vmlinux FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
@echo ' Kernel: $@ is ready' @echo ' Kernel: $@ is ready'
...@@ -97,22 +87,19 @@ quiet_cmd_uimage = UIMAGE $@ ...@@ -97,22 +87,19 @@ quiet_cmd_uimage = UIMAGE $@
-C none -a $(ZRELADDR) -e $(ZRELADDR) \ -C none -a $(ZRELADDR) -e $(ZRELADDR) \
-n 'Linux-$(KERNELRELEASE)' -d $< $@ -n 'Linux-$(KERNELRELEASE)' -d $< $@
targets += uImage $(obj)/uImage: $(obj)/zImage FORCE
$(obj)/uImage: $(obj)/zImage
$(call if_changed,uimage) $(call if_changed,uimage)
@echo ' Image $@ is ready' @echo ' Image $@ is ready'
$(obj)/bootp/bootp: $(obj)/zImage initrd FORCE
$(Q)$(MAKE) $(build)=$(obj)/bootp $@
@:
$(obj)/bootpImage: $(obj)/bootp/bootp FORCE $(obj)/bootpImage: $(obj)/bootp/bootp FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
@echo ' Kernel: $@ is ready' @echo ' Kernel: $@ is ready'
$(obj)/compressed/vmlinux: vmlinux FORCE .PHONY: initrd FORCE
$(Q)$(MAKE) $(build)=$(obj)/compressed $@
$(obj)/bootp/bootp: $(obj)/zImage initrd FORCE
$(Q)$(MAKE) $(build)=$(obj)/bootp $@
.PHONY: initrd
initrd: initrd:
@test "$(INITRD_PHYS)" != "" || \ @test "$(INITRD_PHYS)" != "" || \
(echo This machine does not support INITRD; exit -1) (echo This machine does not support INITRD; exit -1)
...@@ -120,13 +107,11 @@ initrd: ...@@ -120,13 +107,11 @@ initrd:
(echo You must specify INITRD; exit -1) (echo You must specify INITRD; exit -1)
install: $(obj)/Image install: $(obj)/Image
$(CONFIG_SHELL) $(obj)/install.sh \ $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) \
$(obj)/Image System.map "$(INSTALL_PATH)" $(obj)/Image System.map "$(INSTALL_PATH)"
zinstall: $(obj)/zImage zinstall: $(obj)/zImage
$(CONFIG_SHELL) $(obj)/install.sh \ $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) \
$(obj)/zImage System.map "$(INSTALL_PATH)" $(obj)/zImage System.map "$(INSTALL_PATH)"
subdir- := bootp compressed subdir- := bootp compressed
...@@ -2,21 +2,23 @@ ...@@ -2,21 +2,23 @@
# linux/arch/arm/boot/bootp/Makefile # linux/arch/arm/boot/bootp/Makefile
# #
ZSYSTEM = arch/arm/boot/zImage LDFLAGS_bootp :=-p --no-undefined -X \
ZLDFLAGS =-p -X -T $(obj)/bootp.lds \ --defsym initrd_phys=$(INITRD_PHYS) \
--defsym initrd_addr=$(INITRD_PHYS) \ --defsym params_phys=$(PARAMS_PHYS) -T
--defsym params=$(PARAMS_PHYS) AFLAGS_initrd.o :=-DINITRD=\"$(INITRD)\"
extra-y := bootp targets := bootp bootp.lds init.o kernel.o initrd.o
# Note that bootp.lds picks up kernel.o and initrd.o # Note that bootp.lds picks up kernel.o and initrd.o
$(obj)/bootp: $(addprefix $(obj)/,init.o kernel.o initrd.o bootp.lds) $(obj)/bootp: $(addprefix $(obj)/,bootp.lds init.o kernel.o initrd.o) FORCE
$(LD) $(ZLDFLAGS) -o $@ $(obj)/init.o $(call if_changed,ld)
@:
$(obj)/kernel.o: $(ZSYSTEM) # kernel.o and initrd.o includes a binary image using
$(LD) -r -s -o $@ -b binary $(ZSYSTEM) # .incbin, a dependency which is not tracked automatically
$(obj)/initrd.o: $(INITRD) $(obj)/kernel.o: arch/arm/boot/zImage FORCE
$(LD) -r -s -o $@ -b binary $(INITRD)
.PHONY: $(INITRD) $(ZSYSTEM) $(obj)/initrd.o: $(INITRD) FORCE
.PHONY: $(INITRD) FORCE
...@@ -12,16 +12,11 @@ ENTRY(_start) ...@@ -12,16 +12,11 @@ ENTRY(_start)
SECTIONS SECTIONS
{ {
. = 0; . = 0;
_text = .;
.text : { .text : {
_stext = .; _stext = .;
*(.start) *(.start)
arch/arm/boot/bootp/kernel.o *(.text)
. = ALIGN(32); initrd_size = initrd_end - initrd_start;
initrd_start = .;
arch/arm/boot/bootp/initrd.o
initrd_len = . - initrd_start;
. = ALIGN(32);
_etext = .; _etext = .;
} }
......
...@@ -20,11 +20,8 @@ ...@@ -20,11 +20,8 @@
.type _start, #function .type _start, #function
.globl _start .globl _start
_start: adr r12, kernel_start @ offset of kernel zImage _start: adr r13, data
ldr r4, [r12, #0x2c] @ length of zImage ldmia r13!, {r4-r6} @ r5 = dest, r6 = length
adr r13, data
add r4, r4, r12 @ end of zImage, start of initrd
ldmia r13!, {r5-r6} @ r5 = dest, r6 = length
bl move @ move the initrd bl move @ move the initrd
/* /*
...@@ -45,7 +42,7 @@ _start: adr r12, kernel_start @ offset of kernel zImage ...@@ -45,7 +42,7 @@ _start: adr r12, kernel_start @ offset of kernel zImage
*/ */
movne r10, #0 @ terminator movne r10, #0 @ terminator
movne r4, #2 @ Size of this entry (2 words) movne r4, #2 @ Size of this entry (2 words)
stmneia r8, {r4, r5, r10} @ Size, ATAG_CORE, terminator stmneia r9, {r4, r5, r10} @ Size, ATAG_CORE, terminator
/* /*
* find the end of the tag list, and then add an INITRD tag on the end. * find the end of the tag list, and then add an INITRD tag on the end.
...@@ -59,7 +56,7 @@ taglist: ldr r10, [r9, #0] @ tag length ...@@ -59,7 +56,7 @@ taglist: ldr r10, [r9, #0] @ tag length
mov r5, #4 @ Size of initrd tag (4 words) mov r5, #4 @ Size of initrd tag (4 words)
stmia r9, {r5, r6, r7, r8, r10} stmia r9, {r5, r6, r7, r8, r10}
mov pc, r12 @ call kernel b kernel_start @ call kernel
/* /*
* Move the block of memory length r6 from address r4 to address r5 * Move the block of memory length r6 from address r4 to address r5
...@@ -75,16 +72,13 @@ move: ldmia r4!, {r7 - r10} @ move 32-bytes at a time ...@@ -75,16 +72,13 @@ move: ldmia r4!, {r7 - r10} @ move 32-bytes at a time
.size _start, . - _start .size _start, . - _start
.type data,#object .type data,#object
data: .word initrd_addr @ destination initrd address data: .word initrd_start @ source initrd address
.word initrd_len @ initrd size .word initrd_phys @ destination initrd address
.word initrd_size @ initrd size
.word 0x54410001 @ r4 = ATAG_CORE .word 0x54410001 @ r5 = ATAG_CORE
.word 0x54420005 @ r5 = ATAG_INITRD2 .word 0x54420005 @ r6 = ATAG_INITRD2
.word initrd_addr @ r6 .word initrd_phys @ r7
.word initrd_len @ r7 .word initrd_size @ r8
.word params @ r8 .word params_phys @ r9
.size data, . - _data .size data, . - data
.type initrd_start,#object
kernel_start:
.type initrd_start,#object
.globl initrd_start
initrd_start:
.incbin INITRD
.globl initrd_end
initrd_end:
.globl kernel_start
kernel_start:
.incbin "arch/arm/boot/zImage"
.globl kernel_end
kernel_end:
.align 2
...@@ -3,9 +3,6 @@ ...@@ -3,9 +3,6 @@
# #
# create a compressed vmlinuz image from the original vmlinux # create a compressed vmlinuz image from the original vmlinux
# #
# Note! ZTEXTADDR, ZBSSADDR and ZRELADDR are now exported
# from arch/arm/boot/Makefile
#
HEAD = head.o HEAD = head.o
OBJS = misc.o OBJS = misc.o
...@@ -16,7 +13,6 @@ FONTC = drivers/video/console/font_acorn_8x8.c ...@@ -16,7 +13,6 @@ FONTC = drivers/video/console/font_acorn_8x8.c
# #
ifeq ($(CONFIG_ARCH_ACORN),y) ifeq ($(CONFIG_ARCH_ACORN),y)
OBJS += ll_char_wr.o font.o OBJS += ll_char_wr.o font.o
CFLAGS_misc.o := -DPARAMS_PHYS=$(PARAMS_PHYS)
endif endif
ifeq ($(CONFIG_ARCH_SHARK),y) ifeq ($(CONFIG_ARCH_SHARK),y)
...@@ -27,10 +23,6 @@ ifeq ($(CONFIG_ARCH_CAMELOT),y) ...@@ -27,10 +23,6 @@ ifeq ($(CONFIG_ARCH_CAMELOT),y)
OBJS += head-epxa10db.o OBJS += head-epxa10db.o
endif endif
ifeq ($(CONFIG_ARCH_FTVPCI),y)
OBJS += head-ftvpci.o
endif
ifeq ($(CONFIG_ARCH_L7200),y) ifeq ($(CONFIG_ARCH_L7200),y)
OBJS += head-l7200.o OBJS += head-l7200.o
endif endif
...@@ -59,31 +51,52 @@ ifeq ($(CONFIG_DEBUG_ICEDCC),y) ...@@ -59,31 +51,52 @@ ifeq ($(CONFIG_DEBUG_ICEDCC),y)
OBJS += ice-dcc.o OBJS += ice-dcc.o
endif endif
SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/LOAD_ADDR/$(ZRELADDR)/;s/BSS_START/$(ZBSSADDR)/ #
# We now have a PIC decompressor implementation. Decompressors running
# from RAM should not define ZTEXTADDR. Decompressors running directly
# from ROM or Flash must define ZTEXTADDR (preferably via the config)
# FIXME: Previous assignment to ztextaddr-y is lost here. See SHARK
ifeq ($(CONFIG_ZBOOT_ROM),y)
ZTEXTADDR := $(CONFIG_ZBOOT_ROM_TEXT)
ZBSSADDR := $(CONFIG_ZBOOT_ROM_BSS)
else
ZTEXTADDR := 0
ZBSSADDR := ALIGN(4)
endif
SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/
targets := vmlinux vmlinux.lds piggy piggy.gz piggy.o \ targets := vmlinux vmlinux.lds piggy.gz piggy.o font.o \
font.o head.o $(OBJS) head.o misc.o $(OBJS)
EXTRA_CFLAGS := -fpic EXTRA_CFLAGS := -fpic
EXTRA_AFLAGS := EXTRA_AFLAGS :=
LDFLAGS_vmlinux := -p --no-undefined -X \ # Supply ZRELADDR, INITRD_PHYS and PARAMS_PHYS to the decompressor via
# linker symbols. We only define initrd_phys and params_phys if the
# machine class defined the corresponding makefile variable.
LDFLAGS_vmlinux := --defsym zreladdr=$(ZRELADDR)
ifneq ($(INITRD_PHYS),)
LDFLAGS_vmlinux += --defsym initrd_phys=$(INITRD_PHYS)
endif
ifneq ($(PARAMS_PHYS),)
LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS)
endif
LDFLAGS_vmlinux += -p --no-undefined -X \
$(shell $(CC) $(CFLAGS) --print-libgcc-file-name) -T $(shell $(CC) $(CFLAGS) --print-libgcc-file-name) -T
# Don't allow any static data in misc.o, which
# would otherwise mess up our GOT table
CFLAGS_misc.o := -Dstatic=
$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \ $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \
$(addprefix $(obj)/, $(OBJS)) FORCE $(addprefix $(obj)/, $(OBJS)) FORCE
$(call if_changed,ld) $(call if_changed,ld)
@: @:
$(obj)/piggy.gz: $(obj)/../Image FORCE
$(obj)/piggy: vmlinux FORCE
$(call if_changed,objcopy)
$(obj)/piggy.gz: $(obj)/piggy FORCE
$(call if_changed,gzip) $(call if_changed,gzip)
LDFLAGS_piggy.o := -r -b binary
$(obj)/piggy.o: $(obj)/piggy.gz FORCE $(obj)/piggy.o: $(obj)/piggy.gz FORCE
$(call if_changed,ld)
CFLAGS_font.o := -Dstatic= CFLAGS_font.o := -Dstatic=
$(obj)/font.o: $(FONTC) $(obj)/font.o: $(FONTC)
......
/*
* linux/arch/arm/boot/compressed/head-ftvpci.S
*
* Copyright (C) 2000 FutureTV Labs Ltd.
*
* Special startup code for FTV PCI board.
*/
/*
* 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.
*/
.section ".start", "ax"
ftv_start:
mcr p15, 0, r0, c7, c5, 0 @ flush I cache
mrc p15, 0, r0, c1, c0
orr r0, r0, #1 << 12
mcr p15, 0, r0, c1, c0 @ enable I cache
mov r0, #0
mcreq p15, 0, r0, c15, c1, 2 @ enable clock switching
/* check to see if the kernel must be relocated */
ldr ip, =ftv_start
adr sl, ftv_start
teq ip, sl
beq 2f @ no need to copy
/* in the wrong place -> presumably, executing out of ROM */
sub ip, ip, sl @ displacement
ldr lr, =_start @ destination
sub sp, lr, ip @ source
ldr fp, =_edata @ end of copied area
1: ldmia sp!, {r0, r1, r2, r3, r4, r5, r6, r10}
stmia lr!, {r0, r1, r2, r3, r4, r5, r6, r10}
cmp lr, fp
ble 1b
2:
mov r8, #0
mov r7, #3
b 1f
.ltorg
1:
/* fall back into head.S */
...@@ -324,7 +324,7 @@ wont_overwrite: mov r0, r4 ...@@ -324,7 +324,7 @@ wont_overwrite: mov r0, r4
LC0: .word LC0 @ r1 LC0: .word LC0 @ r1
.word __bss_start @ r2 .word __bss_start @ r2
.word _end @ r3 .word _end @ r3
.word _load_addr @ r4 .word zreladdr @ r4
.word _start @ r5 .word _start @ r5
.word _got_start @ r6 .word _got_start @ r6
.word _got_end @ ip .word _got_end @ ip
......
.section .piggydata,#alloc
.globl input_data
input_data:
.incbin "arch/arm/boot/compressed/piggy.gz"
.globl input_data_end
input_data_end:
...@@ -11,9 +11,6 @@ OUTPUT_ARCH(arm) ...@@ -11,9 +11,6 @@ OUTPUT_ARCH(arm)
ENTRY(_start) ENTRY(_start)
SECTIONS SECTIONS
{ {
. = LOAD_ADDR;
_load_addr = .;
. = TEXT_START; . = TEXT_START;
_text = .; _text = .;
...@@ -27,9 +24,7 @@ SECTIONS ...@@ -27,9 +24,7 @@ SECTIONS
*(.rodata.*) *(.rodata.*)
*(.glue_7) *(.glue_7)
*(.glue_7t) *(.glue_7t)
input_data = .; *(.piggydata)
arch/arm/boot/compressed/piggy.o
input_data_end = .;
. = ALIGN(4); . = ALIGN(4);
} }
......
...@@ -21,41 +21,32 @@ ...@@ -21,41 +21,32 @@
# #
# User may have a custom install script # User may have a custom install script
if [ -x ~/bin/installkernel ]; then exec ~/bin/installkernel "$@"; fi
if [ -x /sbin/installkernel ]; then exec /sbin/installkernel "$@"; fi
if [ -x /sbin/installkernel ]; then if [ "$(basename $2)" = "zImage" ]; then
exec /sbin/installkernel "$@"
fi
if [ "$2" = "zImage" ]; then
# Compressed install # Compressed install
echo "Installing compressed kernel" echo "Installing compressed kernel"
if [ -f $4/vmlinuz-$1 ]; then base=vmlinuz
mv $4/vmlinuz-$1 $4/vmlinuz.old
fi
if [ -f $4/System.map-$1 ]; then
mv $4/System.map-$1 $4/System.old
fi
cat $2 > $4/vmlinuz-$1
cp $3 $4/System.map-$1
else else
# Normal install # Normal install
echo "Installing normal kernel" echo "Installing normal kernel"
if [ -f $4/vmlinux-$1 ]; then base=vmlinux
mv $4/vmlinux-$1 $4/vmlinux.old fi
fi
if [ -f $4/System.map ]; then if [ -f $4/$base-$1 ]; then
mv $4/System.map $4/System.old mv $4/$base-$1 $4/$base-$1.old
fi fi
cat $2 > $4/$base-$1
cat $2 > $4/vmlinux-$1 # Install system map file
cp $3 $4/System.map if [ -f $4/System.map-$1 ]; then
mv $4/System.map-$1 $4/System.map-$1.old
fi fi
cp $3 $4/System.map-$1
if [ -x /sbin/loadmap ]; then if [ -x /sbin/loadmap ]; then
/sbin/loadmap --rdev /dev/ima /sbin/loadmap
else else
echo "You have to install it yourself" echo "You have to install it yourself"
fi fi
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
*/ */
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <asm/mach/arch.h>
/* /*
* Make sure that the compiler and target are compatible. * Make sure that the compiler and target are compatible.
...@@ -59,5 +60,7 @@ int main(void) ...@@ -59,5 +60,7 @@ int main(void)
DEFINE(PAGE_SZ, PAGE_SIZE); DEFINE(PAGE_SZ, PAGE_SIZE);
BLANK(); BLANK();
DEFINE(SYS_ERROR0, 0x9f0000); DEFINE(SYS_ERROR0, 0x9f0000);
BLANK();
DEFINE(SIZEOF_MACHINE_DESC, sizeof(struct machine_desc));
return 0; return 0;
} }
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/procinfo.h> #include <asm/procinfo.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/mach/arch.h>
/* /*
* We place the page tables 16K below TEXTADDR. Therefore, we must make sure * We place the page tables 16K below TEXTADDR. Therefore, we must make sure
......
...@@ -139,7 +139,11 @@ EXPORT_SYMBOL(__writel); ...@@ -139,7 +139,11 @@ EXPORT_SYMBOL(__writel);
((p) >> 3) == (0x2f8 >> 3) || \ ((p) >> 3) == (0x2f8 >> 3) || \
((p) >> 3) == (0x378 >> 3)) ((p) >> 3) == (0x378 >> 3))
u8 __inb(int port) /*
* We're addressing an 8 or 16-bit peripheral which tranfers
* odd addresses on the low ISA byte lane.
*/
u8 __inb8(unsigned int port)
{ {
u32 ret; u32 ret;
...@@ -162,7 +166,31 @@ u8 __inb(int port) ...@@ -162,7 +166,31 @@ u8 __inb(int port)
return ret; return ret;
} }
u16 __inw(int port) /*
* We're addressing a 16-bit peripheral which transfers odd
* addresses on the high ISA byte lane.
*/
u8 __inb16(unsigned int port)
{
u32 ret;
/*
* The SuperIO registers use sane addressing techniques...
*/
if (SUPERIO_PORT(port))
ret = __raw_readb(ISAIO_BASE + (port << 2));
else {
u32 a = ISAIO_BASE + ((port & ~1) << 1);
/*
* Shame nothing else does
*/
ret = __raw_readb(a + (port & 1));
}
return ret;
}
u16 __inw(unsigned int port)
{ {
u32 ret; u32 ret;
...@@ -185,17 +213,27 @@ u16 __inw(int port) ...@@ -185,17 +213,27 @@ u16 __inw(int port)
return ret; return ret;
} }
u32 __inl(int port) /*
* Fake a 32-bit read with two 16-bit reads. Needed for 3c589.
*/
u32 __inl(unsigned int port)
{ {
u32 a;
if (SUPERIO_PORT(port) || port & 3)
BUG(); BUG();
return 0;
a = ISAIO_BASE + (port << 1);
return __raw_readw(a) | __raw_readw(a + 4) << 16;
} }
EXPORT_SYMBOL(__inb); EXPORT_SYMBOL(__inb8);
EXPORT_SYMBOL(__inb16);
EXPORT_SYMBOL(__inw); EXPORT_SYMBOL(__inw);
EXPORT_SYMBOL(__inl); EXPORT_SYMBOL(__inl);
void __outb(u8 val, int port) void __outb8(u8 val, unsigned int port)
{ {
/* /*
* The SuperIO registers use sane addressing techniques... * The SuperIO registers use sane addressing techniques...
...@@ -215,7 +253,24 @@ void __outb(u8 val, int port) ...@@ -215,7 +253,24 @@ void __outb(u8 val, int port)
} }
} }
void __outw(u16 val, int port) void __outb16(u8 val, unsigned int port)
{
/*
* The SuperIO registers use sane addressing techniques...
*/
if (SUPERIO_PORT(port))
__raw_writeb(val, ISAIO_BASE + (port << 2));
else {
u32 a = ISAIO_BASE + ((port & ~1) << 1);
/*
* Shame nothing else does
*/
__raw_writeb(val, a + (port & 1));
}
}
void __outw(u16 val, unsigned int port)
{ {
u32 off; u32 off;
...@@ -225,7 +280,7 @@ void __outw(u16 val, int port) ...@@ -225,7 +280,7 @@ void __outw(u16 val, int port)
if (SUPERIO_PORT(port)) if (SUPERIO_PORT(port))
off = port << 2; off = port << 2;
else { else {
off = (port & ~1) << 1; off = port << 1;
if (port & 1) if (port & 1)
BUG(); BUG();
...@@ -233,12 +288,13 @@ void __outw(u16 val, int port) ...@@ -233,12 +288,13 @@ void __outw(u16 val, int port)
__raw_writew(val, ISAIO_BASE + off); __raw_writew(val, ISAIO_BASE + off);
} }
void __outl(u32 val, int port) void __outl(u32 val, unsigned int port)
{ {
BUG(); BUG();
} }
EXPORT_SYMBOL(__outb); EXPORT_SYMBOL(__outb8);
EXPORT_SYMBOL(__outb16);
EXPORT_SYMBOL(__outw); EXPORT_SYMBOL(__outw);
EXPORT_SYMBOL(__outl); EXPORT_SYMBOL(__outl);
...@@ -315,12 +371,29 @@ void insw(unsigned int port, void *from, int len) ...@@ -315,12 +371,29 @@ void insw(unsigned int port, void *from, int len)
EXPORT_SYMBOL(outsw); EXPORT_SYMBOL(outsw);
EXPORT_SYMBOL(insw); EXPORT_SYMBOL(insw);
/*
* We implement these as 16-bit insw/outsw, mainly for
* 3c589 cards.
*/
void outsl(unsigned int port, const void *from, int len) void outsl(unsigned int port, const void *from, int len)
{ {
panic("outsl not supported on this architecture"); u32 off = port << 1;
if (SUPERIO_PORT(port) || port & 3)
BUG();
__raw_writesw(ISAIO_BASE + off, from, len << 1);
} }
void insl(unsigned int port, void *from, int len) void insl(unsigned int port, void *from, int len)
{ {
panic("insl not supported on this architecture"); u32 off = port << 1;
if (SUPERIO_PORT(port) || port & 3)
BUG();
__raw_readsw(ISAIO_BASE + off, from, len << 1);
} }
EXPORT_SYMBOL(outsl);
EXPORT_SYMBOL(insl);
...@@ -351,7 +351,6 @@ static unsigned int mmc_status(struct device *dev) ...@@ -351,7 +351,6 @@ static unsigned int mmc_status(struct device *dev)
} }
static struct mmc_platform_data mmc_data = { static struct mmc_platform_data mmc_data = {
.mclk = 14745600,
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
.status = mmc_status, .status = mmc_status,
}; };
......
...@@ -97,7 +97,7 @@ int clk_set_rate(struct clk *clk, unsigned long rate) ...@@ -97,7 +97,7 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
ret = 0; ret = 0;
} }
#endif #endif
return 0; return ret;
} }
EXPORT_SYMBOL(clk_set_rate); EXPORT_SYMBOL(clk_set_rate);
......
...@@ -315,13 +315,11 @@ static unsigned int mmc_status(struct device *dev) ...@@ -315,13 +315,11 @@ static unsigned int mmc_status(struct device *dev)
} }
static struct mmc_platform_data mmc0_plat_data = { static struct mmc_platform_data mmc0_plat_data = {
.mclk = 33000000,
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
.status = mmc_status, .status = mmc_status,
}; };
static struct mmc_platform_data mmc1_plat_data = { static struct mmc_platform_data mmc1_plat_data = {
.mclk = 33000000,
.ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
.status = mmc_status, .status = mmc_status,
}; };
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <asm/procinfo.h> #include <asm/procinfo.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/ptrace.h>
/* /*
* the cache line size of the I and D cache * the cache line size of the I and D cache
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# To add an entry into this database, please see Documentation/arm/README, # To add an entry into this database, please see Documentation/arm/README,
# or contact rmk@arm.linux.org.uk # or contact rmk@arm.linux.org.uk
# #
# Last update: Fri May 28 13:17:46 2004 # Last update: Mon Jun 28 20:58:04 2004
# #
# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
# #
...@@ -250,8 +250,8 @@ pxa_eagle250 ARCH_PXA_EAGLE250 PXA_EAGLE250 238 ...@@ -250,8 +250,8 @@ pxa_eagle250 ARCH_PXA_EAGLE250 PXA_EAGLE250 238
pdb ARCH_PDB PDB 239 pdb ARCH_PDB PDB 239
blue_2g SA1100_BLUE_2G BLUE_2G 240 blue_2g SA1100_BLUE_2G BLUE_2G 240
bluearch SA1100_BLUEARCH BLUEARCH 241 bluearch SA1100_BLUEARCH BLUEARCH 241
ixdp2400 ARCH_IXMB2400 IXMB2400 242 ixdp2400 ARCH_IXDB2400 IXDB2400 242
ixdp2800 ARCH_IXMB2800 IXMB2800 243 ixdp2800 ARCH_IXDB2800 IXDB2800 243
explorer SA1100_EXPLORER EXPLORER 244 explorer SA1100_EXPLORER EXPLORER 244
ixdp425 ARCH_IXDP425 IXDP425 245 ixdp425 ARCH_IXDP425 IXDP425 245
chimp ARCH_CHIMP CHIMP 246 chimp ARCH_CHIMP CHIMP 246
...@@ -546,3 +546,14 @@ ddi_blueridge MACH_DDI_BLUERIDGE DDI_BLUERIDGE 535 ...@@ -546,3 +546,14 @@ ddi_blueridge MACH_DDI_BLUERIDGE DDI_BLUERIDGE 535
skyminder MACH_SKYMINDER SKYMINDER 536 skyminder MACH_SKYMINDER SKYMINDER 536
lpd79520 MACH_LPD79520 LPD79520 537 lpd79520 MACH_LPD79520 LPD79520 537
edb9302 MACH_EDB9302 EDB9302 538 edb9302 MACH_EDB9302 EDB9302 538
hw90340 MACH_HW90340 HW90340 539
cip_box MACH_CIP_BOX CIP_BOX 540
ivpn MACH_IVPN IVPN 541
rsoc2 MACH_RSOC2 RSOC2 542
husky MACH_HUSKY HUSKY 543
boxer MACH_BOXER BOXER 544
shepherd MACH_SHEPHERD SHEPHERD 545
aml42800aa MACH_AML42800AA AML42800AA 546
ml674001 MACH_MACH_TYPE_ML674001 MACH_TYPE_ML674001 547
lpc2294 MACH_LPC2294 LPC2294 548
switchgrass MACH_SWITCHGRASS SWITCHGRASS 549
...@@ -15,26 +15,44 @@ ...@@ -15,26 +15,44 @@
#define IO_SPACE_LIMIT 0xffff #define IO_SPACE_LIMIT 0xffff
u8 __inb(int port); u8 __inb8(unsigned int port);
u16 __inw(int port); void __outb8(u8 val, unsigned int port);
u32 __inl(int port);
#define inb(p) __inb(p) u8 __inb16(unsigned int port);
#define inw(p) __inw(p) void __outb16(u8 val, unsigned int port);
#define inl(p) __inl(p)
void __outb(u8 val, int port); u16 __inw(unsigned int port);
void __outw(u16 val, int port); void __outw(u16 val, unsigned int port);
void __outl(u32 val, int port);
#define outb(v,p) __outb(v,p) u32 __inl(unsigned int port);
#define outw(v,p) __outw(v,p) void __outl(u32 val, unsigned int port);
#define outl(v,p) __outl(v,p)
u8 __readb(void *addr); u8 __readb(void *addr);
u16 __readw(void *addr); u16 __readw(void *addr);
u32 __readl(void *addr); u32 __readl(void *addr);
void __writeb(u8 val, void *addr);
void __writew(u16 val, void *addr);
void __writel(u32 val, void *addr);
/*
* Argh, someone forgot the IOCS16 line. We therefore have to handle
* the byte stearing by selecting the correct byte IO functions here.
*/
#ifdef ISA_SIXTEEN_BIT_PERIPHERAL
#define inb(p) __inb16(p)
#define outb(v,p) __outb16(v,p)
#else
#define inb(p) __inb8(p)
#define outb(v,p) __outb8(v,p)
#endif
#define inw(p) __inw(p)
#define outw(v,p) __outw(v,p)
#define inl(p) __inl(p)
#define outl(v,p) __outl(v,p)
#define readb(b) __readb(b) #define readb(b) __readb(b)
#define readw(b) __readw(b) #define readw(b) __readw(b)
#define readl(b) __readl(b) #define readl(b) __readl(b)
...@@ -42,10 +60,6 @@ u32 __readl(void *addr); ...@@ -42,10 +60,6 @@ u32 __readl(void *addr);
#define readw_relaxed(addr) readw(addr) #define readw_relaxed(addr) readw(addr)
#define readl_relaxed(addr) readl(addr) #define readl_relaxed(addr) readl(addr)
void __writeb(u8 val, void *addr);
void __writew(u16 val, void *addr);
void __writel(u32 val, void *addr);
#define writeb(v,b) __writeb(v,b) #define writeb(v,b) __writeb(v,b)
#define writew(v,b) __writew(v,b) #define writew(v,b) __writew(v,b)
#define writel(v,b) __writel(v,b) #define writel(v,b) __writel(v,b)
...@@ -53,4 +67,12 @@ void __writel(u32 val, void *addr); ...@@ -53,4 +67,12 @@ void __writel(u32 val, void *addr);
#define __arch_ioremap(cookie,sz,c,a) ((void *)(cookie)) #define __arch_ioremap(cookie,sz,c,a) ((void *)(cookie))
#define __arch_iounmap(cookie) do { } while (0) #define __arch_iounmap(cookie) do { } while (0)
extern void insb(unsigned int port, void *buf, int sz);
extern void insw(unsigned int port, void *buf, int sz);
extern void insl(unsigned int port, void *buf, int sz);
extern void outsb(unsigned int port, const void *buf, int sz);
extern void outsw(unsigned int port, const void *buf, int sz);
extern void outsl(unsigned int port, const void *buf, int sz);
#endif #endif
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
*/ */
static void puts(const char *s) static void puts(const char *s)
{ {
unsigned long tmp1, tmp2;
__asm__ __volatile__( __asm__ __volatile__(
"ldrb %0, [%2], #1\n" "ldrb %0, [%2], #1\n"
" teq %0, #0\n" " teq %0, #0\n"
...@@ -32,7 +33,8 @@ static void puts(const char *s) ...@@ -32,7 +33,8 @@ static void puts(const char *s)
" and %1, %1, #0x60\n" " and %1, %1, #0x60\n"
" teq %1, #0x60\n" " teq %1, #0x60\n"
" bne 3b" " bne 3b"
: : "r" (0), "r" (0), "r" (s), "r" (0xf0000be0) : "cc"); : "=&r" (tmp1), "=&r" (tmp2)
: "r" (s), "r" (0xf0000be0) : "cc");
} }
/* /*
......
...@@ -23,30 +23,4 @@ ...@@ -23,30 +23,4 @@
/* No DMA */ /* No DMA */
#define MAX_DMA_CHANNELS 0 #define MAX_DMA_CHANNELS 0
/*
* 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.
*/
static inline void __arch_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;
}
#define arch_adjust_zones(node, size, holes) \
__arch_adjust_zones(node, size, holes)
#endif /* _ASM_ARCH_DMA_H */ #endif /* _ASM_ARCH_DMA_H */
...@@ -7,11 +7,45 @@ ...@@ -7,11 +7,45 @@
#ifndef __ASM_ARCH_MEMORY_H #ifndef __ASM_ARCH_MEMORY_H
#define __ASM_ARCH_MEMORY_H #define __ASM_ARCH_MEMORY_H
#include <asm/sizes.h>
/* /*
* Physical DRAM offset. * Physical DRAM offset.
*/ */
#define PHYS_OFFSET (0x00000000UL) #define PHYS_OFFSET (0x00000000UL)
#ifndef __ASSEMBLY__
/*
* 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.
*/
static inline void __arch_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;
}
#define arch_adjust_zones(node, size, holes) \
__arch_adjust_zones(node, size, holes)
#define ISA_DMA_THRESHOLD (SZ_64M - 1)
#endif
/* /*
* Virtual view <-> DMA view memory address translations * Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an * virt_to_bus: Used to translate the virtual address to an
......
...@@ -56,7 +56,12 @@ static const unsigned long palette_4[16] = { ...@@ -56,7 +56,12 @@ static const unsigned long palette_4[16] = {
#define palette_setpixel(p) *(unsigned long *)(IO_START+0x00400000) = 0x10000000|((p) & 255) #define palette_setpixel(p) *(unsigned long *)(IO_START+0x00400000) = 0x10000000|((p) & 255)
#define palette_write(v) *(unsigned long *)(IO_START+0x00400000) = 0x00000000|((v) & 0x00ffffff) #define palette_write(v) *(unsigned long *)(IO_START+0x00400000) = 0x00000000|((v) & 0x00ffffff)
static struct param_struct *params = (struct param_struct *)PARAMS_PHYS; /*
* params_phys is a linker defined symbol - see
* arch/arm/boot/compressed/Makefile
*/
extern struct param_struct params_phys;
#define params (&params_phys)
#ifndef STANDALONE_DEBUG #ifndef STANDALONE_DEBUG
/* /*
......
...@@ -129,21 +129,4 @@ extern void sa1100_reset_dma(dma_regs_t *regs); ...@@ -129,21 +129,4 @@ extern void sa1100_reset_dma(dma_regs_t *regs);
#define sa1100_clear_dma(regs) ((regs)->ClrDCSR = DCSR_IE|DCSR_RUN|DCSR_STRTA|DCSR_STRTB) #define sa1100_clear_dma(regs) ((regs)->ClrDCSR = DCSR_IE|DCSR_RUN|DCSR_STRTA|DCSR_STRTB)
#ifdef CONFIG_SA1111
static inline void
__arch_adjust_zones(int node, unsigned long *size, unsigned long *holes)
{
unsigned int sz = 256;
if (node != 0)
sz = 0;
size[1] = size[0] - sz;
size[0] = sz;
}
#define arch_adjust_zones(node,size,holes) __arch_adjust_zones(node,size,holes)
#endif
#endif /* _ASM_ARCH_DMA_H */ #endif /* _ASM_ARCH_DMA_H */
...@@ -8,12 +8,36 @@ ...@@ -8,12 +8,36 @@
#define __ASM_ARCH_MEMORY_H #define __ASM_ARCH_MEMORY_H
#include <linux/config.h> #include <linux/config.h>
#include <asm/sizes.h>
/* /*
* Physical DRAM offset is 0xc0000000 on the SA1100 * Physical DRAM offset is 0xc0000000 on the SA1100
*/ */
#define PHYS_OFFSET (0xc0000000UL) #define PHYS_OFFSET (0xc0000000UL)
#ifndef __ASSEMBLY__
#ifdef CONFIG_SA1111
static inline void
__arch_adjust_zones(int node, unsigned long *size, unsigned long *holes)
{
unsigned int sz = SZ_1M >> PAGE_SHIFT;
if (node != 0)
sz = 0;
size[1] = size[0] - sz;
size[0] = sz;
}
#define arch_adjust_zones(node, size, holes) \
__arch_adjust_zones(node, size, holes)
#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_1M - 1)
#endif
#endif
/* /*
* Virtual view <-> DMA view memory address translations * Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an * virt_to_bus: Used to translate the virtual address to an
......
...@@ -14,17 +14,5 @@ ...@@ -14,17 +14,5 @@
#define MAX_DMA_CHANNELS 8 #define MAX_DMA_CHANNELS 8
#define DMA_ISA_CASCADE 4 #define DMA_ISA_CASCADE 4
static inline void __arch_adjust_zones(int node, unsigned long *zone_size, unsigned long *zhole_size)
{
if (node != 0) return;
/* Only the first 4 MB (=1024 Pages) are usable for DMA */
zone_size[1] = zone_size[0] - 1024;
zone_size[0] = 1024;
zhole_size[1] = zhole_size[0];
zhole_size[0] = 0;
}
#define arch_adjust_zones(node,size,holes) __arch_adjust_zones(node,size,holes)
#endif /* _ASM_ARCH_DMA_H */ #endif /* _ASM_ARCH_DMA_H */
...@@ -10,11 +10,32 @@ ...@@ -10,11 +10,32 @@
#ifndef __ASM_ARCH_MEMORY_H #ifndef __ASM_ARCH_MEMORY_H
#define __ASM_ARCH_MEMORY_H #define __ASM_ARCH_MEMORY_H
#include <asm/sizes.h>
/* /*
* Physical DRAM offset. * Physical DRAM offset.
*/ */
#define PHYS_OFFSET (0x08000000UL) #define PHYS_OFFSET (0x08000000UL)
#ifndef __ASSEMBLY__
static inline void __arch_adjust_zones(int node, unsigned long *zone_size, unsigned long *zhole_size)
{
if (node != 0) return;
/* Only the first 4 MB (=1024 Pages) are usable for DMA */
zone_size[1] = zone_size[0] - 1024;
zone_size[0] = 1024;
zhole_size[1] = zhole_size[0];
zhole_size[0] = 0;
}
#define arch_adjust_zones(node, size, holes) \
__arch_adjust_zones(node, size, holes)
#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_4M - 1)
#endif
#define __virt_to_bus(x) __virt_to_phys(x) #define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt(x) __phys_to_virt(x) #define __bus_to_virt(x) __phys_to_virt(x)
......
...@@ -6,7 +6,6 @@ typedef unsigned int dmach_t; ...@@ -6,7 +6,6 @@ typedef unsigned int dmach_t;
#include <linux/config.h> #include <linux/config.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/memory.h>
#include <asm/scatterlist.h> #include <asm/scatterlist.h>
#include <asm/arch/dma.h> #include <asm/arch/dma.h>
...@@ -133,8 +132,4 @@ extern int isa_dma_bridge_buggy; ...@@ -133,8 +132,4 @@ extern int isa_dma_bridge_buggy;
#define isa_dma_bridge_buggy (0) #define isa_dma_bridge_buggy (0)
#endif #endif
#ifndef arch_adjust_zones
#define arch_adjust_zones(node,size,holes)
#endif
#endif /* _ARM_DMA_H */ #endif /* _ARM_DMA_H */
...@@ -8,12 +8,6 @@ ...@@ -8,12 +8,6 @@
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
/*
* The size of struct machine_desc
* (for assembler code)
*/
#define SIZEOF_MACHINE_DESC 52
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
struct tag; struct tag;
......
...@@ -59,6 +59,20 @@ ...@@ -59,6 +59,20 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
/*
* The DMA mask corresponding to the maximum bus address allocatable
* using GFP_DMA. The default here places no restriction on DMA
* allocations. This must be the smallest DMA mask in the system,
* so a successful GFP_DMA allocation will always satisfy this.
*/
#ifndef ISA_DMA_THRESHOLD
#define ISA_DMA_THRESHOLD (0xffffffffULL)
#endif
#ifndef arch_adjust_zones
#define arch_adjust_zones(node,size,holes) do { } while (0)
#endif
/* /*
* PFNs are used to describe any physical page; this means * PFNs are used to describe any physical page; this means
* PFN 0 == physical address 0. * PFN 0 == physical address 0.
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <asm/atomic.h> #include <asm/atomic.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/procinfo.h> #include <asm/procinfo.h>
#include <asm/arch/memory.h>
#include <asm/types.h> #include <asm/types.h>
#define KERNEL_STACK_SIZE PAGE_SIZE #define KERNEL_STACK_SIZE PAGE_SIZE
......
#ifndef _ASMARM_SCATTERLIST_H #ifndef _ASMARM_SCATTERLIST_H
#define _ASMARM_SCATTERLIST_H #define _ASMARM_SCATTERLIST_H
#include <asm/memory.h>
#include <asm/types.h> #include <asm/types.h>
struct scatterlist { struct scatterlist {
...@@ -21,6 +22,4 @@ struct scatterlist { ...@@ -21,6 +22,4 @@ struct scatterlist {
#define sg_dma_address(sg) ((sg)->dma_address) #define sg_dma_address(sg) ((sg)->dma_address)
#define sg_dma_len(sg) ((sg)->length) #define sg_dma_len(sg) ((sg)->length)
#define ISA_DMA_THRESHOLD (0xffffffff)
#endif /* _ASMARM_SCATTERLIST_H */ #endif /* _ASMARM_SCATTERLIST_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment