Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: spi-qpic-snand: cleanup 'qpic_ecc' structure

Merge series from Gabor Juhos <j4g8y7@gmail.com>:

The series consist of two small patches to clean up the qpic_ecc structure
in the spi-qpic-snand driver. The first one removes an unused member from
the structure, whereas the second reduces code duplication and removes
another two members from the same.

+2 -15
+2 -15
drivers/spi/spi-qpic-snand.c
··· 78 78 }; 79 79 80 80 struct qpic_ecc { 81 - struct device *dev; 82 81 int ecc_bytes_hw; 83 82 int spare_bytes; 84 83 int bbm_size; ··· 94 95 u32 cfg1_raw; 95 96 u32 ecc_buf_cfg; 96 97 u32 ecc_bch_cfg; 97 - u32 clrflashstatus; 98 - u32 clrreadstatus; 99 98 bool bch_enabled; 100 99 }; 101 100 ··· 379 382 FIELD_PREP(ECC_PARITY_SIZE_BYTES_BCH_MASK, ecc_cfg->ecc_bytes_hw); 380 383 381 384 ecc_cfg->ecc_buf_cfg = FIELD_PREP(NUM_STEPS_MASK, 0x203); 382 - ecc_cfg->clrflashstatus = FS_READY_BSY_N; 383 - ecc_cfg->clrreadstatus = 0xc0; 384 385 385 386 conf->step_size = ecc_cfg->step_size; 386 387 conf->strength = ecc_cfg->strength; 387 388 389 + snandc->regs->clrflashstatus = cpu_to_le32(FS_READY_BSY_N); 390 + snandc->regs->clrreadstatus = cpu_to_le32(0xc0); 388 391 snandc->regs->erased_cw_detect_cfg_clr = cpu_to_le32(CLR_ERASED_PAGE_DET); 389 392 snandc->regs->erased_cw_detect_cfg_set = cpu_to_le32(SET_ERASED_PAGE_DET); 390 393 ··· 596 599 snandc->regs->cfg0 = cpu_to_le32(cfg0); 597 600 snandc->regs->cfg1 = cpu_to_le32(cfg1); 598 601 snandc->regs->ecc_bch_cfg = cpu_to_le32(ecc_bch_cfg); 599 - snandc->regs->clrflashstatus = cpu_to_le32(ecc_cfg->clrflashstatus); 600 - snandc->regs->clrreadstatus = cpu_to_le32(ecc_cfg->clrreadstatus); 601 602 snandc->regs->exec = cpu_to_le32(1); 602 603 603 604 qcom_spi_set_read_loc(snandc, num_cw - 1, 0, 0, ecc_cfg->cw_size, 1); ··· 729 734 snandc->regs->cfg0 = cpu_to_le32(cfg0); 730 735 snandc->regs->cfg1 = cpu_to_le32(cfg1); 731 736 snandc->regs->ecc_bch_cfg = cpu_to_le32(ecc_bch_cfg); 732 - snandc->regs->clrflashstatus = cpu_to_le32(ecc_cfg->clrflashstatus); 733 - snandc->regs->clrreadstatus = cpu_to_le32(ecc_cfg->clrreadstatus); 734 737 snandc->regs->exec = cpu_to_le32(1); 735 738 736 739 qcom_spi_set_read_loc(snandc, raw_cw, 0, 0, ecc_cfg->cw_size, 1); ··· 843 850 snandc->regs->cfg0 = cpu_to_le32(cfg0); 844 851 snandc->regs->cfg1 = cpu_to_le32(cfg1); 845 852 snandc->regs->ecc_bch_cfg = cpu_to_le32(ecc_bch_cfg); 846 - snandc->regs->clrflashstatus = cpu_to_le32(ecc_cfg->clrflashstatus); 847 - snandc->regs->clrreadstatus = cpu_to_le32(ecc_cfg->clrreadstatus); 848 853 snandc->regs->exec = cpu_to_le32(1); 849 854 850 855 qcom_spi_set_read_loc(snandc, 0, 0, 0, ecc_cfg->cw_data, 1); ··· 934 943 snandc->regs->cfg0 = cpu_to_le32(cfg0); 935 944 snandc->regs->cfg1 = cpu_to_le32(cfg1); 936 945 snandc->regs->ecc_bch_cfg = cpu_to_le32(ecc_bch_cfg); 937 - snandc->regs->clrflashstatus = cpu_to_le32(ecc_cfg->clrflashstatus); 938 - snandc->regs->clrreadstatus = cpu_to_le32(ecc_cfg->clrreadstatus); 939 946 snandc->regs->exec = cpu_to_le32(1); 940 947 941 948 qcom_spi_set_read_loc(snandc, 0, 0, 0, ecc_cfg->cw_data, 1); ··· 1053 1064 snandc->regs->cfg0 = cpu_to_le32(cfg0); 1054 1065 snandc->regs->cfg1 = cpu_to_le32(cfg1); 1055 1066 snandc->regs->ecc_bch_cfg = cpu_to_le32(ecc_bch_cfg); 1056 - snandc->regs->clrflashstatus = cpu_to_le32(ecc_cfg->clrflashstatus); 1057 - snandc->regs->clrreadstatus = cpu_to_le32(ecc_cfg->clrreadstatus); 1058 1067 snandc->regs->exec = cpu_to_le32(1); 1059 1068 1060 1069 qcom_spi_config_page_write(snandc);