Commit 2c66fa7e authored by Linus Torvalds's avatar Linus Torvalds

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

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 5507/1: support R_ARM_MOVW_ABS_NC and MOVT_ABS relocation types
  [ARM] 5506/1: davinci: DMA_32BIT_MASK --> DMA_BIT_MASK(32)
  i.MX31: Disable CPU_32v6K in mx3_defconfig.
  mx3fb: Fix compilation with CONFIG_PM
  mx27ads: move PBC mapping out of vmalloc space
  MXC: remove BUG_ON in interrupt handler
  mx31: remove mx31moboard_defconfig
  ARM: ARCH_MXC should select HAVE_CLK
  mxc : BUG in imx_dma_request
  mxc : Clean up properly when imx_dma_free() used without imx_dma_disable()
  [ARM] mv78xx0: update defconfig
  [ARM] orion5x: update defconfig
  [ARM] Kirkwood: update defconfig
  [ARM] Kconfig typo fix:  "PXA930" -> "CPU_PXA930".
  [ARM] S3C2412: Add missing cache flush in suspend code
  [ARM] S3C: Add UDIVSLOT support for newer UARTS
  [ARM] S3C64XX: Add S3C64XX_PA_IIS{0,1} to <mach/map.h>
parents 60db4027 ae51e609
...@@ -454,6 +454,7 @@ config ARCH_MXC ...@@ -454,6 +454,7 @@ config ARCH_MXC
select ARCH_MTD_XIP select ARCH_MTD_XIP
select GENERIC_GPIO select GENERIC_GPIO
select ARCH_REQUIRE_GPIOLIB select ARCH_REQUIRE_GPIOLIB
select HAVE_CLK
help help
Support for Freescale MXC/iMX-based family of processors Support for Freescale MXC/iMX-based family of processors
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -197,7 +197,7 @@ CONFIG_MXC_PWM=y ...@@ -197,7 +197,7 @@ CONFIG_MXC_PWM=y
# #
CONFIG_CPU_32=y CONFIG_CPU_32=y
CONFIG_CPU_V6=y CONFIG_CPU_V6=y
CONFIG_CPU_32v6K=y # CONFIG_CPU_32v6K is not set
CONFIG_CPU_32v6=y CONFIG_CPU_32v6=y
CONFIG_CPU_ABRT_EV6=y CONFIG_CPU_ABRT_EV6=y
CONFIG_CPU_PABRT_NOIFAR=y CONFIG_CPU_PABRT_NOIFAR=y
......
This diff is collapsed.
...@@ -45,13 +45,15 @@ typedef struct user_fp elf_fpregset_t; ...@@ -45,13 +45,15 @@ typedef struct user_fp elf_fpregset_t;
#define EF_ARM_HASENTRY 0x00000002 /* All */ #define EF_ARM_HASENTRY 0x00000002 /* All */
#define EF_ARM_RELEXEC 0x00000001 /* All */ #define EF_ARM_RELEXEC 0x00000001 /* All */
#define R_ARM_NONE 0 #define R_ARM_NONE 0
#define R_ARM_PC24 1 #define R_ARM_PC24 1
#define R_ARM_ABS32 2 #define R_ARM_ABS32 2
#define R_ARM_CALL 28 #define R_ARM_CALL 28
#define R_ARM_JUMP24 29 #define R_ARM_JUMP24 29
#define R_ARM_V4BX 40 #define R_ARM_V4BX 40
#define R_ARM_PREL31 42 #define R_ARM_PREL31 42
#define R_ARM_MOVW_ABS_NC 43
#define R_ARM_MOVT_ABS 44
/* /*
* These are used to set parameters in the core dumps. * These are used to set parameters in the core dumps.
......
...@@ -169,6 +169,21 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, ...@@ -169,6 +169,21 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex,
*(u32 *)loc = offset & 0x7fffffff; *(u32 *)loc = offset & 0x7fffffff;
break; break;
case R_ARM_MOVW_ABS_NC:
case R_ARM_MOVT_ABS:
offset = *(u32 *)loc;
offset = ((offset & 0xf0000) >> 4) | (offset & 0xfff);
offset = (offset ^ 0x8000) - 0x8000;
offset += sym->st_value;
if (ELF32_R_TYPE(rel->r_info) == R_ARM_MOVT_ABS)
offset >>= 16;
*(u32 *)loc &= 0xfff0f000;
*(u32 *)loc |= ((offset & 0xf000) << 4) |
(offset & 0x0fff);
break;
default: default:
printk(KERN_ERR "%s: unknown relocation: %u\n", printk(KERN_ERR "%s: unknown relocation: %u\n",
module->name, ELF32_R_TYPE(rel->r_info)); module->name, ELF32_R_TYPE(rel->r_info));
......
...@@ -211,7 +211,7 @@ static struct resource ide_resources[] = { ...@@ -211,7 +211,7 @@ static struct resource ide_resources[] = {
}, },
}; };
static u64 ide_dma_mask = DMA_32BIT_MASK; static u64 ide_dma_mask = DMA_BIT_MASK(32);
static struct platform_device ide_dev = { static struct platform_device ide_dev = {
.name = "palm_bk3710", .name = "palm_bk3710",
...@@ -220,7 +220,7 @@ static struct platform_device ide_dev = { ...@@ -220,7 +220,7 @@ static struct platform_device ide_dev = {
.num_resources = ARRAY_SIZE(ide_resources), .num_resources = ARRAY_SIZE(ide_resources),
.dev = { .dev = {
.dma_mask = &ide_dma_mask, .dma_mask = &ide_dma_mask,
.coherent_dma_mask = DMA_32BIT_MASK, .coherent_dma_mask = DMA_BIT_MASK(32),
}, },
}; };
......
...@@ -289,12 +289,12 @@ config MACH_LITTLETON ...@@ -289,12 +289,12 @@ config MACH_LITTLETON
config MACH_TAVOREVB config MACH_TAVOREVB
bool "PXA930 Evaluation Board (aka TavorEVB)" bool "PXA930 Evaluation Board (aka TavorEVB)"
select PXA3xx select PXA3xx
select PXA930 select CPU_PXA930
config MACH_SAAR config MACH_SAAR
bool "PXA930 Handheld Platform (aka SAAR)" bool "PXA930 Handheld Platform (aka SAAR)"
select PXA3xx select PXA3xx
select PXA930 select CPU_PXA930
config MACH_ARMCORE config MACH_ARMCORE
bool "CompuLab CM-X255/CM-X270 modules" bool "CompuLab CM-X255/CM-X270 modules"
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/cacheflush.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <mach/regs-power.h> #include <mach/regs-power.h>
...@@ -39,6 +40,8 @@ static void s3c2412_cpu_suspend(void) ...@@ -39,6 +40,8 @@ static void s3c2412_cpu_suspend(void)
{ {
unsigned long tmp; unsigned long tmp;
flush_cache_all();
/* set our standby method to sleep */ /* set our standby method to sleep */
tmp = __raw_readl(S3C2412_PWRCFG); tmp = __raw_readl(S3C2412_PWRCFG);
......
...@@ -40,6 +40,8 @@ ...@@ -40,6 +40,8 @@
#define S3C64XX_PA_FB (0x77100000) #define S3C64XX_PA_FB (0x77100000)
#define S3C64XX_PA_SYSCON (0x7E00F000) #define S3C64XX_PA_SYSCON (0x7E00F000)
#define S3C64XX_PA_IIS0 (0x7F002000)
#define S3C64XX_PA_IIS1 (0x7F003000)
#define S3C64XX_PA_TIMER (0x7F006000) #define S3C64XX_PA_TIMER (0x7F006000)
#define S3C64XX_PA_IIC0 (0x7F004000) #define S3C64XX_PA_IIC0 (0x7F004000)
#define S3C64XX_PA_IIC1 (0x7F00F000) #define S3C64XX_PA_IIC1 (0x7F00F000)
......
...@@ -693,12 +693,15 @@ int imx_dma_request(int channel, const char *name) ...@@ -693,12 +693,15 @@ int imx_dma_request(int channel, const char *name)
local_irq_restore(flags); local_irq_restore(flags);
return -EBUSY; return -EBUSY;
} }
memset(imxdma, 0, sizeof(imxdma));
imxdma->name = name;
local_irq_restore(flags); /* request_irq() can block */
#ifdef CONFIG_ARCH_MX2 #ifdef CONFIG_ARCH_MX2
ret = request_irq(MXC_INT_DMACH0 + channel, dma_irq_handler, 0, "DMA", ret = request_irq(MXC_INT_DMACH0 + channel, dma_irq_handler, 0, "DMA",
NULL); NULL);
if (ret) { if (ret) {
local_irq_restore(flags); imxdma->name = NULL;
printk(KERN_CRIT "Can't register IRQ %d for DMA channel %d\n", printk(KERN_CRIT "Can't register IRQ %d for DMA channel %d\n",
MXC_INT_DMACH0 + channel, channel); MXC_INT_DMACH0 + channel, channel);
return ret; return ret;
...@@ -708,13 +711,6 @@ int imx_dma_request(int channel, const char *name) ...@@ -708,13 +711,6 @@ int imx_dma_request(int channel, const char *name)
imxdma->watchdog.data = channel; imxdma->watchdog.data = channel;
#endif #endif
imxdma->name = name;
imxdma->irq_handler = NULL;
imxdma->err_handler = NULL;
imxdma->data = NULL;
imxdma->sg = NULL;
local_irq_restore(flags);
return ret; return ret;
} }
EXPORT_SYMBOL(imx_dma_request); EXPORT_SYMBOL(imx_dma_request);
...@@ -737,10 +733,7 @@ void imx_dma_free(int channel) ...@@ -737,10 +733,7 @@ void imx_dma_free(int channel)
local_irq_save(flags); local_irq_save(flags);
/* Disable interrupts */ /* Disable interrupts */
__raw_writel(__raw_readl(DMA_BASE + DMA_DIMR) | (1 << channel), imx_dma_disable(channel);
DMA_BASE + DMA_DIMR);
__raw_writel(__raw_readl(DMA_BASE + DMA_CCR(channel)) & ~CCR_CEN,
DMA_BASE + DMA_CCR(channel));
imxdma->name = NULL; imxdma->name = NULL;
#ifdef CONFIG_ARCH_MX2 #ifdef CONFIG_ARCH_MX2
......
...@@ -124,7 +124,7 @@ static void mx3_gpio_irq_handler(u32 irq, struct irq_desc *desc) ...@@ -124,7 +124,7 @@ static void mx3_gpio_irq_handler(u32 irq, struct irq_desc *desc)
irq_stat = __raw_readl(port->base + GPIO_ISR) & irq_stat = __raw_readl(port->base + GPIO_ISR) &
__raw_readl(port->base + GPIO_IMR); __raw_readl(port->base + GPIO_IMR);
BUG_ON(!irq_stat);
mxc_gpio_irq_handler(port, irq_stat); mxc_gpio_irq_handler(port, irq_stat);
} }
#endif #endif
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
/* /*
* Base address of PBC controller, CS4 * Base address of PBC controller, CS4
*/ */
#define PBC_BASE_ADDRESS 0xEB000000 #define PBC_BASE_ADDRESS 0xf4300000
#define PBC_REG_ADDR(offset) (void __force __iomem *) \ #define PBC_REG_ADDR(offset) (void __force __iomem *) \
(PBC_BASE_ADDRESS + (offset)) (PBC_BASE_ADDRESS + (offset))
......
...@@ -102,6 +102,7 @@ static struct s3c24xx_uart_info s3c6400_uart_inf = { ...@@ -102,6 +102,7 @@ static struct s3c24xx_uart_info s3c6400_uart_inf = {
.name = "Samsung S3C6400 UART", .name = "Samsung S3C6400 UART",
.type = PORT_S3C6400, .type = PORT_S3C6400,
.fifosize = 64, .fifosize = 64,
.has_divslot = 1,
.rx_fifomask = S3C2440_UFSTAT_RXMASK, .rx_fifomask = S3C2440_UFSTAT_RXMASK,
.rx_fifoshift = S3C2440_UFSTAT_RXSHIFT, .rx_fifoshift = S3C2440_UFSTAT_RXSHIFT,
.rx_fifofull = S3C2440_UFSTAT_RXFULL, .rx_fifofull = S3C2440_UFSTAT_RXFULL,
......
...@@ -508,6 +508,7 @@ s3c24xx_serial_setsource(struct uart_port *port, struct s3c24xx_uart_clksrc *c) ...@@ -508,6 +508,7 @@ s3c24xx_serial_setsource(struct uart_port *port, struct s3c24xx_uart_clksrc *c)
struct baud_calc { struct baud_calc {
struct s3c24xx_uart_clksrc *clksrc; struct s3c24xx_uart_clksrc *clksrc;
unsigned int calc; unsigned int calc;
unsigned int divslot;
unsigned int quot; unsigned int quot;
struct clk *src; struct clk *src;
}; };
...@@ -517,6 +518,7 @@ static int s3c24xx_serial_calcbaud(struct baud_calc *calc, ...@@ -517,6 +518,7 @@ static int s3c24xx_serial_calcbaud(struct baud_calc *calc,
struct s3c24xx_uart_clksrc *clksrc, struct s3c24xx_uart_clksrc *clksrc,
unsigned int baud) unsigned int baud)
{ {
struct s3c24xx_uart_port *ourport = to_ourport(port);
unsigned long rate; unsigned long rate;
calc->src = clk_get(port->dev, clksrc->name); calc->src = clk_get(port->dev, clksrc->name);
...@@ -527,8 +529,24 @@ static int s3c24xx_serial_calcbaud(struct baud_calc *calc, ...@@ -527,8 +529,24 @@ static int s3c24xx_serial_calcbaud(struct baud_calc *calc,
rate /= clksrc->divisor; rate /= clksrc->divisor;
calc->clksrc = clksrc; calc->clksrc = clksrc;
calc->quot = (rate + (8 * baud)) / (16 * baud);
calc->calc = (rate / (calc->quot * 16)); if (ourport->info->has_divslot) {
unsigned long div = rate / baud;
/* The UDIVSLOT register on the newer UARTs allows us to
* get a divisor adjustment of 1/16th on the baud clock.
*
* We don't keep the UDIVSLOT value (the 16ths we calculated
* by not multiplying the baud by 16) as it is easy enough
* to recalculate.
*/
calc->quot = div / 16;
calc->calc = rate / div;
} else {
calc->quot = (rate + (8 * baud)) / (16 * baud);
calc->calc = (rate / (calc->quot * 16));
}
calc->quot--; calc->quot--;
return 1; return 1;
...@@ -611,6 +629,30 @@ static unsigned int s3c24xx_serial_getclk(struct uart_port *port, ...@@ -611,6 +629,30 @@ static unsigned int s3c24xx_serial_getclk(struct uart_port *port,
return best->quot; return best->quot;
} }
/* udivslot_table[]
*
* This table takes the fractional value of the baud divisor and gives
* the recommended setting for the UDIVSLOT register.
*/
static u16 udivslot_table[16] = {
[0] = 0x0000,
[1] = 0x0080,
[2] = 0x0808,
[3] = 0x0888,
[4] = 0x2222,
[5] = 0x4924,
[6] = 0x4A52,
[7] = 0x54AA,
[8] = 0x5555,
[9] = 0xD555,
[10] = 0xD5D5,
[11] = 0xDDD5,
[12] = 0xDDDD,
[13] = 0xDFDD,
[14] = 0xDFDF,
[15] = 0xFFDF,
};
static void s3c24xx_serial_set_termios(struct uart_port *port, static void s3c24xx_serial_set_termios(struct uart_port *port,
struct ktermios *termios, struct ktermios *termios,
struct ktermios *old) struct ktermios *old)
...@@ -623,6 +665,7 @@ static void s3c24xx_serial_set_termios(struct uart_port *port, ...@@ -623,6 +665,7 @@ static void s3c24xx_serial_set_termios(struct uart_port *port,
unsigned int baud, quot; unsigned int baud, quot;
unsigned int ulcon; unsigned int ulcon;
unsigned int umcon; unsigned int umcon;
unsigned int udivslot = 0;
/* /*
* We don't support modem control lines. * We don't support modem control lines.
...@@ -644,6 +687,7 @@ static void s3c24xx_serial_set_termios(struct uart_port *port, ...@@ -644,6 +687,7 @@ static void s3c24xx_serial_set_termios(struct uart_port *port,
/* check to see if we need to change clock source */ /* check to see if we need to change clock source */
if (ourport->clksrc != clksrc || ourport->baudclk != clk) { if (ourport->clksrc != clksrc || ourport->baudclk != clk) {
dbg("selecting clock %p\n", clk);
s3c24xx_serial_setsource(port, clksrc); s3c24xx_serial_setsource(port, clksrc);
if (ourport->baudclk != NULL && !IS_ERR(ourport->baudclk)) { if (ourport->baudclk != NULL && !IS_ERR(ourport->baudclk)) {
...@@ -658,6 +702,13 @@ static void s3c24xx_serial_set_termios(struct uart_port *port, ...@@ -658,6 +702,13 @@ static void s3c24xx_serial_set_termios(struct uart_port *port,
ourport->baudclk_rate = clk ? clk_get_rate(clk) : 0; ourport->baudclk_rate = clk ? clk_get_rate(clk) : 0;
} }
if (ourport->info->has_divslot) {
unsigned int div = ourport->baudclk_rate / baud;
udivslot = udivslot_table[div & 15];
dbg("udivslot = %04x (div %d)\n", udivslot, div & 15);
}
switch (termios->c_cflag & CSIZE) { switch (termios->c_cflag & CSIZE) {
case CS5: case CS5:
dbg("config: 5bits/char\n"); dbg("config: 5bits/char\n");
...@@ -697,12 +748,16 @@ static void s3c24xx_serial_set_termios(struct uart_port *port, ...@@ -697,12 +748,16 @@ static void s3c24xx_serial_set_termios(struct uart_port *port,
spin_lock_irqsave(&port->lock, flags); spin_lock_irqsave(&port->lock, flags);
dbg("setting ulcon to %08x, brddiv to %d\n", ulcon, quot); dbg("setting ulcon to %08x, brddiv to %d, udivslot %08x\n",
ulcon, quot, udivslot);
wr_regl(port, S3C2410_ULCON, ulcon); wr_regl(port, S3C2410_ULCON, ulcon);
wr_regl(port, S3C2410_UBRDIV, quot); wr_regl(port, S3C2410_UBRDIV, quot);
wr_regl(port, S3C2410_UMCON, umcon); wr_regl(port, S3C2410_UMCON, umcon);
if (ourport->info->has_divslot)
wr_regl(port, S3C2443_DIVSLOT, udivslot);
dbg("uart: ulcon = 0x%08x, ucon = 0x%08x, ufcon = 0x%08x\n", dbg("uart: ulcon = 0x%08x, ucon = 0x%08x, ufcon = 0x%08x\n",
rd_regl(port, S3C2410_ULCON), rd_regl(port, S3C2410_ULCON),
rd_regl(port, S3C2410_UCON), rd_regl(port, S3C2410_UCON),
......
...@@ -21,6 +21,10 @@ struct s3c24xx_uart_info { ...@@ -21,6 +21,10 @@ struct s3c24xx_uart_info {
unsigned long tx_fifoshift; unsigned long tx_fifoshift;
unsigned long tx_fifofull; unsigned long tx_fifofull;
/* uart port features */
unsigned int has_divslot:1;
/* clock source control */ /* clock source control */
int (*get_clksrc)(struct uart_port *, struct s3c24xx_uart_clksrc *clk); int (*get_clksrc)(struct uart_port *, struct s3c24xx_uart_clksrc *clk);
......
...@@ -1152,11 +1152,11 @@ static struct fb_ops mx3fb_ops = { ...@@ -1152,11 +1152,11 @@ static struct fb_ops mx3fb_ops = {
*/ */
static int mx3fb_suspend(struct platform_device *pdev, pm_message_t state) static int mx3fb_suspend(struct platform_device *pdev, pm_message_t state)
{ {
struct mx3fb_data *drv_data = platform_get_drvdata(pdev); struct mx3fb_data *mx3fb = platform_get_drvdata(pdev);
struct mx3fb_info *mx3_fbi = drv_data->fbi->par; struct mx3fb_info *mx3_fbi = mx3fb->fbi->par;
acquire_console_sem(); acquire_console_sem();
fb_set_suspend(drv_data->fbi, 1); fb_set_suspend(mx3fb->fbi, 1);
release_console_sem(); release_console_sem();
if (mx3_fbi->blank == FB_BLANK_UNBLANK) { if (mx3_fbi->blank == FB_BLANK_UNBLANK) {
...@@ -1172,16 +1172,16 @@ static int mx3fb_suspend(struct platform_device *pdev, pm_message_t state) ...@@ -1172,16 +1172,16 @@ static int mx3fb_suspend(struct platform_device *pdev, pm_message_t state)
*/ */
static int mx3fb_resume(struct platform_device *pdev) static int mx3fb_resume(struct platform_device *pdev)
{ {
struct mx3fb_data *drv_data = platform_get_drvdata(pdev); struct mx3fb_data *mx3fb = platform_get_drvdata(pdev);
struct mx3fb_info *mx3_fbi = drv_data->fbi->par; struct mx3fb_info *mx3_fbi = mx3fb->fbi->par;
if (mx3_fbi->blank == FB_BLANK_UNBLANK) { if (mx3_fbi->blank == FB_BLANK_UNBLANK) {
sdc_enable_channel(mx3_fbi); sdc_enable_channel(mx3_fbi);
sdc_set_brightness(mx3fb, drv_data->backlight_level); sdc_set_brightness(mx3fb, mx3fb->backlight_level);
} }
acquire_console_sem(); acquire_console_sem();
fb_set_suspend(drv_data->fbi, 0); fb_set_suspend(mx3fb->fbi, 0);
release_console_sem(); release_console_sem();
return 0; return 0;
......
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