aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan McGee <dpmcgee@gmail.com>2011-09-07 12:23:21 -0400
committerJeff Garzik <jgarzik@redhat.com>2011-10-08 00:07:16 -0400
commitc03a476dda0a0b6ef3d2c5bf0dc07e00a1d2322f (patch)
tree21b1959a0fc17b36e9b74af9a4a6546f1ca6b777 /drivers
parent14004f044bef275ac911375a8157e6773da4260a (diff)
pata_sis: mark most const data static as well
This pushes timing and other values into preinitialized read-only data sections rather than being inlined into the code. None of these functions are called more than a handful of times, so reducing code size makes sense. Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/pata_sis.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c
index a42668bd48f8..d886b0b782f7 100644
--- a/drivers/ata/pata_sis.c
+++ b/drivers/ata/pata_sis.c
@@ -231,8 +231,8 @@ static void sis_old_set_piomode (struct ata_port *ap, struct ata_device *adev)
231 u8 t1, t2; 231 u8 t1, t2;
232 int speed = adev->pio_mode - XFER_PIO_0; 232 int speed = adev->pio_mode - XFER_PIO_0;
233 233
234 const u8 active[] = { 0x00, 0x07, 0x04, 0x03, 0x01 }; 234 static const u8 active[] = { 0x00, 0x07, 0x04, 0x03, 0x01 };
235 const u8 recovery[] = { 0x00, 0x06, 0x04, 0x03, 0x03 }; 235 static const u8 recovery[] = { 0x00, 0x06, 0x04, 0x03, 0x03 };
236 236
237 sis_set_fifo(ap, adev); 237 sis_set_fifo(ap, adev);
238 238
@@ -267,7 +267,7 @@ static void sis_100_set_piomode (struct ata_port *ap, struct ata_device *adev)
267 int port = sis_old_port_base(adev); 267 int port = sis_old_port_base(adev);
268 int speed = adev->pio_mode - XFER_PIO_0; 268 int speed = adev->pio_mode - XFER_PIO_0;
269 269
270 const u8 actrec[] = { 0x00, 0x67, 0x44, 0x33, 0x31 }; 270 static const u8 actrec[] = { 0x00, 0x67, 0x44, 0x33, 0x31 };
271 271
272 sis_set_fifo(ap, adev); 272 sis_set_fifo(ap, adev);
273 273
@@ -293,14 +293,14 @@ static void sis_133_set_piomode (struct ata_port *ap, struct ata_device *adev)
293 u32 t1; 293 u32 t1;
294 int speed = adev->pio_mode - XFER_PIO_0; 294 int speed = adev->pio_mode - XFER_PIO_0;
295 295
296 const u32 timing133[] = { 296 static const u32 timing133[] = {
297 0x28269000, /* Recovery << 24 | Act << 16 | Ini << 12 */ 297 0x28269000, /* Recovery << 24 | Act << 16 | Ini << 12 */
298 0x0C266000, 298 0x0C266000,
299 0x04263000, 299 0x04263000,
300 0x0C0A3000, 300 0x0C0A3000,
301 0x05093000 301 0x05093000
302 }; 302 };
303 const u32 timing100[] = { 303 static const u32 timing100[] = {
304 0x1E1C6000, /* Recovery << 24 | Act << 16 | Ini << 12 */ 304 0x1E1C6000, /* Recovery << 24 | Act << 16 | Ini << 12 */
305 0x091C4000, 305 0x091C4000,
306 0x031C2000, 306 0x031C2000,
@@ -341,8 +341,8 @@ static void sis_old_set_dmamode (struct ata_port *ap, struct ata_device *adev)
341 int drive_pci = sis_old_port_base(adev); 341 int drive_pci = sis_old_port_base(adev);
342 u16 timing; 342 u16 timing;
343 343
344 const u16 mwdma_bits[] = { 0x008, 0x302, 0x301 }; 344 static const u16 mwdma_bits[] = { 0x008, 0x302, 0x301 };
345 const u16 udma_bits[] = { 0xE000, 0xC000, 0xA000 }; 345 static const u16 udma_bits[] = { 0xE000, 0xC000, 0xA000 };
346 346
347 pci_read_config_word(pdev, drive_pci, &timing); 347 pci_read_config_word(pdev, drive_pci, &timing);
348 348
@@ -381,8 +381,8 @@ static void sis_66_set_dmamode (struct ata_port *ap, struct ata_device *adev)
381 u16 timing; 381 u16 timing;
382 382
383 /* MWDMA 0-2 and UDMA 0-5 */ 383 /* MWDMA 0-2 and UDMA 0-5 */
384 const u16 mwdma_bits[] = { 0x008, 0x302, 0x301 }; 384 static const u16 mwdma_bits[] = { 0x008, 0x302, 0x301 };
385 const u16 udma_bits[] = { 0xF000, 0xD000, 0xB000, 0xA000, 0x9000, 0x8000 }; 385 static const u16 udma_bits[] = { 0xF000, 0xD000, 0xB000, 0xA000, 0x9000, 0x8000 };
386 386
387 pci_read_config_word(pdev, drive_pci, &timing); 387 pci_read_config_word(pdev, drive_pci, &timing);
388 388
@@ -419,7 +419,7 @@ static void sis_100_set_dmamode (struct ata_port *ap, struct ata_device *adev)
419 int drive_pci = sis_old_port_base(adev); 419 int drive_pci = sis_old_port_base(adev);
420 u8 timing; 420 u8 timing;
421 421
422 const u8 udma_bits[] = { 0x8B, 0x87, 0x85, 0x83, 0x82, 0x81}; 422 static const u8 udma_bits[] = { 0x8B, 0x87, 0x85, 0x83, 0x82, 0x81};
423 423
424 pci_read_config_byte(pdev, drive_pci + 1, &timing); 424 pci_read_config_byte(pdev, drive_pci + 1, &timing);
425 425