bay 28 arch/powerpc/include/asm/mediabay.h extern int check_media_bay(struct macio_dev *bay); bay 33 arch/powerpc/include/asm/mediabay.h extern void lock_media_bay(struct macio_dev *bay); bay 34 arch/powerpc/include/asm/mediabay.h extern void unlock_media_bay(struct macio_dev *bay); bay 38 arch/powerpc/include/asm/mediabay.h static inline int check_media_bay(struct macio_dev *bay) bay 43 arch/powerpc/include/asm/mediabay.h static inline void lock_media_bay(struct macio_dev *bay) { } bay 44 arch/powerpc/include/asm/mediabay.h static inline void unlock_media_bay(struct macio_dev *bay) { } bay 303 drivers/acpi/acpica/dbconvert.c ACPI_PLD_SET_BAY(&dword, pld_info->bay); bay 422 drivers/acpi/acpica/dbconvert.c acpi_os_printf(ACPI_PLD_OUTPUT, "PLD_Bay", pld_info->bay); bay 498 drivers/acpi/acpica/utxface.c pld_info->bay = ACPI_PLD_GET_BAY(&dword); bay 32 drivers/macintosh/mediabay.c #define MB_FCR32(bay, r) ((bay)->base + ((r) >> 2)) bay 33 drivers/macintosh/mediabay.c #define MB_FCR8(bay, r) (((volatile u8 __iomem *)((bay)->base)) + (r)) bay 35 drivers/macintosh/mediabay.c #define MB_IN32(bay,r) (in_le32(MB_FCR32(bay,r))) bay 36 drivers/macintosh/mediabay.c #define MB_OUT32(bay,r,v) (out_le32(MB_FCR32(bay,r), (v))) bay 37 drivers/macintosh/mediabay.c #define MB_BIS(bay,r,v) (MB_OUT32((bay), (r), MB_IN32((bay), r) | (v))) bay 38 drivers/macintosh/mediabay.c #define MB_BIC(bay,r,v) (MB_OUT32((bay), (r), MB_IN32((bay), r) & ~(v))) bay 39 drivers/macintosh/mediabay.c #define MB_IN8(bay,r) (in_8(MB_FCR8(bay,r))) bay 40 drivers/macintosh/mediabay.c #define MB_OUT8(bay,r,v) (out_8(MB_FCR8(bay,r), (v))) bay 46 drivers/macintosh/mediabay.c void (*init)(struct media_bay_info *bay); bay 47 drivers/macintosh/mediabay.c u8 (*content)(struct media_bay_info *bay); bay 48 drivers/macintosh/mediabay.c void (*power)(struct media_bay_info *bay, int on_off); bay 49 drivers/macintosh/mediabay.c int (*setup_bus)(struct media_bay_info *bay, u8 device_id); bay 50 drivers/macintosh/mediabay.c void (*un_reset)(struct media_bay_info *bay); bay 51 drivers/macintosh/mediabay.c void (*un_reset_ide)(struct media_bay_info *bay); bay 134 drivers/macintosh/mediabay.c ohare_mb_content(struct media_bay_info *bay) bay 136 drivers/macintosh/mediabay.c return (MB_IN32(bay, OHARE_MBCR) >> 12) & 7; bay 140 drivers/macintosh/mediabay.c heathrow_mb_content(struct media_bay_info *bay) bay 142 drivers/macintosh/mediabay.c return (MB_IN32(bay, HEATHROW_MBCR) >> 12) & 7; bay 146 drivers/macintosh/mediabay.c keylargo_mb_content(struct media_bay_info *bay) bay 150 drivers/macintosh/mediabay.c new_gpio = MB_IN8(bay, KL_GPIO_MEDIABAY_IRQ) & KEYLARGO_GPIO_INPUT_DATA; bay 152 drivers/macintosh/mediabay.c bay->cached_gpio = new_gpio; bay 154 drivers/macintosh/mediabay.c } else if (bay->cached_gpio != new_gpio) { bay 155 drivers/macintosh/mediabay.c MB_BIS(bay, KEYLARGO_MBCR, KL_MBCR_MB0_ENABLE); bay 156 drivers/macintosh/mediabay.c (void)MB_IN32(bay, KEYLARGO_MBCR); bay 158 drivers/macintosh/mediabay.c MB_BIC(bay, KEYLARGO_MBCR, 0x0000000F); bay 159 drivers/macintosh/mediabay.c (void)MB_IN32(bay, KEYLARGO_MBCR); bay 161 drivers/macintosh/mediabay.c bay->cached_gpio = new_gpio; bay 163 drivers/macintosh/mediabay.c return (MB_IN32(bay, KEYLARGO_MBCR) >> 4) & 7; bay 172 drivers/macintosh/mediabay.c ohare_mb_power(struct media_bay_info* bay, int on_off) bay 176 drivers/macintosh/mediabay.c MB_BIC(bay, OHARE_FCR, OH_BAY_RESET_N); bay 177 drivers/macintosh/mediabay.c MB_BIC(bay, OHARE_FCR, OH_BAY_POWER_N); bay 180 drivers/macintosh/mediabay.c MB_BIC(bay, OHARE_FCR, OH_BAY_DEV_MASK); bay 181 drivers/macintosh/mediabay.c MB_BIC(bay, OHARE_FCR, OH_FLOPPY_ENABLE); bay 183 drivers/macintosh/mediabay.c MB_BIS(bay, OHARE_FCR, OH_BAY_POWER_N); bay 184 drivers/macintosh/mediabay.c MB_BIS(bay, OHARE_FCR, OH_BAY_RESET_N); bay 185 drivers/macintosh/mediabay.c MB_BIS(bay, OHARE_FCR, OH_IDE1_RESET_N); bay 187 drivers/macintosh/mediabay.c MB_BIC(bay, OHARE_MBCR, 0x00000F00); bay 191 drivers/macintosh/mediabay.c heathrow_mb_power(struct media_bay_info* bay, int on_off) bay 195 drivers/macintosh/mediabay.c MB_BIC(bay, HEATHROW_FCR, HRW_BAY_RESET_N); bay 196 drivers/macintosh/mediabay.c MB_BIC(bay, HEATHROW_FCR, HRW_BAY_POWER_N); bay 199 drivers/macintosh/mediabay.c MB_BIC(bay, HEATHROW_FCR, HRW_BAY_DEV_MASK); bay 200 drivers/macintosh/mediabay.c MB_BIC(bay, HEATHROW_FCR, HRW_SWIM_ENABLE); bay 202 drivers/macintosh/mediabay.c MB_BIS(bay, HEATHROW_FCR, HRW_BAY_POWER_N); bay 203 drivers/macintosh/mediabay.c MB_BIS(bay, HEATHROW_FCR, HRW_BAY_RESET_N); bay 204 drivers/macintosh/mediabay.c MB_BIS(bay, HEATHROW_FCR, HRW_IDE1_RESET_N); bay 206 drivers/macintosh/mediabay.c MB_BIC(bay, HEATHROW_MBCR, 0x00000F00); bay 210 drivers/macintosh/mediabay.c keylargo_mb_power(struct media_bay_info* bay, int on_off) bay 214 drivers/macintosh/mediabay.c MB_BIC(bay, KEYLARGO_MBCR, KL_MBCR_MB0_DEV_RESET); bay 215 drivers/macintosh/mediabay.c MB_BIC(bay, KEYLARGO_MBCR, KL_MBCR_MB0_DEV_POWER); bay 218 drivers/macintosh/mediabay.c MB_BIC(bay, KEYLARGO_MBCR, KL_MBCR_MB0_DEV_MASK); bay 219 drivers/macintosh/mediabay.c MB_BIC(bay, KEYLARGO_FCR1, KL1_EIDE0_ENABLE); bay 221 drivers/macintosh/mediabay.c MB_BIS(bay, KEYLARGO_MBCR, KL_MBCR_MB0_DEV_POWER); bay 222 drivers/macintosh/mediabay.c MB_BIS(bay, KEYLARGO_MBCR, KL_MBCR_MB0_DEV_RESET); bay 223 drivers/macintosh/mediabay.c MB_BIS(bay, KEYLARGO_FCR1, KL1_EIDE0_RESET_N); bay 225 drivers/macintosh/mediabay.c MB_BIC(bay, KEYLARGO_MBCR, 0x0000000F); bay 234 drivers/macintosh/mediabay.c ohare_mb_setup_bus(struct media_bay_info* bay, u8 device_id) bay 239 drivers/macintosh/mediabay.c MB_BIS(bay, OHARE_FCR, OH_BAY_FLOPPY_ENABLE); bay 240 drivers/macintosh/mediabay.c MB_BIS(bay, OHARE_FCR, OH_FLOPPY_ENABLE); bay 243 drivers/macintosh/mediabay.c MB_BIC(bay, OHARE_FCR, OH_IDE1_RESET_N); bay 244 drivers/macintosh/mediabay.c MB_BIS(bay, OHARE_FCR, OH_BAY_IDE_ENABLE); bay 247 drivers/macintosh/mediabay.c MB_BIS(bay, OHARE_FCR, OH_BAY_PCI_ENABLE); bay 254 drivers/macintosh/mediabay.c heathrow_mb_setup_bus(struct media_bay_info* bay, u8 device_id) bay 259 drivers/macintosh/mediabay.c MB_BIS(bay, HEATHROW_FCR, HRW_BAY_FLOPPY_ENABLE); bay 260 drivers/macintosh/mediabay.c MB_BIS(bay, HEATHROW_FCR, HRW_SWIM_ENABLE); bay 263 drivers/macintosh/mediabay.c MB_BIC(bay, HEATHROW_FCR, HRW_IDE1_RESET_N); bay 264 drivers/macintosh/mediabay.c MB_BIS(bay, HEATHROW_FCR, HRW_BAY_IDE_ENABLE); bay 267 drivers/macintosh/mediabay.c MB_BIS(bay, HEATHROW_FCR, HRW_BAY_PCI_ENABLE); bay 274 drivers/macintosh/mediabay.c keylargo_mb_setup_bus(struct media_bay_info* bay, u8 device_id) bay 278 drivers/macintosh/mediabay.c MB_BIS(bay, KEYLARGO_MBCR, KL_MBCR_MB0_IDE_ENABLE); bay 279 drivers/macintosh/mediabay.c MB_BIC(bay, KEYLARGO_FCR1, KL1_EIDE0_RESET_N); bay 280 drivers/macintosh/mediabay.c MB_BIS(bay, KEYLARGO_FCR1, KL1_EIDE0_ENABLE); bay 283 drivers/macintosh/mediabay.c MB_BIS(bay, KEYLARGO_MBCR, KL_MBCR_MB0_PCI_ENABLE); bay 286 drivers/macintosh/mediabay.c MB_BIS(bay, KEYLARGO_MBCR, KL_MBCR_MB0_SOUND_ENABLE); bay 297 drivers/macintosh/mediabay.c ohare_mb_un_reset(struct media_bay_info* bay) bay 299 drivers/macintosh/mediabay.c MB_BIS(bay, OHARE_FCR, OH_BAY_RESET_N); bay 302 drivers/macintosh/mediabay.c static void keylargo_mb_init(struct media_bay_info *bay) bay 304 drivers/macintosh/mediabay.c MB_BIS(bay, KEYLARGO_MBCR, KL_MBCR_MB0_ENABLE); bay 307 drivers/macintosh/mediabay.c static void heathrow_mb_un_reset(struct media_bay_info* bay) bay 309 drivers/macintosh/mediabay.c MB_BIS(bay, HEATHROW_FCR, HRW_BAY_RESET_N); bay 312 drivers/macintosh/mediabay.c static void keylargo_mb_un_reset(struct media_bay_info* bay) bay 314 drivers/macintosh/mediabay.c MB_BIS(bay, KEYLARGO_MBCR, KL_MBCR_MB0_DEV_RESET); bay 317 drivers/macintosh/mediabay.c static void ohare_mb_un_reset_ide(struct media_bay_info* bay) bay 319 drivers/macintosh/mediabay.c MB_BIS(bay, OHARE_FCR, OH_IDE1_RESET_N); bay 322 drivers/macintosh/mediabay.c static void heathrow_mb_un_reset_ide(struct media_bay_info* bay) bay 324 drivers/macintosh/mediabay.c MB_BIS(bay, HEATHROW_FCR, HRW_IDE1_RESET_N); bay 327 drivers/macintosh/mediabay.c static void keylargo_mb_un_reset_ide(struct media_bay_info* bay) bay 329 drivers/macintosh/mediabay.c MB_BIS(bay, KEYLARGO_FCR1, KL1_EIDE0_RESET_N); bay 332 drivers/macintosh/mediabay.c static inline void set_mb_power(struct media_bay_info* bay, int onoff) bay 336 drivers/macintosh/mediabay.c bay->ops->power(bay, 1); bay 337 drivers/macintosh/mediabay.c bay->state = mb_powering_up; bay 338 drivers/macintosh/mediabay.c pr_debug("mediabay%d: powering up\n", bay->index); bay 341 drivers/macintosh/mediabay.c bay->ops->power(bay, 0); bay 342 drivers/macintosh/mediabay.c bay->state = mb_powering_down; bay 343 drivers/macintosh/mediabay.c pr_debug("mediabay%d: powering down\n", bay->index); bay 345 drivers/macintosh/mediabay.c bay->timer = msecs_to_jiffies(MB_POWER_DELAY); bay 348 drivers/macintosh/mediabay.c static void poll_media_bay(struct media_bay_info* bay) bay 350 drivers/macintosh/mediabay.c int id = bay->ops->content(bay); bay 361 drivers/macintosh/mediabay.c if (id != bay->last_value) { bay 362 drivers/macintosh/mediabay.c bay->last_value = id; bay 363 drivers/macintosh/mediabay.c bay->value_count = 0; bay 366 drivers/macintosh/mediabay.c if (id == bay->content_id) bay 369 drivers/macintosh/mediabay.c bay->value_count += msecs_to_jiffies(MB_POLL_DELAY); bay 370 drivers/macintosh/mediabay.c if (bay->value_count >= msecs_to_jiffies(MB_STABLE_DELAY)) { bay 375 drivers/macintosh/mediabay.c if ((id != MB_NO) && (bay->content_id != MB_NO)) { bay 377 drivers/macintosh/mediabay.c pr_debug("mediabay%d: forcing MB_NO\n", bay->index); bay 379 drivers/macintosh/mediabay.c pr_debug("mediabay%d: switching to %d\n", bay->index, id); bay 380 drivers/macintosh/mediabay.c set_mb_power(bay, id != MB_NO); bay 381 drivers/macintosh/mediabay.c bay->content_id = id; bay 383 drivers/macintosh/mediabay.c printk(KERN_INFO "mediabay%d: Bay is now empty\n", bay->index); bay 386 drivers/macintosh/mediabay.c bay->index, mb_content_types[id]); bay 392 drivers/macintosh/mediabay.c struct media_bay_info* bay; bay 403 drivers/macintosh/mediabay.c bay = macio_get_drvdata(baydev); bay 404 drivers/macintosh/mediabay.c if (bay == NULL) bay 406 drivers/macintosh/mediabay.c id = bay->content_id; bay 407 drivers/macintosh/mediabay.c if (bay->state != mb_up) bay 417 drivers/macintosh/mediabay.c struct media_bay_info* bay; bay 421 drivers/macintosh/mediabay.c bay = macio_get_drvdata(baydev); bay 422 drivers/macintosh/mediabay.c if (bay == NULL) bay 424 drivers/macintosh/mediabay.c mutex_lock(&bay->lock); bay 425 drivers/macintosh/mediabay.c bay->user_lock = 1; bay 431 drivers/macintosh/mediabay.c struct media_bay_info* bay; bay 435 drivers/macintosh/mediabay.c bay = macio_get_drvdata(baydev); bay 436 drivers/macintosh/mediabay.c if (bay == NULL) bay 438 drivers/macintosh/mediabay.c if (bay->user_lock) { bay 439 drivers/macintosh/mediabay.c bay->user_lock = 0; bay 440 drivers/macintosh/mediabay.c mutex_unlock(&bay->lock); bay 447 drivers/macintosh/mediabay.c struct media_bay_info* bay = data; bay 455 drivers/macintosh/mediabay.c state = bay->state == mb_up ? bay->content_id : MB_NO; bay 467 drivers/macintosh/mediabay.c struct media_bay_info* bay = &media_bays[i]; bay 470 drivers/macintosh/mediabay.c if (bay->state != mb_powering_down) bay 471 drivers/macintosh/mediabay.c poll_media_bay(bay); bay 474 drivers/macintosh/mediabay.c if (bay->timer != 0) { bay 475 drivers/macintosh/mediabay.c bay->timer -= msecs_to_jiffies(MB_POLL_DELAY); bay 476 drivers/macintosh/mediabay.c if (bay->timer > 0) bay 478 drivers/macintosh/mediabay.c bay->timer = 0; bay 481 drivers/macintosh/mediabay.c switch(bay->state) { bay 483 drivers/macintosh/mediabay.c if (bay->ops->setup_bus(bay, bay->last_value) < 0) { bay 485 drivers/macintosh/mediabay.c i, bay->content_id); bay 486 drivers/macintosh/mediabay.c set_mb_power(bay, 0); bay 489 drivers/macintosh/mediabay.c bay->timer = msecs_to_jiffies(MB_RESET_DELAY); bay 490 drivers/macintosh/mediabay.c bay->state = mb_enabling_bay; bay 491 drivers/macintosh/mediabay.c pr_debug("mediabay%d: enabling (kind:%d)\n", i, bay->content_id); bay 494 drivers/macintosh/mediabay.c bay->ops->un_reset(bay); bay 495 drivers/macintosh/mediabay.c bay->timer = msecs_to_jiffies(MB_SETUP_DELAY); bay 496 drivers/macintosh/mediabay.c bay->state = mb_resetting; bay 498 drivers/macintosh/mediabay.c i, bay->content_id); bay 501 drivers/macintosh/mediabay.c if (bay->content_id != MB_CD) { bay 503 drivers/macintosh/mediabay.c bay->content_id); bay 504 drivers/macintosh/mediabay.c bay->state = mb_up; bay 505 drivers/macintosh/mediabay.c device_for_each_child(&bay->mdev->ofdev.dev, bay 506 drivers/macintosh/mediabay.c bay, mb_broadcast_hotplug); bay 510 drivers/macintosh/mediabay.c i, bay->content_id); bay 511 drivers/macintosh/mediabay.c bay->ops->un_reset_ide(bay); bay 512 drivers/macintosh/mediabay.c bay->timer = msecs_to_jiffies(MB_IDE_WAIT); bay 513 drivers/macintosh/mediabay.c bay->state = mb_ide_resetting; bay 517 drivers/macintosh/mediabay.c pr_debug("mediabay%d: bay is up (kind:%d)\n", i, bay->content_id); bay 518 drivers/macintosh/mediabay.c bay->state = mb_up; bay 519 drivers/macintosh/mediabay.c device_for_each_child(&bay->mdev->ofdev.dev, bay 520 drivers/macintosh/mediabay.c bay, mb_broadcast_hotplug); bay 524 drivers/macintosh/mediabay.c bay->state = mb_empty; bay 525 drivers/macintosh/mediabay.c device_for_each_child(&bay->mdev->ofdev.dev, bay 526 drivers/macintosh/mediabay.c bay, mb_broadcast_hotplug); bay 558 drivers/macintosh/mediabay.c struct media_bay_info* bay; bay 582 drivers/macintosh/mediabay.c bay = &media_bays[i]; bay 583 drivers/macintosh/mediabay.c bay->mdev = mdev; bay 584 drivers/macintosh/mediabay.c bay->base = regbase; bay 585 drivers/macintosh/mediabay.c bay->index = i; bay 586 drivers/macintosh/mediabay.c bay->ops = match->data; bay 587 drivers/macintosh/mediabay.c bay->sleeping = 0; bay 588 drivers/macintosh/mediabay.c mutex_init(&bay->lock); bay 591 drivers/macintosh/mediabay.c if (bay->ops->init) bay 592 drivers/macintosh/mediabay.c bay->ops->init(bay); bay 594 drivers/macintosh/mediabay.c printk(KERN_INFO "mediabay%d: Registered %s media-bay\n", i, bay->ops->name); bay 597 drivers/macintosh/mediabay.c set_mb_power(bay, 0); bay 599 drivers/macintosh/mediabay.c bay->content_id = MB_NO; bay 600 drivers/macintosh/mediabay.c bay->last_value = bay->ops->content(bay); bay 601 drivers/macintosh/mediabay.c bay->value_count = msecs_to_jiffies(MB_STABLE_DELAY); bay 602 drivers/macintosh/mediabay.c bay->state = mb_empty; bay 605 drivers/macintosh/mediabay.c macio_set_drvdata(mdev, bay); bay 617 drivers/macintosh/mediabay.c struct media_bay_info *bay = macio_get_drvdata(mdev); bay 621 drivers/macintosh/mediabay.c mutex_lock(&bay->lock); bay 622 drivers/macintosh/mediabay.c bay->sleeping = 1; bay 623 drivers/macintosh/mediabay.c set_mb_power(bay, 0); bay 624 drivers/macintosh/mediabay.c mutex_unlock(&bay->lock); bay 633 drivers/macintosh/mediabay.c struct media_bay_info *bay = macio_get_drvdata(mdev); bay 643 drivers/macintosh/mediabay.c mutex_lock(&bay->lock); bay 644 drivers/macintosh/mediabay.c set_mb_power(bay, 0); bay 646 drivers/macintosh/mediabay.c if (bay->ops->content(bay) != bay->content_id) { bay 647 drivers/macintosh/mediabay.c printk("mediabay%d: Content changed during sleep...\n", bay->index); bay 648 drivers/macintosh/mediabay.c mutex_unlock(&bay->lock); bay 651 drivers/macintosh/mediabay.c set_mb_power(bay, 1); bay 652 drivers/macintosh/mediabay.c bay->last_value = bay->content_id; bay 653 drivers/macintosh/mediabay.c bay->value_count = msecs_to_jiffies(MB_STABLE_DELAY); bay 654 drivers/macintosh/mediabay.c bay->timer = msecs_to_jiffies(MB_POWER_DELAY); bay 657 drivers/macintosh/mediabay.c media_bay_step(bay->index); bay 658 drivers/macintosh/mediabay.c } while((bay->state != mb_empty) && bay 659 drivers/macintosh/mediabay.c (bay->state != mb_up)); bay 660 drivers/macintosh/mediabay.c bay->sleeping = 0; bay 661 drivers/macintosh/mediabay.c mutex_unlock(&bay->lock); bay 806 drivers/scsi/hpsa.c u8 bay; bay 820 drivers/scsi/hpsa.c bay = hdev->bay; bay 861 drivers/scsi/hpsa.c bay, active); bay 866 drivers/scsi/hpsa.c box, bay, active); bay 4204 drivers/scsi/hpsa.c memcpy(&this_device->bay, bay 4206 drivers/scsi/hpsa.c sizeof(this_device->bay)); bay 88 drivers/scsi/hpsa.h u8 bay; bay 932 drivers/scsi/smartpqi/smartpqi.h u8 bay; bay 1369 drivers/scsi/smartpqi/smartpqi_init.c device->bay = id_phys->phys_bay_in_box; bay 1683 drivers/scsi/smartpqi/smartpqi_init.c existing_device->bay = new_device->bay; bay 6310 drivers/scsi/smartpqi/smartpqi_init.c u8 bay; bay 6327 drivers/scsi/smartpqi/smartpqi_init.c bay = device->bay; bay 6371 drivers/scsi/smartpqi/smartpqi_init.c "BAY: %hhu ", bay); bay 344 drivers/scsi/smartpqi/smartpqi_sas_transport.c found_device->bay == 0xff) { bay 410 drivers/scsi/smartpqi/smartpqi_sas_transport.c if (device->bay == 0xff) bay 413 drivers/scsi/smartpqi/smartpqi_sas_transport.c rc = device->bay; bay 95 include/acpi/acbuffer.h u8 bay;