diff options
Diffstat (limited to 'arch/arm')
26 files changed, 295 insertions, 199 deletions
diff --git a/arch/arm/configs/csb337_defconfig b/arch/arm/configs/csb337_defconfig index 3594155a8137..cf3fa5cb26e4 100644 --- a/arch/arm/configs/csb337_defconfig +++ b/arch/arm/configs/csb337_defconfig | |||
| @@ -621,9 +621,8 @@ CONFIG_AT91_WATCHDOG=y | |||
| 621 | # USB-based Watchdog Cards | 621 | # USB-based Watchdog Cards |
| 622 | # | 622 | # |
| 623 | # CONFIG_USBPCWATCHDOG is not set | 623 | # CONFIG_USBPCWATCHDOG is not set |
| 624 | # CONFIG_HW_RANDOM is not set | ||
| 624 | # CONFIG_NVRAM is not set | 625 | # CONFIG_NVRAM is not set |
| 625 | CONFIG_RTC=y | ||
| 626 | # CONFIG_AT91_RTC is not set | ||
| 627 | # CONFIG_DTLK is not set | 626 | # CONFIG_DTLK is not set |
| 628 | # CONFIG_R3964 is not set | 627 | # CONFIG_R3964 is not set |
| 629 | 628 | ||
| @@ -956,10 +955,42 @@ CONFIG_USB_AT91=y | |||
| 956 | CONFIG_MMC=y | 955 | CONFIG_MMC=y |
| 957 | # CONFIG_MMC_DEBUG is not set | 956 | # CONFIG_MMC_DEBUG is not set |
| 958 | CONFIG_MMC_BLOCK=y | 957 | CONFIG_MMC_BLOCK=y |
| 959 | # CONFIG_MMC_WBSD is not set | ||
| 960 | CONFIG_MMC_AT91RM9200=y | 958 | CONFIG_MMC_AT91RM9200=y |
| 961 | 959 | ||
| 962 | # | 960 | # |
| 961 | # Real Time Clock | ||
| 962 | # | ||
| 963 | CONFIG_RTC_LIB=y | ||
| 964 | CONFIG_RTC_CLASS=y | ||
| 965 | CONFIG_RTC_HCTOSYS=y | ||
| 966 | CONFIG_RTC_HCTOSYS_DEVICE="rtc1" | ||
| 967 | |||
| 968 | # | ||
| 969 | # RTC interfaces | ||
| 970 | # | ||
| 971 | # CONFIG_RTC_INTF_SYSFS is not set | ||
| 972 | CONFIG_RTC_INTF_PROC=y | ||
| 973 | CONFIG_RTC_INTF_DEV=y | ||
| 974 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
| 975 | |||
| 976 | # | ||
| 977 | # RTC drivers | ||
| 978 | # | ||
| 979 | # CONFIG_RTC_DRV_X1205 is not set | ||
| 980 | CONFIG_RTC_DRV_DS1307=y | ||
| 981 | # CONFIG_RTC_DRV_DS1553 is not set | ||
| 982 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
| 983 | # CONFIG_RTC_DRV_DS1672 is not set | ||
| 984 | # CONFIG_RTC_DRV_DS1742 is not set | ||
| 985 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
| 986 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
| 987 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
| 988 | # CONFIG_RTC_DRV_M48T86 is not set | ||
| 989 | CONFIG_RTC_DRV_AT91=y | ||
| 990 | # CONFIG_RTC_DRV_TEST is not set | ||
| 991 | # CONFIG_RTC_DRV_V3020 is not set | ||
| 992 | |||
| 993 | # | ||
| 963 | # File systems | 994 | # File systems |
| 964 | # | 995 | # |
| 965 | CONFIG_EXT2_FS=y | 996 | CONFIG_EXT2_FS=y |
diff --git a/arch/arm/mach-ixp4xx/nslu2-pci.c b/arch/arm/mach-ixp4xx/nslu2-pci.c index 0de639d6e60a..04661fef97f5 100644 --- a/arch/arm/mach-ixp4xx/nslu2-pci.c +++ b/arch/arm/mach-ixp4xx/nslu2-pci.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | 17 | ||
| 18 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
| 19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
| 20 | #include <linux/irq.h> | ||
| 20 | 21 | ||
| 21 | #include <asm/mach/pci.h> | 22 | #include <asm/mach/pci.h> |
| 22 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
diff --git a/arch/arm/mach-ixp4xx/nslu2-power.c b/arch/arm/mach-ixp4xx/nslu2-power.c index e2a2230b69f0..a29b3b2b61b6 100644 --- a/arch/arm/mach-ixp4xx/nslu2-power.c +++ b/arch/arm/mach-ixp4xx/nslu2-power.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | 19 | ||
| 20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
| 21 | #include <linux/reboot.h> | 21 | #include <linux/reboot.h> |
| 22 | #include <linux/irq.h> | ||
| 22 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
| 23 | #include <linux/reboot.h> | 24 | #include <linux/reboot.h> |
| 24 | 25 | ||
diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile index 273e05f2b8de..0eadec916214 100644 --- a/arch/arm/mach-s3c2410/Makefile +++ b/arch/arm/mach-s3c2410/Makefile | |||
| @@ -28,6 +28,7 @@ obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o | |||
| 28 | 28 | ||
| 29 | # S3C2412 support | 29 | # S3C2412 support |
| 30 | obj-$(CONFIG_CPU_S3C2412) += s3c2412.o | 30 | obj-$(CONFIG_CPU_S3C2412) += s3c2412.o |
| 31 | obj-$(CONFIG_CPU_S3C2412) += s3c2412-irq.o | ||
| 31 | obj-$(CONFIG_CPU_S3C2412) += s3c2412-clock.o | 32 | obj-$(CONFIG_CPU_S3C2412) += s3c2412-clock.o |
| 32 | 33 | ||
| 33 | # | 34 | # |
diff --git a/arch/arm/mach-s3c2410/cpu.h b/arch/arm/mach-s3c2410/cpu.h index b0ed9d2d141b..be42e4032a6d 100644 --- a/arch/arm/mach-s3c2410/cpu.h +++ b/arch/arm/mach-s3c2410/cpu.h | |||
| @@ -8,16 +8,6 @@ | |||
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | ||
| 12 | * Modifications: | ||
| 13 | * 24-Aug-2004 BJD Start of generic S3C24XX support | ||
| 14 | * 18-Oct-2004 BJD Moved board struct into this file | ||
| 15 | * 04-Jan-2005 BJD New uart initialisation | ||
| 16 | * 10-Jan-2005 BJD Moved generic init here, specific to cpu headers | ||
| 17 | * 14-Jan-2005 BJD Added s3c24xx_init_clocks() call | ||
| 18 | * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} & IODESC_ENT | ||
| 19 | * 14-Mar-2005 BJD Updated for __iomem | ||
| 20 | * 15-Jan-2006 LCVR Updated S3C2410_PA_##x to new S3C24XX_PA_##x macro | ||
| 21 | */ | 11 | */ |
| 22 | 12 | ||
| 23 | /* todo - fix when rmk changes iodescs to use `void __iomem *` */ | 13 | /* todo - fix when rmk changes iodescs to use `void __iomem *` */ |
diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c index ad3845e329ba..cae35ff76f33 100644 --- a/arch/arm/mach-s3c2410/devs.c +++ b/arch/arm/mach-s3c2410/devs.c | |||
| @@ -1,22 +1,14 @@ | |||
| 1 | /* linux/arch/arm/mach-s3c2410/devs.c | 1 | /* linux/arch/arm/mach-s3c2410/devs.c |
| 2 | * | 2 | * |
| 3 | * Copyright (c) 2004 Simtec Electronics | 3 | * Copyright (c) 2004 Simtec Electronics |
| 4 | * Ben Dooks <ben@simtec.co.uk> | 4 | * Ben Dooks <ben@simtec.co.uk> |
| 5 | * | 5 | * |
| 6 | * Base S3C2410 platform device definitions | 6 | * Base S3C24XX platform device definitions |
| 7 | * | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | 11 | * |
| 12 | * Modifications: | ||
| 13 | * 15-Jan-2006 LCVR Using S3C24XX_PA_##x macro for common S3C24XX devices | ||
| 14 | * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} | ||
| 15 | * 10-Feb-2005 BJD Added camera from guillaume.gourat@nexvision.tv | ||
| 16 | * 29-Aug-2004 BJD Added timers 0 through 3 | ||
| 17 | * 29-Aug-2004 BJD Changed index of devices we only have one of to -1 | ||
| 18 | * 21-Aug-2004 BJD Added IRQ_TICK to RTC resources | ||
| 19 | * 18-Aug-2004 BJD Created initial version | ||
| 20 | */ | 12 | */ |
| 21 | 13 | ||
| 22 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c index 25855452fe8c..cc92a7b2db88 100644 --- a/arch/arm/mach-s3c2410/dma.c +++ b/arch/arm/mach-s3c2410/dma.c | |||
| @@ -60,7 +60,7 @@ static void __iomem *dma_base; | |||
| 60 | static kmem_cache_t *dma_kmem; | 60 | static kmem_cache_t *dma_kmem; |
| 61 | 61 | ||
| 62 | /* dma channel state information */ | 62 | /* dma channel state information */ |
| 63 | s3c2410_dma_chan_t s3c2410_chans[S3C2410_DMA_CHANNELS]; | 63 | struct s3c2410_dma_chan s3c2410_chans[S3C2410_DMA_CHANNELS]; |
| 64 | 64 | ||
| 65 | /* debugging functions */ | 65 | /* debugging functions */ |
| 66 | 66 | ||
| @@ -74,7 +74,7 @@ s3c2410_dma_chan_t s3c2410_chans[S3C2410_DMA_CHANNELS]; | |||
| 74 | #define dma_wrreg(chan, reg, val) writel((val), (chan)->regs + (reg)) | 74 | #define dma_wrreg(chan, reg, val) writel((val), (chan)->regs + (reg)) |
| 75 | #else | 75 | #else |
| 76 | static inline void | 76 | static inline void |
| 77 | dma_wrreg(s3c2410_dma_chan_t *chan, int reg, unsigned long val) | 77 | dma_wrreg(struct s3c2410_dma_chan *chan, int reg, unsigned long val) |
| 78 | { | 78 | { |
| 79 | pr_debug("writing %08x to register %08x\n",(unsigned int)val,reg); | 79 | pr_debug("writing %08x to register %08x\n",(unsigned int)val,reg); |
| 80 | writel(val, dma_regaddr(chan, reg)); | 80 | writel(val, dma_regaddr(chan, reg)); |
| @@ -102,7 +102,7 @@ struct s3c2410_dma_regstate { | |||
| 102 | */ | 102 | */ |
| 103 | 103 | ||
| 104 | static void | 104 | static void |
| 105 | dmadbg_capture(s3c2410_dma_chan_t *chan, struct s3c2410_dma_regstate *regs) | 105 | dmadbg_capture(struct s3c2410_dma_chan *chan, struct s3c2410_dma_regstate *regs) |
| 106 | { | 106 | { |
| 107 | regs->dcsrc = dma_rdreg(chan, S3C2410_DMA_DCSRC); | 107 | regs->dcsrc = dma_rdreg(chan, S3C2410_DMA_DCSRC); |
| 108 | regs->disrc = dma_rdreg(chan, S3C2410_DMA_DISRC); | 108 | regs->disrc = dma_rdreg(chan, S3C2410_DMA_DISRC); |
| @@ -112,7 +112,7 @@ dmadbg_capture(s3c2410_dma_chan_t *chan, struct s3c2410_dma_regstate *regs) | |||
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | static void | 114 | static void |
| 115 | dmadbg_dumpregs(const char *fname, int line, s3c2410_dma_chan_t *chan, | 115 | dmadbg_dumpregs(const char *fname, int line, struct s3c2410_dma_chan *chan, |
| 116 | struct s3c2410_dma_regstate *regs) | 116 | struct s3c2410_dma_regstate *regs) |
| 117 | { | 117 | { |
| 118 | printk(KERN_DEBUG "dma%d: %s:%d: DCSRC=%08lx, DISRC=%08lx, DSTAT=%08lx DMT=%02lx, DCON=%08lx\n", | 118 | printk(KERN_DEBUG "dma%d: %s:%d: DCSRC=%08lx, DISRC=%08lx, DSTAT=%08lx DMT=%02lx, DCON=%08lx\n", |
| @@ -122,7 +122,7 @@ dmadbg_dumpregs(const char *fname, int line, s3c2410_dma_chan_t *chan, | |||
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | static void | 124 | static void |
| 125 | dmadbg_showchan(const char *fname, int line, s3c2410_dma_chan_t *chan) | 125 | dmadbg_showchan(const char *fname, int line, struct s3c2410_dma_chan *chan) |
| 126 | { | 126 | { |
| 127 | struct s3c2410_dma_regstate state; | 127 | struct s3c2410_dma_regstate state; |
| 128 | 128 | ||
| @@ -136,7 +136,7 @@ dmadbg_showchan(const char *fname, int line, s3c2410_dma_chan_t *chan) | |||
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | static void | 138 | static void |
| 139 | dmadbg_showregs(const char *fname, int line, s3c2410_dma_chan_t *chan) | 139 | dmadbg_showregs(const char *fname, int line, struct s3c2410_dma_chan *chan) |
| 140 | { | 140 | { |
| 141 | struct s3c2410_dma_regstate state; | 141 | struct s3c2410_dma_regstate state; |
| 142 | 142 | ||
| @@ -164,7 +164,7 @@ dmadbg_showregs(const char *fname, int line, s3c2410_dma_chan_t *chan) | |||
| 164 | */ | 164 | */ |
| 165 | 165 | ||
| 166 | static void | 166 | static void |
| 167 | s3c2410_dma_stats_timeout(s3c2410_dma_stats_t *stats, int val) | 167 | s3c2410_dma_stats_timeout(struct s3c2410_dma_stats *stats, int val) |
| 168 | { | 168 | { |
| 169 | if (stats == NULL) | 169 | if (stats == NULL) |
| 170 | return; | 170 | return; |
| @@ -183,7 +183,7 @@ s3c2410_dma_stats_timeout(s3c2410_dma_stats_t *stats, int val) | |||
| 183 | */ | 183 | */ |
| 184 | 184 | ||
| 185 | static int | 185 | static int |
| 186 | s3c2410_dma_waitforload(s3c2410_dma_chan_t *chan, int line) | 186 | s3c2410_dma_waitforload(struct s3c2410_dma_chan *chan, int line) |
| 187 | { | 187 | { |
| 188 | int timeout = chan->load_timeout; | 188 | int timeout = chan->load_timeout; |
| 189 | int took; | 189 | int took; |
| @@ -230,8 +230,8 @@ s3c2410_dma_waitforload(s3c2410_dma_chan_t *chan, int line) | |||
| 230 | */ | 230 | */ |
| 231 | 231 | ||
| 232 | static inline int | 232 | static inline int |
| 233 | s3c2410_dma_loadbuffer(s3c2410_dma_chan_t *chan, | 233 | s3c2410_dma_loadbuffer(struct s3c2410_dma_chan *chan, |
| 234 | s3c2410_dma_buf_t *buf) | 234 | struct s3c2410_dma_buf *buf) |
| 235 | { | 235 | { |
| 236 | unsigned long reload; | 236 | unsigned long reload; |
| 237 | 237 | ||
| @@ -304,7 +304,7 @@ s3c2410_dma_loadbuffer(s3c2410_dma_chan_t *chan, | |||
| 304 | */ | 304 | */ |
| 305 | 305 | ||
| 306 | static void | 306 | static void |
| 307 | s3c2410_dma_call_op(s3c2410_dma_chan_t *chan, s3c2410_chan_op_t op) | 307 | s3c2410_dma_call_op(struct s3c2410_dma_chan *chan, enum s3c2410_chan_op op) |
| 308 | { | 308 | { |
| 309 | if (chan->op_fn != NULL) { | 309 | if (chan->op_fn != NULL) { |
| 310 | (chan->op_fn)(chan, op); | 310 | (chan->op_fn)(chan, op); |
| @@ -318,8 +318,8 @@ s3c2410_dma_call_op(s3c2410_dma_chan_t *chan, s3c2410_chan_op_t op) | |||
| 318 | */ | 318 | */ |
| 319 | 319 | ||
| 320 | static inline void | 320 | static inline void |
| 321 | s3c2410_dma_buffdone(s3c2410_dma_chan_t *chan, s3c2410_dma_buf_t *buf, | 321 | s3c2410_dma_buffdone(struct s3c2410_dma_chan *chan, struct s3c2410_dma_buf *buf, |
| 322 | s3c2410_dma_buffresult_t result) | 322 | enum s3c2410_dma_buffresult result) |
| 323 | { | 323 | { |
| 324 | pr_debug("callback_fn=%p, buf=%p, id=%p, size=%d, result=%d\n", | 324 | pr_debug("callback_fn=%p, buf=%p, id=%p, size=%d, result=%d\n", |
| 325 | chan->callback_fn, buf, buf->id, buf->size, result); | 325 | chan->callback_fn, buf, buf->id, buf->size, result); |
| @@ -334,7 +334,7 @@ s3c2410_dma_buffdone(s3c2410_dma_chan_t *chan, s3c2410_dma_buf_t *buf, | |||
| 334 | * start a dma channel going | 334 | * start a dma channel going |
| 335 | */ | 335 | */ |
| 336 | 336 | ||
| 337 | static int s3c2410_dma_start(s3c2410_dma_chan_t *chan) | 337 | static int s3c2410_dma_start(struct s3c2410_dma_chan *chan) |
| 338 | { | 338 | { |
| 339 | unsigned long tmp; | 339 | unsigned long tmp; |
| 340 | unsigned long flags; | 340 | unsigned long flags; |
| @@ -430,7 +430,7 @@ static int s3c2410_dma_start(s3c2410_dma_chan_t *chan) | |||
| 430 | */ | 430 | */ |
| 431 | 431 | ||
| 432 | static int | 432 | static int |
| 433 | s3c2410_dma_canload(s3c2410_dma_chan_t *chan) | 433 | s3c2410_dma_canload(struct s3c2410_dma_chan *chan) |
| 434 | { | 434 | { |
| 435 | if (chan->load_state == S3C2410_DMALOAD_NONE || | 435 | if (chan->load_state == S3C2410_DMALOAD_NONE || |
| 436 | chan->load_state == S3C2410_DMALOAD_1RUNNING) | 436 | chan->load_state == S3C2410_DMALOAD_1RUNNING) |
| @@ -460,8 +460,8 @@ s3c2410_dma_canload(s3c2410_dma_chan_t *chan) | |||
| 460 | int s3c2410_dma_enqueue(unsigned int channel, void *id, | 460 | int s3c2410_dma_enqueue(unsigned int channel, void *id, |
| 461 | dma_addr_t data, int size) | 461 | dma_addr_t data, int size) |
| 462 | { | 462 | { |
| 463 | s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; | 463 | struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; |
| 464 | s3c2410_dma_buf_t *buf; | 464 | struct s3c2410_dma_buf *buf; |
| 465 | unsigned long flags; | 465 | unsigned long flags; |
| 466 | 466 | ||
| 467 | check_channel(channel); | 467 | check_channel(channel); |
| @@ -540,7 +540,7 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id, | |||
| 540 | EXPORT_SYMBOL(s3c2410_dma_enqueue); | 540 | EXPORT_SYMBOL(s3c2410_dma_enqueue); |
| 541 | 541 | ||
| 542 | static inline void | 542 | static inline void |
| 543 | s3c2410_dma_freebuf(s3c2410_dma_buf_t *buf) | 543 | s3c2410_dma_freebuf(struct s3c2410_dma_buf *buf) |
| 544 | { | 544 | { |
| 545 | int magicok = (buf->magic == BUF_MAGIC); | 545 | int magicok = (buf->magic == BUF_MAGIC); |
| 546 | 546 | ||
| @@ -560,7 +560,7 @@ s3c2410_dma_freebuf(s3c2410_dma_buf_t *buf) | |||
| 560 | */ | 560 | */ |
| 561 | 561 | ||
| 562 | static inline void | 562 | static inline void |
| 563 | s3c2410_dma_lastxfer(s3c2410_dma_chan_t *chan) | 563 | s3c2410_dma_lastxfer(struct s3c2410_dma_chan *chan) |
| 564 | { | 564 | { |
| 565 | pr_debug("dma%d: s3c2410_dma_lastxfer: load_state %d\n", | 565 | pr_debug("dma%d: s3c2410_dma_lastxfer: load_state %d\n", |
| 566 | chan->number, chan->load_state); | 566 | chan->number, chan->load_state); |
| @@ -601,8 +601,8 @@ s3c2410_dma_lastxfer(s3c2410_dma_chan_t *chan) | |||
| 601 | static irqreturn_t | 601 | static irqreturn_t |
| 602 | s3c2410_dma_irq(int irq, void *devpw, struct pt_regs *regs) | 602 | s3c2410_dma_irq(int irq, void *devpw, struct pt_regs *regs) |
| 603 | { | 603 | { |
| 604 | s3c2410_dma_chan_t *chan = (s3c2410_dma_chan_t *)devpw; | 604 | struct s3c2410_dma_chan *chan = (struct s3c2410_dma_chan *)devpw; |
| 605 | s3c2410_dma_buf_t *buf; | 605 | struct s3c2410_dma_buf *buf; |
| 606 | 606 | ||
| 607 | buf = chan->curr; | 607 | buf = chan->curr; |
| 608 | 608 | ||
| @@ -731,10 +731,10 @@ s3c2410_dma_irq(int irq, void *devpw, struct pt_regs *regs) | |||
| 731 | * get control of an dma channel | 731 | * get control of an dma channel |
| 732 | */ | 732 | */ |
| 733 | 733 | ||
| 734 | int s3c2410_dma_request(unsigned int channel, s3c2410_dma_client_t *client, | 734 | int s3c2410_dma_request(unsigned int channel, struct s3c2410_dma_client *client, |
| 735 | void *dev) | 735 | void *dev) |
| 736 | { | 736 | { |
| 737 | s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; | 737 | struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; |
| 738 | unsigned long flags; | 738 | unsigned long flags; |
| 739 | int err; | 739 | int err; |
| 740 | 740 | ||
| @@ -807,9 +807,9 @@ EXPORT_SYMBOL(s3c2410_dma_request); | |||
| 807 | * allowed to go through. | 807 | * allowed to go through. |
| 808 | */ | 808 | */ |
| 809 | 809 | ||
| 810 | int s3c2410_dma_free(dmach_t channel, s3c2410_dma_client_t *client) | 810 | int s3c2410_dma_free(dmach_t channel, struct s3c2410_dma_client *client) |
| 811 | { | 811 | { |
| 812 | s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; | 812 | struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; |
| 813 | unsigned long flags; | 813 | unsigned long flags; |
| 814 | 814 | ||
| 815 | check_channel(channel); | 815 | check_channel(channel); |
| @@ -846,7 +846,7 @@ int s3c2410_dma_free(dmach_t channel, s3c2410_dma_client_t *client) | |||
| 846 | 846 | ||
| 847 | EXPORT_SYMBOL(s3c2410_dma_free); | 847 | EXPORT_SYMBOL(s3c2410_dma_free); |
| 848 | 848 | ||
| 849 | static int s3c2410_dma_dostop(s3c2410_dma_chan_t *chan) | 849 | static int s3c2410_dma_dostop(struct s3c2410_dma_chan *chan) |
| 850 | { | 850 | { |
| 851 | unsigned long tmp; | 851 | unsigned long tmp; |
| 852 | unsigned long flags; | 852 | unsigned long flags; |
| @@ -880,7 +880,7 @@ static int s3c2410_dma_dostop(s3c2410_dma_chan_t *chan) | |||
| 880 | return 0; | 880 | return 0; |
| 881 | } | 881 | } |
| 882 | 882 | ||
| 883 | void s3c2410_dma_waitforstop(s3c2410_dma_chan_t *chan) | 883 | void s3c2410_dma_waitforstop(struct s3c2410_dma_chan *chan) |
| 884 | { | 884 | { |
| 885 | unsigned long tmp; | 885 | unsigned long tmp; |
| 886 | unsigned int timeout = 0x10000; | 886 | unsigned int timeout = 0x10000; |
| @@ -901,9 +901,9 @@ void s3c2410_dma_waitforstop(s3c2410_dma_chan_t *chan) | |||
| 901 | * stop the channel, and remove all current and pending transfers | 901 | * stop the channel, and remove all current and pending transfers |
| 902 | */ | 902 | */ |
| 903 | 903 | ||
| 904 | static int s3c2410_dma_flush(s3c2410_dma_chan_t *chan) | 904 | static int s3c2410_dma_flush(struct s3c2410_dma_chan *chan) |
| 905 | { | 905 | { |
| 906 | s3c2410_dma_buf_t *buf, *next; | 906 | struct s3c2410_dma_buf *buf, *next; |
| 907 | unsigned long flags; | 907 | unsigned long flags; |
| 908 | 908 | ||
| 909 | pr_debug("%s: chan %p (%d)\n", __FUNCTION__, chan, chan->number); | 909 | pr_debug("%s: chan %p (%d)\n", __FUNCTION__, chan, chan->number); |
| @@ -958,7 +958,7 @@ static int s3c2410_dma_flush(s3c2410_dma_chan_t *chan) | |||
| 958 | } | 958 | } |
| 959 | 959 | ||
| 960 | int | 960 | int |
| 961 | s3c2410_dma_started(s3c2410_dma_chan_t *chan) | 961 | s3c2410_dma_started(struct s3c2410_dma_chan *chan) |
| 962 | { | 962 | { |
| 963 | unsigned long flags; | 963 | unsigned long flags; |
| 964 | 964 | ||
| @@ -995,9 +995,9 @@ s3c2410_dma_started(s3c2410_dma_chan_t *chan) | |||
| 995 | } | 995 | } |
| 996 | 996 | ||
| 997 | int | 997 | int |
| 998 | s3c2410_dma_ctrl(dmach_t channel, s3c2410_chan_op_t op) | 998 | s3c2410_dma_ctrl(dmach_t channel, enum s3c2410_chan_op op) |
| 999 | { | 999 | { |
| 1000 | s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; | 1000 | struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; |
| 1001 | 1001 | ||
| 1002 | check_channel(channel); | 1002 | check_channel(channel); |
| 1003 | 1003 | ||
| @@ -1046,7 +1046,7 @@ int s3c2410_dma_config(dmach_t channel, | |||
| 1046 | int xferunit, | 1046 | int xferunit, |
| 1047 | int dcon) | 1047 | int dcon) |
| 1048 | { | 1048 | { |
| 1049 | s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; | 1049 | struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; |
| 1050 | 1050 | ||
| 1051 | pr_debug("%s: chan=%d, xfer_unit=%d, dcon=%08x\n", | 1051 | pr_debug("%s: chan=%d, xfer_unit=%d, dcon=%08x\n", |
| 1052 | __FUNCTION__, channel, xferunit, dcon); | 1052 | __FUNCTION__, channel, xferunit, dcon); |
| @@ -1086,7 +1086,7 @@ EXPORT_SYMBOL(s3c2410_dma_config); | |||
| 1086 | 1086 | ||
| 1087 | int s3c2410_dma_setflags(dmach_t channel, unsigned int flags) | 1087 | int s3c2410_dma_setflags(dmach_t channel, unsigned int flags) |
| 1088 | { | 1088 | { |
| 1089 | s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; | 1089 | struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; |
| 1090 | 1090 | ||
| 1091 | check_channel(channel); | 1091 | check_channel(channel); |
| 1092 | 1092 | ||
| @@ -1106,7 +1106,7 @@ EXPORT_SYMBOL(s3c2410_dma_setflags); | |||
| 1106 | 1106 | ||
| 1107 | int s3c2410_dma_set_opfn(dmach_t channel, s3c2410_dma_opfn_t rtn) | 1107 | int s3c2410_dma_set_opfn(dmach_t channel, s3c2410_dma_opfn_t rtn) |
| 1108 | { | 1108 | { |
| 1109 | s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; | 1109 | struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; |
| 1110 | 1110 | ||
| 1111 | check_channel(channel); | 1111 | check_channel(channel); |
| 1112 | 1112 | ||
| @@ -1121,7 +1121,7 @@ EXPORT_SYMBOL(s3c2410_dma_set_opfn); | |||
| 1121 | 1121 | ||
| 1122 | int s3c2410_dma_set_buffdone_fn(dmach_t channel, s3c2410_dma_cbfn_t rtn) | 1122 | int s3c2410_dma_set_buffdone_fn(dmach_t channel, s3c2410_dma_cbfn_t rtn) |
| 1123 | { | 1123 | { |
| 1124 | s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; | 1124 | struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; |
| 1125 | 1125 | ||
| 1126 | check_channel(channel); | 1126 | check_channel(channel); |
| 1127 | 1127 | ||
| @@ -1149,11 +1149,11 @@ EXPORT_SYMBOL(s3c2410_dma_set_buffdone_fn); | |||
| 1149 | */ | 1149 | */ |
| 1150 | 1150 | ||
| 1151 | int s3c2410_dma_devconfig(int channel, | 1151 | int s3c2410_dma_devconfig(int channel, |
| 1152 | s3c2410_dmasrc_t source, | 1152 | enum s3c2410_dmasrc source, |
| 1153 | int hwcfg, | 1153 | int hwcfg, |
| 1154 | unsigned long devaddr) | 1154 | unsigned long devaddr) |
| 1155 | { | 1155 | { |
| 1156 | s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; | 1156 | struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; |
| 1157 | 1157 | ||
| 1158 | check_channel(channel); | 1158 | check_channel(channel); |
| 1159 | 1159 | ||
| @@ -1200,7 +1200,7 @@ EXPORT_SYMBOL(s3c2410_dma_devconfig); | |||
| 1200 | 1200 | ||
| 1201 | int s3c2410_dma_getposition(dmach_t channel, dma_addr_t *src, dma_addr_t *dst) | 1201 | int s3c2410_dma_getposition(dmach_t channel, dma_addr_t *src, dma_addr_t *dst) |
| 1202 | { | 1202 | { |
| 1203 | s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; | 1203 | struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; |
| 1204 | 1204 | ||
| 1205 | check_channel(channel); | 1205 | check_channel(channel); |
| 1206 | 1206 | ||
| @@ -1222,7 +1222,7 @@ EXPORT_SYMBOL(s3c2410_dma_getposition); | |||
| 1222 | 1222 | ||
| 1223 | static int s3c2410_dma_suspend(struct sys_device *dev, pm_message_t state) | 1223 | static int s3c2410_dma_suspend(struct sys_device *dev, pm_message_t state) |
| 1224 | { | 1224 | { |
| 1225 | s3c2410_dma_chan_t *cp = container_of(dev, s3c2410_dma_chan_t, dev); | 1225 | struct s3c2410_dma_chan *cp = container_of(dev, struct s3c2410_dma_chan, dev); |
| 1226 | 1226 | ||
| 1227 | printk(KERN_DEBUG "suspending dma channel %d\n", cp->number); | 1227 | printk(KERN_DEBUG "suspending dma channel %d\n", cp->number); |
| 1228 | 1228 | ||
| @@ -1262,7 +1262,7 @@ static struct sysdev_class dma_sysclass = { | |||
| 1262 | 1262 | ||
| 1263 | static void s3c2410_dma_cache_ctor(void *p, kmem_cache_t *c, unsigned long f) | 1263 | static void s3c2410_dma_cache_ctor(void *p, kmem_cache_t *c, unsigned long f) |
| 1264 | { | 1264 | { |
| 1265 | memset(p, 0, sizeof(s3c2410_dma_buf_t)); | 1265 | memset(p, 0, sizeof(struct s3c2410_dma_buf)); |
| 1266 | } | 1266 | } |
| 1267 | 1267 | ||
| 1268 | 1268 | ||
| @@ -1270,7 +1270,7 @@ static void s3c2410_dma_cache_ctor(void *p, kmem_cache_t *c, unsigned long f) | |||
| 1270 | 1270 | ||
| 1271 | static int __init s3c2410_init_dma(void) | 1271 | static int __init s3c2410_init_dma(void) |
| 1272 | { | 1272 | { |
| 1273 | s3c2410_dma_chan_t *cp; | 1273 | struct s3c2410_dma_chan *cp; |
| 1274 | int channel; | 1274 | int channel; |
| 1275 | int ret; | 1275 | int ret; |
| 1276 | 1276 | ||
| @@ -1288,7 +1288,7 @@ static int __init s3c2410_init_dma(void) | |||
| 1288 | goto err; | 1288 | goto err; |
| 1289 | } | 1289 | } |
| 1290 | 1290 | ||
| 1291 | dma_kmem = kmem_cache_create("dma_desc", sizeof(s3c2410_dma_buf_t), 0, | 1291 | dma_kmem = kmem_cache_create("dma_desc", sizeof(struct s3c2410_dma_buf), 0, |
| 1292 | SLAB_HWCACHE_ALIGN, | 1292 | SLAB_HWCACHE_ALIGN, |
| 1293 | s3c2410_dma_cache_ctor, NULL); | 1293 | s3c2410_dma_cache_ctor, NULL); |
| 1294 | 1294 | ||
| @@ -1301,7 +1301,7 @@ static int __init s3c2410_init_dma(void) | |||
| 1301 | for (channel = 0; channel < S3C2410_DMA_CHANNELS; channel++) { | 1301 | for (channel = 0; channel < S3C2410_DMA_CHANNELS; channel++) { |
| 1302 | cp = &s3c2410_chans[channel]; | 1302 | cp = &s3c2410_chans[channel]; |
| 1303 | 1303 | ||
| 1304 | memset(cp, 0, sizeof(s3c2410_dma_chan_t)); | 1304 | memset(cp, 0, sizeof(struct s3c2410_dma_chan)); |
| 1305 | 1305 | ||
| 1306 | /* dma channel irqs are in order.. */ | 1306 | /* dma channel irqs are in order.. */ |
| 1307 | cp->number = channel; | 1307 | cp->number = channel; |
diff --git a/arch/arm/mach-s3c2410/irq.c b/arch/arm/mach-s3c2410/irq.c index 6822dc7f7799..cd6139b35999 100644 --- a/arch/arm/mach-s3c2410/irq.c +++ b/arch/arm/mach-s3c2410/irq.c | |||
| @@ -86,7 +86,7 @@ unsigned long s3c_irqwake_intmask = 0xffffffffL; | |||
| 86 | unsigned long s3c_irqwake_eintallow = 0x0000fff0L; | 86 | unsigned long s3c_irqwake_eintallow = 0x0000fff0L; |
| 87 | unsigned long s3c_irqwake_eintmask = 0xffffffffL; | 87 | unsigned long s3c_irqwake_eintmask = 0xffffffffL; |
| 88 | 88 | ||
| 89 | static int | 89 | int |
| 90 | s3c_irq_wake(unsigned int irqno, unsigned int state) | 90 | s3c_irq_wake(unsigned int irqno, unsigned int state) |
| 91 | { | 91 | { |
| 92 | unsigned long irqbit = 1 << (irqno - IRQ_EINT0); | 92 | unsigned long irqbit = 1 << (irqno - IRQ_EINT0); |
| @@ -260,7 +260,7 @@ s3c_irqext_unmask(unsigned int irqno) | |||
| 260 | s3c_irq_unmask((irqno <= (IRQ_EINT7 - EXTINT_OFF)) ? IRQ_EINT4t7 : IRQ_EINT8t23); | 260 | s3c_irq_unmask((irqno <= (IRQ_EINT7 - EXTINT_OFF)) ? IRQ_EINT4t7 : IRQ_EINT8t23); |
| 261 | } | 261 | } |
| 262 | 262 | ||
| 263 | static int | 263 | int |
| 264 | s3c_irqext_type(unsigned int irq, unsigned int type) | 264 | s3c_irqext_type(unsigned int irq, unsigned int type) |
| 265 | { | 265 | { |
| 266 | void __iomem *extint_reg; | 266 | void __iomem *extint_reg; |
diff --git a/arch/arm/mach-s3c2410/irq.h b/arch/arm/mach-s3c2410/irq.h index 4abf0ca14e00..f7cc4c983de5 100644 --- a/arch/arm/mach-s3c2410/irq.h +++ b/arch/arm/mach-s3c2410/irq.h | |||
| @@ -97,3 +97,8 @@ s3c_irqsub_ack(unsigned int irqno, unsigned int parentmask, unsigned int group) | |||
| 97 | __raw_writel(parentmask, S3C2410_INTPND); | 97 | __raw_writel(parentmask, S3C2410_INTPND); |
| 98 | } | 98 | } |
| 99 | } | 99 | } |
| 100 | |||
| 101 | /* exported for use in arch/arm/mach-s3c2410 */ | ||
| 102 | |||
| 103 | extern int s3c_irq_wake(unsigned int irqno, unsigned int state); | ||
| 104 | extern int s3c_irqext_type(unsigned int irq, unsigned int type); | ||
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 947234df8160..2968fb235f95 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
| @@ -8,31 +8,6 @@ | |||
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | ||
| 12 | * Modifications: | ||
| 13 | * 14-Sep-2004 BJD USB power control | ||
| 14 | * 20-Aug-2004 BJD Added s3c2410_board struct | ||
| 15 | * 18-Aug-2004 BJD Added platform devices from default set | ||
| 16 | * 16-May-2003 BJD Created initial version | ||
| 17 | * 16-Aug-2003 BJD Fixed header files and copyright, added URL | ||
| 18 | * 05-Sep-2003 BJD Moved to v2.6 kernel | ||
| 19 | * 06-Jan-2003 BJD Updates for <arch/map.h> | ||
| 20 | * 18-Jan-2003 BJD Added serial port configuration | ||
| 21 | * 05-Oct-2004 BJD Power management code | ||
| 22 | * 04-Nov-2004 BJD Updated serial port clocks | ||
| 23 | * 04-Jan-2005 BJD New uart init call | ||
| 24 | * 10-Jan-2005 BJD Removed include of s3c2410.h | ||
| 25 | * 14-Jan-2005 BJD Add support for muitlple NAND devices | ||
| 26 | * 03-Mar-2005 BJD Ensured that bast-cpld.h is included | ||
| 27 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
| 28 | * 14-Mar-2005 BJD Updated for __iomem changes | ||
| 29 | * 22-Jun-2005 BJD Added DM9000 platform information | ||
| 30 | * 28-Jun-2005 BJD Moved pm functionality out to common code | ||
| 31 | * 17-Jul-2005 BJD Changed to platform device for SuperIO 16550s | ||
| 32 | * 25-Jul-2005 BJD Removed ASIX static mappings | ||
| 33 | * 27-Jul-2005 BJD Ensure maximum frequency of i2c bus | ||
| 34 | * 20-Sep-2005 BJD Added static to non-exported items | ||
| 35 | * 26-Oct-2005 BJD Added FB platform data | ||
| 36 | */ | 11 | */ |
| 37 | 12 | ||
| 38 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index aec431b2830a..8c895c077d22 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c | |||
| @@ -9,23 +9,6 @@ | |||
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | 11 | * |
| 12 | * Modifications: | ||
| 13 | * 16-May-2003 BJD Created initial version | ||
| 14 | * 16-Aug-2003 BJD Fixed header files and copyright, added URL | ||
| 15 | * 05-Sep-2003 BJD Moved to v2.6 kernel | ||
| 16 | * 06-Jan-2003 BJD Updates for <arch/map.h> | ||
| 17 | * 18-Jan-2003 BJD Added serial port configuration | ||
| 18 | * 17-Feb-2003 BJD Copied to mach-ipaq.c | ||
| 19 | * 21-Aug-2004 BJD Added struct s3c2410_board | ||
| 20 | * 04-Sep-2004 BJD Changed uart init, renamed ipaq_ -> h1940_ | ||
| 21 | * 18-Oct-2004 BJD Updated new board structure name | ||
| 22 | * 04-Nov-2004 BJD Change for new serial clock | ||
| 23 | * 04-Jan-2005 BJD Updated uart init call | ||
| 24 | * 10-Jan-2005 BJD Removed include of s3c2410.h | ||
| 25 | * 14-Jan-2005 BJD Added clock init | ||
| 26 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
| 27 | * 20-Sep-2005 BJD Added static to non-exported items | ||
| 28 | * 26-Oct-2005 BJD Changed name of fb init call | ||
| 29 | */ | 12 | */ |
| 30 | 13 | ||
| 31 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
diff --git a/arch/arm/mach-s3c2410/mach-rx3715.c b/arch/arm/mach-s3c2410/mach-rx3715.c index 306afc1d7cd3..23d7c052013c 100644 --- a/arch/arm/mach-s3c2410/mach-rx3715.c +++ b/arch/arm/mach-s3c2410/mach-rx3715.c | |||
| @@ -9,15 +9,6 @@ | |||
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | 11 | * |
| 12 | * Modifications: | ||
| 13 | * 16-Sep-2004 BJD Copied from mach-h1940.c | ||
| 14 | * 25-Oct-2004 BJD Updates for 2.6.10-rc1 | ||
| 15 | * 10-Jan-2005 BJD Removed include of s3c2410.h s3c2440.h | ||
| 16 | * 14-Jan-2005 BJD Added new clock init | ||
| 17 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
| 18 | * 14-Mar-2005 BJD Fixed __iomem warnings | ||
| 19 | * 20-Sep-2005 BJD Added static to non-exported items | ||
| 20 | * 31-Oct-2005 BJD Added LCD setup for framebuffer | ||
| 21 | */ | 12 | */ |
| 22 | 13 | ||
| 23 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
diff --git a/arch/arm/mach-s3c2410/mach-smdk2410.c b/arch/arm/mach-s3c2410/mach-smdk2410.c index 25f7e9f4dcee..b3b0171d5052 100644 --- a/arch/arm/mach-s3c2410/mach-smdk2410.c +++ b/arch/arm/mach-s3c2410/mach-smdk2410.c | |||
| @@ -27,10 +27,6 @@ | |||
| 27 | * derived from linux/arch/arm/mach-s3c2410/mach-bast.c, written by | 27 | * derived from linux/arch/arm/mach-s3c2410/mach-bast.c, written by |
| 28 | * Ben Dooks <ben@simtec.co.uk> | 28 | * Ben Dooks <ben@simtec.co.uk> |
| 29 | * | 29 | * |
| 30 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
| 31 | * 20-Sep-2005 BJD Added static to non-exported items | ||
| 32 | * 01-Apr-2006 BJD Moved init code to common smdk | ||
| 33 | * | ||
| 34 | ***********************************************************************/ | 30 | ***********************************************************************/ |
| 35 | 31 | ||
| 36 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
diff --git a/arch/arm/mach-s3c2410/mach-smdk2413.c b/arch/arm/mach-s3c2410/mach-smdk2413.c index b7ef7d3c54a9..3a4ca7f6f7b9 100644 --- a/arch/arm/mach-s3c2410/mach-smdk2413.c +++ b/arch/arm/mach-s3c2410/mach-smdk2413.c | |||
| @@ -112,7 +112,20 @@ static void __init smdk2413_machine_init(void) | |||
| 112 | smdk_machine_init(); | 112 | smdk_machine_init(); |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | MACHINE_START(S3C2413, "SMDK2413") | 115 | MACHINE_START(S3C2413, "S3C2413") |
| 116 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | ||
| 117 | .phys_io = S3C2410_PA_UART, | ||
| 118 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | ||
| 119 | .boot_params = S3C2410_SDRAM_PA + 0x100, | ||
| 120 | |||
| 121 | .fixup = smdk2413_fixup, | ||
| 122 | .init_irq = s3c24xx_init_irq, | ||
| 123 | .map_io = smdk2413_map_io, | ||
| 124 | .init_machine = smdk2413_machine_init, | ||
| 125 | .timer = &s3c24xx_timer, | ||
| 126 | MACHINE_END | ||
| 127 | |||
| 128 | MACHINE_START(SMDK2413, "SMDK2413") | ||
| 116 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 129 | /* Maintainer: Ben Dooks <ben@fluff.org> */ |
| 117 | .phys_io = S3C2410_PA_UART, | 130 | .phys_io = S3C2410_PA_UART, |
| 118 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 131 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c index d18efb279d3d..a0d7692cdb2b 100644 --- a/arch/arm/mach-s3c2410/mach-vr1000.c +++ b/arch/arm/mach-s3c2410/mach-vr1000.c | |||
| @@ -10,25 +10,6 @@ | |||
| 10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
| 11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
| 12 | * | 12 | * |
| 13 | * Modifications: | ||
| 14 | * 14-Sep-2004 BJD USB Power control | ||
| 15 | * 04-Sep-2004 BJD Added new uart init, and io init | ||
| 16 | * 21-Aug-2004 BJD Added struct s3c2410_board | ||
| 17 | * 06-Aug-2004 BJD Fixed call to time initialisation | ||
| 18 | * 05-Apr-2004 BJD Copied to make mach-vr1000.c | ||
| 19 | * 18-Oct-2004 BJD Updated board struct | ||
| 20 | * 04-Nov-2004 BJD Clock and serial configuration update | ||
| 21 | * | ||
| 22 | * 04-Jan-2005 BJD Updated uart init call | ||
| 23 | * 10-Jan-2005 BJD Removed include of s3c2410.h | ||
| 24 | * 14-Jan-2005 BJD Added clock init | ||
| 25 | * 15-Jan-2005 BJD Add serial port device definition | ||
| 26 | * 20-Jan-2005 BJD Use UPF_IOREMAP for ports | ||
| 27 | * 10-Feb-2005 BJD Added power-off capability | ||
| 28 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
| 29 | * 14-Mar-2006 BJD void __iomem fixes | ||
| 30 | * 22-Jun-2006 BJD Added DM9000 platform information | ||
| 31 | * 20-Sep-2005 BJD Added static to non-exported items | ||
| 32 | */ | 13 | */ |
| 33 | 14 | ||
| 34 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
diff --git a/arch/arm/mach-s3c2410/s3c2400-gpio.c b/arch/arm/mach-s3c2410/s3c2400-gpio.c index 5127f39fa9bf..f2a78175a70a 100644 --- a/arch/arm/mach-s3c2410/s3c2400-gpio.c +++ b/arch/arm/mach-s3c2410/s3c2400-gpio.c | |||
| @@ -17,10 +17,7 @@ | |||
| 17 | * You should have received a copy of the GNU General Public License | 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software | 18 | * along with this program; if not, write to the Free Software |
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 20 | * | 20 | */ |
| 21 | * Changelog | ||
| 22 | * 15-Jan-2006 LCVR Splitted from gpio.c, adding support for the S3C2400 | ||
| 23 | */ | ||
| 24 | 21 | ||
| 25 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
| 26 | #include <linux/init.h> | 23 | #include <linux/init.h> |
diff --git a/arch/arm/mach-s3c2410/s3c2410.h b/arch/arm/mach-s3c2410/s3c2410.h index 73f1a2474a61..fbed084f26d0 100644 --- a/arch/arm/mach-s3c2410/s3c2410.h +++ b/arch/arm/mach-s3c2410/s3c2410.h | |||
| @@ -9,14 +9,6 @@ | |||
| 9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
| 11 | * | 11 | * |
| 12 | * Modifications: | ||
| 13 | * 18-Aug-2004 BJD Created initial version | ||
| 14 | * 20-Aug-2004 BJD Added s3c2410_board struct | ||
| 15 | * 04-Sep-2004 BJD Added s3c2410_init_uarts() call | ||
| 16 | * 17-Oct-2004 BJD Moved board out to cpu | ||
| 17 | * 04-Jan-2005 BJD Changed uart init | ||
| 18 | * 10-Jan-2005 BJD Removed timer to cpu.h, moved 2410 specific bits here | ||
| 19 | * 14-Jan-2005 BJD Added s3c2410_init_clocks call | ||
| 20 | */ | 12 | */ |
| 21 | 13 | ||
| 22 | #ifdef CONFIG_CPU_S3C2410 | 14 | #ifdef CONFIG_CPU_S3C2410 |
diff --git a/arch/arm/mach-s3c2410/s3c2412-irq.c b/arch/arm/mach-s3c2410/s3c2412-irq.c new file mode 100644 index 000000000000..c80ec93dfea9 --- /dev/null +++ b/arch/arm/mach-s3c2410/s3c2412-irq.c | |||
| @@ -0,0 +1,130 @@ | |||
| 1 | /* linux/arch/arm/mach-s3c2412/s3c2412-irq.c | ||
| 2 | * | ||
| 3 | * Copyright (c) 2006 Simtec Electronics | ||
| 4 | * Ben Dooks <ben@simtec.co.uk> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | * | ||
| 20 | */ | ||
| 21 | |||
| 22 | #include <linux/init.h> | ||
| 23 | #include <linux/module.h> | ||
| 24 | #include <linux/interrupt.h> | ||
| 25 | #include <linux/ioport.h> | ||
| 26 | #include <linux/ptrace.h> | ||
| 27 | #include <linux/sysdev.h> | ||
| 28 | |||
| 29 | #include <asm/hardware.h> | ||
| 30 | #include <asm/irq.h> | ||
| 31 | #include <asm/io.h> | ||
| 32 | |||
| 33 | #include <asm/mach/irq.h> | ||
| 34 | |||
| 35 | #include <asm/arch/regs-irq.h> | ||
| 36 | #include <asm/arch/regs-gpio.h> | ||
| 37 | |||
| 38 | #include "cpu.h" | ||
| 39 | #include "irq.h" | ||
| 40 | |||
| 41 | /* the s3c2412 changes the behaviour of IRQ_EINT0 through IRQ_EINT3 by | ||
| 42 | * having them turn up in both the INT* and the EINT* registers. Whilst | ||
| 43 | * both show the status, they both now need to be acked when the IRQs | ||
| 44 | * go off. | ||
| 45 | */ | ||
| 46 | |||
| 47 | static void | ||
| 48 | s3c2412_irq_mask(unsigned int irqno) | ||
| 49 | { | ||
| 50 | unsigned long bitval = 1UL << (irqno - IRQ_EINT0); | ||
| 51 | unsigned long mask; | ||
| 52 | |||
| 53 | mask = __raw_readl(S3C2410_INTMSK); | ||
| 54 | __raw_writel(mask | bitval, S3C2410_INTMSK); | ||
| 55 | |||
| 56 | mask = __raw_readl(S3C2412_EINTMASK); | ||
| 57 | __raw_writel(mask | bitval, S3C2412_EINTMASK); | ||
| 58 | } | ||
| 59 | |||
| 60 | static inline void | ||
| 61 | s3c2412_irq_ack(unsigned int irqno) | ||
| 62 | { | ||
| 63 | unsigned long bitval = 1UL << (irqno - IRQ_EINT0); | ||
| 64 | |||
| 65 | __raw_writel(bitval, S3C2412_EINTPEND); | ||
| 66 | __raw_writel(bitval, S3C2410_SRCPND); | ||
| 67 | __raw_writel(bitval, S3C2410_INTPND); | ||
| 68 | } | ||
| 69 | |||
| 70 | static inline void | ||
| 71 | s3c2412_irq_maskack(unsigned int irqno) | ||
| 72 | { | ||
| 73 | unsigned long bitval = 1UL << (irqno - IRQ_EINT0); | ||
| 74 | unsigned long mask; | ||
| 75 | |||
| 76 | mask = __raw_readl(S3C2410_INTMSK); | ||
| 77 | __raw_writel(mask|bitval, S3C2410_INTMSK); | ||
| 78 | |||
| 79 | mask = __raw_readl(S3C2412_EINTMASK); | ||
| 80 | __raw_writel(mask | bitval, S3C2412_EINTMASK); | ||
| 81 | |||
| 82 | __raw_writel(bitval, S3C2412_EINTPEND); | ||
| 83 | __raw_writel(bitval, S3C2410_SRCPND); | ||
| 84 | __raw_writel(bitval, S3C2410_INTPND); | ||
| 85 | } | ||
| 86 | |||
| 87 | static void | ||
| 88 | s3c2412_irq_unmask(unsigned int irqno) | ||
| 89 | { | ||
| 90 | unsigned long bitval = 1UL << (irqno - IRQ_EINT0); | ||
| 91 | unsigned long mask; | ||
| 92 | |||
| 93 | mask = __raw_readl(S3C2412_EINTMASK); | ||
| 94 | __raw_writel(mask & ~bitval, S3C2412_EINTMASK); | ||
| 95 | |||
| 96 | mask = __raw_readl(S3C2410_INTMSK); | ||
| 97 | __raw_writel(mask & ~bitval, S3C2410_INTMSK); | ||
| 98 | } | ||
| 99 | |||
| 100 | static struct irqchip s3c2412_irq_eint0t4 = { | ||
| 101 | .ack = s3c2412_irq_ack, | ||
| 102 | .mask = s3c2412_irq_mask, | ||
| 103 | .unmask = s3c2412_irq_unmask, | ||
| 104 | .set_wake = s3c_irq_wake, | ||
| 105 | .set_type = s3c_irqext_type, | ||
| 106 | }; | ||
| 107 | |||
| 108 | static int s3c2412_irq_add(struct sys_device *sysdev) | ||
| 109 | { | ||
| 110 | unsigned int irqno; | ||
| 111 | |||
| 112 | for (irqno = IRQ_EINT0; irqno <= IRQ_EINT3; irqno++) { | ||
| 113 | set_irq_chip(irqno, &s3c2412_irq_eint0t4); | ||
| 114 | set_irq_handler(irqno, do_edge_IRQ); | ||
| 115 | set_irq_flags(irqno, IRQF_VALID); | ||
| 116 | } | ||
| 117 | |||
| 118 | return 0; | ||
| 119 | } | ||
| 120 | |||
| 121 | static struct sysdev_driver s3c2412_irq_driver = { | ||
| 122 | .add = s3c2412_irq_add, | ||
| 123 | }; | ||
| 124 | |||
| 125 | static int s3c2412_irq_init(void) | ||
| 126 | { | ||
| 127 | return sysdev_driver_register(&s3c2412_sysclass, &s3c2412_irq_driver); | ||
| 128 | } | ||
| 129 | |||
| 130 | arch_initcall(s3c2412_irq_init); | ||
diff --git a/arch/arm/mach-s3c2410/s3c2440-irq.c b/arch/arm/mach-s3c2410/s3c2440-irq.c index acfe3870727b..1667ba1fa43d 100644 --- a/arch/arm/mach-s3c2410/s3c2440-irq.c +++ b/arch/arm/mach-s3c2410/s3c2440-irq.c | |||
| @@ -17,9 +17,6 @@ | |||
| 17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 19 | * | 19 | * |
| 20 | * Changelog: | ||
| 21 | * 25-Jul-2005 BJD Split from irq.c | ||
| 22 | * | ||
| 23 | */ | 20 | */ |
| 24 | 21 | ||
| 25 | #include <linux/init.h> | 22 | #include <linux/init.h> |
diff --git a/arch/arm/mach-s3c2410/s3c244x-irq.c b/arch/arm/mach-s3c2410/s3c244x-irq.c index 2aadca1ce7eb..44c5affa9b89 100644 --- a/arch/arm/mach-s3c2410/s3c244x-irq.c +++ b/arch/arm/mach-s3c2410/s3c244x-irq.c | |||
| @@ -17,9 +17,6 @@ | |||
| 17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 19 | * | 19 | * |
| 20 | * Changelog: | ||
| 21 | * 25-Jul-2005 BJD Split from irq.c | ||
| 22 | * | ||
| 23 | */ | 20 | */ |
| 24 | 21 | ||
| 25 | #include <linux/init.h> | 22 | #include <linux/init.h> |
| @@ -122,21 +119,24 @@ static int s3c244x_irq_add(struct sys_device *sysdev) | |||
| 122 | return 0; | 119 | return 0; |
| 123 | } | 120 | } |
| 124 | 121 | ||
| 125 | static struct sysdev_driver s3c244x_irq_driver = { | 122 | static struct sysdev_driver s3c2440_irq_driver = { |
| 126 | .add = s3c244x_irq_add, | 123 | .add = s3c244x_irq_add, |
| 127 | }; | 124 | }; |
| 128 | 125 | ||
| 129 | static int s3c2440_irq_init(void) | 126 | static int s3c2440_irq_init(void) |
| 130 | { | 127 | { |
| 131 | return sysdev_driver_register(&s3c2440_sysclass, &s3c244x_irq_driver); | 128 | return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_irq_driver); |
| 132 | } | 129 | } |
| 133 | 130 | ||
| 134 | arch_initcall(s3c2440_irq_init); | 131 | arch_initcall(s3c2440_irq_init); |
| 135 | 132 | ||
| 133 | static struct sysdev_driver s3c2442_irq_driver = { | ||
| 134 | .add = s3c244x_irq_add, | ||
| 135 | }; | ||
| 136 | 136 | ||
| 137 | static int s3c2442_irq_init(void) | 137 | static int s3c2442_irq_init(void) |
| 138 | { | 138 | { |
| 139 | return sysdev_driver_register(&s3c2442_sysclass, &s3c244x_irq_driver); | 139 | return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_irq_driver); |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | arch_initcall(s3c2442_irq_init); | 142 | arch_initcall(s3c2442_irq_init); |
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c index b103e56806bd..d438ce41cdd5 100644 --- a/arch/arm/mm/flush.c +++ b/arch/arm/mm/flush.c | |||
| @@ -87,6 +87,32 @@ void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsig | |||
| 87 | if (cache_is_vipt_aliasing()) | 87 | if (cache_is_vipt_aliasing()) |
| 88 | flush_pfn_alias(pfn, user_addr); | 88 | flush_pfn_alias(pfn, user_addr); |
| 89 | } | 89 | } |
| 90 | |||
| 91 | void flush_ptrace_access(struct vm_area_struct *vma, struct page *page, | ||
| 92 | unsigned long uaddr, void *kaddr, | ||
| 93 | unsigned long len, int write) | ||
| 94 | { | ||
| 95 | if (cache_is_vivt()) { | ||
| 96 | if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) { | ||
| 97 | unsigned long addr = (unsigned long)kaddr; | ||
| 98 | __cpuc_coherent_kern_range(addr, addr + len); | ||
| 99 | } | ||
| 100 | return; | ||
| 101 | } | ||
| 102 | |||
| 103 | if (cache_is_vipt_aliasing()) { | ||
| 104 | flush_pfn_alias(page_to_pfn(page), uaddr); | ||
| 105 | return; | ||
| 106 | } | ||
| 107 | |||
| 108 | /* VIPT non-aliasing cache */ | ||
| 109 | if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask) && | ||
| 110 | vma->vm_flags | VM_EXEC) { | ||
| 111 | unsigned long addr = (unsigned long)kaddr; | ||
| 112 | /* only flushing the kernel mapping on non-aliasing VIPT */ | ||
| 113 | __cpuc_coherent_kern_range(addr, addr + len); | ||
| 114 | } | ||
| 115 | } | ||
| 90 | #else | 116 | #else |
| 91 | #define flush_pfn_alias(pfn,vaddr) do { } while (0) | 117 | #define flush_pfn_alias(pfn,vaddr) do { } while (0) |
| 92 | #endif | 118 | #endif |
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S index 1e89d4080474..44a7a652d625 100644 --- a/arch/arm/mm/proc-arm926.S +++ b/arch/arm/mm/proc-arm926.S | |||
| @@ -480,7 +480,7 @@ __arm926_proc_info: | |||
| 480 | b __arm926_setup | 480 | b __arm926_setup |
| 481 | .long cpu_arch_name | 481 | .long cpu_arch_name |
| 482 | .long cpu_elf_name | 482 | .long cpu_elf_name |
| 483 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_JAVA | 483 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_VFP|HWCAP_EDSP|HWCAP_JAVA |
| 484 | .long cpu_arm926_name | 484 | .long cpu_arm926_name |
| 485 | .long arm926_processor_functions | 485 | .long arm926_processor_functions |
| 486 | .long v4wbi_tlb_fns | 486 | .long v4wbi_tlb_fns |
diff --git a/arch/arm/vfp/vfp.h b/arch/arm/vfp/vfp.h index 5fbdf81a8aaf..96fdf30f6a3b 100644 --- a/arch/arm/vfp/vfp.h +++ b/arch/arm/vfp/vfp.h | |||
| @@ -156,7 +156,7 @@ struct vfp_single { | |||
| 156 | }; | 156 | }; |
| 157 | 157 | ||
| 158 | extern s32 vfp_get_float(unsigned int reg); | 158 | extern s32 vfp_get_float(unsigned int reg); |
| 159 | extern void vfp_put_float(unsigned int reg, s32 val); | 159 | extern void vfp_put_float(s32 val, unsigned int reg); |
| 160 | 160 | ||
| 161 | /* | 161 | /* |
| 162 | * VFP_SINGLE_MANTISSA_BITS - number of bits in the mantissa | 162 | * VFP_SINGLE_MANTISSA_BITS - number of bits in the mantissa |
| @@ -267,7 +267,7 @@ struct vfp_double { | |||
| 267 | */ | 267 | */ |
| 268 | #define VFP_REG_ZERO 16 | 268 | #define VFP_REG_ZERO 16 |
| 269 | extern u64 vfp_get_double(unsigned int reg); | 269 | extern u64 vfp_get_double(unsigned int reg); |
| 270 | extern void vfp_put_double(unsigned int reg, u64 val); | 270 | extern void vfp_put_double(u64 val, unsigned int reg); |
| 271 | 271 | ||
| 272 | #define VFP_DOUBLE_MANTISSA_BITS (52) | 272 | #define VFP_DOUBLE_MANTISSA_BITS (52) |
| 273 | #define VFP_DOUBLE_EXPONENT_BITS (11) | 273 | #define VFP_DOUBLE_EXPONENT_BITS (11) |
| @@ -341,12 +341,6 @@ static inline int vfp_double_type(struct vfp_double *s) | |||
| 341 | 341 | ||
| 342 | u32 vfp_double_normaliseround(int dd, struct vfp_double *vd, u32 fpscr, u32 exceptions, const char *func); | 342 | u32 vfp_double_normaliseround(int dd, struct vfp_double *vd, u32 fpscr, u32 exceptions, const char *func); |
| 343 | 343 | ||
| 344 | /* | ||
| 345 | * System registers | ||
| 346 | */ | ||
| 347 | extern u32 vfp_get_sys(unsigned int reg); | ||
| 348 | extern void vfp_put_sys(unsigned int reg, u32 val); | ||
| 349 | |||
| 350 | u32 vfp_estimate_sqrt_significand(u32 exponent, u32 significand); | 344 | u32 vfp_estimate_sqrt_significand(u32 exponent, u32 significand); |
| 351 | 345 | ||
| 352 | /* | 346 | /* |
diff --git a/arch/arm/vfp/vfpdouble.c b/arch/arm/vfp/vfpdouble.c index 04bd3425b29b..add48e36c2dc 100644 --- a/arch/arm/vfp/vfpdouble.c +++ b/arch/arm/vfp/vfpdouble.c | |||
| @@ -195,7 +195,7 @@ u32 vfp_double_normaliseround(int dd, struct vfp_double *vd, u32 fpscr, u32 exce | |||
| 195 | s64 d = vfp_double_pack(vd); | 195 | s64 d = vfp_double_pack(vd); |
| 196 | pr_debug("VFP: %s: d(d%d)=%016llx exceptions=%08x\n", func, | 196 | pr_debug("VFP: %s: d(d%d)=%016llx exceptions=%08x\n", func, |
| 197 | dd, d, exceptions); | 197 | dd, d, exceptions); |
| 198 | vfp_put_double(dd, d); | 198 | vfp_put_double(d, dd); |
| 199 | } | 199 | } |
| 200 | return exceptions; | 200 | return exceptions; |
| 201 | } | 201 | } |
| @@ -250,19 +250,19 @@ vfp_propagate_nan(struct vfp_double *vdd, struct vfp_double *vdn, | |||
| 250 | */ | 250 | */ |
| 251 | static u32 vfp_double_fabs(int dd, int unused, int dm, u32 fpscr) | 251 | static u32 vfp_double_fabs(int dd, int unused, int dm, u32 fpscr) |
| 252 | { | 252 | { |
| 253 | vfp_put_double(dd, vfp_double_packed_abs(vfp_get_double(dm))); | 253 | vfp_put_double(vfp_double_packed_abs(vfp_get_double(dm)), dd); |
| 254 | return 0; | 254 | return 0; |
| 255 | } | 255 | } |
| 256 | 256 | ||
| 257 | static u32 vfp_double_fcpy(int dd, int unused, int dm, u32 fpscr) | 257 | static u32 vfp_double_fcpy(int dd, int unused, int dm, u32 fpscr) |
| 258 | { | 258 | { |
| 259 | vfp_put_double(dd, vfp_get_double(dm)); | 259 | vfp_put_double(vfp_get_double(dm), dd); |
| 260 | return 0; | 260 | return 0; |
| 261 | } | 261 | } |
| 262 | 262 | ||
| 263 | static u32 vfp_double_fneg(int dd, int unused, int dm, u32 fpscr) | 263 | static u32 vfp_double_fneg(int dd, int unused, int dm, u32 fpscr) |
| 264 | { | 264 | { |
| 265 | vfp_put_double(dd, vfp_double_packed_negate(vfp_get_double(dm))); | 265 | vfp_put_double(vfp_double_packed_negate(vfp_get_double(dm)), dd); |
| 266 | return 0; | 266 | return 0; |
| 267 | } | 267 | } |
| 268 | 268 | ||
| @@ -287,7 +287,7 @@ static u32 vfp_double_fsqrt(int dd, int unused, int dm, u32 fpscr) | |||
| 287 | vdp = &vfp_double_default_qnan; | 287 | vdp = &vfp_double_default_qnan; |
| 288 | ret = FPSCR_IOC; | 288 | ret = FPSCR_IOC; |
| 289 | } | 289 | } |
| 290 | vfp_put_double(dd, vfp_double_pack(vdp)); | 290 | vfp_put_double(vfp_double_pack(vdp), dd); |
| 291 | return ret; | 291 | return ret; |
| 292 | } | 292 | } |
| 293 | 293 | ||
| @@ -476,7 +476,7 @@ static u32 vfp_double_fcvts(int sd, int unused, int dm, u32 fpscr) | |||
| 476 | return vfp_single_normaliseround(sd, &vsd, fpscr, exceptions, "fcvts"); | 476 | return vfp_single_normaliseround(sd, &vsd, fpscr, exceptions, "fcvts"); |
| 477 | 477 | ||
| 478 | pack_nan: | 478 | pack_nan: |
| 479 | vfp_put_float(sd, vfp_single_pack(&vsd)); | 479 | vfp_put_float(vfp_single_pack(&vsd), sd); |
| 480 | return exceptions; | 480 | return exceptions; |
| 481 | } | 481 | } |
| 482 | 482 | ||
| @@ -573,7 +573,7 @@ static u32 vfp_double_ftoui(int sd, int unused, int dm, u32 fpscr) | |||
| 573 | 573 | ||
| 574 | pr_debug("VFP: ftoui: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions); | 574 | pr_debug("VFP: ftoui: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions); |
| 575 | 575 | ||
| 576 | vfp_put_float(sd, d); | 576 | vfp_put_float(d, sd); |
| 577 | 577 | ||
| 578 | return exceptions; | 578 | return exceptions; |
| 579 | } | 579 | } |
| @@ -648,7 +648,7 @@ static u32 vfp_double_ftosi(int sd, int unused, int dm, u32 fpscr) | |||
| 648 | 648 | ||
| 649 | pr_debug("VFP: ftosi: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions); | 649 | pr_debug("VFP: ftosi: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions); |
| 650 | 650 | ||
| 651 | vfp_put_float(sd, (s32)d); | 651 | vfp_put_float((s32)d, sd); |
| 652 | 652 | ||
| 653 | return exceptions; | 653 | return exceptions; |
| 654 | } | 654 | } |
| @@ -1084,7 +1084,7 @@ static u32 vfp_double_fdiv(int dd, int dn, int dm, u32 fpscr) | |||
| 1084 | vdn_nan: | 1084 | vdn_nan: |
| 1085 | exceptions = vfp_propagate_nan(&vdd, &vdn, &vdm, fpscr); | 1085 | exceptions = vfp_propagate_nan(&vdd, &vdn, &vdm, fpscr); |
| 1086 | pack: | 1086 | pack: |
| 1087 | vfp_put_double(dd, vfp_double_pack(&vdd)); | 1087 | vfp_put_double(vfp_double_pack(&vdd), dd); |
| 1088 | return exceptions; | 1088 | return exceptions; |
| 1089 | 1089 | ||
| 1090 | vdm_nan: | 1090 | vdm_nan: |
| @@ -1104,7 +1104,7 @@ static u32 vfp_double_fdiv(int dd, int dn, int dm, u32 fpscr) | |||
| 1104 | goto pack; | 1104 | goto pack; |
| 1105 | 1105 | ||
| 1106 | invalid: | 1106 | invalid: |
| 1107 | vfp_put_double(dd, vfp_double_pack(&vfp_double_default_qnan)); | 1107 | vfp_put_double(vfp_double_pack(&vfp_double_default_qnan), dd); |
| 1108 | return FPSCR_IOC; | 1108 | return FPSCR_IOC; |
| 1109 | } | 1109 | } |
| 1110 | 1110 | ||
diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S index eb683cd77163..e51e6679c402 100644 --- a/arch/arm/vfp/vfphw.S +++ b/arch/arm/vfp/vfphw.S | |||
| @@ -178,12 +178,12 @@ vfp_get_float: | |||
| 178 | 178 | ||
| 179 | .globl vfp_put_float | 179 | .globl vfp_put_float |
| 180 | vfp_put_float: | 180 | vfp_put_float: |
| 181 | add pc, pc, r0, lsl #3 | 181 | add pc, pc, r1, lsl #3 |
| 182 | mov r0, r0 | 182 | mov r0, r0 |
| 183 | .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 | 183 | .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 |
| 184 | mcr p10, 0, r1, c\dr, c0, 0 @ fmsr r0, s0 | 184 | mcr p10, 0, r0, c\dr, c0, 0 @ fmsr r0, s0 |
| 185 | mov pc, lr | 185 | mov pc, lr |
| 186 | mcr p10, 0, r1, c\dr, c0, 4 @ fmsr r0, s1 | 186 | mcr p10, 0, r0, c\dr, c0, 4 @ fmsr r0, s1 |
| 187 | mov pc, lr | 187 | mov pc, lr |
| 188 | .endr | 188 | .endr |
| 189 | 189 | ||
| @@ -203,9 +203,9 @@ vfp_get_double: | |||
| 203 | 203 | ||
| 204 | .globl vfp_put_double | 204 | .globl vfp_put_double |
| 205 | vfp_put_double: | 205 | vfp_put_double: |
| 206 | add pc, pc, r0, lsl #3 | 206 | add pc, pc, r2, lsl #3 |
| 207 | mov r0, r0 | 207 | mov r0, r0 |
| 208 | .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 | 208 | .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 |
| 209 | fmdrr d\dr, r1, r2 | 209 | fmdrr d\dr, r0, r1 |
| 210 | mov pc, lr | 210 | mov pc, lr |
| 211 | .endr | 211 | .endr |
diff --git a/arch/arm/vfp/vfpsingle.c b/arch/arm/vfp/vfpsingle.c index 78d7cac5f36b..8f6c179cafbe 100644 --- a/arch/arm/vfp/vfpsingle.c +++ b/arch/arm/vfp/vfpsingle.c | |||
| @@ -200,7 +200,7 @@ u32 vfp_single_normaliseround(int sd, struct vfp_single *vs, u32 fpscr, u32 exce | |||
| 200 | s32 d = vfp_single_pack(vs); | 200 | s32 d = vfp_single_pack(vs); |
| 201 | pr_debug("VFP: %s: d(s%d)=%08x exceptions=%08x\n", func, | 201 | pr_debug("VFP: %s: d(s%d)=%08x exceptions=%08x\n", func, |
| 202 | sd, d, exceptions); | 202 | sd, d, exceptions); |
| 203 | vfp_put_float(sd, d); | 203 | vfp_put_float(d, sd); |
| 204 | } | 204 | } |
| 205 | 205 | ||
| 206 | return exceptions; | 206 | return exceptions; |
| @@ -257,19 +257,19 @@ vfp_propagate_nan(struct vfp_single *vsd, struct vfp_single *vsn, | |||
| 257 | */ | 257 | */ |
| 258 | static u32 vfp_single_fabs(int sd, int unused, s32 m, u32 fpscr) | 258 | static u32 vfp_single_fabs(int sd, int unused, s32 m, u32 fpscr) |
| 259 | { | 259 | { |
| 260 | vfp_put_float(sd, vfp_single_packed_abs(m)); | 260 | vfp_put_float(vfp_single_packed_abs(m), sd); |
| 261 | return 0; | 261 | return 0; |
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | static u32 vfp_single_fcpy(int sd, int unused, s32 m, u32 fpscr) | 264 | static u32 vfp_single_fcpy(int sd, int unused, s32 m, u32 fpscr) |
| 265 | { | 265 | { |
| 266 | vfp_put_float(sd, m); | 266 | vfp_put_float(m, sd); |
| 267 | return 0; | 267 | return 0; |
| 268 | } | 268 | } |
| 269 | 269 | ||
| 270 | static u32 vfp_single_fneg(int sd, int unused, s32 m, u32 fpscr) | 270 | static u32 vfp_single_fneg(int sd, int unused, s32 m, u32 fpscr) |
| 271 | { | 271 | { |
| 272 | vfp_put_float(sd, vfp_single_packed_negate(m)); | 272 | vfp_put_float(vfp_single_packed_negate(m), sd); |
| 273 | return 0; | 273 | return 0; |
| 274 | } | 274 | } |
| 275 | 275 | ||
| @@ -333,7 +333,7 @@ static u32 vfp_single_fsqrt(int sd, int unused, s32 m, u32 fpscr) | |||
| 333 | vsp = &vfp_single_default_qnan; | 333 | vsp = &vfp_single_default_qnan; |
| 334 | ret = FPSCR_IOC; | 334 | ret = FPSCR_IOC; |
| 335 | } | 335 | } |
| 336 | vfp_put_float(sd, vfp_single_pack(vsp)); | 336 | vfp_put_float(vfp_single_pack(vsp), sd); |
| 337 | return ret; | 337 | return ret; |
| 338 | } | 338 | } |
| 339 | 339 | ||
| @@ -517,7 +517,7 @@ static u32 vfp_single_fcvtd(int dd, int unused, s32 m, u32 fpscr) | |||
| 517 | return vfp_double_normaliseround(dd, &vdd, fpscr, exceptions, "fcvtd"); | 517 | return vfp_double_normaliseround(dd, &vdd, fpscr, exceptions, "fcvtd"); |
| 518 | 518 | ||
| 519 | pack_nan: | 519 | pack_nan: |
| 520 | vfp_put_double(dd, vfp_double_pack(&vdd)); | 520 | vfp_put_double(vfp_double_pack(&vdd), dd); |
| 521 | return exceptions; | 521 | return exceptions; |
| 522 | } | 522 | } |
| 523 | 523 | ||
| @@ -613,7 +613,7 @@ static u32 vfp_single_ftoui(int sd, int unused, s32 m, u32 fpscr) | |||
| 613 | 613 | ||
| 614 | pr_debug("VFP: ftoui: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions); | 614 | pr_debug("VFP: ftoui: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions); |
| 615 | 615 | ||
| 616 | vfp_put_float(sd, d); | 616 | vfp_put_float(d, sd); |
| 617 | 617 | ||
| 618 | return exceptions; | 618 | return exceptions; |
| 619 | } | 619 | } |
| @@ -692,7 +692,7 @@ static u32 vfp_single_ftosi(int sd, int unused, s32 m, u32 fpscr) | |||
| 692 | 692 | ||
| 693 | pr_debug("VFP: ftosi: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions); | 693 | pr_debug("VFP: ftosi: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions); |
| 694 | 694 | ||
| 695 | vfp_put_float(sd, (s32)d); | 695 | vfp_put_float((s32)d, sd); |
| 696 | 696 | ||
| 697 | return exceptions; | 697 | return exceptions; |
| 698 | } | 698 | } |
| @@ -1127,7 +1127,7 @@ static u32 vfp_single_fdiv(int sd, int sn, s32 m, u32 fpscr) | |||
| 1127 | vsn_nan: | 1127 | vsn_nan: |
| 1128 | exceptions = vfp_propagate_nan(&vsd, &vsn, &vsm, fpscr); | 1128 | exceptions = vfp_propagate_nan(&vsd, &vsn, &vsm, fpscr); |
| 1129 | pack: | 1129 | pack: |
| 1130 | vfp_put_float(sd, vfp_single_pack(&vsd)); | 1130 | vfp_put_float(vfp_single_pack(&vsd), sd); |
| 1131 | return exceptions; | 1131 | return exceptions; |
| 1132 | 1132 | ||
| 1133 | vsm_nan: | 1133 | vsm_nan: |
| @@ -1147,7 +1147,7 @@ static u32 vfp_single_fdiv(int sd, int sn, s32 m, u32 fpscr) | |||
| 1147 | goto pack; | 1147 | goto pack; |
| 1148 | 1148 | ||
| 1149 | invalid: | 1149 | invalid: |
| 1150 | vfp_put_float(sd, vfp_single_pack(&vfp_single_default_qnan)); | 1150 | vfp_put_float(vfp_single_pack(&vfp_single_default_qnan), sd); |
| 1151 | return FPSCR_IOC; | 1151 | return FPSCR_IOC; |
| 1152 | } | 1152 | } |
| 1153 | 1153 | ||
