aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2008-04-28 07:41:36 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-04-29 02:16:25 -0400
commit3dd654bfdf8905d0acb6f6231b5e736d2b0d4bc6 (patch)
tree5d5cf68ed77f2dd57b04d0dd672ff633750ba43f /drivers
parenta01e035ebb552223c03f2d9138ffc73f2d4d3965 (diff)
[MIPS] ATA: Rename routerboard 500 to 532
The platform is actually named routerboard 532 so let's call it this. This patch only rename files, Kconfig and C symbols; no functional changes. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/Kconfig8
-rw-r--r--drivers/ata/Makefile2
-rw-r--r--drivers/ata/pata_rb532_cf.c (renamed from drivers/ata/pata_rb500_cf.c)78
3 files changed, 44 insertions, 44 deletions
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 292aa9a0f02f..1c11df9a5f32 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -566,11 +566,11 @@ config PATA_RADISYS
566 566
567 If unsure, say N. 567 If unsure, say N.
568 568
569config PATA_RB500 569config PATA_RB532
570 tristate "RouterBoard 500 PATA CompactFlash support" 570 tristate "RouterBoard 532 PATA CompactFlash support"
571 depends on MIKROTIK_RB500 571 depends on MIKROTIK_RB532
572 help 572 help
573 This option enables support for the RouterBoard 500 573 This option enables support for the RouterBoard 532
574 PATA CompactFlash controller. 574 PATA CompactFlash controller.
575 575
576 If unsure, say N. 576 If unsure, say N.
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index 1fbc2aa648b7..b693d829383a 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -55,7 +55,7 @@ obj-$(CONFIG_PATA_PDC2027X) += pata_pdc2027x.o
55obj-$(CONFIG_PATA_PDC_OLD) += pata_pdc202xx_old.o 55obj-$(CONFIG_PATA_PDC_OLD) += pata_pdc202xx_old.o
56obj-$(CONFIG_PATA_QDI) += pata_qdi.o 56obj-$(CONFIG_PATA_QDI) += pata_qdi.o
57obj-$(CONFIG_PATA_RADISYS) += pata_radisys.o 57obj-$(CONFIG_PATA_RADISYS) += pata_radisys.o
58obj-$(CONFIG_PATA_RB500) += pata_rb500_cf.o 58obj-$(CONFIG_PATA_RB532) += pata_rb532_cf.o
59obj-$(CONFIG_PATA_RZ1000) += pata_rz1000.o 59obj-$(CONFIG_PATA_RZ1000) += pata_rz1000.o
60obj-$(CONFIG_PATA_SC1200) += pata_sc1200.o 60obj-$(CONFIG_PATA_SC1200) += pata_sc1200.o
61obj-$(CONFIG_PATA_SERVERWORKS) += pata_serverworks.o 61obj-$(CONFIG_PATA_SERVERWORKS) += pata_serverworks.o
diff --git a/drivers/ata/pata_rb500_cf.c b/drivers/ata/pata_rb532_cf.c
index 4345174aaeec..a108d259f19d 100644
--- a/drivers/ata/pata_rb500_cf.c
+++ b/drivers/ata/pata_rb532_cf.c
@@ -32,7 +32,7 @@
32 32
33#include <asm/gpio.h> 33#include <asm/gpio.h>
34 34
35#define DRV_NAME "pata-rb500-cf" 35#define DRV_NAME "pata-rb532-cf"
36#define DRV_VERSION "0.1.0" 36#define DRV_VERSION "0.1.0"
37#define DRV_DESC "PATA driver for RouterBOARD 532 Compact Flash" 37#define DRV_DESC "PATA driver for RouterBOARD 532 Compact Flash"
38 38
@@ -43,7 +43,7 @@
43#define RB500_CF_REG_CTRL 0x080E 43#define RB500_CF_REG_CTRL 0x080E
44#define RB500_CF_REG_DATA 0x0C00 44#define RB500_CF_REG_DATA 0x0C00
45 45
46struct rb500_cf_info { 46struct rb532_cf_info {
47 void __iomem *iobase; 47 void __iomem *iobase;
48 unsigned int gpio_line; 48 unsigned int gpio_line;
49 int frozen; 49 int frozen;
@@ -52,10 +52,10 @@ struct rb500_cf_info {
52 52
53/* ------------------------------------------------------------------------ */ 53/* ------------------------------------------------------------------------ */
54 54
55static inline void rb500_pata_finish_io(struct ata_port *ap) 55static inline void rb532_pata_finish_io(struct ata_port *ap)
56{ 56{
57 struct ata_host *ah = ap->host; 57 struct ata_host *ah = ap->host;
58 struct rb500_cf_info *info = ah->private_data; 58 struct rb532_cf_info *info = ah->private_data;
59 59
60 ata_sff_altstatus(ap); 60 ata_sff_altstatus(ap);
61 ndelay(RB500_CF_IO_DELAY); 61 ndelay(RB500_CF_IO_DELAY);
@@ -63,14 +63,14 @@ static inline void rb500_pata_finish_io(struct ata_port *ap)
63 set_irq_type(info->irq, IRQ_TYPE_LEVEL_HIGH); 63 set_irq_type(info->irq, IRQ_TYPE_LEVEL_HIGH);
64} 64}
65 65
66static void rb500_pata_exec_command(struct ata_port *ap, 66static void rb532_pata_exec_command(struct ata_port *ap,
67 const struct ata_taskfile *tf) 67 const struct ata_taskfile *tf)
68{ 68{
69 writeb(tf->command, ap->ioaddr.command_addr); 69 writeb(tf->command, ap->ioaddr.command_addr);
70 rb500_pata_finish_io(ap); 70 rb532_pata_finish_io(ap);
71} 71}
72 72
73static void rb500_pata_data_xfer(struct ata_device *adev, unsigned char *buf, 73static void rb532_pata_data_xfer(struct ata_device *adev, unsigned char *buf,
74 unsigned int buflen, int write_data) 74 unsigned int buflen, int write_data)
75{ 75{
76 struct ata_port *ap = adev->link->ap; 76 struct ata_port *ap = adev->link->ap;
@@ -84,27 +84,27 @@ static void rb500_pata_data_xfer(struct ata_device *adev, unsigned char *buf,
84 *buf = readb(ioaddr); 84 *buf = readb(ioaddr);
85 } 85 }
86 86
87 rb500_pata_finish_io(adev->link->ap); 87 rb532_pata_finish_io(adev->link->ap);
88} 88}
89 89
90static void rb500_pata_freeze(struct ata_port *ap) 90static void rb532_pata_freeze(struct ata_port *ap)
91{ 91{
92 struct rb500_cf_info *info = ap->host->private_data; 92 struct rb532_cf_info *info = ap->host->private_data;
93 93
94 info->frozen = 1; 94 info->frozen = 1;
95} 95}
96 96
97static void rb500_pata_thaw(struct ata_port *ap) 97static void rb532_pata_thaw(struct ata_port *ap)
98{ 98{
99 struct rb500_cf_info *info = ap->host->private_data; 99 struct rb532_cf_info *info = ap->host->private_data;
100 100
101 info->frozen = 0; 101 info->frozen = 0;
102} 102}
103 103
104static irqreturn_t rb500_pata_irq_handler(int irq, void *dev_instance) 104static irqreturn_t rb532_pata_irq_handler(int irq, void *dev_instance)
105{ 105{
106 struct ata_host *ah = dev_instance; 106 struct ata_host *ah = dev_instance;
107 struct rb500_cf_info *info = ah->private_data; 107 struct rb532_cf_info *info = ah->private_data;
108 108
109 if (gpio_get_value(info->gpio_line)) { 109 if (gpio_get_value(info->gpio_line)) {
110 set_irq_type(info->irq, IRQ_TYPE_LEVEL_LOW); 110 set_irq_type(info->irq, IRQ_TYPE_LEVEL_LOW);
@@ -117,30 +117,30 @@ static irqreturn_t rb500_pata_irq_handler(int irq, void *dev_instance)
117 return IRQ_HANDLED; 117 return IRQ_HANDLED;
118} 118}
119 119
120static struct ata_port_operations rb500_pata_port_ops = { 120static struct ata_port_operations rb532_pata_port_ops = {
121 .inherits = &ata_sff_port_ops, 121 .inherits = &ata_sff_port_ops,
122 .sff_exec_command = rb500_pata_exec_command, 122 .sff_exec_command = rb532_pata_exec_command,
123 .sff_data_xfer = rb500_pata_data_xfer, 123 .sff_data_xfer = rb532_pata_data_xfer,
124 .freeze = rb500_pata_freeze, 124 .freeze = rb532_pata_freeze,
125 .thaw = rb500_pata_thaw, 125 .thaw = rb532_pata_thaw,
126}; 126};
127 127
128/* ------------------------------------------------------------------------ */ 128/* ------------------------------------------------------------------------ */
129 129
130static struct scsi_host_template rb500_pata_sht = { 130static struct scsi_host_template rb532_pata_sht = {
131 ATA_PIO_SHT(DRV_NAME), 131 ATA_PIO_SHT(DRV_NAME),
132}; 132};
133 133
134/* ------------------------------------------------------------------------ */ 134/* ------------------------------------------------------------------------ */
135 135
136static void rb500_pata_setup_ports(struct ata_host *ah) 136static void rb532_pata_setup_ports(struct ata_host *ah)
137{ 137{
138 struct rb500_cf_info *info = ah->private_data; 138 struct rb532_cf_info *info = ah->private_data;
139 struct ata_port *ap; 139 struct ata_port *ap;
140 140
141 ap = ah->ports[0]; 141 ap = ah->ports[0];
142 142
143 ap->ops = &rb500_pata_port_ops; 143 ap->ops = &rb532_pata_port_ops;
144 ap->pio_mask = 0x1f; /* PIO4 */ 144 ap->pio_mask = 0x1f; /* PIO4 */
145 ap->flags = ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO; 145 ap->flags = ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO;
146 146
@@ -153,13 +153,13 @@ static void rb500_pata_setup_ports(struct ata_host *ah)
153 ap->ioaddr.data_addr = info->iobase + RB500_CF_REG_DATA; 153 ap->ioaddr.data_addr = info->iobase + RB500_CF_REG_DATA;
154} 154}
155 155
156static __devinit int rb500_pata_driver_probe(struct platform_device *pdev) 156static __devinit int rb532_pata_driver_probe(struct platform_device *pdev)
157{ 157{
158 unsigned int irq; 158 unsigned int irq;
159 int gpio; 159 int gpio;
160 struct resource *res; 160 struct resource *res;
161 struct ata_host *ah; 161 struct ata_host *ah;
162 struct rb500_cf_info *info; 162 struct rb532_cf_info *info;
163 int ret; 163 int ret;
164 164
165 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 165 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -213,10 +213,10 @@ static __devinit int rb500_pata_driver_probe(struct platform_device *pdev)
213 goto err_free_gpio; 213 goto err_free_gpio;
214 } 214 }
215 215
216 rb500_pata_setup_ports(ah); 216 rb532_pata_setup_ports(ah);
217 217
218 ret = ata_host_activate(ah, irq, rb500_pata_irq_handler, 218 ret = ata_host_activate(ah, irq, rb532_pata_irq_handler,
219 IRQF_TRIGGER_LOW, &rb500_pata_sht); 219 IRQF_TRIGGER_LOW, &rb532_pata_sht);
220 if (ret) 220 if (ret)
221 goto err_free_gpio; 221 goto err_free_gpio;
222 222
@@ -228,10 +228,10 @@ err_free_gpio:
228 return ret; 228 return ret;
229} 229}
230 230
231static __devexit int rb500_pata_driver_remove(struct platform_device *pdev) 231static __devexit int rb532_pata_driver_remove(struct platform_device *pdev)
232{ 232{
233 struct ata_host *ah = platform_get_drvdata(pdev); 233 struct ata_host *ah = platform_get_drvdata(pdev);
234 struct rb500_cf_info *info = ah->private_data; 234 struct rb532_cf_info *info = ah->private_data;
235 235
236 ata_host_detach(ah); 236 ata_host_detach(ah);
237 gpio_free(info->gpio_line); 237 gpio_free(info->gpio_line);
@@ -242,9 +242,9 @@ static __devexit int rb500_pata_driver_remove(struct platform_device *pdev)
242/* work with hotplug and coldplug */ 242/* work with hotplug and coldplug */
243MODULE_ALIAS("platform:" DRV_NAME); 243MODULE_ALIAS("platform:" DRV_NAME);
244 244
245static struct platform_driver rb500_pata_platform_driver = { 245static struct platform_driver rb532_pata_platform_driver = {
246 .probe = rb500_pata_driver_probe, 246 .probe = rb532_pata_driver_probe,
247 .remove = __devexit_p(rb500_pata_driver_remove), 247 .remove = __devexit_p(rb532_pata_driver_remove),
248 .driver = { 248 .driver = {
249 .name = DRV_NAME, 249 .name = DRV_NAME,
250 .owner = THIS_MODULE, 250 .owner = THIS_MODULE,
@@ -255,16 +255,16 @@ static struct platform_driver rb500_pata_platform_driver = {
255 255
256#define DRV_INFO DRV_DESC " version " DRV_VERSION 256#define DRV_INFO DRV_DESC " version " DRV_VERSION
257 257
258static int __init rb500_pata_module_init(void) 258static int __init rb532_pata_module_init(void)
259{ 259{
260 printk(KERN_INFO DRV_INFO "\n"); 260 printk(KERN_INFO DRV_INFO "\n");
261 261
262 return platform_driver_register(&rb500_pata_platform_driver); 262 return platform_driver_register(&rb532_pata_platform_driver);
263} 263}
264 264
265static void __exit rb500_pata_module_exit(void) 265static void __exit rb532_pata_module_exit(void)
266{ 266{
267 platform_driver_unregister(&rb500_pata_platform_driver); 267 platform_driver_unregister(&rb532_pata_platform_driver);
268} 268}
269 269
270MODULE_AUTHOR("Gabor Juhos <juhosg at openwrt.org>"); 270MODULE_AUTHOR("Gabor Juhos <juhosg at openwrt.org>");
@@ -273,5 +273,5 @@ MODULE_DESCRIPTION(DRV_DESC);
273MODULE_VERSION(DRV_VERSION); 273MODULE_VERSION(DRV_VERSION);
274MODULE_LICENSE("GPL"); 274MODULE_LICENSE("GPL");
275 275
276module_init(rb500_pata_module_init); 276module_init(rb532_pata_module_init);
277module_exit(rb500_pata_module_exit); 277module_exit(rb532_pata_module_exit);