diff options
Diffstat (limited to 'drivers')
39 files changed, 767 insertions, 156 deletions
diff --git a/drivers/ata/pata_icside.c b/drivers/ata/pata_icside.c index cf9e9848f8b5..d7bc925c524d 100644 --- a/drivers/ata/pata_icside.c +++ b/drivers/ata/pata_icside.c | |||
@@ -45,8 +45,6 @@ static const struct portinfo pata_icside_portinfo_v6_2 = { | |||
45 | .stepping = 6, | 45 | .stepping = 6, |
46 | }; | 46 | }; |
47 | 47 | ||
48 | #define PATA_ICSIDE_MAX_SG 128 | ||
49 | |||
50 | struct pata_icside_state { | 48 | struct pata_icside_state { |
51 | void __iomem *irq_port; | 49 | void __iomem *irq_port; |
52 | void __iomem *ioc_base; | 50 | void __iomem *ioc_base; |
@@ -57,7 +55,6 @@ struct pata_icside_state { | |||
57 | u8 disabled; | 55 | u8 disabled; |
58 | unsigned int speed[ATA_MAX_DEVICES]; | 56 | unsigned int speed[ATA_MAX_DEVICES]; |
59 | } port[2]; | 57 | } port[2]; |
60 | struct scatterlist sg[PATA_ICSIDE_MAX_SG]; | ||
61 | }; | 58 | }; |
62 | 59 | ||
63 | struct pata_icside_info { | 60 | struct pata_icside_info { |
@@ -222,9 +219,7 @@ static void pata_icside_bmdma_setup(struct ata_queued_cmd *qc) | |||
222 | { | 219 | { |
223 | struct ata_port *ap = qc->ap; | 220 | struct ata_port *ap = qc->ap; |
224 | struct pata_icside_state *state = ap->host->private_data; | 221 | struct pata_icside_state *state = ap->host->private_data; |
225 | struct scatterlist *sg, *rsg = state->sg; | ||
226 | unsigned int write = qc->tf.flags & ATA_TFLAG_WRITE; | 222 | unsigned int write = qc->tf.flags & ATA_TFLAG_WRITE; |
227 | unsigned int si; | ||
228 | 223 | ||
229 | /* | 224 | /* |
230 | * We are simplex; BUG if we try to fiddle with DMA | 225 | * We are simplex; BUG if we try to fiddle with DMA |
@@ -233,20 +228,12 @@ static void pata_icside_bmdma_setup(struct ata_queued_cmd *qc) | |||
233 | BUG_ON(dma_channel_active(state->dma)); | 228 | BUG_ON(dma_channel_active(state->dma)); |
234 | 229 | ||
235 | /* | 230 | /* |
236 | * Copy ATAs scattered sg list into a contiguous array of sg | ||
237 | */ | ||
238 | for_each_sg(qc->sg, sg, qc->n_elem, si) { | ||
239 | memcpy(rsg, sg, sizeof(*sg)); | ||
240 | rsg++; | ||
241 | } | ||
242 | |||
243 | /* | ||
244 | * Route the DMA signals to the correct interface | 231 | * Route the DMA signals to the correct interface |
245 | */ | 232 | */ |
246 | writeb(state->port[ap->port_no].port_sel, state->ioc_base); | 233 | writeb(state->port[ap->port_no].port_sel, state->ioc_base); |
247 | 234 | ||
248 | set_dma_speed(state->dma, state->port[ap->port_no].speed[qc->dev->devno]); | 235 | set_dma_speed(state->dma, state->port[ap->port_no].speed[qc->dev->devno]); |
249 | set_dma_sg(state->dma, state->sg, rsg - state->sg); | 236 | set_dma_sg(state->dma, qc->sg, qc->n_elem); |
250 | set_dma_mode(state->dma, write ? DMA_MODE_WRITE : DMA_MODE_READ); | 237 | set_dma_mode(state->dma, write ? DMA_MODE_WRITE : DMA_MODE_READ); |
251 | 238 | ||
252 | /* issue r/w command */ | 239 | /* issue r/w command */ |
@@ -306,8 +293,8 @@ static int icside_dma_init(struct pata_icside_info *info) | |||
306 | 293 | ||
307 | static struct scsi_host_template pata_icside_sht = { | 294 | static struct scsi_host_template pata_icside_sht = { |
308 | ATA_BASE_SHT(DRV_NAME), | 295 | ATA_BASE_SHT(DRV_NAME), |
309 | .sg_tablesize = PATA_ICSIDE_MAX_SG, | 296 | .sg_tablesize = SCSI_MAX_SG_CHAIN_SEGMENTS, |
310 | .dma_boundary = ~0, /* no dma boundaries */ | 297 | .dma_boundary = IOMD_DMA_BOUNDARY, |
311 | }; | 298 | }; |
312 | 299 | ||
313 | static void pata_icside_postreset(struct ata_link *link, unsigned int *classes) | 300 | static void pata_icside_postreset(struct ata_link *link, unsigned int *classes) |
diff --git a/drivers/i2c/busses/i2c-versatile.c b/drivers/i2c/busses/i2c-versatile.c index 4678babd3ce6..fede619ba227 100644 --- a/drivers/i2c/busses/i2c-versatile.c +++ b/drivers/i2c/busses/i2c-versatile.c | |||
@@ -102,7 +102,13 @@ static int i2c_versatile_probe(struct platform_device *dev) | |||
102 | i2c->algo = i2c_versatile_algo; | 102 | i2c->algo = i2c_versatile_algo; |
103 | i2c->algo.data = i2c; | 103 | i2c->algo.data = i2c; |
104 | 104 | ||
105 | ret = i2c_bit_add_bus(&i2c->adap); | 105 | if (dev->id >= 0) { |
106 | /* static bus numbering */ | ||
107 | i2c->adap.nr = dev->id; | ||
108 | ret = i2c_bit_add_numbered_bus(&i2c->adap); | ||
109 | } else | ||
110 | /* dynamic bus numbering */ | ||
111 | ret = i2c_bit_add_bus(&i2c->adap); | ||
106 | if (ret >= 0) { | 112 | if (ret >= 0) { |
107 | platform_set_drvdata(dev, i2c); | 113 | platform_set_drvdata(dev, i2c); |
108 | return 0; | 114 | return 0; |
@@ -146,7 +152,7 @@ static void __exit i2c_versatile_exit(void) | |||
146 | platform_driver_unregister(&i2c_versatile_driver); | 152 | platform_driver_unregister(&i2c_versatile_driver); |
147 | } | 153 | } |
148 | 154 | ||
149 | module_init(i2c_versatile_init); | 155 | subsys_initcall(i2c_versatile_init); |
150 | module_exit(i2c_versatile_exit); | 156 | module_exit(i2c_versatile_exit); |
151 | 157 | ||
152 | MODULE_DESCRIPTION("ARM Versatile I2C bus driver"); | 158 | MODULE_DESCRIPTION("ARM Versatile I2C bus driver"); |
diff --git a/drivers/input/keyboard/corgikbd.c b/drivers/input/keyboard/corgikbd.c index abb04c82c622..634af6a8e6b3 100644 --- a/drivers/input/keyboard/corgikbd.c +++ b/drivers/input/keyboard/corgikbd.c | |||
@@ -21,8 +21,6 @@ | |||
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | 22 | ||
23 | #include <mach/corgi.h> | 23 | #include <mach/corgi.h> |
24 | #include <mach/hardware.h> | ||
25 | #include <mach/pxa-regs.h> | ||
26 | #include <mach/pxa2xx-gpio.h> | 24 | #include <mach/pxa2xx-gpio.h> |
27 | #include <asm/hardware/scoop.h> | 25 | #include <asm/hardware/scoop.h> |
28 | 26 | ||
diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c index 9d1781a618e9..13967422658c 100644 --- a/drivers/input/keyboard/spitzkbd.c +++ b/drivers/input/keyboard/spitzkbd.c | |||
@@ -21,8 +21,6 @@ | |||
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | 22 | ||
23 | #include <mach/spitz.h> | 23 | #include <mach/spitz.h> |
24 | #include <mach/hardware.h> | ||
25 | #include <mach/pxa-regs.h> | ||
26 | #include <mach/pxa2xx-gpio.h> | 24 | #include <mach/pxa2xx-gpio.h> |
27 | 25 | ||
28 | #define KB_ROWS 7 | 26 | #define KB_ROWS 7 |
diff --git a/drivers/input/touchscreen/corgi_ts.c b/drivers/input/touchscreen/corgi_ts.c index 3fb51b54fe61..94a1919d439d 100644 --- a/drivers/input/touchscreen/corgi_ts.c +++ b/drivers/input/touchscreen/corgi_ts.c | |||
@@ -21,7 +21,6 @@ | |||
21 | 21 | ||
22 | #include <mach/sharpsl.h> | 22 | #include <mach/sharpsl.h> |
23 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
24 | #include <mach/pxa-regs.h> | ||
25 | #include <mach/pxa2xx-gpio.h> | 24 | #include <mach/pxa2xx-gpio.h> |
26 | 25 | ||
27 | 26 | ||
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index 07c334f25aae..0c4ce58c53d5 100644 --- a/drivers/media/video/pxa_camera.c +++ b/drivers/media/video/pxa_camera.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <linux/videodev2.h> | 35 | #include <linux/videodev2.h> |
36 | 36 | ||
37 | #include <mach/dma.h> | 37 | #include <mach/dma.h> |
38 | #include <mach/pxa-regs.h> | ||
39 | #include <mach/camera.h> | 38 | #include <mach/camera.h> |
40 | 39 | ||
41 | #define PXA_CAM_VERSION_CODE KERNEL_VERSION(0, 0, 5) | 40 | #define PXA_CAM_VERSION_CODE KERNEL_VERSION(0, 0, 5) |
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 2909bbc8ad00..a663429b3d55 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
@@ -490,7 +490,7 @@ static void mmci_check_status(unsigned long data) | |||
490 | mod_timer(&host->timer, jiffies + HZ); | 490 | mod_timer(&host->timer, jiffies + HZ); |
491 | } | 491 | } |
492 | 492 | ||
493 | static int mmci_probe(struct amba_device *dev, void *id) | 493 | static int __devinit mmci_probe(struct amba_device *dev, void *id) |
494 | { | 494 | { |
495 | struct mmc_platform_data *plat = dev->dev.platform_data; | 495 | struct mmc_platform_data *plat = dev->dev.platform_data; |
496 | struct mmci_host *host; | 496 | struct mmci_host *host; |
@@ -633,7 +633,7 @@ static int mmci_probe(struct amba_device *dev, void *id) | |||
633 | return ret; | 633 | return ret; |
634 | } | 634 | } |
635 | 635 | ||
636 | static int mmci_remove(struct amba_device *dev) | 636 | static int __devexit mmci_remove(struct amba_device *dev) |
637 | { | 637 | { |
638 | struct mmc_host *mmc = amba_get_drvdata(dev); | 638 | struct mmc_host *mmc = amba_get_drvdata(dev); |
639 | 639 | ||
@@ -730,7 +730,7 @@ static struct amba_driver mmci_driver = { | |||
730 | .name = DRIVER_NAME, | 730 | .name = DRIVER_NAME, |
731 | }, | 731 | }, |
732 | .probe = mmci_probe, | 732 | .probe = mmci_probe, |
733 | .remove = mmci_remove, | 733 | .remove = __devexit_p(mmci_remove), |
734 | .suspend = mmci_suspend, | 734 | .suspend = mmci_suspend, |
735 | .resume = mmci_resume, | 735 | .resume = mmci_resume, |
736 | .id_table = mmci_ids, | 736 | .id_table = mmci_ids, |
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index 9702ad3774cf..430095725f9f 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c | |||
@@ -30,9 +30,8 @@ | |||
30 | 30 | ||
31 | #include <asm/sizes.h> | 31 | #include <asm/sizes.h> |
32 | 32 | ||
33 | #include <mach/dma.h> | ||
34 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
35 | #include <mach/pxa-regs.h> | 34 | #include <mach/dma.h> |
36 | #include <mach/mmc.h> | 35 | #include <mach/mmc.h> |
37 | 36 | ||
38 | #include "pxamci.h" | 37 | #include "pxamci.h" |
diff --git a/drivers/mtd/nand/cmx270_nand.c b/drivers/mtd/nand/cmx270_nand.c index fa129c09bca8..10081e656a6f 100644 --- a/drivers/mtd/nand/cmx270_nand.c +++ b/drivers/mtd/nand/cmx270_nand.c | |||
@@ -26,8 +26,7 @@ | |||
26 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
27 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
28 | 28 | ||
29 | #include <mach/hardware.h> | 29 | #include <mach/pxa2xx-regs.h> |
30 | #include <mach/pxa-regs.h> | ||
31 | 30 | ||
32 | #define GPIO_NAND_CS (11) | 31 | #define GPIO_NAND_CS (11) |
33 | #define GPIO_NAND_RB (89) | 32 | #define GPIO_NAND_RB (89) |
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index cc55cbc2b308..61b69cc40009 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
23 | 23 | ||
24 | #include <mach/dma.h> | 24 | #include <mach/dma.h> |
25 | #include <mach/pxa-regs.h> | ||
26 | #include <mach/pxa3xx_nand.h> | 25 | #include <mach/pxa3xx_nand.h> |
27 | 26 | ||
28 | #define CHIP_DELAY_TIMEOUT (2 * HZ/10) | 27 | #define CHIP_DELAY_TIMEOUT (2 * HZ/10) |
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c index 31794c2363ec..e775338b525f 100644 --- a/drivers/net/irda/pxaficp_ir.c +++ b/drivers/net/irda/pxaficp_ir.c | |||
@@ -24,9 +24,8 @@ | |||
24 | 24 | ||
25 | #include <mach/dma.h> | 25 | #include <mach/dma.h> |
26 | #include <mach/irda.h> | 26 | #include <mach/irda.h> |
27 | #include <mach/hardware.h> | ||
28 | #include <mach/pxa-regs.h> | ||
29 | #include <mach/regs-uart.h> | 27 | #include <mach/regs-uart.h> |
28 | #include <mach/regs-ost.h> | ||
30 | 29 | ||
31 | #define FICP __REG(0x40800000) /* Start of FICP area */ | 30 | #define FICP __REG(0x40800000) /* Start of FICP area */ |
32 | #define ICCR0 __REG(0x40800000) /* ICP Control Register 0 */ | 31 | #define ICCR0 __REG(0x40800000) /* ICP Control Register 0 */ |
diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h index a45952e72018..8140f7cb4d85 100644 --- a/drivers/net/smc911x.h +++ b/drivers/net/smc911x.h | |||
@@ -236,8 +236,7 @@ static inline void SMC_outsl(struct smc911x_local *lp, int reg, | |||
236 | * Use a DMA for RX and TX packets. | 236 | * Use a DMA for RX and TX packets. |
237 | */ | 237 | */ |
238 | #include <linux/dma-mapping.h> | 238 | #include <linux/dma-mapping.h> |
239 | #include <asm/dma.h> | 239 | #include <mach/dma.h> |
240 | #include <mach/pxa-regs.h> | ||
241 | 240 | ||
242 | static dma_addr_t rx_dmabuf, tx_dmabuf; | 241 | static dma_addr_t rx_dmabuf, tx_dmabuf; |
243 | static int rx_dmalen, tx_dmalen; | 242 | static int rx_dmalen, tx_dmalen; |
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index c4ccd121bc9c..4d689b59c58c 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h | |||
@@ -494,8 +494,6 @@ struct smc_local { | |||
494 | */ | 494 | */ |
495 | #include <linux/dma-mapping.h> | 495 | #include <linux/dma-mapping.h> |
496 | #include <mach/dma.h> | 496 | #include <mach/dma.h> |
497 | #include <mach/hardware.h> | ||
498 | #include <mach/pxa-regs.h> | ||
499 | 497 | ||
500 | #ifdef SMC_insl | 498 | #ifdef SMC_insl |
501 | #undef SMC_insl | 499 | #undef SMC_insl |
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c index bb9ddb9532e3..16f84aab6ab3 100644 --- a/drivers/pcmcia/pxa2xx_base.c +++ b/drivers/pcmcia/pxa2xx_base.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <asm/io.h> | 28 | #include <asm/io.h> |
29 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
30 | #include <asm/system.h> | 30 | #include <asm/system.h> |
31 | #include <mach/pxa-regs.h> | ||
32 | #include <mach/pxa2xx-regs.h> | 31 | #include <mach/pxa2xx-regs.h> |
33 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
34 | 33 | ||
@@ -39,6 +38,44 @@ | |||
39 | #include "soc_common.h" | 38 | #include "soc_common.h" |
40 | #include "pxa2xx_base.h" | 39 | #include "pxa2xx_base.h" |
41 | 40 | ||
41 | /* | ||
42 | * Personal Computer Memory Card International Association (PCMCIA) sockets | ||
43 | */ | ||
44 | |||
45 | #define PCMCIAPrtSp 0x04000000 /* PCMCIA Partition Space [byte] */ | ||
46 | #define PCMCIASp (4*PCMCIAPrtSp) /* PCMCIA Space [byte] */ | ||
47 | #define PCMCIAIOSp PCMCIAPrtSp /* PCMCIA I/O Space [byte] */ | ||
48 | #define PCMCIAAttrSp PCMCIAPrtSp /* PCMCIA Attribute Space [byte] */ | ||
49 | #define PCMCIAMemSp PCMCIAPrtSp /* PCMCIA Memory Space [byte] */ | ||
50 | |||
51 | #define PCMCIA0Sp PCMCIASp /* PCMCIA 0 Space [byte] */ | ||
52 | #define PCMCIA0IOSp PCMCIAIOSp /* PCMCIA 0 I/O Space [byte] */ | ||
53 | #define PCMCIA0AttrSp PCMCIAAttrSp /* PCMCIA 0 Attribute Space [byte] */ | ||
54 | #define PCMCIA0MemSp PCMCIAMemSp /* PCMCIA 0 Memory Space [byte] */ | ||
55 | |||
56 | #define PCMCIA1Sp PCMCIASp /* PCMCIA 1 Space [byte] */ | ||
57 | #define PCMCIA1IOSp PCMCIAIOSp /* PCMCIA 1 I/O Space [byte] */ | ||
58 | #define PCMCIA1AttrSp PCMCIAAttrSp /* PCMCIA 1 Attribute Space [byte] */ | ||
59 | #define PCMCIA1MemSp PCMCIAMemSp /* PCMCIA 1 Memory Space [byte] */ | ||
60 | |||
61 | #define _PCMCIA(Nb) /* PCMCIA [0..1] */ \ | ||
62 | (0x20000000 + (Nb) * PCMCIASp) | ||
63 | #define _PCMCIAIO(Nb) _PCMCIA(Nb) /* PCMCIA I/O [0..1] */ | ||
64 | #define _PCMCIAAttr(Nb) /* PCMCIA Attribute [0..1] */ \ | ||
65 | (_PCMCIA(Nb) + 2 * PCMCIAPrtSp) | ||
66 | #define _PCMCIAMem(Nb) /* PCMCIA Memory [0..1] */ \ | ||
67 | (_PCMCIA(Nb) + 3 * PCMCIAPrtSp) | ||
68 | |||
69 | #define _PCMCIA0 _PCMCIA(0) /* PCMCIA 0 */ | ||
70 | #define _PCMCIA0IO _PCMCIAIO(0) /* PCMCIA 0 I/O */ | ||
71 | #define _PCMCIA0Attr _PCMCIAAttr(0) /* PCMCIA 0 Attribute */ | ||
72 | #define _PCMCIA0Mem _PCMCIAMem(0) /* PCMCIA 0 Memory */ | ||
73 | |||
74 | #define _PCMCIA1 _PCMCIA(1) /* PCMCIA 1 */ | ||
75 | #define _PCMCIA1IO _PCMCIAIO(1) /* PCMCIA 1 I/O */ | ||
76 | #define _PCMCIA1Attr _PCMCIAAttr(1) /* PCMCIA 1 Attribute */ | ||
77 | #define _PCMCIA1Mem _PCMCIAMem(1) /* PCMCIA 1 Memory */ | ||
78 | |||
42 | 79 | ||
43 | #define MCXX_SETUP_MASK (0x7f) | 80 | #define MCXX_SETUP_MASK (0x7f) |
44 | #define MCXX_ASST_MASK (0x1f) | 81 | #define MCXX_ASST_MASK (0x1f) |
@@ -183,23 +220,67 @@ static void pxa2xx_configure_sockets(struct device *dev) | |||
183 | MECR &= ~MECR_NOS; | 220 | MECR &= ~MECR_NOS; |
184 | } | 221 | } |
185 | 222 | ||
223 | static const char *skt_names[] = { | ||
224 | "PCMCIA socket 0", | ||
225 | "PCMCIA socket 1", | ||
226 | }; | ||
227 | |||
228 | #define SKT_DEV_INFO_SIZE(n) \ | ||
229 | (sizeof(struct skt_dev_info) + (n)*sizeof(struct soc_pcmcia_socket)) | ||
230 | |||
186 | int __pxa2xx_drv_pcmcia_probe(struct device *dev) | 231 | int __pxa2xx_drv_pcmcia_probe(struct device *dev) |
187 | { | 232 | { |
188 | int ret; | 233 | int i, ret; |
189 | struct pcmcia_low_level *ops; | 234 | struct pcmcia_low_level *ops; |
235 | struct skt_dev_info *sinfo; | ||
236 | struct soc_pcmcia_socket *skt; | ||
190 | 237 | ||
191 | if (!dev || !dev->platform_data) | 238 | if (!dev || !dev->platform_data) |
192 | return -ENODEV; | 239 | return -ENODEV; |
193 | 240 | ||
194 | ops = (struct pcmcia_low_level *)dev->platform_data; | 241 | ops = (struct pcmcia_low_level *)dev->platform_data; |
195 | 242 | ||
243 | sinfo = kzalloc(SKT_DEV_INFO_SIZE(ops->nr), GFP_KERNEL); | ||
244 | if (!sinfo) | ||
245 | return -ENOMEM; | ||
246 | |||
247 | sinfo->nskt = ops->nr; | ||
248 | |||
249 | /* Initialize processor specific parameters */ | ||
250 | for (i = 0; i < ops->nr; i++) { | ||
251 | skt = &sinfo->skt[i]; | ||
252 | |||
253 | skt->nr = i; | ||
254 | skt->irq = NO_IRQ; | ||
255 | |||
256 | skt->res_skt.start = _PCMCIA(skt->nr); | ||
257 | skt->res_skt.end = _PCMCIA(skt->nr) + PCMCIASp - 1; | ||
258 | skt->res_skt.name = skt_names[skt->nr]; | ||
259 | skt->res_skt.flags = IORESOURCE_MEM; | ||
260 | |||
261 | skt->res_io.start = _PCMCIAIO(skt->nr); | ||
262 | skt->res_io.end = _PCMCIAIO(skt->nr) + PCMCIAIOSp - 1; | ||
263 | skt->res_io.name = "io"; | ||
264 | skt->res_io.flags = IORESOURCE_MEM | IORESOURCE_BUSY; | ||
265 | |||
266 | skt->res_mem.start = _PCMCIAMem(skt->nr); | ||
267 | skt->res_mem.end = _PCMCIAMem(skt->nr) + PCMCIAMemSp - 1; | ||
268 | skt->res_mem.name = "memory"; | ||
269 | skt->res_mem.flags = IORESOURCE_MEM; | ||
270 | |||
271 | skt->res_attr.start = _PCMCIAAttr(skt->nr); | ||
272 | skt->res_attr.end = _PCMCIAAttr(skt->nr) + PCMCIAAttrSp - 1; | ||
273 | skt->res_attr.name = "attribute"; | ||
274 | skt->res_attr.flags = IORESOURCE_MEM; | ||
275 | } | ||
276 | |||
196 | /* Provide our PXA2xx specific timing routines. */ | 277 | /* Provide our PXA2xx specific timing routines. */ |
197 | ops->set_timing = pxa2xx_pcmcia_set_timing; | 278 | ops->set_timing = pxa2xx_pcmcia_set_timing; |
198 | #ifdef CONFIG_CPU_FREQ | 279 | #ifdef CONFIG_CPU_FREQ |
199 | ops->frequency_change = pxa2xx_pcmcia_frequency_change; | 280 | ops->frequency_change = pxa2xx_pcmcia_frequency_change; |
200 | #endif | 281 | #endif |
201 | 282 | ||
202 | ret = soc_common_drv_pcmcia_probe(dev, ops, ops->first, ops->nr); | 283 | ret = soc_common_drv_pcmcia_probe(dev, ops, sinfo); |
203 | 284 | ||
204 | if (!ret) | 285 | if (!ret) |
205 | pxa2xx_configure_sockets(dev); | 286 | pxa2xx_configure_sockets(dev); |
diff --git a/drivers/pcmcia/pxa2xx_cm_x255.c b/drivers/pcmcia/pxa2xx_cm_x255.c index 7c8bcb476622..4ed64d8e95e7 100644 --- a/drivers/pcmcia/pxa2xx_cm_x255.c +++ b/drivers/pcmcia/pxa2xx_cm_x255.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
17 | 17 | ||
18 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
19 | #include <mach/pxa-regs.h> | ||
20 | 19 | ||
21 | #include "soc_common.h" | 20 | #include "soc_common.h" |
22 | 21 | ||
diff --git a/drivers/pcmcia/pxa2xx_cm_x270.c b/drivers/pcmcia/pxa2xx_cm_x270.c index 6c3aac377126..a7b943d01e34 100644 --- a/drivers/pcmcia/pxa2xx_cm_x270.c +++ b/drivers/pcmcia/pxa2xx_cm_x270.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
17 | 17 | ||
18 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
19 | #include <mach/pxa-regs.h> | ||
20 | 19 | ||
21 | #include "soc_common.h" | 20 | #include "soc_common.h" |
22 | 21 | ||
diff --git a/drivers/pcmcia/pxa2xx_e740.c b/drivers/pcmcia/pxa2xx_e740.c index f663a011bf4a..d09c0dc4a31a 100644 --- a/drivers/pcmcia/pxa2xx_e740.c +++ b/drivers/pcmcia/pxa2xx_e740.c | |||
@@ -16,8 +16,6 @@ | |||
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | 18 | ||
19 | #include <mach/hardware.h> | ||
20 | #include <mach/pxa-regs.h> | ||
21 | #include <mach/eseries-gpio.h> | 19 | #include <mach/eseries-gpio.h> |
22 | 20 | ||
23 | #include <asm/irq.h> | 21 | #include <asm/irq.h> |
diff --git a/drivers/pcmcia/pxa2xx_lubbock.c b/drivers/pcmcia/pxa2xx_lubbock.c index 37ec55df086e..6cbb1b1f7cfd 100644 --- a/drivers/pcmcia/pxa2xx_lubbock.c +++ b/drivers/pcmcia/pxa2xx_lubbock.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
25 | #include <asm/hardware/sa1111.h> | 25 | #include <asm/hardware/sa1111.h> |
26 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
27 | #include <mach/pxa-regs.h> | ||
28 | #include <mach/lubbock.h> | 27 | #include <mach/lubbock.h> |
29 | 28 | ||
30 | #include "sa1111_generic.h" | 29 | #include "sa1111_generic.h" |
diff --git a/drivers/pcmcia/pxa2xx_mainstone.c b/drivers/pcmcia/pxa2xx_mainstone.c index 877001db4916..1138551ba8f6 100644 --- a/drivers/pcmcia/pxa2xx_mainstone.c +++ b/drivers/pcmcia/pxa2xx_mainstone.c | |||
@@ -21,11 +21,10 @@ | |||
21 | 21 | ||
22 | #include <pcmcia/ss.h> | 22 | #include <pcmcia/ss.h> |
23 | 23 | ||
24 | #include <mach/hardware.h> | ||
25 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
26 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
27 | 26 | ||
28 | #include <mach/pxa-regs.h> | 27 | #include <mach/pxa2xx-regs.h> |
29 | #include <mach/mainstone.h> | 28 | #include <mach/mainstone.h> |
30 | 29 | ||
31 | #include "soc_common.h" | 30 | #include "soc_common.h" |
diff --git a/drivers/pcmcia/pxa2xx_trizeps4.c b/drivers/pcmcia/pxa2xx_trizeps4.c index 36c7a0b324d2..e0e5cb339b4a 100644 --- a/drivers/pcmcia/pxa2xx_trizeps4.c +++ b/drivers/pcmcia/pxa2xx_trizeps4.c | |||
@@ -22,8 +22,7 @@ | |||
22 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
23 | #include <asm/irq.h> | 23 | #include <asm/irq.h> |
24 | 24 | ||
25 | #include <mach/hardware.h> | 25 | #include <mach/pxa2xx-regs.h> |
26 | #include <mach/pxa-regs.h> | ||
27 | #include <mach/trizeps4.h> | 26 | #include <mach/trizeps4.h> |
28 | 27 | ||
29 | #include "soc_common.h" | 28 | #include "soc_common.h" |
diff --git a/drivers/pcmcia/pxa2xx_viper.c b/drivers/pcmcia/pxa2xx_viper.c index dd10481be7bf..17871360fe99 100644 --- a/drivers/pcmcia/pxa2xx_viper.c +++ b/drivers/pcmcia/pxa2xx_viper.c | |||
@@ -26,7 +26,6 @@ | |||
26 | 26 | ||
27 | #include <asm/irq.h> | 27 | #include <asm/irq.h> |
28 | 28 | ||
29 | #include <mach/pxa-regs.h> | ||
30 | #include <mach/viper.h> | 29 | #include <mach/viper.h> |
31 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
32 | 31 | ||
diff --git a/drivers/pcmcia/sa11xx_base.c b/drivers/pcmcia/sa11xx_base.c index 7cb1273202cc..810ac492a8c9 100644 --- a/drivers/pcmcia/sa11xx_base.c +++ b/drivers/pcmcia/sa11xx_base.c | |||
@@ -163,9 +163,55 @@ sa1100_pcmcia_show_timing(struct soc_pcmcia_socket *skt, char *buf) | |||
163 | return p - buf; | 163 | return p - buf; |
164 | } | 164 | } |
165 | 165 | ||
166 | static const char *skt_names[] = { | ||
167 | "PCMCIA socket 0", | ||
168 | "PCMCIA socket 1", | ||
169 | }; | ||
170 | |||
171 | #define SKT_DEV_INFO_SIZE(n) \ | ||
172 | (sizeof(struct skt_dev_info) + (n)*sizeof(struct soc_pcmcia_socket)) | ||
173 | |||
166 | int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, | 174 | int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, |
167 | int first, int nr) | 175 | int first, int nr) |
168 | { | 176 | { |
177 | struct skt_dev_info *sinfo; | ||
178 | struct soc_pcmcia_socket *skt; | ||
179 | int i; | ||
180 | |||
181 | sinfo = kzalloc(SKT_DEV_INFO_SIZE(nr), GFP_KERNEL); | ||
182 | if (!sinfo) | ||
183 | return -ENOMEM; | ||
184 | |||
185 | sinfo->nskt = nr; | ||
186 | |||
187 | /* Initiliaze processor specific parameters */ | ||
188 | for (i = 0; i < nr; i++) { | ||
189 | skt = &sinfo->skt[i]; | ||
190 | |||
191 | skt->nr = first + i; | ||
192 | skt->irq = NO_IRQ; | ||
193 | |||
194 | skt->res_skt.start = _PCMCIA(skt->nr); | ||
195 | skt->res_skt.end = _PCMCIA(skt->nr) + PCMCIASp - 1; | ||
196 | skt->res_skt.name = skt_names[skt->nr]; | ||
197 | skt->res_skt.flags = IORESOURCE_MEM; | ||
198 | |||
199 | skt->res_io.start = _PCMCIAIO(skt->nr); | ||
200 | skt->res_io.end = _PCMCIAIO(skt->nr) + PCMCIAIOSp - 1; | ||
201 | skt->res_io.name = "io"; | ||
202 | skt->res_io.flags = IORESOURCE_MEM | IORESOURCE_BUSY; | ||
203 | |||
204 | skt->res_mem.start = _PCMCIAMem(skt->nr); | ||
205 | skt->res_mem.end = _PCMCIAMem(skt->nr) + PCMCIAMemSp - 1; | ||
206 | skt->res_mem.name = "memory"; | ||
207 | skt->res_mem.flags = IORESOURCE_MEM; | ||
208 | |||
209 | skt->res_attr.start = _PCMCIAAttr(skt->nr); | ||
210 | skt->res_attr.end = _PCMCIAAttr(skt->nr) + PCMCIAAttrSp - 1; | ||
211 | skt->res_attr.name = "attribute"; | ||
212 | skt->res_attr.flags = IORESOURCE_MEM; | ||
213 | } | ||
214 | |||
169 | /* | 215 | /* |
170 | * set default MECR calculation if the board specific | 216 | * set default MECR calculation if the board specific |
171 | * code did not specify one... | 217 | * code did not specify one... |
@@ -180,7 +226,7 @@ int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, | |||
180 | ops->frequency_change = sa1100_pcmcia_frequency_change; | 226 | ops->frequency_change = sa1100_pcmcia_frequency_change; |
181 | #endif | 227 | #endif |
182 | 228 | ||
183 | return soc_common_drv_pcmcia_probe(dev, ops, first, nr); | 229 | return soc_common_drv_pcmcia_probe(dev, ops, sinfo); |
184 | } | 230 | } |
185 | EXPORT_SYMBOL(sa11xx_drv_pcmcia_probe); | 231 | EXPORT_SYMBOL(sa11xx_drv_pcmcia_probe); |
186 | 232 | ||
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c index f49ac6666153..163cf98e2386 100644 --- a/drivers/pcmcia/soc_common.c +++ b/drivers/pcmcia/soc_common.c | |||
@@ -49,11 +49,6 @@ | |||
49 | 49 | ||
50 | #include "soc_common.h" | 50 | #include "soc_common.h" |
51 | 51 | ||
52 | /* FIXME: platform dependent resource declaration has to move out of this file */ | ||
53 | #ifdef CONFIG_ARCH_PXA | ||
54 | #include <mach/pxa-regs.h> | ||
55 | #endif | ||
56 | |||
57 | #ifdef CONFIG_PCMCIA_DEBUG | 52 | #ifdef CONFIG_PCMCIA_DEBUG |
58 | 53 | ||
59 | static int pc_debug; | 54 | static int pc_debug; |
@@ -581,19 +576,6 @@ EXPORT_SYMBOL(soc_pcmcia_enable_irqs); | |||
581 | LIST_HEAD(soc_pcmcia_sockets); | 576 | LIST_HEAD(soc_pcmcia_sockets); |
582 | static DEFINE_MUTEX(soc_pcmcia_sockets_lock); | 577 | static DEFINE_MUTEX(soc_pcmcia_sockets_lock); |
583 | 578 | ||
584 | static const char *skt_names[] = { | ||
585 | "PCMCIA socket 0", | ||
586 | "PCMCIA socket 1", | ||
587 | }; | ||
588 | |||
589 | struct skt_dev_info { | ||
590 | int nskt; | ||
591 | struct soc_pcmcia_socket skt[0]; | ||
592 | }; | ||
593 | |||
594 | #define SKT_DEV_INFO_SIZE(n) \ | ||
595 | (sizeof(struct skt_dev_info) + (n)*sizeof(struct soc_pcmcia_socket)) | ||
596 | |||
597 | #ifdef CONFIG_CPU_FREQ | 579 | #ifdef CONFIG_CPU_FREQ |
598 | static int | 580 | static int |
599 | soc_pcmcia_notifier(struct notifier_block *nb, unsigned long val, void *data) | 581 | soc_pcmcia_notifier(struct notifier_block *nb, unsigned long val, void *data) |
@@ -637,26 +619,18 @@ static int soc_pcmcia_cpufreq_register(void) { return 0; } | |||
637 | static void soc_pcmcia_cpufreq_unregister(void) {} | 619 | static void soc_pcmcia_cpufreq_unregister(void) {} |
638 | #endif | 620 | #endif |
639 | 621 | ||
640 | int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, int first, int nr) | 622 | int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, |
623 | struct skt_dev_info *sinfo) | ||
641 | { | 624 | { |
642 | struct skt_dev_info *sinfo; | ||
643 | struct soc_pcmcia_socket *skt; | 625 | struct soc_pcmcia_socket *skt; |
644 | int ret, i; | 626 | int ret, i; |
645 | 627 | ||
646 | mutex_lock(&soc_pcmcia_sockets_lock); | 628 | mutex_lock(&soc_pcmcia_sockets_lock); |
647 | 629 | ||
648 | sinfo = kzalloc(SKT_DEV_INFO_SIZE(nr), GFP_KERNEL); | ||
649 | if (!sinfo) { | ||
650 | ret = -ENOMEM; | ||
651 | goto out; | ||
652 | } | ||
653 | |||
654 | sinfo->nskt = nr; | ||
655 | |||
656 | /* | 630 | /* |
657 | * Initialise the per-socket structure. | 631 | * Initialise the per-socket structure. |
658 | */ | 632 | */ |
659 | for (i = 0; i < nr; i++) { | 633 | for (i = 0; i < sinfo->nskt; i++) { |
660 | skt = &sinfo->skt[i]; | 634 | skt = &sinfo->skt[i]; |
661 | 635 | ||
662 | skt->socket.ops = &soc_common_pcmcia_operations; | 636 | skt->socket.ops = &soc_common_pcmcia_operations; |
@@ -668,43 +642,21 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops | |||
668 | skt->poll_timer.data = (unsigned long)skt; | 642 | skt->poll_timer.data = (unsigned long)skt; |
669 | skt->poll_timer.expires = jiffies + SOC_PCMCIA_POLL_PERIOD; | 643 | skt->poll_timer.expires = jiffies + SOC_PCMCIA_POLL_PERIOD; |
670 | 644 | ||
671 | skt->nr = first + i; | ||
672 | skt->irq = NO_IRQ; | ||
673 | skt->dev = dev; | 645 | skt->dev = dev; |
674 | skt->ops = ops; | 646 | skt->ops = ops; |
675 | 647 | ||
676 | skt->res_skt.start = _PCMCIA(skt->nr); | ||
677 | skt->res_skt.end = _PCMCIA(skt->nr) + PCMCIASp - 1; | ||
678 | skt->res_skt.name = skt_names[skt->nr]; | ||
679 | skt->res_skt.flags = IORESOURCE_MEM; | ||
680 | |||
681 | ret = request_resource(&iomem_resource, &skt->res_skt); | 648 | ret = request_resource(&iomem_resource, &skt->res_skt); |
682 | if (ret) | 649 | if (ret) |
683 | goto out_err_1; | 650 | goto out_err_1; |
684 | 651 | ||
685 | skt->res_io.start = _PCMCIAIO(skt->nr); | ||
686 | skt->res_io.end = _PCMCIAIO(skt->nr) + PCMCIAIOSp - 1; | ||
687 | skt->res_io.name = "io"; | ||
688 | skt->res_io.flags = IORESOURCE_MEM | IORESOURCE_BUSY; | ||
689 | |||
690 | ret = request_resource(&skt->res_skt, &skt->res_io); | 652 | ret = request_resource(&skt->res_skt, &skt->res_io); |
691 | if (ret) | 653 | if (ret) |
692 | goto out_err_2; | 654 | goto out_err_2; |
693 | 655 | ||
694 | skt->res_mem.start = _PCMCIAMem(skt->nr); | ||
695 | skt->res_mem.end = _PCMCIAMem(skt->nr) + PCMCIAMemSp - 1; | ||
696 | skt->res_mem.name = "memory"; | ||
697 | skt->res_mem.flags = IORESOURCE_MEM; | ||
698 | |||
699 | ret = request_resource(&skt->res_skt, &skt->res_mem); | 656 | ret = request_resource(&skt->res_skt, &skt->res_mem); |
700 | if (ret) | 657 | if (ret) |
701 | goto out_err_3; | 658 | goto out_err_3; |
702 | 659 | ||
703 | skt->res_attr.start = _PCMCIAAttr(skt->nr); | ||
704 | skt->res_attr.end = _PCMCIAAttr(skt->nr) + PCMCIAAttrSp - 1; | ||
705 | skt->res_attr.name = "attribute"; | ||
706 | skt->res_attr.flags = IORESOURCE_MEM; | ||
707 | |||
708 | ret = request_resource(&skt->res_skt, &skt->res_attr); | 660 | ret = request_resource(&skt->res_skt, &skt->res_attr); |
709 | if (ret) | 661 | if (ret) |
710 | goto out_err_4; | 662 | goto out_err_4; |
diff --git a/drivers/pcmcia/soc_common.h b/drivers/pcmcia/soc_common.h index 38c67375f363..290e143839ee 100644 --- a/drivers/pcmcia/soc_common.h +++ b/drivers/pcmcia/soc_common.h | |||
@@ -58,6 +58,11 @@ struct soc_pcmcia_socket { | |||
58 | struct list_head node; | 58 | struct list_head node; |
59 | }; | 59 | }; |
60 | 60 | ||
61 | struct skt_dev_info { | ||
62 | int nskt; | ||
63 | struct soc_pcmcia_socket skt[0]; | ||
64 | }; | ||
65 | |||
61 | struct pcmcia_state { | 66 | struct pcmcia_state { |
62 | unsigned detect: 1, | 67 | unsigned detect: 1, |
63 | ready: 1, | 68 | ready: 1, |
@@ -132,7 +137,7 @@ extern void soc_common_pcmcia_get_timing(struct soc_pcmcia_socket *, struct soc_ | |||
132 | 137 | ||
133 | extern struct list_head soc_pcmcia_sockets; | 138 | extern struct list_head soc_pcmcia_sockets; |
134 | 139 | ||
135 | extern int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, int first, int nr); | 140 | extern int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, struct skt_dev_info *sinfo); |
136 | extern int soc_common_drv_pcmcia_remove(struct device *dev); | 141 | extern int soc_common_drv_pcmcia_remove(struct device *dev); |
137 | 142 | ||
138 | 143 | ||
diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c index d26a5f82aaba..4f247e4dd3f9 100644 --- a/drivers/rtc/rtc-sa1100.c +++ b/drivers/rtc/rtc-sa1100.c | |||
@@ -35,7 +35,8 @@ | |||
35 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
36 | 36 | ||
37 | #ifdef CONFIG_ARCH_PXA | 37 | #ifdef CONFIG_ARCH_PXA |
38 | #include <mach/pxa-regs.h> | 38 | #include <mach/regs-rtc.h> |
39 | #include <mach/regs-ost.h> | ||
39 | #endif | 40 | #endif |
40 | 41 | ||
41 | #define RTC_DEF_DIVIDER 32768 - 1 | 42 | #define RTC_DEF_DIVIDER 32768 - 1 |
diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c index 68a64123af8f..8ee01b907332 100644 --- a/drivers/scsi/arm/cumana_2.c +++ b/drivers/scsi/arm/cumana_2.c | |||
@@ -390,7 +390,8 @@ static struct scsi_host_template cumanascsi2_template = { | |||
390 | .eh_abort_handler = fas216_eh_abort, | 390 | .eh_abort_handler = fas216_eh_abort, |
391 | .can_queue = 1, | 391 | .can_queue = 1, |
392 | .this_id = 7, | 392 | .this_id = 7, |
393 | .sg_tablesize = SG_ALL, | 393 | .sg_tablesize = SCSI_MAX_SG_CHAIN_SEGMENTS, |
394 | .dma_boundary = IOMD_DMA_BOUNDARY, | ||
394 | .cmd_per_lun = 1, | 395 | .cmd_per_lun = 1, |
395 | .use_clustering = DISABLE_CLUSTERING, | 396 | .use_clustering = DISABLE_CLUSTERING, |
396 | .proc_name = "cumanascsi2", | 397 | .proc_name = "cumanascsi2", |
diff --git a/drivers/scsi/arm/eesox.c b/drivers/scsi/arm/eesox.c index bb2477b3fb0b..d8435132f461 100644 --- a/drivers/scsi/arm/eesox.c +++ b/drivers/scsi/arm/eesox.c | |||
@@ -508,7 +508,8 @@ static struct scsi_host_template eesox_template = { | |||
508 | .eh_abort_handler = fas216_eh_abort, | 508 | .eh_abort_handler = fas216_eh_abort, |
509 | .can_queue = 1, | 509 | .can_queue = 1, |
510 | .this_id = 7, | 510 | .this_id = 7, |
511 | .sg_tablesize = SG_ALL, | 511 | .sg_tablesize = SCSI_MAX_SG_CHAIN_SEGMENTS, |
512 | .dma_boundary = IOMD_DMA_BOUNDARY, | ||
512 | .cmd_per_lun = 1, | 513 | .cmd_per_lun = 1, |
513 | .use_clustering = DISABLE_CLUSTERING, | 514 | .use_clustering = DISABLE_CLUSTERING, |
514 | .proc_name = "eesox", | 515 | .proc_name = "eesox", |
diff --git a/drivers/scsi/arm/powertec.c b/drivers/scsi/arm/powertec.c index d9a546d1917c..e2297b4c1b9e 100644 --- a/drivers/scsi/arm/powertec.c +++ b/drivers/scsi/arm/powertec.c | |||
@@ -302,7 +302,8 @@ static struct scsi_host_template powertecscsi_template = { | |||
302 | 302 | ||
303 | .can_queue = 8, | 303 | .can_queue = 8, |
304 | .this_id = 7, | 304 | .this_id = 7, |
305 | .sg_tablesize = SG_ALL, | 305 | .sg_tablesize = SCSI_MAX_SG_CHAIN_SEGMENTS, |
306 | .dma_boundary = IOMD_DMA_BOUNDARY, | ||
306 | .cmd_per_lun = 2, | 307 | .cmd_per_lun = 2, |
307 | .use_clustering = ENABLE_CLUSTERING, | 308 | .use_clustering = ENABLE_CLUSTERING, |
308 | .proc_name = "powertec", | 309 | .proc_name = "powertec", |
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c index f6e3b86bb0be..a48a8a13d87b 100644 --- a/drivers/serial/pxa.c +++ b/drivers/serial/pxa.c | |||
@@ -43,13 +43,7 @@ | |||
43 | #include <linux/tty_flip.h> | 43 | #include <linux/tty_flip.h> |
44 | #include <linux/serial_core.h> | 44 | #include <linux/serial_core.h> |
45 | #include <linux/clk.h> | 45 | #include <linux/clk.h> |
46 | 46 | #include <linux/io.h> | |
47 | #include <asm/io.h> | ||
48 | #include <mach/hardware.h> | ||
49 | #include <asm/irq.h> | ||
50 | #include <mach/pxa-regs.h> | ||
51 | #include <mach/regs-uart.h> | ||
52 | |||
53 | 47 | ||
54 | struct uart_pxa_port { | 48 | struct uart_pxa_port { |
55 | struct uart_port port; | 49 | struct uart_port port; |
@@ -491,7 +485,7 @@ serial_pxa_set_termios(struct uart_port *port, struct ktermios *termios, | |||
491 | * Ensure the port will be enabled. | 485 | * Ensure the port will be enabled. |
492 | * This is required especially for serial console. | 486 | * This is required especially for serial console. |
493 | */ | 487 | */ |
494 | up->ier |= IER_UUE; | 488 | up->ier |= UART_IER_UUE; |
495 | 489 | ||
496 | /* | 490 | /* |
497 | * Update the per-port timeout. | 491 | * Update the per-port timeout. |
@@ -784,19 +778,15 @@ static int serial_pxa_probe(struct platform_device *dev) | |||
784 | sport->port.flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF; | 778 | sport->port.flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF; |
785 | sport->port.uartclk = clk_get_rate(sport->clk); | 779 | sport->port.uartclk = clk_get_rate(sport->clk); |
786 | 780 | ||
787 | /* | 781 | switch (dev->id) { |
788 | * Is it worth keeping this? | 782 | case 0: sport->name = "FFUART"; break; |
789 | */ | 783 | case 1: sport->name = "BTUART"; break; |
790 | if (mmres->start == __PREG(FFUART)) | 784 | case 2: sport->name = "STUART"; break; |
791 | sport->name = "FFUART"; | 785 | case 3: sport->name = "HWUART"; break; |
792 | else if (mmres->start == __PREG(BTUART)) | 786 | default: |
793 | sport->name = "BTUART"; | ||
794 | else if (mmres->start == __PREG(STUART)) | ||
795 | sport->name = "STUART"; | ||
796 | else if (mmres->start == __PREG(HWUART)) | ||
797 | sport->name = "HWUART"; | ||
798 | else | ||
799 | sport->name = "???"; | 787 | sport->name = "???"; |
788 | break; | ||
789 | } | ||
800 | 790 | ||
801 | sport->port.membase = ioremap(mmres->start, mmres->end - mmres->start + 1); | 791 | sport->port.membase = ioremap(mmres->start, mmres->end - mmres->start + 1); |
802 | if (!sport->port.membase) { | 792 | if (!sport->port.membase) { |
diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c index d0fc4ca2f656..d22fac27219a 100644 --- a/drivers/spi/pxa2xx_spi.c +++ b/drivers/spi/pxa2xx_spi.c | |||
@@ -34,8 +34,6 @@ | |||
34 | #include <asm/delay.h> | 34 | #include <asm/delay.h> |
35 | 35 | ||
36 | #include <mach/dma.h> | 36 | #include <mach/dma.h> |
37 | #include <mach/hardware.h> | ||
38 | #include <mach/pxa-regs.h> | ||
39 | #include <mach/regs-ssp.h> | 37 | #include <mach/regs-ssp.h> |
40 | #include <mach/ssp.h> | 38 | #include <mach/ssp.h> |
41 | #include <mach/pxa2xx_spi.h> | 39 | #include <mach/pxa2xx_spi.h> |
diff --git a/drivers/usb/host/ohci-ep93xx.c b/drivers/usb/host/ohci-ep93xx.c index fb3055f084b5..7cf74f8c2db1 100644 --- a/drivers/usb/host/ohci-ep93xx.c +++ b/drivers/usb/host/ohci-ep93xx.c | |||
@@ -28,8 +28,6 @@ | |||
28 | #include <linux/signal.h> | 28 | #include <linux/signal.h> |
29 | #include <linux/platform_device.h> | 29 | #include <linux/platform_device.h> |
30 | 30 | ||
31 | #include <mach/hardware.h> | ||
32 | |||
33 | static struct clk *usb_host_clock; | 31 | static struct clk *usb_host_clock; |
34 | 32 | ||
35 | static void ep93xx_start_hc(struct device *dev) | 33 | static void ep93xx_start_hc(struct device *dev) |
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 967ac3d359a6..330204a61ea8 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -2131,6 +2131,20 @@ config FB_MX3 | |||
2131 | far only synchronous displays are supported. If you plan to use | 2131 | far only synchronous displays are supported. If you plan to use |
2132 | an LCD display with your i.MX31 system, say Y here. | 2132 | an LCD display with your i.MX31 system, say Y here. |
2133 | 2133 | ||
2134 | config FB_BROADSHEET | ||
2135 | tristate "E-Ink Broadsheet/Epson S1D13521 controller support" | ||
2136 | depends on FB | ||
2137 | select FB_SYS_FILLRECT | ||
2138 | select FB_SYS_COPYAREA | ||
2139 | select FB_SYS_IMAGEBLIT | ||
2140 | select FB_SYS_FOPS | ||
2141 | select FB_DEFERRED_IO | ||
2142 | help | ||
2143 | This driver implements support for the E-Ink Broadsheet | ||
2144 | controller. The release name for this device was Epson S1D13521 | ||
2145 | and could also have been called by other names when coupled with | ||
2146 | a bridge adapter. | ||
2147 | |||
2134 | source "drivers/video/omap/Kconfig" | 2148 | source "drivers/video/omap/Kconfig" |
2135 | 2149 | ||
2136 | source "drivers/video/backlight/Kconfig" | 2150 | source "drivers/video/backlight/Kconfig" |
diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 2a998ca6181d..edd5a85c1eb5 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile | |||
@@ -106,6 +106,7 @@ obj-$(CONFIG_FB_PMAG_BA) += pmag-ba-fb.o | |||
106 | obj-$(CONFIG_FB_PMAGB_B) += pmagb-b-fb.o | 106 | obj-$(CONFIG_FB_PMAGB_B) += pmagb-b-fb.o |
107 | obj-$(CONFIG_FB_MAXINE) += maxinefb.o | 107 | obj-$(CONFIG_FB_MAXINE) += maxinefb.o |
108 | obj-$(CONFIG_FB_METRONOME) += metronomefb.o | 108 | obj-$(CONFIG_FB_METRONOME) += metronomefb.o |
109 | obj-$(CONFIG_FB_BROADSHEET) += broadsheetfb.o | ||
109 | obj-$(CONFIG_FB_S1D13XXX) += s1d13xxxfb.o | 110 | obj-$(CONFIG_FB_S1D13XXX) += s1d13xxxfb.o |
110 | obj-$(CONFIG_FB_SH7760) += sh7760fb.o | 111 | obj-$(CONFIG_FB_SH7760) += sh7760fb.o |
111 | obj-$(CONFIG_FB_IMX) += imxfb.o | 112 | obj-$(CONFIG_FB_IMX) += imxfb.o |
diff --git a/drivers/video/broadsheetfb.c b/drivers/video/broadsheetfb.c new file mode 100644 index 000000000000..509cb92e8731 --- /dev/null +++ b/drivers/video/broadsheetfb.c | |||
@@ -0,0 +1,568 @@ | |||
1 | /* | ||
2 | * broadsheetfb.c -- FB driver for E-Ink Broadsheet controller | ||
3 | * | ||
4 | * Copyright (C) 2008, Jaya Kumar | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file COPYING in the main directory of this archive for | ||
8 | * more details. | ||
9 | * | ||
10 | * Layout is based on skeletonfb.c by James Simmons and Geert Uytterhoeven. | ||
11 | * | ||
12 | * This driver is written to be used with the Broadsheet display controller. | ||
13 | * | ||
14 | * It is intended to be architecture independent. A board specific driver | ||
15 | * must be used to perform all the physical IO interactions. | ||
16 | * | ||
17 | */ | ||
18 | |||
19 | #include <linux/module.h> | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/errno.h> | ||
22 | #include <linux/string.h> | ||
23 | #include <linux/mm.h> | ||
24 | #include <linux/slab.h> | ||
25 | #include <linux/vmalloc.h> | ||
26 | #include <linux/delay.h> | ||
27 | #include <linux/interrupt.h> | ||
28 | #include <linux/fb.h> | ||
29 | #include <linux/init.h> | ||
30 | #include <linux/platform_device.h> | ||
31 | #include <linux/list.h> | ||
32 | #include <linux/uaccess.h> | ||
33 | |||
34 | #include <video/broadsheetfb.h> | ||
35 | |||
36 | /* Display specific information */ | ||
37 | #define DPY_W 800 | ||
38 | #define DPY_H 600 | ||
39 | |||
40 | static struct fb_fix_screeninfo broadsheetfb_fix __devinitdata = { | ||
41 | .id = "broadsheetfb", | ||
42 | .type = FB_TYPE_PACKED_PIXELS, | ||
43 | .visual = FB_VISUAL_STATIC_PSEUDOCOLOR, | ||
44 | .xpanstep = 0, | ||
45 | .ypanstep = 0, | ||
46 | .ywrapstep = 0, | ||
47 | .line_length = DPY_W, | ||
48 | .accel = FB_ACCEL_NONE, | ||
49 | }; | ||
50 | |||
51 | static struct fb_var_screeninfo broadsheetfb_var __devinitdata = { | ||
52 | .xres = DPY_W, | ||
53 | .yres = DPY_H, | ||
54 | .xres_virtual = DPY_W, | ||
55 | .yres_virtual = DPY_H, | ||
56 | .bits_per_pixel = 8, | ||
57 | .grayscale = 1, | ||
58 | .red = { 0, 4, 0 }, | ||
59 | .green = { 0, 4, 0 }, | ||
60 | .blue = { 0, 4, 0 }, | ||
61 | .transp = { 0, 0, 0 }, | ||
62 | }; | ||
63 | |||
64 | /* main broadsheetfb functions */ | ||
65 | static void broadsheet_issue_data(struct broadsheetfb_par *par, u16 data) | ||
66 | { | ||
67 | par->board->set_ctl(par, BS_WR, 0); | ||
68 | par->board->set_hdb(par, data); | ||
69 | par->board->set_ctl(par, BS_WR, 1); | ||
70 | } | ||
71 | |||
72 | static void broadsheet_issue_cmd(struct broadsheetfb_par *par, u16 data) | ||
73 | { | ||
74 | par->board->set_ctl(par, BS_DC, 0); | ||
75 | broadsheet_issue_data(par, data); | ||
76 | } | ||
77 | |||
78 | static void broadsheet_send_command(struct broadsheetfb_par *par, u16 data) | ||
79 | { | ||
80 | par->board->wait_for_rdy(par); | ||
81 | |||
82 | par->board->set_ctl(par, BS_CS, 0); | ||
83 | broadsheet_issue_cmd(par, data); | ||
84 | par->board->set_ctl(par, BS_DC, 1); | ||
85 | par->board->set_ctl(par, BS_CS, 1); | ||
86 | } | ||
87 | |||
88 | static void broadsheet_send_cmdargs(struct broadsheetfb_par *par, u16 cmd, | ||
89 | int argc, u16 *argv) | ||
90 | { | ||
91 | int i; | ||
92 | |||
93 | par->board->wait_for_rdy(par); | ||
94 | |||
95 | par->board->set_ctl(par, BS_CS, 0); | ||
96 | broadsheet_issue_cmd(par, cmd); | ||
97 | par->board->set_ctl(par, BS_DC, 1); | ||
98 | |||
99 | for (i = 0; i < argc; i++) | ||
100 | broadsheet_issue_data(par, argv[i]); | ||
101 | par->board->set_ctl(par, BS_CS, 1); | ||
102 | } | ||
103 | |||
104 | static void broadsheet_burst_write(struct broadsheetfb_par *par, int size, | ||
105 | u16 *data) | ||
106 | { | ||
107 | int i; | ||
108 | u16 tmp; | ||
109 | |||
110 | par->board->set_ctl(par, BS_CS, 0); | ||
111 | par->board->set_ctl(par, BS_DC, 1); | ||
112 | |||
113 | for (i = 0; i < size; i++) { | ||
114 | par->board->set_ctl(par, BS_WR, 0); | ||
115 | tmp = (data[i] & 0x0F) << 4; | ||
116 | tmp |= (data[i] & 0x0F00) << 4; | ||
117 | par->board->set_hdb(par, tmp); | ||
118 | par->board->set_ctl(par, BS_WR, 1); | ||
119 | } | ||
120 | |||
121 | par->board->set_ctl(par, BS_CS, 1); | ||
122 | } | ||
123 | |||
124 | static u16 broadsheet_get_data(struct broadsheetfb_par *par) | ||
125 | { | ||
126 | u16 res; | ||
127 | /* wait for ready to go hi. (lo is busy) */ | ||
128 | par->board->wait_for_rdy(par); | ||
129 | |||
130 | /* cs lo, dc lo for cmd, we lo for each data, db as usual */ | ||
131 | par->board->set_ctl(par, BS_DC, 1); | ||
132 | par->board->set_ctl(par, BS_CS, 0); | ||
133 | par->board->set_ctl(par, BS_WR, 0); | ||
134 | |||
135 | res = par->board->get_hdb(par); | ||
136 | |||
137 | /* strobe wr */ | ||
138 | par->board->set_ctl(par, BS_WR, 1); | ||
139 | par->board->set_ctl(par, BS_CS, 1); | ||
140 | |||
141 | return res; | ||
142 | } | ||
143 | |||
144 | static void broadsheet_write_reg(struct broadsheetfb_par *par, u16 reg, | ||
145 | u16 data) | ||
146 | { | ||
147 | /* wait for ready to go hi. (lo is busy) */ | ||
148 | par->board->wait_for_rdy(par); | ||
149 | |||
150 | /* cs lo, dc lo for cmd, we lo for each data, db as usual */ | ||
151 | par->board->set_ctl(par, BS_CS, 0); | ||
152 | |||
153 | broadsheet_issue_cmd(par, BS_CMD_WR_REG); | ||
154 | |||
155 | par->board->set_ctl(par, BS_DC, 1); | ||
156 | |||
157 | broadsheet_issue_data(par, reg); | ||
158 | broadsheet_issue_data(par, data); | ||
159 | |||
160 | par->board->set_ctl(par, BS_CS, 1); | ||
161 | } | ||
162 | |||
163 | static u16 broadsheet_read_reg(struct broadsheetfb_par *par, u16 reg) | ||
164 | { | ||
165 | broadsheet_send_command(par, reg); | ||
166 | msleep(100); | ||
167 | return broadsheet_get_data(par); | ||
168 | } | ||
169 | |||
170 | static void __devinit broadsheet_init_display(struct broadsheetfb_par *par) | ||
171 | { | ||
172 | u16 args[5]; | ||
173 | |||
174 | args[0] = DPY_W; | ||
175 | args[1] = DPY_H; | ||
176 | args[2] = (100 | (1 << 8) | (1 << 9)); /* sdcfg */ | ||
177 | args[3] = 2; /* gdrv cfg */ | ||
178 | args[4] = (4 | (1 << 7)); /* lut index format */ | ||
179 | broadsheet_send_cmdargs(par, BS_CMD_INIT_DSPE_CFG, 5, args); | ||
180 | |||
181 | /* did the controller really set it? */ | ||
182 | broadsheet_send_cmdargs(par, BS_CMD_INIT_DSPE_CFG, 5, args); | ||
183 | |||
184 | args[0] = 4; /* fsync len */ | ||
185 | args[1] = (10 << 8) | 4; /* fend/fbegin len */ | ||
186 | args[2] = 10; /* line sync len */ | ||
187 | args[3] = (100 << 8) | 4; /* line end/begin len */ | ||
188 | args[4] = 6; /* pixel clock cfg */ | ||
189 | broadsheet_send_cmdargs(par, BS_CMD_INIT_DSPE_TMG, 5, args); | ||
190 | |||
191 | /* setup waveform */ | ||
192 | args[0] = 0x886; | ||
193 | args[1] = 0; | ||
194 | broadsheet_send_cmdargs(par, BS_CMD_RD_WFM_INFO, 2, args); | ||
195 | |||
196 | broadsheet_send_command(par, BS_CMD_UPD_GDRV_CLR); | ||
197 | |||
198 | broadsheet_send_command(par, BS_CMD_WAIT_DSPE_TRG); | ||
199 | |||
200 | broadsheet_write_reg(par, 0x330, 0x84); | ||
201 | |||
202 | broadsheet_send_command(par, BS_CMD_WAIT_DSPE_TRG); | ||
203 | |||
204 | args[0] = (0x3 << 4); | ||
205 | broadsheet_send_cmdargs(par, BS_CMD_LD_IMG, 1, args); | ||
206 | |||
207 | args[0] = 0x154; | ||
208 | broadsheet_send_cmdargs(par, BS_CMD_WR_REG, 1, args); | ||
209 | |||
210 | broadsheet_burst_write(par, DPY_W*DPY_H/2, | ||
211 | (u16 *) par->info->screen_base); | ||
212 | |||
213 | broadsheet_send_command(par, BS_CMD_LD_IMG_END); | ||
214 | |||
215 | args[0] = 0x4300; | ||
216 | broadsheet_send_cmdargs(par, BS_CMD_UPD_FULL, 1, args); | ||
217 | |||
218 | broadsheet_send_command(par, BS_CMD_WAIT_DSPE_TRG); | ||
219 | |||
220 | broadsheet_send_command(par, BS_CMD_WAIT_DSPE_FREND); | ||
221 | |||
222 | par->board->wait_for_rdy(par); | ||
223 | } | ||
224 | |||
225 | static void __devinit broadsheet_init(struct broadsheetfb_par *par) | ||
226 | { | ||
227 | broadsheet_send_command(par, BS_CMD_INIT_SYS_RUN); | ||
228 | /* the controller needs a second */ | ||
229 | msleep(1000); | ||
230 | broadsheet_init_display(par); | ||
231 | } | ||
232 | |||
233 | static void broadsheetfb_dpy_update_pages(struct broadsheetfb_par *par, | ||
234 | u16 y1, u16 y2) | ||
235 | { | ||
236 | u16 args[5]; | ||
237 | unsigned char *buf = (unsigned char *)par->info->screen_base; | ||
238 | |||
239 | /* y1 must be a multiple of 4 so drop the lower bits */ | ||
240 | y1 &= 0xFFFC; | ||
241 | /* y2 must be a multiple of 4 , but - 1 so up the lower bits */ | ||
242 | y2 |= 0x0003; | ||
243 | |||
244 | args[0] = 0x3 << 4; | ||
245 | args[1] = 0; | ||
246 | args[2] = y1; | ||
247 | args[3] = cpu_to_le16(par->info->var.xres); | ||
248 | args[4] = y2; | ||
249 | broadsheet_send_cmdargs(par, BS_CMD_LD_IMG_AREA, 5, args); | ||
250 | |||
251 | args[0] = 0x154; | ||
252 | broadsheet_send_cmdargs(par, BS_CMD_WR_REG, 1, args); | ||
253 | |||
254 | buf += y1 * par->info->var.xres; | ||
255 | broadsheet_burst_write(par, ((1 + y2 - y1) * par->info->var.xres)/2, | ||
256 | (u16 *) buf); | ||
257 | |||
258 | broadsheet_send_command(par, BS_CMD_LD_IMG_END); | ||
259 | |||
260 | args[0] = 0x4300; | ||
261 | broadsheet_send_cmdargs(par, BS_CMD_UPD_FULL, 1, args); | ||
262 | |||
263 | broadsheet_send_command(par, BS_CMD_WAIT_DSPE_TRG); | ||
264 | |||
265 | broadsheet_send_command(par, BS_CMD_WAIT_DSPE_FREND); | ||
266 | |||
267 | par->board->wait_for_rdy(par); | ||
268 | |||
269 | } | ||
270 | |||
271 | static void broadsheetfb_dpy_update(struct broadsheetfb_par *par) | ||
272 | { | ||
273 | u16 args[5]; | ||
274 | |||
275 | args[0] = 0x3 << 4; | ||
276 | broadsheet_send_cmdargs(par, BS_CMD_LD_IMG, 1, args); | ||
277 | |||
278 | args[0] = 0x154; | ||
279 | broadsheet_send_cmdargs(par, BS_CMD_WR_REG, 1, args); | ||
280 | broadsheet_burst_write(par, DPY_W*DPY_H/2, | ||
281 | (u16 *) par->info->screen_base); | ||
282 | |||
283 | broadsheet_send_command(par, BS_CMD_LD_IMG_END); | ||
284 | |||
285 | args[0] = 0x4300; | ||
286 | broadsheet_send_cmdargs(par, BS_CMD_UPD_FULL, 1, args); | ||
287 | |||
288 | broadsheet_send_command(par, BS_CMD_WAIT_DSPE_TRG); | ||
289 | |||
290 | broadsheet_send_command(par, BS_CMD_WAIT_DSPE_FREND); | ||
291 | |||
292 | par->board->wait_for_rdy(par); | ||
293 | |||
294 | } | ||
295 | |||
296 | /* this is called back from the deferred io workqueue */ | ||
297 | static void broadsheetfb_dpy_deferred_io(struct fb_info *info, | ||
298 | struct list_head *pagelist) | ||
299 | { | ||
300 | u16 y1 = 0, h = 0; | ||
301 | int prev_index = -1; | ||
302 | struct page *cur; | ||
303 | struct fb_deferred_io *fbdefio = info->fbdefio; | ||
304 | int h_inc; | ||
305 | u16 yres = info->var.yres; | ||
306 | u16 xres = info->var.xres; | ||
307 | |||
308 | /* height increment is fixed per page */ | ||
309 | h_inc = DIV_ROUND_UP(PAGE_SIZE , xres); | ||
310 | |||
311 | /* walk the written page list and swizzle the data */ | ||
312 | list_for_each_entry(cur, &fbdefio->pagelist, lru) { | ||
313 | if (prev_index < 0) { | ||
314 | /* just starting so assign first page */ | ||
315 | y1 = (cur->index << PAGE_SHIFT) / xres; | ||
316 | h = h_inc; | ||
317 | } else if ((prev_index + 1) == cur->index) { | ||
318 | /* this page is consecutive so increase our height */ | ||
319 | h += h_inc; | ||
320 | } else { | ||
321 | /* page not consecutive, issue previous update first */ | ||
322 | broadsheetfb_dpy_update_pages(info->par, y1, y1 + h); | ||
323 | /* start over with our non consecutive page */ | ||
324 | y1 = (cur->index << PAGE_SHIFT) / xres; | ||
325 | h = h_inc; | ||
326 | } | ||
327 | prev_index = cur->index; | ||
328 | } | ||
329 | |||
330 | /* if we still have any pages to update we do so now */ | ||
331 | if (h >= yres) { | ||
332 | /* its a full screen update, just do it */ | ||
333 | broadsheetfb_dpy_update(info->par); | ||
334 | } else { | ||
335 | broadsheetfb_dpy_update_pages(info->par, y1, | ||
336 | min((u16) (y1 + h), yres)); | ||
337 | } | ||
338 | } | ||
339 | |||
340 | static void broadsheetfb_fillrect(struct fb_info *info, | ||
341 | const struct fb_fillrect *rect) | ||
342 | { | ||
343 | struct broadsheetfb_par *par = info->par; | ||
344 | |||
345 | sys_fillrect(info, rect); | ||
346 | |||
347 | broadsheetfb_dpy_update(par); | ||
348 | } | ||
349 | |||
350 | static void broadsheetfb_copyarea(struct fb_info *info, | ||
351 | const struct fb_copyarea *area) | ||
352 | { | ||
353 | struct broadsheetfb_par *par = info->par; | ||
354 | |||
355 | sys_copyarea(info, area); | ||
356 | |||
357 | broadsheetfb_dpy_update(par); | ||
358 | } | ||
359 | |||
360 | static void broadsheetfb_imageblit(struct fb_info *info, | ||
361 | const struct fb_image *image) | ||
362 | { | ||
363 | struct broadsheetfb_par *par = info->par; | ||
364 | |||
365 | sys_imageblit(info, image); | ||
366 | |||
367 | broadsheetfb_dpy_update(par); | ||
368 | } | ||
369 | |||
370 | /* | ||
371 | * this is the slow path from userspace. they can seek and write to | ||
372 | * the fb. it's inefficient to do anything less than a full screen draw | ||
373 | */ | ||
374 | static ssize_t broadsheetfb_write(struct fb_info *info, const char __user *buf, | ||
375 | size_t count, loff_t *ppos) | ||
376 | { | ||
377 | struct broadsheetfb_par *par = info->par; | ||
378 | unsigned long p = *ppos; | ||
379 | void *dst; | ||
380 | int err = 0; | ||
381 | unsigned long total_size; | ||
382 | |||
383 | if (info->state != FBINFO_STATE_RUNNING) | ||
384 | return -EPERM; | ||
385 | |||
386 | total_size = info->fix.smem_len; | ||
387 | |||
388 | if (p > total_size) | ||
389 | return -EFBIG; | ||
390 | |||
391 | if (count > total_size) { | ||
392 | err = -EFBIG; | ||
393 | count = total_size; | ||
394 | } | ||
395 | |||
396 | if (count + p > total_size) { | ||
397 | if (!err) | ||
398 | err = -ENOSPC; | ||
399 | |||
400 | count = total_size - p; | ||
401 | } | ||
402 | |||
403 | dst = (void *)(info->screen_base + p); | ||
404 | |||
405 | if (copy_from_user(dst, buf, count)) | ||
406 | err = -EFAULT; | ||
407 | |||
408 | if (!err) | ||
409 | *ppos += count; | ||
410 | |||
411 | broadsheetfb_dpy_update(par); | ||
412 | |||
413 | return (err) ? err : count; | ||
414 | } | ||
415 | |||
416 | static struct fb_ops broadsheetfb_ops = { | ||
417 | .owner = THIS_MODULE, | ||
418 | .fb_read = fb_sys_read, | ||
419 | .fb_write = broadsheetfb_write, | ||
420 | .fb_fillrect = broadsheetfb_fillrect, | ||
421 | .fb_copyarea = broadsheetfb_copyarea, | ||
422 | .fb_imageblit = broadsheetfb_imageblit, | ||
423 | }; | ||
424 | |||
425 | static struct fb_deferred_io broadsheetfb_defio = { | ||
426 | .delay = HZ/4, | ||
427 | .deferred_io = broadsheetfb_dpy_deferred_io, | ||
428 | }; | ||
429 | |||
430 | static int __devinit broadsheetfb_probe(struct platform_device *dev) | ||
431 | { | ||
432 | struct fb_info *info; | ||
433 | struct broadsheet_board *board; | ||
434 | int retval = -ENOMEM; | ||
435 | int videomemorysize; | ||
436 | unsigned char *videomemory; | ||
437 | struct broadsheetfb_par *par; | ||
438 | int i; | ||
439 | |||
440 | /* pick up board specific routines */ | ||
441 | board = dev->dev.platform_data; | ||
442 | if (!board) | ||
443 | return -EINVAL; | ||
444 | |||
445 | /* try to count device specific driver, if can't, platform recalls */ | ||
446 | if (!try_module_get(board->owner)) | ||
447 | return -ENODEV; | ||
448 | |||
449 | info = framebuffer_alloc(sizeof(struct broadsheetfb_par), &dev->dev); | ||
450 | if (!info) | ||
451 | goto err; | ||
452 | |||
453 | videomemorysize = (DPY_W*DPY_H); | ||
454 | videomemory = vmalloc(videomemorysize); | ||
455 | if (!videomemory) | ||
456 | goto err_fb_rel; | ||
457 | |||
458 | memset(videomemory, 0, videomemorysize); | ||
459 | |||
460 | info->screen_base = (char *)videomemory; | ||
461 | info->fbops = &broadsheetfb_ops; | ||
462 | |||
463 | info->var = broadsheetfb_var; | ||
464 | info->fix = broadsheetfb_fix; | ||
465 | info->fix.smem_len = videomemorysize; | ||
466 | par = info->par; | ||
467 | par->info = info; | ||
468 | par->board = board; | ||
469 | par->write_reg = broadsheet_write_reg; | ||
470 | par->read_reg = broadsheet_read_reg; | ||
471 | init_waitqueue_head(&par->waitq); | ||
472 | |||
473 | info->flags = FBINFO_FLAG_DEFAULT; | ||
474 | |||
475 | info->fbdefio = &broadsheetfb_defio; | ||
476 | fb_deferred_io_init(info); | ||
477 | |||
478 | retval = fb_alloc_cmap(&info->cmap, 16, 0); | ||
479 | if (retval < 0) { | ||
480 | dev_err(&dev->dev, "Failed to allocate colormap\n"); | ||
481 | goto err_vfree; | ||
482 | } | ||
483 | |||
484 | /* set cmap */ | ||
485 | for (i = 0; i < 16; i++) | ||
486 | info->cmap.red[i] = (((2*i)+1)*(0xFFFF))/32; | ||
487 | memcpy(info->cmap.green, info->cmap.red, sizeof(u16)*16); | ||
488 | memcpy(info->cmap.blue, info->cmap.red, sizeof(u16)*16); | ||
489 | |||
490 | retval = par->board->setup_irq(info); | ||
491 | if (retval < 0) | ||
492 | goto err_cmap; | ||
493 | |||
494 | /* this inits the dpy */ | ||
495 | retval = board->init(par); | ||
496 | if (retval < 0) | ||
497 | goto err_free_irq; | ||
498 | |||
499 | broadsheet_init(par); | ||
500 | |||
501 | retval = register_framebuffer(info); | ||
502 | if (retval < 0) | ||
503 | goto err_free_irq; | ||
504 | platform_set_drvdata(dev, info); | ||
505 | |||
506 | printk(KERN_INFO | ||
507 | "fb%d: Broadsheet frame buffer, using %dK of video memory\n", | ||
508 | info->node, videomemorysize >> 10); | ||
509 | |||
510 | |||
511 | return 0; | ||
512 | |||
513 | err_free_irq: | ||
514 | board->cleanup(par); | ||
515 | err_cmap: | ||
516 | fb_dealloc_cmap(&info->cmap); | ||
517 | err_vfree: | ||
518 | vfree(videomemory); | ||
519 | err_fb_rel: | ||
520 | framebuffer_release(info); | ||
521 | err: | ||
522 | module_put(board->owner); | ||
523 | return retval; | ||
524 | |||
525 | } | ||
526 | |||
527 | static int __devexit broadsheetfb_remove(struct platform_device *dev) | ||
528 | { | ||
529 | struct fb_info *info = platform_get_drvdata(dev); | ||
530 | |||
531 | if (info) { | ||
532 | struct broadsheetfb_par *par = info->par; | ||
533 | unregister_framebuffer(info); | ||
534 | fb_deferred_io_cleanup(info); | ||
535 | par->board->cleanup(par); | ||
536 | fb_dealloc_cmap(&info->cmap); | ||
537 | vfree((void *)info->screen_base); | ||
538 | module_put(par->board->owner); | ||
539 | framebuffer_release(info); | ||
540 | } | ||
541 | return 0; | ||
542 | } | ||
543 | |||
544 | static struct platform_driver broadsheetfb_driver = { | ||
545 | .probe = broadsheetfb_probe, | ||
546 | .remove = broadsheetfb_remove, | ||
547 | .driver = { | ||
548 | .owner = THIS_MODULE, | ||
549 | .name = "broadsheetfb", | ||
550 | }, | ||
551 | }; | ||
552 | |||
553 | static int __init broadsheetfb_init(void) | ||
554 | { | ||
555 | return platform_driver_register(&broadsheetfb_driver); | ||
556 | } | ||
557 | |||
558 | static void __exit broadsheetfb_exit(void) | ||
559 | { | ||
560 | platform_driver_unregister(&broadsheetfb_driver); | ||
561 | } | ||
562 | |||
563 | module_init(broadsheetfb_init); | ||
564 | module_exit(broadsheetfb_exit); | ||
565 | |||
566 | MODULE_DESCRIPTION("fbdev driver for Broadsheet controller"); | ||
567 | MODULE_AUTHOR("Jaya Kumar"); | ||
568 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c index 7a9e42e3a9a9..51b373657aa2 100644 --- a/drivers/video/cyber2000fb.c +++ b/drivers/video/cyber2000fb.c | |||
@@ -1425,7 +1425,7 @@ static void cyberpro_common_resume(struct cfb_info *cfb) | |||
1425 | 1425 | ||
1426 | #ifdef CONFIG_ARCH_SHARK | 1426 | #ifdef CONFIG_ARCH_SHARK |
1427 | 1427 | ||
1428 | #include <mach/hardware.h> | 1428 | #include <mach/framebuffer.h> |
1429 | 1429 | ||
1430 | static int __devinit cyberpro_vl_probe(void) | 1430 | static int __devinit cyberpro_vl_probe(void) |
1431 | { | 1431 | { |
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index 2552b9f325ee..07b371b4b072 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c | |||
@@ -59,7 +59,6 @@ | |||
59 | #include <asm/io.h> | 59 | #include <asm/io.h> |
60 | #include <asm/irq.h> | 60 | #include <asm/irq.h> |
61 | #include <asm/div64.h> | 61 | #include <asm/div64.h> |
62 | #include <mach/pxa-regs.h> | ||
63 | #include <mach/bitfield.h> | 62 | #include <mach/bitfield.h> |
64 | #include <mach/pxafb.h> | 63 | #include <mach/pxafb.h> |
65 | 64 | ||
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index 79cf0b1976aa..b0b4513ba537 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c | |||
@@ -1017,6 +1017,10 @@ static int s3c2410fb_resume(struct platform_device *dev) | |||
1017 | 1017 | ||
1018 | s3c2410fb_init_registers(fbinfo); | 1018 | s3c2410fb_init_registers(fbinfo); |
1019 | 1019 | ||
1020 | /* re-activate our display after resume */ | ||
1021 | s3c2410fb_activate_var(fbinfo); | ||
1022 | s3c2410fb_blank(FB_BLANK_UNBLANK, fbinfo); | ||
1023 | |||
1020 | return 0; | 1024 | return 0; |
1021 | } | 1025 | } |
1022 | 1026 | ||
diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c index 076f946fa0f5..022d07abbf99 100644 --- a/drivers/video/sa1100fb.c +++ b/drivers/video/sa1100fb.c | |||
@@ -251,22 +251,6 @@ static struct sa1100fb_mach_info pal_info __initdata = { | |||
251 | #endif | 251 | #endif |
252 | #endif | 252 | #endif |
253 | 253 | ||
254 | #ifdef CONFIG_SA1100_H3800 | ||
255 | static struct sa1100fb_mach_info h3800_info __initdata = { | ||
256 | .pixclock = 174757, .bpp = 16, | ||
257 | .xres = 320, .yres = 240, | ||
258 | |||
259 | .hsync_len = 3, .vsync_len = 3, | ||
260 | .left_margin = 12, .upper_margin = 10, | ||
261 | .right_margin = 17, .lower_margin = 1, | ||
262 | |||
263 | .cmap_static = 1, | ||
264 | |||
265 | .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, | ||
266 | .lccr3 = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(2), | ||
267 | }; | ||
268 | #endif | ||
269 | |||
270 | #ifdef CONFIG_SA1100_H3600 | 254 | #ifdef CONFIG_SA1100_H3600 |
271 | static struct sa1100fb_mach_info h3600_info __initdata = { | 255 | static struct sa1100fb_mach_info h3600_info __initdata = { |
272 | .pixclock = 174757, .bpp = 16, | 256 | .pixclock = 174757, .bpp = 16, |
@@ -432,11 +416,6 @@ sa1100fb_get_machine_info(struct sa1100fb_info *fbi) | |||
432 | fbi->rgb[RGB_16] = &h3600_rgb_16; | 416 | fbi->rgb[RGB_16] = &h3600_rgb_16; |
433 | } | 417 | } |
434 | #endif | 418 | #endif |
435 | #ifdef CONFIG_SA1100_H3800 | ||
436 | if (machine_is_h3800()) { | ||
437 | inf = &h3800_info; | ||
438 | } | ||
439 | #endif | ||
440 | #ifdef CONFIG_SA1100_COLLIE | 419 | #ifdef CONFIG_SA1100_COLLIE |
441 | if (machine_is_collie()) { | 420 | if (machine_is_collie()) { |
442 | inf = &collie_info; | 421 | inf = &collie_info; |
diff --git a/drivers/watchdog/sa1100_wdt.c b/drivers/watchdog/sa1100_wdt.c index e19b45794717..4b84f296d30c 100644 --- a/drivers/watchdog/sa1100_wdt.c +++ b/drivers/watchdog/sa1100_wdt.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <linux/timex.h> | 30 | #include <linux/timex.h> |
31 | 31 | ||
32 | #ifdef CONFIG_ARCH_PXA | 32 | #ifdef CONFIG_ARCH_PXA |
33 | #include <mach/pxa-regs.h> | 33 | #include <mach/regs-ost.h> |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | #include <mach/reset.h> | 36 | #include <mach/reset.h> |