flash 332 arch/arm/mach-ixp4xx/goramo_mlr.c static inline u8 __init flash_readb(u8 __iomem *flash, u32 addr) flash 335 arch/arm/mach-ixp4xx/goramo_mlr.c return __raw_readb(flash + addr); flash 337 arch/arm/mach-ixp4xx/goramo_mlr.c return __raw_readb(flash + (addr ^ 3)); flash 341 arch/arm/mach-ixp4xx/goramo_mlr.c static inline u16 __init flash_readw(u8 __iomem *flash, u32 addr) flash 344 arch/arm/mach-ixp4xx/goramo_mlr.c return __raw_readw(flash + addr); flash 346 arch/arm/mach-ixp4xx/goramo_mlr.c return __raw_readw(flash + (addr ^ 2)); flash 352 arch/arm/mach-ixp4xx/goramo_mlr.c u8 __iomem *flash; flash 357 arch/arm/mach-ixp4xx/goramo_mlr.c if ((flash = ioremap(IXP4XX_EXP_BUS_BASE_PHYS, 0x80)) == NULL) flash 361 arch/arm/mach-ixp4xx/goramo_mlr.c system_rev = __raw_readl(flash + CFG_REV); flash 362 arch/arm/mach-ixp4xx/goramo_mlr.c hw_bits = __raw_readl(flash + CFG_HW_BITS); flash 366 arch/arm/mach-ixp4xx/goramo_mlr.c flash_readb(flash, CFG_ETH0_ADDRESS + i); flash 368 arch/arm/mach-ixp4xx/goramo_mlr.c flash_readb(flash, CFG_ETH1_ADDRESS + i); flash 371 arch/arm/mach-ixp4xx/goramo_mlr.c __raw_writew(FLASH_CMD_READ_ID, flash); flash 372 arch/arm/mach-ixp4xx/goramo_mlr.c system_serial_high = flash_readw(flash, FLASH_SER_OFF); flash 374 arch/arm/mach-ixp4xx/goramo_mlr.c system_serial_high |= flash_readw(flash, FLASH_SER_OFF + 2); flash 375 arch/arm/mach-ixp4xx/goramo_mlr.c system_serial_low = flash_readw(flash, FLASH_SER_OFF + 4); flash 377 arch/arm/mach-ixp4xx/goramo_mlr.c system_serial_low |= flash_readw(flash, FLASH_SER_OFF + 6); flash 378 arch/arm/mach-ixp4xx/goramo_mlr.c __raw_writew(FLASH_CMD_READ_ARRAY, flash); flash 380 arch/arm/mach-ixp4xx/goramo_mlr.c iounmap(flash); flash 247 arch/arm/mach-sa1100/generic.c void sa11x0_register_mtd(struct flash_platform_data *flash, flash 250 arch/arm/mach-sa1100/generic.c flash->name = "sa1100"; flash 253 arch/arm/mach-sa1100/generic.c sa11x0_register_device(&sa11x0mtd_device, flash); flash 30 arch/arm/mach-sa1100/generic.h void sa11x0_register_mtd(struct flash_platform_data *flash, flash 285 arch/powerpc/platforms/powernv/opal-flash.c goto flash; flash 295 arch/powerpc/platforms/powernv/opal-flash.c flash: flash 220 drivers/isdn/hardware/mISDN/hfc_multi.h u_int flash[8]; /* counter for flashing 8 leds on activity */ flash 1629 drivers/isdn/hardware/mISDN/hfcmulti.c hc->flash[2] = 0; flash 1630 drivers/isdn/hardware/mISDN/hfcmulti.c hc->flash[3] = 0; flash 1634 drivers/isdn/hardware/mISDN/hfcmulti.c if (!hc->flash[2] && hc->activity_tx) flash 1635 drivers/isdn/hardware/mISDN/hfcmulti.c hc->flash[2] = poll; flash 1636 drivers/isdn/hardware/mISDN/hfcmulti.c if (!hc->flash[3] && hc->activity_rx) flash 1637 drivers/isdn/hardware/mISDN/hfcmulti.c hc->flash[3] = poll; flash 1638 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->flash[2] && hc->flash[2] < 1024) flash 1640 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->flash[3] && hc->flash[3] < 1024) flash 1642 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->flash[2] >= 2048) flash 1643 drivers/isdn/hardware/mISDN/hfcmulti.c hc->flash[2] = 0; flash 1644 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->flash[3] >= 2048) flash 1645 drivers/isdn/hardware/mISDN/hfcmulti.c hc->flash[3] = 0; flash 1646 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->flash[2]) flash 1647 drivers/isdn/hardware/mISDN/hfcmulti.c hc->flash[2] += poll; flash 1648 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->flash[3]) flash 1649 drivers/isdn/hardware/mISDN/hfcmulti.c hc->flash[3] += poll; flash 1680 drivers/isdn/hardware/mISDN/hfcmulti.c if (!hc->flash[i] && flash 1682 drivers/isdn/hardware/mISDN/hfcmulti.c hc->flash[i] = poll; flash 1683 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->flash[i] && hc->flash[i] < 1024) flash 1685 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->flash[i] >= 2048) flash 1686 drivers/isdn/hardware/mISDN/hfcmulti.c hc->flash[i] = 0; flash 1687 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->flash[i]) flash 1688 drivers/isdn/hardware/mISDN/hfcmulti.c hc->flash[i] += poll; flash 1691 drivers/isdn/hardware/mISDN/hfcmulti.c hc->flash[i] = 0; flash 1744 drivers/isdn/hardware/mISDN/hfcmulti.c if (!hc->flash[i] && flash 1746 drivers/isdn/hardware/mISDN/hfcmulti.c hc->flash[i] = poll; flash 1747 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->flash[i] < 1024) flash 1749 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->flash[i] >= 2048) flash 1750 drivers/isdn/hardware/mISDN/hfcmulti.c hc->flash[i] = 0; flash 1751 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->flash[i]) flash 1752 drivers/isdn/hardware/mISDN/hfcmulti.c hc->flash[i] += poll; flash 1755 drivers/isdn/hardware/mISDN/hfcmulti.c hc->flash[i] = 0; flash 1791 drivers/isdn/hardware/mISDN/hfcmulti.c if (!hc->flash[i] && flash 1793 drivers/isdn/hardware/mISDN/hfcmulti.c hc->flash[i] = poll; flash 1794 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->flash[i] < 1024) flash 1796 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->flash[i] >= 2048) flash 1797 drivers/isdn/hardware/mISDN/hfcmulti.c hc->flash[i] = 0; flash 1798 drivers/isdn/hardware/mISDN/hfcmulti.c if (hc->flash[i]) flash 1799 drivers/isdn/hardware/mISDN/hfcmulti.c hc->flash[i] += poll; flash 1801 drivers/isdn/hardware/mISDN/hfcmulti.c hc->flash[i] = 0; flash 156 drivers/leds/leds-as3645a.c static int as3645a_write(struct as3645a *flash, u8 addr, u8 val) flash 158 drivers/leds/leds-as3645a.c struct i2c_client *client = flash->client; flash 170 drivers/leds/leds-as3645a.c static int as3645a_read(struct as3645a *flash, u8 addr) flash 172 drivers/leds/leds-as3645a.c struct i2c_client *client = flash->client; flash 197 drivers/leds/leds-as3645a.c static int as3645a_set_current(struct as3645a *flash) flash 201 drivers/leds/leds-as3645a.c val = (flash->flash_current << AS_CURRENT_FLASH_CURRENT_SHIFT) flash 202 drivers/leds/leds-as3645a.c | (flash->assist_current << AS_CURRENT_ASSIST_LIGHT_SHIFT) flash 205 drivers/leds/leds-as3645a.c return as3645a_write(flash, AS_CURRENT_SET_REG, val); flash 208 drivers/leds/leds-as3645a.c static int as3645a_set_timeout(struct as3645a *flash) flash 212 drivers/leds/leds-as3645a.c val = flash->timeout << AS_INDICATOR_AND_TIMER_TIMEOUT_SHIFT; flash 214 drivers/leds/leds-as3645a.c val |= (flash->cfg.voltage_reference flash 216 drivers/leds/leds-as3645a.c | ((flash->indicator_current ? flash->indicator_current - 1 : 0) flash 219 drivers/leds/leds-as3645a.c return as3645a_write(flash, AS_INDICATOR_AND_TIMER_REG, val); flash 234 drivers/leds/leds-as3645a.c as3645a_set_control(struct as3645a *flash, enum as_mode mode, bool on) flash 239 drivers/leds/leds-as3645a.c reg = (flash->cfg.peak << AS_CONTROL_COIL_PEAK_SHIFT) flash 244 drivers/leds/leds-as3645a.c flash->strobe_source == V4L2_FLASH_STROBE_SOURCE_EXTERNAL) flash 248 drivers/leds/leds-as3645a.c return as3645a_write(flash, AS_CONTROL_REG, reg); flash 253 drivers/leds/leds-as3645a.c struct as3645a *flash = fled_to_as3645a(fled); flash 257 drivers/leds/leds-as3645a.c rval = as3645a_read(flash, AS_FAULT_INFO_REG); flash 267 drivers/leds/leds-as3645a.c dev_dbg(&flash->client->dev, "%u connected LEDs\n", flash 298 drivers/leds/leds-as3645a.c static unsigned int as3645a_current_to_reg(struct as3645a *flash, bool is_flash, flash 303 drivers/leds/leds-as3645a.c flash->cfg.assist_max_ua, flash 307 drivers/leds/leds-as3645a.c flash->cfg.flash_max_ua, flash 314 drivers/leds/leds-as3645a.c struct as3645a *flash = iled_cdev_to_as3645a(iled_cdev); flash 317 drivers/leds/leds-as3645a.c flash->indicator_current = brightness; flash 319 drivers/leds/leds-as3645a.c rval = as3645a_set_timeout(flash); flash 323 drivers/leds/leds-as3645a.c return as3645a_set_control(flash, AS_MODE_INDICATOR, brightness); flash 330 drivers/leds/leds-as3645a.c struct as3645a *flash = fled_to_as3645a(fled); flash 335 drivers/leds/leds-as3645a.c flash->assist_current = brightness - 1; flash 337 drivers/leds/leds-as3645a.c rval = as3645a_set_current(flash); flash 342 drivers/leds/leds-as3645a.c return as3645a_set_control(flash, AS_MODE_ASSIST, brightness); flash 348 drivers/leds/leds-as3645a.c struct as3645a *flash = fled_to_as3645a(fled); flash 350 drivers/leds/leds-as3645a.c flash->flash_current = as3645a_current_to_reg(flash, true, flash 353 drivers/leds/leds-as3645a.c return as3645a_set_current(flash); flash 359 drivers/leds/leds-as3645a.c struct as3645a *flash = fled_to_as3645a(fled); flash 361 drivers/leds/leds-as3645a.c flash->timeout = AS_TIMER_US_TO_CODE(timeout_us); flash 363 drivers/leds/leds-as3645a.c return as3645a_set_timeout(flash); flash 368 drivers/leds/leds-as3645a.c struct as3645a *flash = fled_to_as3645a(fled); flash 370 drivers/leds/leds-as3645a.c return as3645a_set_control(flash, AS_MODE_FLASH, state); flash 380 drivers/leds/leds-as3645a.c static int as3645a_setup(struct as3645a *flash) flash 382 drivers/leds/leds-as3645a.c struct device *dev = &flash->client->dev; flash 387 drivers/leds/leds-as3645a.c rval = as3645a_read(flash, AS_FAULT_INFO_REG); flash 393 drivers/leds/leds-as3645a.c rval = as3645a_set_current(flash); flash 397 drivers/leds/leds-as3645a.c rval = as3645a_set_timeout(flash); flash 401 drivers/leds/leds-as3645a.c rval = as3645a_set_control(flash, AS_MODE_INDICATOR, false); flash 406 drivers/leds/leds-as3645a.c rval = as3645a_get_fault(&flash->fled, &fault); flash 411 drivers/leds/leds-as3645a.c as3645a_read(flash, AS_INDICATOR_AND_TIMER_REG)); flash 413 drivers/leds/leds-as3645a.c as3645a_read(flash, AS_CURRENT_SET_REG)); flash 415 drivers/leds/leds-as3645a.c as3645a_read(flash, AS_CONTROL_REG)); flash 420 drivers/leds/leds-as3645a.c static int as3645a_detect(struct as3645a *flash) flash 422 drivers/leds/leds-as3645a.c struct device *dev = &flash->client->dev; flash 426 drivers/leds/leds-as3645a.c rval = as3645a_read(flash, AS_DESIGN_INFO_REG); flash 435 drivers/leds/leds-as3645a.c rval = as3645a_read(flash, AS_VERSION_CONTROL_REG); flash 474 drivers/leds/leds-as3645a.c rval = as3645a_write(flash, AS_PASSWORD_REG, AS_PASSWORD_UNLOCK_VALUE); flash 478 drivers/leds/leds-as3645a.c return as3645a_write(flash, AS_BOOST_REG, AS_BOOST_CURRENT_DISABLE); flash 481 drivers/leds/leds-as3645a.c static int as3645a_parse_node(struct as3645a *flash, flash 484 drivers/leds/leds-as3645a.c struct as3645a_config *cfg = &flash->cfg; flash 495 drivers/leds/leds-as3645a.c flash->flash_node = child; flash 498 drivers/leds/leds-as3645a.c flash->indicator_node = child; flash 501 drivers/leds/leds-as3645a.c dev_warn(&flash->client->dev, flash 508 drivers/leds/leds-as3645a.c if (!flash->flash_node) { flash 509 drivers/leds/leds-as3645a.c dev_err(&flash->client->dev, "can't find flash node\n"); flash 513 drivers/leds/leds-as3645a.c rval = fwnode_property_read_u32(flash->flash_node, "flash-timeout-us", flash 516 drivers/leds/leds-as3645a.c dev_err(&flash->client->dev, flash 521 drivers/leds/leds-as3645a.c rval = fwnode_property_read_u32(flash->flash_node, "flash-max-microamp", flash 524 drivers/leds/leds-as3645a.c dev_err(&flash->client->dev, flash 529 drivers/leds/leds-as3645a.c rval = fwnode_property_read_u32(flash->flash_node, "led-max-microamp", flash 532 drivers/leds/leds-as3645a.c dev_err(&flash->client->dev, flash 537 drivers/leds/leds-as3645a.c fwnode_property_read_u32(flash->flash_node, "voltage-reference", flash 540 drivers/leds/leds-as3645a.c fwnode_property_read_u32(flash->flash_node, "ams,input-max-microamp", flash 544 drivers/leds/leds-as3645a.c if (!flash->indicator_node) { flash 545 drivers/leds/leds-as3645a.c dev_warn(&flash->client->dev, flash 551 drivers/leds/leds-as3645a.c rval = fwnode_property_read_u32(flash->indicator_node, flash 555 drivers/leds/leds-as3645a.c dev_err(&flash->client->dev, flash 563 drivers/leds/leds-as3645a.c fwnode_handle_put(flash->flash_node); flash 564 drivers/leds/leds-as3645a.c fwnode_handle_put(flash->indicator_node); flash 569 drivers/leds/leds-as3645a.c static int as3645a_led_class_setup(struct as3645a *flash) flash 571 drivers/leds/leds-as3645a.c struct led_classdev *fled_cdev = &flash->fled.led_cdev; flash 572 drivers/leds/leds-as3645a.c struct led_classdev *iled_cdev = &flash->iled_cdev; flash 579 drivers/leds/leds-as3645a.c flash->cfg.indicator_max_ua / AS_INDICATOR_INTENSITY_STEP; flash 582 drivers/leds/leds-as3645a.c init_data.fwnode = flash->indicator_node; flash 586 drivers/leds/leds-as3645a.c rval = led_classdev_register_ext(&flash->client->dev, iled_cdev, flash 591 drivers/leds/leds-as3645a.c cfg = &flash->fled.brightness; flash 593 drivers/leds/leds-as3645a.c cfg->max = flash->cfg.flash_max_ua; flash 595 drivers/leds/leds-as3645a.c cfg->val = flash->cfg.flash_max_ua; flash 597 drivers/leds/leds-as3645a.c cfg = &flash->fled.timeout; flash 599 drivers/leds/leds-as3645a.c cfg->max = flash->cfg.flash_timeout_us; flash 601 drivers/leds/leds-as3645a.c cfg->val = flash->cfg.flash_timeout_us; flash 603 drivers/leds/leds-as3645a.c flash->fled.ops = &as3645a_led_flash_ops; flash 608 drivers/leds/leds-as3645a.c as3645a_current_to_reg(flash, false, flash 609 drivers/leds/leds-as3645a.c flash->cfg.assist_max_ua) + 1; flash 612 drivers/leds/leds-as3645a.c init_data.fwnode = flash->flash_node; flash 616 drivers/leds/leds-as3645a.c rval = led_classdev_flash_register_ext(&flash->client->dev, flash 617 drivers/leds/leds-as3645a.c &flash->fled, &init_data); flash 625 drivers/leds/leds-as3645a.c dev_err(&flash->client->dev, flash 631 drivers/leds/leds-as3645a.c static int as3645a_v4l2_setup(struct as3645a *flash) flash 633 drivers/leds/leds-as3645a.c struct led_classdev_flash *fled = &flash->fled; flash 638 drivers/leds/leds-as3645a.c .max = flash->cfg.assist_max_ua, flash 640 drivers/leds/leds-as3645a.c .val = flash->cfg.assist_max_ua, flash 646 drivers/leds/leds-as3645a.c .max = flash->cfg.indicator_max_ua, flash 648 drivers/leds/leds-as3645a.c .val = flash->cfg.indicator_max_ua, flash 653 drivers/leds/leds-as3645a.c strlcpy(cfgind.dev_name, flash->iled_cdev.dev->kobj.name, flash 656 drivers/leds/leds-as3645a.c flash->vf = v4l2_flash_init( flash 657 drivers/leds/leds-as3645a.c &flash->client->dev, flash->flash_node, &flash->fled, NULL, flash 659 drivers/leds/leds-as3645a.c if (IS_ERR(flash->vf)) flash 660 drivers/leds/leds-as3645a.c return PTR_ERR(flash->vf); flash 662 drivers/leds/leds-as3645a.c flash->vfind = v4l2_flash_indicator_init( flash 663 drivers/leds/leds-as3645a.c &flash->client->dev, flash->indicator_node, &flash->iled_cdev, flash 665 drivers/leds/leds-as3645a.c if (IS_ERR(flash->vfind)) { flash 666 drivers/leds/leds-as3645a.c v4l2_flash_release(flash->vf); flash 667 drivers/leds/leds-as3645a.c return PTR_ERR(flash->vfind); flash 675 drivers/leds/leds-as3645a.c struct as3645a *flash; flash 681 drivers/leds/leds-as3645a.c flash = devm_kzalloc(&client->dev, sizeof(*flash), GFP_KERNEL); flash 682 drivers/leds/leds-as3645a.c if (flash == NULL) flash 685 drivers/leds/leds-as3645a.c flash->client = client; flash 687 drivers/leds/leds-as3645a.c rval = as3645a_parse_node(flash, dev_fwnode(&client->dev)); flash 691 drivers/leds/leds-as3645a.c rval = as3645a_detect(flash); flash 695 drivers/leds/leds-as3645a.c mutex_init(&flash->mutex); flash 696 drivers/leds/leds-as3645a.c i2c_set_clientdata(client, flash); flash 698 drivers/leds/leds-as3645a.c rval = as3645a_setup(flash); flash 702 drivers/leds/leds-as3645a.c rval = as3645a_led_class_setup(flash); flash 706 drivers/leds/leds-as3645a.c rval = as3645a_v4l2_setup(flash); flash 713 drivers/leds/leds-as3645a.c led_classdev_flash_unregister(&flash->fled); flash 716 drivers/leds/leds-as3645a.c mutex_destroy(&flash->mutex); flash 719 drivers/leds/leds-as3645a.c fwnode_handle_put(flash->flash_node); flash 720 drivers/leds/leds-as3645a.c fwnode_handle_put(flash->indicator_node); flash 727 drivers/leds/leds-as3645a.c struct as3645a *flash = i2c_get_clientdata(client); flash 729 drivers/leds/leds-as3645a.c as3645a_set_control(flash, AS_MODE_EXT_TORCH, false); flash 731 drivers/leds/leds-as3645a.c v4l2_flash_release(flash->vf); flash 732 drivers/leds/leds-as3645a.c v4l2_flash_release(flash->vfind); flash 734 drivers/leds/leds-as3645a.c led_classdev_flash_unregister(&flash->fled); flash 735 drivers/leds/leds-as3645a.c led_classdev_unregister(&flash->iled_cdev); flash 737 drivers/leds/leds-as3645a.c mutex_destroy(&flash->mutex); flash 739 drivers/leds/leds-as3645a.c fwnode_handle_put(flash->flash_node); flash 740 drivers/leds/leds-as3645a.c fwnode_handle_put(flash->indicator_node); flash 38 drivers/media/i2c/adp1653.c static int adp1653_update_hw(struct adp1653_flash *flash) flash 40 drivers/media/i2c/adp1653.c struct i2c_client *client = v4l2_get_subdevdata(&flash->subdev); flash 46 drivers/media/i2c/adp1653.c flash->indicator_intensity->val) flash 49 drivers/media/i2c/adp1653.c switch (flash->led_mode->val) { flash 55 drivers/media/i2c/adp1653.c config |= TIMEOUT_US_TO_CODE(flash->flash_timeout->val) flash 61 drivers/media/i2c/adp1653.c flash->torch_intensity->val) flash 77 drivers/media/i2c/adp1653.c static int adp1653_get_fault(struct adp1653_flash *flash) flash 79 drivers/media/i2c/adp1653.c struct i2c_client *client = v4l2_get_subdevdata(&flash->subdev); flash 87 drivers/media/i2c/adp1653.c flash->fault |= fault; flash 89 drivers/media/i2c/adp1653.c if (!flash->fault) flash 97 drivers/media/i2c/adp1653.c flash->led_mode->val = V4L2_FLASH_LED_MODE_NONE; flash 99 drivers/media/i2c/adp1653.c rval = adp1653_update_hw(flash); flash 103 drivers/media/i2c/adp1653.c return flash->fault; flash 106 drivers/media/i2c/adp1653.c static int adp1653_strobe(struct adp1653_flash *flash, int enable) flash 108 drivers/media/i2c/adp1653.c struct i2c_client *client = v4l2_get_subdevdata(&flash->subdev); flash 110 drivers/media/i2c/adp1653.c flash->indicator_intensity->val) flash 114 drivers/media/i2c/adp1653.c if (flash->led_mode->val != V4L2_FLASH_LED_MODE_FLASH) flash 122 drivers/media/i2c/adp1653.c flash->flash_intensity->val) flash 142 drivers/media/i2c/adp1653.c struct adp1653_flash *flash = flash 146 drivers/media/i2c/adp1653.c rval = adp1653_get_fault(flash); flash 152 drivers/media/i2c/adp1653.c if (flash->fault & ADP1653_REG_FAULT_FLT_SCP) flash 154 drivers/media/i2c/adp1653.c if (flash->fault & ADP1653_REG_FAULT_FLT_OT) flash 156 drivers/media/i2c/adp1653.c if (flash->fault & ADP1653_REG_FAULT_FLT_TMR) flash 158 drivers/media/i2c/adp1653.c if (flash->fault & ADP1653_REG_FAULT_FLT_OV) flash 161 drivers/media/i2c/adp1653.c flash->fault = 0; flash 168 drivers/media/i2c/adp1653.c struct adp1653_flash *flash = flash 172 drivers/media/i2c/adp1653.c rval = adp1653_get_fault(flash); flash 185 drivers/media/i2c/adp1653.c return adp1653_strobe(flash, 1); flash 187 drivers/media/i2c/adp1653.c return adp1653_strobe(flash, 0); flash 190 drivers/media/i2c/adp1653.c return adp1653_update_hw(flash); flash 198 drivers/media/i2c/adp1653.c static int adp1653_init_controls(struct adp1653_flash *flash) flash 202 drivers/media/i2c/adp1653.c v4l2_ctrl_handler_init(&flash->ctrls, 9); flash 204 drivers/media/i2c/adp1653.c flash->led_mode = flash 205 drivers/media/i2c/adp1653.c v4l2_ctrl_new_std_menu(&flash->ctrls, &adp1653_ctrl_ops, flash 208 drivers/media/i2c/adp1653.c v4l2_ctrl_new_std_menu(&flash->ctrls, &adp1653_ctrl_ops, flash 211 drivers/media/i2c/adp1653.c v4l2_ctrl_new_std(&flash->ctrls, &adp1653_ctrl_ops, flash 213 drivers/media/i2c/adp1653.c v4l2_ctrl_new_std(&flash->ctrls, &adp1653_ctrl_ops, flash 215 drivers/media/i2c/adp1653.c flash->flash_timeout = flash 216 drivers/media/i2c/adp1653.c v4l2_ctrl_new_std(&flash->ctrls, &adp1653_ctrl_ops, flash 218 drivers/media/i2c/adp1653.c flash->platform_data->max_flash_timeout, flash 220 drivers/media/i2c/adp1653.c flash->platform_data->max_flash_timeout); flash 221 drivers/media/i2c/adp1653.c flash->flash_intensity = flash 222 drivers/media/i2c/adp1653.c v4l2_ctrl_new_std(&flash->ctrls, &adp1653_ctrl_ops, flash 225 drivers/media/i2c/adp1653.c flash->platform_data->max_flash_intensity, flash 226 drivers/media/i2c/adp1653.c 1, flash->platform_data->max_flash_intensity); flash 227 drivers/media/i2c/adp1653.c flash->torch_intensity = flash 228 drivers/media/i2c/adp1653.c v4l2_ctrl_new_std(&flash->ctrls, &adp1653_ctrl_ops, flash 231 drivers/media/i2c/adp1653.c flash->platform_data->max_torch_intensity, flash 233 drivers/media/i2c/adp1653.c flash->platform_data->max_torch_intensity); flash 234 drivers/media/i2c/adp1653.c flash->indicator_intensity = flash 235 drivers/media/i2c/adp1653.c v4l2_ctrl_new_std(&flash->ctrls, &adp1653_ctrl_ops, flash 238 drivers/media/i2c/adp1653.c flash->platform_data->max_indicator_intensity, flash 241 drivers/media/i2c/adp1653.c fault = v4l2_ctrl_new_std(&flash->ctrls, &adp1653_ctrl_ops, flash 247 drivers/media/i2c/adp1653.c if (flash->ctrls.error) flash 248 drivers/media/i2c/adp1653.c return flash->ctrls.error; flash 252 drivers/media/i2c/adp1653.c flash->subdev.ctrl_handler = &flash->ctrls; flash 261 drivers/media/i2c/adp1653.c adp1653_init_device(struct adp1653_flash *flash) flash 263 drivers/media/i2c/adp1653.c struct i2c_client *client = v4l2_get_subdevdata(&flash->subdev); flash 273 drivers/media/i2c/adp1653.c mutex_lock(flash->ctrls.lock); flash 275 drivers/media/i2c/adp1653.c flash->fault = 0; flash 276 drivers/media/i2c/adp1653.c rval = adp1653_get_fault(flash); flash 277 drivers/media/i2c/adp1653.c mutex_unlock(flash->ctrls.lock); flash 283 drivers/media/i2c/adp1653.c mutex_lock(flash->ctrls.lock); flash 284 drivers/media/i2c/adp1653.c rval = adp1653_update_hw(flash); flash 285 drivers/media/i2c/adp1653.c mutex_unlock(flash->ctrls.lock); flash 296 drivers/media/i2c/adp1653.c __adp1653_set_power(struct adp1653_flash *flash, int on) flash 300 drivers/media/i2c/adp1653.c if (flash->platform_data->power) { flash 301 drivers/media/i2c/adp1653.c ret = flash->platform_data->power(&flash->subdev, on); flash 305 drivers/media/i2c/adp1653.c gpiod_set_value(flash->platform_data->enable_gpio, on); flash 314 drivers/media/i2c/adp1653.c ret = adp1653_init_device(flash); flash 318 drivers/media/i2c/adp1653.c if (flash->platform_data->power) flash 319 drivers/media/i2c/adp1653.c flash->platform_data->power(&flash->subdev, 0); flash 321 drivers/media/i2c/adp1653.c gpiod_set_value(flash->platform_data->enable_gpio, 0); flash 329 drivers/media/i2c/adp1653.c struct adp1653_flash *flash = to_adp1653_flash(subdev); flash 332 drivers/media/i2c/adp1653.c mutex_lock(&flash->power_lock); flash 337 drivers/media/i2c/adp1653.c if (flash->power_count == !on) { flash 338 drivers/media/i2c/adp1653.c ret = __adp1653_set_power(flash, !!on); flash 344 drivers/media/i2c/adp1653.c flash->power_count += on ? 1 : -1; flash 345 drivers/media/i2c/adp1653.c WARN_ON(flash->power_count < 0); flash 348 drivers/media/i2c/adp1653.c mutex_unlock(&flash->power_lock); flash 384 drivers/media/i2c/adp1653.c struct adp1653_flash *flash = to_adp1653_flash(subdev); flash 386 drivers/media/i2c/adp1653.c if (!flash->power_count) flash 389 drivers/media/i2c/adp1653.c return __adp1653_set_power(flash, 0); flash 396 drivers/media/i2c/adp1653.c struct adp1653_flash *flash = to_adp1653_flash(subdev); flash 398 drivers/media/i2c/adp1653.c if (!flash->power_count) flash 401 drivers/media/i2c/adp1653.c return __adp1653_set_power(flash, 1); flash 412 drivers/media/i2c/adp1653.c struct adp1653_flash *flash, flash 421 drivers/media/i2c/adp1653.c flash->platform_data = pd; flash 471 drivers/media/i2c/adp1653.c struct adp1653_flash *flash; flash 474 drivers/media/i2c/adp1653.c flash = devm_kzalloc(&client->dev, sizeof(*flash), GFP_KERNEL); flash 475 drivers/media/i2c/adp1653.c if (flash == NULL) flash 479 drivers/media/i2c/adp1653.c ret = adp1653_of_init(client, flash, client->dev.of_node); flash 488 drivers/media/i2c/adp1653.c flash->platform_data = client->dev.platform_data; flash 491 drivers/media/i2c/adp1653.c mutex_init(&flash->power_lock); flash 493 drivers/media/i2c/adp1653.c v4l2_i2c_subdev_init(&flash->subdev, client, &adp1653_ops); flash 494 drivers/media/i2c/adp1653.c flash->subdev.internal_ops = &adp1653_internal_ops; flash 495 drivers/media/i2c/adp1653.c flash->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; flash 497 drivers/media/i2c/adp1653.c ret = adp1653_init_controls(flash); flash 501 drivers/media/i2c/adp1653.c ret = media_entity_pads_init(&flash->subdev.entity, 0, NULL); flash 505 drivers/media/i2c/adp1653.c flash->subdev.entity.function = MEDIA_ENT_F_FLASH; flash 511 drivers/media/i2c/adp1653.c v4l2_ctrl_handler_free(&flash->ctrls); flash 518 drivers/media/i2c/adp1653.c struct adp1653_flash *flash = to_adp1653_flash(subdev); flash 520 drivers/media/i2c/adp1653.c v4l2_device_unregister_subdev(&flash->subdev); flash 521 drivers/media/i2c/adp1653.c v4l2_ctrl_handler_free(&flash->ctrls); flash 522 drivers/media/i2c/adp1653.c media_entity_cleanup(&flash->subdev.entity); flash 68 drivers/media/i2c/lm3560.c static int lm3560_mode_ctrl(struct lm3560_flash *flash) flash 72 drivers/media/i2c/lm3560.c switch (flash->led_mode) { flash 74 drivers/media/i2c/lm3560.c rval = regmap_update_bits(flash->regmap, flash 78 drivers/media/i2c/lm3560.c rval = regmap_update_bits(flash->regmap, flash 82 drivers/media/i2c/lm3560.c rval = regmap_update_bits(flash->regmap, flash 90 drivers/media/i2c/lm3560.c static int lm3560_enable_ctrl(struct lm3560_flash *flash, flash 97 drivers/media/i2c/lm3560.c rval = regmap_update_bits(flash->regmap, flash 100 drivers/media/i2c/lm3560.c rval = regmap_update_bits(flash->regmap, flash 104 drivers/media/i2c/lm3560.c rval = regmap_update_bits(flash->regmap, flash 107 drivers/media/i2c/lm3560.c rval = regmap_update_bits(flash->regmap, flash 114 drivers/media/i2c/lm3560.c static int lm3560_torch_brt_ctrl(struct lm3560_flash *flash, flash 121 drivers/media/i2c/lm3560.c return lm3560_enable_ctrl(flash, led_no, false); flash 123 drivers/media/i2c/lm3560.c rval = lm3560_enable_ctrl(flash, led_no, true); flash 127 drivers/media/i2c/lm3560.c rval = regmap_update_bits(flash->regmap, flash 130 drivers/media/i2c/lm3560.c rval = regmap_update_bits(flash->regmap, flash 137 drivers/media/i2c/lm3560.c static int lm3560_flash_brt_ctrl(struct lm3560_flash *flash, flash 144 drivers/media/i2c/lm3560.c return lm3560_enable_ctrl(flash, led_no, false); flash 146 drivers/media/i2c/lm3560.c rval = lm3560_enable_ctrl(flash, led_no, true); flash 150 drivers/media/i2c/lm3560.c rval = regmap_update_bits(flash->regmap, flash 153 drivers/media/i2c/lm3560.c rval = regmap_update_bits(flash->regmap, flash 162 drivers/media/i2c/lm3560.c struct lm3560_flash *flash = to_lm3560_flash(ctrl, led_no); flash 165 drivers/media/i2c/lm3560.c mutex_lock(&flash->lock); flash 170 drivers/media/i2c/lm3560.c rval = regmap_read(flash->regmap, REG_FLAG, ®_val); flash 183 drivers/media/i2c/lm3560.c mutex_unlock(&flash->lock); flash 189 drivers/media/i2c/lm3560.c struct lm3560_flash *flash = to_lm3560_flash(ctrl, led_no); flash 193 drivers/media/i2c/lm3560.c mutex_lock(&flash->lock); flash 197 drivers/media/i2c/lm3560.c flash->led_mode = ctrl->val; flash 198 drivers/media/i2c/lm3560.c if (flash->led_mode != V4L2_FLASH_LED_MODE_FLASH) flash 199 drivers/media/i2c/lm3560.c rval = lm3560_mode_ctrl(flash); flash 203 drivers/media/i2c/lm3560.c rval = regmap_update_bits(flash->regmap, flash 210 drivers/media/i2c/lm3560.c if (flash->led_mode != V4L2_FLASH_LED_MODE_FLASH) { flash 214 drivers/media/i2c/lm3560.c flash->led_mode = V4L2_FLASH_LED_MODE_FLASH; flash 215 drivers/media/i2c/lm3560.c rval = lm3560_mode_ctrl(flash); flash 219 drivers/media/i2c/lm3560.c if (flash->led_mode != V4L2_FLASH_LED_MODE_FLASH) { flash 223 drivers/media/i2c/lm3560.c flash->led_mode = V4L2_FLASH_LED_MODE_NONE; flash 224 drivers/media/i2c/lm3560.c rval = lm3560_mode_ctrl(flash); flash 229 drivers/media/i2c/lm3560.c rval = regmap_update_bits(flash->regmap, flash 234 drivers/media/i2c/lm3560.c rval = lm3560_flash_brt_ctrl(flash, led_no, ctrl->val); flash 238 drivers/media/i2c/lm3560.c rval = lm3560_torch_brt_ctrl(flash, led_no, ctrl->val); flash 243 drivers/media/i2c/lm3560.c mutex_unlock(&flash->lock); flash 278 drivers/media/i2c/lm3560.c static int lm3560_init_controls(struct lm3560_flash *flash, flash 282 drivers/media/i2c/lm3560.c u32 max_flash_brt = flash->pdata->max_flash_brt[led_no]; flash 283 drivers/media/i2c/lm3560.c u32 max_torch_brt = flash->pdata->max_torch_brt[led_no]; flash 284 drivers/media/i2c/lm3560.c struct v4l2_ctrl_handler *hdl = &flash->ctrls_led[led_no]; flash 293 drivers/media/i2c/lm3560.c flash->led_mode = V4L2_FLASH_LED_MODE_NONE; flash 308 drivers/media/i2c/lm3560.c flash->pdata->max_flash_timeout, flash 310 drivers/media/i2c/lm3560.c flash->pdata->max_flash_timeout); flash 334 drivers/media/i2c/lm3560.c flash->subdev_led[led_no].ctrl_handler = hdl; flash 349 drivers/media/i2c/lm3560.c static int lm3560_subdev_init(struct lm3560_flash *flash, flash 352 drivers/media/i2c/lm3560.c struct i2c_client *client = to_i2c_client(flash->dev); flash 355 drivers/media/i2c/lm3560.c v4l2_i2c_subdev_init(&flash->subdev_led[led_no], client, &lm3560_ops); flash 356 drivers/media/i2c/lm3560.c flash->subdev_led[led_no].flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; flash 357 drivers/media/i2c/lm3560.c strscpy(flash->subdev_led[led_no].name, led_name, flash 358 drivers/media/i2c/lm3560.c sizeof(flash->subdev_led[led_no].name)); flash 359 drivers/media/i2c/lm3560.c rval = lm3560_init_controls(flash, led_no); flash 362 drivers/media/i2c/lm3560.c rval = media_entity_pads_init(&flash->subdev_led[led_no].entity, 0, NULL); flash 365 drivers/media/i2c/lm3560.c flash->subdev_led[led_no].entity.function = MEDIA_ENT_F_FLASH; flash 370 drivers/media/i2c/lm3560.c v4l2_ctrl_handler_free(&flash->ctrls_led[led_no]); flash 374 drivers/media/i2c/lm3560.c static int lm3560_init_device(struct lm3560_flash *flash) flash 380 drivers/media/i2c/lm3560.c rval = regmap_update_bits(flash->regmap, flash 381 drivers/media/i2c/lm3560.c REG_FLASH_TOUT, 0x60, flash->pdata->peak); flash 385 drivers/media/i2c/lm3560.c flash->led_mode = V4L2_FLASH_LED_MODE_NONE; flash 386 drivers/media/i2c/lm3560.c rval = lm3560_mode_ctrl(flash); flash 390 drivers/media/i2c/lm3560.c rval = regmap_read(flash->regmap, REG_FLAG, ®_val); flash 397 drivers/media/i2c/lm3560.c struct lm3560_flash *flash; flash 401 drivers/media/i2c/lm3560.c flash = devm_kzalloc(&client->dev, sizeof(*flash), GFP_KERNEL); flash 402 drivers/media/i2c/lm3560.c if (flash == NULL) flash 405 drivers/media/i2c/lm3560.c flash->regmap = devm_regmap_init_i2c(client, &lm3560_regmap); flash 406 drivers/media/i2c/lm3560.c if (IS_ERR(flash->regmap)) { flash 407 drivers/media/i2c/lm3560.c rval = PTR_ERR(flash->regmap); flash 425 drivers/media/i2c/lm3560.c flash->pdata = pdata; flash 426 drivers/media/i2c/lm3560.c flash->dev = &client->dev; flash 427 drivers/media/i2c/lm3560.c mutex_init(&flash->lock); flash 429 drivers/media/i2c/lm3560.c rval = lm3560_subdev_init(flash, LM3560_LED0, "lm3560-led0"); flash 433 drivers/media/i2c/lm3560.c rval = lm3560_subdev_init(flash, LM3560_LED1, "lm3560-led1"); flash 437 drivers/media/i2c/lm3560.c rval = lm3560_init_device(flash); flash 441 drivers/media/i2c/lm3560.c i2c_set_clientdata(client, flash); flash 448 drivers/media/i2c/lm3560.c struct lm3560_flash *flash = i2c_get_clientdata(client); flash 452 drivers/media/i2c/lm3560.c v4l2_device_unregister_subdev(&flash->subdev_led[i]); flash 453 drivers/media/i2c/lm3560.c v4l2_ctrl_handler_free(&flash->ctrls_led[i]); flash 454 drivers/media/i2c/lm3560.c media_entity_cleanup(&flash->subdev_led[i].entity); flash 81 drivers/media/i2c/lm3646.c static int lm3646_mode_ctrl(struct lm3646_flash *flash, flash 86 drivers/media/i2c/lm3646.c return regmap_write(flash->regmap, flash 87 drivers/media/i2c/lm3646.c REG_ENABLE, flash->mode_reg | MODE_SHDN); flash 89 drivers/media/i2c/lm3646.c return regmap_write(flash->regmap, flash 90 drivers/media/i2c/lm3646.c REG_ENABLE, flash->mode_reg | MODE_TORCH); flash 92 drivers/media/i2c/lm3646.c return regmap_write(flash->regmap, flash 93 drivers/media/i2c/lm3646.c REG_ENABLE, flash->mode_reg | MODE_FLASH); flash 101 drivers/media/i2c/lm3646.c struct lm3646_flash *flash = to_lm3646_flash(ctrl); flash 108 drivers/media/i2c/lm3646.c rval = regmap_read(flash->regmap, REG_FLAG, ®_val); flash 135 drivers/media/i2c/lm3646.c struct lm3646_flash *flash = to_lm3646_flash(ctrl); flash 143 drivers/media/i2c/lm3646.c return lm3646_mode_ctrl(flash, ctrl->val); flash 145 drivers/media/i2c/lm3646.c return lm3646_mode_ctrl(flash, V4L2_FLASH_LED_MODE_NONE); flash 148 drivers/media/i2c/lm3646.c return regmap_update_bits(flash->regmap, flash 155 drivers/media/i2c/lm3646.c rval = regmap_read(flash->regmap, REG_ENABLE, ®_val); flash 159 drivers/media/i2c/lm3646.c return lm3646_mode_ctrl(flash, V4L2_FLASH_LED_MODE_FLASH); flash 168 drivers/media/i2c/lm3646.c rval = regmap_read(flash->regmap, REG_ENABLE, ®_val); flash 172 drivers/media/i2c/lm3646.c return lm3646_mode_ctrl(flash, flash 177 drivers/media/i2c/lm3646.c return regmap_update_bits(flash->regmap, flash 183 drivers/media/i2c/lm3646.c return regmap_update_bits(flash->regmap, flash 189 drivers/media/i2c/lm3646.c return regmap_update_bits(flash->regmap, flash 203 drivers/media/i2c/lm3646.c static int lm3646_init_controls(struct lm3646_flash *flash) flash 206 drivers/media/i2c/lm3646.c struct v4l2_ctrl_handler *hdl = &flash->ctrls_led; flash 228 drivers/media/i2c/lm3646.c LM3646_FLASH_TOUT_STEP, flash->pdata->flash_timeout); flash 256 drivers/media/i2c/lm3646.c flash->subdev_led.ctrl_handler = hdl; flash 271 drivers/media/i2c/lm3646.c static int lm3646_subdev_init(struct lm3646_flash *flash) flash 273 drivers/media/i2c/lm3646.c struct i2c_client *client = to_i2c_client(flash->dev); flash 276 drivers/media/i2c/lm3646.c v4l2_i2c_subdev_init(&flash->subdev_led, client, &lm3646_ops); flash 277 drivers/media/i2c/lm3646.c flash->subdev_led.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; flash 278 drivers/media/i2c/lm3646.c strscpy(flash->subdev_led.name, LM3646_NAME, flash 279 drivers/media/i2c/lm3646.c sizeof(flash->subdev_led.name)); flash 280 drivers/media/i2c/lm3646.c rval = lm3646_init_controls(flash); flash 283 drivers/media/i2c/lm3646.c rval = media_entity_pads_init(&flash->subdev_led.entity, 0, NULL); flash 286 drivers/media/i2c/lm3646.c flash->subdev_led.entity.function = MEDIA_ENT_F_FLASH; flash 290 drivers/media/i2c/lm3646.c v4l2_ctrl_handler_free(&flash->ctrls_led); flash 294 drivers/media/i2c/lm3646.c static int lm3646_init_device(struct lm3646_flash *flash) flash 300 drivers/media/i2c/lm3646.c rval = regmap_read(flash->regmap, REG_ENABLE, ®_val); flash 303 drivers/media/i2c/lm3646.c flash->mode_reg = reg_val & 0xfc; flash 306 drivers/media/i2c/lm3646.c rval = lm3646_mode_ctrl(flash, V4L2_FLASH_LED_MODE_NONE); flash 314 drivers/media/i2c/lm3646.c rval = regmap_update_bits(flash->regmap, flash 317 drivers/media/i2c/lm3646.c (flash->pdata->led1_flash_brt)); flash 326 drivers/media/i2c/lm3646.c rval = regmap_update_bits(flash->regmap, flash 329 drivers/media/i2c/lm3646.c (flash->pdata->led1_torch_brt)); flash 334 drivers/media/i2c/lm3646.c return regmap_read(flash->regmap, REG_FLAG, ®_val); flash 340 drivers/media/i2c/lm3646.c struct lm3646_flash *flash; flash 344 drivers/media/i2c/lm3646.c flash = devm_kzalloc(&client->dev, sizeof(*flash), GFP_KERNEL); flash 345 drivers/media/i2c/lm3646.c if (flash == NULL) flash 348 drivers/media/i2c/lm3646.c flash->regmap = devm_regmap_init_i2c(client, &lm3646_regmap); flash 349 drivers/media/i2c/lm3646.c if (IS_ERR(flash->regmap)) flash 350 drivers/media/i2c/lm3646.c return PTR_ERR(flash->regmap); flash 364 drivers/media/i2c/lm3646.c flash->pdata = pdata; flash 365 drivers/media/i2c/lm3646.c flash->dev = &client->dev; flash 367 drivers/media/i2c/lm3646.c rval = lm3646_subdev_init(flash); flash 371 drivers/media/i2c/lm3646.c rval = lm3646_init_device(flash); flash 375 drivers/media/i2c/lm3646.c i2c_set_clientdata(client, flash); flash 382 drivers/media/i2c/lm3646.c struct lm3646_flash *flash = i2c_get_clientdata(client); flash 384 drivers/media/i2c/lm3646.c v4l2_device_unregister_subdev(&flash->subdev_led); flash 385 drivers/media/i2c/lm3646.c v4l2_ctrl_handler_free(&flash->ctrls_led); flash 386 drivers/media/i2c/lm3646.c media_entity_cleanup(&flash->subdev_led.entity); flash 66 drivers/media/i2c/m5mols/m5mols.h u16 flash; flash 122 drivers/media/i2c/m5mols/m5mols.h u8 flash; flash 89 drivers/media/i2c/m5mols/m5mols_capture.c ret = m5mols_read_u16(sd, EXIF_INFO_FLASH, &exif->flash); flash 177 drivers/media/i2c/m5mols/m5mols_controls.c ret = m5mols_write(sd, CAPP_FLASH_CTRL, scenemode.flash); flash 83 drivers/media/platform/exynos4-is/fimc-is-param.c __hw_param_copy(&par->isp.flash, &cfg->isp.flash); flash 313 drivers/media/platform/exynos4-is/fimc-is-param.c isp->flash.cmd = cmd; flash 314 drivers/media/platform/exynos4-is/fimc-is-param.c isp->flash.redeye = redeye; flash 315 drivers/media/platform/exynos4-is/fimc-is-param.c isp->flash.err = ISP_FLASH_ERROR_NONE; flash 688 drivers/media/platform/exynos4-is/fimc-is-param.h struct param_isp_flash flash; flash 865 drivers/media/platform/exynos4-is/fimc-is-param.h u32 flash; flash 195 drivers/media/rc/redrat3.c atomic_t flash; flash 859 drivers/media/rc/redrat3.c if (brightness != LED_OFF && atomic_cmpxchg(&rr3->flash, 0, 1) == 0) { flash 864 drivers/media/rc/redrat3.c atomic_set(&rr3->flash, 0); flash 924 drivers/media/rc/redrat3.c atomic_dec(&rr3->flash); flash 1070 drivers/media/rc/redrat3.c atomic_set(&rr3->flash, 0); flash 503 drivers/misc/genwqe/card_dev.c u64 flash = 0; flash 575 drivers/misc/genwqe/card_dev.c *(__be64 *)&req->__asiv[16] = cpu_to_be64(flash); flash 588 drivers/misc/genwqe/card_dev.c *(__be64 *)&req->asiv[16] = cpu_to_be64(flash); flash 623 drivers/misc/genwqe/card_dev.c flash += tocopy; flash 639 drivers/misc/genwqe/card_dev.c u64 flash = 0; flash 701 drivers/misc/genwqe/card_dev.c *(__be64 *)&cmd->__asiv[16] = cpu_to_be64(flash); flash 710 drivers/misc/genwqe/card_dev.c *(__be64 *)&cmd->asiv[16] = cpu_to_be64(flash); flash 752 drivers/misc/genwqe/card_dev.c flash += tocopy; flash 41 drivers/mtd/devices/mchp23k256.c static void mchp23k256_addr2cmd(struct mchp23k256_flash *flash, flash 51 drivers/mtd/devices/mchp23k256.c for (i = flash->caps->addr_width; i > 0; i--, addr >>= 8) flash 55 drivers/mtd/devices/mchp23k256.c static int mchp23k256_cmdsz(struct mchp23k256_flash *flash) flash 57 drivers/mtd/devices/mchp23k256.c return 1 + flash->caps->addr_width; flash 63 drivers/mtd/devices/mchp23k256.c struct mchp23k256_flash *flash = to_mchp23k256_flash(mtd); flash 71 drivers/mtd/devices/mchp23k256.c cmd_len = mchp23k256_cmdsz(flash); flash 74 drivers/mtd/devices/mchp23k256.c mchp23k256_addr2cmd(flash, to, command); flash 84 drivers/mtd/devices/mchp23k256.c mutex_lock(&flash->lock); flash 86 drivers/mtd/devices/mchp23k256.c ret = spi_sync(flash->spi, &message); flash 88 drivers/mtd/devices/mchp23k256.c mutex_unlock(&flash->lock); flash 102 drivers/mtd/devices/mchp23k256.c struct mchp23k256_flash *flash = to_mchp23k256_flash(mtd); flash 110 drivers/mtd/devices/mchp23k256.c cmd_len = mchp23k256_cmdsz(flash); flash 114 drivers/mtd/devices/mchp23k256.c mchp23k256_addr2cmd(flash, from, command); flash 124 drivers/mtd/devices/mchp23k256.c mutex_lock(&flash->lock); flash 126 drivers/mtd/devices/mchp23k256.c ret = spi_sync(flash->spi, &message); flash 128 drivers/mtd/devices/mchp23k256.c mutex_unlock(&flash->lock); flash 173 drivers/mtd/devices/mchp23k256.c struct mchp23k256_flash *flash; flash 177 drivers/mtd/devices/mchp23k256.c flash = devm_kzalloc(&spi->dev, sizeof(*flash), GFP_KERNEL); flash 178 drivers/mtd/devices/mchp23k256.c if (!flash) flash 181 drivers/mtd/devices/mchp23k256.c flash->spi = spi; flash 182 drivers/mtd/devices/mchp23k256.c mutex_init(&flash->lock); flash 183 drivers/mtd/devices/mchp23k256.c spi_set_drvdata(spi, flash); flash 191 drivers/mtd/devices/mchp23k256.c flash->caps = of_device_get_match_data(&spi->dev); flash 192 drivers/mtd/devices/mchp23k256.c if (!flash->caps) flash 193 drivers/mtd/devices/mchp23k256.c flash->caps = &mchp23k256_caps; flash 195 drivers/mtd/devices/mchp23k256.c mtd_set_of_node(&flash->mtd, spi->dev.of_node); flash 196 drivers/mtd/devices/mchp23k256.c flash->mtd.dev.parent = &spi->dev; flash 197 drivers/mtd/devices/mchp23k256.c flash->mtd.type = MTD_RAM; flash 198 drivers/mtd/devices/mchp23k256.c flash->mtd.flags = MTD_CAP_RAM; flash 199 drivers/mtd/devices/mchp23k256.c flash->mtd.writesize = 1; flash 200 drivers/mtd/devices/mchp23k256.c flash->mtd.size = flash->caps->size; flash 201 drivers/mtd/devices/mchp23k256.c flash->mtd._read = mchp23k256_read; flash 202 drivers/mtd/devices/mchp23k256.c flash->mtd._write = mchp23k256_write; flash 204 drivers/mtd/devices/mchp23k256.c err = mtd_device_register(&flash->mtd, data ? data->parts : NULL, flash 214 drivers/mtd/devices/mchp23k256.c struct mchp23k256_flash *flash = spi_get_drvdata(spi); flash 216 drivers/mtd/devices/mchp23k256.c return mtd_device_unregister(&flash->mtd); flash 914 drivers/mtd/devices/mtd_dataflash.c struct dataflash *flash = spi_get_drvdata(spi); flash 919 drivers/mtd/devices/mtd_dataflash.c status = mtd_device_unregister(&flash->mtd); flash 921 drivers/mtd/devices/mtd_dataflash.c kfree(flash); flash 178 drivers/mtd/devices/spear_smi.c struct spear_snor_flash *flash[MAX_NUM_FLASH_CHIP]; flash 420 drivers/mtd/devices/spear_smi.c get_sector_erase_cmd(struct spear_snor_flash *flash, u32 offset) flash 425 drivers/mtd/devices/spear_smi.c x[0] = flash->erase_cmd; flash 496 drivers/mtd/devices/spear_smi.c struct spear_snor_flash *flash = get_flash_data(mtd); flash 501 drivers/mtd/devices/spear_smi.c if (!flash || !dev) flash 504 drivers/mtd/devices/spear_smi.c bank = flash->bank; flash 513 drivers/mtd/devices/spear_smi.c mutex_lock(&flash->lock); flash 517 drivers/mtd/devices/spear_smi.c command = get_sector_erase_cmd(flash, addr); flash 521 drivers/mtd/devices/spear_smi.c mutex_unlock(&flash->lock); flash 528 drivers/mtd/devices/spear_smi.c mutex_unlock(&flash->lock); flash 548 drivers/mtd/devices/spear_smi.c struct spear_snor_flash *flash = get_flash_data(mtd); flash 554 drivers/mtd/devices/spear_smi.c if (!flash || !dev) flash 557 drivers/mtd/devices/spear_smi.c if (flash->bank > dev->num_flashes - 1) { flash 563 drivers/mtd/devices/spear_smi.c src = flash->base_addr + from; flash 565 drivers/mtd/devices/spear_smi.c mutex_lock(&flash->lock); flash 568 drivers/mtd/devices/spear_smi.c ret = spear_smi_wait_till_ready(dev, flash->bank, SMI_MAX_TIME_OUT); flash 570 drivers/mtd/devices/spear_smi.c mutex_unlock(&flash->lock); flash 578 drivers/mtd/devices/spear_smi.c if (flash->fast_mode) flash 590 drivers/mtd/devices/spear_smi.c mutex_unlock(&flash->lock); flash 677 drivers/mtd/devices/spear_smi.c struct spear_snor_flash *flash = get_flash_data(mtd); flash 683 drivers/mtd/devices/spear_smi.c if (!flash || !dev) flash 686 drivers/mtd/devices/spear_smi.c if (flash->bank > dev->num_flashes - 1) { flash 692 drivers/mtd/devices/spear_smi.c dest = flash->base_addr + to; flash 693 drivers/mtd/devices/spear_smi.c mutex_lock(&flash->lock); flash 695 drivers/mtd/devices/spear_smi.c page_offset = (u32)to % flash->page_size; flash 698 drivers/mtd/devices/spear_smi.c if (page_offset + len <= flash->page_size) { flash 699 drivers/mtd/devices/spear_smi.c ret = spear_smi_cpy_toio(dev, flash->bank, dest, buf, len); flash 706 drivers/mtd/devices/spear_smi.c page_size = flash->page_size - page_offset; flash 708 drivers/mtd/devices/spear_smi.c ret = spear_smi_cpy_toio(dev, flash->bank, dest, buf, flash 718 drivers/mtd/devices/spear_smi.c if (page_size > flash->page_size) flash 719 drivers/mtd/devices/spear_smi.c page_size = flash->page_size; flash 721 drivers/mtd/devices/spear_smi.c ret = spear_smi_cpy_toio(dev, flash->bank, dest + i, flash 731 drivers/mtd/devices/spear_smi.c mutex_unlock(&flash->lock); flash 850 drivers/mtd/devices/spear_smi.c struct spear_snor_flash *flash; flash 864 drivers/mtd/devices/spear_smi.c flash = devm_kzalloc(&pdev->dev, sizeof(*flash), GFP_ATOMIC); flash 865 drivers/mtd/devices/spear_smi.c if (!flash) flash 867 drivers/mtd/devices/spear_smi.c flash->bank = bank; flash 868 drivers/mtd/devices/spear_smi.c flash->fast_mode = flash_info->fast_mode ? 1 : 0; flash 869 drivers/mtd/devices/spear_smi.c mutex_init(&flash->lock); flash 878 drivers/mtd/devices/spear_smi.c flash->base_addr = devm_ioremap(&pdev->dev, flash_info->mem_base, flash 880 drivers/mtd/devices/spear_smi.c if (!flash->base_addr) flash 883 drivers/mtd/devices/spear_smi.c dev->flash[bank] = flash; flash 884 drivers/mtd/devices/spear_smi.c flash->mtd.priv = dev; flash 887 drivers/mtd/devices/spear_smi.c flash->mtd.name = flash_info->name; flash 889 drivers/mtd/devices/spear_smi.c flash->mtd.name = flash_devices[flash_index].name; flash 891 drivers/mtd/devices/spear_smi.c flash->mtd.dev.parent = &pdev->dev; flash 892 drivers/mtd/devices/spear_smi.c mtd_set_of_node(&flash->mtd, np); flash 893 drivers/mtd/devices/spear_smi.c flash->mtd.type = MTD_NORFLASH; flash 894 drivers/mtd/devices/spear_smi.c flash->mtd.writesize = 1; flash 895 drivers/mtd/devices/spear_smi.c flash->mtd.flags = MTD_CAP_NORFLASH; flash 896 drivers/mtd/devices/spear_smi.c flash->mtd.size = flash_info->size; flash 897 drivers/mtd/devices/spear_smi.c flash->mtd.erasesize = flash_devices[flash_index].sectorsize; flash 898 drivers/mtd/devices/spear_smi.c flash->page_size = flash_devices[flash_index].pagesize; flash 899 drivers/mtd/devices/spear_smi.c flash->mtd.writebufsize = flash->page_size; flash 900 drivers/mtd/devices/spear_smi.c flash->erase_cmd = flash_devices[flash_index].erase_cmd; flash 901 drivers/mtd/devices/spear_smi.c flash->mtd._erase = spear_mtd_erase; flash 902 drivers/mtd/devices/spear_smi.c flash->mtd._read = spear_mtd_read; flash 903 drivers/mtd/devices/spear_smi.c flash->mtd._write = spear_mtd_write; flash 904 drivers/mtd/devices/spear_smi.c flash->dev_id = flash_devices[flash_index].device_id; flash 907 drivers/mtd/devices/spear_smi.c flash->mtd.name, flash->mtd.size, flash 908 drivers/mtd/devices/spear_smi.c flash->mtd.size / (1024 * 1024)); flash 911 drivers/mtd/devices/spear_smi.c flash->mtd.erasesize, flash->mtd.erasesize / 1024); flash 920 drivers/mtd/devices/spear_smi.c ret = mtd_device_register(&flash->mtd, parts, count); flash 1051 drivers/mtd/devices/spear_smi.c struct spear_snor_flash *flash; flash 1062 drivers/mtd/devices/spear_smi.c flash = dev->flash[i]; flash 1063 drivers/mtd/devices/spear_smi.c if (!flash) flash 1067 drivers/mtd/devices/spear_smi.c ret = mtd_device_unregister(&flash->mtd); flash 67 drivers/mtd/devices/sst25l.c static int sst25l_status(struct sst25l_flash *flash, int *status) flash 83 drivers/mtd/devices/sst25l.c err = spi_sync(flash->spi, &m); flash 91 drivers/mtd/devices/sst25l.c static int sst25l_write_enable(struct sst25l_flash *flash, int enable) flash 97 drivers/mtd/devices/sst25l.c err = spi_write(flash->spi, command, 1); flash 102 drivers/mtd/devices/sst25l.c err = spi_write(flash->spi, command, 1); flash 108 drivers/mtd/devices/sst25l.c err = spi_write(flash->spi, command, 2); flash 113 drivers/mtd/devices/sst25l.c err = sst25l_status(flash, &status); flash 123 drivers/mtd/devices/sst25l.c static int sst25l_wait_till_ready(struct sst25l_flash *flash) flash 130 drivers/mtd/devices/sst25l.c err = sst25l_status(flash, &status); flash 142 drivers/mtd/devices/sst25l.c static int sst25l_erase_sector(struct sst25l_flash *flash, uint32_t offset) flash 147 drivers/mtd/devices/sst25l.c err = sst25l_write_enable(flash, 1); flash 155 drivers/mtd/devices/sst25l.c err = spi_write(flash->spi, command, 4); flash 159 drivers/mtd/devices/sst25l.c err = sst25l_wait_till_ready(flash); flash 163 drivers/mtd/devices/sst25l.c return sst25l_write_enable(flash, 0); flash 168 drivers/mtd/devices/sst25l.c struct sst25l_flash *flash = to_sst25l_flash(mtd); flash 182 drivers/mtd/devices/sst25l.c mutex_lock(&flash->lock); flash 184 drivers/mtd/devices/sst25l.c err = sst25l_wait_till_ready(flash); flash 186 drivers/mtd/devices/sst25l.c mutex_unlock(&flash->lock); flash 191 drivers/mtd/devices/sst25l.c err = sst25l_erase_sector(flash, addr); flash 193 drivers/mtd/devices/sst25l.c mutex_unlock(&flash->lock); flash 194 drivers/mtd/devices/sst25l.c dev_err(&flash->spi->dev, "Erase failed\n"); flash 201 drivers/mtd/devices/sst25l.c mutex_unlock(&flash->lock); flash 209 drivers/mtd/devices/sst25l.c struct sst25l_flash *flash = to_sst25l_flash(mtd); flash 231 drivers/mtd/devices/sst25l.c mutex_lock(&flash->lock); flash 234 drivers/mtd/devices/sst25l.c ret = sst25l_wait_till_ready(flash); flash 236 drivers/mtd/devices/sst25l.c mutex_unlock(&flash->lock); flash 240 drivers/mtd/devices/sst25l.c spi_sync(flash->spi, &message); flash 245 drivers/mtd/devices/sst25l.c mutex_unlock(&flash->lock); flash 252 drivers/mtd/devices/sst25l.c struct sst25l_flash *flash = to_sst25l_flash(mtd); flash 259 drivers/mtd/devices/sst25l.c mutex_lock(&flash->lock); flash 261 drivers/mtd/devices/sst25l.c ret = sst25l_write_enable(flash, 1); flash 266 drivers/mtd/devices/sst25l.c ret = sst25l_wait_till_ready(flash); flash 276 drivers/mtd/devices/sst25l.c ret = spi_write(flash->spi, command, 5); flash 287 drivers/mtd/devices/sst25l.c ret = sst25l_wait_till_ready(flash); flash 292 drivers/mtd/devices/sst25l.c ret = spi_write(flash->spi, command, 2); flash 299 drivers/mtd/devices/sst25l.c ret = sst25l_write_enable(flash, 0); flash 304 drivers/mtd/devices/sst25l.c mutex_unlock(&flash->lock); flash 351 drivers/mtd/devices/sst25l.c struct sst25l_flash *flash; flash 359 drivers/mtd/devices/sst25l.c flash = devm_kzalloc(&spi->dev, sizeof(*flash), GFP_KERNEL); flash 360 drivers/mtd/devices/sst25l.c if (!flash) flash 363 drivers/mtd/devices/sst25l.c flash->spi = spi; flash 364 drivers/mtd/devices/sst25l.c mutex_init(&flash->lock); flash 365 drivers/mtd/devices/sst25l.c spi_set_drvdata(spi, flash); flash 369 drivers/mtd/devices/sst25l.c flash->mtd.name = data->name; flash 371 drivers/mtd/devices/sst25l.c flash->mtd.dev.parent = &spi->dev; flash 372 drivers/mtd/devices/sst25l.c flash->mtd.type = MTD_NORFLASH; flash 373 drivers/mtd/devices/sst25l.c flash->mtd.flags = MTD_CAP_NORFLASH; flash 374 drivers/mtd/devices/sst25l.c flash->mtd.erasesize = flash_info->erase_size; flash 375 drivers/mtd/devices/sst25l.c flash->mtd.writesize = flash_info->page_size; flash 376 drivers/mtd/devices/sst25l.c flash->mtd.writebufsize = flash_info->page_size; flash 377 drivers/mtd/devices/sst25l.c flash->mtd.size = flash_info->page_size * flash_info->nr_pages; flash 378 drivers/mtd/devices/sst25l.c flash->mtd._erase = sst25l_erase; flash 379 drivers/mtd/devices/sst25l.c flash->mtd._read = sst25l_read; flash 380 drivers/mtd/devices/sst25l.c flash->mtd._write = sst25l_write; flash 383 drivers/mtd/devices/sst25l.c (long long)flash->mtd.size >> 10); flash 387 drivers/mtd/devices/sst25l.c flash->mtd.name, flash 388 drivers/mtd/devices/sst25l.c (long long)flash->mtd.size, (long long)(flash->mtd.size >> 20), flash 389 drivers/mtd/devices/sst25l.c flash->mtd.erasesize, flash->mtd.erasesize / 1024, flash 390 drivers/mtd/devices/sst25l.c flash->mtd.numeraseregions); flash 393 drivers/mtd/devices/sst25l.c ret = mtd_device_register(&flash->mtd, data ? data->parts : NULL, flash 403 drivers/mtd/devices/sst25l.c struct sst25l_flash *flash = spi_get_drvdata(spi); flash 405 drivers/mtd/devices/sst25l.c return mtd_device_unregister(&flash->mtd); flash 48 drivers/mtd/maps/pxa2xx-flash.c struct flash_platform_data *flash = dev_get_platdata(&pdev->dev); flash 60 drivers/mtd/maps/pxa2xx-flash.c info->map.name = flash->name; flash 61 drivers/mtd/maps/pxa2xx-flash.c info->map.bankwidth = flash->width; flash 84 drivers/mtd/maps/pxa2xx-flash.c info->mtd = do_map_probe(flash->map_name, &info->map); flash 94 drivers/mtd/maps/pxa2xx-flash.c mtd_device_parse_register(info->mtd, probes, NULL, flash->parts, flash 95 drivers/mtd/maps/pxa2xx-flash.c flash->nr_parts); flash 1559 drivers/mtd/nand/raw/qcom_nandc.c __le32 flash; flash 1572 drivers/mtd/nand/raw/qcom_nandc.c u32 flash = le32_to_cpu(nandc->reg_read_buf[i]); flash 1574 drivers/mtd/nand/raw/qcom_nandc.c if (flash & (FS_OP_ERR | FS_MPU_ERR)) flash 1741 drivers/mtd/nand/raw/qcom_nandc.c u32 flash, buffer, erased_cw; flash 1752 drivers/mtd/nand/raw/qcom_nandc.c flash = le32_to_cpu(buf->flash); flash 1764 drivers/mtd/nand/raw/qcom_nandc.c if ((flash & FS_OP_ERR) && (buffer & BS_UNCORRECTABLE_BIT)) { flash 1793 drivers/mtd/nand/raw/qcom_nandc.c } else if (flash & (FS_OP_ERR | FS_MPU_ERR)) { flash 4343 drivers/net/ethernet/broadcom/bnx2.c const struct flash_spec *flash; flash 4358 drivers/net/ethernet/broadcom/bnx2.c for (j = 0, flash = &flash_table[0]; j < entry_count; flash 4359 drivers/net/ethernet/broadcom/bnx2.c j++, flash++) { flash 4361 drivers/net/ethernet/broadcom/bnx2.c (flash->config1 & FLASH_BACKUP_STRAP_MASK)) { flash 4362 drivers/net/ethernet/broadcom/bnx2.c bp->flash_info = flash; flash 4376 drivers/net/ethernet/broadcom/bnx2.c for (j = 0, flash = &flash_table[0]; j < entry_count; flash 4377 drivers/net/ethernet/broadcom/bnx2.c j++, flash++) { flash 4379 drivers/net/ethernet/broadcom/bnx2.c if ((val & mask) == (flash->strapping & mask)) { flash 4380 drivers/net/ethernet/broadcom/bnx2.c bp->flash_info = flash; flash 4390 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_CFG1, flash->config1); flash 4391 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_CFG2, flash->config2); flash 4392 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_CFG3, flash->config3); flash 4393 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_WRITE1, flash->write1); flash 2099 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct ethtool_flash *flash) flash 2106 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (flash->region == ETHTOOL_FLASH_ALL_REGIONS || flash 2107 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c flash->region > 0xffff) flash 2108 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c return bnxt_flash_package_from_file(dev, flash->data, flash 2109 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c flash->region); flash 2111 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c return bnxt_flash_firmware_from_file(dev, flash->region, flash->data); flash 3028 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_flash_cb(struct bfa_flash *flash) flash 3030 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->op_busy = 0; flash 3031 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (flash->cbfn) flash 3032 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->cbfn(flash->cbarg, flash->status); flash 3038 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfa_flash *flash = cbarg; flash 3043 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (flash->op_busy) { flash 3044 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->status = BFA_STATUS_IOC_FAILURE; flash 3045 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->cbfn(flash->cbarg, flash->status); flash 3046 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->op_busy = 0; flash 3058 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_flash_write_send(struct bfa_flash *flash) flash 3061 drivers/net/ethernet/brocade/bna/bfa_ioc.c (struct bfi_flash_write_req *) flash->mb.msg; flash 3064 drivers/net/ethernet/brocade/bna/bfa_ioc.c msg->type = be32_to_cpu(flash->type); flash 3065 drivers/net/ethernet/brocade/bna/bfa_ioc.c msg->instance = flash->instance; flash 3066 drivers/net/ethernet/brocade/bna/bfa_ioc.c msg->offset = be32_to_cpu(flash->addr_off + flash->offset); flash 3067 drivers/net/ethernet/brocade/bna/bfa_ioc.c len = (flash->residue < BFA_FLASH_DMA_BUF_SZ) ? flash 3068 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->residue : BFA_FLASH_DMA_BUF_SZ; flash 3072 drivers/net/ethernet/brocade/bna/bfa_ioc.c msg->last = (len == flash->residue) ? 1 : 0; flash 3075 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_portid(flash->ioc)); flash 3076 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_alen_set(&msg->alen, len, flash->dbuf_pa); flash 3077 drivers/net/ethernet/brocade/bna/bfa_ioc.c memcpy(flash->dbuf_kva, flash->ubuf + flash->offset, len); flash 3078 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_mbox_queue(flash->ioc, &flash->mb, NULL, NULL); flash 3080 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->residue -= len; flash 3081 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->offset += len; flash 3092 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfa_flash *flash = cbarg; flash 3094 drivers/net/ethernet/brocade/bna/bfa_ioc.c (struct bfi_flash_read_req *) flash->mb.msg; flash 3097 drivers/net/ethernet/brocade/bna/bfa_ioc.c msg->type = be32_to_cpu(flash->type); flash 3098 drivers/net/ethernet/brocade/bna/bfa_ioc.c msg->instance = flash->instance; flash 3099 drivers/net/ethernet/brocade/bna/bfa_ioc.c msg->offset = be32_to_cpu(flash->addr_off + flash->offset); flash 3100 drivers/net/ethernet/brocade/bna/bfa_ioc.c len = (flash->residue < BFA_FLASH_DMA_BUF_SZ) ? flash 3101 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->residue : BFA_FLASH_DMA_BUF_SZ; flash 3104 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_portid(flash->ioc)); flash 3105 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_alen_set(&msg->alen, len, flash->dbuf_pa); flash 3106 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_mbox_queue(flash->ioc, &flash->mb, NULL, NULL); flash 3118 drivers/net/ethernet/brocade/bna/bfa_ioc.c struct bfa_flash *flash = flasharg; flash 3131 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (!flash->op_busy && msg->mh.msg_id != BFI_FLASH_I2H_EVENT) flash 3141 drivers/net/ethernet/brocade/bna/bfa_ioc.c attr = (struct bfa_flash_attr *) flash->ubuf; flash 3142 drivers/net/ethernet/brocade/bna/bfa_ioc.c f = (struct bfa_flash_attr *) flash->dbuf_kva; flash 3160 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->status = status; flash 3161 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_flash_cb(flash); flash 3165 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (status != BFA_STATUS_OK || flash->residue == 0) { flash 3166 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->status = status; flash 3167 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_flash_cb(flash); flash 3169 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_flash_write_send(flash); flash 3174 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->status = status; flash 3175 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_flash_cb(flash); flash 3178 drivers/net/ethernet/brocade/bna/bfa_ioc.c memcpy(flash->ubuf + flash->offset, flash 3179 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->dbuf_kva, len); flash 3180 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->residue -= len; flash 3181 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->offset += len; flash 3182 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (flash->residue == 0) { flash 3183 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->status = status; flash 3184 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_flash_cb(flash); flash 3186 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_flash_read_send(flash); flash 3214 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_flash_attach(struct bfa_flash *flash, struct bfa_ioc *ioc, void *dev) flash 3216 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->ioc = ioc; flash 3217 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->cbfn = NULL; flash 3218 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->cbarg = NULL; flash 3219 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->op_busy = 0; flash 3221 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_mbox_regisr(flash->ioc, BFI_MC_FLASH, bfa_flash_intr, flash); flash 3222 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_notify_init(&flash->ioc_notify, bfa_flash_notify, flash); flash 3223 drivers/net/ethernet/brocade/bna/bfa_ioc.c list_add_tail(&flash->ioc_notify.qe, &flash->ioc->notify_q); flash 3234 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_flash_memclaim(struct bfa_flash *flash, u8 *dm_kva, u64 dm_pa) flash 3236 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->dbuf_kva = dm_kva; flash 3237 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->dbuf_pa = dm_pa; flash 3238 drivers/net/ethernet/brocade/bna/bfa_ioc.c memset(flash->dbuf_kva, 0, BFA_FLASH_DMA_BUF_SZ); flash 3254 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_flash_get_attr(struct bfa_flash *flash, struct bfa_flash_attr *attr, flash 3258 drivers/net/ethernet/brocade/bna/bfa_ioc.c (struct bfi_flash_query_req *) flash->mb.msg; flash 3260 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (!bfa_nw_ioc_is_operational(flash->ioc)) flash 3263 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (flash->op_busy) flash 3266 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->op_busy = 1; flash 3267 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->cbfn = cbfn; flash 3268 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->cbarg = cbarg; flash 3269 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->ubuf = (u8 *) attr; flash 3272 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_ioc_portid(flash->ioc)); flash 3273 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_alen_set(&msg->alen, sizeof(struct bfa_flash_attr), flash->dbuf_pa); flash 3274 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_ioc_mbox_queue(flash->ioc, &flash->mb, NULL, NULL); flash 3294 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_flash_update_part(struct bfa_flash *flash, u32 type, u8 instance, flash 3298 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (!bfa_nw_ioc_is_operational(flash->ioc)) flash 3310 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (flash->op_busy) flash 3313 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->op_busy = 1; flash 3314 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->cbfn = cbfn; flash 3315 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->cbarg = cbarg; flash 3316 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->type = type; flash 3317 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->instance = instance; flash 3318 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->residue = len; flash 3319 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->offset = 0; flash 3320 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->addr_off = offset; flash 3321 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->ubuf = buf; flash 3323 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_flash_write_send(flash); flash 3343 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_nw_flash_read_part(struct bfa_flash *flash, u32 type, u8 instance, flash 3347 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (!bfa_nw_ioc_is_operational(flash->ioc)) flash 3356 drivers/net/ethernet/brocade/bna/bfa_ioc.c if (flash->op_busy) flash 3359 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->op_busy = 1; flash 3360 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->cbfn = cbfn; flash 3361 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->cbarg = cbarg; flash 3362 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->type = type; flash 3363 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->instance = instance; flash 3364 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->residue = len; flash 3365 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->offset = 0; flash 3366 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->addr_off = offset; flash 3367 drivers/net/ethernet/brocade/bna/bfa_ioc.c flash->ubuf = buf; flash 3369 drivers/net/ethernet/brocade/bna/bfa_ioc.c bfa_flash_read_send(flash); flash 334 drivers/net/ethernet/brocade/bna/bfa_ioc.h enum bfa_status bfa_nw_flash_get_attr(struct bfa_flash *flash, flash 337 drivers/net/ethernet/brocade/bna/bfa_ioc.h enum bfa_status bfa_nw_flash_update_part(struct bfa_flash *flash, flash 340 drivers/net/ethernet/brocade/bna/bfa_ioc.h enum bfa_status bfa_nw_flash_read_part(struct bfa_flash *flash, flash 344 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_flash_attach(struct bfa_flash *flash, flash 346 drivers/net/ethernet/brocade/bna/bfa_ioc.h void bfa_nw_flash_memclaim(struct bfa_flash *flash, u8 *dm_kva, u64 dm_pa); flash 1724 drivers/net/ethernet/brocade/bna/bna_enet.c bfa_nw_flash_attach(&bna->flash, &ioceth->ioc, bna); flash 1725 drivers/net/ethernet/brocade/bna/bna_enet.c bfa_nw_flash_memclaim(&bna->flash, kva, dma); flash 912 drivers/net/ethernet/brocade/bna/bna_types.h struct bfa_flash flash; flash 168 drivers/net/ethernet/brocade/bna/bnad_debugfs.c ret = bfa_nw_flash_get_attr(&bnad->bna.flash, &drvinfo->flash_attr, flash 961 drivers/net/ethernet/brocade/bna/bnad_ethtool.c ret = bfa_nw_flash_get_attr(&bnad->bna.flash, flash_attr, flash 1018 drivers/net/ethernet/brocade/bna/bnad_ethtool.c ret = bfa_nw_flash_read_part(&bnad->bna.flash, flash_part, flash 1060 drivers/net/ethernet/brocade/bna/bnad_ethtool.c ret = bfa_nw_flash_update_part(&bnad->bna.flash, flash_part, flash 1095 drivers/net/ethernet/brocade/bna/bnad_ethtool.c ret = bfa_nw_flash_update_part(&bnad->bna.flash, BFA_FLASH_PART_FWIMG, flash 2958 drivers/net/ethernet/emulex/benet/be_cmds.c goto flash; flash 2994 drivers/net/ethernet/emulex/benet/be_cmds.c flash: flash 333 drivers/net/ethernet/intel/i40e/i40e.h int i40e_ddp_flash(struct net_device *netdev, struct ethtool_flash *flash); flash 415 drivers/net/ethernet/intel/i40e/i40e_ddp.c int i40e_ddp_flash(struct net_device *netdev, struct ethtool_flash *flash) flash 424 drivers/net/ethernet/intel/i40e/i40e_ddp.c if (flash->region != I40_DDP_FLASH_REGION) { flash 436 drivers/net/ethernet/intel/i40e/i40e_ddp.c if (strncmp(flash->data, "-", 2) != 0) { flash 444 drivers/net/ethernet/intel/i40e/i40e_ddp.c strncat(profile_name, flash->data, I40E_DDP_PROFILE_NAME_MAX); flash 1162 drivers/net/ethernet/mellanox/mlx5/core/en.h struct ethtool_flash *flash); flash 1685 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c struct ethtool_flash *flash) flash 1692 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c if (flash->region != ETHTOOL_FLASH_ALL_REGIONS) flash 1695 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c err = request_firmware_direct(&fw, flash->data, &dev->dev); flash 1711 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c struct ethtool_flash *flash) flash 1715 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c return mlx5e_ethtool_flash_device(priv, flash); flash 126 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c struct ethtool_flash *flash) flash 130 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c return mlx5e_ethtool_flash_device(priv, flash); flash 224 drivers/net/ethernet/netronome/nfp/nfp_devlink.c nfp_devlink_versions_get_nsp(struct devlink_info_req *req, bool flash, flash 236 drivers/net/ethernet/netronome/nfp/nfp_devlink.c version = nfp_nsp_versions_get(info->id, flash, buf, size); flash 244 drivers/net/ethernet/netronome/nfp/nfp_devlink.c if (flash) flash 1011 drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c const char *nfp_nsp_versions_get(enum nfp_nsp_versions id, bool flash, flash 1028 drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c field = id * 2 + flash; flash 1034 drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c buf_off = get_unaligned_le16(buf + id2off[id] + flash * 2); flash 267 drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h const char *nfp_nsp_versions_get(enum nfp_nsp_versions id, bool flash, flash 802 drivers/net/ethernet/qlogic/qede/qede_ethtool.c struct ethtool_flash *flash) flash 806 drivers/net/ethernet/qlogic/qede/qede_ethtool.c return edev->ops->common->nvm_flash(edev->cdev, flash->data); flash 1205 drivers/net/wireless/cisco/airo.c unsigned short *flash; flash 1287 drivers/net/wireless/cisco/airo.c #define AIRO_FLASH(dev) (((struct airo_info *)dev->ml_priv)->flash) flash 2410 drivers/net/wireless/cisco/airo.c kfree(ai->flash); flash 3816 drivers/net/wireless/cisco/airo.c kfree (ai->flash); flash 3817 drivers/net/wireless/cisco/airo.c ai->flash = NULL; flash 8148 drivers/net/wireless/cisco/airo.c memcpy_toio(ai->pciaux + 0x8000, ai->flash, FLASHSIZE); flash 8154 drivers/net/wireless/cisco/airo.c OUT4500(ai,AUXDATA,ai->flash[nwords] & 0xffff); flash 32 drivers/sbus/char/flash.c } flash; flash 43 drivers/sbus/char/flash.c if (flash.read_base == flash.write_base) { flash 44 drivers/sbus/char/flash.c addr = flash.read_base; flash 45 drivers/sbus/char/flash.c size = flash.read_size; flash 53 drivers/sbus/char/flash.c addr = flash.read_base; flash 54 drivers/sbus/char/flash.c size = flash.read_size; flash 56 drivers/sbus/char/flash.c addr = flash.write_base; flash 57 drivers/sbus/char/flash.c size = flash.write_size; flash 90 drivers/sbus/char/flash.c if (file->f_pos > flash.read_size) flash 91 drivers/sbus/char/flash.c file->f_pos = flash.read_size; flash 94 drivers/sbus/char/flash.c file->f_pos = flash.read_size; flash 111 drivers/sbus/char/flash.c if (count > flash.read_size - p) flash 112 drivers/sbus/char/flash.c count = flash.read_size - p; flash 115 drivers/sbus/char/flash.c u8 data = upa_readb(flash.read_base + p + i); flash 129 drivers/sbus/char/flash.c if (test_and_set_bit(0, (void *)&flash.busy) != 0) { flash 142 drivers/sbus/char/flash.c flash.busy = 0; flash 174 drivers/sbus/char/flash.c flash.read_base = op->resource[0].start; flash 175 drivers/sbus/char/flash.c flash.read_size = resource_size(&op->resource[0]); flash 177 drivers/sbus/char/flash.c flash.write_base = op->resource[1].start; flash 178 drivers/sbus/char/flash.c flash.write_size = resource_size(&op->resource[1]); flash 180 drivers/sbus/char/flash.c flash.write_base = op->resource[0].start; flash 181 drivers/sbus/char/flash.c flash.write_size = resource_size(&op->resource[0]); flash 183 drivers/sbus/char/flash.c flash.busy = 0; flash 187 drivers/sbus/char/flash.c flash.read_base, flash.read_size, flash 188 drivers/sbus/char/flash.c flash.write_base, flash.write_size); flash 88 drivers/scsi/aic94xx/aic94xx_hwi.h struct flash_struct flash; flash 779 drivers/scsi/aic94xx/aic94xx_init.c asd_ha->hw_prof.flash.present ? "present" : "not present", flash 554 drivers/scsi/aic94xx/aic94xx_sds.c d = asd_read_reg_byte(asd_ha, asd_ha->hw_prof.flash.bar); flash 555 drivers/scsi/aic94xx/aic94xx_sds.c d ^= asd_read_reg_byte(asd_ha, asd_ha->hw_prof.flash.bar); flash 570 drivers/scsi/aic94xx/aic94xx_sds.c asd_write_reg_byte(asd_ha, asd_ha->hw_prof.flash.bar, FLASH_RESET); flash 579 drivers/scsi/aic94xx/aic94xx_sds.c asd_read_reg_string(asd_ha, buffer, asd_ha->hw_prof.flash.bar+offs, flash 601 drivers/scsi/aic94xx/aic94xx_sds.c asd_ha->hw_prof.flash.dir_offs = v; flash 618 drivers/scsi/aic94xx/aic94xx_sds.c &asd_ha->hw_prof.flash.bar)) { flash 623 drivers/scsi/aic94xx/aic94xx_sds.c asd_ha->hw_prof.flash.present = 1; flash 624 drivers/scsi/aic94xx/aic94xx_sds.c asd_ha->hw_prof.flash.wide = reg & FLASHW ? 1 : 0; flash 1087 drivers/scsi/aic94xx/aic94xx_sds.c reg = asd_ha->hw_prof.flash.bar; flash 1117 drivers/scsi/aic94xx/aic94xx_sds.c reg = asd_ha->hw_prof.flash.bar; flash 1143 drivers/scsi/aic94xx/aic94xx_sds.c switch (asd_ha->hw_prof.flash.method) { flash 1201 drivers/scsi/aic94xx/aic94xx_sds.c reg = asd_ha->hw_prof.flash.bar; flash 1257 drivers/scsi/aic94xx/aic94xx_sds.c reg = asd_ha->hw_prof.flash.bar; flash 1267 drivers/scsi/aic94xx/aic94xx_sds.c switch (asd_ha->hw_prof.flash.method) { flash 1307 drivers/scsi/aic94xx/aic94xx_sds.c reg = asd_ha->hw_prof.flash.bar; flash 1316 drivers/scsi/aic94xx/aic94xx_sds.c asd_ha->hw_prof.flash.method = FLASH_METHOD_UNKNOWN; flash 1317 drivers/scsi/aic94xx/aic94xx_sds.c asd_ha->hw_prof.flash.manuf = FLASH_MANUF_ID_UNKNOWN; flash 1318 drivers/scsi/aic94xx/aic94xx_sds.c asd_ha->hw_prof.flash.dev_id = FLASH_DEV_ID_UNKNOWN; flash 1324 drivers/scsi/aic94xx/aic94xx_sds.c inc = asd_ha->hw_prof.flash.wide ? 2 : 1; flash 1349 drivers/scsi/aic94xx/aic94xx_sds.c asd_ha->hw_prof.flash.method = FLASH_METHOD_A; flash 1359 drivers/scsi/aic94xx/aic94xx_sds.c asd_ha->hw_prof.flash.method = FLASH_METHOD_A; flash 1369 drivers/scsi/aic94xx/aic94xx_sds.c asd_ha->hw_prof.flash.method = FLASH_METHOD_A; flash 1376 drivers/scsi/aic94xx/aic94xx_sds.c asd_ha->hw_prof.flash.method = FLASH_METHOD_A; flash 1382 drivers/scsi/aic94xx/aic94xx_sds.c if (asd_ha->hw_prof.flash.method == FLASH_METHOD_UNKNOWN) { flash 1410 drivers/scsi/aic94xx/aic94xx_sds.c asd_ha->hw_prof.flash.method = FLASH_METHOD_B; flash 1419 drivers/scsi/aic94xx/aic94xx_sds.c asd_ha->hw_prof.flash.method = FLASH_METHOD_B; flash 1428 drivers/scsi/aic94xx/aic94xx_sds.c asd_ha->hw_prof.flash.method = FLASH_METHOD_B; flash 1435 drivers/scsi/aic94xx/aic94xx_sds.c asd_ha->hw_prof.flash.method = FLASH_METHOD_B; flash 1442 drivers/scsi/aic94xx/aic94xx_sds.c asd_ha->hw_prof.flash.method = FLASH_METHOD_B; flash 1451 drivers/scsi/aic94xx/aic94xx_sds.c if (asd_ha->hw_prof.flash.method == FLASH_METHOD_UNKNOWN) flash 1454 drivers/scsi/aic94xx/aic94xx_sds.c asd_ha->hw_prof.flash.manuf = manuf_id; flash 1455 drivers/scsi/aic94xx/aic94xx_sds.c asd_ha->hw_prof.flash.dev_id = dev_id; flash 1456 drivers/scsi/aic94xx/aic94xx_sds.c asd_ha->hw_prof.flash.sec_prot = sec_prot; flash 136 drivers/scsi/bfa/bfa_core.c struct bfa_flash_s *flash = BFA_FLASH(bfa); flash 139 drivers/scsi/bfa/bfa_core.c bfa_flash_attach(flash, &bfa->ioc, bfa, bfa->trcmod, mincfg); flash 140 drivers/scsi/bfa/bfa_core.c bfa_flash_memclaim(flash, flash_dma->kva_curp, flash 4213 drivers/scsi/bfa/bfa_ioc.c bfa_flash_cb(struct bfa_flash_s *flash) flash 4215 drivers/scsi/bfa/bfa_ioc.c flash->op_busy = 0; flash 4216 drivers/scsi/bfa/bfa_ioc.c if (flash->cbfn) flash 4217 drivers/scsi/bfa/bfa_ioc.c flash->cbfn(flash->cbarg, flash->status); flash 4223 drivers/scsi/bfa/bfa_ioc.c struct bfa_flash_s *flash = cbarg; flash 4225 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, event); flash 4229 drivers/scsi/bfa/bfa_ioc.c if (flash->op_busy) { flash 4230 drivers/scsi/bfa/bfa_ioc.c flash->status = BFA_STATUS_IOC_FAILURE; flash 4231 drivers/scsi/bfa/bfa_ioc.c flash->cbfn(flash->cbarg, flash->status); flash 4232 drivers/scsi/bfa/bfa_ioc.c flash->op_busy = 0; flash 4249 drivers/scsi/bfa/bfa_ioc.c struct bfa_flash_s *flash = cbarg; flash 4251 drivers/scsi/bfa/bfa_ioc.c (struct bfi_flash_query_req_s *) flash->mb.msg; flash 4254 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(flash->ioc)); flash 4256 drivers/scsi/bfa/bfa_ioc.c flash->dbuf_pa); flash 4257 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(flash->ioc, &flash->mb); flash 4266 drivers/scsi/bfa/bfa_ioc.c bfa_flash_write_send(struct bfa_flash_s *flash) flash 4269 drivers/scsi/bfa/bfa_ioc.c (struct bfi_flash_write_req_s *) flash->mb.msg; flash 4272 drivers/scsi/bfa/bfa_ioc.c msg->type = be32_to_cpu(flash->type); flash 4273 drivers/scsi/bfa/bfa_ioc.c msg->instance = flash->instance; flash 4274 drivers/scsi/bfa/bfa_ioc.c msg->offset = be32_to_cpu(flash->addr_off + flash->offset); flash 4275 drivers/scsi/bfa/bfa_ioc.c len = (flash->residue < BFA_FLASH_DMA_BUF_SZ) ? flash 4276 drivers/scsi/bfa/bfa_ioc.c flash->residue : BFA_FLASH_DMA_BUF_SZ; flash 4280 drivers/scsi/bfa/bfa_ioc.c msg->last = (len == flash->residue) ? 1 : 0; flash 4283 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(flash->ioc)); flash 4284 drivers/scsi/bfa/bfa_ioc.c bfa_alen_set(&msg->alen, len, flash->dbuf_pa); flash 4285 drivers/scsi/bfa/bfa_ioc.c memcpy(flash->dbuf_kva, flash->ubuf + flash->offset, len); flash 4286 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(flash->ioc, &flash->mb); flash 4288 drivers/scsi/bfa/bfa_ioc.c flash->residue -= len; flash 4289 drivers/scsi/bfa/bfa_ioc.c flash->offset += len; flash 4300 drivers/scsi/bfa/bfa_ioc.c struct bfa_flash_s *flash = cbarg; flash 4302 drivers/scsi/bfa/bfa_ioc.c (struct bfi_flash_read_req_s *) flash->mb.msg; flash 4305 drivers/scsi/bfa/bfa_ioc.c msg->type = be32_to_cpu(flash->type); flash 4306 drivers/scsi/bfa/bfa_ioc.c msg->instance = flash->instance; flash 4307 drivers/scsi/bfa/bfa_ioc.c msg->offset = be32_to_cpu(flash->addr_off + flash->offset); flash 4308 drivers/scsi/bfa/bfa_ioc.c len = (flash->residue < BFA_FLASH_DMA_BUF_SZ) ? flash 4309 drivers/scsi/bfa/bfa_ioc.c flash->residue : BFA_FLASH_DMA_BUF_SZ; flash 4312 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(flash->ioc)); flash 4313 drivers/scsi/bfa/bfa_ioc.c bfa_alen_set(&msg->alen, len, flash->dbuf_pa); flash 4314 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(flash->ioc, &flash->mb); flash 4325 drivers/scsi/bfa/bfa_ioc.c struct bfa_flash_s *flash = cbarg; flash 4327 drivers/scsi/bfa/bfa_ioc.c (struct bfi_flash_erase_req_s *) flash->mb.msg; flash 4329 drivers/scsi/bfa/bfa_ioc.c msg->type = be32_to_cpu(flash->type); flash 4330 drivers/scsi/bfa/bfa_ioc.c msg->instance = flash->instance; flash 4332 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_portid(flash->ioc)); flash 4333 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_queue(flash->ioc, &flash->mb); flash 4345 drivers/scsi/bfa/bfa_ioc.c struct bfa_flash_s *flash = flasharg; flash 4358 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, msg->mh.msg_id); flash 4360 drivers/scsi/bfa/bfa_ioc.c if (!flash->op_busy && msg->mh.msg_id != BFI_FLASH_I2H_EVENT) { flash 4362 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, 0x9999); flash 4369 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, status); flash 4374 drivers/scsi/bfa/bfa_ioc.c attr = (struct bfa_flash_attr_s *) flash->ubuf; flash 4375 drivers/scsi/bfa/bfa_ioc.c f = (struct bfa_flash_attr_s *) flash->dbuf_kva; flash 4378 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, attr->status); flash 4379 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, attr->npart); flash 4395 drivers/scsi/bfa/bfa_ioc.c flash->status = status; flash 4396 drivers/scsi/bfa/bfa_ioc.c bfa_flash_cb(flash); flash 4400 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, status); flash 4401 drivers/scsi/bfa/bfa_ioc.c flash->status = status; flash 4402 drivers/scsi/bfa/bfa_ioc.c bfa_flash_cb(flash); flash 4406 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, status); flash 4407 drivers/scsi/bfa/bfa_ioc.c if (status != BFA_STATUS_OK || flash->residue == 0) { flash 4408 drivers/scsi/bfa/bfa_ioc.c flash->status = status; flash 4409 drivers/scsi/bfa/bfa_ioc.c bfa_flash_cb(flash); flash 4411 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, flash->offset); flash 4412 drivers/scsi/bfa/bfa_ioc.c bfa_flash_write_send(flash); flash 4417 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, status); flash 4419 drivers/scsi/bfa/bfa_ioc.c flash->status = status; flash 4420 drivers/scsi/bfa/bfa_ioc.c bfa_flash_cb(flash); flash 4423 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, flash->offset); flash 4424 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, len); flash 4425 drivers/scsi/bfa/bfa_ioc.c memcpy(flash->ubuf + flash->offset, flash 4426 drivers/scsi/bfa/bfa_ioc.c flash->dbuf_kva, len); flash 4427 drivers/scsi/bfa/bfa_ioc.c flash->residue -= len; flash 4428 drivers/scsi/bfa/bfa_ioc.c flash->offset += len; flash 4429 drivers/scsi/bfa/bfa_ioc.c if (flash->residue == 0) { flash 4430 drivers/scsi/bfa/bfa_ioc.c flash->status = status; flash 4431 drivers/scsi/bfa/bfa_ioc.c bfa_flash_cb(flash); flash 4433 drivers/scsi/bfa/bfa_ioc.c bfa_flash_read_send(flash); flash 4440 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, status); flash 4442 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_aen_post(flash->ioc, BFA_IOC_AEN_FWCFG_ERROR); flash 4446 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, param); flash 4447 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_aen_post(flash->ioc, flash 4481 drivers/scsi/bfa/bfa_ioc.c bfa_flash_attach(struct bfa_flash_s *flash, struct bfa_ioc_s *ioc, void *dev, flash 4484 drivers/scsi/bfa/bfa_ioc.c flash->ioc = ioc; flash 4485 drivers/scsi/bfa/bfa_ioc.c flash->trcmod = trcmod; flash 4486 drivers/scsi/bfa/bfa_ioc.c flash->cbfn = NULL; flash 4487 drivers/scsi/bfa/bfa_ioc.c flash->cbarg = NULL; flash 4488 drivers/scsi/bfa/bfa_ioc.c flash->op_busy = 0; flash 4490 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_mbox_regisr(flash->ioc, BFI_MC_FLASH, bfa_flash_intr, flash); flash 4491 drivers/scsi/bfa/bfa_ioc.c bfa_q_qe_init(&flash->ioc_notify); flash 4492 drivers/scsi/bfa/bfa_ioc.c bfa_ioc_notify_init(&flash->ioc_notify, bfa_flash_notify, flash); flash 4493 drivers/scsi/bfa/bfa_ioc.c list_add_tail(&flash->ioc_notify.qe, &flash->ioc->notify_q); flash 4497 drivers/scsi/bfa/bfa_ioc.c flash->dbuf_kva = NULL; flash 4498 drivers/scsi/bfa/bfa_ioc.c flash->dbuf_pa = 0; flash 4511 drivers/scsi/bfa/bfa_ioc.c bfa_flash_memclaim(struct bfa_flash_s *flash, u8 *dm_kva, u64 dm_pa, flash 4517 drivers/scsi/bfa/bfa_ioc.c flash->dbuf_kva = dm_kva; flash 4518 drivers/scsi/bfa/bfa_ioc.c flash->dbuf_pa = dm_pa; flash 4519 drivers/scsi/bfa/bfa_ioc.c memset(flash->dbuf_kva, 0, BFA_FLASH_DMA_BUF_SZ); flash 4535 drivers/scsi/bfa/bfa_ioc.c bfa_flash_get_attr(struct bfa_flash_s *flash, struct bfa_flash_attr_s *attr, flash 4538 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, BFI_FLASH_H2I_QUERY_REQ); flash 4540 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(flash->ioc)) flash 4543 drivers/scsi/bfa/bfa_ioc.c if (flash->op_busy) { flash 4544 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, flash->op_busy); flash 4548 drivers/scsi/bfa/bfa_ioc.c flash->op_busy = 1; flash 4549 drivers/scsi/bfa/bfa_ioc.c flash->cbfn = cbfn; flash 4550 drivers/scsi/bfa/bfa_ioc.c flash->cbarg = cbarg; flash 4551 drivers/scsi/bfa/bfa_ioc.c flash->ubuf = (u8 *) attr; flash 4552 drivers/scsi/bfa/bfa_ioc.c bfa_flash_query_send(flash); flash 4569 drivers/scsi/bfa/bfa_ioc.c bfa_flash_erase_part(struct bfa_flash_s *flash, enum bfa_flash_part_type type, flash 4572 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, BFI_FLASH_H2I_ERASE_REQ); flash 4573 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, type); flash 4574 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, instance); flash 4576 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(flash->ioc)) flash 4579 drivers/scsi/bfa/bfa_ioc.c if (flash->op_busy) { flash 4580 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, flash->op_busy); flash 4584 drivers/scsi/bfa/bfa_ioc.c flash->op_busy = 1; flash 4585 drivers/scsi/bfa/bfa_ioc.c flash->cbfn = cbfn; flash 4586 drivers/scsi/bfa/bfa_ioc.c flash->cbarg = cbarg; flash 4587 drivers/scsi/bfa/bfa_ioc.c flash->type = type; flash 4588 drivers/scsi/bfa/bfa_ioc.c flash->instance = instance; flash 4590 drivers/scsi/bfa/bfa_ioc.c bfa_flash_erase_send(flash); flash 4591 drivers/scsi/bfa/bfa_ioc.c bfa_flash_aen_audit_post(flash->ioc, BFA_AUDIT_AEN_FLASH_ERASE, flash 4611 drivers/scsi/bfa/bfa_ioc.c bfa_flash_update_part(struct bfa_flash_s *flash, enum bfa_flash_part_type type, flash 4615 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, BFI_FLASH_H2I_WRITE_REQ); flash 4616 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, type); flash 4617 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, instance); flash 4618 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, len); flash 4619 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, offset); flash 4621 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(flash->ioc)) flash 4634 drivers/scsi/bfa/bfa_ioc.c if (flash->op_busy) { flash 4635 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, flash->op_busy); flash 4639 drivers/scsi/bfa/bfa_ioc.c flash->op_busy = 1; flash 4640 drivers/scsi/bfa/bfa_ioc.c flash->cbfn = cbfn; flash 4641 drivers/scsi/bfa/bfa_ioc.c flash->cbarg = cbarg; flash 4642 drivers/scsi/bfa/bfa_ioc.c flash->type = type; flash 4643 drivers/scsi/bfa/bfa_ioc.c flash->instance = instance; flash 4644 drivers/scsi/bfa/bfa_ioc.c flash->residue = len; flash 4645 drivers/scsi/bfa/bfa_ioc.c flash->offset = 0; flash 4646 drivers/scsi/bfa/bfa_ioc.c flash->addr_off = offset; flash 4647 drivers/scsi/bfa/bfa_ioc.c flash->ubuf = buf; flash 4649 drivers/scsi/bfa/bfa_ioc.c bfa_flash_write_send(flash); flash 4668 drivers/scsi/bfa/bfa_ioc.c bfa_flash_read_part(struct bfa_flash_s *flash, enum bfa_flash_part_type type, flash 4672 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, BFI_FLASH_H2I_READ_REQ); flash 4673 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, type); flash 4674 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, instance); flash 4675 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, len); flash 4676 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, offset); flash 4678 drivers/scsi/bfa/bfa_ioc.c if (!bfa_ioc_is_operational(flash->ioc)) flash 4688 drivers/scsi/bfa/bfa_ioc.c if (flash->op_busy) { flash 4689 drivers/scsi/bfa/bfa_ioc.c bfa_trc(flash, flash->op_busy); flash 4693 drivers/scsi/bfa/bfa_ioc.c flash->op_busy = 1; flash 4694 drivers/scsi/bfa/bfa_ioc.c flash->cbfn = cbfn; flash 4695 drivers/scsi/bfa/bfa_ioc.c flash->cbarg = cbarg; flash 4696 drivers/scsi/bfa/bfa_ioc.c flash->type = type; flash 4697 drivers/scsi/bfa/bfa_ioc.c flash->instance = instance; flash 4698 drivers/scsi/bfa/bfa_ioc.c flash->residue = len; flash 4699 drivers/scsi/bfa/bfa_ioc.c flash->offset = 0; flash 4700 drivers/scsi/bfa/bfa_ioc.c flash->addr_off = offset; flash 4701 drivers/scsi/bfa/bfa_ioc.c flash->ubuf = buf; flash 4702 drivers/scsi/bfa/bfa_ioc.c bfa_flash_read_send(flash); flash 494 drivers/scsi/bfa/bfa_ioc.h #define BFA_FLASH(__bfa) (&(__bfa)->modules.flash) flash 497 drivers/scsi/bfa/bfa_ioc.h bfa_status_t bfa_flash_get_attr(struct bfa_flash_s *flash, flash 500 drivers/scsi/bfa/bfa_ioc.h bfa_status_t bfa_flash_erase_part(struct bfa_flash_s *flash, flash 503 drivers/scsi/bfa/bfa_ioc.h bfa_status_t bfa_flash_update_part(struct bfa_flash_s *flash, flash 507 drivers/scsi/bfa/bfa_ioc.h bfa_status_t bfa_flash_read_part(struct bfa_flash_s *flash, flash 511 drivers/scsi/bfa/bfa_ioc.h void bfa_flash_attach(struct bfa_flash_s *flash, struct bfa_ioc_s *ioc, flash 513 drivers/scsi/bfa/bfa_ioc.h void bfa_flash_memclaim(struct bfa_flash_s *flash, flash 37 drivers/scsi/bfa/bfa_modules.h struct bfa_flash_s flash; /* flash module */ flash 1159 drivers/scsi/esas2r/atioctl.h struct atto_ioctl_vda_flash_cmd flash; flash 1219 drivers/scsi/esas2r/atvda.h struct atto_vda_flash_req flash; flash 136 drivers/scsi/esas2r/esas2r_flash.c struct atto_vda_flash_req *vrq = &rq->vrq->flash; flash 212 drivers/scsi/esas2r/esas2r_flash.c esas2r_sgc_init(sgc, a, rq, &rq->vrq->flash.data.sge[0]); flash 833 drivers/scsi/esas2r/esas2r_flash.c if (rq->vrq->flash.sub_func == VDA_FLASH_COMMIT) flash 915 drivers/scsi/esas2r/esas2r_flash.c esas2r_sgc_init(sgc, a, rq, rq->vrq->flash.data.sge); flash 1215 drivers/scsi/esas2r/esas2r_flash.c struct atto_vda_flash_req *vrq = &rq->vrq->flash; flash 1264 drivers/scsi/esas2r/esas2r_flash.c struct atto_vda_flash_req *vrq = &rq->vrq->flash; flash 921 drivers/scsi/esas2r/esas2r_int.c && rq->vrq->flash.sub_func == VDA_FLASH_COMMIT) flash 128 drivers/scsi/esas2r/esas2r_io.c && rq->vrq->flash.sub_func == VDA_FLASH_COMMIT)) flash 102 drivers/scsi/esas2r/esas2r_vda.c if (vi->cmd.flash.sub_func != VDA_FLASH_FREAD flash 103 drivers/scsi/esas2r/esas2r_vda.c && vi->cmd.flash.sub_func != VDA_FLASH_FWRITE flash 104 drivers/scsi/esas2r/esas2r_vda.c && vi->cmd.flash.sub_func != VDA_FLASH_FINFO) { flash 109 drivers/scsi/esas2r/esas2r_vda.c if (vi->cmd.flash.sub_func != VDA_FLASH_FINFO) flash 112 drivers/scsi/esas2r/esas2r_vda.c rq->vrq->flash.length = cpu_to_le32(datalen); flash 113 drivers/scsi/esas2r/esas2r_vda.c rq->vrq->flash.sub_func = vi->cmd.flash.sub_func; flash 115 drivers/scsi/esas2r/esas2r_vda.c memcpy(rq->vrq->flash.data.file.file_name, flash 116 drivers/scsi/esas2r/esas2r_vda.c vi->cmd.flash.data.file.file_name, flash 117 drivers/scsi/esas2r/esas2r_vda.c sizeof(vi->cmd.flash.data.file.file_name)); flash 119 drivers/scsi/esas2r/esas2r_vda.c firstsg = rq->vrq->flash.data.file.sge; flash 279 drivers/scsi/esas2r/esas2r_vda.c if (vi->cmd.flash.sub_func == VDA_FLASH_FINFO flash 280 drivers/scsi/esas2r/esas2r_vda.c || vi->cmd.flash.sub_func == VDA_FLASH_FREAD) flash 281 drivers/scsi/esas2r/esas2r_vda.c vi->cmd.flash.data.file.file_size = flash 353 drivers/scsi/esas2r/esas2r_vda.c struct atto_vda_flash_req *vrq = &rq->vrq->flash; flash 22 drivers/scsi/qla4xxx/ql4_bsg.c uint8_t *flash = NULL; flash 47 drivers/scsi/qla4xxx/ql4_bsg.c flash = dma_alloc_coherent(&ha->pdev->dev, length, &flash_dma, flash 49 drivers/scsi/qla4xxx/ql4_bsg.c if (!flash) { flash 65 drivers/scsi/qla4xxx/ql4_bsg.c flash, length); flash 71 drivers/scsi/qla4xxx/ql4_bsg.c dma_free_coherent(&ha->pdev->dev, length, flash, flash_dma); flash 88 drivers/scsi/qla4xxx/ql4_bsg.c uint8_t *flash = NULL; flash 114 drivers/scsi/qla4xxx/ql4_bsg.c flash = dma_alloc_coherent(&ha->pdev->dev, length, &flash_dma, flash 116 drivers/scsi/qla4xxx/ql4_bsg.c if (!flash) { flash 124 drivers/scsi/qla4xxx/ql4_bsg.c bsg_job->request_payload.sg_cnt, flash, length); flash 136 drivers/scsi/qla4xxx/ql4_bsg.c dma_free_coherent(&ha->pdev->dev, length, flash, flash_dma); flash 167 drivers/spi/spi-butterfly.c static struct flash_platform_data flash = { flash 263 drivers/spi/spi-butterfly.c pp->info[0].platform_data = &flash; flash 106 drivers/spi/spi-stm32-qspi.c struct stm32_qspi_flash flash[STM32_QSPI_MAX_NORCHIP]; flash 330 drivers/spi/spi-stm32-qspi.c struct stm32_qspi_flash *flash = &qspi->flash[mem->spi->chip_select]; flash 357 drivers/spi/spi-stm32-qspi.c cr |= FIELD_PREP(CR_PRESC_MASK, flash->presc); flash 358 drivers/spi/spi-stm32-qspi.c cr |= FIELD_PREP(CR_FSEL, flash->cs); flash 445 drivers/spi/spi-stm32-qspi.c struct stm32_qspi_flash *flash; flash 456 drivers/spi/spi-stm32-qspi.c flash = &qspi->flash[spi->chip_select]; flash 457 drivers/spi/spi-stm32-qspi.c flash->qspi = qspi; flash 458 drivers/spi/spi-stm32-qspi.c flash->cs = spi->chip_select; flash 459 drivers/spi/spi-stm32-qspi.c flash->presc = presc; flash 2137 drivers/staging/qlge/qlge.h union flash_params flash; flash 703 drivers/staging/qlge/qlge_main.c __le16 *flash = (__le16 *)&qdev->flash; flash 705 drivers/staging/qlge/qlge_main.c status = strncmp((char *)&qdev->flash, str, 4); flash 712 drivers/staging/qlge/qlge_main.c csum += le16_to_cpu(*flash++); flash 749 drivers/staging/qlge/qlge_main.c __le32 *p = (__le32 *)&qdev->flash; flash 786 drivers/staging/qlge/qlge_main.c if (qdev->flash.flash_params_8000.data_type1 == 2) flash 788 drivers/staging/qlge/qlge_main.c qdev->flash.flash_params_8000.mac_addr1, flash 792 drivers/staging/qlge/qlge_main.c qdev->flash.flash_params_8000.mac_addr, flash 814 drivers/staging/qlge/qlge_main.c __le32 *p = (__le32 *)&qdev->flash; flash 846 drivers/staging/qlge/qlge_main.c if (!is_valid_ether_addr(qdev->flash.flash_params_8012.mac_addr)) { flash 852 drivers/staging/qlge/qlge_main.c qdev->flash.flash_params_8012.mac_addr, flash 1063 drivers/usb/typec/ucsi/ucsi_ccg.c bool flash; flash 1065 drivers/usb/typec/ucsi/ucsi_ccg.c if (kstrtobool(buf, &flash)) flash 1068 drivers/usb/typec/ucsi/ucsi_ccg.c if (!flash) flash 216 scripts/kconfig/lxdialog/inputbox.c flash(); /* Alarm user about overflow */