Commit e1ff5fe0 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 91d7f4e3 9878e2f8
...@@ -84,9 +84,6 @@ config ARCH_CLPS711X ...@@ -84,9 +84,6 @@ config ARCH_CLPS711X
config ARCH_CO285 config ARCH_CO285
bool "Co-EBSA285" bool "Co-EBSA285"
config ARCH_PXA
bool "PXA2xx-based"
config ARCH_EBSA110 config ARCH_EBSA110
bool "EBSA-110" bool "EBSA-110"
help help
...@@ -126,6 +123,9 @@ config ARCH_L7200 ...@@ -126,6 +123,9 @@ config ARCH_L7200
If you have any questions or comments about the Linux kernel port If you have any questions or comments about the Linux kernel port
to this board, send e-mail to sjhill@cotw.com. to this board, send e-mail to sjhill@cotw.com.
config ARCH_PXA
bool "PXA2xx-based"
config ARCH_RPC config ARCH_RPC
bool "RiscPC" bool "RiscPC"
help help
...@@ -135,9 +135,6 @@ config ARCH_RPC ...@@ -135,9 +135,6 @@ config ARCH_RPC
config ARCH_SA1100 config ARCH_SA1100
bool "SA1100-based" bool "SA1100-based"
config ARCH_SHARK
bool "Shark"
config ARCH_S3C2410 config ARCH_S3C2410
bool "Samsung S3C2410" bool "Samsung S3C2410"
help help
...@@ -145,8 +142,8 @@ config ARCH_S3C2410 ...@@ -145,8 +142,8 @@ config ARCH_S3C2410
BAST (http://www.simtec.co.uk/products/EB110ITX/), the IPAQ 1940 or BAST (http://www.simtec.co.uk/products/EB110ITX/), the IPAQ 1940 or
the Samsung SMDK2410 development board (and derviatives). the Samsung SMDK2410 development board (and derviatives).
config ARCH_OMAP config ARCH_SHARK
bool "TI OMAP" bool "Shark"
config ARCH_LH7A40X config ARCH_LH7A40X
bool "Sharp LH7A40X" bool "Sharp LH7A40X"
...@@ -156,6 +153,9 @@ config ARCH_LH7A40X ...@@ -156,6 +153,9 @@ config ARCH_LH7A40X
core with a wide array of integrated devices for core with a wide array of integrated devices for
hand-held and low-power applications. hand-held and low-power applications.
config ARCH_OMAP
bool "TI OMAP"
config ARCH_VERSATILE_PB config ARCH_VERSATILE_PB
bool "Versatile PB" bool "Versatile PB"
help help
......
...@@ -100,6 +100,7 @@ find_dmabounce_dev(struct device *dev) ...@@ -100,6 +100,7 @@ find_dmabounce_dev(struct device *dev)
if (d->dev == dev) if (d->dev == dev)
return d; return d;
} }
return NULL;
} }
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include <asm/elf.h> #include <asm/elf.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
unsigned int vram_size; unsigned int vram_size;
......
...@@ -19,8 +19,6 @@ ...@@ -19,8 +19,6 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/mach-types.h>
static void xs80200_irq_mask (unsigned int irq) static void xs80200_irq_mask (unsigned int irq)
{ {
long INTCTL; long INTCTL;
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/mach-types.h>
extern void xs80200_irq_mask(unsigned int); extern void xs80200_irq_mask(unsigned int);
extern void xs80200_irq_unmask(unsigned int); extern void xs80200_irq_unmask(unsigned int);
extern void xs80200_init_irq(void); extern void xs80200_init_irq(void);
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/mach-types.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
static unsigned long iop321_gettimeoffset(void) static unsigned long iop321_gettimeoffset(void)
......
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/mach-types.h>
extern void iop310_init_irq(void); extern void iop310_init_irq(void);
extern void iop310_irq_demux(unsigned int, struct irqdesc *, struct pt_regs *); extern void iop310_irq_demux(unsigned int, struct irqdesc *, struct pt_regs *);
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/mach-types.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
static void iq80310_write_timer (u_long val) static void iq80310_write_timer (u_long val)
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <asm/page.h> #include <asm/page.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach-types.h>
/* /*
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <asm/page.h> #include <asm/page.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach-types.h>
#ifdef CONFIG_IOP310_MU #ifdef CONFIG_IOP310_MU
#include "message.h" #include "message.h"
......
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/mach-types.h>
static void xs80200_irq_mask (unsigned int irq) static void xs80200_irq_mask (unsigned int irq)
{ {
unsigned long intctl; unsigned long intctl;
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/mach-types.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/irq.h> #include <asm/irq.h>
......
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/mach-types.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
......
...@@ -104,6 +104,7 @@ static struct platform_device pxamci_device = { ...@@ -104,6 +104,7 @@ static struct platform_device pxamci_device = {
.id = 0, .id = 0,
.dev = { .dev = {
.dma_mask = &pxamci_dmamask, .dma_mask = &pxamci_dmamask,
.coherent_dma_mask = 0xffffffff,
}, },
.num_resources = ARRAY_SIZE(pxamci_resources), .num_resources = ARRAY_SIZE(pxamci_resources),
.resource = pxamci_resources, .resource = pxamci_resources,
......
...@@ -11,11 +11,12 @@ ...@@ -11,11 +11,12 @@
* it under the terms of the GNU General Public License version 2 as * it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
#include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/major.h> #include <linux/major.h>
#include <linux/fs.h> #include <linux/fb.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <asm/setup.h> #include <asm/setup.h>
...@@ -29,11 +30,22 @@ ...@@ -29,11 +30,22 @@
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <asm/arch/udc.h> #include <asm/arch/udc.h>
#include <asm/arch/pxafb.h>
#include <asm/hardware/sa1111.h> #include <asm/hardware/sa1111.h>
#include "generic.h" #include "generic.h"
void lubbock_set_misc_wr(unsigned int mask, unsigned int set)
{
unsigned long flags;
local_irq_save(flags);
LUB_MISC_WR = (LUB_MISC_WR & ~mask) | (set & mask);
local_irq_restore(flags);
}
EXPORT_SYMBOL(lubbock_set_misc_wr);
static unsigned long lubbock_irq_enabled; static unsigned long lubbock_irq_enabled;
static void lubbock_mask_irq(unsigned int irq) static void lubbock_mask_irq(unsigned int irq)
...@@ -148,9 +160,29 @@ static struct platform_device *devices[] __initdata = { ...@@ -148,9 +160,29 @@ static struct platform_device *devices[] __initdata = {
&smc91x_device, &smc91x_device,
}; };
static struct pxafb_mach_info sharp_lm8v31 __initdata = {
.pixclock = 270000,
.xres = 640,
.yres = 480,
.bpp = 16,
.hsync_len = 1,
.left_margin = 3,
.right_margin = 3,
.vsync_len = 1,
.upper_margin = 0,
.lower_margin = 0,
.sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
.cmap_greyscale = 0,
.cmap_inverse = 0,
.cmap_static = 0,
.lccr0 = LCCR0_SDS,
.lccr3 = LCCR3_PCP | LCCR3_Acb(255),
};
static void __init lubbock_init(void) static void __init lubbock_init(void)
{ {
pxa_set_udc_info(&udc_info); pxa_set_udc_info(&udc_info);
set_pxa_fb_info(&sharp_lm8v31);
(void) platform_add_devices(devices, ARRAY_SIZE(devices)); (void) platform_add_devices(devices, ARRAY_SIZE(devices));
} }
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/mach-types.h>
#include <asm/arch/regs-clock.h> #include <asm/arch/regs-clock.h>
#include <asm/arch/regs-serial.h> #include <asm/arch/regs-serial.h>
......
...@@ -45,7 +45,6 @@ static irqreturn_t ps2_rxint(int irq, void *dev_id, struct pt_regs *regs) ...@@ -45,7 +45,6 @@ static irqreturn_t ps2_rxint(int irq, void *dev_id, struct pt_regs *regs)
{ {
struct ps2if *ps2if = dev_id; struct ps2if *ps2if = dev_id;
unsigned int scancode, flag, status; unsigned int scancode, flag, status;
int handled = IRQ_NONE;
status = sa1111_readl(ps2if->base + SA1111_PS2STAT); status = sa1111_readl(ps2if->base + SA1111_PS2STAT);
while (status & PS2STAT_RXF) { while (status & PS2STAT_RXF) {
...@@ -63,11 +62,9 @@ static irqreturn_t ps2_rxint(int irq, void *dev_id, struct pt_regs *regs) ...@@ -63,11 +62,9 @@ static irqreturn_t ps2_rxint(int irq, void *dev_id, struct pt_regs *regs)
serio_interrupt(&ps2if->io, scancode, flag, regs); serio_interrupt(&ps2if->io, scancode, flag, regs);
status = sa1111_readl(ps2if->base + SA1111_PS2STAT); status = sa1111_readl(ps2if->base + SA1111_PS2STAT);
handled = IRQ_HANDLED;
} }
return handled; return IRQ_HANDLED;
} }
/* /*
......
...@@ -20,9 +20,11 @@ ...@@ -20,9 +20,11 @@
#include <linux/device.h> #include <linux/device.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/delay.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/hardware/sa1111.h> #include <asm/hardware/sa1111.h>
#include <asm/mach-types.h>
#include "sa1111_generic.h" #include "sa1111_generic.h"
...@@ -30,14 +32,10 @@ static int ...@@ -30,14 +32,10 @@ static int
lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
const socket_state_t *state) const socket_state_t *state)
{ {
unsigned long flags, gpio, misc_wr; unsigned int pa_dwr_mask, pa_dwr_set, misc_mask, misc_set;
int ret = 1; int ret = 0;
struct pcmcia_state new_state;
local_irq_save(flags);
gpio = PA_DWR; pa_dwr_mask = pa_dwr_set = misc_mask = misc_set = 0;
misc_wr = LUB_MISC_WR;
/* Lubbock uses the Maxim MAX1602, with the following connections: /* Lubbock uses the Maxim MAX1602, with the following connections:
* *
...@@ -61,7 +59,7 @@ lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, ...@@ -61,7 +59,7 @@ lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
* A0VPP GND VPP is not connected * A0VPP GND VPP is not connected
* A1VPP GND VPP is not connected * A1VPP GND VPP is not connected
* A0VCC S1_PWR0 MISC_WR<14> * A0VCC S1_PWR0 MISC_WR<14>
* A1VCC S1_PWR0 MISC_WR<15> * A1VCC S1_PWR1 MISC_WR<15>
* VX VCC * VX VCC
* VY +3.3V * VY +3.3V
* 12IN GND VPP is not connected * 12IN GND VPP is not connected
...@@ -69,116 +67,134 @@ lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, ...@@ -69,116 +67,134 @@ lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
* *
*/ */
again: again:
switch(skt->nr){ switch (skt->nr) {
case 0: case 0:
pa_dwr_mask = GPIO_A0 | GPIO_A1 | GPIO_A2 | GPIO_A3;
switch(state->Vcc){ switch (state->Vcc) {
case 0: case 0: /* Hi-Z */
gpio &= ~(GPIO_bit(2) | GPIO_bit(3));
break; break;
case 33: case 33: /* VY */
gpio = (gpio & ~(GPIO_bit(2) | GPIO_bit(3))) | GPIO_bit(3); pa_dwr_set |= GPIO_A3;
break; break;
case 50: case 50: /* VX */
gpio = (gpio & ~(GPIO_bit(2) | GPIO_bit(3))) | GPIO_bit(2); pa_dwr_set |= GPIO_A2;
break; break;
default: default:
printk(KERN_ERR "%s(): unrecognized Vcc %u\n", __FUNCTION__, state->Vcc); printk(KERN_ERR "%s(): unrecognized Vcc %u\n",
__FUNCTION__, state->Vcc);
ret = -1; ret = -1;
} }
switch(state->Vpp){ switch (state->Vpp) {
case 0: case 0: /* Hi-Z */
gpio &= ~(GPIO_bit(0) | GPIO_bit(1));
break; break;
case 120: case 120: /* 12IN */
gpio = (gpio & ~(GPIO_bit(0) | GPIO_bit(1))) | GPIO_bit(1); pa_dwr_set |= GPIO_A1;
break; break;
default: default: /* VCC */
/* REVISIT: I'm not sure about this? Is this correct? if (state->Vpp == state->Vcc)
Is it always safe or do we have potential problems pa_dwr_set |= GPIO_A0;
with bogus combinations of Vcc and Vpp settings? */
if(state->Vpp == state->Vcc)
gpio = (gpio & ~(GPIO_bit(0) | GPIO_bit(1))) | GPIO_bit(0);
else { else {
printk(KERN_ERR "%s(): unrecognized Vpp %u\n", __FUNCTION__, state->Vpp); printk(KERN_ERR "%s(): unrecognized Vpp %u\n",
__FUNCTION__, state->Vpp);
ret = -1; ret = -1;
break; break;
} }
} }
break; break;
case 1: case 1:
switch(state->Vcc){ misc_mask = (1 << 15) | (1 << 14);
case 0:
misc_wr &= ~((1 << 15) | (1 << 14)); switch (state->Vcc) {
case 0: /* Hi-Z */
break; break;
case 33: case 33: /* VY */
misc_wr = (misc_wr & ~(1 << 15)) | (1 << 14); misc_set |= 1 << 15;
gpio = (gpio & ~(GPIO_bit(2) | GPIO_bit(3))) | GPIO_bit(2);
break; break;
case 50: case 50: /* VX */
misc_wr = (misc_wr & ~(1 << 15)) | (1 << 14); misc_set |= 1 << 14;
break; break;
default: default:
printk(KERN_ERR "%s(): unrecognized Vcc %u\n", __FUNCTION__, state->Vcc); printk(KERN_ERR "%s(): unrecognized Vcc %u\n",
__FUNCTION__, state->Vcc);
ret = -1; ret = -1;
break; break;
} }
if(state->Vpp!=state->Vcc && state->Vpp!=0){ if (state->Vpp != state->Vcc && state->Vpp != 0) {
printk(KERN_ERR "%s(): CF slot cannot support Vpp %u\n", __FUNCTION__, state->Vpp); printk(KERN_ERR "%s(): CF slot cannot support Vpp %u\n",
__FUNCTION__, state->Vpp);
ret = -1; ret = -1;
break; break;
} }
break; break;
default: default:
ret = -1; ret = -1;
} }
if (ret >= 0) { if (ret == 0)
sa1111_pcmcia_configure_socket(skt, state); ret = sa1111_pcmcia_configure_socket(skt, state);
LUB_MISC_WR = misc_wr;
PA_DWR = gpio; if (ret == 0) {
lubbock_set_misc_wr(misc_mask, misc_set);
sa1111_set_io(SA1111_DEV(skt->dev), pa_dwr_mask, pa_dwr_set);
} }
if (ret > 0) {
ret = 0;
#if 1 #if 1
if (ret == 0 && state->Vcc == 33) {
struct pcmcia_state new_state;
/* /*
* HACK ALERT: * HACK ALERT:
* We can't sense the voltage properly on Lubbock before actually * We can't sense the voltage properly on Lubbock before
* applying some power to the socket (catch 22). * actually applying some power to the socket (catch 22).
* Resense the socket Voltage Sense pins after applying socket power. * Resense the socket Voltage Sense pins after applying
* socket power.
*
* Note: It takes about 2.5ms for the MAX1602 VCC output
* to rise.
*/ */
mdelay(3);
sa1111_pcmcia_socket_state(skt, &new_state); sa1111_pcmcia_socket_state(skt, &new_state);
if (state->Vcc == 33 && !new_state.vs_3v && !new_state.vs_Xv) {
/* Switch to 5V, Configure socket with 5V voltage */ if (!new_state.vs_3v && !new_state.vs_Xv) {
PA_DWR &= ~(GPIO_bit(0) | GPIO_bit(1) | GPIO_bit(2) | GPIO_bit(3)); /*
PA_DDR &= ~(GPIO_bit(0) | GPIO_bit(1) | GPIO_bit(2) | GPIO_bit(3)); * Switch to 5V, Configure socket with 5V voltage
/* We need to hack around the const qualifier as well to keep this */
ugly workaround localized and not force it to the rest of the code. lubbock_set_misc_wr(misc_mask, 0);
Barf bags avaliable in the seat pocket in front of you! */ sa1111_set_io(SA1111_DEV(skt->dev), pa_dwr_mask, 0);
/*
* It takes about 100ms to turn off Vcc.
*/
mdelay(100);
/*
* We need to hack around the const qualifier as
* well to keep this ugly workaround localized and
* not force it to the rest of the code. Barf bags
* avaliable in the seat pocket in front of you!
*/
((socket_state_t *)state)->Vcc = 50; ((socket_state_t *)state)->Vcc = 50;
((socket_state_t *)state)->Vpp = 50; ((socket_state_t *)state)->Vpp = 50;
goto again; goto again;
} }
#endif
} }
#endif
local_irq_restore(flags);
return ret; return ret;
} }
...@@ -196,7 +212,7 @@ static struct pcmcia_low_level lubbock_pcmcia_ops = { ...@@ -196,7 +212,7 @@ static struct pcmcia_low_level lubbock_pcmcia_ops = {
#include "pxa2xx_base.h" #include "pxa2xx_base.h"
int __init pcmcia_lubbock_init(struct device *dev) int __init pcmcia_lubbock_init(struct sa1111_dev *sadev)
{ {
int ret = -ENODEV; int ret = -ENODEV;
...@@ -205,16 +221,15 @@ int __init pcmcia_lubbock_init(struct device *dev) ...@@ -205,16 +221,15 @@ int __init pcmcia_lubbock_init(struct device *dev)
* Set GPIO_A<3:0> to be outputs for the MAX1600, * Set GPIO_A<3:0> to be outputs for the MAX1600,
* and switch to standby mode. * and switch to standby mode.
*/ */
PA_DWR = 0; sa1111_set_io_dir(sadev, GPIO_A0|GPIO_A1|GPIO_A2|GPIO_A3, 0, 0);
PA_DDR = 0; sa1111_set_io(sadev, GPIO_A0|GPIO_A1|GPIO_A2|GPIO_A3, 0);
PA_SDR = 0; sa1111_set_sleep_io(sadev, GPIO_A0|GPIO_A1|GPIO_A2|GPIO_A3, 0);
PA_SSR = 0;
/* Set CF Socket 1 power to standby mode. */ /* Set CF Socket 1 power to standby mode. */
LUB_MISC_WR &= ~(GPIO_bit(15) | GPIO_bit(14)); lubbock_set_misc_wr((1 << 15) | (1 << 14), 0);
dev->platform_data = &lubbock_pcmcia_ops; sadev->dev.platform_data = &lubbock_pcmcia_ops;
ret = pxa2xx_drv_pcmcia_probe(dev); ret = pxa2xx_drv_pcmcia_probe(&sadev->dev);
} }
return ret; return ret;
......
...@@ -149,7 +149,7 @@ static int pcmcia_probe(struct sa1111_dev *dev) ...@@ -149,7 +149,7 @@ static int pcmcia_probe(struct sa1111_dev *dev)
pcmcia_jornada720_init(&dev->dev); pcmcia_jornada720_init(&dev->dev);
#endif #endif
#ifdef CONFIG_ARCH_LUBBOCK #ifdef CONFIG_ARCH_LUBBOCK
pcmcia_lubbock_init(&dev->dev); pcmcia_lubbock_init(dev);
#endif #endif
#ifdef CONFIG_ASSABET_NEPONSET #ifdef CONFIG_ASSABET_NEPONSET
pcmcia_neponset_init(dev); pcmcia_neponset_init(dev);
......
...@@ -10,6 +10,6 @@ extern void sa1111_pcmcia_socket_suspend(struct soc_pcmcia_socket *); ...@@ -10,6 +10,6 @@ extern void sa1111_pcmcia_socket_suspend(struct soc_pcmcia_socket *);
extern int pcmcia_badge4_init(struct device *); extern int pcmcia_badge4_init(struct device *);
extern int pcmcia_jornada720_init(struct device *); extern int pcmcia_jornada720_init(struct device *);
extern int pcmcia_lubbock_init(struct device *); extern int pcmcia_lubbock_init(struct sa1111_dev *);
extern int pcmcia_neponset_init(struct sa1111_dev *); extern int pcmcia_neponset_init(struct sa1111_dev *);
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <linux/sysrq.h> #include <linux/sysrq.h>
#include <linux/serial_reg.h> #include <linux/serial_reg.h>
#include <linux/circ_buf.h> #include <linux/circ_buf.h>
#include <linux/serial.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
...@@ -386,9 +385,6 @@ static int serial_pxa_startup(struct uart_port *port) ...@@ -386,9 +385,6 @@ static int serial_pxa_startup(struct uart_port *port)
if (retval) if (retval)
return retval; return retval;
CKEN |= up->cken;
udelay(1);
/* /*
* Clear the FIFO buffers and disable them. * Clear the FIFO buffers and disable them.
* (they will be reenabled in set_termios()) * (they will be reenabled in set_termios())
...@@ -461,8 +457,6 @@ static void serial_pxa_shutdown(struct uart_port *port) ...@@ -461,8 +457,6 @@ static void serial_pxa_shutdown(struct uart_port *port)
UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_RCVR |
UART_FCR_CLEAR_XMIT); UART_FCR_CLEAR_XMIT);
serial_out(up, UART_FCR, 0); serial_out(up, UART_FCR, 0);
CKEN &= ~up->cken;
} }
static void static void
...@@ -576,10 +570,14 @@ static void ...@@ -576,10 +570,14 @@ static void
serial_pxa_pm(struct uart_port *port, unsigned int state, serial_pxa_pm(struct uart_port *port, unsigned int state,
unsigned int oldstate) unsigned int oldstate)
{ {
struct uart_pxa_port *up = (struct uart_pxa_port *)port;
if (state) { if (state) {
/* sleep */ /* sleep */
CKEN &= ~up->cken;
} else { } else {
/* wake */ /* wake */
CKEN |= up->cken;
udelay(1);
} }
} }
...@@ -760,13 +758,12 @@ static struct uart_pxa_port serial_pxa_ports[] = { ...@@ -760,13 +758,12 @@ static struct uart_pxa_port serial_pxa_ports[] = {
.cken = CKEN6_FFUART, .cken = CKEN6_FFUART,
.port = { .port = {
.type = PORT_PXA, .type = PORT_PXA,
.iotype = SERIAL_IO_MEM, .iotype = UPIO_MEM,
.membase = (void *)&FFUART, .membase = (void *)&FFUART,
.mapbase = __PREG(FFUART), .mapbase = __PREG(FFUART),
.irq = IRQ_FFUART, .irq = IRQ_FFUART,
.uartclk = 921600 * 16, .uartclk = 921600 * 16,
.fifosize = 64, .fifosize = 64,
.flags = ASYNC_SKIP_TEST,
.ops = &serial_pxa_pops, .ops = &serial_pxa_pops,
.line = 0, .line = 0,
}, },
...@@ -775,13 +772,12 @@ static struct uart_pxa_port serial_pxa_ports[] = { ...@@ -775,13 +772,12 @@ static struct uart_pxa_port serial_pxa_ports[] = {
.cken = CKEN7_BTUART, .cken = CKEN7_BTUART,
.port = { .port = {
.type = PORT_PXA, .type = PORT_PXA,
.iotype = SERIAL_IO_MEM, .iotype = UPIO_MEM,
.membase = (void *)&BTUART, .membase = (void *)&BTUART,
.mapbase = __PREG(BTUART), .mapbase = __PREG(BTUART),
.irq = IRQ_BTUART, .irq = IRQ_BTUART,
.uartclk = 921600 * 16, .uartclk = 921600 * 16,
.fifosize = 64, .fifosize = 64,
.flags = ASYNC_SKIP_TEST,
.ops = &serial_pxa_pops, .ops = &serial_pxa_pops,
.line = 1, .line = 1,
}, },
...@@ -790,13 +786,12 @@ static struct uart_pxa_port serial_pxa_ports[] = { ...@@ -790,13 +786,12 @@ static struct uart_pxa_port serial_pxa_ports[] = {
.cken = CKEN5_STUART, .cken = CKEN5_STUART,
.port = { .port = {
.type = PORT_PXA, .type = PORT_PXA,
.iotype = SERIAL_IO_MEM, .iotype = UPIO_MEM,
.membase = (void *)&STUART, .membase = (void *)&STUART,
.mapbase = __PREG(STUART), .mapbase = __PREG(STUART),
.irq = IRQ_STUART, .irq = IRQ_STUART,
.uartclk = 921600 * 16, .uartclk = 921600 * 16,
.fifosize = 64, .fifosize = 64,
.flags = ASYNC_SKIP_TEST,
.ops = &serial_pxa_pops, .ops = &serial_pxa_pops,
.line = 2, .line = 2,
}, },
...@@ -830,6 +825,10 @@ static int __init serial_pxa_init(void) ...@@ -830,6 +825,10 @@ static int __init serial_pxa_init(void)
static void __exit serial_pxa_exit(void) static void __exit serial_pxa_exit(void)
{ {
int i;
for (i = 0; i < ARRAY_SIZE(serial_pxa_ports); i++)
uart_remove_one_port(&serial_pxa_reg, &serial_pxa_ports[i].port);
uart_unregister_driver(&serial_pxa_reg); uart_unregister_driver(&serial_pxa_reg);
} }
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/mach-types.h>
#include <asm/unaligned.h> #include <asm/unaligned.h>
#include <asm/hardware.h> #include <asm/hardware.h>
......
...@@ -153,7 +153,7 @@ pxafb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, ...@@ -153,7 +153,7 @@ pxafb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
* 12 or 16-bit True Colour. We encode the RGB value * 12 or 16-bit True Colour. We encode the RGB value
* according to the RGB bitfield information. * according to the RGB bitfield information.
*/ */
if (regno <= 16) { if (regno < 16) {
u32 *pal = fbi->fb.pseudo_palette; u32 *pal = fbi->fb.pseudo_palette;
val = chan_to_field(red, &fbi->fb.var.red); val = chan_to_field(red, &fbi->fb.var.red);
...@@ -448,7 +448,7 @@ static int pxafb_activate_var(struct fb_var_screeninfo *var, struct pxafb_info * ...@@ -448,7 +448,7 @@ static int pxafb_activate_var(struct fb_var_screeninfo *var, struct pxafb_info *
{ {
struct pxafb_lcd_reg new_regs; struct pxafb_lcd_reg new_regs;
u_long flags; u_long flags;
u_int pcd = get_pcd(var->pixclock); u_int lines_per_panel, pcd = get_pcd(var->pixclock);
DPRINTK("Configuring PXA LCD\n"); DPRINTK("Configuring PXA LCD\n");
...@@ -509,8 +509,16 @@ static int pxafb_activate_var(struct fb_var_screeninfo *var, struct pxafb_info * ...@@ -509,8 +509,16 @@ static int pxafb_activate_var(struct fb_var_screeninfo *var, struct pxafb_info *
LCCR1_BegLnDel(var->left_margin) + LCCR1_BegLnDel(var->left_margin) +
LCCR1_EndLnDel(var->right_margin); LCCR1_EndLnDel(var->right_margin);
/*
* If we have a dual scan LCD, we need to halve
* the YRES parameter.
*/
lines_per_panel = var->yres;
if (fbi->lccr0 & LCCR0_SDS)
lines_per_panel /= 2;
new_regs.lccr2 = new_regs.lccr2 =
LCCR2_DisHght(var->yres) + LCCR2_DisHght(lines_per_panel) +
LCCR2_VrtSnchWdth(var->vsync_len) + LCCR2_VrtSnchWdth(var->vsync_len) +
LCCR2_BegFrmDel(var->upper_margin) + LCCR2_BegFrmDel(var->upper_margin) +
LCCR2_EndFrmDel(var->lower_margin); LCCR2_EndFrmDel(var->lower_margin);
...@@ -540,9 +548,7 @@ static int pxafb_activate_var(struct fb_var_screeninfo *var, struct pxafb_info * ...@@ -540,9 +548,7 @@ static int pxafb_activate_var(struct fb_var_screeninfo *var, struct pxafb_info *
fbi->dmadesc_fbhigh_dma = fbi->palette_dma - 2*16; fbi->dmadesc_fbhigh_dma = fbi->palette_dma - 2*16;
fbi->dmadesc_palette_dma = fbi->palette_dma - 1*16; fbi->dmadesc_palette_dma = fbi->palette_dma - 1*16;
#define BYTES_PER_PANEL ((fbi->lccr0 & LCCR0_SDS) == LCCR0_Dual ? \ #define BYTES_PER_PANEL (lines_per_panel * fbi->fb.fix.line_length)
(var->xres * var->yres * var->bits_per_pixel / 8 / 2) : \
(var->xres * var->yres * var->bits_per_pixel / 8))
/* populate descriptors */ /* populate descriptors */
fbi->dmadesc_fblow_cpu->fdadr = fbi->dmadesc_fblow_dma; fbi->dmadesc_fblow_cpu->fdadr = fbi->dmadesc_fblow_dma;
...@@ -733,8 +739,7 @@ static void pxafb_disable_controller(struct pxafb_info *fbi) ...@@ -733,8 +739,7 @@ static void pxafb_disable_controller(struct pxafb_info *fbi)
LCSR = 0xffffffff; /* Clear LCD Status Register */ LCSR = 0xffffffff; /* Clear LCD Status Register */
LCCR0 &= ~LCCR0_LDM; /* Enable LCD Disable Done Interrupt */ LCCR0 &= ~LCCR0_LDM; /* Enable LCD Disable Done Interrupt */
//TODO?enable_irq(IRQ_LCD); /* Enable LCD IRQ */ LCCR0 |= LCCR0_DIS; /* Disable LCD Controller */
LCCR0 &= ~LCCR0_ENB; /* Disable LCD Controller */
schedule_timeout(20 * HZ / 1000); schedule_timeout(20 * HZ / 1000);
remove_wait_queue(&fbi->ctrlr_wait, &wait); remove_wait_queue(&fbi->ctrlr_wait, &wait);
...@@ -1137,25 +1142,25 @@ static int __init pxafb_parse_options(struct device *dev, char *options) ...@@ -1137,25 +1142,25 @@ static int __init pxafb_parse_options(struct device *dev, char *options)
} }
} else if (!strncmp(this_opt, "pixclock:", 9)) { } else if (!strncmp(this_opt, "pixclock:", 9)) {
inf->pixclock = simple_strtoul(this_opt+9, NULL, 0); inf->pixclock = simple_strtoul(this_opt+9, NULL, 0);
dev_info(dev, "override pixclock: %uld\n", inf->pixclock); dev_info(dev, "override pixclock: %u\n", inf->pixclock);
} else if (!strncmp(this_opt, "left:", 5)) { } else if (!strncmp(this_opt, "left:", 5)) {
inf->left_margin = simple_strtoul(this_opt+5, NULL, 0); inf->left_margin = simple_strtoul(this_opt+5, NULL, 0);
dev_info(dev, "override left: %d\n", inf->left_margin); dev_info(dev, "override left: %u\n", inf->left_margin);
} else if (!strncmp(this_opt, "right:", 6)) { } else if (!strncmp(this_opt, "right:", 6)) {
inf->right_margin = simple_strtoul(this_opt+6, NULL, 0); inf->right_margin = simple_strtoul(this_opt+6, NULL, 0);
dev_info(dev, "override right: %d\n", inf->right_margin); dev_info(dev, "override right: %u\n", inf->right_margin);
} else if (!strncmp(this_opt, "upper:", 6)) { } else if (!strncmp(this_opt, "upper:", 6)) {
inf->upper_margin = simple_strtoul(this_opt+6, NULL, 0); inf->upper_margin = simple_strtoul(this_opt+6, NULL, 0);
dev_info(dev, "override upper: %d\n", inf->upper_margin); dev_info(dev, "override upper: %u\n", inf->upper_margin);
} else if (!strncmp(this_opt, "lower:", 6)) { } else if (!strncmp(this_opt, "lower:", 6)) {
inf->lower_margin = simple_strtoul(this_opt+6, NULL, 0); inf->lower_margin = simple_strtoul(this_opt+6, NULL, 0);
dev_info(dev, "override lower: %d\n", inf->lower_margin); dev_info(dev, "override lower: %u\n", inf->lower_margin);
} else if (!strncmp(this_opt, "hsynclen:", 9)) { } else if (!strncmp(this_opt, "hsynclen:", 9)) {
inf->hsync_len = simple_strtoul(this_opt+9, NULL, 0); inf->hsync_len = simple_strtoul(this_opt+9, NULL, 0);
dev_info(dev, "override hsynclen: %d\n", inf->hsync_len); dev_info(dev, "override hsynclen: %u\n", inf->hsync_len);
} else if (!strncmp(this_opt, "vsynclen:", 9)) { } else if (!strncmp(this_opt, "vsynclen:", 9)) {
inf->vsync_len = simple_strtoul(this_opt+9, NULL, 0); inf->vsync_len = simple_strtoul(this_opt+9, NULL, 0);
dev_info(dev, "override vsynclen: %d\n", inf->vsync_len); dev_info(dev, "override vsynclen: %u\n", inf->vsync_len);
} else if (!strncmp(this_opt, "hsync:", 6)) { } else if (!strncmp(this_opt, "hsync:", 6)) {
if ( simple_strtoul(this_opt+6, NULL, 0) == 0 ) { if ( simple_strtoul(this_opt+6, NULL, 0) == 0 ) {
dev_info(dev, "override hsync: Active Low\n"); dev_info(dev, "override hsync: Active Low\n");
......
...@@ -48,7 +48,7 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id) ...@@ -48,7 +48,7 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
/* /*
* Coyote only has UART2 connected * Coyote only has UART2 connected
*/ */
if (__machine_arch_type == MACH_TYPE_ADI_COYOTE) if (machine_is_adi_coyote())
uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS; uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;
else else
uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS; uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
#ifndef __ASM_ARCH_HARDWARE_H #ifndef __ASM_ARCH_HARDWARE_H
#define __ASM_ARCH_HARDWARE_H #define __ASM_ARCH_HARDWARE_H
#include <asm/mach-types.h>
#define io_p2v(x) (0xf0000000 | (((x) & 0xfff00000) >> 4) | ((x) & 0x0000ffff)) #define io_p2v(x) (0xf0000000 | (((x) & 0xfff00000) >> 4) | ((x) & 0x0000ffff))
#define io_v2p(x) ( (((x) & 0x0fff0000) << 4) | ((x) & 0x0000ffff)) #define io_v2p(x) ( (((x) & 0x0fff0000) << 4) | ((x) & 0x0000ffff))
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
#ifndef __ASSEMBLER__ #ifndef __ASSEMBLER__
#include <asm/types.h> #include <asm/types.h>
#endif #endif
#include <asm/mach-types.h>
/* /*
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/serial_reg.h> #include <linux/serial_reg.h>
#include <asm/mach-types.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/arch/serial.h> #include <asm/arch/serial.h>
......
...@@ -13,9 +13,6 @@ ...@@ -13,9 +13,6 @@
#ifndef __ASM_ARCH_HARDWARE_H #ifndef __ASM_ARCH_HARDWARE_H
#define __ASM_ARCH_HARDWARE_H #define __ASM_ARCH_HARDWARE_H
#include <asm/mach-types.h>
/* /*
* We requires absolute addresses. * We requires absolute addresses.
*/ */
......
...@@ -35,3 +35,6 @@ ...@@ -35,3 +35,6 @@
#define LUB_IRQ_SET_CLR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x0d0) #define LUB_IRQ_SET_CLR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x0d0)
#define LUB_GP __LUB_REG(LUBBOCK_FPGA_PHYS + 0x100) #define LUB_GP __LUB_REG(LUBBOCK_FPGA_PHYS + 0x100)
#ifndef __ASSEMBLY__
extern void lubbock_set_misc_wr(unsigned int mask, unsigned int set);
#endif
...@@ -405,22 +405,6 @@ ...@@ -405,22 +405,6 @@
#define GPIO_C6 (1 << 22) #define GPIO_C6 (1 << 22)
#define GPIO_C7 (1 << 23) #define GPIO_C7 (1 << 23)
#define PA_DDR __CCREG(0x1000)
#define PA_DRR __CCREG(0x1004)
#define PA_DWR __CCREG(0x1004)
#define PA_SDR __CCREG(0x1008)
#define PA_SSR __CCREG(0x100c)
#define PB_DDR __CCREG(0x1010)
#define PB_DRR __CCREG(0x1014)
#define PB_DWR __CCREG(0x1014)
#define PB_SDR __CCREG(0x1018)
#define PB_SSR __CCREG(0x101c)
#define PC_DDR __CCREG(0x1020)
#define PC_DRR __CCREG(0x1024)
#define PC_DWR __CCREG(0x1024)
#define PC_SDR __CCREG(0x1028)
#define PC_SSR __CCREG(0x102c)
/* /*
* Interrupt Controller * Interrupt Controller
* *
......
...@@ -137,22 +137,48 @@ extern unsigned int user_debug; ...@@ -137,22 +137,48 @@ extern unsigned int user_debug;
#define set_wmb(var, value) do { var = value; wmb(); } while (0) #define set_wmb(var, value) do { var = value; wmb(); } while (0)
#define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
#define prepare_to_switch() do { } while(0) #ifdef CONFIG_SMP
/*
* Define our own context switch locking. This allows us to enable
* interrupts over the context switch, otherwise we end up with high
* interrupt latency. The real problem area is switch_mm() which may
* do a full cache flush.
*/
#define prepare_arch_switch(rq,next) \
do { \
spin_lock(&(next)->switch_lock); \
spin_unlock_irq(&(rq)->lock); \
} while (0)
#define finish_arch_switch(rq,prev) \
spin_unlock(&(prev)->switch_lock)
#define task_running(rq,p) \
((rq)->curr == (p) || spin_is_locked(&(p)->switch_lock))
#else
/*
* Our UP-case is more simple, but we assume knowledge of how
* spin_unlock_irq() and friends are implemented. This avoids
* us needlessly decrementing and incrementing the preempt count.
*/
#define prepare_arch_switch(rq,next) local_irq_enable()
#define finish_arch_switch(rq,prev) spin_unlock(&(rq)->lock)
#define task_running(rq,p) ((rq)->curr == (p))
#endif
/* /*
* switch_to(prev, next) should switch from task `prev' to `next' * switch_to(prev, next) should switch from task `prev' to `next'
* `prev' will never be the same as `next'. * `prev' will never be the same as `next'. schedule() itself
* The `mb' is to tell GCC not to cache `current' across this call. * contains the memory barrier to tell GCC not to cache `current'.
*/ */
struct thread_info; struct thread_info;
struct task_struct; struct task_struct;
extern struct task_struct *__switch_to(struct task_struct *, struct thread_info *, struct thread_info *); extern struct task_struct *__switch_to(struct task_struct *, struct thread_info *, struct thread_info *);
#define switch_to(prev,next,last) \ #define switch_to(prev,next,last) \
do { \ do { \
last = __switch_to(prev,prev->thread_info,next->thread_info); \ last = __switch_to(prev,prev->thread_info,next->thread_info); \
mb(); \ } while (0)
} while (0)
/* /*
* CPU interrupt mask handling. * CPU interrupt mask handling.
......
...@@ -454,6 +454,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6 ...@@ -454,6 +454,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6
#define __ARCH_WANT_STAT64 #define __ARCH_WANT_STAT64
#define __ARCH_WANT_SYS_ALARM #define __ARCH_WANT_SYS_ALARM
#define __ARCH_WANT_SYS_GETHOSTNAME #define __ARCH_WANT_SYS_GETHOSTNAME
#define __ARCH_WANT_SYS_PAUSE
#define __ARCH_WANT_SYS_TIME #define __ARCH_WANT_SYS_TIME
#define __ARCH_WANT_SYS_UTIME #define __ARCH_WANT_SYS_UTIME
#define __ARCH_WANT_SYS_SOCKETCALL #define __ARCH_WANT_SYS_SOCKETCALL
......
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