flash: fix typos and duplicated words
[fw/openocd] / src / flash / nand / mx3.c
index 51fa680fd3bb7fa770188bc6786c8af53cb1b6f3..abeaf159cc2e0d4354587a251e32188dd2894482 100644 (file)
@@ -15,9 +15,7 @@
  *   GNU General Public License for more details.                          *
  *                                                                         *
  *   You should have received a copy of the GNU General Public License     *
- *   along with this program; if not, write to the                         *
- *   Free Software Foundation, Inc.,                                       *
- *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.           *
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
  ***************************************************************************/
 
 /*
@@ -151,7 +149,7 @@ static int imx31_init(struct nand_device *nand)
                uint32_t gpr_register_content;
                target_read_u32(target, MX3_GPR, &gpr_register_content);
                if (gpr_register_content & 0x00000060) {
-                       LOG_ERROR("pins mode overrided by GPR");
+                       LOG_ERROR("pins mode overridden by GPR");
                        return ERROR_FAIL;
                }
        }
@@ -283,6 +281,7 @@ static int imx31_command(struct nand_device *nand, uint8_t command)
                         * offset == one half of page size
                         */
                        in_sram_address = MX3_NF_MAIN_BUFFER0 + (nand->page_size >> 1);
+                       break;
                default:
                        in_sram_address = MX3_NF_MAIN_BUFFER0;
        }
@@ -415,10 +414,10 @@ static int imx31_write_page(struct nand_device *nand, uint32_t page,
                if (oob) {
                        if (mx3_nf_info->flags.hw_ecc_enabled) {
                                /*
-                                * part of spare block will be overrided by hardware
+                                * part of spare block will be overridden by hardware
                                 * ECC generator
                                 */
-                               LOG_DEBUG("part of spare block will be overrided by hardware ECC generator");
+                               LOG_DEBUG("part of spare block will be overridden by hardware ECC generator");
                        }
                        target_write_buffer(target, MX3_NF_SPARE_BUFFER0, oob_size, oob);
                }
@@ -531,7 +530,7 @@ static int initialize_nf_controller(struct nand_device *nand)
        struct mx3_nf_controller *mx3_nf_info = nand->controller_priv;
        struct target *target = nand->target;
        /*
-       * resets NAND flash controller in zero time ? I dont know.
+       * resets NAND flash controller in zero time ? I don't know.
        */
        target_write_u16(target, MX3_NF_CFG1, MX3_NF_BIT_RESET_EN);
        {
@@ -681,21 +680,19 @@ static int do_data_output(struct nand_device *nand)
                                target_read_u16 (target, MX3_NF_ECCSTATUS, &ecc_status);
                                switch (ecc_status & 0x000c) {
                                case 1 << 2:
-                                       LOG_DEBUG("main area readed with 1 (correctable) error");
+                                       LOG_DEBUG("main area read with 1 (correctable) error");
                                        break;
                                case 2 << 2:
-                                       LOG_DEBUG("main area readed with more than 1 (incorrectable) error");
+                                       LOG_DEBUG("main area read with more than 1 (incorrectable) error");
                                        return ERROR_NAND_OPERATION_FAILED;
-                                       break;
                                }
                                switch (ecc_status & 0x0003) {
                                case 1:
-                                       LOG_DEBUG("spare area readed with 1 (correctable) error");
+                                       LOG_DEBUG("spare area read with 1 (correctable) error");
                                        break;
                                case 2:
-                                       LOG_DEBUG("main area readed with more than 1 (incorrectable) error");
+                                       LOG_DEBUG("main area read with more than 1 (incorrectable) error");
                                        return ERROR_NAND_OPERATION_FAILED;
-                                       break;
                                }
                        }
                        break;